PageSourceSearch

https://www.emiliaromagnawelcome.com/js/82dbe00.js?v1783334560

js emiliaromagnawelcome.com collected 2026-10-04 05:01:44 UTC 603,636 bytes, 9,304 lines download raw bytes

vendor: 4,780 bytes, lines 1-41
1if (!Array.prototype.indexOf) {
2    Array.prototype.indexOf = function (searchElement, fromIndex) {
3
4        var k;
5
6        if (this == null) {
7            throw new TypeError('"this" is null or not defined');
8        }
9
10        var O = Object(this);
11
12        var len = O.length >>> 0;
13
14        if (len === 0) {
15            return -1;
16        }
17
18        var n = +fromIndex || 0;
19
20        if (Math.abs(n) === Infinity) {
21            n = 0;
22        }
23
24        if (n >= len) {
25            return -1;
26        }
27
28        k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
29
30        while (k < len) {
31            if (k in O && O[k] === searchElement) {
32                return k;
33            }
34            k++;
35        }
36        return -1;
37    };
38}
39
40/*! jQuery v1.12.1 | (c) jQuery Foundation | jquery.org/license */
41!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=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.1",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 e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.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()},push:g,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){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=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&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.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){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim: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):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.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,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date}
vendor: 3,521 bytes, line 41
41,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"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,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=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)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}
vendor: 9,959 bytes, line 41
41function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(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 oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(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"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.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},B=b?function(a,b){if(a===b)return l=!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===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.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=fa.selectors={cacheLength:50,createPseudo:ha,match:W,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(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===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]||fa.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]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(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(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.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.replace(P," ")+" ").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(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(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),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?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===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.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 Y.test(a.nodeName)}
vendor: 10,753 bytes, line 41
41,input:function(a){return X.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:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(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]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=R.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[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?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;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,k=[w,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(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(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 ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(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 va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(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?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(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(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==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(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};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=w.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.uniqueSort(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.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(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 u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(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&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.pu
vendor: 4,130 bytes, lines 41-42
41sh(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},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().progress(c.notify).done(c.resolve).fail(c.reject):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=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--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){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=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},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;
42}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(M(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,103 bytes, line 42
42:{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}}function S(a,b,c){if(M(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]=void 0)}}}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--)g[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)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;
vendor: 6,432 bytes, line 42
42for(h in c)Y(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},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={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>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?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,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}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"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.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(G)||[""],j=b.length;while(j--)if(h=oa.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,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>
vendor: 9,875 bytes, line 42
42-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.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,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.rnamespace||a.rnamespace.test(g.namespace))&&(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!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&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}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,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail 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,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&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&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(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?pa:qa):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={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},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.submit||(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")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!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"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};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){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,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=qa),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}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(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 Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(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 Ga(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?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.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)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);
vendor: 14,454 bytes, lines 42-43
42if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(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||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(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 Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),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=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=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},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.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+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.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 Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(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&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(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 db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(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+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(b,c,e){var f=!0,g="width"===c?b.offsetWidth:b.offsetHeight,h=Ra(b),i=l.boxSizing&&"border-box"===n.css(b,"boxSizing",!1,h);if(d.msFullscreenElement&&a.top!==a&&b.getClientRects().length&&(g=Math.round(100*b.getBoundingClientRect()[c])),0>=g||null==g){if(g=Sa(b,c,h),(0>g||null==g)&&(g=b.style[c]),Oa.test(g))return g;f=i&&(l.boxSizingReliable()||g===b.style[c]),g=parseFloat(g)||0}return g+eb(b,c,e||(i?"border":"content"),f,h)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!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]=bb(h)||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=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"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]=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]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(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 Wa.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(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){
43return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":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+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(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)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=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):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.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},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(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="none"===j?
vendor: 28,295 bytes, line 43
43n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?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],jb.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)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{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=nb(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 pb(a,b){var c,d,e,f,g;for(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 qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),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:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),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.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,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(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.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(W).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=qb(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&&kb.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(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("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(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=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(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\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(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(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)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb,tb,ub=n.expr.attrHandle,vb=/^(?:checked|selected)$/i,wb=l.getSetAttribute,xb=l.input;n.fn.extend({attr:function(a,b){return Y(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(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?tb:sb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0: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}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?xb&&wb||!vb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(wb?c:d)}}),tb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):xb&&wb||!vb.test(c)?a.setAttribute(!wb&&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=ub[b]||n.find.attr;xb&&wb||!vb.test(b)?ub[b]=function(a,b,d){var e,f;return d||(f=ub[b],ub[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ub[b]=f),e}:ub[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),xb&&wb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):sb&&sb.set(a,b,c)}}),wb||(sb={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}},ub.id=ub.name=ub.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:sb.set},n.attrHooks.contenteditable={set:function(a,b,c){sb.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 yb=/^(?:input|select|textarea|button|object)$/i,zb=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(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({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(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):yb.test(a.nodeName)||zb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),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 Ab=/[\t\r\n\f]/g;function Bb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Bb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Bb(c),d=1===c.nodeType&&(" "+e+" ").replace(Ab," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Bb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Bb(c),d=1===c.nodeType&&(" "+e+" ").replace(Ab," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Bb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(void 0===a||"boolean"===c)&&(b=Bb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Bb(c)+" ").replace(Ab," ").indexOf(b)>-1)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)}});var Cb=a.location,Db=n.now(),Eb=/\?/,Fb=/(,)|(\[|{)|(}|])|"(?:[^"\\\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(Fb,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 a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.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 Gb=/#.*$/,Hb=/([?&])_=[^&]*/,Ib=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Jb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Kb=/^(?:GET|HEAD)$/,Lb=/^\/\//,Mb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Nb={},Ob={},Pb="*/".concat("*"),Qb=Cb.href,Rb=Mb.exec(Qb.toLowerCase())||[];function Sb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];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 Tb(a,b,c,d){var e={},f=a===Ob;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 Ub(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 Vb(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 Wb(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:Qb,type:"GET",isLocal:Jb.test(Rb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ub(Ub(a,n.ajaxSettings),b):Ub(n.ajaxSettings,a)},ajaxPrefilter:Sb(Nb),ajaxTransport:Sb(Ob),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Ib.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Qb)+"").replace(Gb,"").replace(Lb,Rb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Mb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Rb[1]&&d[2]===Rb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Rb[3]||("http:"===Rb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Tb(Nb,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Kb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Eb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Hb.test(f)?f.replace(Hb,"$1_="+Db++):f+(Eb.test(f)?"&":"?")+"_="+Db++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Pb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Tb(Ob,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Vb(l,w,d)),v=Wb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,(b||!y)&&(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},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(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,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 n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(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()}});function Xb(a){return a.style&&a.style.display||n.css(a,"display")}function Yb(a){while(a&&1===a.nodeType){if("none"===Xb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Yb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Zb=/%20/g,$b=/\[\]$/,_b=/\r?\n/g,ac=/^(?:submit|button|image|reset|file)$/i,bc=/^(?:input|select|textarea|keygen)/i;function cc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||$b.test(a)?d(a,e):cc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)cc(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)cc(c,a[c],b,e);return d.join("&").replace(Zb,"+")},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")&&bc.test(this.nodeName)&&!ac.test(a)&&(this.checked||!Z.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(_b,"\r\n")}}):{name:b.name,value:c.replace(_b,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?hc():d.documentMode>8?gc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&gc()||hc()}:gc;var dc=0,ec={},fc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in ec)ec[a](void 0,!0)}),l.cors=!!fc&&"withCredentials"in fc,fc=l.ajax=!!fc,fc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++dc;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete ec[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=ec[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function gc(){try{return new a.XMLHttpRequest}catch(b){}}function hc(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},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=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.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||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ic=[],jc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ic.pop()||n.expando+"_"+Db++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(jc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&jc.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(jc,"$1"+e):b.jsonp!==!1&&(b.url+=(Eb.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(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ic.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),l.createHTMLDocument=function(){if(!d.implementation.createHTMLDocument)return!1;var a=d.implementation.createHTMLDocument("");return a.body.innerHTML="<form></form><form></form>",2===a.body.childNodes.length}(),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||(l.createHTMLDocument?d.implementation.createHTMLDocument(""):d);var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var kc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&kc)return kc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(g,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function lc(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,n.extend({},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)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=lc(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)
43,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;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=lc(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);
44},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.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 Y(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.extend({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)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var mc=a.jQuery,nc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=nc),b&&a.jQuery===n&&(a.jQuery=mc),n},b||(a.jQuery=a.$=n),n});
45
46/*!
47 * Bootstrap v3.3.7 (http://getbootstrap.com)
48 * Copyright 2011-2018 Twitter, Inc.
49 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
50 */
51
52/*!
53 * Generated using the Bootstrap Customizer (https://getbootstrap.com/docs/3.3/customize/?id=cdb0ea45e33804f69f126c5f88ca7245)
54 * Config saved to config.json and https://gist.github.com/cdb0ea45e33804f69f126c5f88ca7245
55 */
56if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.3.7",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function i(){a.detach().trigger("closed.bs.alert").remove()}var n=t(this),s=n.attr("data-target");s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var a=t("#"===s?[]:s);e&&e.preventDefault(),a.length||(a=n.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.carousel"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e),a="string"==typeof e?e:s.slide;n||o.data("bs.carousel",n=new i(this,s)),"number"==typeof e?n.to(e):a?n[a]():s.interval&&n.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),o="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(o&&!this.options.wrap)return e;var n="prev"==t?-1:1,s=(i+n)%this.$items.length;return this.$items.eq(s)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".
56item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,o){var n=this.$element.find(".item.active"),s=o||this.getItemForDirection(e,n),a=this.interval,r="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var h=s[0],d=t.Event("slide.bs.carousel",{relatedTarget:h,direction:r});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=t(this.$indicators.children()[this.getItemIndex(s)]);p&&p.addClass("active")}var c=t.Event("slid.bs.carousel",{relatedTarget:h,direction:r});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,n.addClass(r),s.addClass(r),n.one("bsTransitionEnd",function(){s.removeClass([e,r].join(" ")).addClass("active"),n.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(c)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(n.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(c)),a&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var n=function(i){var o,n=t(this),s=t(n.attr("data-target")||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var a=t.extend({},s.data(),n.data()),r=n.attr("data-slide-to");r&&(a.interval=!1),e.call(s,a),r&&s.data("bs.carousel").to(r),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",n).on("click.bs.carousel.data-api","[data-slide-to]",n),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}function i(i){i&&3===i.which||(t(n).remove(),t(s).each(function(){var o=t(this),n=e(o),s={relatedTarget:this};n.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(n[0],i.target)||(n.trigger(i=t.Event("hide.bs.dropdown",s)),i.isDefaultPrevented()||(o.attr("aria-expanded","false"),n.removeClass("open").trigger(t.Event("hidden.bs.dropdown",s)))))}))}function o(e){return this.each(function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new a(this)),"string"==typeof e&&o[e].call(i)})}var n=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.7",a.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=e(n),a=s.hasClass("open");if(i(),!a){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var r={relatedTarget:this};if(s.trigger(o=t.Event("show.bs.dropdown",r)),o.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger(t.Event("shown.bs.dropdown",r))}return!1}},a.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var o=t(this);if(i.preventDefault(),i.stopPropagation(),!o.is(".disabled, :disabled")){var n=e(o),a=n.hasClass("open");if(!a&&27!=i.which||a&&27==i.which)return 27==i.which&&n.find(s).trigger("focus"),o.trigger("click");var r=" li:not(.disabled):visible a",l=n.find(".dropdown-menu"+r);if(l.length){var h=l.index(i.target);38==i.which&&h>0&&h--,40==i.which&&h<l.length-1&&h++,~h||(h=0),l.eq(h).trigger("focus")}}}};var r=t.fn.dropdown;t.fn.dropdown=o,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,a.prototype.toggle).on("keydown.bs.dropdown.data-api",s,a.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",a.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e,o){return this.each(function(){var n=t(this),s=n.data("bs.modal"),a=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);s||n.data("bs.modal",s=new i(this,a)),"string"==typeof e?s[e](o):a.show&&s.show(o)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal
56-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var o=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var n=t.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),n&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});n?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(i.TRANSITION_DURATION):o.$element.trigger("focus").trigger(s)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var o=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&n;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){o.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var o=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=o,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var o=t(this),n=o.attr("href"),s=t(o.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},s.data(),o.data());o.is("a")&&i.preventDefault(),s.one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){o.is(":visible")&&o.trigger("focus")})}),e.call(s,a,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tooltip"),s="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||o.data("bs.tooltip",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,o){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var n=this.options.trigger.split(" "),s=n.length;s--;){var a=n[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);
vendor: 9,121 bytes, line 56
56return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,s=this.tip(),a=this.getUID(this.type);this.setContent(),s.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&s.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(r);h&&(r=r.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var d=this.getPosition(),p=s[0].offsetWidth,c=s[0].offsetHeight;if(h){var f=r,u=this.getPosition(this.$viewport);r="bottom"==r&&d.bottom+c>u.bottom?"top":"top"==r&&d.top-c<u.top?"bottom":"right"==r&&d.right+p>u.width?"left":"left"==r&&d.left-p<u.left?"right":r,s.removeClass(f).addClass(r)}var g=this.getCalculatedOffset(r,d,p,c);this.applyPlacement(g,r);var m=function(){var t=n.hoverState;n.$element.trigger("shown.bs."+n.type),n.hoverState=null,"out"==t&&n.leave(n)};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",m).emulateTransitionEnd(i.TRANSITION_DURATION):m()}},i.prototype.applyPlacement=function(e,i){var o=this.tip(),n=o[0].offsetWidth,s=o[0].offsetHeight,a=parseInt(o.css("margin-top"),10),r=parseInt(o.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(r)&&(r=0),e.top+=a,e.left+=r,t.offset.setOffset(o[0],t.extend({using:function(t){o.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),o.addClass("in");var l=o[0].offsetWidth,h=o[0].offsetHeight;"top"==i&&h!=s&&(e.top=e.top+s-h);var d=this.getViewportAdjustedDelta(i,e,l,h);d.left?e.left+=d.left:e.top+=d.top;var p=/top|bottom/.test(i),c=p?2*d.left-n+l:2*d.top-s+h,f=p?"offsetWidth":"offsetHeight";o.offset(e),this.replaceArrow(c,o[0][f],p)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(e){function o(){"in"!=n.hoverState&&s.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}var n=this,s=t(this.$tip),a=t.Event("hide.bs."+this.type);return this.$element.trigger(a),a.isDefaultPrevented()?void 0:(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",o).emulateTransitionEnd(i.TRANSITION_DURATION):o(),this.hoverState=null,this)},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],o="BODY"==i.tagName,n=i.getBoundingClientRect();null==n.width&&(n=t.extend({},n,{width:n.right-n.left,height:n.bottom-n.top}));var s=window.SVGElement&&i instanceof window.SVGElement,a=o?{top:0,left:0}:s?null:e.offset(),r={scroll:o?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=o?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},n,r,l,a)},i.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tab");n||o.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.data("target");if(o||(o=e.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(s),e.trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){var r=t(o);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,o,n){function s(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var a=o.find("> .active"),r=n&&t.support.transition&&(a.length&&a.hasClass("fade")||!!o.find("> .fade").length);a.length&&r?a.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.affix"),s="object"==typeof e&&e;n||o.data("bs.affix",n=new i(this,s)),"string"==typeof e&&n[e]()})}var i=function(e,o){this.options=t.extend({},i.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.7",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window}
vendor: 5,751 bytes, line 56
56,i.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return i>n?"top":!1;if("bottom"==this.affixed)return null!=i?n+this.unpin<=s.top?!1:"bottom":t-o>=n+a?!1:"bottom";var r=null==this.affixed,l=r?n:s.top,h=r?a:e;return null!=i&&i>=n?"top":null!=o&&l+h>=t-o?"bottom":!1},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,n=o.top,s=o.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof o&&(s=n=o),"function"==typeof n&&(n=o.top(this.$element)),"function"==typeof s&&(s=o.bottom(this.$element));var r=this.getState(a,e,n,s);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var l="affix"+(r?"-"+r:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==r&&this.$element.offset({top:a-e-s})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),o=i.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(i,o)})})}(jQuery),+function(t){"use strict";function e(e){var i,o=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),s=t.extend({},o.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),n||i.data("bs.collapse",n=new o(this,s)),"string"==typeof e&&n[e]()})}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.7",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(o.TRANSITION_DURATION):n.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,o){var n=t(o);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var n=t(this);n.attr("data-target")||o.preventDefault();var s=e(n),a=s.data("bs.collapse"),r=a?"toggle":n.data();i.call(s,r)})}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.supp
vendor: 3,451 bytes, lines 56-183
56ort.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery);
57/*!
58 * JavaScript Cookie v2.1.0
59 * https://github.com/js-cookie/js-cookie
60 *
61 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
62 * Released under the MIT license
63 */
64(function (factory) {
65	if (typeof define === 'function' && define.amd) {
66		define(factory);
67	} else if (typeof exports === 'object') {
68		module.exports = factory();
69	} else {
70		var _OldCookies = window.Cookies;
71		var api = window.Cookies = factory();
72		api.noConflict = function () {
73			window.Cookies = _OldCookies;
74			return api;
75		};
76	}
77}(function () {
78	function extend () {
79		var i = 0;
80		var result = {};
81		for (; i < arguments.length; i++) {
82			var attributes = arguments[ i ];
83			for (var key in attributes) {
84				result[key] = attributes[key];
85			}
86		}
87		return result;
88	}
89
90	function init (converter) {
91		function api (key, value, attributes) {
92			var result;
93
94			// Write
95
96			if (arguments.length > 1) {
97				attributes = extend({
98					path: '/'
99				}, api.defaults, attributes);
100
101				if (typeof attributes.expires === 'number') {
102					var expires = new Date();
103					expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
104					attributes.expires = expires;
105				}
106
107				try {
108					result = JSON.stringify(value);
109					if (/^[\{\[]/.test(result)) {
110						value = result;
111					}
112				} catch (e) {}
113
114				if (!converter.write) {
115					value = encodeURIComponent(String(value))
116						.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
117				} else {
118					value = converter.write(value, key);
119				}
120
121				key = encodeURIComponent(String(key));
122				key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
123				key = key.replace(/[\(\)]/g, escape);
124
125				return (document.cookie = [
126					key, '=', value,
127					attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE
128					attributes.path    && '; path=' + attributes.path,
129					attributes.domain  && '; domain=' + attributes.domain,
130					attributes.secure ? '; secure' : ''
131				].join(''));
132			}
133
134			// Read
135
136			if (!key) {
137				result = {};
138			}
139
140			// To prevent the for loop in the first place assign an empty array
141			// in case there are no cookies at all. Also prevents odd result when
142			// calling "get()"
143			var cookies = document.cookie ? document.cookie.split('; ') : [];
144			var rdecode = /(%[0-9A-Z]{2})+/g;
145			var i = 0;
146
147			for (; i < cookies.length; i++) {
148				var parts = cookies[i].split('=');
149				var name = parts[0].replace(rdecode, decodeURIComponent);
150				var cookie = parts.slice(1).join('=');
151
152				if (cookie.charAt(0) === '"') {
153					cookie = cookie.slice(1, -1);
154				}
155
156				try {
157					cookie = converter.read ?
158						converter.read(cookie, name) : converter(cookie, name) ||
159						cookie.replace(rdecode, decodeURIComponent);
160
161					if (this.json) {
162						try {
163							cookie = JSON.parse(cookie);
164						} catch (e) {}
165					}
166
167					if (key === name) {
168						result = cookie;
169						break;
170					}
171
172					if (!key) {
173						result[name] = cookie;
174					}
175				} catch (e) {}
176			}
177
178			return result;
179		}
180
181		api.get = api.set = api;
182		api.getJSON = function () {
183			return api.apply({
vendor: 41,381 bytes, lines 184-216
184				json: true
185			}, [].slice.call(arguments));
186		};
187		api.defaults = {};
188
189		api.remove = function (key, attributes) {
190			api(key, '', extend(attributes, {
191				expires: -1
192			}));
193		};
194
195		api.withConverter = init;
196
197		return api;
198	}
199
200	return init(function () {});
201}));
202//! moment.js
203//! version : 2.11.1
204//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
205//! license : MIT
206//! momentjs.com 
207!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Uc.apply(null,arguments)}function b(a){Uc=a}function c(a){return"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function f(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function g(a,b){for(var c in b)f(b,c)&&(a[c]=b[c]);return f(b,"toString")&&(a.toString=b.toString),f(b,"valueOf")&&(a.valueOf=b.valueOf),a}function h(a,b,c,d){return Da(a,b,c,d,!0).utc()}function i(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function j(a){return null==a._pf&&(a._pf=i()),a._pf}function k(a){if(null==a._isValid){var b=j(a);a._isValid=!(isNaN(a._d.getTime())||!(b.overflow<0)||b.empty||b.invalidMonth||b.invalidWeekday||b.nullInput||b.invalidFormat||b.userInvalidated),a._strict&&(a._isValid=a._isValid&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour)}return a._isValid}function l(a){var b=h(NaN);return null!=a?g(j(b),a):j(b).userInvalidated=!0,b}function m(a){return void 0===a}function n(a,b){var c,d,e;if(m(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject),m(b._i)||(a._i=b._i),m(b._f)||(a._f=b._f),m(b._l)||(a._l=b._l),m(b._strict)||(a._strict=b._strict),m(b._tzm)||(a._tzm=b._tzm),m(b._isUTC)||(a._isUTC=b._isUTC),m(b._offset)||(a._offset=b._offset),m(b._pf)||(a._pf=j(b)),m(b._locale)||(a._locale=b._locale),Wc.length>0)for(c in Wc)d=Wc[c],e=b[d],m(e)||(a[d]=e);return a}function o(b){n(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),Xc===!1&&(Xc=!0,a.updateOffset(this),Xc=!1)}function p(a){return a instanceof o||null!=a&&null!=a._isAMomentObject}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=q(b)),c}function s(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&r(a[d])!==r(b[d]))&&g++;return g+f}function t(){}function u(a){return a?a.toLowerCase().replace("_","-"):a}function v(a){for(var b,c,d,e,f=0;f<a.length;){for(e=u(a[f]).split("-"),b=e.length,c=u(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=w(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&s(e,c,!0)>=b-1)break;b--}f++}return null}function w(a){var b=null;if(!Yc[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Vc._abbr,require("./locale/"+a),x(b)}catch(c){}return Yc[a]}function x(a,b){var c;return a&&(c=m(b)?z(a):y(a,b),c&&(Vc=c)),Vc._abbr}function y(a,b){return null!==b?(b.abbr=a,Yc[a]=Yc[a]||new t,Yc[a].set(b),x(a),Yc[a]):(delete Yc[a],null)}function z(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Vc;if(!c(a)){if(b=w(a))return b;a=[a]}return v(a)}function A(a,b){var c=a.toLowerCase();Zc[c]=Zc[c+"s"]=Zc[b]=a}function B(a){return"string"==typeof a?Zc[a]||Zc[a.toLowerCase()]:void 0}function C(a){var b,c,d={};for(c in a)f(a,c)&&(b=B(c),b&&(d[b]=a[c]));return d}function D(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function E(b,c){return function(d){return null!=d?(G(this,b,d),a.updateOffset(this,c),this):F(this,b)}}function F(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function G(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function H(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=B(a),D(this[a]))return this[a](b);return this}function I(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function J(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(bd[a]=e),b&&(bd[b[0]]=function(){return I(e.apply(this,arguments),b[1],b[2])}),c&&(bd[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function K(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function L(a){var b,c,d=a.match($c);for(b=0,c=d.length;c>b;b++)bd[d[b]]?d[b]=bd[d[b]]:d[b]=K(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function M(a,b){return a.isValid()?(b=N(b,a.localeData()),ad[b]=ad[b]||L(b),ad[b](a)):a.localeData().invalidDate()}function N(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(_c.lastIndex=0;d>=0&&_c.test(a);)a=a.replace(_c,c),_c.lastIndex=0,d-=1;return a}function O(a,b,c){td[a]=D(b)?b:function(a,d){return a&&c?c:b}}function P(a,b){return f(td,a)?td[a](b._strict,b._locale):new RegExp(Q(a))}function Q(a){return R(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function R(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function S(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=r(a)}),c=0;c<a.length;c++)ud[a[c]]=d}function T(a,b){S(a,function(a,c,d,e){d._w=d._w||{},b(a,d._w,d,e)})}function U(a,b,c){null!=b&&f(ud,a)&&ud[a](b,c._a,c,a)}function V(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function W(a,b){return c(this._months)?this._months[a.month()]:this._months[Ed.test(b)?"format":"standalone"][a.month()]}function X(a,b){return c(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[Ed.test(b)?"format":"standalone"][a.month()]}function Y(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function Z(a,b){var c;return a.isValid()?"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),V(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a):a}function $(b){return null!=b?(Z(this,b),a.updateOffset(this,!0),this):F(this,"Month")}function _(){return V(this.year(),this.month())}function aa(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ca.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex}function ba(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ca.call(this),a?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex}function ca(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=h([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=R(d[b]),e[b]=R(e[b]),f[b]=R(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")$","i")}function da(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[wd]<0||c[wd]>11?wd:c[xd]<1||c[xd]>V(c[vd],c[wd])?xd:c[yd]<0||c[yd]>24||24===c[yd]&&(0!==c[zd]||0!==c[Ad]||0!==c[Bd])?yd:c[zd]<0||c[zd]>59?zd:c[Ad]<0||c[Ad]>59?Ad:c[Bd]<0||c[Bd]>999?Bd:-1,j(a)._overflowDayOfYear&&(vd>b||b>xd)&&(b=xd),j(a)._overflowWeeks&&-1===b&&(b=Cd),j(a)._overflowWeekday&&-1===b&&(b=Dd),j(a).overflow=b),a}function ea(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function fa(a,b){var c=!0;return g(function(){return c&&(ea(a+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function ga(a,b){Jd[a]||(ea(b),Jd[a]=!0)}function ha(a){var b,c,d,e,f,g,h=a._i,i=Kd.exec(h)||Ld.exec(h);if(i){for(j(a).iso=!0,b=0,c=Nd.length;c>b;b++)if(Nd[b][1].exec(i[1])){e=Nd[b][0],d=Nd[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=Od.length;c>b;b++)if(Od[b][1].exec(i[3])){f=(i[2]||" ")+Od[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!Md.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),wa(a)}else a._isValid=!1}function ia(b){var c=Pd.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ha(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ja(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function ka(a){var b=new Date(Date.UTC.apply(null,arguments));return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function la(a){return ma(a)?366:365}function ma(a){return a%4===0&&a%100!==0||a%400===0}function na(){return ma(this.year())}function oa(a,b,c){var d=7+b-c,e=(7+ka(a,0,d).getUTCDay()-b)%7;return-e+d-1}function pa(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=oa(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=la(f)+j):j>la(a)?(f=a+1,g=j-la(a)):(f=a,g=j),{year:f,dayOfYear:g}}function qa(a,b,c){var d,e,f=oa(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+ra(e,b,c)):g>ra(a.year(),b,c)?(d=g-ra(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function ra(a,b,c){var d=oa(a,b,c),e=oa(a+1,b,c);return(la(a)-d+e)/7}function sa(a,b,c){return null!=a?a:null!=b?b:c}function ta(b){var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function ua(a){var b,c,d,e,f=[];if(!a._d){for(d=ta(a),a._w&&null==a._a[xd]&&null==a._a[wd]&&va(a),a._dayOfYear&&(e=sa(a._a[vd],d[vd]),a._dayOfYear>la(e)&&(j(a)._overflowDayOfYear=!0),c=ka(e,0,a._dayOfYear),a._a[wd]=c.getUTCMonth(),a._a[xd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[yd]&&0===a._a[zd]&&0===a._a[Ad]&&0===a._a[Bd]&&(a._nextDay=!0,a._a[yd]=0),a._d=(a._useUTC?ka:ja).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[yd]=24)}}function va(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=sa(b.GG,a._a[vd],qa(Ea(),1,4).year),d=sa(b.W,1),e=sa(b.E,1),(1>e||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=sa(b.gg,a._a[vd],qa(Ea(),f,g).year),d=sa(b.w,1),null!=b.d?(e=b.d,(0>e||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>ra(c,f,g)?j(a)._overflowWeeks=!0:null!=i?j(a)._overflowWeekday=!0:(h=pa(c,d,e,f,g),a._a[vd]=h.year,a._dayOfYear=h.dayOfYear)}function wa(b){if(b._f===a.ISO_8601)return void ha(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=N(b._f,b._locale).match($c)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(P(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),bd[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),U(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[yd]<=12&&b._a[yd]>0&&(j(b).bigHour=void 0),b._a[yd]=xa(b._locale,b._a[yd],b._meridiem),ua(b),da(b)}function xa(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function ya(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;e<a._f.length;e++)f=0,b=n({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._f=a._f[e],wa(b),k(b)&&(f+=j(b).charsLeftOver,f+=10*j(b).unusedTokens.length,j(b).score=f,(null==d||d>f)&&(d=f,c=b));g(a,c||b)}function za(a){if(!a._d){var b=C(a._i);a._a=e([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),ua(a)}}function Aa(a){var b=new o(da(Ba(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Ba(a){var b=a._i,e=a._f;return a._locale=a._locale||z(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),p(b)?new o(da(b)):(c(e)?ya(a):e?wa(a):d(b)?a._d=b:Ca(a),k(a)||(a._d=null),a))}function Ca(b){var f=b._i;void 0===f?b._d=new Date(a.now()):d(f)?b._d=new Date(+f):"string"==typeof f?ia(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ua(b)):"object"==typeof f?za(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Da(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,Aa(f)}function Ea(a,b,c,d){return Da(a,b,c,d,!1)}function Fa(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Ea();for(d=b[0],e=1;e<b.length;++e)(!b[e].isValid()||b[e][a](d))&&(d=b[e]);return d}function Ga(){var a=[].slice.call(arguments,0);return Fa("isBefore",a)}function Ha(){var a=[].slice.call(arguments,0);return Fa("isAfter",a)}function Ia(a){var b=C(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=z(),this._bubble()}function Ja(a){return a instanceof Ia}function Ka(a,b){J(a,0,0,function(){var a=this.utcOffset(),c="+";return 0>a&&(a=-a,c="-"),c+I(~~(a/60),2)+b+I(~~a%60,2)})}function La(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(Ud)||["-",0,0],f=+(60*e[1])+r(e[2]);return"+"===e[0]?f:-f}function Ma(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(p(b)||d(b)?+b:+Ea(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Ea(b).local()}function Na(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Oa(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=La(qd,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Na(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?cb(this,Za(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Na(this):null!=b?this:NaN}function Pa(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Qa(a){return this.utcOffset(0,a)}function Ra(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Na(this),"m")),this}function Sa(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(La(pd,this._i)),this}function Ta(a){return this.isValid()?(a=a?Ea(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function Ua(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Va(){if(!m(this._isDSTShifted))return this._isDSTShifted;var a={};if(n(a,this),a=Ba(a),a._a){var b=a._isUTC?h(a._a):Ea(a._a);this._isDSTShifted=this.isValid()&&s(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Wa(){return this.isValid()?!this._isUTC:!1}function Xa(){return this.isValid()?this._isUTC:!1}function Ya(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Za(a,b){var c,d,e,g=a,h=null;return Ja(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=Vd.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:r(h[xd])*c,h:r(h[yd])*c,m:r(h[zd])*c,s:r(h[Ad])*c,ms:r(h[Bd])*c}):(h=Wd.exec(a))?(c="-"===h[1]?-1:1,g={y:$a(h[2],c),M:$a(h[3],c),d:$a(h[4],c),h:$a(h[5],c),m:$a(h[6],c),s:$a(h[7],c),w:$a(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=ab(Ea(g.from),Ea(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ia(g),Ja(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function $a(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function _a(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function ab(a,b){var c;return a.isValid()&&b.isValid()?(b=Ma(b,a),a.isBefore(b)?c=_a(a,b):(c=_a(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function bb(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(ga(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Za(c,d),cb(this,e,a),this}}function cb(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;b.isValid()&&(e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&G(b,"Date",F(b,"Date")+g*d),h&&Z(b,F(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function db(a,b){var c=a||Ea(),d=Ma(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse",g=b&&(D(b[f])?b[f]():b[f]);return this.format(g||this.localeData().calendar(f,this,Ea(c)))}function eb(){return new o(this)}function fb(a,b){var c=p(a)?a:Ea(a);return this.isValid()&&c.isValid()?(b=B(m(b)?"millisecond":b),"millisecond"===b?+this>+c:+c<+this.clone().startOf(b)):!1}function gb(a,b){var c=p(a)?a:Ea(a);return this.isValid()&&c.isValid()?(b=B(m(b)?"millisecond":b),"millisecond"===b?+c>+this:+this.clone().endOf(b)<+c):!1}function hb(a,b,c){return this.isAfter(a,c)&&this.isBefore(b,c)}function ib(a,b){var c,d=p(a)?a:Ea(a);return this.isValid()&&d.isValid()?(b=B(b||"millisecond"),"millisecond"===b?+this===+d:(c=+d,+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))):!1}function jb(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function kb(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function lb(a,b,c){var d,e,f,g;return this.isValid()?(d=Ma(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=B(b),"year"===b||"month"===b||"quarter"===b?(g=mb(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:q(g)):NaN):NaN}function mb(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function nb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ob(){var a=this.clone().utc();return 0<a.year()&&a.year()<=9999?D(Date.prototype.toISOString)?this.toDate().toISOString():M(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):M(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function pb(b){var c=M(this,b||a.defaultFormat);return this.localeData().postformat(c)}function qb(a,b){return this.isValid()&&(p(a)&&a.isValid()||Ea(a).isValid())?Za({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function rb(a){return this.from(Ea(),a)}function sb(a,b){return this.isValid()&&(p(a)&&a.isValid()||Ea(a).isValid())?Za({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()}function tb(a){return this.to(Ea(),a)}function ub(a){var b;return void 0===a?this._locale._abbr:(b=z(a),null!=b&&(this._locale=b),this)}function vb(){return this._locale}function wb(a){switch(a=B(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a&&this.weekday(0),"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this}function xb(a){return a=B(a),void 0===a||"millisecond"===a?this:this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")}function yb(){return+this._d-6e4*(this._offset||0)}function zb(){return Math.floor(+this/1e3)}function Ab(){return this._offset?new Date(+this):this._d}function Bb(){var a=this;return[a.year(),a.month(),a.date(),a.hour(),a.minute(),a.second(),a.millisecond()]}function Cb(){var a=this;return{years:a.year(),months:a.month(),date:a.date(),hours:a.hours(),minutes:a.minutes(),seconds:a.seconds(),milliseconds:a.milliseconds()}}function Db(){return this.isValid()?this.toISOString():"null"}function Eb(){return k(this)}function Fb(){return g({},j(this))}function Gb(){return j(this).overflow}function Hb(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ib(a,b){J(0,[a,a.length],0,b)}function Jb(a){return Nb.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Kb(a){return Nb.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)}function Lb(){return ra(this.year(),1,4)}function Mb(){var a=this.localeData()._week;return ra(this.year(),a.dow,a.doy)}function Nb(a,b,c,d,e){var f;return null==a?qa(this,d,e).year:(f=ra(a,d,e),b>f&&(b=f),Ob.call(this,a,b,c,d,e))}function Ob(a,b,c,d,e){var f=pa(a,b,c,d,e),g=ka(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function Pb(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Qb(a){return qa(a,this._week.dow,this._week.doy).week}function Rb(){return this._week.dow}function Sb(){return this._week.doy}function Tb(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ub(a){var b=qa(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function Vb(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Wb(a,b){return c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]}function Xb(a){return this._weekdaysShort[a.day()]}function Yb(a){return this._weekdaysMin[a.day()]}function Zb(a,b,c){var d,e,f;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){if(e=Ea([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}function $b(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Vb(a,this.localeData()),this.add(a-b,"d")):b}function _b(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function ac(a){return this.isValid()?null==a?this.day()||7:this.day(this.day()%7?a:a-7):null!=a?this:NaN}function bc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function cc(){return this.hours()%12||12}function dc(a,b){J(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function ec(a,b){return b._meridiemParse}function fc(a){return"p"===(a+"").toLowerCase().charAt(0)}function gc(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function hc(a,b){b[Bd]=r(1e3*("0."+a))}function ic(){return this._isUTC?"UTC":""}function jc(){return this._isUTC?"Coordinated Universal Time":""}function kc(a){return Ea(1e3*a)}function lc(){return Ea.apply(null,arguments).parseZone()}function mc(a,b,c){var d=this._calendar[a];return D(d)?d.call(b,c):d}function nc(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function oc(){return this._invalidDate}function pc(a){return this._ordinal.replace("%d",a)}function qc(a){return a}function rc(a,b,c,d){var e=this._relativeTime[c];return D(e)?e(a,b,c,d):e.replace(/%d/i,a)}function sc(a,b){var c=this._relativeTime[a>0?"future":"past"];return D(c)?c(b):c.replace(/%s/i,b)}function tc(a){var b,c;for(c in a)b=a[c],D(b)?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function uc(a,b,c,d){var e=z(),f=h().set(d,b);return e[c](f,a)}function vc(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return uc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=uc(a,f,c,e);return g}function wc(a,b){return vc(a,b,"months",12,"month")}function xc(a,b){return vc(a,b,"monthsShort",12,"month")}function yc(a,b){return vc(a,b,"weekdays",7,"day")}function zc(a,b){return vc(a,b,"weekdaysShort",7,"day")}function Ac(a,b){return vc(a,b,"weekdaysMin",7,"day")}function Bc(){var a=this._data;return this._milliseconds=se(this._milliseconds),this._days=se(this._days),this._months=se(this._months),a.milliseconds=se(a.milliseconds),a.seconds=se(a.seconds),a.minutes=se(a.minutes),a.hours=se(a.hours),a.months=se(a.months),a.years=se(a.years),this}function Cc(a,b,c,d){var e=Za(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function Dc(a,b){return Cc(this,a,b,1)}function Ec(a,b){return Cc(this,a,b,-1)}function Fc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Gc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Fc(Ic(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=q(f/1e3),i.seconds=a%60,b=q(a/60),i.minutes=b%60,c=q(b/60),i.hours=c%24,g+=q(c/24),e=q(Hc(g)),h+=e,g-=Fc(Ic(e)),d=q(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function Hc(a){return 4800*a/146097}function Ic(a){return 146097*a/4800}function Jc(a){var b,c,d=this._milliseconds;if(a=B(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+Hc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(Ic(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function Kc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*r(this._months/12)}function Lc(a){return function(){return this.as(a)}}function Mc(a){return a=B(a),this[a+"s"]()}function Nc(a){return function(){return this._data[a]}}function Oc(){return q(this.days()/7)}function Pc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Qc(a,b,c){var d=Za(a).abs(),e=Ie(d.as("s")),f=Ie(d.as("m")),g=Ie(d.as("h")),h=Ie(d.as("d")),i=Ie(d.as("M")),j=Ie(d.as("y")),k=e<Je.s&&["s",e]||1>=f&&["m"]||f<Je.m&&["mm",f]||1>=g&&["h"]||g<Je.h&&["hh",g]||1>=h&&["d"]||h<Je.d&&["dd",h]||1>=i&&["M"]||i<Je.M&&["MM",i]||1>=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,Pc.apply(null,k)}function Rc(a,b){return void 0===Je[a]?!1:void 0===b?Je[a]:(Je[a]=b,!0)}function Sc(a){var b=this.localeData(),c=Qc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Tc(){var a,b,c,d=Ke(this._milliseconds)/1e3,e=Ke(this._days),f=Ke(this._months);a=q(d/60),b=q(a/60),d%=60,a%=60,c=q(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var Uc,Vc,Wc=a.momentProperties=[],Xc=!1,Yc={},Zc={},$c=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,_c=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ad={},bd={},cd=/\d/,dd=/\d\d/,ed=/\d{3}/,fd=/\d{4}/,gd=/[+-]?\d{6}/,hd=/\d\d?/,id=/\d\d\d\d?/,jd=/\d\d\d\d\d\d?/,kd=/\d{1,3}/,ld=/\d{1,4}/,md=/[+-]?\d{1,6}/,nd=/\d+/,od=/[+-]?\d+/,pd=/Z|[+-]\d\d:?\d\d/gi,qd=/Z|[+-]\d\d(?::?\d\d)?/gi,rd=/[+-]?\d+(\.\d{1,3})?/,sd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,td={},ud={},vd=0,wd=1,xd=2,yd=3,zd=4,Ad=5,Bd=6,Cd=7,Dd=8;J("M",["MM",2],"Mo",function(){return this.month()+1}),J("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),J("MMMM",0,0,function(a){return this.localeData().months(this,a)}),A("month","M"),O("M",hd),O("MM",hd,dd),O("MMM",function(a,b){return b.monthsShortRegex(a)}),O("MMMM",function(a,b){return b.monthsRegex(a)}),S(["M","MM"],function(a,b){b[wd]=r(a)-1}),S(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[wd]=e:j(c).invalidMonth=a});var Ed=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Fd="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Gd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Hd=sd,Id=sd,Jd={};a.suppressDeprecationWarnings=!1;var Kd=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Ld=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Md=/Z|[+-]\d\d(?::?\d\d)?/,Nd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Od=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Pd=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=fa("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),J("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a}),J(0,["YY",2],0,function(){return this.year()%100}),J(0,["YYYY",4],0,"year"),J(0,["YYYYY",5],0,"year"),J(0,["YYYYYY",6,!0],0,"year"),A("year","y"),O("Y",od),O("YY",hd,dd),O("YYYY",ld,fd),O("YYYYY",md,gd),O("YYYYYY",md,gd),S(["YYYYY","YYYYYY"],vd),S("YYYY",function(b,c){c[vd]=2===b.length?a.parseTwoDigitYear(b):r(b)}),S("YY",function(b,c){c[vd]=a.parseTwoDigitYear(b)}),S("Y",function(a,b){b[vd]=parseInt(a,10)}),a.parseTwoDigitYear=function(a){return r(a)+(r(a)>68?1900:2e3)};var Qd=E("FullYear",!1);a.ISO_8601=function(){};var Rd=fa("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Ea.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:l()}),Sd=fa("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Ea.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:l()}),Td=function(){return Date.now?Date.now():+new Date};Ka("Z",":"),Ka("ZZ",""),O("Z",qd),O("ZZ",qd),S(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=La(qd,a)});var Ud=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var Vd=/(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Wd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;
208Za.fn=Ia.prototype;var Xd=bb(1,"add"),Yd=bb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Zd=fa("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});J(0,["gg",2],0,function(){return this.weekYear()%100}),J(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ib("gggg","weekYear"),Ib("ggggg","weekYear"),Ib("GGGG","isoWeekYear"),Ib("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),O("G",od),O("g",od),O("GG",hd,dd),O("gg",hd,dd),O("GGGG",ld,fd),O("gggg",ld,fd),O("GGGGG",md,gd),O("ggggg",md,gd),T(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=r(a)}),T(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),J("Q",0,"Qo","quarter"),A("quarter","Q"),O("Q",cd),S("Q",function(a,b){b[wd]=3*(r(a)-1)}),J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),O("w",hd),O("ww",hd,dd),O("W",hd),O("WW",hd,dd),T(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=r(a)});var $d={dow:0,doy:6};J("D",["DD",2],"Do","date"),A("date","D"),O("D",hd),O("DD",hd,dd),O("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),S(["D","DD"],xd),S("Do",function(a,b){b[xd]=r(a.match(hd)[0],10)});var _d=E("Date",!0);J("d",0,"do","day"),J("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),J("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),J("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),O("d",hd),O("e",hd),O("E",hd),O("dd",sd),O("ddd",sd),O("dddd",sd),T(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:j(c).invalidWeekday=a}),T(["d","e","E"],function(a,b,c,d){b[d]=r(a)});var ae="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ce="Su_Mo_Tu_We_Th_Fr_Sa".split("_");J("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),O("DDD",kd),O("DDDD",ed),S(["DDD","DDDD"],function(a,b,c){c._dayOfYear=r(a)}),J("H",["HH",2],0,"hour"),J("h",["hh",2],0,cc),J("hmm",0,0,function(){return""+cc.apply(this)+I(this.minutes(),2)}),J("hmmss",0,0,function(){return""+cc.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)}),J("Hmm",0,0,function(){return""+this.hours()+I(this.minutes(),2)}),J("Hmmss",0,0,function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)}),dc("a",!0),dc("A",!1),A("hour","h"),O("a",ec),O("A",ec),O("H",hd),O("h",hd),O("HH",hd,dd),O("hh",hd,dd),O("hmm",id),O("hmmss",jd),O("Hmm",id),O("Hmmss",jd),S(["H","HH"],yd),S(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),S(["h","hh"],function(a,b,c){b[yd]=r(a),j(c).bigHour=!0}),S("hmm",function(a,b,c){var d=a.length-2;b[yd]=r(a.substr(0,d)),b[zd]=r(a.substr(d)),j(c).bigHour=!0}),S("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[yd]=r(a.substr(0,d)),b[zd]=r(a.substr(d,2)),b[Ad]=r(a.substr(e)),j(c).bigHour=!0}),S("Hmm",function(a,b,c){var d=a.length-2;b[yd]=r(a.substr(0,d)),b[zd]=r(a.substr(d))}),S("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[yd]=r(a.substr(0,d)),b[zd]=r(a.substr(d,2)),b[Ad]=r(a.substr(e))});var de=/[ap]\.?m?\.?/i,ee=E("Hours",!0);J("m",["mm",2],0,"minute"),A("minute","m"),O("m",hd),O("mm",hd,dd),S(["m","mm"],zd);var fe=E("Minutes",!1);J("s",["ss",2],0,"second"),A("second","s"),O("s",hd),O("ss",hd,dd),S(["s","ss"],Ad);var ge=E("Seconds",!1);J("S",0,0,function(){return~~(this.millisecond()/100)}),J(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,function(){return 10*this.millisecond()}),J(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),J(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),J(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),J(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),J(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),O("S",kd,cd),O("SS",kd,dd),O("SSS",kd,ed);var he;for(he="SSSS";he.length<=9;he+="S")O(he,nd);for(he="S";he.length<=9;he+="S")S(he,hc);var ie=E("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");var je=o.prototype;je.add=Xd,je.calendar=db,je.clone=eb,je.diff=lb,je.endOf=xb,je.format=pb,je.from=qb,je.fromNow=rb,je.to=sb,je.toNow=tb,je.get=H,je.invalidAt=Gb,je.isAfter=fb,je.isBefore=gb,je.isBetween=hb,je.isSame=ib,je.isSameOrAfter=jb,je.isSameOrBefore=kb,je.isValid=Eb,je.lang=Zd,je.locale=ub,je.localeData=vb,je.max=Sd,je.min=Rd,je.parsingFlags=Fb,je.set=H,je.startOf=wb,je.subtract=Yd,je.toArray=Bb,je.toObject=Cb,je.toDate=Ab,je.toISOString=ob,je.toJSON=Db,je.toString=nb,je.unix=zb,je.valueOf=yb,je.creationData=Hb,je.year=Qd,je.isLeapYear=na,je.weekYear=Jb,je.isoWeekYear=Kb,je.quarter=je.quarters=Pb,je.month=$,je.daysInMonth=_,je.week=je.weeks=Tb,je.isoWeek=je.isoWeeks=Ub,je.weeksInYear=Mb,je.isoWeeksInYear=Lb,je.date=_d,je.day=je.days=$b,je.weekday=_b,je.isoWeekday=ac,je.dayOfYear=bc,je.hour=je.hours=ee,je.minute=je.minutes=fe,je.second=je.seconds=ge,je.millisecond=je.milliseconds=ie,je.utcOffset=Oa,je.utc=Qa,je.local=Ra,je.parseZone=Sa,je.hasAlignedHourOffset=Ta,je.isDST=Ua,je.isDSTShifted=Va,je.isLocal=Wa,je.isUtcOffset=Xa,je.isUtc=Ya,je.isUTC=Ya,je.zoneAbbr=ic,je.zoneName=jc,je.dates=fa("dates accessor is deprecated. Use date instead.",_d),je.months=fa("months accessor is deprecated. Use month instead",$),je.years=fa("years accessor is deprecated. Use year instead",Qd),je.zone=fa("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Pa);var ke=je,le={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},me={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},ne="Invalid date",oe="%d",pe=/\d{1,2}/,qe={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},re=t.prototype;re._calendar=le,re.calendar=mc,re._longDateFormat=me,re.longDateFormat=nc,re._invalidDate=ne,re.invalidDate=oc,re._ordinal=oe,re.ordinal=pc,re._ordinalParse=pe,re.preparse=qc,re.postformat=qc,re._relativeTime=qe,re.relativeTime=rc,re.pastFuture=sc,re.set=tc,re.months=W,re._months=Fd,re.monthsShort=X,re._monthsShort=Gd,re.monthsParse=Y,re._monthsRegex=Id,re.monthsRegex=ba,re._monthsShortRegex=Hd,re.monthsShortRegex=aa,re.week=Qb,re._week=$d,re.firstDayOfYear=Sb,re.firstDayOfWeek=Rb,re.weekdays=Wb,re._weekdays=ae,re.weekdaysMin=Yb,re._weekdaysMin=ce,re.weekdaysShort=Xb,re._weekdaysShort=be,re.weekdaysParse=Zb,re.isPM=fc,re._meridiemParse=de,re.meridiem=gc,x("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===r(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=fa("moment.lang is deprecated. Use moment.locale instead.",x),a.langData=fa("moment.langData is deprecated. Use moment.localeData instead.",z);var se=Math.abs,te=Lc("ms"),ue=Lc("s"),ve=Lc("m"),we=Lc("h"),xe=Lc("d"),ye=Lc("w"),ze=Lc("M"),Ae=Lc("y"),Be=Nc("milliseconds"),Ce=Nc("seconds"),De=Nc("minutes"),Ee=Nc("hours"),Fe=Nc("days"),Ge=Nc("months"),He=Nc("years"),Ie=Math.round,Je={s:45,m:45,h:22,d:26,M:11},Ke=Math.abs,Le=Ia.prototype;Le.abs=Bc,Le.add=Dc,Le.subtract=Ec,Le.as=Jc,Le.asMilliseconds=te,Le.asSeconds=ue,Le.asMinutes=ve,Le.asHours=we,Le.asDays=xe,Le.asWeeks=ye,Le.asMonths=ze,Le.asYears=Ae,Le.valueOf=Kc,Le._bubble=Gc,Le.get=Mc,Le.milliseconds=Be,Le.seconds=Ce,Le.minutes=De,Le.hours=Ee,Le.days=Fe,Le.weeks=Oc,Le.months=Ge,Le.years=He,Le.humanize=Sc,Le.toISOString=Tc,Le.toString=Tc,Le.toJSON=Tc,Le.locale=ub,Le.localeData=vb,Le.toIsoString=fa("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Tc),Le.lang=Zd,J("X",0,0,"unix"),J("x",0,0,"valueOf"),O("x",od),O("X",rd),S("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),S("x",function(a,b,c){c._d=new Date(r(a))}),a.version="2.11.1",b(Ea),a.fn=ke,a.min=Ga,a.max=Ha,a.now=Td,a.utc=h,a.unix=kc,a.months=wc,a.isDate=d,a.locale=x,a.invalid=l,a.duration=Za,a.isMoment=p,a.weekdays=yc,a.parseZone=lc,a.localeData=z,a.isDuration=Ja,a.monthsShort=xc,a.weekdaysMin=Ac,a.defineLocale=y,a.weekdaysShort=zc,a.normalizeUnits=B,a.relativeTimeThreshold=Rc,a.prototype=ke;var Me=a;return Me});
209/*! version : 4.17.37
210 =========================================================
211 bootstrap-datetimejs
212 https://github.com/Eonasdan/bootstrap-datetimepicker
213 Copyright (c) 2015 Jonathan Peterson
214 ========================================================= 
215 */
216!function(a){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],a);
vendor: 7,189 bytes, line 216
216else if("object"==typeof exports)a(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";a(jQuery,moment)}}(function(a,b){"use strict";if(!b)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var c=function(c,d){var e,f,g,h,i,j,k,l={},m=!0,n=!1,o=!1,p=0,q=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],r=["days","months","years","decades"],s=["top","bottom","auto"],t=["left","right","auto"],u=["default","top","bottom"],v={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t","delete":46,46:"delete"},w={},x=function(a){var c,e,f,g,h,i=!1;return void 0!==b.tz&&void 0!==d.timeZone&&null!==d.timeZone&&""!==d.timeZone&&(i=!0),void 0===a||null===a?c=i?b().tz(d.timeZone).startOf("d"):b().startOf("d"):i?(e=b().tz(d.timeZone).utcOffset(),f=b(a,j,d.useStrict).utcOffset(),f!==e?(g=b().tz(d.timeZone).format("Z"),h=b(a,j,d.useStrict).format("YYYY-MM-DD[T]HH:mm:ss")+g,c=b(h,j,d.useStrict).tz(d.timeZone)):c=b(a,j,d.useStrict).tz(d.timeZone)):c=b(a,j,d.useStrict),c},y=function(a){if("string"!=typeof a||a.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(a){case"y":return-1!==i.indexOf("Y");case"M":return-1!==i.indexOf("M");case"d":return-1!==i.toLowerCase().indexOf("d");case"h":case"H":return-1!==i.toLowerCase().indexOf("h");case"m":return-1!==i.indexOf("m");case"s":return-1!==i.indexOf("s");default:return!1}},z=function(){return y("h")||y("m")||y("s")},A=function(){return y("y")||y("M")||y("d")},B=function(){var b=a("<thead>").append(a("<tr>").append(a("<th>").addClass("prev").attr("data-action","previous").append(a("<span>").addClass(d.icons.previous))).append(a("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",d.calendarWeeks?"6":"5")).append(a("<th>").addClass("next").attr("data-action","next").append(a("<span>").addClass(d.icons.next)))),c=a("<tbody>").append(a("<tr>").append(a("<td>").attr("colspan",d.calendarWeeks?"8":"7")));return[a("<div>").addClass("datepicker-days").append(a("<table>").addClass("table-condensed").append(b).append(a("<tbody>"))),a("<div>").addClass("datepicker-months").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())),a("<div>").addClass("datepicker-years").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())),a("<div>").addClass("datepicker-decades").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone()))]},C=function(){var b=a("<tr>"),c=a("<tr>"),e=a("<tr>");return y("h")&&(b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:d.tooltips.pickHour}).attr("data-action","showHours"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(a("<span>").addClass(d.icons.down))))),y("m")&&(y("h")&&(b.append(a("<td>").addClass("separator")),c.append(a("<td>").addClass("separator").html(":")),e.append(a("<td>").addClass("separator"))),b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:d.tooltips.pickMinute}).attr("data-action","showMinutes"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(a("<span>").addClass(d.icons.down))))),y("s")&&(y("m")&&(b.append(a("<td>").addClass("separator")),c.append(a("<td>").addClass("separator").html(":")),e.append(a("<td>").addClass("separator"))),b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:d.tooltips.pickSecond}).attr("data-action","showSeconds"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(a("<span>").addClass(d.icons.down))))),h||(b.append(a("<td>").addClass("separator")),c.append(a("<td>").append(a("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:d.tooltips.togglePeriod}))),e.append(a("<td>").addClass("separator"))),a("<div>").addClass("timepicker-picker").append(a("<table>").addClass("table-condensed").append([b,c,e]))},D=function(){var b=a("<div>").addClass("timepicker-hours").append(a("<table>").addClass("table-condensed")),c=a("<div>").addClass("timepicker-minutes").append(a("<table>").addClass("table-condensed")),d=a("<div>").addClass("timepicker-seconds").append(a("<table>").addClass("table-condensed")),e=[C()];return y("h")&&e.push(b),y("m")&&e.push(c),y("s")&&e.push(d),e},E=function(){var b=[];return d.showTodayButton&&b.push(a("<td>").append(a("<a>").attr({"data-action":"today",title:d.tooltips.today}).append(a("<span>").addClass(d.icons.today)))),!d.sideBySide&&A()&&z()&&b.push(a("<td>").append(a("<a>").attr({"data-action":"togglePicker",title:d.tooltips.selectTime}).append(a("<span>").addClass(d.icons.time)))),d.showClear&&b.push(a("<td>").append(a("<a>").attr({"data-action":"clear",title:d.tooltips.clear}).append(a("<span>").addClass(d.icons.clear)))),d.showClose&&b.push(a("<td>").append(a("<a>").attr({"data-action":"close",title:d.tooltips.close}).append(a("<span>").addClass(d.icons.close)))),a("<table>").addClass("table-condensed").append(a("<tbody>").append(a("<tr>").append(b)))},F=function(){var b=a("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),c=a("<div>").addClass("datepicker").append(B()),e=a("<div>").addClass("timepicker").append(D()),f=a("<ul>").addClass("list-unstyled"),g=a("<li>").addClass("picker-switch"+(d.collapse?" accordion-toggle":"")).append(E());return d.inline&&b.removeClass("dropdown-menu"),h&&b.addClass("usetwentyfour"),y("s")&&!h&&b.addClass("wider"),d.sideBySide&&A()&&z()?(b.addClass("timepicker-sbs"),"top"===d.toolbarPlacement&&b.append(g),b.append(a("<div>").addClass("row").append(c.addClass("col-md-6")).append(e.addClass("col-md-6"))),"bottom"===d.toolbarPlacement&&b.append(g),b):("top"===d.toolbarPlacement&&f.append(g),A()&&f.append(a("<li>
216").addClass(d.collapse&&z()?"collapse in":"").append(c)),"default"===d.toolbarPlacement&&f.append(g),z()&&f.append(a("<li>").addClass(d.collapse&&A()?"collapse":"").append(e)),"bottom"===d.toolbarPlacement&&f.append(g),b.append(f))},G=function(){var b,e={};return b=c.is("input")||d.inline?c.data():c.find("input").data(),b.dateOptions&&b.dateOptions instanceof Object&&(e=a.extend(!0,e,b.dateOptions)),a.each(d,function(a){var c="date"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[c]&&(e[a]=b[c])}),e},H=function(){var b,e=(n||c).position(),f=(n||c).offset(),g=d.widgetPositioning.vertical,h=d.widgetPositioning.horizontal;if(d.widgetParent)b=d.widgetParent.append(o);else if(c.is("input"))b=c.after(o).parent();else{if(d.inline)return void(b=c.append(o));b=c,c.children().first().after(o)}if("auto"===g&&(g=f.top+1.5*o.height()>=a(window).height()+a(window).scrollTop()&&o.height()+c.outerHeight()<f.top?"top":"bottom"),"auto"===h&&(h=b.width()<f.left+o.outerWidth()/2&&f.left+o.outerWidth()>a(window).width()?"right":"left"),"top"===g?o.addClass("top").removeClass("bottom"):o.addClass("bottom").removeClass("top"),"right"===h?o.addClass("pull-right"):o.removeClass("pull-right"),"relative"!==b.css("position")&&(b=b.parents().filter(function(){return"relative"===a(this).css("position")}).first()),0===b.length)throw new Error("datetimepicker component should be placed within a relative positioned container");o.css({top:"top"===g?"auto":e.top+c.outerHeight(),bottom:"top"===g?e.top+c.outerHeight():"auto",left:"left"===h?b===c?0:e.left:"auto",right:"left"===h?"auto":b.outerWidth()-c.outerWidth()-(b===c?0:e.left)})},I=function(a){"dp.change"===a.type&&(a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate)||c.trigger(a)},J=function(a){"y"===a&&(a="YYYY"),I({type:"dp.update",change:a,viewDate:f.clone()})},K=function(a){o&&(a&&(k=Math.max(p,Math.min(3,k+a))),o.find(".datepicker > div").hide().filter(".datepicker-"+q[k].clsName).show())},L=function(){var b=a("<tr>"),c=f.clone().startOf("w").startOf("d");for(d.calendarWeeks===!0&&b.append(a("<th>").addClass("cw").text("#"));c.isBefore(f.clone().endOf("w"));)b.append(a("<th>").addClass("dow").text(c.format("dd"))),c.add(1,"d");o.find(".datepicker-days thead").append(b)},M=function(a){return d.disabledDates[a.format("YYYY-MM-DD")]===!0},N=function(a){return d.enabledDates[a.format("YYYY-MM-DD")]===!0},O=function(a){return d.disabledHours[a.format("H")]===!0},P=function(a){return d.enabledHours[a.format("H")]===!0},Q=function(b,c){if(!b.isValid())return!1;if(d.disabledDates&&"d"===c&&M(b))return!1;if(d.enabledDates&&"d"===c&&!N(b))return!1;if(d.minDate&&b.isBefore(d.minDate,c))return!1;if(d.maxDate&&b.isAfter(d.maxDate,c))return!1;if(d.daysOfWeekDisabled&&"d"===c&&-1!==d.daysOfWeekDisabled.indexOf(b.day()))return!1;if(d.disabledHours&&("h"===c||"m"===c||"s"===c)&&O(b))return!1;if(d.enabledHours&&("h"===c||"m"===c||"s"===c)&&!P(b))return!1;if(d.disabledTimeIntervals&&("h"===c||"m"===c||"s"===c)){var e=!1;if(a.each(d.disabledTimeIntervals,function(){return b.isBetween(this[0],this[1])?(e=!0,!1):void 0}),e)return!1}return!0},R=function(){for(var b=[],c=f.clone().startOf("y").startOf("d");c.isSame(f,"y");)b.push(a("<span>").attr("data-action","selectMonth").addClass("month").text(c.format("MMM"))),c.add(1,"M");o.find(".datepicker-months td").empty().append(b)},S=function(){var b=o.find(".datepicker-months"),c=b.find("th"),g=b.find("tbody").find("span");c.eq(0).find("span").attr("title",d.tooltips.prevYear),c.eq(1).attr("title",d.tooltips.selectYear),c.eq(2).find("span").attr("title",d.tooltips.nextYear),b.find(".disabled").removeClass("disabled"),Q(f.clone().subtract(1,"y"),"y")||c.eq(0).addClass("disabled"),c.eq(1).text(f.year()),Q(f.clone().add(1,"y"),"y")||c.eq(2).addClass("disabled"),g.removeClass("active"),e.isSame(f,"y")&&!m&&g.eq(e.month()).addClass("active"),g.each(function(b){Q(f.clone().month(b),"M")||a(this).addClass("disabled")})},T=function(){var a=o.find(".datepicker-years"),b=a.find("th"),c=f.clone().subtract(5,"y"),g=f.clone().add(6,"y"),h="";for(b.eq(0).find("span").attr("title",d.tooltips.prevDecade),b.eq(1).attr("title",d.tooltips.selectDecade),b.eq(2).find("span").attr("title",d.tooltips.nextDecade),a.find(".disabled").removeClass("disabled"),d.minDate&&d.minDate.isAfter(c,"y")&&b.eq(0).addClass("disabled"),b.eq(1).text(c.year()+"-"+g.year()),d.maxDate&&d.maxDate.isBefore(g,"y")&&b.eq(2).addClass("disabled");!c.isAfter(g,"y");)h+='<span data-action="selectYear" class="year'+(c.isSame(e,"y")&&!m?" active":"")+(Q(c,"y")?"":" disabled")+'">'+c.year()+"</span>",c.add(1,"y");a.find("td").html(h)},U=function(){var a=o.find(".datepicker-decades"),c=a.find("th"),g=b({y:f.year()-f.year()%100-1}),h=g.clone().add(100,"y"),i=g.clone(),j="";for(c.eq(0).find("span").attr("title",d.tooltips.prevCentury),c.eq(2).find("span").attr("title",d.tooltips.nextCentury),a.find(".disabled").removeClass("disabled"),(g.isSame(b({y:1900}
216))||d.minDate&&d.minDate.isAfter(g,"y"))&&c.eq(0).addClass("disabled"),c.eq(1).text(g.year()+"-"+h.year()),(g.isSame(b({y:2e3}))||d.maxDate&&d.maxDate.isBefore(h,"y"))&&c.eq(2).addClass("disabled");!g.isAfter(h,"y");)j+='<span data-action="selectDecade" class="decade'+(g.isSame(e,"y")?" active":"")+(Q(g,"y")?"":" disabled")+'" data-selection="'+(g.year()+6)+'">'+(g.year()+1)+" - "+(g.year()+12)+"</span>",g.add(12,"y");j+="<span></span><span></span><span></span>",a.find("td").html(j),c.eq(1).text(i.year()+1+"-"+g.year())},V=function(){var b,c,g,h,i=o.find(".datepicker-days"),j=i.find("th"),k=[];if(A()){for(j.eq(0).find("span").attr("title",d.tooltips.prevMonth),j.eq(1).attr("title",d.tooltips.selectMonth),j.eq(2).find("span").attr("title",d.tooltips.nextMonth),i.find(".disabled").removeClass("disabled"),j.eq(1).text(f.format(d.dayViewHeaderFormat)),Q(f.clone().subtract(1,"M"),"M")||j.eq(0).addClass("disabled"),Q(f.clone().add(1,"M"),"M")||j.eq(2).addClass("disabled"),b=f.clone().startOf("M").startOf("w").startOf("d"),h=0;42>h;h++)0===b.weekday()&&(c=a("<tr>"),d.calendarWeeks&&c.append('<td class="cw">'+b.week()+"</td>"),k.push(c)),g="",b.isBefore(f,"M")&&(g+=" old"),b.isAfter(f,"M")&&(g+=" new"),b.isSame(e,"d")&&!m&&(g+=" active"),Q(b,"d")||(g+=" disabled"),b.isSame(x(),"d")&&(g+=" today"),(0===b.day()||6===b.day())&&(g+=" weekend"),c.append('<td data-action="selectDay" data-day="'+b.format("L")+'" class="day'+g+'">'+b.date()+"</td>"),b.add(1,"d");i.find("tbody").empty().append(k),S(),T(),U()}},W=function(){var b=o.find(".timepicker-hours table"),c=f.clone().startOf("d"),d=[],e=a("<tr>");for(f.hour()>11&&!h&&c.hour(12);c.isSame(f,"d")&&(h||f.hour()<12&&c.hour()<12||f.hour()>11);)c.hour()%4===0&&(e=a("<tr>"),d.push(e)),e.append('<td data-action="selectHour" class="hour'+(Q(c,"h")?"":" disabled")+'">'+c.format(h?"HH":"hh")+"</td>"),c.add(1,"h");b.empty().append(d)},X=function(){for(var b=o.find(".timepicker-minutes table"),c=f.clone().startOf("h"),e=[],g=a("<tr>"),h=1===d.stepping?5:d.stepping;f.isSame(c,"h");)c.minute()%(4*h)===0&&(g=a("<tr>"),e.push(g)),g.append('<td data-action="selectMinute" class="minute'+(Q(c,"m")?"":" disabled")+'">'+c.format("mm")+"</td>"),c.add(h,"m");b.empty().append(e)},Y=function(){for(var b=o.find(".timepicker-seconds table"),c=f.clone().startOf("m"),d=[],e=a("<tr>");f.isSame(c,"m");)c.second()%20===0&&(e=a("<tr>"),d.push(e)),e.append('<td data-action="selectSecond" class="second'+(Q(c,"s")?"":" disabled")+'">'+c.format("ss")+"</td>"),c.add(5,"s");b.empty().append(d)},Z=function(){var a,b,c=o.find(".timepicker span[data-time-component]");h||(a=o.find(".timepicker [data-action=togglePeriod]"),b=e.clone().add(e.hours()>=12?-12:12,"h"),a.text(e.format("A")),Q(b,"h")?a.removeClass("disabled"):a.addClass("disabled")),c.filter("[data-time-component=hours]").text(e.format(h?"HH":"hh")),c.filter("[data-time-component=minutes]").text(e.format("mm")),c.filter("[data-time-component=seconds]").text(e.format("ss")),W(),X(),Y()},$=function(){o&&(V(),Z())},_=function(a){var b=m?null:e;return a?(a=a.clone().locale(d.locale),1!==d.stepping&&a.minutes(Math.round(a.minutes()/d.stepping)*d.stepping%60).seconds(0),void(Q(a)?(e=a,f=e.clone(),g.val(e.format(i)),c.data("date",e.format(i)),m=!1,$(),I({type:"dp.change",date:e.clone(),oldDate:b})):(d.keepInvalid||g.val(m?"":e.format(i)),I({type:"dp.error",date:a})))):(m=!0,g.val(""),c.data("date",""),I({type:"dp.change",date:!1,oldDate:b}),void $())},aa=function(){var b=!1;return o?(o.find(".collapse").each(function(){var c=a(this).data("collapse");return c&&c.transitioning?(b=!0,!1):!0}),b?l:(n&&n.hasClass("btn")&&n.toggleClass("active"),o.hide(),a(window).off("resize",H),o.off("click","[data-action]"),o.off("mousedown",!1),o.remove(),o=!1,I({type:"dp.hide",date:e.clone()}),g.blur(),l)):l},ba=function(){_(null)},ca={next:function(){var a=q[k].navFnc;f.add(q[k].navStep,a),V(),J(a)},previous:function(){var a=q[k].navFnc;f.subtract(q[k].navStep,a),V(),J(a)},pickerSwitch:function(){K(1)},selectMonth:function(b){var c=a(b.target).closest("tbody").find("span").index(a(b.target));
vendor: 4,353 bytes, line 216
216f.month(c),k===p?(_(e.clone().year(f.year()).month(f.month())),d.inline||aa()):(K(-1),V()),J("M")},selectYear:function(b){var c=parseInt(a(b.target).text(),10)||0;f.year(c),k===p?(_(e.clone().year(f.year())),d.inline||aa()):(K(-1),V()),J("YYYY")},selectDecade:function(b){var c=parseInt(a(b.target).data("selection"),10)||0;f.year(c),k===p?(_(e.clone().year(f.year())),d.inline||aa()):(K(-1),V()),J("YYYY")},selectDay:function(b){var c=f.clone();a(b.target).is(".old")&&c.subtract(1,"M"),a(b.target).is(".new")&&c.add(1,"M"),_(c.date(parseInt(a(b.target).text(),10))),z()||d.keepOpen||d.inline||aa()},incrementHours:function(){var a=e.clone().add(1,"h");Q(a,"h")&&_(a)},incrementMinutes:function(){var a=e.clone().add(d.stepping,"m");Q(a,"m")&&_(a)},incrementSeconds:function(){var a=e.clone().add(1,"s");Q(a,"s")&&_(a)},decrementHours:function(){var a=e.clone().subtract(1,"h");Q(a,"h")&&_(a)},decrementMinutes:function(){var a=e.clone().subtract(d.stepping,"m");Q(a,"m")&&_(a)},decrementSeconds:function(){var a=e.clone().subtract(1,"s");Q(a,"s")&&_(a)},togglePeriod:function(){_(e.clone().add(e.hours()>=12?-12:12,"h"))},togglePicker:function(b){var c,e=a(b.target),f=e.closest("ul"),g=f.find(".in"),h=f.find(".collapse:not(.in)");if(g&&g.length){if(c=g.data("collapse"),c&&c.transitioning)return;g.collapse?(g.collapse("hide"),h.collapse("show")):(g.removeClass("in"),h.addClass("in")),e.is("span")?e.toggleClass(d.icons.time+" "+d.icons.date):e.find("span").toggleClass(d.icons.time+" "+d.icons.date)}},showPicker:function(){o.find(".timepicker > div:not(.timepicker-picker)").hide(),o.find(".timepicker .timepicker-picker").show()},showHours:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-hours").show()},showMinutes:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-seconds").show()},selectHour:function(b){var c=parseInt(a(b.target).text(),10);h||(e.hours()>=12?12!==c&&(c+=12):12===c&&(c=0)),_(e.clone().hours(c)),ca.showPicker.call(l)},selectMinute:function(b){_(e.clone().minutes(parseInt(a(b.target).text(),10))),ca.showPicker.call(l)},selectSecond:function(b){_(e.clone().seconds(parseInt(a(b.target).text(),10))),ca.showPicker.call(l)},clear:ba,today:function(){var a=x();Q(a,"d")&&_(a)},close:aa},da=function(b){return a(b.currentTarget).is(".disabled")?!1:(ca[a(b.currentTarget).data("action")].apply(l,arguments),!1)},ea=function(){var b,c={year:function(a){return a.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(a){return a.date(1).hours(0).seconds(0).minutes(0)},day:function(a){return a.hours(0).seconds(0).minutes(0)},hour:function(a){return a.seconds(0).minutes(0)},minute:function(a){return a.seconds(0)}};return g.prop("disabled")||!d.ignoreReadonly&&g.prop("readonly")||o?l:(void 0!==g.val()&&0!==g.val().trim().length?_(ga(g.val().trim())):d.useCurrent&&m&&(g.is("input")&&0===g.val().trim().length||d.inline)&&(b=x(),"string"==typeof d.useCurrent&&(b=c[d.useCurrent](b)),_(b)),o=F(),L(),R(),o.find(".timepicker-hours").hide(),o.find(".timepicker-minutes").hide(),o.find(".timepicker-seconds").hide(),$(),K(),a(window).on("resize",H),o.on("click","[data-action]",da),o.on("mousedown",!1),n&&n.hasClass("btn")&&n.toggleClass("active"),o.show(),H(),d.focusOnShow&&!g.is(":focus")&&g.focus(),I({type:"dp.show"}),l)},fa=function(){return o?aa():ea()},ga=function(a){return a=void 0===d.parseInputDate?b.isMoment(a)||a instanceof Date?b(a):x(a):d.parseInputDate(a),a.locale(d.locale),a},ha=function(a){var b,c,e,f,g=null,h=[],i={},j=a.which,k="p";w[j]=k;for(b in w)w.hasOwnProperty(b)&&w[b]===k&&(h.push(b),parseInt(b,10)!==j&&(i[b]=!0));for(b in d.keyBinds)if(d.keyBinds.hasOwnProperty(b)&&"function"==typeof d.keyBinds[b]&&(e=b.split(" "),e.length===h.length&&v[j]===e[e.length-1])){for(f=!0,c=e.length-2;c>=0;c--)if(!(v[e[c]]in i)){f=!1;break}if(f){g=d.keyBinds[b];break}}g&&(g.call(l,o),a.stopPropagation(),a.preventDefault())},ia=function(a){w[a.which]="r",a.stopPropagation(),a.preventDefault()},ja=function(b){var c=a(b.target).val().trim(),d=c?ga(c):null;return _(d),b.stopImmediatePropagation(),!1},ka=function(){g.on({change:ja,blur:d.debug?"":aa,keydown:ha,keyup:ia,focus:d.allowInputToggle?ea:""}
216),c.is("input")?g.on({focus:ea}):n&&(n.on("click",fa),n.on("mousedown",!1))},la=function(){g.off({change:ja,blur:blur,keydown:ha,keyup:ia,focus:d.allowInputToggle?aa:""}),c.is("input")?g.off({focus:ea}):n&&(n.off("click",fa),n.off("mousedown",!1))},ma=function(b){var c={};return a.each(b,function(){var a=ga(this);a.isValid()&&(c[a.format("YYYY-MM-DD")]=!0)}),Object.keys(c).length?c:!1},na=function(b){var c={};return a.each(b,function(){c[this]=!0}),Object.keys(c).length?c:!1},oa=function(){var a=d.format||"L LT";i=a.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){var b=e.localeData().longDateFormat(a)||a;return b.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return e.localeData().longDateFormat(a)||a})}),j=d.extraFormats?d.extraFormats.slice():[],j.indexOf(a)<0&&j.indexOf(i)<0&&j.push(i),h=i.toLowerCase().indexOf("a")<1&&i.replace(/\[.*?\]/g,"").indexOf("h")<1,y("y")&&(p=2),y("M")&&(p=1),y("d")&&(p=0),k=Math.max(p,k),m||_(e)};if(l.destroy=function(){aa(),la(),c.removeData("DateTimePicker"),c.removeData("date")},l.toggle=fa,l.show=ea,l.hide=aa,l.disable=function(){return aa(),n&&n.hasClass("btn")&&n.addClass("disabled"),g.prop("disabled",!0),l},l.enable=function(){return n&&n.hasClass("btn")&&n.removeClass("disabled"),g.prop("disabled",!1),l},l.ignoreReadonly=function(a){if(0===arguments.length)return d.ignoreReadonly;if("boolean"!=typeof a)throw new TypeError("ignoreReadonly () expects a boolean parameter");return d.ignoreReadonly=a,l},l.options=function(b){if(0===arguments.length)return a.extend(!0,{},d);if(!(b instanceof Object))throw new TypeError("options() options parameter should be an object");return a.extend(!0,d,b),a.each(d,function(a,b){if(void 0===l[a])throw new TypeError("option "+a+" is not recognized!");l[a](b)}),l},l.date=function(a){if(0===arguments.length)return m?null:e.clone();if(!(null===a||"string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return _(null===a?null:ga(a)),l},l.format=function(a){if(0===arguments.length)return d.format;if("string"!=typeof a&&("boolean"!=typeof a||a!==!1))throw new TypeError("format() expects a sting or boolean:false parameter "+a);return d.format=a,i&&oa(),l},l.timeZone=function(a){return 0===arguments.length?d.timeZone:(d.timeZone=a,l)},l.dayViewHeaderFormat=function(a){if(0===arguments.length)return d.dayViewHeaderFormat;if("string"!=typeof a)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return d.dayViewHeaderFormat=a,l},l.extraFormats=function(a){if(0===arguments.length)return d.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return d.extraFormats=a,j&&oa(),l},l.disabledDates=function(b){if(0===arguments.length)return d.disabledDates?a.extend({},d.disabledDates):d.disabledDates;if(!b)return d.disabledDates=!1,$(),l;if(!(b instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return d.disabledDates=ma(b),d.enabledDates=!1,$(),l},l.enabledDates=function(b){if(0===arguments.length)return d.enabledDates?a.extend({},d.enabledDates):d.enabledDates;if(!b)return d.enabledDates=!1,$(),l;if(!(b instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return d.enabledDates=ma(b),d.disabledDates=!1,$(),l},l.daysOfWeekDisabled=function(a){if(0===arguments.length)return d.daysOfWeekDisabled.splice(0);if("boolean"==typeof a&&!a)return d.daysOfWeekDisabled=!1,$(),l;if(!(a instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(d.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||0>b||isNaN(b)?a:(-1===a.indexOf(b)&&a.push(b),a)},[]).sort(),d.useCurrent&&!d.keepInvalid){for(var b=0;!Q(e,"d");){if(e.add(1,"d"),7===b)throw"Tried 7 times to find a valid date";b++}_(e)}return $(),l},l.maxDate=function(a){if(0===arguments.length)return d.maxDate?d.maxDate.clone():d.maxDate;if("boolean"==typeof a&&a===!1)return d.maxDate=!1,$(),l;"string"==typeof a&&("now"===a||"moment"===a)&&(a=x());var b=ga(a);if(!b.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+a);if(d.minDate&&b.isBefore(d.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+b.format(i));return d.maxDate=b,d.useCurrent&&!d.keepInvalid&&e.isAfter(a)&&_(d.maxDate),f.isAfter(b)&&(f=b.clone().subtract(d.stepping,"m")),$(),l}
vendor: 4,354 bytes, line 216
216,l.minDate=function(a){if(0===arguments.length)return d.minDate?d.minDate.clone():d.minDate;if("boolean"==typeof a&&a===!1)return d.minDate=!1,$(),l;"string"==typeof a&&("now"===a||"moment"===a)&&(a=x());var b=ga(a);if(!b.isValid())throw new TypeError("minDate() Could not parse date parameter: "+a);if(d.maxDate&&b.isAfter(d.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+b.format(i));return d.minDate=b,d.useCurrent&&!d.keepInvalid&&e.isBefore(a)&&_(d.minDate),f.isBefore(b)&&(f=b.clone().add(d.stepping,"m")),$(),l},l.defaultDate=function(a){if(0===arguments.length)return d.defaultDate?d.defaultDate.clone():d.defaultDate;if(!a)return d.defaultDate=!1,l;"string"==typeof a&&("now"===a||"moment"===a)&&(a=x());var b=ga(a);if(!b.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+a);if(!Q(b))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return d.defaultDate=b,(d.defaultDate&&d.inline||""===g.val().trim())&&_(d.defaultDate),l},l.locale=function(a){if(0===arguments.length)return d.locale;if(!b.localeData(a))throw new TypeError("locale() locale "+a+" is not loaded from moment locales!");return d.locale=a,e.locale(d.locale),f.locale(d.locale),i&&oa(),o&&(aa(),ea()),l},l.stepping=function(a){return 0===arguments.length?d.stepping:(a=parseInt(a,10),(isNaN(a)||1>a)&&(a=1),d.stepping=a,l)},l.useCurrent=function(a){var b=["year","month","day","hour","minute"];if(0===arguments.length)return d.useCurrent;if("boolean"!=typeof a&&"string"!=typeof a)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof a&&-1===b.indexOf(a.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+b.join(", "));return d.useCurrent=a,l},l.collapse=function(a){if(0===arguments.length)return d.collapse;if("boolean"!=typeof a)throw new TypeError("collapse() expects a boolean parameter");return d.collapse===a?l:(d.collapse=a,o&&(aa(),ea()),l)},l.icons=function(b){if(0===arguments.length)return a.extend({},d.icons);if(!(b instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return a.extend(d.icons,b),o&&(aa(),ea()),l},l.tooltips=function(b){if(0===arguments.length)return a.extend({},d.tooltips);if(!(b instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return a.extend(d.tooltips,b),o&&(aa(),ea()),l},l.useStrict=function(a){if(0===arguments.length)return d.useStrict;if("boolean"!=typeof a)throw new TypeError("useStrict() expects a boolean parameter");return d.useStrict=a,l},l.sideBySide=function(a){if(0===arguments.length)return d.sideBySide;if("boolean"!=typeof a)throw new TypeError("sideBySide() expects a boolean parameter");return d.sideBySide=a,o&&(aa(),ea()),l},l.viewMode=function(a){if(0===arguments.length)return d.viewMode;if("string"!=typeof a)throw new TypeError("viewMode() expects a string parameter");if(-1===r.indexOf(a))throw new TypeError("viewMode() parameter must be one of ("+r.join(", ")+") value");return d.viewMode=a,k=Math.max(r.indexOf(a),p),K(),l},l.toolbarPlacement=function(a){if(0===arguments.length)return d.toolbarPlacement;if("string"!=typeof a)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===u.indexOf(a))throw new TypeError("toolbarPlacement() parameter must be one of ("+u.join(", ")+") value");return d.toolbarPlacement=a,o&&(aa(),ea()),l},l.widgetPositioning=function(b){if(0===arguments.length)return a.extend({},d.widgetPositioning);if("[object Object]"!=={}.toString.call(b))throw new TypeError("widgetPositioning() expects an object variable");if(b.horizontal){if("string"!=typeof b.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(b.horizontal=b.horizontal.toLowerCase(),-1===t.indexOf(b.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+t.join(", ")+")");d.widgetPositioning.horizontal=b.horizontal}if(b.vertical){if("string"!=typeof b.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(b.vertical=b.vertical.toLowerCase(),-1===s.indexOf(b.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+s.join(", ")+")");d.widgetPositioning.vertical=b.vertical}return $(),l}
vendor: 5,095 bytes, lines 216-217
216,l.calendarWeeks=function(a){if(0===arguments.length)return d.calendarWeeks;if("boolean"!=typeof a)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return d.calendarWeeks=a,$(),l},l.showTodayButton=function(a){if(0===arguments.length)return d.showTodayButton;if("boolean"!=typeof a)throw new TypeError("showTodayButton() expects a boolean parameter");return d.showTodayButton=a,o&&(aa(),ea()),l},l.showClear=function(a){if(0===arguments.length)return d.showClear;if("boolean"!=typeof a)throw new TypeError("showClear() expects a boolean parameter");return d.showClear=a,o&&(aa(),ea()),l},l.widgetParent=function(b){if(0===arguments.length)return d.widgetParent;if("string"==typeof b&&(b=a(b)),null!==b&&"string"!=typeof b&&!(b instanceof a))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return d.widgetParent=b,o&&(aa(),ea()),l},l.keepOpen=function(a){if(0===arguments.length)return d.keepOpen;if("boolean"!=typeof a)throw new TypeError("keepOpen() expects a boolean parameter");return d.keepOpen=a,l},l.focusOnShow=function(a){if(0===arguments.length)return d.focusOnShow;if("boolean"!=typeof a)throw new TypeError("focusOnShow() expects a boolean parameter");return d.focusOnShow=a,l},l.inline=function(a){if(0===arguments.length)return d.inline;if("boolean"!=typeof a)throw new TypeError("inline() expects a boolean parameter");return d.inline=a,l},l.clear=function(){return ba(),l},l.keyBinds=function(a){return d.keyBinds=a,l},l.getMoment=function(a){return x(a)},l.debug=function(a){if("boolean"!=typeof a)throw new TypeError("debug() expects a boolean parameter");return d.debug=a,l},l.allowInputToggle=function(a){if(0===arguments.length)return d.allowInputToggle;if("boolean"!=typeof a)throw new TypeError("allowInputToggle() expects a boolean parameter");return d.allowInputToggle=a,l},l.showClose=function(a){if(0===arguments.length)return d.showClose;if("boolean"!=typeof a)throw new TypeError("showClose() expects a boolean parameter");return d.showClose=a,l},l.keepInvalid=function(a){if(0===arguments.length)return d.keepInvalid;if("boolean"!=typeof a)throw new TypeError("keepInvalid() expects a boolean parameter");return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)return d.datepickerInput;if("string"!=typeof a)throw new TypeError("datepickerInput() expects a string parameter");return d.datepickerInput=a,l},l.parseInputDate=function(a){if(0===arguments.length)return d.parseInputDate;
217if("function"!=typeof a)throw new TypeError("parseInputDate() sholud be as function");return d.parseInputDate=a,l},l.disabledTimeIntervals=function(b){if(0===arguments.length)return d.disabledTimeIntervals?a.extend({},d.disabledTimeIntervals):d.disabledTimeIntervals;if(!b)return d.disabledTimeIntervals=!1,$(),l;if(!(b instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return d.disabledTimeIntervals=b,$(),l},l.disabledHours=function(b){if(0===arguments.length)return d.disabledHours?a.extend({},d.disabledHours):d.disabledHours;if(!b)return d.disabledHours=!1,$(),l;if(!(b instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(d.disabledHours=na(b),d.enabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!Q(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}_(e)}return $(),l},l.enabledHours=function(b){if(0===arguments.length)return d.enabledHours?a.extend({},d.enabledHours):d.enabledHours;if(!b)return d.enabledHours=!1,$(),l;if(!(b instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(d.enabledHours=na(b),d.disabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!Q(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}_(e)}return $(),l},l.viewDate=function(a){if(0===arguments.length)return f.clone();if(!a)return f=e.clone(),l;if(!("string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return f=ga(a),J(),l},c.is("input"))g=c;else if(g=c.find(d.datepickerInput),0===g.size())g=c.find("input");else if(!g.is("input"))throw new Error('CSS class "'+d.datepickerInput+'" cannot be applied to non input element');if(c.hasClass("input-group")&&(n=0===c.find(".datepickerbutton").size()?c.find(".input-group-addon"):c.find(".datepickerbutton")),!d.inline&&!g.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return e=x(),f=e.clone(),a.extend(!0,d,G()),l.options(d),oa(),ka(),g.prop("disabled")&&l.disable(),g.is("input")&&0!==g.val().trim().length?_(ga(g.val().trim())):d.defaultDate&&void 0===g.attr("placeholder")&&_(d.defaultDate),d.inline&&ea(),l};a.fn.datetimepicker=function(b){return this.each(function(){var d=a(this);d.data("DateTimePicker")||(b=a.extend(!0,{},a.fn.datetimepicker.defaults,b),d.data("DateTimePicker",c(d,b)))})},a.fn.datetimepicker.defaults={timeZone:"Etc/UTC",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,
217collapse:!0,locale:b.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(7,"d")):this.date(b.clone().add(this.stepping(),"m"))}},down:function(a){if(!a)return void this.show();var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(7,"d")):this.date(b.clone().subtract(this.stepping(),"m"))},"control up":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(1,"y")):this.date(b.clone().add(1,"h"))}},"control down":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(1,"y")):this.date(b.clone().subtract(1,"h"))}},left:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"d"))}},right:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"d"))}},pageUp:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"M"))}},pageDown:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(a){a.find(".timepicker").is(":visible")&&a.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},"delete":function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1}});
218/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
219(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate,
220v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true");
221g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap();
222f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}
vendor: 4,591 bytes, lines 222-263
222function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i";
223_add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c=
224f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this,
225b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='<div class="'+l+'" '+(u?'role="'+c[_type]+'" ':"");u&&z.each(function(){h+=
226'aria-labelledby="';this.id?h+=this.id:(this.id=y,h+=y);h+='"'});h=a.wrap(h+"/>")[_callback]("ifCreated").parent().append(e.insert);d=f('<ins class="'+C+'"/>').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return;
227A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d=
228b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);
229 
230/*!
231
232 handlebars v3.0.3
233 
234Copyright (C) 2011-2014 by Yehuda Katz
235
236Permission is hereby granted, free of charge, to any person obtaining a copy
237of this software and associated documentation files (the "Software"), to deal
238in the Software without restriction, including without limitation the rights
239to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
240copies of the Software, and to permit persons to whom the Software is
241furnished to do so, subject to the following conditions:
242
243The above copyright notice and this permission notice shall be included in
244all copies or substantial portions of the Software.
245
246THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
247IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
248FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
249AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
250LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
251OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
252THE SOFTWARE.
253
254@license
255*/
256(function webpackUniversalModuleDefinition(root, factory) {
257	if(typeof exports === 'object' && typeof module === 'object')
258		module.exports = factory();
259	else if(typeof define === 'function' && define.amd)
260		define(factory);
261	else if(typeof exports === 'object')
262		exports["Handlebars"] = factory();
263	else
vendor: 5,134 bytes, lines 264-459
264		root["Handlebars"] = factory();
265})(this, function() {
266return /******/ (function(modules) { // webpackBootstrap
267/******/ 	// The module cache
268/******/ 	var installedModules = {};
269
270/******/ 	// The require function
271/******/ 	function __webpack_require__(moduleId) {
272
273/******/ 		// Check if module is in cache
274/******/ 		if(installedModules[moduleId])
275/******/ 			return installedModules[moduleId].exports;
276
277/******/ 		// Create a new module (and put it into the cache)
278/******/ 		var module = installedModules[moduleId] = {
279/******/ 			exports: {},
280/******/ 			id: moduleId,
281/******/ 			loaded: false
282/******/ 		};
283
284/******/ 		// Execute the module function
285/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
286
287/******/ 		// Flag the module as loaded
288/******/ 		module.loaded = true;
289
290/******/ 		// Return the exports of the module
291/******/ 		return module.exports;
292/******/ 	}
293
294
295/******/ 	// expose the modules object (__webpack_modules__)
296/******/ 	__webpack_require__.m = modules;
297
298/******/ 	// expose the module cache
299/******/ 	__webpack_require__.c = installedModules;
300
301/******/ 	// __webpack_public_path__
302/******/ 	__webpack_require__.p = "";
303
304/******/ 	// Load entry module and return exports
305/******/ 	return __webpack_require__(0);
306/******/ })
307/************************************************************************/
308/******/ ([
309/* 0 */
310/***/ function(module, exports, __webpack_require__) {
311
312	'use strict';
313
314	var _interopRequireDefault = __webpack_require__(8)['default'];
315
316	exports.__esModule = true;
317
318	var _runtime = __webpack_require__(1);
319
320	var _runtime2 = _interopRequireDefault(_runtime);
321
322	// Compiler imports
323
324	var _AST = __webpack_require__(2);
325
326	var _AST2 = _interopRequireDefault(_AST);
327
328	var _Parser$parse = __webpack_require__(3);
329
330	var _Compiler$compile$precompile = __webpack_require__(4);
331
332	var _JavaScriptCompiler = __webpack_require__(5);
333
334	var _JavaScriptCompiler2 = _interopRequireDefault(_JavaScriptCompiler);
335
336	var _Visitor = __webpack_require__(6);
337
338	var _Visitor2 = _interopRequireDefault(_Visitor);
339
340	var _noConflict = __webpack_require__(7);
341
342	var _noConflict2 = _interopRequireDefault(_noConflict);
343
344	var _create = _runtime2['default'].create;
345	function create() {
346	  var hb = _create();
347
348	  hb.compile = function (input, options) {
349	    return _Compiler$compile$precompile.compile(input, options, hb);
350	  };
351	  hb.precompile = function (input, options) {
352	    return _Compiler$compile$precompile.precompile(input, options, hb);
353	  };
354
355	  hb.AST = _AST2['default'];
356	  hb.Compiler = _Compiler$compile$precompile.Compiler;
357	  hb.JavaScriptCompiler = _JavaScriptCompiler2['default'];
358	  hb.Parser = _Parser$parse.parser;
359	  hb.parse = _Parser$parse.parse;
360
361	  return hb;
362	}
363
364	var inst = create();
365	inst.create = create;
366
367	_noConflict2['default'](inst);
368
369	inst.Visitor = _Visitor2['default'];
370
371	inst['default'] = inst;
372
373	exports['default'] = inst;
374	module.exports = exports['default'];
375
376/***/ },
377/* 1 */
378/***/ function(module, exports, __webpack_require__) {
379
380	'use strict';
381
382	var _interopRequireWildcard = __webpack_require__(9)['default'];
383
384	var _interopRequireDefault = __webpack_require__(8)['default'];
385
386	exports.__esModule = true;
387
388	var _import = __webpack_require__(10);
389
390	var base = _interopRequireWildcard(_import);
391
392	// Each of these augment the Handlebars object. No need to setup here.
393	// (This is done to easily share code between commonjs and browse envs)
394
395	var _SafeString = __webpack_require__(11);
396
397	var _SafeString2 = _interopRequireDefault(_SafeString);
398
399	var _Exception = __webpack_require__(12);
400
401	var _Exception2 = _interopRequireDefault(_Exception);
402
403	var _import2 = __webpack_require__(13);
404
405	var Utils = _interopRequireWildcard(_import2);
406
407	var _import3 = __webpack_require__(14);
408
409	var runtime = _interopRequireWildcard(_import3);
410
411	var _noConflict = __webpack_require__(7);
412
413	var _noConflict2 = _interopRequireDefault(_noConflict);
414
415	// For compatibility and usage outside of module systems, make the Handlebars object a namespace
416	function create() {
417	  var hb = new base.HandlebarsEnvironment();
418
419	  Utils.extend(hb, base);
420	  hb.SafeString = _SafeString2['default'];
421	  hb.Exception = _Exception2['default'];
422	  hb.Utils = Utils;
423	  hb.escapeExpression = Utils.escapeExpression;
424
425	  hb.VM = runtime;
426	  hb.template = function (spec) {
427	    return runtime.template(spec, hb);
428	  };
429
430	  return hb;
431	}
432
433	var inst = create();
434	inst.create = create;
435
436	_noConflict2['default'](inst);
437
438	inst['default'] = inst;
439
440	exports['default'] = inst;
441	module.exports = exports['default'];
442
443/***/ },
444/* 2 */
445/***/ function(module, exports, __webpack_require__) {
446
447	'use strict';
448
449	exports.__esModule = true;
450	var AST = {
451	  Program: function Program(statements, blockParams, strip, locInfo) {
452	    this.loc = locInfo;
453	    this.type = 'Program';
454	    this.body = statements;
455
456	    this.blockParams = blockParams;
457	    this.strip = strip;
458	  },
459
460	  MustacheStatement: function MustacheStatement(path, params, hash, escaped, strip, locInfo) {
461	    this.loc = locInfo;
462	    this.type = 'MustacheStatement';
463
464	    this.path = path;
465	    this.params = params || [];
466	    this.hash = hash;
467	    this.escaped = escaped;
468
469	    this.strip = strip;
470	  },
471
472	  BlockStatement: function BlockStatement(path, params, hash, program, inverse, openStrip, inverseStrip, closeStrip, locInfo) {
473	    this.loc = locInfo;
474	    this.type = 'BlockStatement';
475
476	    this.path = path;
477	    this.params = params || [];
478	    this.hash = hash;
479	    this.program = program;
480	    this.inverse = inverse;
481
482	    this.openStrip = openStrip;
483	    this.inverseStrip = inverseStrip;
484	    this.closeStrip = closeStrip;
485	  },
486
487	  PartialStatement: function PartialStatement(name, params, hash, strip, locInfo) {
488	    this.loc = locInfo;
489	    this.type = 'PartialStatement';
490
491	    this.name = name;
492	    this.params = params || [];
493	    this.hash = hash;
494
495	    this.indent = '';
496	    this.strip = strip;
497	  },
498
499	  ContentStatement: function ContentStatement(string, locInfo) {
500	    this.loc = locInfo;
501	    this.type = 'ContentStatement';
502	    this.original = this.value = string;
503	  },
504
505	  CommentStatement: function CommentStatement(comment, strip, locInfo) {
506	    this.loc = locInfo;
507	    this.type = 'CommentStatement';
508	    this.value = comment;
509
510	    this.strip = strip;
511	  },
512
513	  SubExpression: function SubExpression(path, params, hash, locInfo) {
514	    this.loc = locInfo;
515
516	    this.type = 'SubExpression';
517	    this.path = path;
518	    this.params = params || [];
519	    this.hash = hash;
520	  },
521
522	  PathExpression: function PathExpression(data, depth, parts, original, locInfo) {
523	    this.loc = locInfo;
524	    this.type = 'PathExpression';
525
526	    this.data = data;
527	    this.original = original;
528	    this.parts = parts;
529	    this.depth = depth;
530	  },
531
532	  StringLiteral: function StringLiteral(string, locInfo) {
533	    this.loc = locInfo;
534	    this.type = 'StringLiteral';
535	    this.original = this.value = string;
536	  },
537
538	  NumberLiteral: function NumberLiteral(number, locInfo) {
539	    this.loc = locInfo;
540	    this.type = 'NumberLiteral';
541	    this.original = this.value = Number(number);
542	  },
543
544	  BooleanLiteral: function BooleanLiteral(bool, locInfo) {
545	    this.loc = locInfo;
546	    this.type = 'BooleanLiteral';
547	    this.original = this.value = bool === 'true';
548	  },
549
550	  UndefinedLiteral: function UndefinedLiteral(locInfo) {
551	    this.loc = locInfo;
552	    this.type = 'UndefinedLiteral';
553	    this.original = this.value = undefined;
554	  },
555
556	  NullLiteral: function NullLiteral(locInfo) {
557	    this.loc = locInfo;
558	    this.type = 'NullLiteral';
559	    this.original = this.value = null;
560	  },
561
562	  Hash: function Hash(pairs, locInfo) {
563	    this.loc = locInfo;
564	    this.type = 'Hash';
565	    this.pairs = pairs;
566	  },
567	  HashPair: function HashPair(key, value, locInfo) {
568	    this.loc = locInfo;
569	    this.type = 'HashPair';
570	    this.key = key;
571	    this.value = value;
572	  },
573
574	  // Public API used to evaluate derived attributes regarding AST nodes
575	  helpers: {
576	    // a mustache is definitely a helper if:
577	    // * it is an eligible helper, and
578	    // * it has at least one parameter or hash segment
579	    helperExpression: function helperExpression(node) {
580	      return !!(node.type === 'SubExpression' || node.params.length || node.hash);
581	    },
582
583	    scopedId: function scopedId(path) {
584	      return /^\.|this\b/.test(path.original);
585	    },
586
587	    // an ID is simple if it only has one part, and that part is not
588	    // `..` or `this`.
589	    simpleId: function simpleId(path) {
590	      return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
591	    }
592	  }
593	};
594
595	// Must be exported as an object rather than the root of the module as the jison lexer
596	// must modify the object to operate properly.
597	exports['default'] = AST;
598	module.exports = exports['default'];
599
600/***/ },
601/* 3 */
602/***/ function(module, exports, __webpack_require__) {
603
604	'use strict';
605
606	var _interopRequireDefault = __webpack_require__(8)['default'];
607
608	var _interopRequireWildcard = __webpack_require__(9)['default'];
609
610	exports.__esModule = true;
611	exports.parse = parse;
612
613	var _parser = __webpack_require__(15);
614
615	var _parser2 = _interopRequireDefault(_parser);
616
617	var _AST = __webpack_require__(2);
618
619	var _AST2 = _interopRequireDefault(_AST);
620
621	var _WhitespaceControl = __webpack_require__(16);
622
623	var _WhitespaceControl2 = _interopRequireDefault(_WhitespaceControl);
624
625	var _import = __webpack_require__(17);
626
627	var Helpers = _interopRequireWildcard(_import);
628
629	var _extend = __webpack_require__(13);
630
631	exports.parser = _parser2['default'];
632
633	var yy = {};
634	_extend.extend(yy, Helpers, _AST2['default']);
635
636	function parse(input, options) {
637	  // Just return if an already-compiled AST was passed in.
638	  if (input.type === 'Program') {
639	    return input;
640	  }
641
642	  _parser2['default'].yy = yy;
643
644	  // Altering the shared object here, but this is ok as parser is a sync operation
645	  yy.locInfo = function (locInfo) {
646	    return new yy.SourceLocation(options && options.srcName, locInfo);
647	  };
648
649	  var strip = new _WhitespaceControl2['default']();
650	  return strip.accept(_parser2['default'].parse(input));
651	}
652
653/***/ },
654/* 4 */
655/***/ function(module, exports, __webpack_require__) {
656
657	'use strict';
658
659	var _interopRequireDefault = __webpack_require__(8)['default'];
660
661	exports.__esModule = true;
662	exports.Compiler = Compiler;
663	exports.precompile = precompile;
664	exports.compile = compile;
665
666	var _Exception = __webpack_require__(12);
667
668	var _Exception2 = _interopRequireDefault(_Exception);
669
670	var _isArray$indexOf = __webpack_require__(13);
671
672	var _AST = __webpack_require__(2);
673
674	var _AST2 = _interopRequireDefault(_AST);
675
676	var slice = [].slice;
677
678	function Compiler() {}
679
680	// the foundHelper register will disambiguate helper lookup from finding a
681	// function in a context. This is necessary for mustache compatibility, which
682	// requires that context functions in blocks are evaluated by blockHelperMissing,
683	// and then proceed as if the resulting value was provided to blockHelperMissing.
684
685	Compiler.prototype = {
686	  compiler: Compiler,
687
688	  equals: function equals(other) {
689	    var len = this.opcodes.length;
690	    if (other.opcodes.length !== len) {
691	      return false;
692	    }
693
694	    for (var i = 0; i < len; i++) {
695	      var opcode = this.opcodes[i],
696	          otherOpcode = other.opcodes[i];
697	      if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
698	        return false;
699	      }
700	    }
701
702	    // We know that length is the same between the two arrays because they are directly tied
703	    // to the opcode behavior above.
704	    len = this.children.length;
705	    for (var i = 0; i < len; i++) {
706	      if (!this.children[i].equals(other.children[i])) {
707	        return false;
708	      }
709	    }
710
711	    return true;
712	  },
713
714	  guid: 0,
715
716	  compile: function compile(program, options) {
717	    this.sourceNode = [];
718	    this.opcodes = [];
719	    this.children = [];
720	    this.options = options;
721	    this.stringParams = options.stringParams;
722	    this.trackIds = options.trackIds;
723
724	    options.blockParams = options.blockParams || [];
725
726	    // These changes will propagate to the other compiler components
727	    var knownHelpers = options.knownHelpers;
728	    options.knownHelpers = {
729	      helperMissing: true,
730	      blockHelperMissing: true,
731	      each: true,
732	      'if': true,
733	      unless: true,
734	      'with': true,
735	      log: true,
736	      lookup: true
737	    };
738	    if (knownHelpers) {
739	      for (var _name in knownHelpers) {
740	        if (_name in knownHelpers) {
741	          options.knownHelpers[_name] = knownHelpers[_name];
742	        }
743	      }
744	    }
745
746	    return this.accept(program);
747	  },
748
749	  compileProgram: function compileProgram(program) {
750	    var childCompiler = new this.compiler(),
751	        // eslint-disable-line new-cap
752	    result = childCompiler.compile(program, this.options),
753	        guid = this.guid++;
754
755	    this.usePartial = this.usePartial || result.usePartial;
756
757	    this.children[guid] = result;
758	    this.useDepths = this.useDepths || result.useDepths;
759
760	    return guid;
761	  },
762
763	  accept: function accept(node) {
764	    this.sourceNode.unshift(node);
765	    var ret = this[node.type](node);
766	    this.sourceNode.shift();
767	    return ret;
768	  },
769
770	  Program: function Program(program) {
771	    this.options.blockParams.unshift(program.blockParams);
772
773	    var body = program.body,
774	        bodyLength = body.length;
775	    for (var i = 0; i < bodyLength; i++) {
776	      this.accept(body[i]);
777	    }
778
779	    this.options.blockParams.shift();
780
781	    this.isSimple = bodyLength === 1;
782	    this.blockParams = program.blockParams ? program.blockParams.length : 0;
783
784	    return this;
785	  },
786
787	  BlockStatement: function BlockStatement(block) {
788	    transformLiteralToPath(block);
789
790	    var program = block.program,
791	        inverse = block.inverse;
792
793	    program = program && this.compileProgram(program);
794	    inverse = inverse && this.compileProgram(inverse);
795
796	    var type = this.classifySexpr(block);
797
798	    if (type === 'helper') {
799	      this.helperSexpr(block, program, inverse);
800	    } else if (type === 'simple') {
801	      this.simpleSexpr(block);
802
803	      // now that the simple mustache is resolved, we need to
804	      // evaluate it by executing `blockHelperMissing`
805	      this.opcode('pushProgram', program);
806	      this.opcode('pushProgram', inverse);
807	      this.opcode('emptyHash');
808	      this.opcode('blockValue', block.path.original);
809	    } else {
810	      this.ambiguousSexpr(block, program, inverse);
811
812	      // now that the simple mustache is resolved, we need to
813	      // evaluate it by executing `blockHelperMissing`
814	      this.opcode('pushProgram', program);
815	      this.opcode('pushProgram', inverse);
816	      this.opcode('emptyHash');
817	      this.opcode('ambiguousBlockValue');
818	    }
819
820	    this.opcode('append');
821	  },
822
823	  PartialStatement: function PartialStatement(partial) {
824	    this.usePartial = true;
825
826	    var params = partial.params;
827	    if (params.length > 1) {
828	      throw new _Exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
829	    } else if (!params.length) {
830	      params.push({ type: 'PathExpression', parts: [], depth: 0 });
831	    }
832
833	    var partialName = partial.name.original,
834	        isDynamic = partial.name.type === 'SubExpression';
835	    if (isDynamic) {
836	      this.accept(partial.name);
837	    }
838
839	    this.setupFullMustacheParams(partial, undefined, undefined, true);
840
841	    var indent = partial.indent || '';
842	    if (this.options.preventIndent && indent) {
843	      this.opcode('appendContent', indent);
844	      indent = '';
845	    }
846
847	    this.opcode('invokePartial', isDynamic, partialName, indent);
848	    this.opcode('append');
849	  },
850
vendor: 4,424 bytes, lines 851-997
851	  MustacheStatement: function MustacheStatement(mustache) {
852	    this.SubExpression(mustache); // eslint-disable-line new-cap
853
854	    if (mustache.escaped && !this.options.noEscape) {
855	      this.opcode('appendEscaped');
856	    } else {
857	      this.opcode('append');
858	    }
859	  },
860
861	  ContentStatement: function ContentStatement(content) {
862	    if (content.value) {
863	      this.opcode('appendContent', content.value);
864	    }
865	  },
866
867	  CommentStatement: function CommentStatement() {},
868
869	  SubExpression: function SubExpression(sexpr) {
870	    transformLiteralToPath(sexpr);
871	    var type = this.classifySexpr(sexpr);
872
873	    if (type === 'simple') {
874	      this.simpleSexpr(sexpr);
875	    } else if (type === 'helper') {
876	      this.helperSexpr(sexpr);
877	    } else {
878	      this.ambiguousSexpr(sexpr);
879	    }
880	  },
881	  ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
882	    var path = sexpr.path,
883	        name = path.parts[0],
884	        isBlock = program != null || inverse != null;
885
886	    this.opcode('getContext', path.depth);
887
888	    this.opcode('pushProgram', program);
889	    this.opcode('pushProgram', inverse);
890
891	    this.accept(path);
892
893	    this.opcode('invokeAmbiguous', name, isBlock);
894	  },
895
896	  simpleSexpr: function simpleSexpr(sexpr) {
897	    this.accept(sexpr.path);
898	    this.opcode('resolvePossibleLambda');
899	  },
900
901	  helperSexpr: function helperSexpr(sexpr, program, inverse) {
902	    var params = this.setupFullMustacheParams(sexpr, program, inverse),
903	        path = sexpr.path,
904	        name = path.parts[0];
905
906	    if (this.options.knownHelpers[name]) {
907	      this.opcode('invokeKnownHelper', params.length, name);
908	    } else if (this.options.knownHelpersOnly) {
909	      throw new _Exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
910	    } else {
911	      path.falsy = true;
912
913	      this.accept(path);
914	      this.opcode('invokeHelper', params.length, path.original, _AST2['default'].helpers.simpleId(path));
915	    }
916	  },
917
918	  PathExpression: function PathExpression(path) {
919	    this.addDepth(path.depth);
920	    this.opcode('getContext', path.depth);
921
922	    var name = path.parts[0],
923	        scoped = _AST2['default'].helpers.scopedId(path),
924	        blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
925
926	    if (blockParamId) {
927	      this.opcode('lookupBlockParam', blockParamId, path.parts);
928	    } else if (!name) {
929	      // Context reference, i.e. `{{foo .}}` or `{{foo ..}}`
930	      this.opcode('pushContext');
931	    } else if (path.data) {
932	      this.options.data = true;
933	      this.opcode('lookupData', path.depth, path.parts);
934	    } else {
935	      this.opcode('lookupOnContext', path.parts, path.falsy, scoped);
936	    }
937	  },
938
939	  StringLiteral: function StringLiteral(string) {
940	    this.opcode('pushString', string.value);
941	  },
942
943	  NumberLiteral: function NumberLiteral(number) {
944	    this.opcode('pushLiteral', number.value);
945	  },
946
947	  BooleanLiteral: function BooleanLiteral(bool) {
948	    this.opcode('pushLiteral', bool.value);
949	  },
950
951	  UndefinedLiteral: function UndefinedLiteral() {
952	    this.opcode('pushLiteral', 'undefined');
953	  },
954
955	  NullLiteral: function NullLiteral() {
956	    this.opcode('pushLiteral', 'null');
957	  },
958
959	  Hash: function Hash(hash) {
960	    var pairs = hash.pairs,
961	        i = 0,
962	        l = pairs.length;
963
964	    this.opcode('pushHash');
965
966	    for (; i < l; i++) {
967	      this.pushParam(pairs[i].value);
968	    }
969	    while (i--) {
970	      this.opcode('assignToHash', pairs[i].key);
971	    }
972	    this.opcode('popHash');
973	  },
974
975	  // HELPERS
976	  opcode: function opcode(name) {
977	    this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc });
978	  },
979
980	  addDepth: function addDepth(depth) {
981	    if (!depth) {
982	      return;
983	    }
984
985	    this.useDepths = true;
986	  },
987
988	  classifySexpr: function classifySexpr(sexpr) {
989	    var isSimple = _AST2['default'].helpers.simpleId(sexpr.path);
990
991	    var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
992
993	    // a mustache is an eligible helper if:
994	    // * its id is simple (a single part, not `this` or `..`)
995	    var isHelper = !isBlockParam && _AST2['default'].helpers.helperExpression(sexpr);
996
997	    // if a mustache is an eligible helper but not a definite
vendor: 5,097 bytes, lines 998-1161
998	    // helper, it is ambiguous, and will be resolved in a later
999	    // pass or at runtime.
1000	    var isEligible = !isBlockParam && (isHelper || isSimple);
1001
1002	    // if ambiguous, we can possibly resolve the ambiguity now
1003	    // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.
1004	    if (isEligible && !isHelper) {
1005	      var _name2 = sexpr.path.parts[0],
1006	          options = this.options;
1007
1008	      if (options.knownHelpers[_name2]) {
1009	        isHelper = true;
1010	      } else if (options.knownHelpersOnly) {
1011	        isEligible = false;
1012	      }
1013	    }
1014
1015	    if (isHelper) {
1016	      return 'helper';
1017	    } else if (isEligible) {
1018	      return 'ambiguous';
1019	    } else {
1020	      return 'simple';
1021	    }
1022	  },
1023
1024	  pushParams: function pushParams(params) {
1025	    for (var i = 0, l = params.length; i < l; i++) {
1026	      this.pushParam(params[i]);
1027	    }
1028	  },
1029
1030	  pushParam: function pushParam(val) {
1031	    var value = val.value != null ? val.value : val.original || '';
1032
1033	    if (this.stringParams) {
1034	      if (value.replace) {
1035	        value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
1036	      }
1037
1038	      if (val.depth) {
1039	        this.addDepth(val.depth);
1040	      }
1041	      this.opcode('getContext', val.depth || 0);
1042	      this.opcode('pushStringParam', value, val.type);
1043
1044	      if (val.type === 'SubExpression') {
1045	        // SubExpressions get evaluated and passed in
1046	        // in string params mode.
1047	        this.accept(val);
1048	      }
1049	    } else {
1050	      if (this.trackIds) {
1051	        var blockParamIndex = undefined;
1052	        if (val.parts && !_AST2['default'].helpers.scopedId(val) && !val.depth) {
1053	          blockParamIndex = this.blockParamIndex(val.parts[0]);
1054	        }
1055	        if (blockParamIndex) {
1056	          var blockParamChild = val.parts.slice(1).join('.');
1057	          this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
1058	        } else {
1059	          value = val.original || value;
1060	          if (value.replace) {
1061	            value = value.replace(/^\.\//g, '').replace(/^\.$/g, '');
1062	          }
1063
1064	          this.opcode('pushId', val.type, value);
1065	        }
1066	      }
1067	      this.accept(val);
1068	    }
1069	  },
1070
1071	  setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
1072	    var params = sexpr.params;
1073	    this.pushParams(params);
1074
1075	    this.opcode('pushProgram', program);
1076	    this.opcode('pushProgram', inverse);
1077
1078	    if (sexpr.hash) {
1079	      this.accept(sexpr.hash);
1080	    } else {
1081	      this.opcode('emptyHash', omitEmpty);
1082	    }
1083
1084	    return params;
1085	  },
1086
1087	  blockParamIndex: function blockParamIndex(name) {
1088	    for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
1089	      var blockParams = this.options.blockParams[depth],
1090	          param = blockParams && _isArray$indexOf.indexOf(blockParams, name);
1091	      if (blockParams && param >= 0) {
1092	        return [depth, param];
1093	      }
1094	    }
1095	  }
1096	};
1097
1098	function precompile(input, options, env) {
1099	  if (input == null || typeof input !== 'string' && input.type !== 'Program') {
1100	    throw new _Exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
1101	  }
1102
1103	  options = options || {};
1104	  if (!('data' in options)) {
1105	    options.data = true;
1106	  }
1107	  if (options.compat) {
1108	    options.useDepths = true;
1109	  }
1110
1111	  var ast = env.parse(input, options),
1112	      environment = new env.Compiler().compile(ast, options);
1113	  return new env.JavaScriptCompiler().compile(environment, options);
1114	}
1115
1116	function compile(input, _x, env) {
1117	  var options = arguments[1] === undefined ? {} : arguments[1];
1118
1119	  if (input == null || typeof input !== 'string' && input.type !== 'Program') {
1120	    throw new _Exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
1121	  }
1122
1123	  if (!('data' in options)) {
1124	    options.data = true;
1125	  }
1126	  if (options.compat) {
1127	    options.useDepths = true;
1128	  }
1129
1130	  var compiled = undefined;
1131
1132	  function compileInput() {
1133	    var ast = env.parse(input, options),
1134	        environment = new env.Compiler().compile(ast, options),
1135	        templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
1136	    return env.template(templateSpec);
1137	  }
1138
1139	  // Template is only compiled on first use and cached after that point.
1140	  function ret(context, execOptions) {
1141	    if (!compiled) {
1142	      compiled = compileInput();
1143	    }
1144	    return compiled.call(this, context, execOptions);
1145	  }
1146	  ret._setup = function (setupOptions) {
1147	    if (!compiled) {
1148	      compiled = compileInput();
1149	    }
1150	    return compiled._setup(setupOptions);
1151	  };
1152	  ret._child = function (i, data, blockParams, depths) {
1153	    if (!compiled) {
1154	      compiled = compileInput();
1155	    }
1156	    return compiled._child(i, data, blockParams, depths);
1157	  };
1158	  return ret;
1159	}
1160
1161	function argEquals(a, b) {
vendor: 7,143 bytes, lines 1162-1389
1162	  if (a === b) {
1163	    return true;
1164	  }
1165
1166	  if (_isArray$indexOf.isArray(a) && _isArray$indexOf.isArray(b) && a.length === b.length) {
1167	    for (var i = 0; i < a.length; i++) {
1168	      if (!argEquals(a[i], b[i])) {
1169	        return false;
1170	      }
1171	    }
1172	    return true;
1173	  }
1174	}
1175
1176	function transformLiteralToPath(sexpr) {
1177	  if (!sexpr.path.parts) {
1178	    var literal = sexpr.path;
1179	    // Casting to string here to make false and 0 literal values play nicely with the rest
1180	    // of the system.
1181	    sexpr.path = new _AST2['default'].PathExpression(false, 0, [literal.original + ''], literal.original + '', literal.loc);
1182	  }
1183	}
1184
1185/***/ },
1186/* 5 */
1187/***/ function(module, exports, __webpack_require__) {
1188
1189	'use strict';
1190
1191	var _interopRequireDefault = __webpack_require__(8)['default'];
1192
1193	exports.__esModule = true;
1194
1195	var _COMPILER_REVISION$REVISION_CHANGES = __webpack_require__(10);
1196
1197	var _Exception = __webpack_require__(12);
1198
1199	var _Exception2 = _interopRequireDefault(_Exception);
1200
1201	var _isArray = __webpack_require__(13);
1202
1203	var _CodeGen = __webpack_require__(18);
1204
1205	var _CodeGen2 = _interopRequireDefault(_CodeGen);
1206
1207	function Literal(value) {
1208	  this.value = value;
1209	}
1210
1211	function JavaScriptCompiler() {}
1212
1213	JavaScriptCompiler.prototype = {
1214	  // PUBLIC API: You can override these methods in a subclass to provide
1215	  // alternative compiled forms for name lookup and buffering semantics
1216	  nameLookup: function nameLookup(parent, name /* , type*/) {
1217	    if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
1218	      return [parent, '.', name];
1219	    } else {
1220	      return [parent, '[\'', name, '\']'];
1221	    }
1222	  },
1223	  depthedLookup: function depthedLookup(name) {
1224	    return [this.aliasable('this.lookup'), '(depths, "', name, '")'];
1225	  },
1226
1227	  compilerInfo: function compilerInfo() {
1228	    var revision = _COMPILER_REVISION$REVISION_CHANGES.COMPILER_REVISION,
1229	        versions = _COMPILER_REVISION$REVISION_CHANGES.REVISION_CHANGES[revision];
1230	    return [revision, versions];
1231	  },
1232
1233	  appendToBuffer: function appendToBuffer(source, location, explicit) {
1234	    // Force a source as this simplifies the merge logic.
1235	    if (!_isArray.isArray(source)) {
1236	      source = [source];
1237	    }
1238	    source = this.source.wrap(source, location);
1239
1240	    if (this.environment.isSimple) {
1241	      return ['return ', source, ';'];
1242	    } else if (explicit) {
1243	      // This is a case where the buffer operation occurs as a child of another
1244	      // construct, generally braces. We have to explicitly output these buffer
1245	      // operations to ensure that the emitted code goes in the correct location.
1246	      return ['buffer += ', source, ';'];
1247	    } else {
1248	      source.appendToBuffer = true;
1249	      return source;
1250	    }
1251	  },
1252
1253	  initializeBuffer: function initializeBuffer() {
1254	    return this.quotedString('');
1255	  },
1256	  // END PUBLIC API
1257
1258	  compile: function compile(environment, options, context, asObject) {
1259	    this.environment = environment;
1260	    this.options = options;
1261	    this.stringParams = this.options.stringParams;
1262	    this.trackIds = this.options.trackIds;
1263	    this.precompile = !asObject;
1264
1265	    this.name = this.environment.name;
1266	    this.isChild = !!context;
1267	    this.context = context || {
1268	      programs: [],
1269	      environments: []
1270	    };
1271
1272	    this.preamble();
1273
1274	    this.stackSlot = 0;
1275	    this.stackVars = [];
1276	    this.aliases = {};
1277	    this.registers = { list: [] };
1278	    this.hashes = [];
1279	    this.compileStack = [];
1280	    this.inlineStack = [];
1281	    this.blockParams = [];
1282
1283	    this.compileChildren(environment, options);
1284
1285	    this.useDepths = this.useDepths || environment.useDepths || this.options.compat;
1286	    this.useBlockParams = this.useBlockParams || environment.useBlockParams;
1287
1288	    var opcodes = environment.opcodes,
1289	        opcode = undefined,
1290	        firstLoc = undefined,
1291	        i = undefined,
1292	        l = undefined;
1293
1294	    for (i = 0, l = opcodes.length; i < l; i++) {
1295	      opcode = opcodes[i];
1296
1297	      this.source.currentLocation = opcode.loc;
1298	      firstLoc = firstLoc || opcode.loc;
1299	      this[opcode.opcode].apply(this, opcode.args);
1300	    }
1301
1302	    // Flush any trailing content that might be pending.
1303	    this.source.currentLocation = firstLoc;
1304	    this.pushSource('');
1305
1306	    /* istanbul ignore next */
1307	    if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
1308	      throw new _Exception2['default']('Compile completed with content left on stack');
1309	    }
1310
1311	    var fn = this.createFunctionContext(asObject);
1312	    if (!this.isChild) {
1313	      var ret = {
1314	        compiler: this.compilerInfo(),
1315	        main: fn
1316	      };
1317	      var programs = this.context.programs;
1318	      for (i = 0, l = programs.length; i < l; i++) {
1319	        if (programs[i]) {
1320	          ret[i] = programs[i];
1321	        }
1322	      }
1323
1324	      if (this.environment.usePartial) {
1325	        ret.usePartial = true;
1326	      }
1327	      if (this.options.data) {
1328	        ret.useData = true;
1329	      }
1330	      if (this.useDepths) {
1331	        ret.useDepths = true;
1332	      }
1333	      if (this.useBlockParams) {
1334	        ret.useBlockParams = true;
1335	      }
1336	      if (this.options.compat) {
1337	        ret.compat = true;
1338	      }
1339
1340	      if (!asObject) {
1341	        ret.compiler = JSON.stringify(ret.compiler);
1342
1343	        this.source.currentLocation = { start: { line: 1, column: 0 } };
1344	        ret = this.objectLiteral(ret);
1345
1346	        if (options.srcName) {
1347	          ret = ret.toStringWithSourceMap({ file: options.destName });
1348	          ret.map = ret.map && ret.map.toString();
1349	        } else {
1350	          ret = ret.toString();
1351	        }
1352	      } else {
1353	        ret.compilerOptions = this.options;
1354	      }
1355
1356	      return ret;
1357	    } else {
1358	      return fn;
1359	    }
1360	  },
1361
1362	  preamble: function preamble() {
1363	    // track the last context pushed into place to allow skipping the
1364	    // getContext opcode when it would be a noop
1365	    this.lastContext = 0;
1366	    this.source = new _CodeGen2['default'](this.options.srcName);
1367	  },
1368
1369	  createFunctionContext: function createFunctionContext(asObject) {
1370	    var varDeclarations = '';
1371
1372	    var locals = this.stackVars.concat(this.registers.list);
1373	    if (locals.length > 0) {
1374	      varDeclarations += ', ' + locals.join(', ');
1375	    }
1376
1377	    // Generate minimizer alias mappings
1378	    //
1379	    // When using true SourceNodes, this will update all references to the given alias
1380	    // as the source nodes are reused in situ. For the non-source node compilation mode,
1381	    // aliases will not be used, but this case is already being run on the client and
1382	    // we aren't concern about minimizing the template size.
1383	    var aliasCount = 0;
1384	    for (var alias in this.aliases) {
1385	      // eslint-disable-line guard-for-in
1386	      var node = this.aliases[alias];
1387
1388	      if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) {
1389	        varDeclarations += ', alias' + ++aliasCount + '=' + alias;
vendor: 4,693 bytes, lines 1390-1539
1390	        node.children[0] = 'alias' + aliasCount;
1391	      }
1392	    }
1393
1394	    var params = ['depth0', 'helpers', 'partials', 'data'];
1395
1396	    if (this.useBlockParams || this.useDepths) {
1397	      params.push('blockParams');
1398	    }
1399	    if (this.useDepths) {
1400	      params.push('depths');
1401	    }
1402
1403	    // Perform a second pass over the output to merge content when possible
1404	    var source = this.mergeSource(varDeclarations);
1405
1406	    if (asObject) {
1407	      params.push(source);
1408
1409	      return Function.apply(this, params);
1410	    } else {
1411	      return this.source.wrap(['function(', params.join(','), ') {\n  ', source, '}']);
1412	    }
1413	  },
1414	  mergeSource: function mergeSource(varDeclarations) {
1415	    var isSimple = this.environment.isSimple,
1416	        appendOnly = !this.forceBuffer,
1417	        appendFirst = undefined,
1418	        sourceSeen = undefined,
1419	        bufferStart = undefined,
1420	        bufferEnd = undefined;
1421	    this.source.each(function (line) {
1422	      if (line.appendToBuffer) {
1423	        if (bufferStart) {
1424	          line.prepend('  + ');
1425	        } else {
1426	          bufferStart = line;
1427	        }
1428	        bufferEnd = line;
1429	      } else {
1430	        if (bufferStart) {
1431	          if (!sourceSeen) {
1432	            appendFirst = true;
1433	          } else {
1434	            bufferStart.prepend('buffer += ');
1435	          }
1436	          bufferEnd.add(';');
1437	          bufferStart = bufferEnd = undefined;
1438	        }
1439
1440	        sourceSeen = true;
1441	        if (!isSimple) {
1442	          appendOnly = false;
1443	        }
1444	      }
1445	    });
1446
1447	    if (appendOnly) {
1448	      if (bufferStart) {
1449	        bufferStart.prepend('return ');
1450	        bufferEnd.add(';');
1451	      } else if (!sourceSeen) {
1452	        this.source.push('return "";');
1453	      }
1454	    } else {
1455	      varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
1456
1457	      if (bufferStart) {
1458	        bufferStart.prepend('return buffer + ');
1459	        bufferEnd.add(';');
1460	      } else {
1461	        this.source.push('return buffer;');
1462	      }
1463	    }
1464
1465	    if (varDeclarations) {
1466	      this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
1467	    }
1468
1469	    return this.source.merge();
1470	  },
1471
1472	  // [blockValue]
1473	  //
1474	  // On stack, before: hash, inverse, program, value
1475	  // On stack, after: return value of blockHelperMissing
1476	  //
1477	  // The purpose of this opcode is to take a block of the form
1478	  // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and
1479	  // replace it on the stack with the result of properly
1480	  // invoking blockHelperMissing.
1481	  blockValue: function blockValue(name) {
1482	    var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
1483	        params = [this.contextName(0)];
1484	    this.setupHelperArgs(name, 0, params);
1485
1486	    var blockName = this.popStack();
1487	    params.splice(1, 0, blockName);
1488
1489	    this.push(this.source.functionCall(blockHelperMissing, 'call', params));
1490	  },
1491
1492	  // [ambiguousBlockValue]
1493	  //
1494	  // On stack, before: hash, inverse, program, value
1495	  // Compiler value, before: lastHelper=value of last found helper, if any
1496	  // On stack, after, if no lastHelper: same as [blockValue]
1497	  // On stack, after, if lastHelper: value
1498	  ambiguousBlockValue: function ambiguousBlockValue() {
1499	    // We're being a bit cheeky and reusing the options value from the prior exec
1500	    var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),
1501	        params = [this.contextName(0)];
1502	    this.setupHelperArgs('', 0, params, true);
1503
1504	    this.flushInline();
1505
1506	    var current = this.topStack();
1507	    params.splice(1, 0, current);
1508
1509	    this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
1510	  },
1511
1512	  // [appendContent]
1513	  //
1514	  // On stack, before: ...
1515	  // On stack, after: ...
1516	  //
1517	  // Appends the string value of `content` to the current buffer
1518	  appendContent: function appendContent(content) {
1519	    if (this.pendingContent) {
1520	      content = this.pendingContent + content;
1521	    } else {
1522	      this.pendingLocation = this.source.currentLocation;
1523	    }
1524
1525	    this.pendingContent = content;
1526	  },
1527
1528	  // [append]
1529	  //
1530	  // On stack, before: value, ...
1531	  // On stack, after: ...
1532	  //
1533	  // Coerces `value` to a String and appends it to the current buffer.
1534	  //
1535	  // If `value` is truthy, or 0, it is coerced into a string and appended
1536	  // Otherwise, the empty string is appended
1537	  append: function append() {
1538	    if (this.isInline()) {
1539	      this.replaceStack(function (current) {
vendor: 15,832 bytes, lines 1540-2045
1540	        return [' != null ? ', current, ' : ""'];
1541	      });
1542
1543	      this.pushSource(this.appendToBuffer(this.popStack()));
1544	    } else {
1545	      var local = this.popStack();
1546	      this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);
1547	      if (this.environment.isSimple) {
1548	        this.pushSource(['else { ', this.appendToBuffer('\'\'', undefined, true), ' }']);
1549	      }
1550	    }
1551	  },
1552
1553	  // [appendEscaped]
1554	  //
1555	  // On stack, before: value, ...
1556	  // On stack, after: ...
1557	  //
1558	  // Escape `value` and append it to the buffer
1559	  appendEscaped: function appendEscaped() {
1560	    this.pushSource(this.appendToBuffer([this.aliasable('this.escapeExpression'), '(', this.popStack(), ')']));
1561	  },
1562
1563	  // [getContext]
1564	  //
1565	  // On stack, before: ...
1566	  // On stack, after: ...
1567	  // Compiler value, after: lastContext=depth
1568	  //
1569	  // Set the value of the `lastContext` compiler value to the depth
1570	  getContext: function getContext(depth) {
1571	    this.lastContext = depth;
1572	  },
1573
1574	  // [pushContext]
1575	  //
1576	  // On stack, before: ...
1577	  // On stack, after: currentContext, ...
1578	  //
1579	  // Pushes the value of the current context onto the stack.
1580	  pushContext: function pushContext() {
1581	    this.pushStackLiteral(this.contextName(this.lastContext));
1582	  },
1583
1584	  // [lookupOnContext]
1585	  //
1586	  // On stack, before: ...
1587	  // On stack, after: currentContext[name], ...
1588	  //
1589	  // Looks up the value of `name` on the current context and pushes
1590	  // it onto the stack.
1591	  lookupOnContext: function lookupOnContext(parts, falsy, scoped) {
1592	    var i = 0;
1593
1594	    if (!scoped && this.options.compat && !this.lastContext) {
1595	      // The depthed query is expected to handle the undefined logic for the root level that
1596	      // is implemented below, so we evaluate that directly in compat mode
1597	      this.push(this.depthedLookup(parts[i++]));
1598	    } else {
1599	      this.pushContext();
1600	    }
1601
1602	    this.resolvePath('context', parts, i, falsy);
1603	  },
1604
1605	  // [lookupBlockParam]
1606	  //
1607	  // On stack, before: ...
1608	  // On stack, after: blockParam[name], ...
1609	  //
1610	  // Looks up the value of `parts` on the given block param and pushes
1611	  // it onto the stack.
1612	  lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
1613	    this.useBlockParams = true;
1614
1615	    this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
1616	    this.resolvePath('context', parts, 1);
1617	  },
1618
1619	  // [lookupData]
1620	  //
1621	  // On stack, before: ...
1622	  // On stack, after: data, ...
1623	  //
1624	  // Push the data lookup operator
1625	  lookupData: function lookupData(depth, parts) {
1626	    if (!depth) {
1627	      this.pushStackLiteral('data');
1628	    } else {
1629	      this.pushStackLiteral('this.data(data, ' + depth + ')');
1630	    }
1631
1632	    this.resolvePath('data', parts, 0, true);
1633	  },
1634
1635	  resolvePath: function resolvePath(type, parts, i, falsy) {
1636	    var _this = this;
1637
1638	    if (this.options.strict || this.options.assumeObjects) {
1639	      this.push(strictLookup(this.options.strict, this, parts, type));
1640	      return;
1641	    }
1642
1643	    var len = parts.length;
1644	    for (; i < len; i++) {
1645	      /*eslint-disable no-loop-func */
1646	      this.replaceStack(function (current) {
1647	        var lookup = _this.nameLookup(current, parts[i], type);
1648	        // We want to ensure that zero and false are handled properly if the context (falsy flag)
1649	        // needs to have the special handling for these values.
1650	        if (!falsy) {
1651	          return [' != null ? ', lookup, ' : ', current];
1652	        } else {
1653	          // Otherwise we can use generic falsy handling
1654	          return [' && ', lookup];
1655	        }
1656	      });
1657	      /*eslint-enable no-loop-func */
1658	    }
1659	  },
1660
1661	  // [resolvePossibleLambda]
1662	  //
1663	  // On stack, before: value, ...
1664	  // On stack, after: resolved value, ...
1665	  //
1666	  // If the `value` is a lambda, replace it on the stack by
1667	  // the return value of the lambda
1668	  resolvePossibleLambda: function resolvePossibleLambda() {
1669	    this.push([this.aliasable('this.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
1670	  },
1671
1672	  // [pushStringParam]
1673	  //
1674	  // On stack, before: ...
1675	  // On stack, after: string, currentContext, ...
1676	  //
1677	  // This opcode is designed for use in string mode, which
1678	  // provides the string value of a parameter along with its
1679	  // depth rather than resolving it immediately.
1680	  pushStringParam: function pushStringParam(string, type) {
1681	    this.pushContext();
1682	    this.pushString(type);
1683
1684	    // If it's a subexpression, the string result
1685	    // will be pushed after this opcode.
1686	    if (type !== 'SubExpression') {
1687	      if (typeof string === 'string') {
1688	        this.pushString(string);
1689	      } else {
1690	        this.pushStackLiteral(string);
1691	      }
1692	    }
1693	  },
1694
1695	  emptyHash: function emptyHash(omitEmpty) {
1696	    if (this.trackIds) {
1697	      this.push('{}'); // hashIds
1698	    }
1699	    if (this.stringParams) {
1700	      this.push('{}'); // hashContexts
1701	      this.push('{}'); // hashTypes
1702	    }
1703	    this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
1704	  },
1705	  pushHash: function pushHash() {
1706	    if (this.hash) {
1707	      this.hashes.push(this.hash);
1708	    }
1709	    this.hash = { values: [], types: [], contexts: [], ids: [] };
1710	  },
1711	  popHash: function popHash() {
1712	    var hash = this.hash;
1713	    this.hash = this.hashes.pop();
1714
1715	    if (this.trackIds) {
1716	      this.push(this.objectLiteral(hash.ids));
1717	    }
1718	    if (this.stringParams) {
1719	      this.push(this.objectLiteral(hash.contexts));
1720	      this.push(this.objectLiteral(hash.types));
1721	    }
1722
1723	    this.push(this.objectLiteral(hash.values));
1724	  },
1725
1726	  // [pushString]
1727	  //
1728	  // On stack, before: ...
1729	  // On stack, after: quotedString(string), ...
1730	  //
1731	  // Push a quoted version of `string` onto the stack
1732	  pushString: function pushString(string) {
1733	    this.pushStackLiteral(this.quotedString(string));
1734	  },
1735
1736	  // [pushLiteral]
1737	  //
1738	  // On stack, before: ...
1739	  // On stack, after: value, ...
1740	  //
1741	  // Pushes a value onto the stack. This operation prevents
1742	  // the compiler from creating a temporary variable to hold
1743	  // it.
1744	  pushLiteral: function pushLiteral(value) {
1745	    this.pushStackLiteral(value);
1746	  },
1747
1748	  // [pushProgram]
1749	  //
1750	  // On stack, before: ...
1751	  // On stack, after: program(guid), ...
1752	  //
1753	  // Push a program expression onto the stack. This takes
1754	  // a compile-time guid and converts it into a runtime-accessible
1755	  // expression.
1756	  pushProgram: function pushProgram(guid) {
1757	    if (guid != null) {
1758	      this.pushStackLiteral(this.programExpression(guid));
1759	    } else {
1760	      this.pushStackLiteral(null);
1761	    }
1762	  },
1763
1764	  // [invokeHelper]
1765	  //
1766	  // On stack, before: hash, inverse, program, params..., ...
1767	  // On stack, after: result of helper invocation
1768	  //
1769	  // Pops off the helper's parameters, invokes the helper,
1770	  // and pushes the helper's return value onto the stack.
1771	  //
1772	  // If the helper is not found, `helperMissing` is called.
1773	  invokeHelper: function invokeHelper(paramSize, name, isSimple) {
1774	    var nonHelper = this.popStack(),
1775	        helper = this.setupHelper(paramSize, name),
1776	        simple = isSimple ? [helper.name, ' || '] : '';
1777
1778	    var lookup = ['('].concat(simple, nonHelper);
1779	    if (!this.options.strict) {
1780	      lookup.push(' || ', this.aliasable('helpers.helperMissing'));
1781	    }
1782	    lookup.push(')');
1783
1784	    this.push(this.source.functionCall(lookup, 'call', helper.callParams));
1785	  },
1786
1787	  // [invokeKnownHelper]
1788	  //
1789	  // On stack, before: hash, inverse, program, params..., ...
1790	  // On stack, after: result of helper invocation
1791	  //
1792	  // This operation is used when the helper is known to exist,
1793	  // so a `helperMissing` fallback is not required.
1794	  invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
1795	    var helper = this.setupHelper(paramSize, name);
1796	    this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
1797	  },
1798
1799	  // [invokeAmbiguous]
1800	  //
1801	  // On stack, before: hash, inverse, program, params..., ...
1802	  // On stack, after: result of disambiguation
1803	  //
1804	  // This operation is used when an expression like `{{foo}}`
1805	  // is provided, but we don't know at compile-time whether it
1806	  // is a helper or a path.
1807	  //
1808	  // This operation emits more code than the other options,
1809	  // and can be avoided by passing the `knownHelpers` and
1810	  // `knownHelpersOnly` flags at compile-time.
1811	  invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
1812	    this.useRegister('helper');
1813
1814	    var nonHelper = this.popStack();
1815
1816	    this.emptyHash();
1817	    var helper = this.setupHelper(0, name, helperCall);
1818
1819	    var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
1820
1821	    var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
1822	    if (!this.options.strict) {
1823	      lookup[0] = '(helper = ';
1824	      lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing'));
1825	    }
1826
1827	    this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);
1828	  },
1829
1830	  // [invokePartial]
1831	  //
1832	  // On stack, before: context, ...
1833	  // On stack after: result of partial invocation
1834	  //
1835	  // This operation pops off a context, invokes a partial with that context,
1836	  // and pushes the result of the invocation back.
1837	  invokePartial: function invokePartial(isDynamic, name, indent) {
1838	    var params = [],
1839	        options = this.setupParams(name, 1, params, false);
1840
1841	    if (isDynamic) {
1842	      name = this.popStack();
1843	      delete options.name;
1844	    }
1845
1846	    if (indent) {
1847	      options.indent = JSON.stringify(indent);
1848	    }
1849	    options.helpers = 'helpers';
1850	    options.partials = 'partials';
1851
1852	    if (!isDynamic) {
1853	      params.unshift(this.nameLookup('partials', name, 'partial'));
1854	    } else {
1855	      params.unshift(name);
1856	    }
1857
1858	    if (this.options.compat) {
1859	      options.depths = 'depths';
1860	    }
1861	    options = this.objectLiteral(options);
1862	    params.push(options);
1863
1864	    this.push(this.source.functionCall('this.invokePartial', '', params));
1865	  },
1866
1867	  // [assignToHash]
1868	  //
1869	  // On stack, before: value, ..., hash, ...
1870	  // On stack, after: ..., hash, ...
1871	  //
1872	  // Pops a value off the stack and assigns it to the current hash
1873	  assignToHash: function assignToHash(key) {
1874	    var value = this.popStack(),
1875	        context = undefined,
1876	        type = undefined,
1877	        id = undefined;
1878
1879	    if (this.trackIds) {
1880	      id = this.popStack();
1881	    }
1882	    if (this.stringParams) {
1883	      type = this.popStack();
1884	      context = this.popStack();
1885	    }
1886
1887	    var hash = this.hash;
1888	    if (context) {
1889	      hash.contexts[key] = context;
1890	    }
1891	    if (type) {
1892	      hash.types[key] = type;
1893	    }
1894	    if (id) {
1895	      hash.ids[key] = id;
1896	    }
1897	    hash.values[key] = value;
1898	  },
1899
1900	  pushId: function pushId(type, name, child) {
1901	    if (type === 'BlockParam') {
1902	      this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));
1903	    } else if (type === 'PathExpression') {
1904	      this.pushString(name);
1905	    } else if (type === 'SubExpression') {
1906	      this.pushStackLiteral('true');
1907	    } else {
1908	      this.pushStackLiteral('null');
1909	    }
1910	  },
1911
1912	  // HELPERS
1913
1914	  compiler: JavaScriptCompiler,
1915
1916	  compileChildren: function compileChildren(environment, options) {
1917	    var children = environment.children,
1918	        child = undefined,
1919	        compiler = undefined;
1920
1921	    for (var i = 0, l = children.length; i < l; i++) {
1922	      child = children[i];
1923	      compiler = new this.compiler(); // eslint-disable-line new-cap
1924
1925	      var index = this.matchExistingProgram(child);
1926
1927	      if (index == null) {
1928	        this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
1929	        index = this.context.programs.length;
1930	        child.index = index;
1931	        child.name = 'program' + index;
1932	        this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
1933	        this.context.environments[index] = child;
1934
1935	        this.useDepths = this.useDepths || compiler.useDepths;
1936	        this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
1937	      } else {
1938	        child.index = index;
1939	        child.name = 'program' + index;
1940
1941	        this.useDepths = this.useDepths || child.useDepths;
1942	        this.useBlockParams = this.useBlockParams || child.useBlockParams;
1943	      }
1944	    }
1945	  },
1946	  matchExistingProgram: function matchExistingProgram(child) {
1947	    for (var i = 0, len = this.context.environments.length; i < len; i++) {
1948	      var environment = this.context.environments[i];
1949	      if (environment && environment.equals(child)) {
1950	        return i;
1951	      }
1952	    }
1953	  },
1954
1955	  programExpression: function programExpression(guid) {
1956	    var child = this.environment.children[guid],
1957	        programParams = [child.index, 'data', child.blockParams];
1958
1959	    if (this.useBlockParams || this.useDepths) {
1960	      programParams.push('blockParams');
1961	    }
1962	    if (this.useDepths) {
1963	      programParams.push('depths');
1964	    }
1965
1966	    return 'this.program(' + programParams.join(', ') + ')';
1967	  },
1968
1969	  useRegister: function useRegister(name) {
1970	    if (!this.registers[name]) {
1971	      this.registers[name] = true;
1972	      this.registers.list.push(name);
1973	    }
1974	  },
1975
1976	  push: function push(expr) {
1977	    if (!(expr instanceof Literal)) {
1978	      expr = this.source.wrap(expr);
1979	    }
1980
1981	    this.inlineStack.push(expr);
1982	    return expr;
1983	  },
1984
1985	  pushStackLiteral: function pushStackLiteral(item) {
1986	    this.push(new Literal(item));
1987	  },
1988
1989	  pushSource: function pushSource(source) {
1990	    if (this.pendingContent) {
1991	      this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
1992	      this.pendingContent = undefined;
1993	    }
1994
1995	    if (source) {
1996	      this.source.push(source);
1997	    }
1998	  },
1999
2000	  replaceStack: function replaceStack(callback) {
2001	    var prefix = ['('],
2002	        stack = undefined,
2003	        createdStack = undefined,
2004	        usedLiteral = undefined;
2005
2006	    /* istanbul ignore next */
2007	    if (!this.isInline()) {
2008	      throw new _Exception2['default']('replaceStack on non-inline');
2009	    }
2010
2011	    // We want to merge the inline statement into the replacement statement via ','
2012	    var top = this.popStack(true);
2013
2014	    if (top instanceof Literal) {
2015	      // Literals do not need to be inlined
2016	      stack = [top.value];
2017	      prefix = ['(', stack];
2018	      usedLiteral = true;
2019	    } else {
2020	      // Get or create the current stack name for use by the inline
2021	      createdStack = true;
2022	      var _name = this.incrStack();
2023
2024	      prefix = ['((', this.push(_name), ' = ', top, ')'];
2025	      stack = this.topStack();
2026	    }
2027
2028	    var item = callback.call(this, stack);
2029
2030	    if (!usedLiteral) {
2031	      this.popStack();
2032	    }
2033	    if (createdStack) {
2034	      this.stackSlot--;
2035	    }
2036	    this.push(prefix.concat(item, ')'));
2037	  },
2038
2039	  incrStack: function incrStack() {
2040	    this.stackSlot++;
2041	    if (this.stackSlot > this.stackVars.length) {
2042	      this.stackVars.push('stack' + this.stackSlot);
2043	    }
2044	    return this.topStackName();
2045	  },
vendor: 5,478 bytes, lines 2046-2225
2046	  topStackName: function topStackName() {
2047	    return 'stack' + this.stackSlot;
2048	  },
2049	  flushInline: function flushInline() {
2050	    var inlineStack = this.inlineStack;
2051	    this.inlineStack = [];
2052	    for (var i = 0, len = inlineStack.length; i < len; i++) {
2053	      var entry = inlineStack[i];
2054	      /* istanbul ignore if */
2055	      if (entry instanceof Literal) {
2056	        this.compileStack.push(entry);
2057	      } else {
2058	        var stack = this.incrStack();
2059	        this.pushSource([stack, ' = ', entry, ';']);
2060	        this.compileStack.push(stack);
2061	      }
2062	    }
2063	  },
2064	  isInline: function isInline() {
2065	    return this.inlineStack.length;
2066	  },
2067
2068	  popStack: function popStack(wrapped) {
2069	    var inline = this.isInline(),
2070	        item = (inline ? this.inlineStack : this.compileStack).pop();
2071
2072	    if (!wrapped && item instanceof Literal) {
2073	      return item.value;
2074	    } else {
2075	      if (!inline) {
2076	        /* istanbul ignore next */
2077	        if (!this.stackSlot) {
2078	          throw new _Exception2['default']('Invalid stack pop');
2079	        }
2080	        this.stackSlot--;
2081	      }
2082	      return item;
2083	    }
2084	  },
2085
2086	  topStack: function topStack() {
2087	    var stack = this.isInline() ? this.inlineStack : this.compileStack,
2088	        item = stack[stack.length - 1];
2089
2090	    /* istanbul ignore if */
2091	    if (item instanceof Literal) {
2092	      return item.value;
2093	    } else {
2094	      return item;
2095	    }
2096	  },
2097
2098	  contextName: function contextName(context) {
2099	    if (this.useDepths && context) {
2100	      return 'depths[' + context + ']';
2101	    } else {
2102	      return 'depth' + context;
2103	    }
2104	  },
2105
2106	  quotedString: function quotedString(str) {
2107	    return this.source.quotedString(str);
2108	  },
2109
2110	  objectLiteral: function objectLiteral(obj) {
2111	    return this.source.objectLiteral(obj);
2112	  },
2113
2114	  aliasable: function aliasable(name) {
2115	    var ret = this.aliases[name];
2116	    if (ret) {
2117	      ret.referenceCount++;
2118	      return ret;
2119	    }
2120
2121	    ret = this.aliases[name] = this.source.wrap(name);
2122	    ret.aliasable = true;
2123	    ret.referenceCount = 1;
2124
2125	    return ret;
2126	  },
2127
2128	  setupHelper: function setupHelper(paramSize, name, blockHelper) {
2129	    var params = [],
2130	        paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
2131	    var foundHelper = this.nameLookup('helpers', name, 'helper');
2132
2133	    return {
2134	      params: params,
2135	      paramsInit: paramsInit,
2136	      name: foundHelper,
2137	      callParams: [this.contextName(0)].concat(params)
2138	    };
2139	  },
2140
2141	  setupParams: function setupParams(helper, paramSize, params) {
2142	    var options = {},
2143	        contexts = [],
2144	        types = [],
2145	        ids = [],
2146	        param = undefined;
2147
2148	    options.name = this.quotedString(helper);
2149	    options.hash = this.popStack();
2150
2151	    if (this.trackIds) {
2152	      options.hashIds = this.popStack();
2153	    }
2154	    if (this.stringParams) {
2155	      options.hashTypes = this.popStack();
2156	      options.hashContexts = this.popStack();
2157	    }
2158
2159	    var inverse = this.popStack(),
2160	        program = this.popStack();
2161
2162	    // Avoid setting fn and inverse if neither are set. This allows
2163	    // helpers to do a check for `if (options.fn)`
2164	    if (program || inverse) {
2165	      options.fn = program || 'this.noop';
2166	      options.inverse = inverse || 'this.noop';
2167	    }
2168
2169	    // The parameters go on to the stack in order (making sure that they are evaluated in order)
2170	    // so we need to pop them off the stack in reverse order
2171	    var i = paramSize;
2172	    while (i--) {
2173	      param = this.popStack();
2174	      params[i] = param;
2175
2176	      if (this.trackIds) {
2177	        ids[i] = this.popStack();
2178	      }
2179	      if (this.stringParams) {
2180	        types[i] = this.popStack();
2181	        contexts[i] = this.popStack();
2182	      }
2183	    }
2184
2185	    if (this.trackIds) {
2186	      options.ids = this.source.generateArray(ids);
2187	    }
2188	    if (this.stringParams) {
2189	      options.types = this.source.generateArray(types);
2190	      options.contexts = this.source.generateArray(contexts);
2191	    }
2192
2193	    if (this.options.data) {
2194	      options.data = 'data';
2195	    }
2196	    if (this.useBlockParams) {
2197	      options.blockParams = 'blockParams';
2198	    }
2199	    return options;
2200	  },
2201
2202	  setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
2203	    var options = this.setupParams(helper, paramSize, params, true);
2204	    options = this.objectLiteral(options);
2205	    if (useRegister) {
2206	      this.useRegister('options');
2207	      params.push('options');
2208	      return ['options=', options];
2209	    } else {
2210	      params.push(options);
2211	      return '';
2212	    }
2213	  }
2214	};
2215
2216	(function () {
2217	  var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
2218
2219	  var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
2220
2221	  for (var i = 0, l = reservedWords.length; i < l; i++) {
2222	    compilerWords[reservedWords[i]] = true;
2223	  }
2224	})();
2225
vendor: 13,283 bytes, lines 2226-2700
2226	JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
2227	  return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
2228	};
2229
2230	function strictLookup(requireTerminal, compiler, parts, type) {
2231	  var stack = compiler.popStack(),
2232	      i = 0,
2233	      len = parts.length;
2234	  if (requireTerminal) {
2235	    len--;
2236	  }
2237
2238	  for (; i < len; i++) {
2239	    stack = compiler.nameLookup(stack, parts[i], type);
2240	  }
2241
2242	  if (requireTerminal) {
2243	    return [compiler.aliasable('this.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')'];
2244	  } else {
2245	    return stack;
2246	  }
2247	}
2248
2249	exports['default'] = JavaScriptCompiler;
2250	module.exports = exports['default'];
2251
2252/***/ },
2253/* 6 */
2254/***/ function(module, exports, __webpack_require__) {
2255
2256	'use strict';
2257
2258	var _interopRequireDefault = __webpack_require__(8)['default'];
2259
2260	exports.__esModule = true;
2261
2262	var _Exception = __webpack_require__(12);
2263
2264	var _Exception2 = _interopRequireDefault(_Exception);
2265
2266	var _AST = __webpack_require__(2);
2267
2268	var _AST2 = _interopRequireDefault(_AST);
2269
2270	function Visitor() {
2271	  this.parents = [];
2272	}
2273
2274	Visitor.prototype = {
2275	  constructor: Visitor,
2276	  mutating: false,
2277
2278	  // Visits a given value. If mutating, will replace the value if necessary.
2279	  acceptKey: function acceptKey(node, name) {
2280	    var value = this.accept(node[name]);
2281	    if (this.mutating) {
2282	      // Hacky sanity check:
2283	      if (value && (!value.type || !_AST2['default'][value.type])) {
2284	        throw new _Exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
2285	      }
2286	      node[name] = value;
2287	    }
2288	  },
2289
2290	  // Performs an accept operation with added sanity check to ensure
2291	  // required keys are not removed.
2292	  acceptRequired: function acceptRequired(node, name) {
2293	    this.acceptKey(node, name);
2294
2295	    if (!node[name]) {
2296	      throw new _Exception2['default'](node.type + ' requires ' + name);
2297	    }
2298	  },
2299
2300	  // Traverses a given array. If mutating, empty respnses will be removed
2301	  // for child elements.
2302	  acceptArray: function acceptArray(array) {
2303	    for (var i = 0, l = array.length; i < l; i++) {
2304	      this.acceptKey(array, i);
2305
2306	      if (!array[i]) {
2307	        array.splice(i, 1);
2308	        i--;
2309	        l--;
2310	      }
2311	    }
2312	  },
2313
2314	  accept: function accept(object) {
2315	    if (!object) {
2316	      return;
2317	    }
2318
2319	    if (this.current) {
2320	      this.parents.unshift(this.current);
2321	    }
2322	    this.current = object;
2323
2324	    var ret = this[object.type](object);
2325
2326	    this.current = this.parents.shift();
2327
2328	    if (!this.mutating || ret) {
2329	      return ret;
2330	    } else if (ret !== false) {
2331	      return object;
2332	    }
2333	  },
2334
2335	  Program: function Program(program) {
2336	    this.acceptArray(program.body);
2337	  },
2338
2339	  MustacheStatement: function MustacheStatement(mustache) {
2340	    this.acceptRequired(mustache, 'path');
2341	    this.acceptArray(mustache.params);
2342	    this.acceptKey(mustache, 'hash');
2343	  },
2344
2345	  BlockStatement: function BlockStatement(block) {
2346	    this.acceptRequired(block, 'path');
2347	    this.acceptArray(block.params);
2348	    this.acceptKey(block, 'hash');
2349
2350	    this.acceptKey(block, 'program');
2351	    this.acceptKey(block, 'inverse');
2352	  },
2353
2354	  PartialStatement: function PartialStatement(partial) {
2355	    this.acceptRequired(partial, 'name');
2356	    this.acceptArray(partial.params);
2357	    this.acceptKey(partial, 'hash');
2358	  },
2359
2360	  ContentStatement: function ContentStatement() {},
2361	  CommentStatement: function CommentStatement() {},
2362
2363	  SubExpression: function SubExpression(sexpr) {
2364	    this.acceptRequired(sexpr, 'path');
2365	    this.acceptArray(sexpr.params);
2366	    this.acceptKey(sexpr, 'hash');
2367	  },
2368
2369	  PathExpression: function PathExpression() {},
2370
2371	  StringLiteral: function StringLiteral() {},
2372	  NumberLiteral: function NumberLiteral() {},
2373	  BooleanLiteral: function BooleanLiteral() {},
2374	  UndefinedLiteral: function UndefinedLiteral() {},
2375	  NullLiteral: function NullLiteral() {},
2376
2377	  Hash: function Hash(hash) {
2378	    this.acceptArray(hash.pairs);
2379	  },
2380	  HashPair: function HashPair(pair) {
2381	    this.acceptRequired(pair, 'value');
2382	  }
2383	};
2384
2385	exports['default'] = Visitor;
2386	module.exports = exports['default'];
2387	/* content */ /* comment */ /* path */ /* string */ /* number */ /* bool */ /* literal */ /* literal */
2388
2389/***/ },
2390/* 7 */
2391/***/ function(module, exports, __webpack_require__) {
2392
2393	/* WEBPACK VAR INJECTION */(function(global) {'use strict';
2394
2395	exports.__esModule = true;
2396	/*global window */
2397
2398	exports['default'] = function (Handlebars) {
2399	  /* istanbul ignore next */
2400	  var root = typeof global !== 'undefined' ? global : window,
2401	      $Handlebars = root.Handlebars;
2402	  /* istanbul ignore next */
2403	  Handlebars.noConflict = function () {
2404	    if (root.Handlebars === Handlebars) {
2405	      root.Handlebars = $Handlebars;
2406	    }
2407	  };
2408	};
2409
2410	module.exports = exports['default'];
2411	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
2412
2413/***/ },
2414/* 8 */
2415/***/ function(module, exports, __webpack_require__) {
2416
2417	"use strict";
2418
2419	exports["default"] = function (obj) {
2420	  return obj && obj.__esModule ? obj : {
2421	    "default": obj
2422	  };
2423	};
2424
2425	exports.__esModule = true;
2426
2427/***/ },
2428/* 9 */
2429/***/ function(module, exports, __webpack_require__) {
2430
2431	"use strict";
2432
2433	exports["default"] = function (obj) {
2434	  if (obj && obj.__esModule) {
2435	    return obj;
2436	  } else {
2437	    var newObj = {};
2438
2439	    if (typeof obj === "object" && obj !== null) {
2440	      for (var key in obj) {
2441	        if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
2442	      }
2443	    }
2444
2445	    newObj["default"] = obj;
2446	    return newObj;
2447	  }
2448	};
2449
2450	exports.__esModule = true;
2451
2452/***/ },
2453/* 10 */
2454/***/ function(module, exports, __webpack_require__) {
2455
2456	'use strict';
2457
2458	var _interopRequireWildcard = __webpack_require__(9)['default'];
2459
2460	var _interopRequireDefault = __webpack_require__(8)['default'];
2461
2462	exports.__esModule = true;
2463	exports.HandlebarsEnvironment = HandlebarsEnvironment;
2464	exports.createFrame = createFrame;
2465
2466	var _import = __webpack_require__(13);
2467
2468	var Utils = _interopRequireWildcard(_import);
2469
2470	var _Exception = __webpack_require__(12);
2471
2472	var _Exception2 = _interopRequireDefault(_Exception);
2473
2474	var VERSION = '3.0.1';
2475	exports.VERSION = VERSION;
2476	var COMPILER_REVISION = 6;
2477
2478	exports.COMPILER_REVISION = COMPILER_REVISION;
2479	var REVISION_CHANGES = {
2480	  1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
2481	  2: '== 1.0.0-rc.3',
2482	  3: '== 1.0.0-rc.4',
2483	  4: '== 1.x.x',
2484	  5: '== 2.0.0-alpha.x',
2485	  6: '>= 2.0.0-beta.1'
2486	};
2487
2488	exports.REVISION_CHANGES = REVISION_CHANGES;
2489	var isArray = Utils.isArray,
2490	    isFunction = Utils.isFunction,
2491	    toString = Utils.toString,
2492	    objectType = '[object Object]';
2493
2494	function HandlebarsEnvironment(helpers, partials) {
2495	  this.helpers = helpers || {};
2496	  this.partials = partials || {};
2497
2498	  registerDefaultHelpers(this);
2499	}
2500
2501	HandlebarsEnvironment.prototype = {
2502	  constructor: HandlebarsEnvironment,
2503
2504	  logger: logger,
2505	  log: log,
2506
2507	  registerHelper: function registerHelper(name, fn) {
2508	    if (toString.call(name) === objectType) {
2509	      if (fn) {
2510	        throw new _Exception2['default']('Arg not supported with multiple helpers');
2511	      }
2512	      Utils.extend(this.helpers, name);
2513	    } else {
2514	      this.helpers[name] = fn;
2515	    }
2516	  },
2517	  unregisterHelper: function unregisterHelper(name) {
2518	    delete this.helpers[name];
2519	  },
2520
2521	  registerPartial: function registerPartial(name, partial) {
2522	    if (toString.call(name) === objectType) {
2523	      Utils.extend(this.partials, name);
2524	    } else {
2525	      if (typeof partial === 'undefined') {
2526	        throw new _Exception2['default']('Attempting to register a partial as undefined');
2527	      }
2528	      this.partials[name] = partial;
2529	    }
2530	  },
2531	  unregisterPartial: function unregisterPartial(name) {
2532	    delete this.partials[name];
2533	  }
2534	};
2535
2536	function registerDefaultHelpers(instance) {
2537	  instance.registerHelper('helperMissing', function () {
2538	    if (arguments.length === 1) {
2539	      // A missing field in a {{foo}} constuct.
2540	      return undefined;
2541	    } else {
2542	      // Someone is actually trying to call something, blow up.
2543	      throw new _Exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
2544	    }
2545	  });
2546
2547	  instance.registerHelper('blockHelperMissing', function (context, options) {
2548	    var inverse = options.inverse,
2549	        fn = options.fn;
2550
2551	    if (context === true) {
2552	      return fn(this);
2553	    } else if (context === false || context == null) {
2554	      return inverse(this);
2555	    } else if (isArray(context)) {
2556	      if (context.length > 0) {
2557	        if (options.ids) {
2558	          options.ids = [options.name];
2559	        }
2560
2561	        return instance.helpers.each(context, options);
2562	      } else {
2563	        return inverse(this);
2564	      }
2565	    } else {
2566	      if (options.data && options.ids) {
2567	        var data = createFrame(options.data);
2568	        data.contextPath = Utils.appendContextPath(options.data.contextPath, options.name);
2569	        options = { data: data };
2570	      }
2571
2572	      return fn(context, options);
2573	    }
2574	  });
2575
2576	  instance.registerHelper('each', function (context, options) {
2577	    if (!options) {
2578	      throw new _Exception2['default']('Must pass iterator to #each');
2579	    }
2580
2581	    var fn = options.fn,
2582	        inverse = options.inverse,
2583	        i = 0,
2584	        ret = '',
2585	        data = undefined,
2586	        contextPath = undefined;
2587
2588	    if (options.data && options.ids) {
2589	      contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
2590	    }
2591
2592	    if (isFunction(context)) {
2593	      context = context.call(this);
2594	    }
2595
2596	    if (options.data) {
2597	      data = createFrame(options.data);
2598	    }
2599
2600	    function execIteration(field, index, last) {
2601	      if (data) {
2602	        data.key = field;
2603	        data.index = index;
2604	        data.first = index === 0;
2605	        data.last = !!last;
2606
2607	        if (contextPath) {
2608	          data.contextPath = contextPath + field;
2609	        }
2610	      }
2611
2612	      ret = ret + fn(context[field], {
2613	        data: data,
2614	        blockParams: Utils.blockParams([context[field], field], [contextPath + field, null])
2615	      });
2616	    }
2617
2618	    if (context && typeof context === 'object') {
2619	      if (isArray(context)) {
2620	        for (var j = context.length; i < j; i++) {
2621	          execIteration(i, i, i === context.length - 1);
2622	        }
2623	      } else {
2624	        var priorKey = undefined;
2625
2626	        for (var key in context) {
2627	          if (context.hasOwnProperty(key)) {
2628	            // We're running the iterations one step out of sync so we can detect
2629	            // the last iteration without have to scan the object twice and create
2630	            // an itermediate keys array.
2631	            if (priorKey) {
2632	              execIteration(priorKey, i - 1);
2633	            }
2634	            priorKey = key;
2635	            i++;
2636	          }
2637	        }
2638	        if (priorKey) {
2639	          execIteration(priorKey, i - 1, true);
2640	        }
2641	      }
2642	    }
2643
2644	    if (i === 0) {
2645	      ret = inverse(this);
2646	    }
2647
2648	    return ret;
2649	  });
2650
2651	  instance.registerHelper('if', function (conditional, options) {
2652	    if (isFunction(conditional)) {
2653	      conditional = conditional.call(this);
2654	    }
2655
2656	    // Default behavior is to render the positive path if the value is truthy and not empty.
2657	    // The `includeZero` option may be set to treat the condtional as purely not empty based on the
2658	    // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
2659	    if (!options.hash.includeZero && !conditional || Utils.isEmpty(conditional)) {
2660	      return options.inverse(this);
2661	    } else {
2662	      return options.fn(this);
2663	    }
2664	  });
2665
2666	  instance.registerHelper('unless', function (conditional, options) {
2667	    return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
2668	  });
2669
2670	  instance.registerHelper('with', function (context, options) {
2671	    if (isFunction(context)) {
2672	      context = context.call(this);
2673	    }
2674
2675	    var fn = options.fn;
2676
2677	    if (!Utils.isEmpty(context)) {
2678	      if (options.data && options.ids) {
2679	        var data = createFrame(options.data);
2680	        data.contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]);
2681	        options = { data: data };
2682	      }
2683
2684	      return fn(context, options);
2685	    } else {
2686	      return options.inverse(this);
2687	    }
2688	  });
2689
2690	  instance.registerHelper('log', function (message, options) {
2691	    var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
2692	    instance.log(level, message);
2693	  });
2694
2695	  instance.registerHelper('lookup', function (obj, field) {
2696	    return obj && obj[field];
2697	  });
2698	}
2699
2700	var logger = {
2701	  methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' },
2702
2703	  // State enum
2704	  DEBUG: 0,
2705	  INFO: 1,
2706	  WARN: 2,
2707	  ERROR: 3,
2708	  level: 1,
2709
2710	  // Can be overridden in the host environment
2711	  log: function log(level, message) {
2712	    if (typeof console !== 'undefined' && logger.level <= level) {
2713	      var method = logger.methodMap[level];
2714	      (console[method] || console.log).call(console, message); // eslint-disable-line no-console
2715	    }
2716	  }
2717	};
2718
2719	exports.logger = logger;
2720	var log = logger.log;
2721
2722	exports.log = log;
2723
2724	function createFrame(object) {
2725	  var frame = Utils.extend({}, object);
2726	  frame._parent = object;
2727	  return frame;
2728	}
2729
2730	/* [args, ]options */
2731
2732/***/ },
2733/* 11 */
2734/***/ function(module, exports, __webpack_require__) {
2735
2736	'use strict';
2737
2738	exports.__esModule = true;
2739	// Build out our basic SafeString type
2740	function SafeString(string) {
2741	  this.string = string;
2742	}
2743
2744	SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
2745	  return '' + this.string;
2746	};
2747
2748	exports['default'] = SafeString;
2749	module.exports = exports['default'];
2750
2751/***/ },
2752/* 12 */
2753/***/ function(module, exports, __webpack_require__) {
2754
2755	'use strict';
2756
2757	exports.__esModule = true;
2758
2759	var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
2760
2761	function Exception(message, node) {
2762	  var loc = node && node.loc,
2763	      line = undefined,
2764	      column = undefined;
2765	  if (loc) {
2766	    line = loc.start.line;
2767	    column = loc.start.column;
2768
2769	    message += ' - ' + line + ':' + column;
2770	  }
2771
2772	  var tmp = Error.prototype.constructor.call(this, message);
2773
2774	  // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
2775	  for (var idx = 0; idx < errorProps.length; idx++) {
2776	    this[errorProps[idx]] = tmp[errorProps[idx]];
2777	  }
2778
2779	  if (Error.captureStackTrace) {
2780	    Error.captureStackTrace(this, Exception);
2781	  }
2782
2783	  if (loc) {
2784	    this.lineNumber = line;
2785	    this.column = column;
2786	  }
2787	}
2788
2789	Exception.prototype = new Error();
2790
2791	exports['default'] = Exception;
2792	module.exports = exports['default'];
2793
2794/***/ },
2795/* 13 */
2796/***/ function(module, exports, __webpack_require__) {
2797
2798	'use strict';
2799
2800	exports.__esModule = true;
2801	exports.extend = extend;
2802
2803	// Older IE versions do not directly support indexOf so we must implement our own, sadly.
2804	exports.indexOf = indexOf;
2805	exports.escapeExpression = escapeExpression;
2806	exports.isEmpty = isEmpty;
2807	exports.blockParams = blockParams;
vendor: 4,250 bytes, lines 2808-2952
2808	exports.appendContextPath = appendContextPath;
2809	var escape = {
2810	  '&': '&amp;',
2811	  '<': '&lt;',
2812	  '>': '&gt;',
2813	  '"': '&quot;',
2814	  '\'': '&#x27;',
2815	  '`': '&#x60;'
2816	};
2817
2818	var badChars = /[&<>"'`]/g,
2819	    possible = /[&<>"'`]/;
2820
2821	function escapeChar(chr) {
2822	  return escape[chr];
2823	}
2824
2825	function extend(obj /* , ...source */) {
2826	  for (var i = 1; i < arguments.length; i++) {
2827	    for (var key in arguments[i]) {
2828	      if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
2829	        obj[key] = arguments[i][key];
2830	      }
2831	    }
2832	  }
2833
2834	  return obj;
2835	}
2836
2837	var toString = Object.prototype.toString;
2838
2839	exports.toString = toString;
2840	// Sourced from lodash
2841	// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
2842	/*eslint-disable func-style, no-var */
2843	var isFunction = function isFunction(value) {
2844	  return typeof value === 'function';
2845	};
2846	// fallback for older versions of Chrome and Safari
2847	/* istanbul ignore next */
2848	if (isFunction(/x/)) {
2849	  exports.isFunction = isFunction = function (value) {
2850	    return typeof value === 'function' && toString.call(value) === '[object Function]';
2851	  };
2852	}
2853	var isFunction;
2854	exports.isFunction = isFunction;
2855	/*eslint-enable func-style, no-var */
2856
2857	/* istanbul ignore next */
2858	var isArray = Array.isArray || function (value) {
2859	  return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
2860	};exports.isArray = isArray;
2861
2862	function indexOf(array, value) {
2863	  for (var i = 0, len = array.length; i < len; i++) {
2864	    if (array[i] === value) {
2865	      return i;
2866	    }
2867	  }
2868	  return -1;
2869	}
2870
2871	function escapeExpression(string) {
2872	  if (typeof string !== 'string') {
2873	    // don't escape SafeStrings, since they're already safe
2874	    if (string && string.toHTML) {
2875	      return string.toHTML();
2876	    } else if (string == null) {
2877	      return '';
2878	    } else if (!string) {
2879	      return string + '';
2880	    }
2881
2882	    // Force a string conversion as this will be done by the append regardless and
2883	    // the regex test will do this transparently behind the scenes, causing issues if
2884	    // an object's to string has escaped characters in it.
2885	    string = '' + string;
2886	  }
2887
2888	  if (!possible.test(string)) {
2889	    return string;
2890	  }
2891	  return string.replace(badChars, escapeChar);
2892	}
2893
2894	function isEmpty(value) {
2895	  if (!value && value !== 0) {
2896	    return true;
2897	  } else if (isArray(value) && value.length === 0) {
2898	    return true;
2899	  } else {
2900	    return false;
2901	  }
2902	}
2903
2904	function blockParams(params, ids) {
2905	  params.path = ids;
2906	  return params;
2907	}
2908
2909	function appendContextPath(contextPath, id) {
2910	  return (contextPath ? contextPath + '.' : '') + id;
2911	}
2912
2913/***/ },
2914/* 14 */
2915/***/ function(module, exports, __webpack_require__) {
2916
2917	'use strict';
2918
2919	var _interopRequireWildcard = __webpack_require__(9)['default'];
2920
2921	var _interopRequireDefault = __webpack_require__(8)['default'];
2922
2923	exports.__esModule = true;
2924	exports.checkRevision = checkRevision;
2925
2926	// TODO: Remove this line and break up compilePartial
2927
2928	exports.template = template;
2929	exports.wrapProgram = wrapProgram;
2930	exports.resolvePartial = resolvePartial;
2931	exports.invokePartial = invokePartial;
2932	exports.noop = noop;
2933
2934	var _import = __webpack_require__(13);
2935
2936	var Utils = _interopRequireWildcard(_import);
2937
2938	var _Exception = __webpack_require__(12);
2939
2940	var _Exception2 = _interopRequireDefault(_Exception);
2941
2942	var _COMPILER_REVISION$REVISION_CHANGES$createFrame = __webpack_require__(10);
2943
2944	function checkRevision(compilerInfo) {
2945	  var compilerRevision = compilerInfo && compilerInfo[0] || 1,
2946	      currentRevision = _COMPILER_REVISION$REVISION_CHANGES$createFrame.COMPILER_REVISION;
2947
2948	  if (compilerRevision !== currentRevision) {
2949	    if (compilerRevision < currentRevision) {
2950	      var runtimeVersions = _COMPILER_REVISION$REVISION_CHANGES$createFrame.REVISION_CHANGES[currentRevision],
2951	          compilerVersions = _COMPILER_REVISION$REVISION_CHANGES$createFrame.REVISION_CHANGES[compilerRevision];
2952	      throw new _Exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your prec
vendor: 5,495 bytes, lines 2952-3110
2952ompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
2953	    } else {
2954	      // Use the embedded version info since the runtime doesn't know about this revision yet
2955	      throw new _Exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
2956	    }
2957	  }
2958	}
2959
2960	function template(templateSpec, env) {
2961	  /* istanbul ignore next */
2962	  if (!env) {
2963	    throw new _Exception2['default']('No environment passed to template');
2964	  }
2965	  if (!templateSpec || !templateSpec.main) {
2966	    throw new _Exception2['default']('Unknown template object: ' + typeof templateSpec);
2967	  }
2968
2969	  // Note: Using env.VM references rather than local var references throughout this section to allow
2970	  // for external users to override these as psuedo-supported APIs.
2971	  env.VM.checkRevision(templateSpec.compiler);
2972
2973	  function invokePartialWrapper(partial, context, options) {
2974	    if (options.hash) {
2975	      context = Utils.extend({}, context, options.hash);
2976	    }
2977
2978	    partial = env.VM.resolvePartial.call(this, partial, context, options);
2979	    var result = env.VM.invokePartial.call(this, partial, context, options);
2980
2981	    if (result == null && env.compile) {
2982	      options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
2983	      result = options.partials[options.name](context, options);
2984	    }
2985	    if (result != null) {
2986	      if (options.indent) {
2987	        var lines = result.split('\n');
2988	        for (var i = 0, l = lines.length; i < l; i++) {
2989	          if (!lines[i] && i + 1 === l) {
2990	            break;
2991	          }
2992
2993	          lines[i] = options.indent + lines[i];
2994	        }
2995	        result = lines.join('\n');
2996	      }
2997	      return result;
2998	    } else {
2999	      throw new _Exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
3000	    }
3001	  }
3002
3003	  // Just add water
3004	  var container = {
3005	    strict: function strict(obj, name) {
3006	      if (!(name in obj)) {
3007	        throw new _Exception2['default']('"' + name + '" not defined in ' + obj);
3008	      }
3009	      return obj[name];
3010	    },
3011	    lookup: function lookup(depths, name) {
3012	      var len = depths.length;
3013	      for (var i = 0; i < len; i++) {
3014	        if (depths[i] && depths[i][name] != null) {
3015	          return depths[i][name];
3016	        }
3017	      }
3018	    },
3019	    lambda: function lambda(current, context) {
3020	      return typeof current === 'function' ? current.call(context) : current;
3021	    },
3022
3023	    escapeExpression: Utils.escapeExpression,
3024	    invokePartial: invokePartialWrapper,
3025
3026	    fn: function fn(i) {
3027	      return templateSpec[i];
3028	    },
3029
3030	    programs: [],
3031	    program: function program(i, data, declaredBlockParams, blockParams, depths) {
3032	      var programWrapper = this.programs[i],
3033	          fn = this.fn(i);
3034	      if (data || depths || blockParams || declaredBlockParams) {
3035	        programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
3036	      } else if (!programWrapper) {
3037	        programWrapper = this.programs[i] = wrapProgram(this, i, fn);
3038	      }
3039	      return programWrapper;
3040	    },
3041
3042	    data: function data(value, depth) {
3043	      while (value && depth--) {
3044	        value = value._parent;
3045	      }
3046	      return value;
3047	    },
3048	    merge: function merge(param, common) {
3049	      var obj = param || common;
3050
3051	      if (param && common && param !== common) {
3052	        obj = Utils.extend({}, common, param);
3053	      }
3054
3055	      return obj;
3056	    },
3057
3058	    noop: env.VM.noop,
3059	    compilerInfo: templateSpec.compiler
3060	  };
3061
3062	  function ret(context) {
3063	    var options = arguments[1] === undefined ? {} : arguments[1];
3064
3065	    var data = options.data;
3066
3067	    ret._setup(options);
3068	    if (!options.partial && templateSpec.useData) {
3069	      data = initData(context, data);
3070	    }
3071	    var depths = undefined,
3072	        blockParams = templateSpec.useBlockParams ? [] : undefined;
3073	    if (templateSpec.useDepths) {
3074	      depths = options.depths ? [context].concat(options.depths) : [context];
3075	    }
3076
3077	    return templateSpec.main.call(container, context, container.helpers, container.partials, data, blockParams, depths);
3078	  }
3079	  ret.isTop = true;
3080
3081	  ret._setup = function (options) {
3082	    if (!options.partial) {
3083	      container.helpers = container.merge(options.helpers, env.helpers);
3084
3085	      if (templateSpec.usePartial) {
3086	        container.partials = container.merge(options.partials, env.partials);
3087	      }
3088	    } else {
3089	      container.helpers = options.helpers;
3090	      container.partials = options.partials;
3091	    }
3092	  };
3093
3094	  ret._child = function (i, data, blockParams, depths) {
3095	    if (templateSpec.useBlockParams && !blockParams) {
3096	      throw new _Exception2['default']('must pass block params');
3097	    }
3098	    if (templateSpec.useDepths && !depths) {
3099	      throw new _Exception2['default']('must pass parent depths');
3100	    }
3101
3102	    return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
3103	  };
3104	  return ret;
3105	}
3106
3107	function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
3108	  function prog(context) {
3109	    var options = arguments[1] === undefined ? {} : arguments[1];
3110
3111	    return fn.call(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), depths && [context].concat(depths));
3112	  }
3113	  prog.program = i;
3114	  prog.depth = depths ? depths.length : 0;
3115	  prog.blockParams = declaredBlockParams || 0;
3116	  return prog;
3117	}
3118
3119	function resolvePartial(partial, context, options) {
3120	  if (!partial) {
3121	    partial = options.partials[options.name];
3122	  } else if (!partial.call && !options.name) {
3123	    // This is a dynamic partial that returned a string
3124	    options.name = partial;
3125	    partial = options.partials[partial];
3126	  }
3127	  return partial;
3128	}
3129
3130	function invokePartial(partial, context, options) {
3131	  options.partial = true;
3132
3133	  if (partial === undefined) {
3134	    throw new _Exception2['default']('The partial ' + options.name + ' could not be found');
3135	  } else if (partial instanceof Function) {
3136	    return partial(context, options);
3137	  }
3138	}
3139
3140	function noop() {
3141	  return '';
3142	}
3143
3144	function initData(context, data) {
3145	  if (!data || !('root' in data)) {
3146	    data = data ? _COMPILER_REVISION$REVISION_CHANGES$createFrame.createFrame(data) : {};
3147	    data.root = context;
3148	  }
3149	  return data;
3150	}
3151
3152/***/ },
3153/* 15 */
3154/***/ function(module, exports, __webpack_require__) {
3155
3156	"use strict";
3157
3158	exports.__esModule = true;
3159	/* istanbul ignore next */
3160	/* Jison generated parser */
3161	var handlebars = (function () {
3162	    var parser = { trace: function trace() {},
3163	        yy: {},
3164	        symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, content: 12, COMMENT: 13, CONTENT: 14, openRawBlock: 15, END_RAW_BLOCK: 16, OPEN_RAW_BLOCK: 17, helperName: 18, openRawBlock_repetition0: 19, openRawBlock_option0: 20, CLOSE_RAW_BLOCK: 21, openBlock: 22, block_option0: 23, closeBlock: 24, openInverse: 25, block_option1: 26, OPEN_BLOCK: 27, openBlock_repetition0: 28, openBlock_option0: 29, openBlock_option1: 30, CLOSE: 31, OPEN_INVERSE: 32, openInverse_repetition0: 33, openInverse_option0: 34, openInverse_option1: 35, openInverseChain: 36, OPEN_INVERSE_CHAIN: 37, openInverseChain_repetition0: 38, openInverseChain_option0: 39, openInverseChain_option1: 40, inverseAndProgram: 41, INVERSE: 42, inverseChain: 43, inverseChain_option0: 44, OPEN_ENDBLOCK: 45, OPEN: 46, mustache_repetition0: 47, mustache_option0: 48, OPEN_UNESCAPED: 49, mustache_repetition1: 50, mustache_option1: 51, CLOSE_UNESCAPED: 52, OPEN_PARTIAL: 53, partialName: 54, partial_repetition0: 55, partial_option0: 56, param: 57, sexpr: 58, OPEN_SEXPR: 59, sexpr_repetition0: 60, sexpr_option0: 61, CLOSE_SEXPR: 62, hash: 63, hash_repetition_plus0: 64, hashSegment: 65, ID: 66, EQUALS: 67, blockParams: 68, OPEN_BLOCK_PARAMS: 69, blockParams_repetition_plus0: 70, CLOSE_BLOCK_PARAMS: 71, path: 72, dataName: 73, STRING: 74, NUMBER: 75, BOOLEAN: 76, UNDEFINED: 77, NULL: 78, DATA: 79, pathSegments: 80, SEP: 81, $accept: 0, $end: 1 },
3165	        terminals_: { 2: "error", 5: "EOF", 13: "COMMENT", 14: "CONTENT", 16: "END_RAW_BLOCK", 17: "OPEN_RAW_BLOCK", 21: "CLOSE_RAW_BLOCK", 27: "OPEN_BLOCK", 31: "CLOSE", 32: "OPEN_INVERSE", 37: "OPEN_INVERSE_CHAIN", 42: "INVERSE", 45: "OPEN_ENDBLOCK", 46: "OPEN", 49: "OPEN_UNESCAPED", 52: "CLOSE_UNESCAPED", 53: "OPEN_PARTIAL", 59: "OPEN_SEXPR", 62: "CLOSE_SEXPR", 66: "ID", 67: "EQUALS", 69: "OPEN_BLOCK_PARAMS", 71: "CLOSE_BLOCK_PARAMS", 74: "STRING", 75: "NUMBER", 76: "BOOLEAN", 77: "UNDEFINED", 78: "NULL", 79: "DATA", 81: "SEP" },
3166	        productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [12, 1], [10, 3], [15, 5], [9, 4], [9, 4], [22, 6], [25, 6], [36, 6], [41, 2], [43, 3], [43, 1], [24, 3], [8, 5], [8, 5], [11, 5], [57, 1], [57, 1], [58, 5], [63, 1], [65, 3], [68, 3], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [54, 1], [54, 1], [73, 2], [72, 1], [80, 3], [80, 1], [6, 0], [6, 2], [19, 0], [19, 2], [20, 0], [20, 1], [23, 0], [23, 1], [26, 0], [26, 1], [28, 0], [28, 2], [29, 0], [29, 1], [30, 0], [30, 1], [33, 0], [33, 2], [34, 0], [34, 
31661], [35, 0], [35, 1], [38, 0], [38, 2], [39, 0], [39, 1], [40, 0], [40, 1], [44, 0], [44, 1], [47, 0], [47, 2], [48, 0], [48, 1], [50, 0], [50, 2], [51, 0], [51, 1], [55, 0], [55, 2], [56, 0], [56, 1], [60, 0], [60, 2], [61, 0], [61, 1], [64, 1], [64, 2], [70, 1], [70, 2]],
3167	        performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
3168
3169	            var $0 = $$.length - 1;
3170	            switch (yystate) {
3171	                case 1:
3172	                    return $$[$0 - 1];
3173	                    break;
3174	                case 2:
3175	                    this.$ = new yy.Program($$[$0], null, {}, yy.locInfo(this._$));
3176	                    break;
3177	                case 3:
3178	                    this.$ = $$[$0];
3179	                    break;
3180	                case 4:
3181	                    this.$ = $$[$0];
3182	                    break;
3183	                case 5:
3184	                    this.$ = $$[$0];
3185	                    break;
3186	                case 6:
3187	                    this.$ = $$[$0];
3188	                    break;
3189	                case 7:
3190	                    this.$ = $$[$0];
3191	                    break;
3192	                case 8:
3193	                    this.$ = new yy.CommentStatement(yy.stripComment($$[$0]), yy.stripFlags($$[$0], $$[$0]), yy.locInfo(this._$));
3194	                    break;
3195	                case 9:
3196	                    this.$ = new yy.ContentStatement($$[$0], yy.locInfo(this._$));
3197	                    break;
3198	                case 10:
3199	                    this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
3200	                    break;
3201	                case 11:
3202	                    this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
3203	                    break;
3204	                case 12:
3205	                    this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
3206	                    break;
3207	                case 13:
3208	                    this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
3209	                    break;
3210	                case 14:
3211	                    this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
3212	                    break;
3213	                case 15:
3214	                    this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
3215	                    break;
3216	                case 16:
3217	                    this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
3218	                    break;
3219	                case 17:
3220	                    this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
3221	                    break;
3222	                case 18:
3223	                    var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
3224	                        program = new yy.Program([inverse], null, {}, yy.locInfo(this._$));
3225	                    program.chained = true;
3226
3227	                    this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };
3228
3229	                    break;
3230	                case 19:
3231	                    this.$ = $$[$0];
3232	                    break;
3233	                case 20:
3234	                    this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
3235	                    break;
3236	                case 21:
3237	                    this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
3238	                    break;
3239	                case 22:
3240	                    this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
3241	                    break;
3242	                case 23:
3243	                    this.$ = new yy.PartialStatement($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], yy.stripFlags($$[$0 - 4], $$[$0]), yy.locInfo(this._$));
3244	                    break;
3245	                case 24:
3246	                    this.$ = $$[$0];
3247	                    break;
3248	                case 25:
3249	                    this.$ = $$[$0];
3250	                    break;
3251	                case 26:
3252	                    this.$ = new yy.SubExpression($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], yy.locInfo(this._$));
3253	                    break;
3254	                case 27:
3255	                    this.$ = new yy.Hash($$[$0], yy.locInfo(this._$));
3256	                    break;
3257	                case 28:
3258	                    this.$ = new yy.HashPair(yy.id($$[$0 - 2]), $$[$0], yy.locInfo(this._$));
3259	                    break;
3260	                case 29:
3261	                    this.$ = yy.id($$[$0 - 1]);
3262	                    break;
3263	                case 30:
3264	                    this.$ = $$[$0];
3265	                    break;
3266	                case 31:
3267	                    this.$ = $$[$0];
3268	                    break;
3269	                case 32:
3270	                    this.$ = new yy.StringLiteral($$[$0], yy.locInfo(this._$));
3271	                    break;
3272	                case 33:
3273	                    this.$ = new yy.NumberLiteral($$[$0], yy.locInfo(this._$));
3274	                    break;
3275	                case 34:
3276	                    this.$ = new yy.BooleanLiteral($$[$0], yy.locInfo(this._$));
3277	                    break;
3278	                case 35:
3279	                    this.$ = new yy.UndefinedLiteral(yy.locInfo(this._$));
vendor: 29,972 bytes, lines 3280-3651
3280	                    break;
3281	                case 36:
3282	                    this.$ = new yy.NullLiteral(yy.locInfo(this._$));
3283	                    break;
3284	                case 37:
3285	                    this.$ = $$[$0];
3286	                    break;
3287	                case 38:
3288	                    this.$ = $$[$0];
3289	                    break;
3290	                case 39:
3291	                    this.$ = yy.preparePath(true, $$[$0], this._$);
3292	                    break;
3293	                case 40:
3294	                    this.$ = yy.preparePath(false, $$[$0], this._$);
3295	                    break;
3296	                case 41:
3297	                    $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
3298	                    break;
3299	                case 42:
3300	                    this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
3301	                    break;
3302	                case 43:
3303	                    this.$ = [];
3304	                    break;
3305	                case 44:
3306	                    $$[$0 - 1].push($$[$0]);
3307	                    break;
3308	                case 45:
3309	                    this.$ = [];
3310	                    break;
3311	                case 46:
3312	                    $$[$0 - 1].push($$[$0]);
3313	                    break;
3314	                case 53:
3315	                    this.$ = [];
3316	                    break;
3317	                case 54:
3318	                    $$[$0 - 1].push($$[$0]);
3319	                    break;
3320	                case 59:
3321	                    this.$ = [];
3322	                    break;
3323	                case 60:
3324	                    $$[$0 - 1].push($$[$0]);
3325	                    break;
3326	                case 65:
3327	                    this.$ = [];
3328	                    break;
3329	                case 66:
3330	                    $$[$0 - 1].push($$[$0]);
3331	                    break;
3332	                case 73:
3333	                    this.$ = [];
3334	                    break;
3335	                case 74:
3336	                    $$[$0 - 1].push($$[$0]);
3337	                    break;
3338	                case 77:
3339	                    this.$ = [];
3340	                    break;
3341	                case 78:
3342	                    $$[$0 - 1].push($$[$0]);
3343	                    break;
3344	                case 81:
3345	                    this.$ = [];
3346	                    break;
3347	                case 82:
3348	                    $$[$0 - 1].push($$[$0]);
3349	                    break;
3350	                case 85:
3351	                    this.$ = [];
3352	                    break;
3353	                case 86:
3354	                    $$[$0 - 1].push($$[$0]);
3355	                    break;
3356	                case 89:
3357	                    this.$ = [$$[$0]];
3358	                    break;
3359	                case 90:
3360	                    $$[$0 - 1].push($$[$0]);
3361	                    break;
3362	                case 91:
3363	                    this.$ = [$$[$0]];
3364	                    break;
3365	                case 92:
3366	                    $$[$0 - 1].push($$[$0]);
3367	                    break;
3368	            }
3369	        },
3370	        table: [{ 3: 1, 4: 2, 5: [2, 43], 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: [1, 11], 14: [1, 18], 15: 16, 17: [1, 21], 22: 14, 25: 15, 27: [1, 19], 32: [1, 20], 37: [2, 2], 42: [2, 2], 45: [2, 2], 46: [1, 12], 49: [1, 13], 53: [1, 17] }, { 1: [2, 1] }, { 5: [2, 44], 13: [2, 44], 14: [2, 44], 17: [2, 44], 27: [2, 44], 32: [2, 44], 37: [2, 44], 42: [2, 44], 45: [2, 44], 46: [2, 44], 49: [2, 44], 53: [2, 44] }, { 5: [2, 3], 13: [2, 3], 14: [2, 3], 17: [2, 3], 27: [2, 3], 32: [2, 3], 37: [2, 3], 42: [2, 3], 45: [2, 3], 46: [2, 3], 49: [2, 3], 53: [2, 3] }, { 5: [2, 4], 13: [2, 4], 14: [2, 4], 17: [2, 4], 27: [2, 4], 32: [2, 4], 37: [2, 4], 42: [2, 4], 45: [2, 4], 46: [2, 4], 49: [2, 4], 53: [2, 4] }, { 5: [2, 5], 13: [2, 5], 14: [2, 5], 17: [2, 5], 27: [2, 5], 32: [2, 5], 37: [2, 5], 42: [2, 5], 45: [2, 5], 46: [2, 5], 49: [2, 5], 53: [2, 5] }, { 5: [2, 6], 13: [2, 6], 14: [2, 6], 17: [2, 6], 27: [2, 6], 32: [2, 6], 37: [2, 6], 42: [2, 6], 45: [2, 6], 46: [2, 6], 49: [2, 6], 53: [2, 6] }, { 5: [2, 7], 13: [2, 7], 14: [2, 7], 17: [2, 7], 27: [2, 7], 32: [2, 7], 37: [2, 7], 42: [2, 7], 45: [2, 7], 46: [2, 7], 49: [2, 7], 53: [2, 7] }, { 5: [2, 8], 13: [2, 8], 14: [2, 8], 17: [2, 8], 27: [2, 8], 32: [2, 8], 37: [2, 8], 42: [2, 8], 45: [2, 8], 46: [2, 8], 49: [2, 8], 53: [2, 8] }, { 18: 22, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 33, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 34, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 4: 35, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 12: 36, 14: [1, 18] }, { 18: 38, 54: 37, 58: 39, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 9], 13: [2, 9], 14: [2, 9], 16: [2, 9], 17: [2, 9], 27: [2, 9], 32: [2, 9], 37: [2, 9], 42: [2, 9], 45: [2, 9], 46: [2, 9], 49: [2, 9], 53: [2, 9] }, { 18: 41, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 42, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 43, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [2, 73], 47: 44, 59: [2, 73], 66: [2, 73], 74: [2, 73], 75: [2, 73], 76: [2, 73], 77: [2, 73], 78: [2, 73], 79: [2, 73] }, { 21: [2, 30], 31: [2, 30], 52: [2, 30], 59: [2, 30], 62: [2, 30], 66: [2, 30], 69: [2, 30], 74: [2, 30], 75: [2, 30], 76: [2, 30], 77: [2, 30], 78: [2, 30], 79: [2, 30] }, { 21: [2, 31], 31: [2, 31], 52: [2, 31], 59: [2, 31], 62: [2, 31], 66: [2, 31], 69: [2, 31], 74: [2, 31], 75: [2, 31], 76: [2, 31], 77: [2, 31], 78: [2, 31], 79: [2, 31] }, { 21: [2, 32], 31: [2, 32], 52: [2, 32], 59: [2, 32], 62: [2, 32], 66: [2, 32], 69: [2, 32], 74: [2, 32], 75: [2, 32], 76: [2, 32], 77: [2, 32], 78: [2, 32], 79: [2, 32] }, { 21: [2, 33], 31: [2, 33], 52: [2, 33], 59: [2, 33], 62: [2, 33], 66: [2, 33], 69: [2, 33], 74: [2, 33], 75: [2, 33], 76: [2, 33], 77: [2, 33], 78: [2, 33], 79: [2, 33] }, { 21: [2, 34], 31: [2, 34], 52: [2, 34], 59: [2, 34], 62: [2, 34], 66: [2, 34], 69: [2, 34], 74: [2, 34], 75: [2, 34], 76: [2, 34], 77: [2, 34], 78: [2, 34], 79: [2, 34] }, { 21: [2, 35], 31: [2, 35], 52: [2, 35], 59: [2, 35], 62: [2, 35], 66: [2, 35], 69: [2, 35], 74: [2, 35], 75: [2, 35], 76: [2, 35], 77: [2, 35], 78: [2, 35], 79: [2, 35] }, { 21: [2, 36], 31: [2, 36], 52: [2, 36], 59: [2, 36], 62: [2, 36], 66: [2, 36], 69: [2, 36], 74: [2, 36], 75: [2, 36], 76: [2, 36], 77: [2, 36], 78: [2, 36], 79: [2, 36] }, { 21: [2, 40], 31: [2, 40], 52: [2, 40], 59: [2, 40], 62: [2, 40], 66: [2, 40], 69: [2, 40], 74: [2, 40], 75: [2, 40], 76: [2, 40], 77: [2, 40], 78: [2, 40], 79: [2, 40], 81: [1, 45] }, { 66: [1, 32], 80: 46 }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 50: 47, 52: [2, 77], 59: [2, 77], 66: [2, 77], 74: [2, 77], 75: [2, 77], 76: [2, 77], 77: [2, 77], 78: [2, 77], 79: [2, 77] }, { 23: 48, 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 49, 45: [2, 49] }, { 26: 54, 41: 55, 42: [1, 53], 45: [2, 51] }, { 16: [1, 56] }, { 31: [2, 81], 55: 57, 59: [2, 81], 66: [2, 81], 74: [2, 81], 75: [2, 81], 76: [2, 81], 77: [2, 81], 78: [2, 81], 79: [2, 81] }, { 31: [2, 37], 59: [2, 37], 66: [2, 37], 74: [2, 37], 75: [2, 37], 76: [2, 37], 77: [2, 37], 78: [2, 37], 79: [2, 37] }, { 31: [2, 38], 59: [2, 38], 66: [2, 38], 74: [2, 38], 75: [2, 38], 76: [2, 38], 77: [2, 38], 78: [2, 38], 79: [2, 38] }, { 18: 58, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 28: 59, 31: [2, 53], 59: [2, 53], 66: [2, 53], 69: [2, 53], 74: [2, 53], 75: [2, 53], 76: [2, 53], 77: [2, 53], 78: [2, 53], 79: [2, 53] }, { 31: [2, 59], 33: 60, 59: [2, 59], 66: [2, 59], 69: [2, 59], 74: [2, 59], 75: [2, 59], 76: [2, 59], 77: [2, 59], 78: [2, 59], 79: [2, 59] }, { 19: 61, 21: [2, 45], 59: [2, 45], 66: [2, 45], 74: [2, 45], 75: [2, 45], 76: [2, 45], 77: [2, 45], 78: [2, 45], 79: [2, 45] }, { 18: 65, 31: [2, 75], 48: 62, 57: 63, 58: 66, 59: [1, 40], 63: 64, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 66: [1, 70] }, { 21: [2, 39], 31: [2, 39], 52: [2, 39], 59: [2, 39], 62: [2, 39], 66: [2, 39], 69: [2, 39], 74: [2, 39], 75: [2, 39], 76: [2, 39], 77: [2, 39], 78: [2, 39], 79: [2, 39], 81: [1, 45] }, { 18: 65, 51: 71, 52: [2, 79], 57: 72, 58: 66, 59: [1, 40], 63: 73, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 24: 74, 45: [1, 75] }, { 45: [2, 50] }, { 4: 76, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 45: [2, 19] }, { 18: 77, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 78, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 24: 79, 45: [1, 75] }, { 45: [2, 52] }, { 5: [2, 10], 13: [2, 10], 14: [2, 10], 17: [2, 10], 27: [2, 10], 32: [2, 10], 37: [2, 10], 42: [2, 10], 45: [2, 10], 46: [2, 10], 49: [2, 10], 53: [2, 10] }, { 18: 65, 31: [2, 83], 56: 80, 57: 81, 58: 66, 59: [1, 40], 63: 82, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 59: [2, 85], 60: 83, 62: [2, 85], 66: [2, 85], 74: [2, 85], 75: [2, 85], 76: [2, 85], 77: [2, 85], 78: [2, 85], 79: [2, 85] }, { 18: 65, 29: 84, 31: [2, 55], 57: 85, 58: 66, 59: [1, 40], 63: 86, 64: 67, 65: 68, 66: [1, 69], 69: [2, 55], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 31: [2, 61], 34: 87, 57: 88, 58: 66, 59: [1, 40], 63: 89, 64: 67, 65: 68, 66: [1, 69], 69: [2, 61], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 20: 90, 21: [2, 47], 57: 91, 58: 66, 59: [1, 40], 63: 92, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [1, 93] }, { 31: [2, 74], 59: [2, 74], 66: [2, 74], 74: [2, 74], 75: [2, 74], 76: [2, 74], 77: [2, 74], 78: [2, 74], 79: [2, 74] }, { 31: [2, 76] }, { 21: [2, 24], 31: [2, 24], 52: [2, 24], 59: [2, 24], 62: [2, 24], 66: [2, 24], 69: [2, 24], 74: [2, 24], 75: [2, 24], 76: [2, 24], 77: [2, 24], 78: [2, 24], 79: [2, 24] }, { 21: [2, 25], 31: [2, 25], 52: [2, 25], 59: [2, 25], 62: [2, 25], 66: [2, 25], 69: [2, 25], 74: [2, 25], 75: [2, 25], 76: [2, 25], 77: [2, 25], 78: [2, 25], 79: [2, 25] }, { 21: [2, 27], 31: [2, 27], 52: [2, 27], 62: [2, 27], 65: 94, 66: [1, 95], 69: [2, 27] }, { 21: [2, 89], 31: [2, 89], 52: [2, 89], 62: [2, 89], 66: [2, 89], 69: [2, 89] }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 67: [1, 96], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 21: [2, 41], 31: [2, 41], 52: [2, 41], 59: [2, 41], 62: [2, 41], 66: [2, 41], 69: [2, 41], 74: [2, 41], 75: [2, 41], 76: [2, 41], 77: [2, 41], 78: [2, 41], 79: [2, 41], 81: [2, 41] }, { 52: [1, 97] }, { 52: [2, 78], 59: [2, 78], 66: [2, 78], 74: [2, 78], 75: [2, 78], 76: [2, 78], 77: [2, 78], 78: [2, 78], 79: [2, 78] }, { 52: [2, 80] }, { 5: [2, 12], 13: [2, 12], 14: [2, 12], 17: [2, 12], 27: [2, 12], 32: [2, 12], 37: [2, 12], 42: [2, 12], 45: [2, 12], 46: [2, 12], 49: [2, 12], 53: [2, 12] }, { 18: 98, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 100, 44: 99, 45: [2, 71] }, { 31: [2, 65], 38: 101, 59: [2, 65], 66: [2, 65], 69: [2, 65], 74: [2, 65], 75: [2, 65], 76: [2, 65], 77: [2, 65], 78: [2, 65], 79: [2, 65] }, { 45: [2, 17] }, { 5: [2, 13], 13: [2, 13], 14: [2, 13], 17: [2, 13], 27: [2, 13], 32: [2, 13], 37: [2, 13], 42: [2, 13], 45: [2, 13], 46: [2, 13], 49: [2, 13], 53: [2, 13] }, { 31: [1, 102] }, { 31: [2, 82], 59: [2, 82], 66: [2, 82], 74: [2, 82], 75: [2, 82], 76: [2, 82], 77: [2, 82], 78: [2, 82], 79: [2, 82] }, { 31: [2, 84] }, { 18: 65, 57: 104, 58: 66, 59: [1, 40], 61: 103, 62: [2, 87], 63: 105, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 30: 106, 31: [2, 57], 68: 107, 69: [1, 108] }, { 31: [2, 54], 59: [2, 54], 66: [2, 54], 69: [2, 54], 74: [2, 54], 75: [2, 54], 76: [2, 54], 77: [2, 54], 78: [2, 54], 79: [2, 54] }, { 31: [2, 56], 69: [2, 56] }, { 31: [2, 63], 35: 109, 68: 110, 69: [1, 108] }, { 31: [2, 60], 59: [2, 60], 66: [2, 60], 69: [2, 60], 74: [2, 60], 75: [2, 60], 76: [2, 60], 77: [2, 60], 78: [2, 60], 79: [2, 60] }, { 31: [2, 62], 69: [2, 62] }, { 21: [1, 111] }, { 21: [2, 46], 59: [2, 46], 66: [2, 46], 74: [2, 46], 75: [2, 46], 76: [2, 46], 77: [2, 46], 78: [2, 46], 79: [2, 46] }, { 21: [2, 48] }, { 5: [2, 21], 13: [2, 21], 14: [2, 21], 17: [2, 21], 27: [2, 21], 32: [2, 21], 37: [2, 21], 42: [2, 21], 45: [2, 21], 46: [2, 21], 49: [2, 21], 53: [2, 21] }, { 21: [2, 90], 31: [2, 90], 52: [2, 90], 62: [2, 90], 66: [2, 90], 69: [2, 90] }, { 67: [1, 96] }, { 18: 65, 57: 112, 58: 66, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 22], 13: [2, 22], 14: [2, 22], 17: [2, 22], 27: [2, 22], 32: [2, 22], 37: [2, 22], 42: [2, 22], 45: [2, 22], 46: [2, 22], 49: [2, 22], 53: [2, 22] }, { 31: [1, 113] }, { 45: [2, 18] }, { 45: [2, 72] }, { 18: 65, 31: [2, 67], 39: 114, 57: 115, 58: 66, 59: [1, 40], 63: 116, 64: 67, 65: 68, 66: [1, 69], 69: [2, 67], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 23], 13: [2, 23], 14: [2, 23], 17: [2, 23], 27: [2, 23], 32: [2, 23], 37: [2, 23], 42: [2, 23], 45: [2, 23], 46: [2, 23], 49: [2, 23], 53: [2, 23] }, { 62: [1, 117] }, { 59: [2, 86], 62: [2, 86], 66: [2, 86], 74: [2, 86], 75: [2, 86], 76: [2, 86], 77: [2, 86], 78: [2, 86], 79: [2, 86] }, { 62: [2, 88] }, { 31: [1, 118] }, { 31: [2, 58] }, { 66: [1, 120], 70: 119 }, { 31: [1, 121] }, { 31: [2, 64] }, { 14: [2, 11] }, { 21: [2, 28], 31: [2, 28], 52: [2, 28], 62: [2, 28], 66: [2, 28], 69: [2, 28] }, { 5: [2, 20], 13: [2, 20], 14: [2, 20], 17: [2, 20], 27: [2, 20], 32: [2, 20], 37: [2, 20], 42: [2, 20], 45: [2, 20], 46: [2, 20], 49: [2, 20], 53: [2, 20] }, { 31: [2, 69], 40: 122, 68: 123, 69: [1, 108] }, { 31: [2, 66], 59: [2, 66], 66: [2, 66], 69: [2, 66], 74: [2, 66], 75: [2, 66], 76: [2, 66], 77: [2, 66], 78: [2, 66], 79: [2, 66] }, { 31: [2, 68], 69: [2, 68] }, { 21: [2, 26], 31: [2, 26], 52: [2, 26], 59: [2, 26], 62: [2, 26], 66: [2, 26], 69: [2, 26], 74: [2, 26], 75: [2, 26], 76: [2, 26], 77: [2, 26], 78: [2, 26], 79: [2, 26] }, { 13: [2, 14], 14: [2, 14], 17: [2, 14], 27: [2, 14], 32: [2, 14], 37: [2, 14], 42: [2, 14], 45: [2, 14], 46: [2, 14], 49: [2, 14], 53: [2, 14] }, { 66: [1, 125], 71: [1, 124] }, { 66: [2, 91], 71: [2, 91] }, { 13: [2, 15], 14: [2, 15], 17: [2, 15], 27: [2, 15], 32: [2, 15], 42: [2, 15], 45: [2, 15], 46: [2, 15], 49: [2, 15], 53: [2, 15] }, { 31: [1, 126] }, { 31: [2, 70] }, { 31: [2, 29] }, { 66: [2, 92], 71: [2, 92] }, { 13: [2, 16], 14: [2, 16], 17: [2, 16], 27: [2, 16], 32: [2, 16], 37: [2, 16], 42: [2, 16], 45: [2, 16], 46: [2, 16], 49: [2, 16], 53: [2, 16] }],
3371	        defaultActions: { 4: [2, 1], 49: [2, 50], 51: [2, 19], 55: [2, 52], 64: [2, 76], 73: [2, 80], 78: [2, 17], 82: [2, 84], 92: [2, 48], 99: [2, 18], 100: [2, 72], 105: [2, 88], 107: [2, 58], 110: [2, 64], 111: [2, 11], 123: [2, 70], 124: [2, 29] },
3372	        parseError: function parseError(str, hash) {
3373	            throw new Error(str);
3374	        },
3375	        parse: function parse(input) {
3376	            var self = this,
3377	                stack = [0],
3378	                vstack = [null],
3379	                lstack = [],
3380	                table = this.table,
3381	                yytext = "",
3382	                yylineno = 0,
3383	                yyleng = 0,
3384	                recovering = 0,
3385	                TERROR = 2,
3386	                EOF = 1;
3387	            this.lexer.setInput(input);
3388	            this.lexer.yy = this.yy;
3389	            this.yy.lexer = this.lexer;
3390	            this.yy.parser = this;
3391	            if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
3392	            var yyloc = this.lexer.yylloc;
3393	            lstack.push(yyloc);
3394	            var ranges = this.lexer.options && this.lexer.options.ranges;
3395	            if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
3396	            function popStack(n) {
3397	                stack.length = stack.length - 2 * n;
3398	                vstack.length = vstack.length - n;
3399	                lstack.length = lstack.length - n;
3400	            }
3401	            function lex() {
3402	                var token;
3403	                token = self.lexer.lex() || 1;
3404	                if (typeof token !== "number") {
3405	                    token = self.symbols_[token] || token;
3406	                }
3407	                return token;
3408	            }
3409	            var symbol,
3410	                preErrorSymbol,
3411	                state,
3412	                action,
3413	                a,
3414	                r,
3415	                yyval = {},
3416	                p,
3417	                len,
3418	                newState,
3419	                expected;
3420	            while (true) {
3421	                state = stack[stack.length - 1];
3422	                if (this.defaultActions[state]) {
3423	                    action = this.defaultActions[state];
3424	                } else {
3425	                    if (symbol === null || typeof symbol == "undefined") {
3426	                        symbol = lex();
3427	                    }
3428	                    action = table[state] && table[state][symbol];
3429	                }
3430	                if (typeof action === "undefined" || !action.length || !action[0]) {
3431	                    var errStr = "";
3432	                    if (!recovering) {
3433	                        expected = [];
3434	                        for (p in table[state]) if (this.terminals_[p] && p > 2) {
3435	                            expected.push("'" + this.terminals_[p] + "'");
3436	                        }
3437	                        if (this.lexer.showPosition) {
3438	                            errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
3439	                        } else {
3440	                            errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
3441	                        }
3442	                        this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
3443	                    }
3444	                }
3445	                if (action[0] instanceof Array && action.length > 1) {
3446	                    throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
3447	                }
3448	                switch (action[0]) {
3449	                    case 1:
3450	                        stack.push(symbol);
3451	                        vstack.push(this.lexer.yytext);
3452	                        lstack.push(this.lexer.yylloc);
3453	                        stack.push(action[1]);
3454	                        symbol = null;
3455	                        if (!preErrorSymbol) {
3456	                            yyleng = this.lexer.yyleng;
3457	                            yytext = this.lexer.yytext;
3458	                            yylineno = this.lexer.yylineno;
3459	                            yyloc = this.lexer.yylloc;
3460	                            if (recovering > 0) recovering--;
3461	                        } else {
3462	                            symbol = preErrorSymbol;
3463	                            preErrorSymbol = null;
3464	                        }
3465	                        break;
3466	                    case 2:
3467	                        len = this.productions_[action[1]][1];
3468	                        yyval.$ = vstack[vstack.length - len];
3469	                        yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
3470	                        if (ranges) {
3471	                            yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
3472	                        }
3473	                        r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
3474	                        if (typeof r !== "undefined") {
3475	                            return r;
3476	                        }
3477	                        if (len) {
3478	                            stack = stack.slice(0, -1 * len * 2);
3479	                            vstack = vstack.slice(0, -1 * len);
3480	                            lstack = lstack.slice(0, -1 * len);
3481	                        }
3482	                        stack.push(this.productions_[action[1]][0]);
3483	                        vstack.push(yyval.$);
3484	                        lstack.push(yyval._$);
3485	                        newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
3486	                        stack.push(newState);
3487	                        break;
3488	                    case 3:
3489	                        return true;
3490	                }
3491	            }
3492	            return true;
3493	        }
3494	    };
3495	    /* Jison generated lexer */
3496	    var lexer = (function () {
3497	        var lexer = { EOF: 1,
3498	            parseError: function parseError(str, hash) {
3499	                if (this.yy.parser) {
3500	                    this.yy.parser.parseError(str, hash);
3501	                } else {
3502	                    throw new Error(str);
3503	                }
3504	            },
3505	            setInput: function setInput(input) {
3506	                this._input = input;
3507	                this._more = this._less = this.done = false;
3508	                this.yylineno = this.yyleng = 0;
3509	                this.yytext = this.matched = this.match = "";
3510	                this.conditionStack = ["INITIAL"];
3511	                this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
3512	                if (this.options.ranges) this.yylloc.range = [0, 0];
3513	                this.offset = 0;
3514	                return this;
3515	            },
3516	            input: function input() {
3517	                var ch = this._input[0];
3518	                this.yytext += ch;
3519	                this.yyleng++;
3520	                this.offset++;
3521	                this.match += ch;
3522	                this.matched += ch;
3523	                var lines = ch.match(/(?:\r\n?|\n).*/g);
3524	                if (lines) {
3525	                    this.yylineno++;
3526	                    this.yylloc.last_line++;
3527	                } else {
3528	                    this.yylloc.last_column++;
3529	                }
3530	                if (this.options.ranges) this.yylloc.range[1]++;
3531
3532	                this._input = this._input.slice(1);
3533	                return ch;
3534	            },
3535	            unput: function unput(ch) {
3536	                var len = ch.length;
3537	                var lines = ch.split(/(?:\r\n?|\n)/g);
3538
3539	                this._input = ch + this._input;
3540	                this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
3541	                //this.yyleng -= len;
3542	                this.offset -= len;
3543	                var oldLines = this.match.split(/(?:\r\n?|\n)/g);
3544	                this.match = this.match.substr(0, this.match.length - 1);
3545	                this.matched = this.matched.substr(0, this.matched.length - 1);
3546
3547	                if (lines.length - 1) this.yylineno -= lines.length - 1;
3548	                var r = this.yylloc.range;
3549
3550	                this.yylloc = { first_line: this.yylloc.first_line,
3551	                    last_line: this.yylineno + 1,
3552	                    first_column: this.yylloc.first_column,
3553	                    last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
3554	                };
3555
3556	                if (this.options.ranges) {
3557	                    this.yylloc.range = [r[0], r[0] + this.yyleng - len];
3558	                }
3559	                return this;
3560	            },
3561	            more: function more() {
3562	                this._more = true;
3563	                return this;
3564	            },
3565	            less: function less(n) {
3566	                this.unput(this.match.slice(n));
3567	            },
3568	            pastInput: function pastInput() {
3569	                var past = this.matched.substr(0, this.matched.length - this.match.length);
3570	                return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
3571	            },
3572	            upcomingInput: function upcomingInput() {
3573	                var next = this.match;
3574	                if (next.length < 20) {
3575	                    next += this._input.substr(0, 20 - next.length);
3576	                }
3577	                return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
3578	            },
3579	            showPosition: function showPosition() {
3580	                var pre = this.pastInput();
3581	                var c = new Array(pre.length + 1).join("-");
3582	                return pre + this.upcomingInput() + "\n" + c + "^";
3583	            },
3584	            next: function next() {
3585	                if (this.done) {
3586	                    return this.EOF;
3587	                }
3588	                if (!this._input) this.done = true;
3589
3590	                var token, match, tempMatch, index, col, lines;
3591	                if (!this._more) {
3592	                    this.yytext = "";
3593	                    this.match = "";
3594	                }
3595	                var rules = this._currentRules();
3596	                for (var i = 0; i < rules.length; i++) {
3597	                    tempMatch = this._input.match(this.rules[rules[i]]);
3598	                    if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
3599	                        match = tempMatch;
3600	                        index = i;
3601	                        if (!this.options.flex) break;
3602	                    }
3603	                }
3604	                if (match) {
3605	                    lines = match[0].match(/(?:\r\n?|\n).*/g);
3606	                    if (lines) this.yylineno += lines.length;
3607	                    this.yylloc = { first_line: this.yylloc.last_line,
3608	                        last_line: this.yylineno + 1,
3609	                        first_column: this.yylloc.last_column,
3610	                        last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
3611	                    this.yytext += match[0];
3612	                    this.match += match[0];
3613	                    this.matches = match;
3614	                    this.yyleng = this.yytext.length;
3615	                    if (this.options.ranges) {
3616	                        this.yylloc.range = [this.offset, this.offset += this.yyleng];
3617	                    }
3618	                    this._more = false;
3619	                    this._input = this._input.slice(match[0].length);
3620	                    this.matched += match[0];
3621	                    token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
3622	                    if (this.done && this._input) this.done = false;
3623	                    if (token) {
3624	                        return token;
3625	                    } else {
3626	                        return;
3627	                    }
3628	                }
3629	                if (this._input === "") {
3630	                    return this.EOF;
3631	                } else {
3632	                    return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno });
3633	                }
3634	            },
3635	            lex: function lex() {
3636	                var r = this.next();
3637	                if (typeof r !== "undefined") {
3638	                    return r;
3639	                } else {
3640	                    return this.lex();
3641	                }
3642	            },
3643	            begin: function begin(condition) {
3644	                this.conditionStack.push(condition);
3645	            },
3646	            popState: function popState() {
3647	                return this.conditionStack.pop();
3648	            },
3649	            _currentRules: function _currentRules() {
3650	                return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
3651	            },
vendor: 7,623 bytes, lines 3652-3852
3652	            topState: function topState() {
3653	                return this.conditionStack[this.conditionStack.length - 2];
3654	            },
3655	            pushState: function begin(condition) {
3656	                this.begin(condition);
3657	            } };
3658	        lexer.options = {};
3659	        lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
3660
3661	            function strip(start, end) {
3662	                return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);
3663	            }
3664
3665	            var YYSTATE = YY_START;
3666	            switch ($avoiding_name_collisions) {
3667	                case 0:
3668	                    if (yy_.yytext.slice(-2) === "\\\\") {
3669	                        strip(0, 1);
3670	                        this.begin("mu");
3671	                    } else if (yy_.yytext.slice(-1) === "\\") {
3672	                        strip(0, 1);
3673	                        this.begin("emu");
3674	                    } else {
3675	                        this.begin("mu");
3676	                    }
3677	                    if (yy_.yytext) {
3678	                        return 14;
3679	                    }break;
3680	                case 1:
3681	                    return 14;
3682	                    break;
3683	                case 2:
3684	                    this.popState();
3685	                    return 14;
3686
3687	                    break;
3688	                case 3:
3689	                    yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9);
3690	                    this.popState();
3691	                    return 16;
3692
3693	                    break;
3694	                case 4:
3695	                    return 14;
3696	                    break;
3697	                case 5:
3698	                    this.popState();
3699	                    return 13;
3700
3701	                    break;
3702	                case 6:
3703	                    return 59;
3704	                    break;
3705	                case 7:
3706	                    return 62;
3707	                    break;
3708	                case 8:
3709	                    return 17;
3710	                    break;
3711	                case 9:
3712	                    this.popState();
3713	                    this.begin("raw");
3714	                    return 21;
3715
3716	                    break;
3717	                case 10:
3718	                    return 53;
3719	                    break;
3720	                case 11:
3721	                    return 27;
3722	                    break;
3723	                case 12:
3724	                    return 45;
3725	                    break;
3726	                case 13:
3727	                    this.popState();return 42;
3728	                    break;
3729	                case 14:
3730	                    this.popState();return 42;
3731	                    break;
3732	                case 15:
3733	                    return 32;
3734	                    break;
3735	                case 16:
3736	                    return 37;
3737	                    break;
3738	                case 17:
3739	                    return 49;
3740	                    break;
3741	                case 18:
3742	                    return 46;
3743	                    break;
3744	                case 19:
3745	                    this.unput(yy_.yytext);
3746	                    this.popState();
3747	                    this.begin("com");
3748
3749	                    break;
3750	                case 20:
3751	                    this.popState();
3752	                    return 13;
3753
3754	                    break;
3755	                case 21:
3756	                    return 46;
3757	                    break;
3758	                case 22:
3759	                    return 67;
3760	                    break;
3761	                case 23:
3762	                    return 66;
3763	                    break;
3764	                case 24:
3765	                    return 66;
3766	                    break;
3767	                case 25:
3768	                    return 81;
3769	                    break;
3770	                case 26:
3771	                    // ignore whitespace
3772	                    break;
3773	                case 27:
3774	                    this.popState();return 52;
3775	                    break;
3776	                case 28:
3777	                    this.popState();return 31;
3778	                    break;
3779	                case 29:
3780	                    yy_.yytext = strip(1, 2).replace(/\\"/g, "\"");return 74;
3781	                    break;
3782	                case 30:
3783	                    yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 74;
3784	                    break;
3785	                case 31:
3786	                    return 79;
3787	                    break;
3788	                case 32:
3789	                    return 76;
3790	                    break;
3791	                case 33:
3792	                    return 76;
3793	                    break;
3794	                case 34:
3795	                    return 77;
3796	                    break;
3797	                case 35:
3798	                    return 78;
3799	                    break;
3800	                case 36:
3801	                    return 75;
3802	                    break;
3803	                case 37:
3804	                    return 69;
3805	                    break;
3806	                case 38:
3807	                    return 71;
3808	                    break;
3809	                case 39:
3810	                    return 66;
3811	                    break;
3812	                case 40:
3813	                    return 66;
3814	                    break;
3815	                case 41:
3816	                    return "INVALID";
3817	                    break;
3818	                case 42:
3819	                    return 5;
3820	                    break;
3821	            }
3822	        };
3823	        lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{\/)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[[^\]]*\])/, /^(?:.)/, /^(?:$)/];
3824	        lexer.conditions = { mu: { rules: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: false }, emu: { rules: [2], inclusive: false }, com: { rules: [5], inclusive: false }, raw: { rules: [3, 4], inclusive: false }, INITIAL: { rules: [0, 1, 42], inclusive: true } };
3825	        return lexer;
3826	    })();
3827	    parser.lexer = lexer;
3828	    function Parser() {
3829	        this.yy = {};
3830	    }Parser.prototype = parser;parser.Parser = Parser;
3831	    return new Parser();
3832	})();exports["default"] = handlebars;
3833	module.exports = exports["default"];
3834
3835/***/ },
3836/* 16 */
3837/***/ function(module, exports, __webpack_require__) {
3838
3839	'use strict';
3840
3841	var _interopRequireDefault = __webpack_require__(8)['default'];
3842
3843	exports.__esModule = true;
3844
3845	var _Visitor = __webpack_require__(6);
3846
3847	var _Visitor2 = _interopRequireDefault(_Visitor);
3848
3849	function WhitespaceControl() {}
3850	WhitespaceControl.prototype = new _Visitor2['default']();
3851
3852	WhitespaceControl.prototype.Program = function (program) {
vendor: 4,951 bytes, lines 3853-4019
3853	  var isRoot = !this.isRootSeen;
3854	  this.isRootSeen = true;
3855
3856	  var body = program.body;
3857	  for (var i = 0, l = body.length; i < l; i++) {
3858	    var current = body[i],
3859	        strip = this.accept(current);
3860
3861	    if (!strip) {
3862	      continue;
3863	    }
3864
3865	    var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
3866	        _isNextWhitespace = isNextWhitespace(body, i, isRoot),
3867	        openStandalone = strip.openStandalone && _isPrevWhitespace,
3868	        closeStandalone = strip.closeStandalone && _isNextWhitespace,
3869	        inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
3870
3871	    if (strip.close) {
3872	      omitRight(body, i, true);
3873	    }
3874	    if (strip.open) {
3875	      omitLeft(body, i, true);
3876	    }
3877
3878	    if (inlineStandalone) {
3879	      omitRight(body, i);
3880
3881	      if (omitLeft(body, i)) {
3882	        // If we are on a standalone node, save the indent info for partials
3883	        if (current.type === 'PartialStatement') {
3884	          // Pull out the whitespace from the final line
3885	          current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
3886	        }
3887	      }
3888	    }
3889	    if (openStandalone) {
3890	      omitRight((current.program || current.inverse).body);
3891
3892	      // Strip out the previous content node if it's whitespace only
3893	      omitLeft(body, i);
3894	    }
3895	    if (closeStandalone) {
3896	      // Always strip the next node
3897	      omitRight(body, i);
3898
3899	      omitLeft((current.inverse || current.program).body);
3900	    }
3901	  }
3902
3903	  return program;
3904	};
3905	WhitespaceControl.prototype.BlockStatement = function (block) {
3906	  this.accept(block.program);
3907	  this.accept(block.inverse);
3908
3909	  // Find the inverse program that is involed with whitespace stripping.
3910	  var program = block.program || block.inverse,
3911	      inverse = block.program && block.inverse,
3912	      firstInverse = inverse,
3913	      lastInverse = inverse;
3914
3915	  if (inverse && inverse.chained) {
3916	    firstInverse = inverse.body[0].program;
3917
3918	    // Walk the inverse chain to find the last inverse that is actually in the chain.
3919	    while (lastInverse.chained) {
3920	      lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
3921	    }
3922	  }
3923
3924	  var strip = {
3925	    open: block.openStrip.open,
3926	    close: block.closeStrip.close,
3927
3928	    // Determine the standalone candiacy. Basically flag our content as being possibly standalone
3929	    // so our parent can determine if we actually are standalone
3930	    openStandalone: isNextWhitespace(program.body),
3931	    closeStandalone: isPrevWhitespace((firstInverse || program).body)
3932	  };
3933
3934	  if (block.openStrip.close) {
3935	    omitRight(program.body, null, true);
3936	  }
3937
3938	  if (inverse) {
3939	    var inverseStrip = block.inverseStrip;
3940
3941	    if (inverseStrip.open) {
3942	      omitLeft(program.body, null, true);
3943	    }
3944
3945	    if (inverseStrip.close) {
3946	      omitRight(firstInverse.body, null, true);
3947	    }
3948	    if (block.closeStrip.open) {
3949	      omitLeft(lastInverse.body, null, true);
3950	    }
3951
3952	    // Find standalone else statments
3953	    if (isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
3954	      omitLeft(program.body);
3955	      omitRight(firstInverse.body);
3956	    }
3957	  } else if (block.closeStrip.open) {
3958	    omitLeft(program.body, null, true);
3959	  }
3960
3961	  return strip;
3962	};
3963
3964	WhitespaceControl.prototype.MustacheStatement = function (mustache) {
3965	  return mustache.strip;
3966	};
3967
3968	WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {
3969	  /* istanbul ignore next */
3970	  var strip = node.strip || {};
3971	  return {
3972	    inlineStandalone: true,
3973	    open: strip.open,
3974	    close: strip.close
3975	  };
3976	};
3977
3978	function isPrevWhitespace(body, i, isRoot) {
3979	  if (i === undefined) {
3980	    i = body.length;
3981	  }
3982
3983	  // Nodes that end with newlines are considered whitespace (but are special
3984	  // cased for strip operations)
3985	  var prev = body[i - 1],
3986	      sibling = body[i - 2];
3987	  if (!prev) {
3988	    return isRoot;
3989	  }
3990
3991	  if (prev.type === 'ContentStatement') {
3992	    return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
3993	  }
3994	}
3995	function isNextWhitespace(body, i, isRoot) {
3996	  if (i === undefined) {
3997	    i = -1;
3998	  }
3999
4000	  var next = body[i + 1],
4001	      sibling = body[i + 2];
4002	  if (!next) {
4003	    return isRoot;
4004	  }
4005
4006	  if (next.type === 'ContentStatement') {
4007	    return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
4008	  }
4009	}
4010
4011	// Marks the node to the right of the position as omitted.
4012	// I.e. {{foo}}' ' will mark the ' ' node as omitted.
4013	//
4014	// If i is undefined, then the first child will be marked as such.
4015	//
4016	// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
4017	// content is met.
4018	function omitRight(body, i, multiple) {
4019	  var current = body[i == null ? 0 : i + 1];
4020	  if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
4021	    return;
4022	  }
4023
4024	  var original = current.value;
4025	  current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, '');
4026	  current.rightStripped = current.value !== original;
4027	}
4028
4029	// Marks the node to the left of the position as omitted.
4030	// I.e. ' '{{foo}} will mark the ' ' node as omitted.
4031	//
4032	// If i is undefined then the last child will be marked as such.
4033	//
4034	// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
4035	// content is met.
4036	function omitLeft(body, i, multiple) {
4037	  var current = body[i == null ? body.length - 1 : i - 1];
4038	  if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
4039	    return;
4040	  }
4041
4042	  // We omit the last node if it's whitespace only and not preceeded by a non-content node.
4043	  var original = current.value;
4044	  current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
4045	  current.leftStripped = current.value !== original;
4046	  return current.leftStripped;
4047	}
4048
4049	exports['default'] = WhitespaceControl;
4050	module.exports = exports['default'];
4051
4052/***/ },
4053/* 17 */
4054/***/ function(module, exports, __webpack_require__) {
4055
4056	'use strict';
4057
4058	var _interopRequireDefault = __webpack_require__(8)['default'];
4059
4060	exports.__esModule = true;
4061	exports.SourceLocation = SourceLocation;
4062	exports.id = id;
4063	exports.stripFlags = stripFlags;
4064	exports.stripComment = stripComment;
4065	exports.preparePath = preparePath;
4066	exports.prepareMustache = prepareMustache;
4067	exports.prepareRawBlock = prepareRawBlock;
4068	exports.prepareBlock = prepareBlock;
4069
4070	var _Exception = __webpack_require__(12);
4071
4072	var _Exception2 = _interopRequireDefault(_Exception);
4073
4074	function SourceLocation(source, locInfo) {
4075	  this.source = source;
4076	  this.start = {
4077	    line: locInfo.first_line,
4078	    column: locInfo.first_column
4079	  };
4080	  this.end = {
4081	    line: locInfo.last_line,
4082	    column: locInfo.last_column
4083	  };
4084	}
4085
4086	function id(token) {
4087	  if (/^\[.*\]$/.test(token)) {
4088	    return token.substr(1, token.length - 2);
4089	  } else {
4090	    return token;
4091	  }
4092	}
4093
4094	function stripFlags(open, close) {
4095	  return {
4096	    open: open.charAt(2) === '~',
4097	    close: close.charAt(close.length - 3) === '~'
4098	  };
4099	}
4100
4101	function stripComment(comment) {
4102	  return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, '');
4103	}
4104
4105	function preparePath(data, parts, locInfo) {
4106	  locInfo = this.locInfo(locInfo);
4107
4108	  var original = data ? '@' : '',
4109	      dig = [],
4110	      depth = 0,
4111	      depthString = '';
4112
4113	  for (var i = 0, l = parts.length; i < l; i++) {
4114	    var part = parts[i].part,
4115
4116	    // If we have [] syntax then we do not treat path references as operators,
4117	    // i.e. foo.[this] resolves to approximately context.foo['this']
4118	    isLiteral = parts[i].original !== part;
4119	    original += (parts[i].separator || '') + part;
4120
4121	    if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
4122	      if (dig.length > 0) {
4123	        throw new _Exception2['default']('Invalid path: ' + original, { loc: locInfo });
4124	      } else if (part === '..') {
4125	        depth++;
4126	        depthString += '../';
4127	      }
4128	    } else {
4129	      dig.push(part);
4130	    }
4131	  }
4132
4133	  return new this.PathExpression(data, depth, dig, original, locInfo);
4134	}
4135
4136	function prepareMustache(path, params, hash, open, strip, locInfo) {
4137	  // Must use charAt to support IE pre-10
4138	  var escapeFlag = open.charAt(3) || open.charAt(2),
4139	      escaped = escapeFlag !== '{' && escapeFlag !== '&';
4140
4141	  return new this.MustacheStatement(path, params, hash, escaped, strip, this.locInfo(locInfo));
4142	}
4143
4144	function prepareRawBlock(openRawBlock, content, close, locInfo) {
4145	  if (openRawBlock.path.original !== close) {
4146	    var errorNode = { loc: openRawBlock.path.loc };
4147
4148	    throw new _Exception2['default'](openRawBlock.path.original + ' doesn\'t match ' + close, errorNode);
4149	  }
4150
4151	  locInfo = this.locInfo(locInfo);
4152	  var program = new this.Program([content], null, {}, locInfo);
4153
vendor: 4,702 bytes, lines 4154-4310
4154	  return new this.BlockStatement(openRawBlock.path, openRawBlock.params, openRawBlock.hash, program, undefined, {}, {}, {}, locInfo);
4155	}
4156
4157	function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
4158	  // When we are chaining inverse calls, we will not have a close path
4159	  if (close && close.path && openBlock.path.original !== close.path.original) {
4160	    var errorNode = { loc: openBlock.path.loc };
4161
4162	    throw new _Exception2['default'](openBlock.path.original + ' doesn\'t match ' + close.path.original, errorNode);
4163	  }
4164
4165	  program.blockParams = openBlock.blockParams;
4166
4167	  var inverse = undefined,
4168	      inverseStrip = undefined;
4169
4170	  if (inverseAndProgram) {
4171	    if (inverseAndProgram.chain) {
4172	      inverseAndProgram.program.body[0].closeStrip = close.strip;
4173	    }
4174
4175	    inverseStrip = inverseAndProgram.strip;
4176	    inverse = inverseAndProgram.program;
4177	  }
4178
4179	  if (inverted) {
4180	    inverted = inverse;
4181	    inverse = program;
4182	    program = inverted;
4183	  }
4184
4185	  return new this.BlockStatement(openBlock.path, openBlock.params, openBlock.hash, program, inverse, openBlock.strip, inverseStrip, close && close.strip, this.locInfo(locInfo));
4186	}
4187
4188/***/ },
4189/* 18 */
4190/***/ function(module, exports, __webpack_require__) {
4191
4192	'use strict';
4193
4194	exports.__esModule = true;
4195	/*global define */
4196
4197	var _isArray = __webpack_require__(13);
4198
4199	var SourceNode = undefined;
4200
4201	try {
4202	  /* istanbul ignore next */
4203	  if (false) {
4204	    // We don't support this in AMD environments. For these environments, we asusme that
4205	    // they are running on the browser and thus have no need for the source-map library.
4206	    var SourceMap = require('source-map');
4207	    SourceNode = SourceMap.SourceNode;
4208	  }
4209	} catch (err) {}
4210
4211	/* istanbul ignore if: tested but not covered in istanbul due to dist build  */
4212	if (!SourceNode) {
4213	  SourceNode = function (line, column, srcFile, chunks) {
4214	    this.src = '';
4215	    if (chunks) {
4216	      this.add(chunks);
4217	    }
4218	  };
4219	  /* istanbul ignore next */
4220	  SourceNode.prototype = {
4221	    add: function add(chunks) {
4222	      if (_isArray.isArray(chunks)) {
4223	        chunks = chunks.join('');
4224	      }
4225	      this.src += chunks;
4226	    },
4227	    prepend: function prepend(chunks) {
4228	      if (_isArray.isArray(chunks)) {
4229	        chunks = chunks.join('');
4230	      }
4231	      this.src = chunks + this.src;
4232	    },
4233	    toStringWithSourceMap: function toStringWithSourceMap() {
4234	      return { code: this.toString() };
4235	    },
4236	    toString: function toString() {
4237	      return this.src;
4238	    }
4239	  };
4240	}
4241
4242	function castChunk(chunk, codeGen, loc) {
4243	  if (_isArray.isArray(chunk)) {
4244	    var ret = [];
4245
4246	    for (var i = 0, len = chunk.length; i < len; i++) {
4247	      ret.push(codeGen.wrap(chunk[i], loc));
4248	    }
4249	    return ret;
4250	  } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
4251	    // Handle primitives that the SourceNode will throw up on
4252	    return chunk + '';
4253	  }
4254	  return chunk;
4255	}
4256
4257	function CodeGen(srcFile) {
4258	  this.srcFile = srcFile;
4259	  this.source = [];
4260	}
4261
4262	CodeGen.prototype = {
4263	  prepend: function prepend(source, loc) {
4264	    this.source.unshift(this.wrap(source, loc));
4265	  },
4266	  push: function push(source, loc) {
4267	    this.source.push(this.wrap(source, loc));
4268	  },
4269
4270	  merge: function merge() {
4271	    var source = this.empty();
4272	    this.each(function (line) {
4273	      source.add(['  ', line, '\n']);
4274	    });
4275	    return source;
4276	  },
4277
4278	  each: function each(iter) {
4279	    for (var i = 0, len = this.source.length; i < len; i++) {
4280	      iter(this.source[i]);
4281	    }
4282	  },
4283
4284	  empty: function empty() {
4285	    var loc = arguments[0] === undefined ? this.currentLocation || { start: {} } : arguments[0];
4286
4287	    return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
4288	  },
4289	  wrap: function wrap(chunk) {
4290	    var loc = arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
4291
4292	    if (chunk instanceof SourceNode) {
4293	      return chunk;
4294	    }
4295
4296	    chunk = castChunk(chunk, this, loc);
4297
4298	    return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
4299	  },
4300
4301	  functionCall: function functionCall(fn, type, params) {
4302	    params = this.generateList(params);
4303	    return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
4304	  },
4305
4306	  quotedString: function quotedString(str) {
4307	    return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4
4308	    .replace(/\u2029/g, '\\u2029') + '"';
4309	  },
4310
4311	  objectLiteral: function objectLiteral(obj) {
4312	    var pairs = [];
4313
4314	    for (var key in obj) {
4315	      if (obj.hasOwnProperty(key)) {
4316	        var value = castChunk(obj[key], this);
4317	        if (value !== 'undefined') {
4318	          pairs.push([this.quotedString(key), ':', value]);
4319	        }
4320	      }
4321	    }
4322
4323	    var ret = this.generateList(pairs);
4324	    ret.prepend('{');
4325	    ret.add('}');
4326	    return ret;
4327	  },
4328
4329	  generateList: function generateList(entries, loc) {
4330	    var ret = this.empty(loc);
4331
4332	    for (var i = 0, len = entries.length; i < len; i++) {
4333	      if (i) {
4334	        ret.add(',');
4335	      }
4336
4337	      ret.add(castChunk(entries[i], this, loc));
4338	    }
4339
4340	    return ret;
4341	  },
4342
4343	  generateArray: function generateArray(entries, loc) {
4344	    var ret = this.generateList(entries, loc);
4345	    ret.prepend('[');
4346	    ret.add(']');
4347
4348	    return ret;
4349	  }
4350	};
4351
4352	exports['default'] = CodeGen;
4353	module.exports = exports['default'];
4354
4355	/* NOP */
4356
4357/***/ }
4358/******/ ])
4359});
4360;
4361/*! jqBootstrapValidation - v1.3.7 - 2013-05-07
4362* http://reactiveraven.github.com/jqBootstrapValidation
4363* Copyright (c) 2013 David Godfrey; Licensed MIT */ 
4364(function(e){function s(e){return new RegExp("^"+e+"$")}function o(e,t){var n=Array.prototype.slice.call(arguments,2),r=e.split("."),i=r.pop();for(var s=0;s<r.length;s++)t=t[r[s]];return t[i].apply(t,n)}var t=[],n={options:{prependExistingHelpBlock:!1,sniffHtml:!0,preventSubmit:!0,submitError:!1,submitSuccess:!1,semanticallyStrict:!1,bindEvents:[],autoAdd:{helpBlocks:!0},filter:function(){return!0}},methods:{init:function(s){var o=e.extend(!0,{},n);o.options=e.extend(!0,o.options,s);var u=this,a=e.unique(u.map(function(){return e(this).parents("form")[0]}).toArray());return e(a).bind("submit.validationSubmit",function(t){var n=e(this),r=0,i=n.find("input,textarea,select").not("[type=submit],[type=image]").filter(o.options.filter),s=n.find(".control-group"),u=i.filter(function(){return e(this).triggerHandler("getValidatorCount.validation")>0});u.trigger("submit.validation"),i.trigger("validationLostFocus.validation"),s.each(function(t,n){var i=e(n);if(i.hasClass("warning")||i.hasClass("error"))i.removeClass("warning").addClass("error"),r++}),r?(o.options.preventSubmit&&(t.preventDefault(),t.stopImmediatePropagation()),n.addClass("error"),e.isFunction(o.options.submitError)&&o.options.submitError(n,t,u.jqBootstrapValidation("collectErrors",!0))):(n.removeClass("error"),e.isFunction(o.options.submitSuccess)&&o.options.submitSuccess(n,t))}),this.each(function(){var n=e(this),s=n.parents(".control-group").first(),u=s.find(".help-block").first(),a=n.parents("form").first(),f=[];!u.length&&o.options.autoAdd&&o.options.autoAdd.helpBlocks&&(u=e('<div class="help-block" />'),s.find(".controls").append(u),t.push(u[0]));if(o.options.sniffHtml){var l;n.data("validationPatternPattern")&&n.attr("pattern",n.data("validationPatternPattern")),n.attr("pattern")!==undefined&&(l="Not in the expected format<!-- data-validation-pattern-message to override -->",n.data("validationPatternMessage")&&(l=n.data("validationPatternMessage")),n.data("validationPatternMessage",l),n.data("validationPatternRegex",n.attr("pattern")));if(n.attr("max")!==undefined||n.attr("aria-valuemax")!==undefined){var c=n.attr("max")!==undefined?n.attr("max"):n.attr("aria-valuemax");l="Too high: Maximum of '"+c+"'<!-- data-validation-max-message to override -->",n.data("validationMaxMessage")&&(l=n.data("validationMaxMessage")),n.data("validationMaxMessage",l),n.data("validationMaxMax",c)}if(n.attr("min")!==undefined||n.attr("aria-valuemin")!==undefined){var h=n.attr("min")!==undefined?n.attr("min"):n.attr("aria-valuemin");l="Too low: Minimum of '"+h+"'<!-- data-validation-min-message to override -->",n.data("validationMinMessage")&&(l=n.data("validationMinMessage")),n.data("validationMinMessage",l),n.data("validationMinMin",h)}n.attr("maxlength")!==undefined&&(l="Too long: Maximum of '"+n.attr("maxlength")+"' characters<!-- data-validation-maxlength-message to override -->",n.data("validationMaxlengthMessage")&&(l=n.data("validationMaxlengthMessage")),n.data("validationMaxlengthMessage",l),n.data("validationMaxlengthMaxlength",n.attr("maxlength"))),n.attr("minlength")!==undefined&&(l="Too short: Minimum of '"+n.attr("minlength")+"' characters<!-- data-validation-minlength-message to override -->",n.data("validationMinlengthMessage")&&(l=n.data("validationMinlengthMessage")),n.data("validationMinlengthMessage",l),n.data("validationMinlengthMinlength",n.attr("minlength")));if(n.attr("required")!==undefined||n.attr("aria-required")!==undefined)l=o.builtInValidators.required.message,n.data("validationRequiredMessage")&&(l=n.data("validationRequiredMessage")),n.data("validationRequiredMessage",l);if(n.attr("type")!==undefined&&n.attr("type").toLowerCase()==="number"){l=o.validatorTypes.number.message,n.data("validationNumberMessage")&&(l=n.data("validationNumberMessage")),n.data("validationNumberMessage",l);
4364var p=o.validatorTypes.number.step;n.data("validationNumberStep")&&(p=n.data("validationNumberStep")),n.data("validationNumberStep",p);var d=o.validatorTypes.number.decimal;n.data("validationNumberDecimal")&&(d=n.data("validationNumberDecimal")),n.data("validationNumberDecimal",d)}n.attr("type")!==undefined&&n.attr("type").toLowerCase()==="email"&&(l="Not a valid email address<!-- data-validation-email-message to override -->",n.data("validationEmailMessage")&&(l=n.data("validationEmailMessage")),n.data("validationEmailMessage",l)),n.attr("minchecked")!==undefined&&(l="Not enough options checked; Minimum of '"+n.attr("minchecked")+"' required<!-- data-validation-minchecked-message to override -->",n.data("validationMincheckedMessage")&&(l=n.data("validationMincheckedMessage")),n.data("validationMincheckedMessage",l),n.data("validationMincheckedMinchecked",n.attr("minchecked"))),n.attr("maxchecked")!==undefined&&(l="Too many options checked; Maximum of '"+n.attr("maxchecked")+"' required<!-- data-validation-maxchecked-message to override -->
4364",n.data("validationMaxcheckedMessage")&&(l=n.data("validationMaxcheckedMessage")),n.data("validationMaxcheckedMessage",l),n.data("validationMaxcheckedMaxchecked",n.attr("maxchecked")))}n.data("validation")!==undefined&&(f=n.data("validation").split(",")),e.each(n.data(),function(e,t){var n=e.replace(/([A-Z])/g,",$1").split(",");n[0]==="validation"&&n[1]&&f.push(n[1])});var v=f,m=[],g=function(e,t){f[e]=r(t)},y=function(t,i){if(n.data("validation"+i+"Shortcut")!==undefined)e.each(n.data("validation"+i+"Shortcut").split(","),function(e,t){m.push(t)});else if(o.builtInValidators[i.toLowerCase()]){var s=o.builtInValidators[i.toLowerCase()];s.type.toLowerCase()==="shortcut"&&e.each(s.shortcut.split(","),function(e,t){t=r(t),m.push(t),f.push(t)})}};do e.each(f,g),f=e.unique(f),m=[],e.each(v,y),v=m;while(v.length>0);var b={};e.each(f,function(t,i){var s=n.data("validation"+i+"Message"),u=!!s,a=!1;s||(s="'"+i+"' validation failed <!-- Add attribute 'data-validation-"+i.toLowerCase()+"-message' to input to change this message -->"),e.each(o.validatorTypes,function(t,o){b[t]===undefined&&(b[t]=[]);if(!a&&n.data("validation"+i+r(o.name))!==undefined){var f=o.init(n,i);u&&(f.message=s),b[t].push(e.extend(!0,{name:r(o.name),message:s},f)),a=!0}});if(!a&&o.builtInValidators[i.toLowerCase()]){var f=e.extend(!0,{},o.builtInValidators[i.toLowerCase()]);u&&(f.message=s);var l=f.type.toLowerCase();
4364l==="shortcut"?a=!0:e.each(o.validatorTypes,function(t,s){b[t]===undefined&&(b[t]=[]),!a&&l===t.toLowerCase()&&(n.data("validation"+i+r(s.name),f[s.name.toLowerCase()]),b[l].push(e.extend(f,s.init(n,i))),a=!0)})}a||e.error("Cannot find validation info for '"+i+"'")}),u.data("original-contents",u.data("original-contents")?u.data("original-contents"):u.html()),u.data("original-role",u.data("original-role")?u.data("original-role"):u.attr("role")),s.data("original-classes",s.data("original-clases")?s.data("original-classes"):s.attr("class")),n.data("original-aria-invalid",n.data("original-aria-invalid")?n.data("original-aria-invalid"):n.attr("aria-invalid")),n.bind("validation.validation",function(t,r){var s=i(n),u=[];return e.each(b,function(t,i){(s||s.length||r&&r.includeEmpty||!!o.validatorTypes[t].includeEmpty||!!o.validatorTypes[t].blockSubmit&&r&&!!r.submitting)&&e.each(i,function(e,r){o.validatorTypes[t].validate(n,s,r)&&u.push(r.message)})}),u}),n.bind("getValidators.validation",function(){return b});var w=0;e.each(b,function(e,t){w+=t.length}),n.bind("getValidatorCount.validation",function(){return w}),n.bind("submit.validation",function(){return n.triggerHandler("change.validation",{submitting:!0})}),n.bind((o.options.bindEvents.length>0?o.options.bindEvents:["keyup","focus","blur","click","keydown","keypress","change"]).concat(["revalidate"]).join(".validation ")+".validation",function(t,r){var f=i(n),l=[];r&&!!r.submitting?s.data("jqbvIsSubmitting",!0):t.type!=="revalidate"&&s.data("jqbvIsSubmitting",!1);var c=!!s.data("jqbvIsSubmitting");s.find("input,textarea,select").each(function(t,i){var s=l.length;e.each(e(i).triggerHandler("validation.validation",r),function(e,t){l.push(t)});if(l.length>s)e(i).attr("aria-invalid","true");else{var o=n.data("original-aria-invalid");e(i).attr("aria-invalid",o!==undefined?o:!1)}}),a.find("input,select,textarea").not(n).not('[name="'+n.attr("name")+'"]').trigger("validationLostFocus.validation"),l=e.unique(l.sort()),l.length?(s.removeClass("success error warning").addClass(c?"error":"warning"),o.options.semanticallyStrict&&l.length===1?u.html(l[0]+(o.options.prependExistingHelpBlock?u.data("original-contents"):"")):u.html('<ul role="alert"><li>'+l.join("</li><li>")+"</li></ul>"+(o.options.prependExistingHelpBlock?u.data("original-contents"):""))):(s.removeClass("warning error success"),f.length>0&&s.addClass("success"),u.html(u.data("original-contents"))),t.type==="blur"&&s.removeClass("success")}),n.bind("validationLostFocus.validation",function(){s.removeClass("success")})})},destroy:function(){return this.each(function(){var n=e(this),r=n.parents(".control-group").first(),i=r.find(".help-block").first(),s=n.parents("form").first();n.unbind(".validation"),s.unbind(".validationSubmit"),i.html(i.data("original-contents")),r.attr("class",r.data("original-classes")),n.attr("aria-invalid",n.data("original-aria-invalid")),i.attr("role",n.data("original-role")),e.inArray(i[0],t)>-1&&i.remove()})},collectErrors:function(t){var n={};return this.each(function(t,r){var i=e(r),s=i.attr("name"),o=i.triggerHandler("validation.validation",{includeEmpty:!0});n[s]=e.extend(!0,o,n[s])}),e.each(n,function(e,t){t.length===0&&delete n[e]}),n},hasErrors:function(){var t=[];return this.find("input,select,textarea").add(this).each(function(n,r){t=t.concat(e(r).triggerHandler("getValidators.validation")?e(r).triggerHandler("validation.validation",{submitting:!0}):[])}),t.length>0},override:function(t){n=e.extend(!0,n,t)}},validatorTypes:{callback:{name:"callback",init:function(e,t){var n={validatorName:t,callback:e.data("validation"+t+"Callback"),lastValue:e.val(),lastValid:!0,lastFinished:!0},r="Not valid";return e.data("validation"+t+"Message")&&(r=e.data("validation"+t+"Message")),n.message=r,n},validate:function(e,t,n){if(n.lastValue===t&&n.lastFinished)return!n.lastValid;if(n.lastFinished===!0){n.lastValue=t,n.lastValid=!0,n.lastFinished=!1;var r=n,i=e;o(n.callback,window,e,t,function(t){r.lastValue===t.value&&(r.lastValid=t.valid,t.message&&(r.message=t.message),r.lastFinished=!0,i.data("validation"+r.validatorName+"Message",r.message),setTimeout(function(){!e.is(":focus")&&e.parents("form").first().data("jqbvIsSubmitting")?i.trigger("blur.validation"):i.trigger("revalidate.validation")},1))})}return!1}},ajax:{name:"ajax",init:function(e,t){return{validatorName:t,url:e.data("validation"+t+"Ajax"),lastValue:e.val(),lastValid:!0,lastFinished:!0}},validate:function(t,n,r){return""+r.lastValue==""+n&&r.lastFinished===!0?r.lastValid===!1:(r.lastFinished===!0&&(r.lastValue=n,r.lastValid=!0,r.lastFinished=!1,e.ajax({url:r.url,data:"value="+encodeURIComponent(n)+"&field="+t.attr("name"),dataType:"json",success:function(e){""+r.lastValue==""+e.value&&(r.lastValid=!!e.valid,e.message&&(r.message=e.message),r.lastFinished=!0,t.data("validation"+r.validatorName+"Message",r.message),setTimeout(function(){t.trigger("revalidate.validation")},1))},failure:function(){r.lastValid=!0,r.message="ajax call failed",r.lastFinished=!0,t.data("validation"+r.validatorName+"Message",r.message),setTimeout(function(){t.trigger("revalidate.validation")},1)}})),!1)}},regex:{name:"regex",init:function(t,n){var r={},i=t.data("validation"+n+"Regex");r.regex=s(i),i===undefined&&e.error("Can't find regex for '"+n+"' validator on '"+t.attr("name")+"'");var o="Not in the expected format";return t.data("validation"+n+"Message")&&(o=t.data("validation"+n+"Message")),r.message=o,r.originalName=n,r},validate:function(e,t,n){return!n.regex.test(t)&&!n.negative||n.regex.test(t)&&n.negative}},email:{name:"email",init:function(e,t){var n={};n.regex=s("[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}");var r="Not a valid email address";return e.data("validation"+t+"Message")&&(r=e.data("validation"+t+"Message")),n.message=r,n.originalName=t,n},validate:function(e,t,n){return!n.regex.test(t)&&!n.negative||n.regex.test(t)&&n.negative}},required:{name:"required",init:function(e,t){var n="This is required";return e.data("validation"+t+"Message")&&(n=e.data("validation"+t+"Message")),{message:n,includeEmpty:!0}},validate:function(e,t,n){return!!(t.length===0&&!n.negative||t.length>0&&n.negative)},blockSubmit:!0},match:{name:"match",init:function(t,n){var r=t.data("validation"+n+"Match"),i=t.parents("form").first(),s=i.find('[name="'+r+'"]').first();s.bind("validation.validation",function(){t.trigger("revalidate.validation",{submitting:!0})});var o={};o.element=s,s.length===0&&e.error("Can't find field '"+r+"' to match '"+t.attr("name")+"' against in '"+n+"' validator");var u="Must match",a=null;return(a=i.find('label[for="'+r+'"]')).length?u+=" '"+a.text()+"'":(a=s.parents(".control-group").first().find("label")).length&&(u+=" '"+a.first().text()+"'"),t.data("validation"+n+"Message")&&(u=t.data("validation"+n+"Message")),o.message=u,o},validate:function(e,t,n){return t!==n.element.val()&&!n.negative||t===n.element.val()&&n.negative},blockSubmit:!0,includeEmpty:!0},max:{name:"max",init:function(e,t){var n={};return n.max=e.data("validation"+t+"Max"),n.message="Too high: Maximum of '"+n.max+"'",e.data("validation"+t+"Message")&&(n.message=e.data("validation"+t+"Message")),n},validate:function(e,t,n){return parseFloat(t,10)>parseFloat(n.max,10)&&!n.negative||parseFloat(t,10)<=parseFloat(n.max,10)&&n.negative}},min:{name:"min",init:function(e,t){var n={};return n.min=e.data("validation"+t+"Min"),n.message="Too low: Minimum of '"+n.min+"'",e.data("validation"+t+"Message")&&(n.message=e.data("validation"+t+"Message")),n},validate:function(e,t,n){return parseFloat(t)<parseFloat(n.min)&&!n.negative||parseFloat(t)>=parseFloat(n.min)&&n.negative}},maxlength:{name:"maxlength",init:function(e,t){var n={};return n.maxlength=e.data("validation"+t+"Maxlength"),n.message="Too long: Maximum of '"+n.maxlength+"' characters",e.data("validation"+t+"Message")&&(n.message=e.data("validation"+t+"Message")),n},validate:function(e,t,n){return t.length>n.maxlength&&!n.negative||t.length<=n.maxlength&&n.negative}},minlength:{name:"minlength",init:function(e,t){var n={};return n.minlength=e.data("validation"+t+"Minlength"),n.message="Too short: Minimum of '"+n.minlength+"' characters",e.data("validation"+t+"Message")&&(n.message=e.data("validation"+t+"Message")),n},validate:function(e,t,n){return t.length<n.minlength&&!n.negative||t.length>=n.minlength&&n.negative}},maxchecked:{name:"maxchecked",init:function(e,t){var n={},r=e.parents("form").first().find('[name="'+e.attr("name")+'"]');r.bind("change.validation click.validation",function(){e.trigger("revalidate.validation",{includeEmpty:!0})}),n.elements=r,n.maxchecked=e.data("validation"+t+"Maxchecked");
4364var i="Too many: Max '"+n.maxchecked+"' checked";return e.data("validation"+t+"Message")&&(i=e.data("validation"+t+"Message")),n.message=i,n},validate:function(e,t,n){return n.elements.filter(":checked").length>n.maxchecked&&!n.negative||n.elements.filter(":checked").length<=n.maxchecked&&n.negative},blockSubmit:!0},minchecked:{name:"minchecked",init:function(e,t){var n={},r=e.parents("form").first().find('[name="'+e.attr("name")+'"]');r.bind("change.validation click.validation",function(){e.trigger("revalidate.validation",{includeEmpty:!0})}),n.elements=r,n.minchecked=e.data("validation"+t+"Minchecked");var i="Too few: Min '"+n.minchecked+"' checked";return e.data("validation"+t+"Message")&&(i=e.data("validation"+t+"Message")),n.message=i,n},validate:function(e,t,n){return n.elements.filter(":checked").length<n.minchecked&&!n.negative||n.elements.filter(":checked").length>=n.minchecked&&n.negative},blockSubmit:!0,includeEmpty:!0},number:{name:"number",init:function(e,t){var n={};n.step=1,e.attr("step")&&(n.step=e.attr("step")),e.data("validation"+t+"Step")&&(n.step=e.data("validation"+t+"Step")),n.decimal=".",e.data("validation"+t+"Decimal")&&(n.decimal=e.data("validation"+t+"Decimal")),n.thousands="",e.data("validation"+t+"Thousands")&&(n.thousands=e.data("validation"+t+"Thousands")),n.regex=s("([+-]?\\d+(\\"+n.decimal+"\\d+)?)?"),n.message="Must be a number";var r=e.data("validation"+t+"Message");return r&&(n.message=r),n},validate:function(e,t,n){var r=t.replace(n.decimal,".").replace(n.thousands,""),i=parseFloat(r),s=parseFloat(n.step);while(s%1!==0)s=parseFloat(s.toPrecision(12))*10,i=parseFloat(i.toPrecision(12))*10;var o=n.regex.test(t),u=parseFloat(i)%parseFloat(s)===0,a=!isNaN(parseFloat(r))&&isFinite(r),f=!(o&&u&&a);return f},message:"Must be a number"}},builtInValidators:{email:{name:"Email",type:"email"},passwordagain:{name:"Passwordagain",type:"match",match:"password",message:"Does not match the given password<!-- data-validator-paswordagain-message to override -->"},positive:{name:"Positive",type:"shortcut",shortcut:"number,positivenumber"},negative:{name:"Negative",type:"shortcut",shortcut:"number,negativenumber"},integer:{name:"Integer",type:"regex",regex:"[+-]?\\d+",message:"No decimal places allowed<!-- data-validator-integer-message to override -->"},positivenumber:{name:"Positivenumber",type:"min",min:0,message:"Must be a positive number<!-- data-validator-positivenumber-message to override -->"},negativenumber:{name:"Negativenumber",type:"max",max:0,message:"Must be a negative number<!-- data-validator-negativenumber-message to override -->"},required:{name:"Required",type:"required",message:"This is required<!-- data-validator-required-message to override -->"},checkone:{name:"Checkone",type:"minchecked",minchecked:1,message:"Check at least one option<!-- data-validation-checkone-message to override -->"},number:{name:"Number",type:"number",decimal:".",step:"1"},pattern:{name:"Pattern",type:"regex",message:"Not in expected format"}}},r=function(e){return e.toLowerCase().replace(/(^|\s)([a-z])/g,function(e,t,n){return t+n.toUpperCase()})},i=function(t){var n=null,r=t.attr("type");if(r==="checkbox"){n=t.is(":checked")?n:"";var i=t.parents("form").first()||t.parents(".control-group").first();i&&(n=i.find("input[name='"+t.attr("name")+"']:checked").map(function(t,n){return e(n).val()}).toArray().join(","))}else if(r==="radio"){n=e('input[name="'+t.attr("name")+'"]:checked').length>0?t.val():"";var s=t.parents("form").first()||t.parents(".control-group").first();s&&(n=s.find("input[name='"+t.attr("name")+"']:checked").map(function(t,n){return e(n).val()}).toArray().join(","))}else n=t.val();return n};e.fn.jqBootstrapValidation=function(t){return n.methods[t]?n.methods[t].apply(this,Array.prototype.slice.call(arguments,1)):typeof t=="object"||!t?n.methods.init.apply(this,arguments):(e.error("Method "+t+" does not exist on jQuery.jqBootstrapValidation"),null)},e.jqBootstrapValidation=function(t){e(":input").not("[type=image],[type=submit]").jqBootstrapValidation.apply(this,arguments)}})(jQuery);
4365(function(){var d=null;function e(a){return function(b){this[a]=b}}function h(a){return function(){return this[a]}}var j;
4366function k(a,b,c){this.extend(k,google.maps.OverlayView);this.c=a;this.a=[];this.f=[];this.ca=[53,56,66,78,90];this.j=[];this.A=!1;c=c||{};this.g=c.gridSize||60;this.l=c.minimumClusterSize||2;this.J=c.maxZoom||d;this.j=c.styles||[];this.X=c.imagePath||this.Q;this.W=c.imageExtension||this.P;this.O=!0;
4366if(c.zoomOnClick!=void 0)this.O=c.zoomOnClick;this.r=!1;if(c.averageCenter!=void 0)this.r=c.averageCenter;l(this);this.setMap(a);this.K=this.c.getZoom();var f=this;google.maps.event.addListener(this.c,
4367"zoom_changed",function(){var a=f.c.getZoom();if(f.K!=a)f.K=a,f.m()});google.maps.event.addListener(this.c,"idle",function(){f.i()});b&&b.length&&this.C(b,!1)}j=k.prototype;j.Q="https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m";j.P="png";j.extend=function(a,b){return function(a){for(var b in a.prototype)this.prototype[b]=a.prototype[b];return this}.apply(a,[b])};j.onAdd=function(){if(!this.A)this.A=!0,n(this)};j.draw=function(){};
4368function l(a){if(!a.j.length)for(var b=0,c;c=a.ca[b];b++)a.j.push({url:a.X+(b+1)+"."+a.W,height:c,width:c})}j.S=function(){for(var a=this.o(),b=new google.maps.LatLngBounds,c=0,f;f=a[c];c++)b.extend(f.getPosition());this.c.fitBounds(b)};j.z=h("j");j.o=h("a");j.V=function(){return this.a.length};j.ba=e("J");j.I=h("J");j.G=function(a,b){for(var c=0,f=a.length,g=f;g!==0;)g=parseInt(g/10,10),c++;c=Math.min(c,b);return{text:f,index:c}};j.$=e("G");j.H=h("G");
4369j.C=function(a,b){for(var c=0,f;f=a[c];c++)q(this,f);b||this.i()};function q(a,b){b.s=!1;b.draggable&&google.maps.event.addListener(b,"dragend",function(){b.s=!1;a.L()});a.a.push(b)}j.q=function(a,b){q(this,a);b||this.i()};function r(a,b){var c=-1;if(a.a.indexOf)c=a.a.indexOf(b);else for(var f=0,g;g=a.a[f];f++)if(g==b){c=f;break}if(c==-1)return!1;b.setMap(d);a.a.splice(c,1);return!0}j.Y=function(a,b){var c=r(this,a);return!b&&c?(this.m(),this.i(),!0):!1};
4370j.Z=function(a,b){for(var c=!1,f=0,g;g=a[f];f++)g=r(this,g),c=c||g;if(!b&&c)return this.m(),this.i(),!0};j.U=function(){return this.f.length};j.getMap=h("c");j.setMap=e("c");j.w=h("g");j.aa=e("g");
4371j.v=function(a){var b=this.getProjection(),c=new google.maps.LatLng(a.getNorthEast().lat(),a.getNorthEast().lng()),f=new google.maps.LatLng(a.getSouthWest
4371().lat(),a.getSouthWest().lng()),c=b.fromLatLngToDivPixel(c);c.x+=this.g;c.y-=this.g;f=b.fromLatLngToDivPixel(f);f.x-=this.g;f.y+=this.g;c=b.fromDivPixelToLatLng(c);b=b.fromDivPixelToLatLng(f);a.extend(c);a.extend(b);return a};j.R=function(){this.m(!0);this.a=[]};
4372j.m=function(a){for(var b=0,c;c=this.f[b];b++)c.remove();for(b=0;c=this.a[b];b++)c.s=!1,a&&c.setMap(d);this.f=[]};j.L=function(){var a=this.f.slice();this.f.length=0;this.m();this.i();window.setTimeout(function(){for(var b=0,c;c=a[b];b++)c.remove()},0)};j.i=function(){n(this)};
4373function n(a){if(a.A)for(var b=a.v(new google.maps.LatLngBounds(a.c.getBounds().getSouthWest(),a.c.getBounds().getNorthEast())),c=0,f;f=a.a[c];c++)if(!f.s&&b.contains(f.getPosition())){for(var g=a,u=4E4,o=d,v=0,m=void 0;m=g.f[v];v++){var i=m.getCenter();if(i){var p=f.getPosition();if(!i||!p)i=0;else var w=(p.lat()-i.lat())*Math.PI/180,x=(p.lng()-i.lng())*Math.PI/180,i=Math.sin(w/2)*Math.sin(w/2)+Math.cos(i.lat()*Math.PI/180)*Math.cos(p.lat()*Math.PI/180)*Math.sin(x/2)*Math.sin(x/2),i=6371*2*Math.atan2(Math.sqrt(i),
4374Math.sqrt(1-i));i<u&&(u=i,o=m)}}o&&o.F.contains(f.getPosition())?o.q(f):(m=new s(g),m.q(f),g.f.push(m))}}function s(a){this.k=a;this.c=a.getMap();this.g=a.w();this.l=a.l;this.r=a.r;this.d=d;this.a=[];this.F=d;this.n=new t(this,a.z(),a.w())}j=s.prototype;
4375j.q=function(a){var b;a:if(this.a.indexOf)b=this.a.indexOf(a)!=-1;else{b=0;for(var c;c=this.a[b];b++)if(c==a){b=!0;break a}b=!1}if(b)return!1;if(this.d){if(this.r)c=this.a.length+1,b=(this.d.lat()*(c-1)+a.getPosition().lat())/c,c=(this.d.lng()*(c-1)+a.getPosition().lng())/c,this.d=new google.maps.LatLng(b,c),y(this)}else this.d=a.getPosition(),y(this);a.s=!0;this.a.push(a);b=this.a.length;b<this.l&&a.getMap()!=this.c&&a.setMap(this.c);if(b==this.l)for(c=0;c<b;c++)this.a[c].setMap(d);b>=this.l&&a.setMap(d);
4376a=this.c.getZoom();if((b=this.k.I())&&a>b)for(a=0;b=this.a[a];a++)b.setMap(this.c);else if(this.a.length<this.l)z(this.n);else{b=this.k.H()(this.a,this.k.z().length);this.n.setCenter(this.d);a=this.n;a.B=b;a.ga=b.text;a.ea=b.index;if(a.b)a.b.innerHTML=b.text;b=Math.max(0,a.B.index-1);b=Math.min(a.j.length-1,b);b=a.j[b];a.da=b.url;a.h=b.height;a.p=b.width;a.M=b.textColor;a.e=b.anchor;a.N=b.textSize;a.D=b.backgroundPosition;this.n.show()}return!0};
4377j.getBounds=function(){for(var a=new google.maps.LatLngBounds(this.d,this.d),b=this.o(),c=0,f;f=b[c];c++)a.extend(f.getPosition());return a};j.remove=function(){this.n.remove();this.a.length=0;delete this.a};j.T=function(){return this.a.length};j.o=h("a");j.getCenter=h("d");function y(a){a.F=a.k.v(new google.maps.LatLngBounds(a.d,a.d))}j.getMap=h("c");
4378function t(a,b,c){a.k.extend(t,google.maps.OverlayView);this.j=b;this.fa=c||0;this.u=a;this.d=d;this.c=a.getMap();this.B=this.b=d;this.t=!1;this.setMap(this.c)}j=t.prototype;
4379j.onAdd=function(){this.b=document.createElement("DIV");if(this.t)this.b.style.cssText=A(this,B(this,this.d)),this.b.innerHTML=this.B.text;this.getPanes().overlayMouseTarget.appendChild(this.b);var a=this;google.maps.event.addDomListener(this.b,"click",function(){var b=a.u.k;google.maps.event.trigger(b,"clusterclick",a.u);b.O&&a.c.fitBounds(a.u.getBounds())})};function B(a,b){var c=a.getProjection().fromLatLngToDivPixel(b);c.x-=parseInt(a.p/2,10);c.y-=parseInt(a.h/2,10);return c}
4380j.draw=function(){if(this.t){var a=B(this,this.d);this.b.style.top=a.y+"px";this.b.style.left=a.x+"px"}};function z(a){if(a.b)a.b.style.display="none";a.t=!1}j.show=function(){if(this.b)this.b.style.cssText=A(this,B(this,this.d)),this.b.style.display="";this.t=!0};j.remove=function(){this.setMap(d)};j.onRemove=function(){if(this.b&&this.b.parentNode)z(this),this.b.parentNode.removeChild(this.b),this.b=d};j.setCenter=e("d");
4381function A(a,b){var c=[];c.push("background-image:url("+a.da+");");c.push("background-position:"+(a.D?a.D:"0 0")+";");typeof a.e==="object"?(typeof a.e[0]==="number"&&a.e[0]>0&&a.e[0]<a.h?c.push("height:"+(a.h-a.e[0])+"px; padding-top:"+a.e[0]+"px;"):c.push("height:"+a.h+"px; line-height:"+a.h+"px;"),typeof a.e[1]==="number"&&a.e[1]>0&&a.e[1]<a.p?c.push("width:"+(a.p-a.e[1])+"px; padding-left:"+a.e[1]+"px;"):c.push("width:"+a.p+"px; text-align:center;")):c.push("height:"+a.h+"px; line-height:"+a.h+
4382"px; width:"+a.p+"px; text-align:center;");c.push("cursor:pointer; top:"+b.y+"px; left:"+b.x+"px; color:"+(a.M?a.M:"black")+"; position:absolute; font-size:"+(a.N?a.N:11)+"px; font-family:Arial,sans-serif; font-weight:bold");return c.join("")}window.MarkerClusterer=k;k.prototype.addMarker=k.prototype.q;k.prototype.addMarkers=k.prototype.C;k.prototype.clearMarkers=k.prototype.R;k.prototype.fitMapToMarkers=k.prototype.S;k.prototype.getCalculator=k.prototype.H;k.prototype.getGridSize=k.prototype.w;
4383k.prototype.getExtendedBounds=k.prototype.v;k.prototype.getMap=k.prototype.getMap;k.prototype.getMarkers=k.prototype.o;k.prototype.getMaxZoom=k.prototype.I;k.prototype.getStyles=k.prototype.z;k.prototype.getTotalClusters=k.prototype.U;k.prototype.getTotalMarkers=k.prototype.V;k.prototype.redraw=k.prototype.i;k.prototype.removeMarker=k.prototype.Y;k.prototype.removeMarkers=k.prototype.Z;k.prototype.resetViewport=k.prototype.m;k.prototype.repaint=k.prototype.L;k.prototype.setCalculator=k.prototype.$;
4384k.prototype.setGridSize=k.prototype.aa;k.prototype.setMaxZoom=k.prototype.ba;k.prototype.onAdd=k.prototype.onAdd;k.prototype.draw=k.prototype.draw;s.prototype.getCenter=s.prototype.getCenter;s.prototype.getSize=s.prototype.T;s.prototype.getMarkers=s.prototype.o;t.prototype.onAdd=t.prototype.onAdd;t.prototype.draw=t.prototype.draw;t.prototype.onRemove=t.prototype.onRemove;
4385})();
4386
4387/*!
4388 * Shuffle.js by @Vestride
4389 * Categorize, sort, and filter a responsive grid of items.
4390 * Dependencies: jQuery 1.9+, Modernizr 2.6.2+
4391 * @license MIT license
4392 * @version 3.1.1
4393 */
4394window.Modernizr=function(a,b,c){function d(a){s.cssText=a}function e(a,b){return typeof a===b}function f(a,b){return!!~(""+a).indexOf(b)}function g(a,b){for(var d in a){var e=a[d];if(!f(e,"-")&&s[e]!==c)return"pfx"==b?e:!0}return!1}function h(a,b,d){for(var f in a){var g=b[a[f]];if(g!==c)return d===!1?a[f]:e(g,"function")?g.bind(d||b):g}return!1}function i(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),f=(a+" "+v.join(d+" ")+d).split(" ");return e(b,"string")||e(b,"undefined")?g(f,b):(f=(a+" "+w.join(d+" ")+d).split(" "),h(f,b,c))}var j,k,l,m="2.6.2",n={},o=!0,p=b.documentElement,q="modernizr",r=b.createElement(q),s=r.style,t=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),u="Webkit Moz O ms",v=u.split(" "),w=u.toLowerCase().split(" "),x={},y=[],z=y.slice,A=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,l=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:q+(d+1),j.appendChild(h);return f=["&#173;",'<style id="s',q,'">',a,"</style>
4394"].join(""),j.id=q,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=p.style.overflow,p.style.overflow="hidden",p.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),p.style.overflow=i),!!g},B={}.hasOwnProperty;l=e(B,"undefined")||e(B.call,"undefined")?function(a,b){return b in a&&e(a.constructor.prototype[b],"undefined")}:function(a,b){return B.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=z.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(z.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(z.call(arguments)))};return d}),x.csstransforms=function(){return!!i("transform")},x.csstransforms3d=function(){var a=!!i("perspective");return a&&"webkitPerspective"in p.style&&A("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b){a=9===b.offsetLeft&&3===b.offsetHeight}),a},x.csstransitions=function(){return i("transition")};for(var C in x)l(x,C)&&(k=C.toLowerCase(),n[k]=x[C](),y.push((n[k]?"":"no-")+k));return n.addTest=function(a,b){if("object"==typeof a)for(var d in a)l(a,d)&&n.addTest(d,a[d]);else{if(a=a.toLowerCase(),n[a]!==c)return n;b="function"==typeof b?b():b,"undefined"!=typeof o&&o&&(p.className+=" "+(b?"":"no-")+a),n[a]=b}return n},d(""),r=j=null,n._version=m,n._prefixes=t,n._domPrefixes=w,n._cssomPrefixes=v,n.testProp=function(a){return g([a])},n.testAllProps=i,n.testStyles=A,n.prefixed=function(a,b,c){return b?i(a,b,c):i(a,"pfx")},p.className=p.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(o?" js "+y.join(" "):""),n}(this,this.document),function(a){"function"==typeof define&&define.amd?define(["jquery","modernizr"],a):"object"==typeof exports?module.exports=a(require("jquery"),window.Modernizr):window.Shuffle=a(window.jQuery,window.Modernizr)}(function(a,b,c){"use strict";function d(a){return a?a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()}).replace(/^ms-/,"-ms-"):""}function e(b,c,d){var e,f,g,h=null,i=0;d=d||{};var j=function(){i=d.leading===!1?0:a.now(),h=null,g=b.apply(e,f),e=f=null};return function(){var k=a.now();i||d.leading!==!1||(i=k);var l=c-(k-i);return e=this,f=arguments,0>=l||l>c?(clearTimeout(h),h=null,i=k,g=b.apply(e,f),e=f=null):h||d.trailing===!1||(h=setTimeout(j,l)),g}}function f(a,b,c){for(var d=0,e=a.length;e>d;d++)if(b.call(c,a[d],d,a)==={})return}function g(b,c,d){return setTimeout(a.proxy(b,c),d)}function h(a){return Math.max.apply(Math,a)}function i(a){return Math.min.apply(Math,a)}function j(b){return a.isNumeric(b)?b:0}function k(a){var b,c,d=a.length;if(!d)return a;for(;--d;)c=Math.floor(Math.random()*(d+1)),b=a[c],a[c]=a[d],a[d]=b;return a}if("object"!=typeof b)throw new Error("Shuffle.js requires Modernizr.\nhttp://vestride.github.io/Shuffle/#dependencies");var l=b.prefixed("transition"),m=b.prefixed("transitionDelay"),n=b.prefixed("transitionDuration"),o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[l],p=b.prefixed("transform"),q=d(p),r=b.csstransforms&&b.csstransitions,s=b.csstransforms3d,t=!!window.getComputedStyle,u="shuffle",v="all",w="groups",x=1,y=.001,z=window.getComputedStyle||function(){},A=function(a,b){this.x=j(a),this.y=j(b)};A.equals=function(a,b){return a.x===b.x&&a.y===b.y};var B=function(){if(!t)return!1;var a=document.body||document.documentElement,b=document.createElement("div");b.style.cssText="width:10px;padding:2px;-webkit-box-sizing:border-box;box-sizing:border-box;",a.appendChild(b);var c=z(b,null).width,d="10px"===c;return a.removeChild(b),d}(),C=0,D=a(window),E=function(b,c){c=c||{},a.extend(this,E.options,c,E.settings),this.$el=a(b),this.element=b,this.unique="shuffle_"+C++,this._fire(E.EventType.LOADING),this._init(),g(function(){this.initialized=!0,this._fire(E.EventType.DONE)},this,16)};return E.EventType={LOADING:"loading",DONE:"done",LAYOUT:"layout",REMOVED:"removed"},E.ClassName={BASE:u,SHUFFLE_ITEM:"shuffle-item",FILTERED:"filtered",CONCEALED:"concealed"},E.options={group:v,speed:250,easing:"ease-out",itemSelector:"",sizer:null,gutterWidth:0,columnWidth:0,delimeter:null,buffer:0,columnThreshold:t?.01:.1,initialSort:null,throttle:e,throttleTime:300,sequentialFadeDelay:150,supported:r},E.settings={useSizer:!1,itemCss:{position:"absolute",top:0,left:0,visibility:"visible"},revealAppendedDelay:300,lastSort:{},lastFilter:v,enabled:!0,destroyed:!1,initialized:!1,_animations:[],_transitions:[],_isMovementCanceled:!1,styleQueue:[]},E.Point=A,E._getItemTransformString=function(a,b){return s?"translate3d("+a.x+"px, "+a.y+"px, 0) scale3d("+b+", "+b+", 1)":"translate("+a.x+"px, "+a.y+"px) scale("+b+")"},E._getNumberStyle=function(b,c,d){if(t){d=d||z(b,null);var e=E._getFloat(d[c]);return B||"width"!==c?B||"height"!==c||(e+=E._getFloat(d.paddingTop)+E._getFloat(d.paddingBottom)+E._getFloat(d.borderTopWidth)+E._getFloat(d.borderBottomWidth)):e+=E._getFloat(d.paddingLeft)+E._getFloat(d.paddingRight)+E._getFloat(d.borderLeftWidth)+E._getFloat(d.borderRightWidth),e}return E._getFloat(a(b).css(c))},E._getFloat=function(a){return j(parseFloat(a))},E._getOuterWidth=function(a,b){var c=z(a,null),d=E._getNumberStyle(a,"width",c);if(b){var e=E._getNumberStyle(a,"marginLeft",c),f=E._getNumberStyle(a,"marginRight",c);d+=e+f}return d},E._getOuterHeight=function(a,b){var c=z(a,null),d=E._getNumberStyle(a,"height",c);if(b){var e=E._getNumberStyle(a,"marginTop",c),f=E._getNumberStyle(a,"marginBottom",c);d+=e+f}return d},E._skipTransition=function(a,b,c){var d=a.style[n];a.style[n]="0ms",b.call(c);var e=a.offsetWidth;e=null,a.style[n]=d},E.prototype._init=function(){this.$items=this._getItems(),this.sizer=this._getElementOption(this.sizer),this.sizer&&(this.useSizer=!0),this.$el.addClass(E.ClassName.BASE),this._initItems(),D.on("resize."+u+"."+this.unique,this._getResizeFunction());var a=this.$el.css(["position","overflow"]),b=E._getOuterWidth(this.element);
4394this._validateStyles(a),this._setColumns(b),this.shuffle(this.group,this.initialSort),this.supported&&g(function(){this._setTransitions(),this.element.style[l]="height "+this.speed+"ms "+this.easing},this)},E.prototype._getResizeFunction=function(){var b=a.proxy(this._onResize,this);return this.throttle?this.throttle(b,this.throttleTime):b},E.prototype._getElementOption=function(a){return"string"==typeof a?this.$el.find(a)[0]||null:a&&a.nodeType&&1===a.nodeType?a:a&&a.jquery?a[0]:null},E.prototype._validateStyles=function(a){"static"===a.position&&(this.element.style.position="relative"),"hidden"!==a.overflow&&(this.element.style.overflow="hidden")},E.prototype._filter=function(a,b){a=a||this.lastFilter,b=b||this.$items;var c=this._getFilteredSets(a,b);return this._toggleFilterClasses(c.filtered,c.concealed),this.lastFilter=a,"string"==typeof a&&(this.group=a),c.filtered},E.prototype._getFilteredSets=function(b,c){var d=a(),e=a();return b===v?d=c:f(c,function(c){var f=a(c);this._doesPassFilter(b,f)?d=d.add(f):e=e.add(f)},this),{filtered:d,concealed:e}},E.prototype._doesPassFilter=function(b,c){if(a.isFunction(b))return b.call(c[0],c,this);var d=c.data(w),e=this.delimeter&&!a.isArray(d)?d.split(this.delimeter):d;return a.inArray(b,e)>-1},E.prototype._toggleFilterClasses=function(a,b){a.removeClass(E.ClassName.CONCEALED).addClass(E.ClassName.FILTERED),b.removeClass(E.ClassName.FILTERED).addClass(E.ClassName.CONCEALED)},E.prototype._initItems=function(a){a=a||this.$items,a.addClass([E.ClassName.SHUFFLE_ITEM,E.ClassName.FILTERED].join(" ")),a.css(this.itemCss).data("point",new A).data("scale",x)},E.prototype._updateItemCount=function(){this.visibleItems=this._getFilteredItems().length},E.prototype._setTransition=function(a){a.style[l]=q+" "+this.speed+"ms "+this.easing+", opacity "+this.speed+"ms "+this.easing},E.prototype._setTransitions=function(a){a=a||this.$items,f(a,function(a){this._setTransition(a)},this)},E.prototype._setSequentialDelay=function(a){this.supported&&f(a,function(a,b){a.style[m]="0ms,"+(b+1)*this.sequentialFadeDelay+"ms"},this)},E.prototype._getItems=function(){return this.$el.children(this.itemSelector)},E.prototype._getFilteredItems=function(){return this.$items.filter("."+E.ClassName.FILTERED)},E.prototype._getConcealedItems=function(){return this.$items.filter("."+E.ClassName.CONCEALED)},E.prototype._getColumnSize=function(b,c){var d;return d=a.isFunction(this.columnWidth)?this.columnWidth(b):this.useSizer?E._getOuterWidth(this.sizer):this.columnWidth?this.columnWidth:this.$items.length>0?E._getOuterWidth(this.$items[0],!0):b,0===d&&(d=b),d+c},E.prototype._getGutterSize=function(b){var c;return c=a.isFunction(this.gutterWidth)?this.gutterWidth(b):this.useSizer?E._getNumberStyle(this.sizer,"marginLeft"):this.gutterWidth},E.prototype._setColumns=function(a){var b=a||E._getOuterWidth(this.element),c=this._getGutterSize(b),d=this._getColumnSize(b,c),e=(b+c)/d;Math.abs(Math.round(e)-e)<this.columnThreshold&&(e=Math.round(e)),this.cols=Math.max(Math.floor(e),1),this.containerWidth=b,this.colWidth=d},E.prototype._setContainerSize=function(){this.$el.css("height",this._getContainerSize())},E.prototype._getContainerSize=function(){return h(this.positions)},E.prototype._fire=function(a,b){this.$el.trigger(a+"."+u,b&&b.length?b:[this])},E.prototype._resetCols=function(){var a=this.cols;for(this.positions=[];a--;)this.positions.push(0)},E.prototype._layout=function(a,b){f(a,function(a){this._layoutItem(a,!!b)},this),this._processStyleQueue(),this._setContainerSize()},E.prototype._layoutItem=function(b,c){var d=a(b),e=d.data(),f=e.point,g=e.scale,h={width:E._getOuterWidth(b,!0),height:E._getOuterHeight(b,!0)},i=this._getItemPosition(h);A.equals(f,i)&&g===x||(e.point=i,e.scale=x,this.styleQueue.push({$item:d,point:i,scale:x,opacity:c?0:1,skipTransition:c||0===this.speed,callfront:function(){c||d.css("visibility","visible")},callback:function(){c&&d.css("visibility","hidden")}}))},E.prototype._getItemPosition=function(a){for(var b=this._getColumnSpan(a.width,this.colWidth,this.cols),c=this._getColumnSet(b,this.cols),d=this._getShortColumn(c,this.buffer),e=new A(M
4394ath.round(this.colWidth*d),Math.round(c[d])),f=c[d]+a.height,g=this.cols+1-c.length,h=0;g>h;h++)this.positions[d+h]=f;return e},E.prototype._getColumnSpan=function(a,b,c){var d=a/b;return Math.abs(Math.round(d)-d)<this.columnThreshold&&(d=Math.round(d)),Math.min(Math.ceil(d),c)},E.prototype._getColumnSet=function(a,b){if(1===a)return this.positions;for(var c=b+1-a,d=[],e=0;c>e;e++)d[e]=h(this.positions.slice(e,e+a));return d},E.prototype._getShortColumn=function(a,b){for(var c=i(a),d=0,e=a.length;e>d;d++)if(a[d]>=c-b&&a[d]<=c+b)return d;return 0},E.prototype._shrink=function(b){var c=b||this._getConcealedItems();f(c,function(b){var c=a(b),d=c.data();d.scale!==y&&(d.scale=y,this.styleQueue.push({$item:c,point:d.point,scale:y,opacity:0,callback:function(){c.css("visibility","hidden")}}))},this)},E.prototype._onResize=function(){if(this.enabled&&!this.destroyed){var a=E._getOuterWidth(this.element);a!==this.containerWidth&&this.update()}},E.prototype._getStylesForTransition=function(a){var b={opacity:a.opacity};return this.supported?b[p]=E._getItemTransformString(a.point,a.scale):(b.left=a.point.x,b.top=a.point.y),b},E.prototype._transition=function(b){var c=this._getStylesForTransition(b);this._startItemAnimation(b.$item,c,b.callfront||a.noop,b.callback||a.noop)},E.prototype._startItemAnimation=function(b,c,d,e){function f(b){b.target===b.currentTarget&&(a(b.target).off(o,f),g._removeTransitionReference(h),e())}var g=this,h={$element:b,handler:f};if(d(),!this.initialized)return b.css(c),void e();if(this.supported)b.css(c),b.on(o,f),this._transitions.push(h);else{var i=b.stop(!0).animate(c,this.speed,"swing",e);this._animations.push(i.promise())}},E.prototype._processStyleQueue=function(b){this.isTransitioning&&this._cancelMovement();var c=a();f(this.styleQueue,function(a){a.skipTransition?this._styleImmediately(a):(c=c.add(a.$item),this._transition(a))},this),c.length>0&&this.initialized&&this.speed>0?(this.isTransitioning=!0,this.supported?this._whenCollectionDone(c,o,this._movementFinished):this._whenAnimationsDone(this._movementFinished)):b||g(this._layoutEnd,this),this.styleQueue.length=0},E.prototype._cancelMovement=function(){this.supported?f(this._transitions,function(a){a.$element.off(o,a.handler)}):(this._isMovementCanceled=!0,this.$items.stop(!0),this._isMovementCanceled=!1),this._transitions.length=0,this.isTransitioning=!1},E.prototype._removeTransitionReference=function(b){var c=a.inArray(b,this._transitions);c>-1&&this._transitions.splice(c,1)},E.prototype._styleImmediately=function(a){E._skipTransition(a.$item[0],function(){a.$item.css(this._getStylesForTransition(a))},this)},E.prototype._movementFinished=function(){this.isTransitioning=!1,this._layoutEnd()},E.prototype._layoutEnd=function(){this._fire(E.EventType.LAYOUT)},E.prototype._addItems=function(a,b,c){this._initItems(a),this._setTransitions(a),this.$items=this._getItems(),this._shrink(a),f(this.styleQueue,function(a){a.skipTransition=!0}),this._processStyleQueue(!0),b?this._addItemsToEnd(a,c):this.shuffle(this.lastFilter)},E.prototype._addItemsToEnd=function(a,b){var c=this._filter(null,a),d=c.get();this._updateItemCount(),this._layout(d,!0),b&&this.supported&&this._setSequentialDelay(d),this._revealAppended(d)},E.prototype._revealAppended=function(b){g(function(){f(b,function(b){var c=a(b);this._transition({$item:c,opacity:1,point:c.data("point"),scale:x})},this),this._whenCollectionDone(a(b),o,function(){a(b).css(m,"0ms"),this._movementFinished()})},this,this.revealAppendedDelay)},E.prototype._whenCollectionDone=function(b,c,d){function e(b){b.target===b.currentTarget&&(a(b.target).off(c,e),f++,f===g&&(h._removeTransitionReference(i),d.call(h)))}var f=0,g=b.length,h=this,i={$element:b,handler:e};b.on(c,e),this._transitions.push(i)},E.prototype._whenAnimationsDone=function(b){a.when.apply(null,this._animations).always(a.proxy(function(){this._animations.length=0,this._isMovementCanceled||b.call(this)},this))},E.prototype.shuffle=function(a,b){this.enabled&&(a||(a=v),this._filter(a),this._updateItemCount(),this._shrink(),this.sort(b))}
4394,E.prototype.sort=function(a){if(this.enabled){this._resetCols();var b=a||this.lastSort,c=this._getFilteredItems().sorted(b);this._layout(c),this.lastSort=b}},E.prototype.update=function(a){this.enabled&&(a||this._setColumns(),this.sort())},E.prototype.layout=function(){this.update(!0)},E.prototype.appended=function(a,b,c){this._addItems(a,b===!0,c!==!1)},E.prototype.disable=function(){this.enabled=!1},E.prototype.enable=function(a){this.enabled=!0,a!==!1&&this.update()},E.prototype.remove=function(b){function c(){b.remove(),this.$items=this._getItems(),this._updateItemCount(),this._fire(E.EventType.REMOVED,[b,this]),b=null}b.length&&b.jquery&&(this._toggleFilterClasses(a(),b),this._shrink(b),this.sort(),this.$el.one(E.EventType.LAYOUT+"."+u,a.proxy(c,this)))},E.prototype.destroy=function(){D.off("."+this.unique),this.$el.removeClass(u).removeAttr("style").removeData(u),this.$items.removeAttr("style").removeData("point").removeData("scale").removeClass([E.ClassName.CONCEALED,E.ClassName.FILTERED,E.ClassName.SHUFFLE_ITEM].join(" ")),this.$items=null,this.$el=null,this.sizer=null,this.element=null,this._transitions=null,this.destroyed=!0},a.fn.shuffle=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),e=d.data(u);e?"string"==typeof b&&e[b]&&e[b].apply(e,c):(e=new E(this,b),d.data(u,e))})},a.fn.sorted=function(b){var d=a.extend({},a.fn.sorted.defaults,b),e=this.get(),f=!1;return e.length?d.randomize?k(e):(a.isFunction(d.by)&&e.sort(function(b,e){if(f)return 0;var g=d.by(a(b)),h=d.by(a(e));return g===c&&h===c?(f=!0,0):h>g||"sortFirst"===g||"sortLast"===h?-1:g>h||"sortLast"===g||"sortFirst"===h?1:0}),f?this.get():(d.reverse&&e.reverse(),e)):[]},a.fn.sorted.defaults={reverse:!1,by:null,randomize:!1},E});
4395/*!
4396 * jQuery.BgSwitcher
4397 *
4398 * @version  0.4.3
4399 * @author   rewish <[email protected]>
4400 * @license  MIT License (https://github.com/rewish/jquery-bgswitcher/blob/master/LICENSE.md)
4401 * @link     https://github.com/rewish/jquery-bgswitcher
4402 */
4403(function($) {
4404  'use strict';
4405
4406  var loadedImages = {},
4407
4408      slice = Array.prototype.slice,
4409      toString = Object.prototype.toString,
4410
4411      corners = ['Top', 'Right', 'Bottom', 'Left'],
4412      backgroundProperties = [
4413        'Attachment', 'Color', 'Image', 'Repeat',
4414        'Position', 'Size', 'Clip', 'Origin'
4415      ];
4416
4417  $.fn.bgswitcher = function() {
4418    var args = arguments,
4419        instanceKey = BgSwitcher.keys.instance;
4420
4421    return this.each(function() {
4422      var instance = $.data(this, instanceKey);
4423
4424      if (!instance) {
4425        instance = new BgSwitcher(this);
4426        $.data(this, instanceKey, instance);
4427      }
4428
4429      instance.dispatch.apply(instance, args);
4430    });
4431  };
4432
4433  // Backward Compatibility
4434  $.fn.bgSwitcher = $.fn.bgswitcher;
4435
4436  /**
4437   * BgSwitcher
4438   *
4439   * @param {HTMLElement} el
4440   * @constructor
4441   */
4442  function BgSwitcher(el) {
4443    this.$el = $(el);
4444    this.index = 0;
4445    this.config = $.extend({}, BgSwitcher.defaultConfig);
4446
4447    this._setupBackgroundElement();
4448    this._listenToResize();
4449  }
4450
4451  $.extend(BgSwitcher.prototype, {
4452    /**
4453     * Dispatch
4454     *
4455     * @param {string|Array} one
4456     */
4457    dispatch: function(one) {
4458      switch (toString.call(one)) {
4459        case '[object Object]':
4460          this.setConfig(one);
4461          break;
4462        case '[object String]':
4463          this[one].apply(this, slice.call(arguments, 1));
4464          break;
4465        default:
4466          throw new Error('Please specify a Object or String');
4467      }
4468    },
4469
4470    /**
4471     * Set config
4472     *
4473     * @param {Object} config
4474     */
4475    setConfig: function(config) {
4476      this.config = $.extend(this.config, config);
4477
4478      if (typeof this.config.random !== 'undefined') {
4479        this.config.shuffle = this.config.random;
4480      }
4481
4482      this.refresh();
4483    },
4484
4485    /**
4486     * Set images
4487     *
4488     * @param {Array} images
4489     */
4490    setImages: function(images) {
4491      this.imageList = new this.constructor.ImageList(images);
4492
4493      if (this.config.shuffle) {
4494        this.imageList.shuffle();
4495      }
4496    },
4497
4498    /**
4499     * Set switch handler
4500     *
4501     * @param {Function} fn
4502     */
4503    setSwitchHandler: function(fn) {
4504      this.switchHandler = $.proxy(fn, this);
4505    },
4506
4507    /**
4508     * Default switch handler
4509     *
4510     * @param {string} type
4511     * @returns {Function}
4512     */
4513    getBuiltInSwitchHandler: function(type) {
4514      return this.constructor.switchHandlers[type || this.config.effect];
4515    },
4516
4517    /**
4518     * Refresh
4519     */
4520    refresh: function() {
4521      this.setImages(this.config.images);
4522      this.setSwitchHandler(this.getBuiltInSwitchHandler());
4523      this._prepareSwitching();
4524
4525      if (this.config.start) {
4526        this.start();
4527      }
4528    },
4529
4530    /**
4531     * Start switching
4532     */
4533    start: function() {
4534      if (!this._timerID) {
4535        this._timerID = setTimeout($.proxy(this, 'next'), this.config.interval);
4536      }
4537    },
4538
4539    /**
4540     * Stop switching
4541     */
4542    stop: function() {
4543      if (this._timerID) {
4544        clearTimeout(this._timerID);
4545        this._timerID = null;
4546      }
4547    },
4548
4549    /**
4550     * Toggle between start/stop
4551     */
4552    toggle: function() {
4553      if (this._timerID) {
4554        this.stop();
4555      } else {
4556        this.start();
4557      }
4558    },
4559
4560    /**
4561     * Reset switching
4562     */
4563    reset: function() {
4564      this.index = 0;
4565      this._prepareSwitching();
4566    },
4567
4568    /**
4569     * Go to next switching
4570     */
4571    next: function() {
4572      var max = this.imageList.count();
4573
4574      if (!this.config.loop && this.index + 1 === max) {
4575        return;
4576      }
4577
4578      if (++this.index === max) {
4579        this.index = 0;
4580      }
4581
4582      this.switching();
4583    },
4584
4585    /**
4586     * Go to previous switching
4587     */
4588    prev: function() {
4589      if (!this.config.loop && this.index === 0) {
4590        return;
4591      }
4592
4593      if (--this.index === -1) {
4594        this.index = this.imageList.count() - 1;
4595      }
4596
4597      this.switching();
4598    },
4599
4600    /**
4601     * Select the switching at index
4602     *
4603     * @param {number} index
4604     */
4605    select: function(index) {
4606      if (index === -1) {
4607        index = this.imageList.count() - 1;
4608      }
4609
4610      this.index = index;
4611      this.switching();
4612    },
4613
4614    /**
4615     * Switching the background image
4616     */
4617    switching: function() {
4618      var started = !!this._timerID;
4619
4620      if (started) {
4621        this.stop();
4622      }
4623
4624      this._createSwitchableElement();
4625      this._prepareSwitching();
4626      this.switchHandler(this.$switchable);
4627
4628      if (started) {
4629        this.start();
4630      }
4631    },
4632
4633    /**
4634     * Destroy...
4635     */
4636    destroy: function() {
4637      this.stop();
4638      this._stopListeningToResize();
4639
4640      if (this.$switchable) {
4641        this.$switchable.stop();
4642        this.$switchable.remove();
4643        this.$switchable = null;
4644      }
4645
4646      if (this.$bg) {
4647        this.$bg.remove();
4648        this.$bg = null;
4649      }
4650
4651      this.$el.removeAttr('style');
4652      this.$el.removeData(this.constructor.keys.instance);
4653      this.$el = null;
4654    },
4655
4656    /**
4657     * Adjust rectangle
4658     */
4659    _adjustRectangle: function() {
4660      var corner,
4661          i = 0,
4662          length = corners.length,
4663          offset = this.$el.position(),
4664          copiedStyles = {
4665            top: offset.top,
4666            left: offset.left,
4667            width: this.$el.innerWidth(),
4668            height: this.$el.innerHeight()
4669          };
4670
4671      for (; i < length; i++) {
4672        corner = corners[i];
4673        copiedStyles['margin' + corner] = this.$el.css('margin' + corner);
4674        copiedStyles['border' + corner] = this.$el.css('border' + corner);
4675      }
4676
4677      this.$bg.css(copiedStyles);
4678    },
4679
4680    /**
4681     * Setup background element
4682     */
4683    _setupBackgroundElement: function() {
4684      this.$bg = $(document.createElement('div'));
4685      this.$bg.css({
4686        position: 'absolute',
4687        zIndex: (parseInt(this.$el.css('zIndex'), 10) || 0) - 1,
4688        overflow: 'hidden'
4689      });
4690
4691      this._copyBackgroundStyles();
4692      this._adjustRectangle();
4693
4694      if (this.$el[0].tagName === 'BODY') {
4695        this.$el.prepend(this.$bg);
4696      } else {
4697        this.$el.before(this.$bg);
4698        this.$el.css('background', 'none');
4699      }
4700    },
4701
4702    /**
4703     * Create switchable element
4704     */
4705    _createSwitchableElement: function() {
4706      if (this.$switchable) {
4707        this.$switchable.remove();
4708      }
4709
4710      this.$switchable = this.$bg.clone();
4711      this.$switchable.css({top: 0, left: 0, margin: 0, border: 'none'});
4712      this.$switchable.appendTo(this.$bg);
4713    },
4714
4715    /**
4716     * Copy background styles
4717     */
4718    _copyBackgroundStyles: function () {
4719      var prop,
4720          copiedStyle = {},
4721          i = 0,
4722          length = backgroundProperties.length,
4723          backgroundPosition = 'backgroundPosition';
4724
4725      for (; i < length; i++) {
4726        prop = 'background' + backgroundProperties[i];
4727        copiedStyle[prop] = this.$el.css(prop);
4728      }
4729
4730      // For IE<=9
4731      if (copiedStyle[backgroundPosition] === undefined) {
4732        copiedStyle[backgroundPosition] = [
4733          this.$el.css(backgroundPosition + 'X'),
4734          this.$el.css(backgroundPosition + 'Y')
4735        ].join(' ');
4736      }
4737
4738      this.$bg.css(copiedStyle);
4739    },
4740
4741    /**
4742     * Listen to the resize event
4743     */
4744    _listenToResize: function() {
4745      var that = this;
4746      this._resizeHandler = function() {
4747        that._adjustRectangle();
4748      };
4749      $(window).on('resize', this._resizeHandler);
4750    },
4751
4752    /**
4753     * Stop listening to the resize event
4754     */
4755    _stopListeningToResize: function() {
4756      $(window).off('resize', this._resizeHandler);
4757      this._resizeHandler = null;
4758    },
4759
4760    /**
4761     * Prepare the Switching
4762     */
4763    _prepareSwitching: function() {
4764      this.$bg.css('backgroundImage', this.imageList.url(this.index));
4765    }
4766  });
4767
4768  /**
4769   * Data Keys
4770   * @type {Object}
4771   */
4772  BgSwitcher.keys = {
4773    instance: 'bgSwitcher'
4774  };
4775
4776  /**
4777   * Default Config
4778   * @type {Object}
4779   */
4780  BgSwitcher.defaultConfig = {
4781    images: [],
4782    interval: 5000,
4783    start: true,
4784    loop: true,
4785    shuffle: false,
4786    effect: 'fade',
4787    duration: 1000,
4788    easing: 'swing'
4789  };
4790
4791  /**
4792   * Built-In switch handlers (effects)
4793   * @type {Object}
4794   */
4795  BgSwitcher.switchHandlers = {
4796    fade: function($el) {
4797      $el.animate({opacity: 0}, this.config.duration, this.config.easing);
4798    },
4799
4800    blind: function($el) {
4801      $el.animate({height: 0}, this.config.duration, this.config.easing);
4802    },
4803
4804    clip: function($el) {
4805      $el.animate({
4806        top: parseInt($el.css('top'), 10) + $el.height() / 2,
4807        height: 0
4808      }, this.config.duration, this.config.easing);
4809    },
4810
4811    slide: function($el) {
4812      $el.animate({top: -$el.height()}, this.config.duration, this.config.easing);
4813    },
4814
4815    drop: function($el) {
4816      $el.animate({
4817        left: -$el.width(),
4818        opacity: 0
4819      }, this.config.duration, this.config.easing);
4820    },
4821
4822    hide: function($el) {
4823      $el.hide();
4824    }
4825  };
4826
4827  /**
4828   * Define effect
4829   *
4830   * @param {String} name
4831   * @param {Function} fn
4832   */
4833  BgSwitcher.defineEffect = function(name, fn) {
4834    this.switchHandlers[name] = fn;
4835  };
4836
4837  /**
4838   * BgSwitcher.ImageList
4839   *
4840   * @param {Array} images
4841   * @constructor
4842   */
4843  BgSwitcher.ImageList = function(images) {
4844    this.images = images;
4845    this.createImagesBySequence();
4846    this.preload();
4847  };
4848
4849  $.extend(BgSwitcher.ImageList.prototype, {
4850    /**
4851     * Images is sequenceable
4852     *
4853     * @returns {boolean}
4854     */
4855    isSequenceable: function() {
4856      return typeof this.images[0] === 'string' &&
4857          typeof this.images[1] === 'number' &&
4858          typeof this.images[2] === 'number';
4859    },
4860
4861    /**
4862     * Create an images by sequence
4863     */
4864    createImagesBySequence: function() {
4865      if (!this.isSequenceable()) {
4866        return;
4867      }
4868
4869      var images = [],
4870          base = this.images[0],
4871          min = this.images[1],
4872          max = this.images[2];
4873
4874      do {
4875        images.push(base.replace(/\.\w+$/, min + '$&'));
4876      } while (++min <= max);
4877
4878      this.images = images;
4879    },
4880
4881    /**
4882     * Preload an images
4883     */
4884    preload: function() {
4885      var path,
4886          length = this.images.length,
4887          i = 0;
4888
4889      for (; i < length; i++) {
4890        path = this.images[i];
4891        if (!loadedImages[path]) {
4892          loadedImages[path] = new Image();
4893          loadedImages[path].src = path;
4894        }
4895      }
4896    },
4897
4898    /**
4899     * Shuffle an images
4900     */
4901    shuffle: function() {
4902      var j, t,
4903          i = this.images.length,
4904          original = this.images.join();
4905
4906      if (!i) {
4907        return;
4908      }
4909
4910      while (i) {
4911        j = Math.floor(Math.random() * i);
4912        t = this.images[--i];
4913        this.images[i] = this.images[j];
4914        this.images[j] = t;
4915      }
4916
4917      if (this.images.join() === original) {
4918        this.shuffle();
4919      }
4920    },
4921
4922    /**
4923     * Get the image from index
4924     *
4925     * @param {number} index
4926     * @returns {string}
4927     */
4928    get: function(index) {
4929      return this.images[index];
4930    },
4931
4932    /**
4933     * Get the URL with function of CSS
4934     *
4935     * @param {number} index
4936     * @returns {string}
4937     */
4938    url: function(index) {
4939      return 'url(' + this.get(index) + ')';
4940    },
4941
4942    /**
4943     * Count of images
4944     *
4945     * @returns {number}
4946     */
4947    count: function() {
4948      return this.images.length;
4949    }
4950  });
4951
4952  $.BgSwitcher = BgSwitcher;
4953}(jQuery));
4954/*!
4955  hey, [be]Lazy.js - v1.8.2 - 2016.10.25
4956  A fast, small and dependency free lazy load script (https://github.com/dinbror/blazy)
4957  (c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy
4958*/
4959  (function(q,m){"function"===typeof define&&define.amd?define(m):"object"===typeof exports?module.exports=m():q.Blazy=m()})(this,function(){function q(b){var c=b._util;c.elements=E(b.options);c.count=c.elements.length;c.destroyed&&(c.destroyed=!1,b.options.container&&l(b.options.container,function(a){n(a,"scroll",c.validateT)}),n(window,"resize",c.saveViewportOffsetT),n(window,"resize",c.validateT),n(window,"scroll",c.validateT));m(b)}function m(b){for(var c=b._util,a=0;a<c.count;a++){var d=c.elements[a],e;a:{var g=d;e=b.options;var p=g.getBoundingClientRect();if(e.container&&y&&(g=g.closest(e.containerClass))){g=g.getBoundingClientRect();e=r(g,f)?r(p,{top:g.top-e.offset,right:g.right+e.offset,bottom:g.bottom+e.offset,left:g.left-e.offset}):!1;break a}e=r(p,f)}if(e||t(d,b.options.successClass))b.load(d),c.elements.splice(a,1),c.count--,a--}0===c.count&&b.destroy()}function r(b,c){return b.right>=c.left&&b.bottom>=c.top&&b.left<=c.right&&b.top<=c.bottom}function z(b,c,a){if(!t(b,a.successClass)&&(c||a.loadInvisible||0<b.offsetWidth&&0<b.offsetHeight))if(c=b.getAttribute(u)||b.getAttribute(a.src)){c=c.split(a.separator);var d=c[A&&1<c.length?1:0],e=b.getAttribute(a.srcset),g="img"===b.nodeName.toLowerCase(),p=(c=b.parentNode)&&"picture"===c.nodeName.toLowerCase();if(g||void 0===b.src){var h=new Image,w=function(){a.error&&a.error(b,"invali
4959d");v(b,a.errorClass);k(h,"error",w);k(h,"load",f)},f=function(){g?p||B(b,d,e):b.style.backgroundImage='url("'+d+'")';x(b,a);k(h,"load",f);k(h,"error",w)};p&&(h=b,l(c.getElementsByTagName("source"),function(b){var c=a.srcset,e=b.getAttribute(c);e&&(b.setAttribute("srcset",e),b.removeAttribute(c))}));n(h,"error",w);n(h,"load",f);B(h,d,e)}else b.src=d,x(b,a)}else"video"===b.nodeName.toLowerCase()?(l(b.getElementsByTagName("source"),function(b){var c=a.src,e=b.getAttribute(c);e&&(b.setAttribute("src",e),b.removeAttribute(c))}),b.load(),x(b,a)):(a.error&&a.error(b,"missing"),v(b,a.errorClass))}function x(b,c){v(b,c.successClass);c.success&&c.success(b);b.removeAttribute(c.src);b.removeAttribute(c.srcset);l(c.breakpoints,function(a){b.removeAttribute(a.src)})}function B(b,c,a){a&&b.setAttribute("srcset",a);b.src=c}function t(b,c){return-1!==(" "+b.className+" ").indexOf(" "+c+" ")}function v(b,c){t(b,c)||(b.className+=" "+c)}function E(b){var c=[];b=b.root.querySelectorAll(b.selector);for(var a=b.length;a--;c.unshift(b[a]));return c}function C(b){f.bottom=(window.innerHeight||document.documentElement.clientHeight)+b;f.right=(window.innerWidth||document.documentElement.clientWidth)+b}function n(b,c,a){b.attachEvent?b.attachEvent&&b.attachEvent("on"+c,a):b.addEventListener(c,a,{capture:!1,passive:!0})}function k(b,c,a){b.detachEvent?b.detachEvent&&b.detachEvent("on"+c,a):b.removeEventListener(c,a,{capture:!1,passive:!0})}function l(b,c){if(b&&c)for(var a=b.length,d=0;d<a&&!1!==c(b[d],d);d++);}function D(b,c,a){var d=0;return function(){var e=+new Date;e-d<c||(d=e,b.apply(a,arguments))}}var u,f,A,y;return function(b){if(!document.querySelectorAll){var c=document.createStyleSheet();document.querySelectorAll=function(a,b,d,h,f){f=document.all;b=[];a=a.replace(/\[for\b/gi,"[htmlFor").split(",");for(d=a.length;d--;){c.addRule(a[d],"k:v");for(h=f.length;h--;)f[h].currentStyle.k&&b.push(f[h]);c.removeRule(0)}return b}}var a=this,d=a._util={};d.elements=[];d.destroyed=!0;a.options=b||{};a.options.error=a.options.error||!1;a.options.offset=a.options.offset||100;a.options.root=a.options.root||document;a.options.success=a.options.success||!1;a.options.selector=a.options.selector||".b-lazy";a.options.separator=a.options.separator||"|";a.options.containerClass=a.options.container;a.options.container=a.options.containerClass?document.querySelectorAll(a.options.containerClass):!1;a.options.errorClass=a.options.errorClass||"b-error";a.options.breakpoints=a.options.breakpoints||!1;a.options.loadInvisible=a.options.loadInvisible||!1;a.options.successClass=a.options.successClass||"b-loaded";a.options.validateDelay=a.options.validateDelay||25;a.options.saveViewportOffsetDelay=a.options.saveViewportOffsetDelay||50;a.options.srcset=a.options.srcset||"data-srcset";a.options.src=u=a.options.src||"data-src";y=Element.prototype.closest;A=1<window.devicePixelRatio;f={};f.top=0-a.options.offset;f.left=0-a.options.offset;a.revalidate=function(){q(a)};a.load=function(a,b){var c=this.options;void 0===a.length?z(a,b,c):l(a,function(a){z(a,b,c)})};a.destroy=function(){var a=this._util;this.options.container&&l(this.options.container,function(b){k(b,"scroll",a.validateT)});k(window,"scroll",a.validateT);k(window,"resize",a.validateT);k(window,"resize",a.saveViewportOffsetT);a.count=0;a.elements.length=0;a.destroyed=!0};d.validateT=D(function(){m(a)},a.options.validateDelay,a);d.saveViewportOffsetT=D(function(){C(a.options.offset)},a.options.saveViewportOffsetDelay,a);C(a.options.offset);l(a.options.breakpoints,function(a){if(a.width>=window.screen.width)return u=a.src,!1});setTimeout(function(){q(a)})}});
4960/*!
4961 * Lightbox v2.10.0
4962 * by Lokesh Dhakar
4963 *
4964 * More info:
4965 * http://lokeshdhakar.com/projects/lightbox2/
4966 *
4967 * Copyright 2007, 2018 Lokesh Dhakar
4968 * Released under the MIT license
4969 * https://github.com/lokesh/lightbox2/blob/master/LICENSE
4970 *
4971 * @preserve
4972 */
4973!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"%1/%2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){if(!(a("#lightbox").length>0)){var b=this;a('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)},this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})}},b.prototype.start=function(b){function c(a){d.album.push({alt:a.attr("data-alt"),link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&a("html").addClass("lb-disable-scrolling"),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var f,g,h,i,j,k;d.attr({alt:c.album[b].alt,src:c.album[b].link}),a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(k=a(window).width(),j=a(window).height(),i=k-c.containerPadding.left-c.containerPadding.right-c.imageBorderWidth.left-c.imageBorderWidth.right-20,h=j-c.containerPadding.top-c.containerPadding.bottom-c.imageBorderWidth.top-c.imageBorderWidth.bottom-120,c.options.maxWidth&&c.options.maxWidth<i&&(i=c.options.maxWidth),c.options.maxHeight&&c.options.maxHeight<i&&(h=c.options.maxHeight),(e.width>i||e.height>h)&&(e.width/i>e.height/h?(g=i,f=parseInt(e.height/(e.width/g),10),d.width(g),d.height(f)):(f=h,g=parseInt(e.width/(e.height/f),10),d.width(g),d.height(f)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerPadding.left+this.containerPadding.right+this.imageBorderWidth.left+this.imageBorderWidth.right,h=b+this.containerPadding.top+this.containerPadding.bottom+this.imageBorderWidth.top+this.imageBorderWidth.bottom;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn(this.options.imageFadeDuration),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=!!this.options.alwaysShowNavOnTouchDevices}catch(a){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").
4973css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),a&&this.$lightbox.find(".lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;if(void 0!==this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title){var c=this.$lightbox.find(".lb-caption");this.options.sanitizeTitle?c.text(this.album[this.currentImageIndex].title):c.html(this.album[this.currentImageIndex].title),c.fadeIn("fast").find("a").on("click",function(b){void 0!==a(this).attr("target")?window.open(a(this).attr("href"),a(this).attr("target")):location.href=a(this).attr("href")})}if(this.album.length>1&&this.options.showImageNumberLabel){var d=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(d).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){(new Image).src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){(new Image).src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=a.keyCode,c=String.fromCharCode(b).toLowerCase();27===b||c.match(/x|o|c/)?this.end():"p"===c||37===b?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):"n"!==c&&39!==b||(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("html").removeClass("lb-disable-scrolling")},new b});
4974//# sourceMappingURL=lightbox.min.map
4975var FE = window.FE || {};
4976
4977FE.log = function () {
4978    if (FE.Core.configuration.app.environment !== 'dev' || $('html').is('.ie6, .ie7, .ie8, .ie9')) {
4979        return;
4980    }
4981    if (console && console.log && console.log.apply) {
4982        console.log.apply(console, arguments);
4983    }
4984};
4985
4986FE.Core = {
4987    configuration: {},
4988    onLoadQueue: [],
4989    bLazy: null,
4990    init: function () {
4991        FE.Core.initModules();
4992
4993        if (window.innerWidth >= 988) {
4994            var e = $('.mediaBackground .images');
4995            if (e.length > 0) {
4996                e.css('backgroundImage', 'url(\'' + e.data('src') + '\')');
4997            }
4998        }
4999
5000        ;
5001        (function () {
5002            FE.log('FE.blazy.init');
5003            FE.Core.bLazy = new Blazy();
5004        })();
5005
5006    },
5007    initModules: function () {
5008        for (var a = 0; a < FE.Core.onLoadQueue.length; a++) {
5009            "function" == typeof FE.Core.onLoadQueue[a] && FE.Core.onLoadQueue[a]();
5010        }
5011    },
5012    addInit: function (method) {
5013        FE.Core.onLoadQueue.push(method);
5014    },
5015    scrollTo: function (targetId, animationClass) {
5016        var t = $('#' + targetId);
5017        if (t.length > 0) {
5018            return $('html,body').animate({
5019                scrollTop: (t.offset().top - 100)
5020            }, 1000, function () {
5021                if (typeof animationClass != 'undefined') {
5022                    t.removeClass('animated ' + animationClass);
5023                    setTimeout(function () {
5024                        t.addClass('animated ' + animationClass);
5025                    }, 300);
5026                }
5027            }).promise();
5028        }
5029    },
5030    d: function (v) {
5031        if (typeof FE.Core.configuration.dictionary[v] != 'undefined') {
5032            return FE.Core.configuration.dictionary[v];
5033        }
5034        return '';
5035    },
5036    /*
5037     *	Adds or changes a GET parameter
5038     *	See http://stackoverflow.com/a/13064060/703581
5039     *	Adapted to handle '#' in the URL 
5040     */
5041    setGetParameter: function (paramName, paramValue)
5042    {
5043        var url = window.location.href;
5044        var splitAtAnchor = url.split('#');
5045        url = splitAtAnchor[0];
5046        var anchor = typeof splitAtAnchor[1] === 'undefined' ? '' : '#' + splitAtAnchor[1];
5047        if (url.indexOf(paramName + "=") >= 0)
5048        {
5049            var prefix = url.substring(0, url.indexOf(paramName));
5050            var suffix = url.substring(url.indexOf(paramName));
5051            suffix = suffix.substring(suffix.indexOf("=") + 1);
5052            suffix = (suffix.indexOf("&") >= 0) ? suffix.substring(suffix.indexOf("&")) : "";
5053            url = prefix + paramName + "=" + paramValue + suffix;
5054        } else
5055        {
5056            if (url.indexOf("?") < 0)
5057                url += "?" + paramName + "=" + paramValue;
5058            else
5059                url += "&" + paramName + "=" + paramValue;
5060        }
5061        window.location.href = url + anchor;
5062    },
5063    putGoogleMapJs: function (callback) {
5064        var s = document.createElement('script');
5065        s.setAttribute('src', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCKeNWZqd02uYcFTTgG2Um67ge7w2QQAC4' + (typeof callback !== 'undefined' ? '&callback=' + callback : ''));
5066        document.getElementsByTagName('head')[0].appendChild(s);
5067    },
5068    objectSize: function (obj) {
5069        var size = 0, key;
5070        for (key in obj) {
5071            if (obj.hasOwnProperty(key))
5072                size++;
5073        }
5074        return size;
5075    }
5076};
5077FE.StatsT = {
5078    transData: undefined,
5079    init: function () {
5080    },
5081    sendPurchase: function (data) {
5082        FE.StatsT.transData = data;
5083        var o = {
5084            'transaction_id': FE.StatsT.transData.id,
5085            'affiliation': FE.StatsT.transData.affiliation,
5086            'value': FE.StatsT.transData.value
5087        };
5088
5089        if (typeof data.items != 'undefined') {
5090            o.items = data.items;
5091        }
5092        gtag('event', 'purchase', o);
5093        return this;
5094    },
5095    refundTransaction: function (id) {
5096        gtag('event', 'refund', {
5097            'transaction_id': id    // Transaction ID is only required field for full refund.
5098        });
5099    }
5100}, FE.Core.addInit(FE.StatsT.init);
5101
5102FE.Stats = {
5103    Track: function (name) {
5104        // if (typeof ga == 'function') {
5105        //     ga('send', 'pageview', '/' + name);
5106        // }
5107        gtag('event', 'page_view', {
5108            page_path: '/' + name
5109          });
5110
5111        FE.log('Stats track:', '/' + name);
5112
5113    },
5114    Event: function (category, action, label, value) {
5115
5116        if (typeof category == 'undefined')
5117            var category = '';
5118        if (typeof action == 'undefined')
5119            var action = '';
5120        if (typeof label == 'undefined')
5121            var label = '';
5122        if (typeof value == 'undefined')
5123            var value = '1';
5124
5125        if (category == '' || action == '') { // variabili obbligatorie
5126            return false;
5127        }
5128
5129        /* Universal Analytics */
5130        // if (typeof ga == 'function') {
5131        //     ga('send', 'event', category, action, label, value);
5132            
5133        // }
5134        if (typeof gtag == 'function') {
5135            var o = {};
5136            if(category) o.event_category = category;
5137            if(label) o.event_label = label;
5138            if(value) o.value = value;
5139            gtag('event', action, o);
5140        }
5141        FE.log('Stats event:', category, action, label, value);
5142    }
5143};
5144FE.TypeA = {
5145    init: function () {
5146        FE.log('FE.TypeA.init');
5147    },
5148    search: function (query) {
5149        query = encodeURIComponent(query);
5150        return $.getJSON(FE.Core.configuration.routes.searchStructures.replace('QUERY', query));
5151    }
5152};
5153FE.Core.addInit(FE.TypeA.init);
5154FE.H = {
5155    partials: {},
5156    templates: {},
5157    cTemplates: {},
5158    init: function () {
5159        FE.H.partials = FE.Core.configuration.handlebars.partials;
5160        FE.H.templates = FE.Core.configuration.handlebars.templates;
5161
5162        FE.H.registerPartials();
5163        FE.H.registerHelper();
5164        FE.H.compileTemplates();
5165        FE.log('FE.H.init');
5166    },
5167    compileTemplates: function () {
5168        $.each(FE.H.templates, function (index, value) {
5169            FE.H.cTemplates[index] = Handlebars.compile(value);
5170        });
5171    },
5172    registerPartials: function () {
5173        $.each(FE.H.partials, function (name, code) {
5174            Handlebars.registerPartial(name, code);
5175        });
5176    },
5177    reverseHtml: function (str) {
5178        var ph = String.fromCharCode(206);
5179        var result = str.split('').reverse().join('');
5180        while (result.indexOf('<') > -1) {
5181            result = result.replace('<', ph);
5182        }
5183        while (result.indexOf('>') > -1) {
5184            result = result.replace('>', '<');
5185        }
5186        while (result.indexOf(ph) > -1) {
5187            result = result.replace(ph, '>');
5188        }
5189        return result;
5190    },
5191    registerHelper: function () {
5192
5193//        // accounting.formatNumber(number, [precision = 0], [thousand = ","], [decimal = "."])
5194//        Handlebars.registerHelper("formatNumber", function (n, p, t, d) {
5195//            return new Handlebars.SafeString(accounting.formatNumber(n, p, t, d));
5196//        });
5197//
5198//        // number,[symbol = "$"],[precision = 2],[thousand = ","],[decimal = "."],[format = "%s%v"]
5199//        Handlebars.registerHelper("formatMoney", function (n, p, t, d, f) {
5200//            return new Handlebars.SafeString(accounting.formatMoney(n, "€", 2, ".", ",").replace("€ -0,00", "€ 0,00").replace(" ", "&nbsp;"));
5201//        });
5202
5203        Handlebars.registerHelper('relativeDate', function (date) {
5204            return moment(date).fromNow();
5205        });
5206
5207        Handlebars.registerHelper('formatDate', function (context, block) {
5208            var f = block.hash.format || "MMM Do, YYYY";
5209            return moment(context).format(f);
5210        });
5211
5212        Handlebars.registerHelper('concatenate', function (s, s2) {
5213            return new Handlebars.SafeString(s + s2);
5214        });
5215
5216        Handlebars.registerHelper('getMessage', function (m) {
5217            return new Handlebars.SafeString(FE.Core.configuration.dictionary[m]);
5218        });
5219
5220        Handlebars.registerHelper("debug", function (optionalValue) {
5221            if (optionalValue) {
5222                FE.log(optionalValue);
5223            }
5224        });
5225
5226
5227        Handlebars.registerHelper("jsonxmlattribute", function (json, attributeName) {
5228            if (typeof json['@attributes'] != 'undefined' && typeof json['@attributes'][attributeName] != 'undefined') {
5229                return new Handlebars.SafeString(json['@attributes'][attributeName]);
5230            } else {
5231                return '';
5232            }
5233        });
5234
5235        Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
5236
5237            switch (operator) {
5238                case 'typeof':
5239                    return ((typeof v1) == v2) ? options.fn(this) : options.inverse(this);
5240                case 'allowBookingRegistration':
5241                    var r = FE.SD.booking.allowBookingRegistration();
5242                    return (r === true || r === 'true') ? options.fn(this) : options.inverse(this);
5243                case 'isPreviousRoomSelected':
5244                    var r = FE.SD.booking.isPreviousRoomSelected(v1);
5245                    return (r === true || r === 'true') ? options.fn(this) : options.inverse(this);
5246                case 'attributeBoolCheckTrue':
5247                    var value = false;
5248                    if (typeof v1['@attributes'] != 'undefined' && typeof v1['@attributes'][v2] != 'undefined') {
5249                        value = v1['@attributes'][v2];
5250                    }
5251                    return (value === true || value === 'true') ? options.fn(this) : options.inverse(this);
5252//                case 'typeof':
5253//                    return (typeof v1 == v2) ? options.fn(this) : options.inverse(this);
5254                case 'isBefore':
5255                    var mv1 = (v1 !== '' ? moment(v1) : moment());
5256                    return (mv1.isBefore((v2 !== '' ? v2 : moment()))) ? options.fn(this) : options.inverse(this);
5257                case 'isBeforeDay':
5258                    var mv1 = (v1 !== '' ? moment(v1) : moment());
5259                    var mv2 = (v2 !== '' ? moment(v2) : moment());
5260                    return (mv1.isBefore(mv2, 'day')) ? options.fn(this) : options.inverse(this);
5261                case 'isSameOrBeforeDay':
5262                    var mv1 = (v1 !== '' ? moment(v1) : moment());
5263                    var mv2 = (v2 !== '' ? moment(v2) : moment());
5264                    return (mv1.isSameOrBefore(mv2, 'day')) ? options.fn(this) : options.inverse(this);
5265                case '!=':
5266                    return (v1 !== v2) ? options.fn(this) : options.inverse(this);
5267                case '==':
5268                    return (v1 == v2) ? options.fn(this) : options.inverse(this);
5269                case '===':
5270                    return (v1 === v2) ? options.fn(this) : options.inverse(this);
5271                case '<':
5272                    return (v1 < v2) ? options.fn(this) : options.inverse(this);
5273                case '<=':
5274                    return (v1 <= v2) ? options.fn(this) : options.inverse(this);
5275                case '>':
5276                    return (v1 > v2) ? options.fn(this) : options.inverse(this);
5277                case '>=':
5278                    return (v1 >= v2) ? options.fn(this) : options.inverse(this);
5279                case '&&':
5280                    return (v1 && v2) ? options.fn(this) : options.inverse(this);
5281                case '||':
5282                    return (v1 || v2) ? options.fn(this) : options.inverse(this);
5283                case 'in':
5284                    if (!$.isArray(v2)) {
5285                        v2 = v2.split(',');
5286                    }
5287                    return (v2.indexOf(v1) >= 0 ? options.fn(this) : options.inverse(this));
5288                default:
5289                    return options.inverse(this);
5290            }
5291        });
5292
5293
5294        Handlebars.registerHelper('sum', function (value, value2) {
5295            var out = parseFloat(value) + parseFloat(value2);
5296
5297            return new Handlebars.SafeString(out);
5298        });
5299
5300
5301//        Handlebars.registerHelper('typeof', function (value) {
5302//            return new Handlebars.SafeString(typeof value);
5303//        });
5304
5305        Handlebars.registerHelper('titleize', function (str) {
5306
5307            if (str && typeof str === "string") {
5308                var title = str.replace(/[ \-_]+/g, ' ');
5309                var words = title.match(/\w+/g);
5310                var capitalize = function (word) {
5311                    return word.charAt(0).toUpperCase() + word.slice(1);
5312                };
5313                return ((function () {
5314                    var i, len, results;
5315                    results = [];
5316                    for (i = 0, len = words.length; i < len; i++) {
5317                        var word = words[i];
5318                        results.push(capitalize(word));
5319                    }
5320                    return results;
5321                })()).join(' ');
5322            }
5323        });
5324
5325        Handlebars.registerHelper('nl2br', function (text) {
5326            var nl2br = (text + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '<br>' + '$2');
5327            return new Handlebars.SafeString(nl2br);
5328        });
5329
5330        Handlebars.registerHelper('spinner', function (text) {
5331            return new Handlebars.SafeString(FE.Core.spinnerHtml);
5332        });
5333        
5334        
5335        Handlebars.registerHelper('objectString', function (o) {
5336            if(typeof o == 'string')  return new Handlebars.SafeString(o);
5337            return new Handlebars.SafeString(o[0]);
5338        });
5339
5340        Handlebars.registerHelper('truncate', function (str, len, suffix, getOtherPart) {
5341            if (str.length > len) {
5342
5343                var new_str = str.substr(0, len + 1);
5344
5345                while (new_str.length) {
5346                    var ch = new_str.substr(-1);
5347                    new_str = new_str.substr(0, -1);
5348
5349                    if (ch == ' ') {
5350                        break;
5351                    }
5352                }
5353
5354                if (new_str == '') {
5355                    new_str = str.substr(0, len);
5356                }
5357
5358                if (getOtherPart === true) {
5359                    return new Handlebars.SafeString(str.replace(new_str, ""));
5360                }
5361
5362                return new Handlebars.SafeString(new_str + (suffix !== "" ? suffix : '')); // + (suffix ? suffix : '...')
5363            }
5364            if (getOtherPart === true) {
5365                return '';
5366            }
5367            return str;
5368        });
5369
5370
5371        Handlebars.registerHelper('truncatehtml', function (str, len, suffix, getOtherPart) {
5372            if (str.length > len) {
5373
5374                len = str.indexOf(' ', len);
5375
5376                if(getOtherPart){
5377                    var truncated = str.substring(len);
5378                }else{
5379                    var truncated = str.substring(0, len);
5380                }
5381                
5382                // Remove line breaks and surrounding whitespace
5383                truncated = truncated.replace(/(\r\n|\n|\r)/gm, "").trim();
5384                // If the text ends with an incomplete start tag, trim it off
5385                truncated = truncated.replace(/<(\w*)(?:(?:\s\w+(?:={0,1}(["']{0,1})\w*\2{0,1})))*$/g, '');
5386                // If the text ends with a truncated end tag, fix it.
5387                var truncatedEndTagExpr = /<\/((?:\w*))$/g;
5388                var truncatedEndTagMatch = truncatedEndTagExpr.exec(truncated);
5389                if (truncatedEndTagMatch != null) {
5390                    var truncatedEndTag = truncatedEndTagMatch[1];
5391                    // Check to see if there's an identifiable tag in the end tag
5392                    if (truncatedEndTag.length > 0) {
5393                        // If so, find the start tag, and close it
5394                        var startTagExpr = new RegExp(
5395                                "<(" + truncatedEndTag + "\\w?)(?:(?:\\s\\w+(?:=([\"\'])\\w*\\2)))*>");
5396                        var testString = truncated;
5397                        var startTagMatch = startTagExpr.exec(testString);
5398
5399                        var startTag = null;
5400                        while (startTagMatch != null) {
5401                            startTag = startTagMatch[1];
5402                            testString = testString.replace(startTagExpr, '');
5403                            startTagMatch = startTagExpr.exec(testString);
5404                        }
5405                        if (startTag != null) {
5406                            truncated = truncated.replace(truncatedEndTagExpr, '</' + startTag + '>');
5407                        }
5408                    } else {
5409                        // Otherwise, cull off the broken end tag
5410                        truncated = truncated.replace(truncatedEndTagExpr, '');
5411                    }
5412                }
5413                // Now the tricky part. Reverse the text, and look for opening tags. For each opening tag,
5414                //  check to see that he closing tag before it is for that tag. If not, append a closing tag.
5415                var testString = FE.H.reverseHtml(truncated);
5416                var reverseTagOpenExpr = /<(?:(["'])\w*\1=\w+ )*(\w*)>/;
5417                var tagMatch = reverseTagOpenExpr.exec(testString);
5418                while (tagMatch != null) {
5419                    var tag = tagMatch[0];
5420                    var tagName = tagMatch[2];
5421                    var startPos = tagMatch.index;
5422                    var endPos = startPos + tag.length;
5423                    var fragment = testString.substring(0, endPos);
5424                    // Test to see if an end tag is found in the fragment. If not, append one to the end
5425                    //  of the truncated HTML, thus closing the last unclosed tag
5426                    if (!new RegExp("<" + tagName + "\/>").test(fragment)) {
5427                        truncated += '</' + FE.H.reverseHtml(tagName) + '>';
5428                    }
5429                    // Get rid of the already tested fragment
5430                    testString = testString.replace(fragment, '');
5431                    // Get another tag to test
5432                    tagMatch = reverseTagOpenExpr.exec(testString);
5433                }
5434
5435                truncated = truncated.replace(/<\/br>/g, "");
5436//                FE.log('arguments',arguments);
5437//                FE.log('truncated',truncated);
5438//                if (getOtherPart === true) {
5439//                    FE.log('str.replace(truncated, "")',str.replace(truncated, ""));
5440//                    FE.log('Handlebars.SafeString(str.replace(truncated, ""))',Handlebars.SafeString(str.replace(truncated, "")));
5441//                    return new Handlebars.SafeString(str.replace(truncated, ""));
5442//                }
5443
5444                return new Handlebars.SafeString(truncated);// + (suffix ? suffix : '...')
5445            }
5446            if (getOtherPart === true) {
5447                return '';
5448            }
5449            return str;
5450        });
5451
5452    }
5453
5454};
5455FE.Core.addInit(FE.H.init);
5456FE.Validator = {
5457    date: function ($el, value, call
5457back) {
5458        if (value === '') {
5459            
5460            callback({
5461                value: value,
5462                valid: false,
5463                message: ''
5464            });
5465            return;
5466        }
5467
5468        var pattern = moment.localeData().longDateFormat('L');
5469        pattern = pattern.replace('/', '(\\/)');
5470        pattern = pattern.replace('.', '(\\.)');
5471//        pattern = pattern.replace('DD','[0]?[1-9]|[1|2][0-9]|[3][0|1]');
5472//        pattern = pattern.replace('MM','[0]?[1-9]|[1][0-2]');
5473//        pattern = pattern.replace('YYYY','[0-9]{4}');
5474        pattern = pattern.replace('DD', '([0]?[1-9]|[1|2][0-9]|[3][0|1])');
5475        pattern = pattern.replace('MM', '([0]?[1-9]|[1][0-2])');
5476        pattern = pattern.replace('YYYY', '([0-9]{4})');
5477        pattern = '^' + pattern + '$';
5478
5479        var r = new RegExp(pattern);
5480
5481        callback({
5482            value: value,
5483            valid: r.test(value),
5484            message: FE.Core.d('validators.date').replace('%format%', moment.localeData().longDateFormat('L'))
5485        });
5486    }
5487};
5488FE.Modal = {
5489    modalClass: ".modal",
5490    obj: {
5491        container: $('#appModal')
5492    },
5493    eventModalOnBounded: false,
5494    init: function () {
5495        FE.Modal.obj.content = FE.Modal.obj.container.find('.modal-content');
5496        $(window).on('resize', function () {
5497            FE.Modal.centerModals(FE.Modal.obj.container);
5498        });
5499    },
5500    centerModals: function ($element) {
5501        var $modals;
5502        if ($element.length) {
5503            $modals = $element;
5504        } else {
5505            $modals = $(FE.Modal.modalClass + ':visible');
5506        }
5507        $modals.each(function (i) {
5508            var $clone = $(this).clone().css('display', 'block').appendTo('body');
5509            var top = Math.round(($clone.height() - $clone.find('.modal-content').height()) / 2);
5510            top = top > 0 ? top : 0;
5511            $clone.remove();
5512            $(this).find('.modal-content').css("margin-top", top);
5513        });
5514    },
5515    showImage: function (url) {
5516        if (FE.Core.configuration.deviceType == 'phone') {
5517            return;
5518        }
5519        var body = FE.Modal.obj.container.find('.modal-body');
5520        FE.Modal.obj.container.find('.modal-title').remove();
5521        FE.Modal.obj.container.addClass('image');
5522        body.html('<img src="' + url + '" class="img-responsive">');
5523
5524        if (!FE.Modal.eventModalOnBounded) {
5525            FE.Modal.obj.container.on('hidden.bs.modal', function (e) {
5526                FE.Modal.obj.container.removeClass('image');
5527                body.html('');
5528            });
5529            FE.Modal.eventModalOnBounded = true;
5530        }
5531        FE.Modal.obj.container.modal('toggle');
5532        FE.Modal.centerModals(FE.Modal.obj.container);
5533    },
5534    showRemote: function (url) {
5535        FE.Modal.obj.container.modal('toggle');
5536        FE.Modal.obj.content.html(FE.Core.spinnerHtml);
5537        FE.Modal.centerModals(FE.Modal.obj.container);
5538        FE.Modal.obj.content.load(url, function () {
5539            FE.Modal.centerModals(FE.Modal.obj.container);
5540        });
5541
5542    },
5543    showHtml: function (html) {
5544        FE.Modal.obj.container.modal('toggle');
5545        FE.Modal.obj.content.html(html);
5546        FE.Modal.centerModals(FE.Modal.obj.container);
5547    }
5548}, FE.Core.addInit(FE.Modal.init);
5549FE.SearchM = {
5550    id: 'searchMobileForm',
5551    navToggleButton: $('#searchMobileToggle'),
5552    mobileSearchResume: $('#mobileSearchResume'),
5553    formObj: $('#searchMobileForm'),
5554    arrivalI: $('#searchMobileArrival'),
5555    arrivalC: $('#searchMobileArrivalCalendar'),
5556    arrivalG: $('#searchMobileArrivalG'),
5557    departureI: $('#searchMobileDeparture'),
5558    departureC: $('#searchMobileDepartureCalendar'),
5559    departureG: $('#searchMobileDepartureG'),
5560    searchI: $('#searchMobileQuery'),
5561    searchIClear: $('#searchMobileQueryClear'),
5562    searchR: $('#searchMobileQueryResult'),
5563    searchLocation: $('#searchMobileLocation'),
5564    searchOfferChannel: $('#searchMobileOfferChannel'),
5565    searchStructureName: $('#searchMobileStructureName'),
5566    searchLocationSlug: $('#searchMobileLocationSlug'),
5567    searchLocationType: $('#searchMobileLocationType'),
5568    searchStructureId: $('#searchMobileStructureId'),
5569    searchDateFormat: $('#searchMobileDateFormat'),
5570    searchResume: $('#mobileSearchResume'),
5571    arrivalCOption: {
5572        disabledHours: false,
5573        format: 'l',
5574        inline: true
5575
5576    },
5577    departureCOption: {
5578        disabledHours: false,
5579        format: 'l',
5580        inline: true
5581    },
5582    searchT: null,
5583    searching: false,
5584    init: function () {
5585        FE.log('FE.SearchM.init');
5586        if (FE.SearchM.formObj.length > 0) {
5587            FE.SearchM.initDateFields();
5588            FE.SearchM.initValidation();
5589            FE.SearchM.setDates();
5590            FE.SearchM.bindSearch();
5591            FE.SearchM.bindClick();
5592        }
5593    },
5594    setDates: function () {
5595        if (FE.SearchM.arrivalI.data('date') !== '') {
5596            var d = moment(FE.SearchM.arrivalI.data('date'));
5597            FE.SearchM.arrivalC.data("DateTimePicker").date(d);
5598            FE.SearchM.arrivalI.val(d.format(FE.SearchM.searchDateFormat.val()));
5599        } else {
5600            FE.SearchM.arrivalI.val(FE.SearchM.arrivalC.data("DateTimePicker").date().format(FE.SearchM.searchDateFormat.val()));
5601        }
5602
5603
5604        if (FE.SearchM.departureI.data('date') !== '') {
5605            var d = moment(FE.SearchM.departureI.data('date'));
5606            FE.SearchM.departureC.data("DateTimePicker").date(d);
5607            FE.SearchM.departureI.val(d.format(FE.SearchM.searchDateFormat.val()));
5608        } else {
5609            FE.SearchM.departureI.val(FE.SearchM.arrivalC.data("DateTimePicker").date().format(FE.SearchM.searchDateFormat.val()));
5610        }
5611    },
5612    bindSearch: function () {
5613        FE.SearchM.searchI.on('keyup', function () {
5614            clearInterval(FE.SearchM.searchT);  //clear any interval on key up
5615            FE.SearchM.searchT = setTimeout(function () {
5616                var q = FE.SearchM.searchI.val();
5617                if (q.length > 1) {
5618                    FE.SearchM.searchStructureName.val('');
5619                    FE.SearchM.searchOfferChannel.val('');
5620                    FE.SearchM.searchLocation.val('');
5621                    FE.SearchM.searching = true;
5622                    FE.SearchM.searchR.html(FE.Core.loaderHtml).show();
5623                    FE.TypeA.search(q).complete(function (data) {
5624                        FE.SearchM.searching = false;
5625                        FE.SearchM.searchR.html(FE.H.cTemplates.searchResult(data.responseJSON));
5626                        FE.SearchM.searchR.find('a').on('click', function () {
5627                            FE.SearchM.searchResultClick(this);
5628                        });
5629                    });
5630                }
5631            }, 500);
5632        });
5633    },
5634    searchResultClick: function (o) {
5635        o = $(o);
5636        switch (o.data('type')) {
5637            case 'location':
5638                FE.SearchM.searchLocation.val(o.data('name'));
5639                FE.SearchM.searchLocationSlug.val(o.data('slug'));
5640                FE.SearchM.searchLocationType.val(o.data('type'));
5641                break;
5642            case 'structure':
5643                FE.SearchM.searchStructureName.val(o.data('value'));
5644                break;
5645            case 'offerChannel':
5646                FE.SearchM.searchOfferChannel.val(o.data('id'));
5647                break;
5648        }
5649        FE.SearchM.searchI.val(o.data('label'));
5650        FE.SearchM.searchR.html('');
5651        FE.SearchM.formObj.attr('action',FE.SearchM.formObj.data('actiondefault'));
5652    },
5653    bindClick: function () {
5654
5655        FE.SearchM.searchIClear.on('click', function () {
5656            FE.SearchM.searchI.val('');
5657            FE.SearchM.searchLocation.val('');
5658            FE.SearchM.searchStructureName.val('');
5659            FE.SearchM.searchR.html('');
5660        });
5661
5662        FE.SearchM.arrivalG.on('click', function () {
5663            FE.SearchM.departureC.hide();
5664            if (FE.SearchM.arrivalC.is(':visible')) {
5665                FE.SearchM.arrivalC.hide();
5666            } else {
5667                FE.SearchM.arrivalC.show();
5668            }
5669        });
5670
5671        FE.SearchM.departureG.on('click', function () {
5672            FE.SearchM.arrivalC.hide();
5673            if (FE.SearchM.departureC.is(':visible')) {
5674                FE.SearchM.departureC.hide();
5675            } else {
5676                FE.SearchM.departureC.show();
5677            }
5678        });
5679
5680        FE.SearchM.searchResume.on('click', function () {
5681            FE.SearchM.navToggleButton.trigger('click');
5682        });
5683
5684        FE.SearchM.navToggleButton.on('click', function () {
5685            if (FE.SearchM.formObj.is(":visible")) {
5686                FE.SearchM.formObj.hide();
5687                FE.SearchM.mobileSearchResume.show();
5688                $('.mainContainer').show();
5689                FE.SearchM.navToggleButton.find('span').removeClass('glyphicon-arrow-up').addClass('glyphicon-book');
5690
5691            } else {
5692                FE.SearchM.openSearchMenu();
5693            }
5694        });
5695    },
5696    openSearchMenu: function () {
5697        FE.SearchM.mobileSearchResume.hide();
5698        FE.SearchM.formObj.show();
5699                    FE.Search.guests.addModifyElements('');
5700        $('.mainContainer').hide();
5701        FE.SearchM.navToggleButton.find('span').removeClass('glyphicon-search').addClass('glyphicon-arrow-up');
5702        $('html,body').animate({scrollTop: 0}, 500);
5703    },
5704    initDateFields: function () {
5705
5706
5707        FE.SearchM.arrivalCOption.locale = FE.Core.configuration.app.locale;
5708        if (typeof CustomArrivalCOptionDaysOfWeekDisabled !== 'undefined') {
5709            FE.SearchM.arrivalCOption.daysOfWeekDisabled = CustomArrivalCOptionDaysOfWeekDisabled;
5710            FE.SearchM.arrivalCOption.defaultDate = CustomArrivalCOptionDefaultDate;
5711            FE.SearchM.arrivalCOption.minDate = CustomArrivalCOptionMinDate;
5712        }
5713        FE.SearchM.arrivalC.datetimepicker(FE.SearchM.arrivalCOption);
5714
5715        FE.SearchM.departureCOption.locale = FE.Core.configuration.app.locale;
5716        if (typeof CustomDepartureCOptionDaysOfWeekDisabled !== 'undefined') {
5717            FE.SearchM.departureCOption.daysOfWeekDisabled = CustomDepartureCOptionDaysOfWeekDisabled;
5718            FE.SearchM.departureCOption.maxDate = CustomDepartureCOptionMaxDate;
5719        }
5720        FE.SearchM.departureC.datetimepicker(FE.SearchM.departureCOption);
5721
5722
5723
5724        FE.SearchM.arrivalC.on("dp.change", function (e) {
5725            FE.SearchM.arrivalI.val(moment(e.date).format('l'));
5726            FE.SearchM.departureC.data("DateTimePicker").minDate(e.date);
5727//            FE.SearchM.departureC.data("DateTimePicker").minDate(moment(e.date));
5728            if (e.date.isSameOrAfter(FE.SearchM.departureC.data("DateTimePicker").date())) {
5729                FE.SearchM.departureC.data("DateTimePicker").date(e.date.add(3, 'days'));
5730            }
5731            $(this).hide();//slideUp();
5732        });
5733        FE.SearchM.departureC.on("dp.change", function (e) {
5734            FE.SearchM.departureI.val(moment(e.date).format('l'));
5735//            FE.SearchM.arrivalC.data("DateTimePicker").maxDate(e.date);
5736            $(this).hide();//slideUp();
5737        });
5738
5739        $("#searchMobileDateFormat").val(moment.localeData().longDateFormat('l'));
5740
5741
5742
5743    },
5744    initValidation: function () {
5745        //FE.SearchM.formObj
5746        $("#searchMobileForm input,#searchMobileForm textarea,#searchMobileForm  select").not("[type=submit]").jqBootstrapValidation(
5747                {
5748                    //sniffHtml: false,
5749                    prependExistingHelpBlock: false,
5750                    semanticallyStrict: true,
5751                    autoAdd: {
5752                        helpBlocks: true
5753                    },
5754                    //preventSubmit: true,
5755                    submitError: function ($form, event, errors) {
5756                    },
5757                    submitSuccess: function ($form, event) {
5758
5759                        FE.Search.submit($form, event);
5760
5761                    },
5762                    filter: function () {
5763                        return $(this).is(":visible");
5764                    }
5765                }
5766        );
5767    }
5768}, FE.Core.addInit(FE.SearchM.init);
5769FE.Search = {
5770    id: 'searchForm',
5771    formObj: $('#searchForm'),
5772    arrivalI: $('#searchArrival'),
5773    arrivalC: $('#searchArrivalCalendar'),
5774//    arrivalG: $('#searchArrivalG'),
5775    departureI: $('#searchDeparture'),
5776    departureC: $('#searchDepartureCalendar'),
5777//    departureG: $('#searchDepartureG'),
5778    searchI: $('#searchQuery'),
5779    searchIClear: $('#searchQueryClear'),
5780    searchR: $('#searchQueryResult'),
5781    searchLocation: $('#searchLocation'),
5782    searchOfferChannel: $('#searchOfferChannel'),
5783    searchLocationSlug: $('#searchLocationSlug'),
5784    searchLocationType: $('#searchLocationType'),
5785    searchStructureName: $('#searchStructureName'),
5786    searchStructureId: $('#searchStructureId'),
5787    searchDateFormat: $('#searchDateFormat'),
5788    mattContent: $('.mediaTop.tall .mattContent'),
5789    arrivalCOption: {
5790        disabledHours: false,
5791        format: 'l',
5792        inline: true,
5793        defaultDate: moment()
5794
5795    },
5796    departureCOption: {
5797        disabledHours: false,
5798        format: 'l',
5799        inline: true,
5800        defaultDate: moment().add(3, 'days')
5801    },
5802    data: null,
5803    searchT: null,
5804    searching: false,
5805    init: function () {
5806        FE.log('FE.Search.init');
5807        var d = $('#searchParams');
5808        if (d.length > 0) {
5809            FE.Search.data = JSON.parse(d.html());
5810            var a = [];
5811            $.each(FE.Search.data.rooms, function (index, o) {
5812                a.push(o);
5813            });
5814            FE.Search.data.rooms = a;
5815        }
5816        if (FE.Search.formObj.length > 0) {
5817
5818            FE.Search.initDateFields();
5819            FE.Search.initValidation();
5820            FE.Search.guests.init();
5821            FE.Search.setDates();
5822            FE.Search.bindSearch();
5823            FE.Search.bindStructureTypeChange();
5824            FE.Search.bindClick();
5825        }
5826    },
5827    guests: {
5828        guestsContainer: $('.guestsContainer'),
5829        htmlContainers: $('.guestsContainer'),
5830        guestSelects: $('.guestSelect'),
5831        guestModify: $('.guestModify'),
5832        optionOthers: $('.guestSelect').find("option[value='']"),
5833        searchGuestOptions: null,
5834        searchGuestDataKey: null,
5835        init: function () {
5836            var d = $('#searchGuestOptions');
5837            if (d.length > 0) {
5838                FE.Search.guests.searchOptions = JSON.parse(d.html());
5839
5840// set select selected
5841                FE.Search.searchGuestDataKey = 'r' + FE.Search.data.roomnumber + 'a' + FE.Search.data.rooms[0].adultsnumber + 'c' + FE.Search.data.rooms[0].childrennumber;
5842
5843                var selector = '.guestsothers';
5844                var guestSelectVal = '';
5845                $.each(FE.Search.guests.searchOptions, function (index, o) {
5846                    if (o.key == FE.Search.searchGuestDataKey) {
5847                        //selector = '.guests' + o.key;
5848                        guestSelectVal = o.val;
5849                        if (o.params.rooms[0].childrennumber > 0) {
5850                            FE.Search.guests.addModifyElements(o.val);
5851//                            FE.Search.guests.updateContainers();
5852                        }
5853                        return;
5854                    }
5855                });
5856
5857                if (guestSelectVal == '') {
5858                    FE.Search.guests.addModifyElements('');
5859                    FE.Search.guests.updateResumeText();
5860                }
5861
5862                FE.Search.guests.updateContainers();
5863
5864                //$(selector).attr('selected', 'selected').trigger('change');
5865                $('.guestSelect').val(guestSelectVal).trigger('change');
5866
5867            }
5868            $('.guestSelect').on('change', function (e) {
5869                FE.Search.guests.selectionChange(this);
5870            });
5871
5872            FE.Search.guests.guestModify.on('click', function () {
5873                if (FE.Search.guests.htmlContainers.is(':visible')) {
5874                    FE.Search.guests.closeContainer();
5875                    FE.Search.mattContent.css("zIndex", 1);
5876                } else {
5877                    FE.Search.guests.htmlContainers.show();
5878                    FE.Search.mattContent.css("zIndex", 3);
5879                }
5880
5881            });
5882
5883
5884            $('html').on('click', function () {
5885                FE.Search.guests.closeContainer();
5886            });
5887
5888            $('.guestsContainer,.guestSelect,.guestModify').on('click', function (event) {
5889                event.stopPropagation();
5890            });
5891        },
5892        setOptions: function (n) {
5893//            console.log('setOptions ' + n);
5894//            var o = FE.Search.guests.searchOptions[n].params;
5895//            FE.Search.data.roomnumber = o.roomnumber;
5896//            var room = FE.Search.data.rooms[0];
5897//            FE.Search.data.rooms = o.rooms;
5898//            var r0 = o.rooms[0];
5899//            
5900//            console.log('setOptions ',r0);
5901//            console.log('setOptions ',room);
5902//            if (r0.childrennumber > 0
5903//                    && typeof r0.children != 'undefined'
5904//                    && typeof room.children != 'undefined'
5905//                    ) {
5906//                for (i = 0; i < 2; i++) {
5907//                    if (typeof room.children[i] != 'undefined'
5908//                            && typeof r0.children[i] != 'undefined'
5909//                            ) {
5910//                        FE.Search.data.rooms[0].children[i] = room.children[i];
5911//                    }
5912//                }
5913//            }
5914
5915            var oldRoom = FE.Search.data.rooms[0];
5916            FE.Search.data = jQuery.extend(true, {}, FE.Search.guests.searchOptions[n].params);
5917            var sdr0 = FE.Search.data.rooms[0];
5918            if (sdr0.childrennumber > 0
5919                    && typeof sdr0.children != 'undefined'
5920                    && typeof oldRoom.children != 'undefined'
5921                    ) {
5922                for (i = 0; i < 2; i++) {
5923                    if (typeof oldRoom.children[i] != 'undefined'
5924                            && typeof sdr0.children[i] != 'undefined'
5925                            ) {
5926                        FE.Search.data.rooms[0].children[i] = oldRoom.children[i];
5927                    }
5928                }
5929            }
5930            FE.Search.guests.updateContainers();
5931        },
5932        addModifyElements: function (val) {
5933            $('.guestModify').show();
5934            FE.Search.guests.guestSelects.append('<option value="mod" data-valprev="' + val + '" style="color:#00AEF0">' + FE.Core.d('form.guests.modify') + '</option>');
5935
5936        },
5937        removeModifyElements: function () {
5938            $('.guestModify').hide();
5939            FE.Search.guests.guestSelects.find("option[value='mod']").remove();
5940        },
5941        selectionChange: function (e) {
5942            var select = $(e);
5943            var val = select.val();
5944            if (val === 'mod') {
5945                FE.Search.guests.guestsContainer.show();
5946                FE.Search.mattContent.css("zIndex", 3);
5947            } else if (val !== '') {
5948
5949                FE.Search.guests.removeModifyElements();
5950                FE.Search.guests.setOptions(val);
5951                if (FE.Search.guests.searchOptions[val].params.rooms[0].childrennumber > 0) {
5952                    FE.Search.guests.guestsContainer.show();
5953                    FE.Search.mattContent.css("zIndex", 3);
5954                    FE.Search.guests.addModifyElements(val);
5955                } else {
5956                    FE.Search.guests.guestsContainer.hide();
5957                    FE.Search.mattContent.css("zIndex", 1);
5958                }
5959
5960                FE.Search.guests.optionOthers.html(FE.Search.guests.optionOthers.data('default'));
5961            } else {
5962                FE.Search.guests.removeModifyElements();
5963                FE.Search.guests.addModifyElements(val);
5964                FE.Search.guests.guestsContainer.show();
5965                FE.Search.mattContent.css("zIndex", 3);
5966            }
5967
5968        },
5969        updateContainers: function () {
5970            FE.Search.guests.htmlContainers.html(FE.H.cTemplates.searchGuests(FE.Search.data));
5971            FE.Search.guests.checkAgeFields();
5972            $('.guestConfirm').on('click', function () {
5973                FE.Search.guests.guestConfirmBtnClick(this);
5974            });
5975            $('.guestRoomAdd').on('click', function () {
5976                FE.Search.guests.guestRoomAddBtnClick(this);
5977            });
5978            $('.guestRoomRemove').on('click', function () {
5979                FE.Search.guests.removeRoomBtnClick(this);
5980            });
5981
5982            $('.childage').on('change', function () {
5983                FE.Search.guests.checkAgeFields();
5984            });
5985
5986
5987            FE.Search.guests.htmlContainers.find('input').on('change', function () {
5988                var e = $(this);
5989                var val = e.val();
5990                var childrenNumber = FE.Search.data.rooms[e.data('room')]['childrennumber'];
5991                var adultsNumber = FE.Search.data.rooms[e.data('room')]['adultsnumber'];
5992
5993                switch (e.data('type')) {
5994                    case 'childrennumber':
5995                        if (val == '' || val == 0) {
5996                            delete FE.Search.data.rooms[e.data('room')]['children'];
5997                            delete FE.Search.data.rooms[e.data('room')]['childrennumber'];
5998                            childrenNumber = 0;
5999                        } else {
6000                            childrenNumber = val;
6001                            FE.Search.data.rooms[e.data('room')]['childrennumber'] = val;
6002                            for (i = 0; i < val; i++) {
6003                                if (typeof FE.Search.data.rooms[e.data('room')]['children'] == 'undefined') {
6004                                    FE.Search.data.rooms[e.data('room')]['children'] = [];
6005                                }
6006                                var l = FE.Search.data.rooms[e.data('room')]['children'].length;
6007                                if (l > val) {
6008                                    FE.Search.data.rooms[e.data('room')]['children'].pop();
6009                                } else if (l < val) {
6010                                    FE.Search.data.rooms[e.data('room')]['children'].push({'age': ''});
6011                                }
6012
6013                            }
6014                        }
6015
6016                        break;
6017                    case 'adultsnumber':
6018                        FE.Search.data.rooms[e.data('room')][e.data('type')] = val;
6019                        adultsNumber = val;
6020                        break;
6021                    case 'age':
6022                        FE.Search.data.rooms[e.data('room')]['children'][e.data('children')][e.data('type')] = val;
6023                        break;
6024                }
6025
6026                var changed = false;
6027                var changedVal = null;
6028                if (adultsNumber == 1 && childrenNumber == 0) {
6029                    if (FE.Search.guests.guestSelects.val() != '1') {
6030                        changedVal = '1';
6031                        changed = true;
6032                    }
6033                }
6034                if (adultsNumber == 2) {
6035                    if (childrenNumber == 0) {
6036                        if (FE.Search.guests.guestSelects.val() != '2') {
6037                            changedVal = '2';
6038                            changed = true;
6039                        }
6040                    }
6041                    if (childrenNumber == 1) {
6042                        if (FE.Search.guests.guestSelects.val() != '3') {
6043                            changedVal = '3';
6044                            changed = true;
6045                        }
6046                    }
6047                    if (childrenNumber == 2) {
6048                        if (FE.Search.guests.guestSelects.val() != '4') {
6049                            changedVal = '4';
6050                            changed = true;
6051                        }
6052                    }
6053
6054                    if (childrenNumber > 2) {
6055                        if (FE.Search.guests.guestSelects.val() != '') {
6056                            changedVal = '';
6057                            changed = true;
6058                        }
6059                    }
6060                }
6061                if (adultsNumber > 2) {
6062                    if (FE.Search.guests.guestSelects.val() != '') {
6063                        changedVal = '';
6064                        changed = true;
6065                    }
6066                }
6067
6068                if (!changed) {
6069                    FE.Search.guests.guestSelects.find("option[value='mod']").data('valprev', '');
6070                    FE.Search.guests.updateResumeText();
6071                } else {
6072                    FE.Search.guests.guestSelects.val(changedVal);
6073                    FE.Search.guests.guestSelects.find("option[value='mod']").data('valprev', changedVal);
6074                }
6075
6076                FE.Search.guests.updateContainers();
6077            });
6078
6079        },
6080        removeRoomBtnClick: function (e) {
6081            var e = $(e);
6082            FE.Search.data.roomnumber = parseInt(FE.Search.data.roomnumber) - 1;
6083            //delete FE.Search.data.rooms[];
6084            FE.Search.data.rooms.splice(parseInt(e.data('id')), 1);
6085            FE.Search.guests.updateContainers();
6086        },
6087        guestRoomAddBtnClick: function () {
6088            if (FE.Search.data.roomnumber > 6)
6089                return;
6090            FE.Search.data.roomnumber = parseInt(FE.Search.data.roomnumber) + 1;
6091            FE.Search.data.rooms.push({'adultsnumber': 1});
6092            FE.Search.guests.updateContainers();
6093        },
6094        guestConfirmBtnClick: function () {
6095            FE.Search.guests.closeContainer();
6096        },
6097        checkAgeFields: function () {
6098            var emptyAgeFields = FE.Search.guests.guestsContainer.find('input.childage[value=""]');
6099
6100            emptyAgeFields.addClass("error");
6101
6102            var ageError = FE.Search.guests.guestsContainer.find('.ageError');
6103            ageError.hide();
6104            if (emptyAgeFields.length > 0) {
6105                ageError.show();
6106                return false;
6107            }
6108            return true;
6109        },
6110        closeContainer: function () {
6111            if (FE.Search.guests.checkAgeFields()) {
6112                FE.Search.mattContent.css("zIndex", 1);
6113                FE.Search.guests.guestsContainer.hide();
6114                var valPrev = FE.Search.guests.guestSelects.find("option[value='mod']").data('valprev');
6115                if (valPrev) {
6116                    FE.Search.guests.guestSelects.val(valPrev);
6117                }
6118            }
6119            if (FE.Search.guests.guestSelects.val() == '') {
6120                FE.Search.guests.updateResumeText();
6121            }
6122        },
6123        updateResumeText: function () {
6124            var adults = 0, children = 0;
6125            $.each(FE.Search.data.rooms, function (i, r) {
6126                adults += parseInt(r.adultsnumber);
6127                children += parseInt(r.childrennumber);
6128            });
6129            adults = parseInt(adults);
6130            children = parseInt(children);
6131            var resume = adults + ' ' + (adults > 1 ? FE.Core.d('form.adults').toLowerCase() : FE.Core.d('form.adult').toLowerCase()) + (children > 0 ? ', ' + children + ' ' + (children > 1 ? FE.Core.d('form.children').toLowerCase() : FE.Core.d('form.child').toLowerCase()) : '');
6132            FE.Search.guests.optionOthers.html(resume);
6133        }
6134    },
6135    setDates: function () {
6136        if (FE.Search.arrivalI.data('date') !== '') {
6137            var d = moment(FE.Search.arrivalI.data('date'));
6138            FE.Search.arrivalC.data("DateTimePicker").date(d);
6139            FE.Search.arrivalI.val(d.format(FE.Search.searchDateFormat.val()));
6140        } else {
6141            FE.Search.arrivalI.val(FE.Search.arrivalC.data("DateTimePicker").date().format(FE.Search.searchDateFormat.val()));
6142        }
6143
6144
6145        if (FE.Search.departureI.data('date') !== '') {
6146            var d = moment(FE.Search.departureI.data('date'));
6147            FE.Search.departureC.data("DateTimePicker").date(d);
6148            FE.Search.departureI.val(d.format(FE.Search.searchDateFormat.val()));
6149        } else {
6150            FE.Search.departureI.val(FE.Search.departureC.data("DateTimePicker").date().format(FE.Search.searchDateFormat.val()));
6151        }
6152    },
6153    bindStructureTypeChange: function () {
6154        $('select.structuretype').on('change', function () {
6155            /*
6156             * 1 - pensione coml
6157             * 2 - mezza pens
6158             * 3 - pernottamento e colazione
6159             * 4 - pernottamento
6160             * 5 - tutto incluso
6161             * 
6162             */
6163            switch (parseInt(this.value)) {
6164                case 39: // campeggio
6165                case 12: // camping-village-bungalows
6166                case 21: // ostello
6167                case 13: // ostello-della-gioventu
6168                case 2: // residence
6169                case 11: // altre-strutture
6170                case 22: // affitta-camere
6171                case 16: // garni
6172                case 17: // b-b
6173                case 40: // dimore-storiche-e-di-charme
6174                    $("select.accomodation").val(4);
6175                    break;
6176                case 1: // hotel
6177                case 9: // room-breakfast
6178                case 10: // agriturismo
6179                    $("select.accomodation").val(3);
6180                    break;
6181                default:
6182                    $("select.accomodation").val(4);
6183            }
6184        });
6185    },
6186    bindSearch: function () {
6187        FE.Search.searchI.on('keyup', function () {
6188            clearInterval(FE.Search.searchT);  //clear any interval on key up
6189            FE.Search.searchT = setTimeout(function () {
6190                var q = FE.Search.searchI.val();
6191                if (q.length > 1) {
6192                    FE.Search.searchStructureName.val('');
6193                    FE.Search.searchLocation.val('');
6194          
6194          FE.Search.searchOfferChannel.val('');
6195                    FE.Search.mattContent.css("zIndex", 3);
6196                    FE.Search.searching = true;
6197                    FE.Search.searchR.html(FE.Core.loaderHtml).show();
6198                    FE.TypeA.search(q).complete(function (data) {
6199                        FE.Search.searching = false;
6200                        FE.Search.searchR.html(FE.H.cTemplates.searchResult(data.responseJSON));
6201                        FE.Search.searchR.find('a').on('click', function () {
6202                            FE.Search.searchResultClick(this);
6203                        });
6204                    });
6205                }
6206            }, 500);
6207        });
6208    },
6209    searchResultClick: function (o) {
6210        o = $(o);
6211        switch (o.data('type')) {
6212            case 'city':
6213            case 'location':
6214                FE.Search.searchLocation.val(o.data('value'));
6215                FE.Search.searchLocationSlug.val(o.data('slug'));
6216                FE.Search.searchLocationType.val(o.data('type'));
6217                break;
6218            case 'structure':
6219                FE.Search.searchStructureName.val(o.data('name'));
6220                break;
6221            case 'offerChannel':
6222                FE.Search.searchOfferChannel.val(o.data('value'));
6223                break;
6224        }
6225        $('#searchMobileIdSito, #searchIdSito').val('');
6226        FE.Search.searchI.val(o.data('label'));
6227        FE.Search.searchR.html('');
6228        FE.Search.mattContent.css("zIndex", 1);
6229        FE.Search.formObj.attr('action', FE.Search.formObj.data('actiondefault'));
6230    },
6231    bindClick: function () {
6232
6233        FE.Search.searchIClear.on('click', function () {
6234            FE.Search.searchI.val('');
6235            FE.Search.searchLocation.val('');
6236            FE.Search.searchStructureName.val('');
6237        });
6238
6239        FE.Search.arrivalI.on('click', function (event) {
6240            FE.Search.departureC.hide();
6241            if (FE.Search.arrivalC.is(':visible')) {
6242                FE.Search.arrivalC.hide();
6243
6244                FE.Search.mattContent.css("zIndex", 1);
6245            } else {
6246                FE.Search.arrivalC.show();
6247                FE.Search.mattContent.css("zIndex", 3);
6248            }
6249            event.stopPropagation();
6250        });
6251
6252        FE.Search.arrivalI.on('keyup', function (event) {
6253            var t = $(this);
6254            if (t.val() == '' || t.val() == ' ') {
6255                t.val(' ');
6256                FE.Search.formObj.addClass('error');
6257                FE.Search.arrivalI.closest('.control-group').addClass('error');
6258            } else {
6259                t.val(t.val().trim());
6260                FE.Search.formObj.removeClass('error');
6261                FE.Search.arrivalI.closest('.control-group').removeClass('error');
6262            }
6263        });
6264
6265
6266        FE.Search.departureI.on('keyup', function (event) {
6267            var t = $(this);
6268            if (t.val() == '' || t.val() == ' ') {
6269                t.val(' ');
6270                FE.Search.formObj.addClass('error');
6271                FE.Search.arrivalI.closest('.control-group').addClass('error');
6272            } else {
6273                t.val(t.val().trim());
6274                FE.Search.formObj.removeClass('error');
6275                FE.Search.arrivalI.closest('.control-group').removeClass('error');
6276            }
6277        });
6278
6279        FE.Search.departureI.on('click', function (event) {
6280            FE.Search.arrivalC.hide();
6281            if (FE.Search.departureC.is(':visible')) {
6282                FE.Search.departureC.hide();
6283                FE.Search.mattContent.css("zIndex", 1);
6284            } else {
6285                FE.Search.departureC.show();
6286                FE.Search.mattContent.css("zIndex", 3);
6287            }
6288            event.stopPropagation();
6289        });
6290
6291
6292        $('html').on('click', function () {
6293            $('.searchDropDown').not(".guestsContainer").hide();
6294        });
6295
6296        $('.highlightSearch').on('click', function () {
6297            if ($('#searchMobileToggle').is(':visible')) {
6298                FE.SearchM.searchResume.trigger('click');
6299            } else {
6300
6301                FE.Search.highlight();
6302
6303
6304            }
6305        });
6306
6307
6308    },
6309    highlight: function () {
6310        if ($('.navbar').is(':visible') || $('.logo-landing-page').is(':visible')) {
6311            FE.SearchM.openSearchMenu();
6312        } else {
6313
6314            FE.Core.scrollTo('searchCnt').done(function ( ) {
6315                if ($('.searchCntNew').length > 0) {
6316                    var mc = $('.mattContent .searchCntNew .destinationRow');
6317                    mc.addClass('highlight');
6318                    setTimeout(function () {
6319                        mc.removeClass('highlight');
6320                    }, 1500);
6321                } else {
6322                    var ml = $('#mattLayer');
6323                    var mc = $('.mattContent');
6324                    var pin = FE.Search.formObj.find('.glyphicon-pin');
6325                    ml.fadeIn();
6326                    mc.addClass('highlight');
6327                    pin.addClass('bounce');
6328
6329                    setTimeout(function () {
6330                        mc.removeClass('highlight');
6331                        pin.removeClass('bounce');
6332                        ml.fadeOut();
6333                    }, 1500);
6334                }
6335            });
6336        }
6337    },
6338    initDateFields: function () {
6339
6340        FE.Search.arrivalCOption.locale = FE.Core.configuration.app.locale;
6341
6342        if (typeof CustomArrivalCOptionDaysOfWeekDisabled !== 'undefined') {
6343            FE.Search.arrivalCOption.daysOfWeekDisabled = CustomArrivalCOptionDaysOfWeekDisabled;
6344        }
6345        if (typeof CustomArrivalCOptionDefaultDate !== 'undefined') {
6346            FE.Search.arrivalCOption.defaultDate = CustomArrivalCOptionDefaultDate;
6347        }
6348        if (typeof CustomArrivalCOptionMinDate !== 'undefined') {
6349            FE.Search.arrivalCOption.minDate = CustomArrivalCOptionMinDate;
6350        }
6351        FE.Search.arrivalC.datetimepicker(FE.Search.arrivalCOption);
6352
6353        FE.Search.departureCOption.locale = FE.Core.configuration.app.locale;
6354        if (typeof CustomDepartureCOptionDaysOfWeekDisabled !== 'undefined') {
6355            FE.Search.departureCOption.daysOfWeekDisabled = CustomDepartureCOptionDaysOfWeekDisabled;
6356        }
6357        if (typeof CustomDepartureCOptionMaxDate !== 'undefined') {
6358            FE.Search.departureCOption.maxDate = CustomDepartureCOptionMaxDate;
6359        }
6360        if (typeof CustomDepartureCOptionDefaultDate !== 'undefined') {
6361            FE.Search.departureCOption.defaultDate = CustomDepartureCOptionDefaultDate;
6362        }
6363        FE.Search.departureC.datetimepicker(FE.Search.departureCOption);
6364
6365        FE.Search.arrivalC.on("dp.change", function (e) {
6366            FE.Search.arrivalI.val(moment(e.date).format('l'));
6367            FE.Search.departureC.data("DateTimePicker").minDate(e.date);
6368
6369            if (typeof CustomDepartureMinDays !== 'undefined') {
6370                var d = e.date.add(CustomDepartureMinDays, 'days');
6371                FE.Search.departureC.data("DateTimePicker").minDate(d);
6372                FE.Search.departureC.data("DateTimePicker").date(d);
6373            } else if (e.date.isSameOrAfter(FE.Search.departureC.data("DateTimePicker").date())) {
6374                FE.Search.departureC.data("DateTimePicker").date(e.date.add(3, 'days'));
6375            }
6376            $(this).hide();//slideUp(); 
6377        });
6378
6379        FE.Search.departureC.on("dp.change", function (e) {
6380            FE.Search.departureI.val(moment(e.date).format('l'));
6381            //FE.Search.arrivalC.data("DateTimePicker").maxDate(e.date);
6382            $(this).hide();//slideUp();
6383        });
6384
6385        $("#searchDateFormat").val(moment.localeData().longDateFormat('l'));
6386
6387
6388
6389    },
6390    initValidation: function () {
6391        $("#searchForm input,#searchForm textarea,#searchForm  select").not("[type=submit]").jqBootstrapValidation(
6392                {
6393                    //sniffHtml: false,
6394                    prependExistingHelpBlock: false,
6395                    semanticallyStrict: true,
6396                    autoAdd: {
6397                        helpBlocks: false
6398                    },
6399                    //preventSubmit: true,
6400                    submitError: function ($form, event, errors) {
6401                        $('.tooltip-trigger').tooltip('show');
6402                        setTimeout(function () {
6403                            $('.tooltip-trigger').tooltip('hide');
6404                        }, 5000);
6405
6406                        $('.control-group.error label').addClass('bounce');
6407                        setTimeout(function () {
6408                            $('.control-group.error label').removeClass('bounce');
6409                        }, 1500);
6410                    },
6411                    submitSuccess: function ($form, event) {
6412                        $('.tooltip-trigger').tooltip('hide');
6413                        FE.Search.submit($form, event);
6414                    },
6415                    filter: function () {
6416                        return $(this).is(":visible");
6417                    }
6418                }
6419        );
6420    },
6421    submit: function (form, event) {
6422        event.preventDefault();
6423
6424        if (form.data('sending') === 1) {
6425            return;
6426        }
6427        form.data('sending', 1);
6428
6429        var button = form.find('.submit').first();
6430        var spinner = form.find('.spinCnt').first();
6431
6432        spinner.html(FE.Core.spinnerHtml).show();
6433        button.hide();
6434
6435
6436        /*modal*/
6437        var modalData = {
6438            header: {
6439                close: true,
6440                cls: 'tinyClose'
6441            },
6442            body: {
6443                content: FE.H.cTemplates.searchModal({searching: true}),
6444                cls: 'searchModal',
6445                id: 'searchModal'
6446            }
6447        };
6448        FE.Modal.showHtml(FE.H.cTemplates.modal(modalData));
6449
6450        var qstring = form.serialize();
6451        var ajaxOptions = {
6452            url: form.attr('action') + '.json?' + qstring,
6453            dataType: 'json',
6454            success: function (data, statusText) {
6455                var modalData = {
6456                    body: {
6457                        content: FE.H.cTemplates.searchModal(data.data),
6458                        cls: 'searchModal',
6459                        id: 'searchModal'
6460                    }
6461                };
6462                $('#searchModal').children().html(FE.H.cTemplates.modal(modalData));
6463
6464                if (data.success === true && parseInt(data.data.strutture) > 0) {
6465                    window.location = data.listUrl + (preview ? '&preview=yes' : '');
6466                }
6467
6468                button.show();
6469                spinner.hide();
6470                form.data('sending', 0);
6471            },
6472            error: function () {
6473                button.show();
6474                spinner.hide();
6475                form.data('sending', 0);
6476            }
6477        };
6478
6479        $.ajax(ajaxOptions);
6480        return;
6481    }
6482}, FE.Core.addInit(FE.Search.init);
6483FE.SL = {
6484    jo: $('#structureList'),
6485    structureListOrder: $('.structureListOrder'),
6486    structureListPag: null,
6487    structureListFiltersForm: $('#structureListFilters'),
6488    structureList: $('.structureList'),
6489    shuffle: null,
6490    init: function () {
6491        FE.log('FE.SL.init');
6492        if (FE.SL.jo.length > 0) {
6493            FE.SL.map.initTriggers();
6494            FE.SL.loader.init();
6495        }
6496        if (FE.SL.structureListFiltersForm.length > 0 && document.getElementById('structureListUl')) {
6497            FE.SL.filter.init();
6498        }
6499    },
6500    loader: {
6501        structureListTmp: $('#structureListUlTmp'),
6502        init: function () {
6503            if (FE.SL.jo.data('searchcomplete') == '0') {
6504                FE.SL.loader.load();
6505            }
6506        },
6507        load: function () {
6508            FE.log('FE.SL.loader.load()');
6509
6510            var arrayId = [], t = null;
6511            FE.SL.jo.find('.structure').each(function () {
6512                t = $(this).data('id');
6513                if (t) {
6514                    arrayId.push(t);
6515                }
6516            });
6517
6518            var ajaxOptions = {
6519                url: FE.SL.jo.data('loadurl'),
6520                data: {y: arrayId},
6521                dataType: 'json',
6522                success: function (data, statusText) {
6523
6524                    FE.SL.loader.structureListTmp.html(data.html);
6525                    $('#structureListMapData').remove();
6526                    $("body").append(data.jsmapdata);
6527
6528                    var elements = FE.SL.loader.structureListTmp.find('.structure');
6529                    var frag = document.createDocumentFragment();
6530                    var items = [];
6531
6532                    elements.each(function () {
6533                        var div = document.createElement('div');
6534                        div.innerHTML = $(this).clone().wrap('<div>').parent().html();
6535                        var elements = div.childNodes;
6536                        var fc = div.firstChild;
6537                        frag.appendChild(fc);
6538                        items.push(fc);
6539                    });
6540
6541                    var $items = $(items);
6542                    FE.SL.shuffle.element.appendChild(frag);
6543                    FE.SL.shuffle.appended($items);
6544                    FE.Core.bLazy.revalidate();
6545
6546                    $('#structureNumberList').html(FE.SL.structureList.find('.structure').length);
6547
6548                    if (data.searchcompleted == '0') {
6549                        FE.SL.loader.load();
6550                    } else {
6551                        $('#structureNumberListCnt').show();
6552                        $('#loaderListSpin,#structureListLoaderMessage').hide();
6553                        FE.SL.filter.init();
6554                    }
6555                },
6556                error: function () {
6557                }
6558            };
6559
6560            $.ajax(ajaxOptions);
6561//            FE.SL.loader.timeout = setTimeout(function () {
6562//            }, 3000);
6563        }
6564    },
6565    filter: {
6566        provinces: [],
6567        citiesar: [],
6568        category: [],
6569        price: [],
6570        type: [],
6571//        priceRanges: {},
6572        cities: {
6573            init: function () {
6574                FE.log('FE.SL.filter.cities.init');
6575
6576                var a = [];
6577                var o = [];
6578
6579                $('.citiesWrapper .cities').html('');
6580                var html = '';
6581
6582                FE.SL.structureList.find('.structure').each(function () {
6583                    var c = $(this).data('city');
6584                    var l = $(this).data('citylabel');
6585                    if (c && a.indexOf(c) === -1 && c !== '') {
6586                        a.push(c);
6587                        var id = 'city-' + c.replace(" ", "-");
6588                        o.push({
6589                            l: l,
6590                            html: '<li><label for="' + id + '"><input class="check iCheck" type="checkbox" value="' + l + '" name="cities[]" id="' + id + '" ' + ($.inArray(l, FE.SL.filter.citiesar) >= 0?'checked':'') + '>
6590' + l + '</label></li>'
6591                        });
6592
6593                    }
6594                });
6595                $('.citiesWrapper .cities').html(html);
6596
6597                if (a.length > 1) {
6598                    o.sort(function (a, b) {
6599                        var la = a.l.toUpperCase();
6600                        var lb = b.l.toUpperCase();
6601
6602                        var comparison = 0;
6603                        if (la > lb) {
6604                            comparison = 1;
6605                        } else if (la < lb) {
6606                            comparison = -1;
6607                        }
6608                        return comparison;
6609                    });
6610                    $.each(o, function (i, e) {
6611                        $('.citiesWrapper .cities').append(e.html);
6612                    });
6613                    $('.citiesWrapper').show();
6614                }
6615
6616
6617                FE.log('a', a);
6618            }
6619        },
6620
6621        wellness: function () {
6622            var spas = FE.SL.structureListFiltersForm.find('.wellness input.iCheck');
6623
6624            if (spas.length > 0) {
6625
6626                spas.on('ifUnchecked', function (event) {
6627                    FE.log('unchecked');
6628                    $('#searchIdSito').val(262);
6629                    $('#searchForm').trigger('submit');
6630                });
6631
6632                spas.on('ifChecked', function (event) {
6633                    $('#searchIdSito').val($(this).val());
6634                    $('#searchForm').trigger('submit');
6635                });
6636
6637            }
6638        },
6639        init: function () {
6640
6641            FE.SL.shuffle = new Shuffle(document.getElementById('structureListUl'), {//FE.SL.structureList.shuffle({
6642
6643                itemSelector: '.structure'
6644//            ,initialSort: {
6645//                reverse: true,
6646//                by: function ($el) {
6647//                    return $el.data('startdate');
6648//                }
6649//            }
6650            });
6651
6652            // CITIES
6653            if ($('.citiesWrapper').length > 0) {
6654                FE.SL.filter.cities.init();
6655            }
6656
6657            FE.SL.filter.shuffle();
6658
6659            var input = FE.SL.structureListFiltersForm.find('input.iCheck');
6660            input.iCheck({
6661                checkboxClass: 'icheckbox_minimal-blue',
6662                radioClass: 'iradio_minimal-blue'
6663            });
6664
6665            FE.SL.filter.wellness();
6666
6667            var provinces = FE.SL.structureListFiltersForm.find('.provinces input.iCheck');
6668            if (provinces.length > 0) {
6669                provinces.on('ifChecked', function (event) {
6670                    FE.SL.filter.provinces.push($(this).val());
6671                    FE.SL.filter.shuffle();
6672                    FE.Core.scrollTo('structureList');
6673                });
6674                provinces.on('ifUnchecked', function (event) {
6675                    FE.SL.filter.provinces.splice($.inArray($(this).val(), FE.SL.filter.provinces), 1);
6676                    FE.SL.filter.shuffle();
6677                    FE.Core.scrollTo('structureList');
6678                });
6679            }
6680
6681            var cities = FE.SL.structureListFiltersForm.find('.cities input.iCheck');
6682            if (cities.length > 0) {
6683                cities.on('ifChecked', function (event) {
6684                    FE.SL.filter.citiesar.push($(this).val());
6685                    FE.SL.filter.shuffle();
6686                    FE.Core.scrollTo('structureList');
6687                });
6688                cities.on('ifUnchecked', function (event) {
6689                    FE.SL.filter.citiesar.splice($.inArray($(this).val(), FE.SL.filter.citiesar), 1);
6690                    FE.SL.filter.shuffle();
6691                    FE.Core.scrollTo('structureList');
6692                });
6693            }
6694
6695            var type = FE.SL.structureListFiltersForm.find('.type input.iCheck');
6696            if (type.length > 0) {
6697
6698                var types = {};
6699                var typesNumber = 0;
6700                $('.structure').each(function () {
6701                    var type = $(this).data('typeid');
6702                    if (typeof type != 'undefined') {
6703                        types[type] = 1;
6704                        typesNumber++;
6705                    }
6706                });
6707
6708                var size = FE.Core.objectSize(types);
6709
6710                if (size > 1) {
6711                    $('.typeWrapper li').hide();
6712                    $.each(types, function (index, value) {
6713                        $('.typeWrapper li.type' + index).show();
6714                    });
6715
6716                    $('.typeTitle, .typeWrapper').show();
6717
6718                    type.on('ifChecked', function (event) {
6719                        FE.SL.filter.type.push($(this).val());
6720                        FE.SL.filter.shuffle();
6721                        FE.Core.scrollTo('structureList');
6722                    });
6723                    type.on('ifUnchecked', function (event) {
6724                        FE.SL.filter.type.splice($.inArray($(this).val(), FE.SL.filter.type), 1);
6725                        FE.SL.filter.shuffle();
6726                        FE.Core.scrollTo('structureList');
6727                    });
6728                } else {
6729                    $('.typeTitle').hide();
6730                    $('.typeWrapper').hide();
6731                }
6732            }
6733
6734            var category = FE.SL.structureListFiltersForm.find('.category input.iCheck');
6735            if (category.length > 0) {
6736
6737                category.on('ifChecked', function (event) {
6738                    FE.SL.filter.category.push($(this).val());
6739                    FE.SL.filter.shuffle();
6740                    FE.Core.scrollTo('structureList');
6741                });
6742                category.on('ifUnchecked', function (event) {
6743                    FE.SL.filter.category.splice($.inArray($(this).val(), FE.SL.filter.category), 1);
6744                    FE.SL.filter.shuffle();
6745                    FE.Core.scrollTo('structureList');
6746                });
6747            }
6748
6749            var price = FE.SL.structureListFiltersForm.find('.price input.iCheck');
6750            if (price.length > 0) {
6751                price.on('ifChecked', function (event) {
6752                    FE.SL.filter.price.push($(this).val());
6753
6754                    FE.SL.filter.shuffle();
6755                    FE.Core.scrollTo('structureList');
6756
6757                });
6758                price.on('ifUnchecked', function (event) {
6759                    FE.SL.filter.price.splice($.inArray($(this).val(), FE.SL.filter.price), 1);
6760                    FE.SL.filter.shuffle();
6761                    FE.Core.scrollTo('structureList');
6762                });
6763            }
6764
6765
6766            $('#structureListFiltersTrgr').on('click', function () {
6767                $('.structureListFiltersCnt').toggle();
6768            });
6769
6770
6771
6772            $('.structureListOrder').on('change', function () {
6773                var sort = this.value,
6774                        opts = {};
6775
6776                switch (sort) {
6777                    case 'Categoria':
6778                        opts = {
6779                            reverse: false,
6780                            by: function ($el) {
6781                                return $el.data('category');
6782                            }
6783                        };
6784                        break;
6785                    case 'CategoriaD':
6786                        opts = {
6787                            reverse: true,
6788                            by: function ($el) {
6789                                return $el.data('category');
6790                            }
6791                        };
6792                        break;
6793                    case 'Prezzo':
6794                        opts = {
6795                            reverse: false,
6796                            by: function ($el) {
6797                                return $el.data('pricesort');
6798                            }
6799                        };
6800                        break;
6801                    case 'PrezzoD':
6802                        opts = {
6803                            reverse: true,
6804                            by: function ($el) {
6805                                return $el.data('pricesort');
6806                            }
6807                        };
6808                        break;
6809
6810                }
6811                FE.SL.structureList.shuffle('sort', opts);
6812            });
6813
6814        },
6815        shuffle: function () {
6816            FE.SL.structureList.shuffle('shuffle', function ($el, shuffle) {
6817
6818                FE.log('FE.SL.structureList.shuffle');
6819                var res = true;
6820                if (FE.SL.filter.provinces.length > 0) {
6821                    res = $.inArray('' + $el.data('province'), FE.SL.filter.provinces) > -1;
6822                    if (!res)
6823                        return res;
6824                }
6825
6826                FE.log('FE.SL.filter.citiesar', FE.SL.filter.citiesar);
6827                if (FE.SL.filter.citiesar.length > 0) {
6828                    res = $.inArray('' + $el.data('citylabel'), FE.SL.filter.citiesar) > -1;
6829                    if (!res)
6830                        return res;
6831                }
6832
6833                FE.log('FE.SL.filter.category', FE.SL.filter.category);
6834                if (FE.SL.filter.category.length > 0) {
6835                    res = $.inArray('' + $el.data('category'), FE.SL.filter.category) > -1;
6836                    if (!res)
6837                        return res;
6838                }
6839
6840                FE.log('FE.SL.filter.type', FE.SL.filter.type);
6841                if (FE.SL.filter.type.length > 0) {
6842                    res = $.inArray('' + $el.data('type'), FE.SL.filter.type) > -1;
6843                    if (!res)
6844                        return res;
6845                }
6846
6847
6848                FE.log('FE.SL.filter.price', FE.SL.filter.price);
6849                if (FE.SL.filter.price.length > 0) {
6850                    var resPrice = false;
6851                    $.each(FE.SL.filter.price, function (i, j) {
6852                        var prices = j.split("_");
6853                        FE.log(prices);
6854                        var p = parseInt($el.data('price'));
6855                        resPrice = parseInt(prices[0]) < p && p <= parseInt(prices[1]);
6856                        if (resPrice)
6857                            return;
6858                    });
6859                    if (!resPrice)
6860                        return resPrice;
6861                }
6862                return res;
6863            });
6864
6865
6866            setTimeout(function () {
6867                var almostOneElementIsVisible = false;
6868                FE.SL.jo.find('.structure').each(function () {
6869                    var el = $(this);
6870                    if (el.css('visibility') != 'hidden' && el.css('display') != 'none' && !el.is(':hidden')) {
6871                        almostOneElementIsVisible = true;
6872                        return;
6873                    }
6874                });
6875
6876                if (almostOneElementIsVisible) {
6877                    $('.alertBox.filters').hide();
6878                } else {
6879                    $('.alertBox.filters').show();
6880                }
6881
6882                FE.Core.bLazy.revalidate();
6883            }, 500);
6884        }
6885    },
6886    map: {
6887        jsLoaded: false,
6888        mapWrapper: $('#structureListMap'),
6889        data: null,
6890        markers: [],
6891        infowindows: [],
6892        markerClusterer: null,
6893        initTriggers: function () {
6894            $('.mapTrigger').on('click', function () {
6895                var d = $('#structureListMapData');
6896                FE.SL.map.data = JSON.parse(d.html());
6897                if (FE.SL.map.data.length == 0) {
6898                    return;
6899                }
6900                FE.SL.map.toggle();
6901            });
6902        },
6903        map: null,
6904        init: function () {
6905            var d = $('#structureListMapData');
6906            if (d.length > 0) {
6907                FE.SL.map.data = JSON.parse(d.html());
6908                if (FE.SL.map.data.length == 0) {
6909                    return;
6910                }
6911            }
6912            FE.SL.map.jsLoaded = true;
6913            FE.SL.map.map = new google.maps.Map(document.getElementById(FE.SL.map.mapWrapper.attr('id')), {
6914                zoom: 12,
6915                scrollwheel: false,
6916                center: {lat: 44.064, lng: 12.5849}
6917            });
6918            var bounds = new google.maps.LatLngBounds();
6919            var markerImage = {
6920                url: '/assets/frontend/img/pin-strutture.png',
6921                size: new google.maps.Size(28, 37),
6922                origin: new google.maps.Point(0, 0),
6923                anchor: new google.maps.Point(14, 37)
6924            };
6925            var infowindow = new google.maps.InfoWindow();
6926            for (var i = 0; i < FE.SL.map.data.length; i++) {
6927                var data = FE.SL.map.data[i];
6928                if (data.lat == '' || data.lng == '')
6929                    continue;
6930                var latLng = new google.maps.LatLng(data.lat, data.lng);
6931                bounds.extend(latLng);
6932                var marker = new google.maps.Marker({
6933                    position: latLng,
6934                    title: data.name,
6935                    icon: markerImage
6936                });
6937                google.maps.event.addListener(marker, 'click', (function (marker, data, infowindow) {
6938                    return function () {
6939                        infowindow.setContent(FE.H.cTemplates.infoWindow(data));
6940                        infowindow.open(FE.SL.map.map, marker);
6941                    };
6942                })(marker, data, infowindow));
6943                FE.SL.map.markers.push(marker);
6944            }
6945
6946            FE.SL.map.map.fitBounds(bounds);
6947            FE.SL.map.markerClusterer = new MarkerClusterer(FE.SL.map.map, FE.SL.map.markers);
6948            FE.SL.map.toggle();
6949        },
6950        putGoogleJs: function () {
6951            if (FE.SL.map.jsLoaded) {
6952                return;
6953            }
6954            FE.Core.putGoogleMapJs('FE.SL.map.init');
6955        },
6956        toggle: function () {
6957            if (FE.SL.map.mapWrapper.is(':empty')) {
6958                FE.SL.map.putGoogleJs();
6959            } else {
6960                FE.SL.map.mapWrapper.toggle();
6961            }
6962        }
6963    }
6964
6965}, FE.Core.addInit(FE.SL.init);
6966FE.OC = {
6967    container: $('#offerChannels'),
6968    init: function () {
6969        FE.log('FE.OC.init');
6970        if (FE.OC.container.length > 0) {
6971            FE.OC.initTooltip();
6972        }
6973    },
6974    initTooltip: function () {
6975        FE.OC.container.find('[data-toggle="tooltip"]').tooltip({
6976            placement: 'bottom',
6977            html: true
6978        });
6979    }
6980}, FE.Core.addInit(FE.OC.init);
6981FE.SD = {
6982    container: $('#structureDetail'),
6983    nearbyStructures: $('#nearbyStructures'),
6984    init: function () {
6985        FE.log('FE.SD.init');
6986        if ($('#structureDetailMap').length > 0) {
6987            FE.SD.map.putGoogleJs();
6988        }
6989
6990        if (FE.SD.nearbyStructures.length > 0) {
6991            FE.SD.loadNearby();
6992        }
6993
6994        FE.SD.booking.init();
6995        FE.SD.carousel.init();
6996        FE.SD.form.init();
6997
6998        if ($('.mediaTop').filter(":visible").length > 0) {
6999            var t = $('#structureDetail');
7000            if (t.length > 0) {
7001                $('html,body').animate({
7002                    scrollTop: (t.offset().top - 50)
7003                }, 1000);
7004            }
7005        }
7006    },
7007    loadNearby: function () {
7008        FE.SD.nearbyStructures.load(FE.SD.nearbyStructures.data('load'));
7009    },
7010    carousel: {
7011        element: $('#structureCarousel'),
7012        init: function () {
7013            if (FE.SD.carousel.element.length > 0) {
7014                FE.SD.carousel.element.carousel();
7015            }
7016        }
7017    },
7018    form: {
7019        o: null,
7020        arrival: null,
7021        departure: null,
7022        init: function () {
7023            FE.SD.form.o = $('#campingMessageForm');
7024            if (FE.SD.form.o.length > 0) {
7025                FE.SD.form.initDates();
7026                FE.SD.form.initValidation();
7027                $('#structureChildren').on('change', function () {
7028                    FE.SD.form.updateChildrenFields($(this).val());
7029                });
7030            }
7031        },
7032        initValidation: function () {
7033            $("#campingMessageForm input,#campingMessageForm  select").not("[type=submit]").jqBootstrapValidation(
7034                    {
7035                        //sniffHtml: false,
7036                        prependExistingHelpBlock: false,
7037                        semanticallyStrict: true,
7038                        autoAdd: {
7039                            helpBlocks: true
7040                        },
7041                        //preventSubmit: true,
7042                        submitError: function ($form, event, errors) {
7043                            // Here I do nothing, but you could do something like display 
7044                            // the error messages to the user, log, etc.
7045                        },
7046                        submitSuccess: function ($form, event) {
7047                            FE.SD.form.submit($form, event);
7048                        },
7049                        filter: function () {
7050                            return $(this).is(":visible");
7051                        }
7052                    }
7053            );
7054        },
7055        updateChildrenFields: function (val) {
7056            val = parseInt(val);
7057            var $counter = 1;
7058            $('#ChildrensAge .childrenAgeCnt').each(function () {
7059                $counter++;
7060                if ($counter > (val + 1)) {
7061                    $(this).remove();
7062                }
7063            });
7064
7065            for ($i = $counter; $i <= val; $i++) {
7066                $('#ChildrensAge').append('<div class="form-group control-group col-md-3 childrenAgeCnt"><div class="controls"><input class="form-control" id="child_age_' + $i + '" name="br[child][' + $i + '][age]" placeholder="' + FE.Core.d('form.child.age') + ' ' + $i + '"  aria-invalid="false" type="number"  min="0" data-validation-min-message="' + FE.Core.d('form.child.age') + ' > 0" required data-validation-required-message="' + FE.Core.d('form.child.age') + '"></div></div>');
7067            }
7068
7069            $("#campingMessageForm .childrenAgeCnt input").jqBootstrapValidation(
7070                    {
7071                        prependExistingHelpBlock: false,
7072                        semanticallyStrict: true,
7073                        autoAdd: {
7074                            helpBlocks: true
7075                        },
7076                        filter: function () {
7077                            return $(this).is(":visible");
7078                        }
7079                    }
7080            );
7081        },
7082        initDates: function () {
7083            FE.SD.form.arrival = $('#structureArrival');
7084            FE.SD.form.departure = $('#structureDeparture');
7085            FE.SD.form.arrival.datetimepicker({
7086                locale: FE.Core.configuration.app.locale,
7087                disabledHours: false,
7088                format: 'l',
7089//            inline: true,
7090                defaultDate: moment()
7091            });
7092
7093            FE.SD.form.departure.datetimepicker({
7094                useCurrent: false, //Important! See issue #1075
7095                locale: FE.Core.configuration.app.locale,
7096                disabledHours: false,
7097                format: 'l',
7098//            inline: true,
7099                defaultDate: moment().add(3, 'days')
7100            });
7101
7102
7103            FE.SD.form.arrival.on("dp.change", function (e) {
7104                FE.SD.form.departure.data("DateTimePicker").minDate(e.date);
7105                if (e.date.isSameOrAfter(FE.SD.form.departure.data("DateTimePicker").date())) {
7106                    FE.SD.form.departure.data("DateTimePicker").date(e.date.add(3, 'days'));
7107                }
7108            });
7109        },
7110        submit: function (form, event) {
7111            event.preventDefault();
7112
7113            if (form.data('sending') === 1) {
7114                return;
7115            }
7116
7117            if (typeof grecaptcha === 'undefined') {
7118                return;
7119            }
7120
7121            grecaptcha.execute('6LfdOPMUAAAAAGq8gZPFOVZiebkOLgC63VQDNWfB', {action: 'contatti'}).then(function (token) {
7122
7123                document.getElementById('erwrequestform').value = token;
7124
7125                form.data('sending', 1);
7126
7127                var button = form.find('.submit').first();
7128                var spinner = form.find('.spinCnt').first();
7129
7130                spinner.html(FE.Core.spinnerHtml).show();
7131                button.hide();
7132
7133                var ajaxOptions = {
7134                    url: form.attr('action'),
7135                    method: 'POST',
7136                    data: form.serialize(),
7137                    dataType: 'json',
7138                    success: function (data, statusText) {
7139
7140                        if (data.success === true) {
7141                            FE.Stats.Track('tracking/inviata-mail-campeggio');
7142                            $("#campingMessageForm input,#campingMessageForm textarea,#campingMessageForm  select").prop("disabled", true);
7143                            button.html('<span class="glyphicon-check"></span> ' + FE.Core.d('mail.structure.success'));
7144                        } else {
7145                            form.data('sending', 0);
7146                        }
7147
7148                        button.show();
7149                        spinner.hide();
7150                    },
7151                    error: function () {
7152                        button.show();
7153                        spinner.hide();
7154                        form.data('sending', 0);
7155                    }
7156                };
7157
7158                $.ajax(ajaxOptions);
7159            });
7160            return;
7161        }
7162    },
7163    booking: {
7164        data: null,
7165        htmlCnt: $('#structureBooking'),
7166        init: function () {
7167            var d = $('#structureBookingData');
7168            if (d.length > 0) {
7169                FE.SD.booking.data = JSON.parse(d.html());
7170                FE.SD.booking.drawBooking();
7171
7172                $('#bookBestPrice').on('click', function () {
7173                    var e = $(this);
7174                    FE.SD.booking.bookBestPrice(e.data('price'));
7175                });
7176            }
7177        },
7178        bookBestPrice: function (price) {
7179            var b = FE.SD.booking.data;
7180            var room = b.camere.camera;
7181            if (FE.SD.booking.getRoomsNumber() > 1) {
7182                var room = b.camere.camera[0];
7183            }
7184            var data = {
7185                'roomsearchid': room.idricercacamera
7186            };
7187            if (typeof room.preventivi.preventivo.length == 'undefined') {
7188                if (room.preventivi.preventivo.prezzo == price) {
7189                    data.roomid = room.preventivi.preventivo.idcamera;
7190                    data.disponibile = room.preventivi.preventivo.disponibile;
7191                }
7192            } else {
7193                $.each(room.preventivi.preventivo, function (j, p) {
7194                    if (p.prezzo == price) {
7195                        data.roomid = p.idcamera;
7196                        data.disponibile = p.disponibile;
7197                        return;
7198                    }
7199                });
7200            }
7201
7202            FE.SD.booking.updateBooking(data);
7203        },
7204        allowBookingRegistration: function () {
7205            var b = FE.SD.booking.data;
7206            if (typeof b.bookingbotton == 'undefined' || b.bookingbotton.disponibile === false) {
7207                return false;
7208            }
7209            if (FE.SD.booking.getRoomsNumber() == 1) {
7210                return true;
7211            }
7212
7213            var allow = true;
7214            $.each(b.camere.camera, function (i, e) {
7215                if (typeof e['@attributes'] == 'undefined' || typeof e['@attributes']['selezionata'] == 'undefined' || e['@attributes']['selezionata'] != 'true') {
7216                    allow = false;
7217                    return;
7218                }
7219            });
7220            return allow;
7221        },
7222        getRoomsNumber: function () {
7223            var b = FE.SD.booking.data;
7224            if (typeof b.camere.camera.length == 'undefined') {
7225                return 1;
7226            }
7227            return b.camere.camera.length;
7228        },
7229        isPreviousRoomSelected: function (roomIndex) {
7230            if (roomIndex == 0) {
7231                return true;
7232            }
7233            roomIndex--;
7234            var b = FE.SD.booking.data;
7235            if (typeof b.camere.camera.length == 'undefined') {
7236                return true;
7237            }
7238            var e = b.camere.camera[roomIndex];
7239            return typeof e['@attributes'] != 'undefined' && typeof e['@attributes']['selezionata'] && 'undefined' && e['@attributes']['selezionata'] == 'true';
7240
7241        },
7242        goToRegisterBooking: function () {
7243            if (FE.SD.booking.allowBookingRegistration()) {
7244
7245                var url = FE.SD.booking.htmlCnt.data('registerurl');
7246                url = url.replace('p/0', 'p/' + FE.SD.booking.data.bookingbotton.idcontattoproposta + (preview ? '?preview=yes' : ''));
7247                window.location.href = url;
7248            }
7249        },
7250        initActions: function () {
7251
7252            $('.checkRoom').iCheck({
7253                checkboxClass: 'icheckbox_minimal-blue',
7254                increaseArea: '50%'
7255            });
7256
7257
7258            $('.roomDescription').each(function (index) {
7259                var t = $(this);
7260                if (t.innerHeight() > 100) {
7261                    t.parent().addClass('folded');
7262                }
7263            });
7264
7265            $('.continueWithBooking').on('click', function () {
7266                FE.SD.booking.goToRegisterBooking();
7267            });
7268
7269            $('.bookRoom').on('click', function () {
7270                var o = $(this);
7271
7272                var data = {
7273                    'roomid': o.data('roomid'),
7274                    'roomsearchid': o.data('roomsearchid'),
7275                    'disponibile': o.data('disponibile')
7276                };
7277                FE.SD.booking.updateBooking(data);
7278            });
7279
7280
7281            $('.checkRoom').on('ifChecked', function () {
7282                var o = $(this);
7283                var data = {
7284                    'roomid': o.val(),
7285                    'roomsearchid': o.data('roomsearchid')
7286                };
7287                FE.SD.booking.updateBooking(data);
7288            });
7289        },
7290        drawBooking: function () {
7291
7292            FE.SD.booking.htmlCnt.html(FE.H.cTemplates.structureBooking(FE.SD.booking.data));
7293
7294            FE.SD.booking.initActions();
7295        },
7296        updateBooking: function (data) {
7297
7298
7299            if (preview) {
7300                data.preview = 'yes';
7301            }
7302            var modalData = {
7303                header: {
7304                    close: true,
7305                    cls: 'tinyClose'
7306                },
7307                body: {
7308                    content: FE.H.cTemplates.bookingAvailabilityModal({searching: true, disponibile: data.disponibile}),
7309                    cls: 'bookingAvailabilityModal',
7310                    id: 'bookingAvailabilityModal'
7311                }
7312            };
7313
7314            FE.Modal.showHtml(FE.H.cTemplates.modal(modalData));
7315
7316            data.contactid = FE.SD.booking.htmlCnt.data('contactid');
7317            var dataRequest = data;
7318            var ajaxOptions = {
7319                url: FE.Core.configuration.routes['structure_multiroom_quote'] + '.json',
7320                dataType: 'json',
7321                data: data,
7322                method: 'POST',
7323                success: function (data, statusText) {
7324                    var modalData = {
7325                        body: {
7326                            content: '',
7327                            cls: 'bookingAvailabilityModal',
7328                            id: 'bookingAvailabilityModal'
7329                        }
7330                    };
7331
7332
7333                    var draw = true;
7334
7335                    if (data.success) {
7336                        FE.SD.booking.data = data.data;
7337
7338                        if (FE.SD.booking.getRoomsNumber() == 1) {
7339                            if (FE.SD.booking.allowBookingRegistration()) {
7340                                if (dataRequest.disponibile) {
7341                                    draw = false;
7342                                    modalData.body.content = FE.H.cTemplates.bookingAvailabilityModal({availableAndRedirect: true});
7343                                }
7344
7345                                FE.SD.booking.goToRegisterBooking();
7346                            } else {
7347                                modalData.body.content = FE.H.cTemplates.bookingAvailabilityModal({notAvailable: true});
7348                            }
7349                        } else {
7350
7351                            if (FE.SD.booking.allowBookingRegistration()) {
7352                                FE.Modal.obj.container.modal('hide');
7353                                FE.SD.booking.goToRegisterBooking();
7354                            } else {
7355                                modalData.body.content = FE.H.cTemplates.bookingAvailabilityModal({availableChoiceNextRoom: true});
7356                                setTimeout(function () {
7357                                    FE.Modal.obj.container.modal('hide');
7358                                }, 3000);
7359                            }
7360                        }
7361                        $('#bookingAvailabilityModal').children().html(FE.H.cTemplates.modal(modalData));
7362                    } else {
7363                        modalData.body.content = FE.H.cTemplates.bookingAvailabilityModal({notSuccess: true});
7364                    }
7365                    if (draw) {
7366                        FE.SD.booking.drawBooking();
7367                    }
7368
7369
7370
7371                },
7372                error: function () {
7373                }
7374            };
7375
7376            $.ajax(ajaxOptions);
7377        }
7378
7379    },
7380    map: {
7381        jsLoaded: false,
7382        mapWrapper: $('#structureDetailMap'),
7383        data: null,
7384        initTriggers: function () {
7385            $('.mapTrigger').on('click', function () {
7386                FE.SD.map.toggle();
7387            });
7388        },
7389        map: null,
7390        init: function () {
7391            var d = $('#structureDetailMapData');
7392            if (d.length > 0) {
7393                FE.SD.map.data = JSON.parse(d.html());
7394            }
7395            FE.SD.map.jsLoaded = true;
7396
7397            FE.SD.map.map = new google.maps.Map(document.getElementById(FE.SD.map.mapWrapper.attr('id')), {
7398                zoom: 16,
7399                scrollwheel: false,
7400                center: {lat: FE.SD.map.data.lat, lng: FE.SD.map.data.lng}
7401            });
7402
7403            var markerImage = {
7404                url: '/assets/frontend/img/pin-hotel.png',
7405                size: new google.maps.Size(107, 107),
7406                origin: new google.maps.Point(0, 0),
7407                anchor: new google.maps.Point(53, 56)
7408            };
7409
7410            var latLng = new google.maps.LatLng(FE.SD.map.data.lat, FE.SD.map.data.lng);
7411
7412            var infowindow = new google.maps.InfoWindow({
7413                content: FE.SD.map.data.address + ' - ' + FE.SD.map.data.city
7414            });
7415            infowindow.setPosition(latLng);
7416            infowindow.open(FE.SD.map.map);
7417
7418            var marker = new google.maps.Marker({
7419                position: latLng,
7420                icon: markerImage,
7421                map: FE.SD.map.map
7422            });
7423
7424            FE.SD.map.toggle();
7425        },
7426        putGoogleJs: function () {
7427            if (FE.SD.map.jsLoaded) {
7428                return;
7429            }
7430            FE.Core.putGoogleMapJs('FE.SD.map.init');
7431        },
7432        toggle: function () {
7433            if (FE.SD.map.mapWrapper.is(':empty')) {
7434                FE.SD.map.putGoogleJs();
7435            } else {
7436                FE.SD.map.mapWrapper.toggle();
7437            }
7438        }
7439    }
7440
7441}, FE.Core.addInit(FE.SD.init);
7442FE.NL = {
7443    obj: $('#newsletterWide'),
7444    formObj: $('#newsletterWideForm'),
7445    init: function () {
7446        FE.log('FE.NL.init');
7447        FE.NL.initValidation();
7448    },
7449    initValidation: function () {
7450        $('#newsletterWideForm input').not("[type=submit]").jqBootstrapValidation(
7451                {
7452                    prependExistingHelpBlock: false,
7453                    semanticallyStrict: true,
7454                    autoAdd: {
7455                        helpBlocks: true
7456                    },
7457                    submitSuccess: function ($form, event) {
7458                        FE.NL.submit($form, event);
7459                    }
7460                    ,
7461                    filter: function () {
7462                        return $(this).is(":visible");
7463                    }
7464                }
7465        );
7466    },
7467    submit: function (form, event) {
7468        event.preventDefault();
7469
7470        if (form.data('sending') === 1) {
7471            return;
7472        }
7473
7474
7475        if (typeof grecaptcha === 'undefined') {
7476            return;
7477        }
7478
7479        grecaptcha.execute('6LcBOfMUAAAAAMkY7lPhmLvM8KHQPE7IYU0NmSRX', {action: 'contatti'}).then(function (token) {
7480            form.data('sending', 1);
7481
7482            var button = form.find('.submit');//.first();
7483            var spinner = form.find('.spinCnt');//.first();
7484            var subscribed = form.find('.send-ok');//.first();
7485
7486            spinner.html(FE.Core.spinnerHtml).show();
7487            button.hide();
7488
7489            var data = {
7490                'email': $('#newsletterWideFormEmail').val(),
7491                'token': token
7492            };
7493            var ajaxOptions = {
7494                url: form.attr('action'),
7495                dataType: 'json',
7496                data: data,
7497                method: 'POST',
7498                success: function (data, statusText) {
7499                    if (data.success && data.data == 'OK') {
7500                        FE.Stats.Track('tracking/iscrizione-newsletter');
7501                        subscribed.show();
7502                        spinner.hide();
7503                    } else {
7504                        form.data('sending', 0);
7505                        button.show();
7506                        spinner.hide();
7507                    }
7508                },
7509                error: function () {
7510
7511                    button.show();
7512                    spinner.hide();
7513                    form.data('sending', 0);
7514                }
7515            };
7516
7517            $.ajax(ajaxOptions);
7518        });
7519    }
7520}, FE.Core.addInit(FE.NL.init);
7521FE.OCC = {
7522    init: function () {
7523        var e = $('.offerChannelCarousel');
7524        if (e.data('length') > 1) {
7525            e.carousel();
7526        }
7527    }
7528
7529}, FE.Core.addInit(FE.OCC.init);
7530FE.OCL = {
7531    container: $('.offerChannelList'),
7532    init: function () {
7533        FE.log('FE.OCL.init');
7534        if (FE.OCL.container.length > 0) {
7535            FE.OCL.initTooltip();
7536        }
7537    },
7538    initTooltip: function () {
7539        FE.OCL.container.find('[data-toggle="tooltip"]').tooltip({
7540            placement: 'bottom',
7541            html: true            
7542        });
7543    }
7544
7545}, FE.Core.addInit(FE.OCL.init);
7546FE.T = {
7547    obj: $('#territoryList'),
7548    filterObj: $('#territoryListFilters'),
7549    filterSearchInterval: null,
7550    filterTypologies: [],
7551    filterCities: [],
7552    init: function () {
7553        FE.log('FE.T.init');
7554        if (FE.T.obj.length > 0) {
7555            if (FE.T.obj.hasClass('shuffle')) {
7556                FE.T.initShuffle();
7557            }
7558            if (FE.T.filterObj.length > 0) {
7559                FE.T.initFilters();
7560            }
7561
7562            FE.T.map.initTriggers();
7563        }
7564
7565    },
7566    initShuffle: function () {
7567
7568        //var sizer = $grid.find('.territorysListSizer');
7569        FE.T.obj.shuffle({
7570            itemSelector: '.territory',
7571                    //sizer: FE.T.obj.find('.shuffle__sizer '),
7572            initialSort: {
7573                randomize: true
7574            }
7575        });
7576    },
7577    initFilters: function () {
7578
7579        var input = FE.T.filterObj.find('input.iCheck');
7580        input.iCheck({
7581            checkboxClass: 'icheckbox_minimal-blue',
7582            radioClass: 'iradio_minimal-blue'
7583        });
7584
7585        var typology = FE.T.filterObj.find('.territoryTypology input.iCheck');
7586        typology.on('ifChecked', function (territory) {
7587            FE.T.filterTypologies.push($(this).val());
7588            FE.T.filterShuffle();
7589        });
7590        typology.on('ifUnchecked', function (territory) {
7591            FE.T.filterTypologies.splice($.inArray($(this).val(), FE.T.filterTypologies), 1);
7592
7593            FE.T.filterShuffle();
7594        });
7595
7596        var city = FE.T.filterObj.find('.territoryCity input.iCheck');
7597        city.on('ifChecked', function (territory) {
7598            FE.T.filterCities.push($(this).val());
7599            FE.T.filterShuffle();
7600        });
7601        city.on('ifUnchecked', function (territory) {
7602            FE.T.filterCities.splice($.inArray($(this).val(), FE.T.filterCities), 1);
7603            FE.T.filterShuffle();
7604        });
7605
7606
7607        $('#territoryListFiltersTrgr').on('click', function () {
7608            $('.territoryListFiltersCnt').toggle();
7609        });
7610
7611
7612        $('.territoryListOrder').on('change', function () {
7613            var sort = this.value,
7614                    opts = {};
7615
7616            switch (sort) {
7617                case 'destination':
7618                    opts = {
7619                        reverse: false,
7620                        by: function ($el) {
7621                            return $el.data('destination');
7622                        }
7623                    };
7624                    break;
7625                case 'typology':
7626                    opts = {
7627                        reverse: false,
7628                        by: function ($el) {
7629                            return $el.data('typology');
7630                        }
7631                    };
7632                    break;
7633                default:
7634                    opts = {
7635                        reverse: false,
7636                        by: function ($el) {
7637                            return $el.data('destination');
7638                        }
7639                    };
7640
7641            }
7642            FE.T.obj.shuffle('sort', opts);
7643        });
7644    },
7645    filterShuffle: function () {
7646        FE.T.obj.shuffle('shuffle', function ($el, shuffle) {
7647            var res = true;
7648
7649            if (FE.T.filterCities.length > 0) {
7650                res = $.inArray('' + $el.data('destination'), FE.T.filterCities) > -1;
7651                if (!res)
7652                    return res;
7653            }
7654
7655            if (FE.T.filterTypologies.length > 0) {
7656                res = $.inArray('' + $el.data('typology'), FE.T.filterTypologies) > -1;
7657                if (!res)
7658                    return res;
7659            }
7660
7661            return res;
7662        });
7663
7664        setTimeout(function () {
7665            var almostOneElementIsVisible = false;
7666            FE.T.obj.find('.territory').each(function () {
7667                var el = $(this);
7668                if (el.css('visibility') != 'hidden' && el.css('display') != 'none' && !el.is(':hidden')) {
7669                    almostOneElementIsVisible = true;
7670                    return;
7671                }
7672            });
7673
7674            if (almostOneElementIsVisible) {
7675                $('.alertBox.filters').hide();
7676            } else {
7677                $('.alertBox.filters').show();
7678            }
7679        }, 500);
7680    },
7681    map: {
7682        jsLoaded: false,
7683        mapWrapper: $('#territoryListMap'),
7684        data: null,
7685        markers: [],
7686        infowindows: [],
7687        markerClusterer: null,
7688        initTriggers: function () {
7689            $('.mapTrigger').on('click', function () {
7690                FE.T.map.toggle();
7691            });
7692        },
7693        map: null,
7694        init: function () {
7695            var d = $('#territoryListMapData');
7696            if (d.length > 0) {
7697                FE.T.map.data = JSON.parse(d.html());
7698            } else {
7699                return;
7700            }
7701            FE.T.map.jsLoaded = true;
7702            FE.T.map.map = new google.maps.Map(document.getElementById(FE.T.map.mapWrapper.attr('id')), {
7703                zoom: 12,
7704                scrollwheel: false,
7705                center: {lat: 44.064, lng: 12.5849}
7706            });
7707            var bounds = new google.maps.LatLngBounds();
7708            var markerImage = {
7709                url: '/assets/frontend/img/pin-guide.png',
7710                size: new google.maps.Size(28, 37),
7711                origin: new google.maps.Point(0, 0),
7712                anchor: new google.maps.Point(14, 37)
7713            };
7714            var infowindow = new google.maps.InfoWindow();
7715            for (var i = 0; i < FE.T.map.data.length; i++) {
7716                var data = FE.T.map.data[i];
7717                if (data.lat == '' || data.lng == '')
7718                    continue;
7719                var latLng = new google.maps.LatLng(data.lat, data.lng);
7720                bounds.extend(latLng);
7721                var marker = new google.maps.Marker({
7722                    position: latLng,
7723                    title: data.name,
7724                    icon: markerImage
7725                });
7726                google.maps.event.addListener(marker, 'click', (function (marker, data, infowindow) {
7727                    return function () {
7728                        infowindow.setContent(FE.H.cTemplates.infoWindowEventTerritory(data));
7729                        infowindow.open(FE.T.map.map, marker);
7730                    };
7731                })(marker, data, infowindow));
7732                FE.T.map.markers.push(marker);
7733            }
7734
7735            FE.T.map.map.fitBounds(bounds);
7736            FE.T.map.markerClusterer = new MarkerClusterer(FE.T.map.map, FE.T.map.markers);
7737            FE.T.map.toggle();
7738        },
7739        putGoogleJs: function () {
7740            if (FE.T.map.jsLoaded) {
7741                return;
7742            }
7743            FE.Core.putGoogleMapJs('FE.T.map.init');
7744        },
7745        toggle: function () {
7746            if (FE.T.map.mapWrapper.is(':empty')) {
7747                FE.T.map.putGoogleJs();
7748            } else {
7749                FE.T.map.mapWrapper.toggle();
7750            }
7751        }
7752    }
7753}, FE.Core.addInit(FE.T.init);
7754FE.TD = {
7755    container: $('#territoryDetail'),
7756    init: function () {
7757        FE.log('FE.TD.init');
7758        if ($('#territoryDetailMap').length > 0) {
7759            FE.TD.map.putGoogleJs();
7760        }
7761        FE.TD.carousel.init();
7762    },
7763    carousel: {
7764        element: $('#territoryCarousel'),
7765        init: function () {
7766            if (FE.TD.carousel.element.length > 0) {
7767                FE.TD.carousel.element.carousel();
7768            }
7769        }
7770    },
7771    map: {
7772        jsLoaded: false,
7773        mapWrapper: $('#territoryDetailMap'),
7774        data: null,
7775        initTriggers: function () {
7776            $('.mapTrigger').on('click', function () {
7777                FE.TD.map.toggle();
7778            });
7779        },
7780        map: null,
7781        init: function () {
7782            var d = $('#territoryDetailMapData');
7783            if (d.length > 0) {
7784                FE.TD.map.data = JSON.parse(d.html());
7785            }
7786            FE.TD.map.jsLoaded = true;
7787            FE.TD.map.map = new google.maps.Map(document.getElementById(FE.TD.map.mapWrapper.attr('id')), {
7788                zoom: 16,
7789                scrollwheel: false,
7790                center: {lat: FE.TD.map.data.lat, lng: FE.TD.map.data.lng}
7791            });
7792            var markerImage = {
7793                url: '/assets/frontend/img/pin-guida.png',
7794                size: new google.maps.Size(107, 107),
7795                origin: new google.maps.Point(0, 0),
7796                anchor: new google.maps.Point(53, 56)
7797            };
7798            var latLng = new google.maps.LatLng(FE.TD.map.data.lat, FE.TD.map.data.lng);
7799            var infowindow = new google.maps.InfoWindow({
7800                content: FE.TD.map.data.address + ' - ' + FE.TD.map.data.city
7801            });
7802            infowindow.setPosition(latLng);
7803            infowindow.open(FE.TD.map.map);
7804            var marker = new google.maps.Marker({
7805                position: latLng,
7806                icon: markerImage,
7807                map: FE.TD.map.map
7808            });
7809            FE.TD.map.toggle();
7810        },
7811        putGoogleJs: function () {
7812            if (FE.TD.map.jsLoaded) {
7813                return;
7814            }
7815            FE.Core.putGoogleMapJs('FE.TD.map.init');
7816        },
7817        toggle: function () {
7818            if (FE.TD.map.mapWrapper.is(':empty')) {
7819                FE.TD.map.putGoogleJs();
7820            } else {
7821                FE.TD.map.mapWrapper.toggle();
7822            }
7823        }
7824    }
7825
7826}, FE.Core.addInit(FE.TD.init);
7827FE.ED = {
7828    container: $('#eventDetail'),
7829    init: function () {
7830        FE.log('FE.ED.init');
7831        if ($('#eventDetailMap').length > 0) {
7832            FE.ED.map.putGoogleJs();
7833        }
7834    },
7835    map: {
7836        jsLoaded: false,
7837        mapWrapper: $('#eventDetailMap'),
7838        data: null,
7839        initTriggers: function () {
7840            $('.mapTrigger').on('click', function () {
7841                FE.ED.map.toggle();
7842            });
7843        },
7844        map: null,
7845        init: function () {
7846            var d = $('#eventDetailMapData');
7847            if (d.length > 0) {
7848                FE.ED.map.data = JSON.parse(d.html());
7849            }
7850            FE.ED.map.jsLoaded = true;
7851
7852            FE.ED.map.map = new google.maps.Map(document.getElementById(FE.ED.map.mapWrapper.attr('id')), {
7853                zoom: 16,
7854                scrollwheel: false,
7855                center: {lat: FE.ED.map.data.lat, lng: FE.ED.map.data.lng}
7856            });
7857
7858            var markerImage = {
7859                url: '/assets/frontend/img/pin-evento.png',
7860                size: new google.maps.Size(107, 107),
7861                origin: new google.maps.Point(0, 0),
7862                anchor: new google.maps.Point(53, 56)
7863            };
7864
7865            var latLng = new google.maps.LatLng(FE.ED.map.data.lat, FE.ED.map.data.lng);
7866
7867            var infowindow = new google.maps.InfoWindow({
7868                content: FE.ED.map.data.address + ' - ' + FE.ED.map.data.city
7869            });
7870            infowindow.setPosition(latLng);
7871            infowindow.open(FE.ED.map.map);
7872
7873            var marker = new google.maps.Marker({
7874                position: latLng,
7875                icon: markerImage,
7876                map: FE.ED.map.map
7877            });
7878
7879            FE.ED.map.toggle();
7880        },
7881        putGoogleJs: function () {
7882            if (FE.ED.map.jsLoaded) {
7883                return;
7884            }
7885            FE.Core.putGoogleMapJs('FE.ED.map.init');
7886        },
7887        toggle: function () {
7888            if (FE.ED.map.mapWrapper.is(':empty')) {
7889                FE.ED.map.putGoogleJs();
7890            } else {
7891                FE.ED.map.mapWrapper.toggle();
7892            }
7893        }
7894    }
7895
7896}, FE.Core.addInit(FE.ED.init);
7897FE.BR = {
7898    container: $('#bookingRegister'),
7899    init: function () {
7900        FE.log('FE.BR.init');
7901        FE.BR.initValidation();
7902        FE.BR.initValidationRequest();
7903        FE.BR.invoice.init();
7904//        FE.BR.enhancedAnalytics.init();
7905    },
7906    invoice: {
7907        init: function () {
7908            if ($('#invoiceData').length > 0) {
7909                $('input.invoiceEntity[type="radio"]').change(function () {
7910                    switch(this.value){
7911                        case 'P':
7912                            $('.invocename, .invocesurname').show();
7913                            $('.invocesocieta, .invocepiva, .invocecodiceunivoco').hide();
7914                            break;
7915                        case 'D':
7916                            $('.invocesocieta input').attr('placeholder',$('.invocesocieta input').data('pd'));
7917                            $('.invocesocieta, .invocepiva, .invocename, .invocesurname, .invocecodiceunivoco').show();
7918                            break;
7919                        case 'S':
7920                            $('.invocesocieta input').attr('placeholder',$('.invocesocieta input').data('ps'));
7921                            $('.invocename, .invocesurname').hide();
7922                            $('.invocepiva, .invocesocieta, .invocecodiceunivoco').show();
7923                            break;
7924                    }
7925                });
7926                
7927                $('#invoiceCopyData').on('click', function(){
7928                    var val = $('input[name="br[name]"]').val();
7929                    if(val) $('input[name="br[invoice][NomeFatturazione]"]').val(val);
7930                    var val = $('input[name="br[surname]"]').val();
7931                    if(val) $('input[name="br[invoice][CognomeFatturazione]"]').val(val);
7932                    var val = $('input[name="br[address]"]').val();
7933                    if(val) $('input[name="br[invoice][IndirizzoFatturazione]"]').val(val);
7934                    var val = $('input[name="br[city]"]').val();
7935                    if(val) $('input[name="br[invoice][CittaFatturazione]"]').val(val);
7936                    var val = $('input[name="br[zipcode]"]').val();
7937                    if(val) $('input[name="br[invoice][CapFatturazione]"]').val(val);
7938                    var val = $('input[name="br[nation]"]').val();
7939                    if(val) $('input[name="br[invoice][NazioneFatturazione]"]').val(val);
7940                    
7941                });
7942            }
7943        }
7944    },
7945    enhancedAnalytics: {
7946        transactionData: null,
7947        roomList: $('.roomList'),
7948        init: function (transactionId) {
7949
7950            FE.log('FE.BR.enhancedAnalytics.init');
7951            if (FE.BR.enhancedAnalytics.roomList.length > 0) {
7952                var l = FE.BR.enhancedAnalytics.roomList;
7953                FE.BR.enhancedAnalytics.transactionData = {
7954//                    "id": l.data('id'),
7955                    "transaction_id": transactionId,
7956                    "affiliation": l.data('name'),
7957                    "value": l.data('value'),
7958                    "items": []
7959                };
7960
7961                $('.room').each(function () {
7962                    var ed = $(this).data();
7963    
7964                    FE.BR.enhancedAnalytics.transactionData.items.push({
7965                        id: ed.id,
7966                        name: ed.name,
7967                        brand: FE.BR.enhancedAnalytics.roomList.data('name'),
7968                        category: '',
7969                        price: ed.price,
7970                        quantity: 1
7971                    });
7972                });
7973
7974                
7975                FE.StatsT.sendPurchase(FE.BR.enhancedAnalytics.transactionData);
7976            }
7977        }
7978    },
7979    initValidationRequest: function () {
7980        $("#bookingRegisterRequestForm input,#bookingRegisterRequestForm textarea,#bookingRegisterRequestForm  select").not("[type=submit]").jqBootstrapValidation(
7981                {
7982                    //sniffHtml: false,
7983                    prependExistingHelpBlock: false,
7984                    semanticallyStrict: true,
7985                    autoAdd: {
7986                        helpBlocks: true
7987                    },
7988                    //preventSubmit: true,
7989                    submitError: function ($form, event, errors) {
7990                        // Here I do nothing, but you could do something like display 
7991                        // the error messages to the user, log, etc.
7992                    },
7993                    submitSuccess: function ($form, event) {
7994                        FE.BR.submitRequest($form, event);
7995                    },
7996                    filter: function () {
7997                        return $(this).is(":visible");
7998                    }
7999                }
8000        );
8001    },
8002    initValidation: function () {
8003        $("#bookingRegisterForm input,#bookingRegisterForm textarea,#bookingRegisterForm  select").not("[type=submit]").jqBootstrapValidation(
8004                {
8005                    //sniffHtml: false,
8006                    prependExistingHelpBlock: false,
8007                    semanticallyStrict: true,
8008                    autoAdd: {
8009                        helpBlocks: true
8010                    },
8011                    //preventSubmit: true,
8012                    submitError: function ($form, event, errors) {
8013                        // Here I do nothing, but you could do something like display 
8014                        // the error messages to the user, log, etc.
8015                    },
8016                    submitSuccess: function ($form, event) {
8017                        FE.BR.submit($form, event);
8018                    },
8019                    filter: function () {
8020                        return $(this).is(":visible");
8021                    }
8022                }
8023        );
8024    },
8025    submitRequest: function (form, event) {
8026        event.preventDefault();
8027
8028        if (form.data('sending') === 1) {
8029            return;
8030        }
8031        form.data('sending', 1);
8032
8033        var button = form.find('.submit').first();
8034        var spinner = form.find('.spinCnt').first();
8035
8036        spinner.html(FE.Core.spinnerHtml).show();
8037        button.hide();
8038
8039
8040        /*modal*/
8041        var modalData = {
8042            header: {
8043                close: true,
8044                cls: 'tinyClose'
8045            },
8046            body: {
8047                content: FE.H.cTemplates.bookingModal({booking: true, request: true}),
8048                cls: 'searchModal',
8049                id: 'bookingModal'
8050            }
8051        };
8052        FE.Modal.showHtml(FE.H.cTemplates.modal(modalData));
8053
8054        var ajaxOptions = {
8055            url: form.attr('action'),
8056            data: form.serialize(),
8057            dataType: 'json',
8058            method: 'POST',
8059            success: function (data, statusText) {
8060
8061                modalData.body.content = FE.H.cTemplates.bookingModal(data);
8062                if (data.success === true) {
8063                    $("#bookingRegisterRequestForm input,#bookingRegisterRequestForm textarea,#bookingRegisterRequestForm  select").prop("disabled", true);
8064                    button.hide();
8065                    form.data('sending', 1);
8066                    modalData.body.content = FE.H.cTemplates.bookingSuccessRequest(data);
8067                    if (document.location.host == 'www.emiliaromagnawelcome.com') {
8068                        FE.BR.drawProductListTrekksoft('');
8069                    } else {
8070                        $('#bookingSuccess').html(FE.H.cTemplates.bookingSuccessTrekksoft({products: [], listurl: '', code: ''})).show();
8071                    }
8072
8073                } else {
8074                    button.show();
8075                    form.data('sending', 0);
8076                }
8077
8078                $('#bookingModal').parent().html(FE.H.cTemplates.modal(modalData));
8079
8080                spinner.hide();
8081            },
8082            error: function () {
8083                button.show();
8084                spinner.hide();
8085                form.data('sending', 0);
8086            }
8087        };
8088
8089        $.ajax(ajaxOptions);
8090        return;
8091    },
8092    submit: function (form, event) {
8093        //event.preventDefault();
8094
8095        //alert('submit');
8096        
8097        if (form.data('sending') === 1) {
8098            return;
8099        }
8100        form.data('sending', 1);
8101
8102        var button = form.find('.submit').first();
8103        var spinner = form.find('.spinCnt').first();
8104        
8105        spinner.html(FE.Core.spinnerHtml).show();
8106        button.hide();
8107
8108        return;
8109    },
8110    drawProductList: function (code) {
8111        $.getJSON(FE.Core.configuration.routes.booking_get_product_list, function (data) {
8112            $('#bookingSuccess').html(FE.H.cTemplates.bookingSuccess({products: data, code: code})).show();
8113        });
8114    },
8115    drawProductListTrekksoft: function (code) {
8116        $.getJSON(FE.Core.configuration.routes.booking_get_activities_list, function (data) {
8117            $('#bookingSuccess').html(FE.H.cTemplates.bookingSuccessTrekksoft({products: data.products, listurl: data.listurl, code: code})).show();
8118        });
8119    }
8120
8121
8122}, FE.Core.addInit(FE.BR.init);
8123FE.CPN = {
8124    init: function () {
8125    },
8126    submit: function () {
8127        Cookies.set('coupon', $('#couponCode').val(), {domain: 'emiliaromagnawelcome.com'});
8128        location.reload();
8129    },
8130    reset: function () {
8131        $('#couponCode').val('');
8132        Cookies.remove('coupon', $('#couponCode').val(), {domain: 'emiliaromagnawelcome.com'});
8133        FE.CPN.submit();
8134    },
8135    scrollAndBlink: function () {
8136        FE.Core.scrollTo('couponcodeform').done(function ( ) {
8137            $('#couponcodeform input').focus();
8138            $('#couponcodeform').fadeTo(500, 0.1).fadeTo(500, 1.0).fadeTo(500, 0.1).fadeTo(500, 1.0);
8139        });
8140    }
8141}, FE.Core.addInit(FE.CPN.init);
8142FE.PRO = {
8143    container: $('#product'),
8144    init: function () {
8145        if (FE.PRO.container.length > 0) {
8146            FE.log('FE.PRO.init');
8147
8148
8149            FE.PRO.form.init();
8150            FE.PRO.carousel.init();
8151
8152            $('#mobileSearchResume').hide();
8153        }
8154    },
8155    carousel: {
8156        element: $('#productCarousel'),
8157        init: function () {
8158            if (FE.PRO.carousel.element.length > 0) {
8159                FE.PRO.carousel.element.carousel();
8160            }
8161        }
8162    },
8163    form: {
8164        o: null,
8165        date: null,
8166        maxNumberOfTickets: null,
8167        selectedCalendarId: null,
8168        init: function () {
8169            FE.PRO.form.initDates();
8170            FE.PRO.form.initValidation();
8171            FE.PRO.form.initTimes();
8172        },
8173        initValidation: function () {
8174            $("#productForm input,#productForm  select").not("[type=submit]").jqBootstrapValidation(
8175                    {
8176                        //sniffHtml: false,
8177                        prependExistingHelpBlock: false,
8178                        semanticallyStrict: true,
8179                        autoAdd: {
8180                            helpBlocks: true
8181                        },
8182                        //preventSubmit: true,
8183                        submitError: function ($form, event, errors) {
8184                            // Here I do nothing, but you could do something like display 
8185                            // the error messages to the user, log, etc.
8186                        },
8187                        submitSuccess: function ($form, event) {
8188
8189                            var validTicket = FE.PRO.form.validateTicket();
8190                            var validateDate = FE.PRO.form.validateDate();
8191
8192                            if (validTicket && validateDate) {
8193                                FE.PRO.form.submit($form, event);
8194                            } else {
8195                                event.preventDefault();
8196                            }
8197                        },
8198                        filter: function () {
8199                            return $(this).is(":visible");
8200                        }
8201                    }
8202            );
8203
8204            $('#productForm .ticket').on('change keyup', function () {
8205                FE.PRO.form.validateTicket();
8206            });
8207
8208            $('.datepicker tbody').on('click', function () {
8209                setTimeout(function () {
8210                    FE.PRO.form.validateDate();
8211                }, 300);
8212
8213            });
8214
8215        },
8216        validateDate: function () {
8217            if (FE.PRO.form.date === null)
8218                return true;
8219            var valid = false;
8220
8221            if ($('#productDate').val() != '') {
8222                valid = true;
8223            }
8224
8225            var h = $('.help-block-product-date');
8226            if (valid) {
8227                h.hide();
8228            } else {
8229                h.show();
8230            }
8231
8232            return valid;
8233        },
8234        validateTicket: function () {
8235            var validTooMuch = true, validAlmostOne = false, totNum = 0;
8236
8237            $('#productForm .ticket').each(function (index) {
8238                if (parseInt($(this).val()) > 0) {
8239                    totNum += parseInt($(this).val());
8240                    validAlmostOne = true;
8241                }
8242            });
8243
8244            if (FE.PRO.form.maxNumberOfTickets && totNum > FE.PRO.form.maxNumberOfTickets) {
8245                validTooMuch = false;
8246            }
8247
8248            var h = $('.help-block-product');
8249            if (!validAlmostOne) {
8250                h.html(h.data('empty'));
8251            }
8252            if (!validTooMuch) {
8253                h.html(h.data('toomuch'));
8254            }
8255
8256            if (validAlmostOne && validTooMuch) {
8257                h.hide();
8258            } else {
8259                h.show();
8260            }
8261
8262            return validAlmostOne && validTooMuch;
8263        },
8264        initTimes: function () {
8265            $('#productTimes').on('change', function () {
8266                var t = $(this), a = $('#productAvailabilityWrp');
8267                var e = t.find(":selected");
8268                var d = e.data('d');
8269                if (d) {
8270                    FE.PRO.form.maxNumberOfTickets = d;
8271                    FE.PRO.form.selectedCalendarId = e.data('id');
8272                    a.show().find('#productAvailability').html(d);
8273                } else {
8274                    FE.PRO.form.maxNumberOfTickets = null;
8275                    FE.PRO.form.selectedCalendarId = null;
8276                    a.hide().find('#productAvailability').html();
8277                }
8278                FE.PRO.form.validateTicket();
8279            });
8280        },
8281        initDates: function () {
8282            if (typeof productEnabledDate !== 'undefined' && productEnabledDate.length > 0) {
8283                FE.PRO.form.date = $('#productDate');
8284                FE.PRO.form.date.datetimepicker({
8285                    locale: FE.Core.configuration.app.locale,
8286                    format: 'l',
8287                    inline: true,
8288                    enabledDates: productEnabledDate,
8289                    keepOpen: true,
8290                    useCurrent: false,
8291                    minDate: productEnabledDate[0],
8292                    maxDate: productEnabledDate[productEnabledDate.length - 1]
8293                    , defaultDate: (productEnabledDate.length == 1 ? productEnabledDate[0] : false)
8294                });
8295
8296                FE.PRO.form.date.on('dp.change', function (e) {
8297                    var times = timeAndNumber[e.date.format('YYYY-MM-DD')];
8298                    $('#productTimes').html('');
8299
8300//                    $('#productTimes').append('<option value="">Seleziona</option>');
8301                    var first = true;
8302                    $.each(times, function (i, time) {
8303                        if (time.d > 0) {
8304                            $('#productTimes').append('<option value="' + time.h + '" data-id="' + time.id + '" data-d="' + time.d + '" ' + (first ? 'selected' : '') + '>' + time.h + '</option>');
8305                            first = false;
8306                        }
8307                    });
8308                    $('#productTimes').trigger('change');
8309                    $('#productTimesWrp').show();
8310                });
8311            }
8312
8313
8314        },
8315        number: {
8316            inc: function (o) {
8317                o = $(o);
8318                var e = o.prev();
8319                if (e.val() == '') {
8320                    e.val(0);
8321                    FE.PRO.form.validateTicket();
8322                }
8323                var max = e.attr('max');
8324                var val = parseInt(e.val());
8325                if (max && val > 0 && val == max)
8326                    return false;
8327                e.val(parseInt(e.val()) + 1);
8328                FE.PRO.form.validateTicket();
8329                return false;
8330            },
8331            dec: function (o) {
8332                o = $(o);
8333                var e = o.next();
8334                if (e.val() == '' || e.val() == '0')
8335                    return false;
8336                e.val(e.val() - 1);
8337                FE.PRO.form.validateTicket();
8338                return false;
8339            }
8340        },
8341        submit: function (form, event) {
8342            event.preventDefault();
8343
8344            if (form.data('sending') === 1) {
8345                return;
8346            }
8347            form.data('sending', 1);
8348
8349            var button = form.find('.submit').first();
8350            var spinner = form.find('.spinCnt').first();
8351
8352            spinner.html(FE.Core.spinnerHtml).show();
8353            button.hide();
8354
8355            var requests = [];
8356            $('#product').find('.number-control').each(function () {
8357                var o = $(this), qty = parseInt(o.val());
8358                if (qty) {
8359                    var p = {action: 'add', productId: o.data('productid'), productPriceId: o.data('productpriceid'), productCalendarId: FE.PRO.form.selectedCalendarId, qty: qty};
8360//                    requests.push(FE.CRT.o.editCart(p));
8361                    requests.push(p);
8362                }
8363            });
8364
8365            var current = 0, success = true;
8366            //declare your function to run AJAX requests
8367            function doRequest() {
8368
8369                //check to make sure there are more requests to make
8370                if (current < requests.length) {
8371
8372                    FE.CRT.o.editCart(requests[current]).success(function (data) {
8373                        if (!data.success) {
8374                            success = false;
8375                        }
8376                        current++;
8377                        doRequest();
8378                    });
8379
8380                } else {
8381
8382                    spinner.hide();
8383                    if (success === true) {
8384                        //FE.Stats.Track('tracking/addToCart');
8385                        $("#productForm input,#productForm textarea,#productForm  select").prop("disabled", true);
8386                        $(".bootstrap-datetimepicker-widget").css("pointerEvents", 'none');
8387                        button.html('<span class="glyphicon-check"></span> ' + FE.Core.d('mail.structure.success'));
8388                        $('#cart-success').show();
8389                    } else {
8390                        button.show();
8391                        form.data('sending', 0);
8392                    }
8393
8394                }
8395            }
8396
8397            doRequest();
8398
8399            return;
8400        }
8401    },
8402    proceed: function () {
8403        $('#headingTwoA').click();
8404        setTimeout(function () {
8405            FE.Core.scrollTo('cartNameField');
8406            $('#cartNameField').focus();
8407        }, 600);
8408    }
8409
8410}, FE.Core.addInit(FE.PRO.init);
8411FE.PL = {
8412    jo: $('.productListMain'),
8413    productListOrder: $('.productListOrder'),
8414    productListPag: null,
8415    productListFiltersForm: $('.productListFilters'),
8416    productList: $('.productList'),
8417    shuffle: null,
8418    init: function () {
8419        FE.log('FE.PL.init');
8420//        if (FE.PL.jo.length > 0) {
8421//            FE.PL.map.initTriggers();
8422//        }
8423        if (FE.PL.productListFiltersForm.length > 0 && document.getElementById('productListUl')) {
8424            FE.PL.filter.init();
8425        }
8426    },
8427    filter: {
8428        places: [],
8429        cat: [],
8430        init: function () {
8431
8432            FE.PL.shuffle = new Shuffle(document.getElementById('productListUl'), {
8433                itemSelector: '.product'
8434//            ,initialSort: {
8435//                reverse: true,
8436//                by: function ($el) {
8437//                    return $el.data('startdate');
8438//                }
8439//            }
8440            });
8441
8442            FE.PL.filter.shuffle();
8443
8444            var input = FE.PL.productListFiltersForm.find('input.iCheck');
8445            input.iCheck({
8446                checkboxClass: 'icheckbox_minimal-blue',
8447                radioClass: 'iradio_minimal-blue'
8448            });
8449            var plc = FE.PL.productListFiltersForm.find('.plc input.iCheck');
8450            if (plc.length > 0) {
8451                plc.on('ifChecked', function (event) {
8452                    FE.log('FE.PL.filter.places.push($(this).val())');
8453                    FE.PL.filter.places.push($(this).val());
8454                    FE.PL.filter.shuffle();
8455                    FE.Core.scrollTo('productList');
8456                });
8457                plc.on('ifUnchecked', function (event) {
8458                    FE.PL.filter.places.splice($.inArray($(this).val(), FE.PL.filter.places), 1);
8459                    FE.PL.filter.shuffle();
8460                    FE.Core.scrollTo('productList');
8461                });
8462            }
8463
8464
8465            var cat = FE.PL.productListFiltersForm.find('.cat input.iCheck');
8466            if (cat.length > 0) {
8467
8468                var cats = {};
8469                var catsNumber = 0;
8470                $('.product').each(function () {
8471                    var cat = $(this).data('idcat');
8472                    if (typeof cat != 'undefined') {
8473                        cats[cat] = 1;
8474                        catsNumber++;
8475                    }
8476                });
8477
8478                if (catsNumber > 0) {
8479                    $('.catWrapper li').hide();
8480
8481                    $.each(cats, function (index, value) {
8482                        FE.log(index, value);
8483                        $('.catWrapper li.cat' + index).show();
8484                    });
8485
8486                    $('.catTitle, .catWrapper').show();
8487
8488                    cat.on('ifChecked', function (event) {
8489                        FE.PL.filter.cat.push($(this).val());
8490                        FE.PL.filter.shuffle();
8491                        FE.Core.scrollTo('productList');
8492                    });
8493                    cat.on('ifUnchecked', function (event) {
8494                        FE.PL.filter.cat.splice($.inArray($(this).val(), FE.PL.filter.cat), 1);
8495                        FE.PL.filter.shuffle();
8496                        FE.Core.scrollTo('productList');
8497                    });
8498                }
8499            }
8500
8501            $('#productListFiltersTrgr').on('click', function () {
8502                $('.productListFiltersCnt').toggle();
8503            });
8504
8505            $('.productListOrder').on('change', function () {
8506                var sort = this.value,
8507                        opts = {};
8508
8509                switch (sort) {
8510                    case 'Categoria':
8511                        opts = {
8512                            reverse: false,
8513                            by: function ($el) {
8514                                return $el.data('catsort');
8515                            }
8516                        };
8517                        break;
8518                    case 'CategoriaD':
8519                        opts = {
8520                            reverse: true,
8521                            by: function ($el) {
8522                                return $el.data('catsort');
8523                            }
8524                        };
8525                    case 'Prezzo':
8526                        opts = {
8527                            reverse: false,
8528                            by: function ($el) {
8529                                return $el.data('pricesort');
8530                            }
8531                        };
8532                        break;
8533                    case 'PrezzoD':
8534                        opts = {
8535                            reverse: true,
8536                            by: function ($el) {
8537                                return $el.data('pricesort');
8538                            }
8539                        };
8540                        break;
8541
8542                }
8543                FE.PL.productList.shuffle('sort', opts);
8544            });
8545
8546            FE.PL.filter.preFilter();
8547        },
8548        preFilter: function () {
8549            if (PLPrefilter.city) {
8550                $('.plcWrapper input[data-city="' + PLPrefilter.city + '"]').iCheck('check');
8551                var almostOneElementIsVisible = false;
8552                FE.PL.jo.find('.product').each(function () {
8553                    var el = $(this);
8554                    if (el.css('visibility') != 'hidden' && el.css('display') != 'none' && !el.is(':hidden')) {
8555                        almostOneElementIsVisible = true;
8556                        return;
8557                    }
8558                });
8559                if (!almostOneElementIsVisible) {
8560
8561                    $('.plcWrapper input[data-city="' + PLPrefilter.city + '"]').iCheck('uncheck');
8562                    $('#prefilterCaption').hide();
8563                }
8564            }
8565
8566        },
8567        arrayIntersect: function (a, b) {
8568            return $.grep(a, function (i)
8569            {
8570                return $.inArray(i, b) > -1;
8571            });
8572        },
8573        shuffle: function () {
8574            FE.log('FE.PL.shuffle');
8575            FE.PL.productList.shuffle('shuffle', function ($el, shuffle) {
8576
8577                FE.log('FE.PL.productList.shuffle');
8578                var res = true;
8579                if (FE.PL.filter.places.length > 0) {
8580                    var p = '' + $el.data('idplace');
8581                    if (p == '') {
8582                        return false;
8583                    }
8584                    if (FE.PL.filter.arrayIntersect(FE.PL.filter.places, p.split(',')).length == 0)
8585                        return false;
8586                }
8587
8588                FE.log('FE.PL.filter.cat', FE.PL.filter.cat);
8589                if (FE.PL.filter.cat.length > 0) {
8590                    FE.log('FE.PL.filter.cat.length > 0', FE.PL.filter.cat);
8591                    res = $.inArray('' + $el.data('idcat'), FE.PL.filter.cat) > -1;
8592                    if (!res)
8593                        return res;
8594                }
8595
8596                return res;
8597            });
8598
8599
8600            setTimeout(function () {
8601                var almostOneElementIsVisible = false;
8602                FE.PL.jo.find('.product').each(function () {
8603                    var el = $(this);
8604                    if (el.css('visibility') != 'hidden' && el.css('display') != 'none' && !el.is(':hidden')) {
8605                        almostOneElementIsVisible = true;
8606                        return;
8607                    }
8608                });
8609
8610                if (almostOneElementIsVisible) {
8611                    $('.alertBox.filters').hide();
8612                } else {
8613                    $('.alertBox.filters').show();
8614                }
8615            }, 500);
8616        }
8617    }
8618
8619}, FE.Core.addInit(FE.PL.init);
8620FE.TPRO = {
8621    container: $('.tproductEl'),
8622    init: function () {
8623        if (FE.TPRO.container.length > 0) {
8624
8625            FE.log('FE.TPRO.init');
8626            FE.TPRO.afx.init();
8627//            FE.TPRO.carousel.init();
8628
8629            $('#mobileSearchResume').hide();
8630            if ($('#productDetailMap').length > 0) {
8631                FE.TPRO.map.putGoogleJs();
8632            }
8633
8634        }
8635    },
8636//    carousel: {
8637//        element: $('#productCarousel'),
8638//        init: function () {
8639//            if (FE.TPRO.carousel.element.length > 0) {
8640//                FE.TPRO.carousel.element.carousel();
8641//            }
8642//        }
8643//    },
8644    afx: {
8645        iframe: null,
8646        s: 0,
8647        ssum: 0,
8648        top: 0,
8649        wh: 0,
8650        initialized: false,
8651        init: function () {
8652              FE.TPRO.afx.iframe = $('.tproduct-side-cnt iframe');
8653//            $(window).resize(function () {
8654//                FE.TPRO.afx.iframe.css({'width': $('.tproduct-side-cnt').width()});
8655//                FE.TPRO.afx.iframe.css('margin-top', 0);
8656//                if ($(window).width() >= 768) {
8657//                    FE.TPRO.afx.affix();
8658//                    FE.TPRO.afx.wh = $(window).height();
8659//                    FE.TPRO.afx.iframe.on('w-scroll', FE.TPRO.afx.wscroll);
8660//                } else {
8661//                    FE.TPRO.afx.initialized = false;
8662//                    FE.TPRO.afx.iframe.off('w-scroll');
8663//                    FE.TPRO.afx.iframe.removeClass("affix affix-top affix-bottom").removeData("bs.affix");
8664//                }
8665//            });
8666
8667            if ($(window).width() >= 768) {
8668                FE.TPRO.afx.affix();
8669                FE.TPRO.afx.iframe.css({'height': $(window).height()});
8670//                FE.TPRO.afx.iframe.on('w-scroll', FE.TPRO.afx.wscroll);
8671            }
8672
8673//            $(window).on('scroll', function () {
8674//                FE.TPRO.afx.iframe.trigger('w-scroll');
8675//            });
8676
8677        },
8678        affix: function () {
8679            if (FE.TPRO.afx.initialized === true) {
8680                return;
8681            }
8682
8683//            FE.TPRO.afx.wh = $(window).height();
8684//            FE.TPRO.afx.s = $(window).scrollTop();
8685
8686            FE.TPRO.afx.iframe.on('affixed.bs.affix', function () {
8687                FE.TPRO.afx.iframe.css({'width': $('.tproduct-side-cnt').width()});
8688//                FE.TPRO.afx.top = $('#buttonBar').outerHeight();
8689            });
8690
8691            FE.TPRO.afx.iframe.affix({
8692                offset: {
8693                    top: FE.TPRO.afx.iframe.offset().top,
8694                    bottom: function () {
8695                        if($('#newsletterWide').length > 0){
8696                        return (this.bottom = $(document).height()-$('#newsletterWide').position().top + 200);
8697                        }else{
8698                            return (this.bottom = $(document).height() + 200);
8699                        }
8700                    }
8701                }
8702            });
8703
8704            FE.TPRO.afx.initialized = true;
8705
8706        }
8707        // ,
8708//        wscroll: function () {
8709//            if ($(window).width() < 768)
8710//                return;
8711//            var s = $(window).scrollTop();
8712//            var d = s - FE.TPRO.afx.s;
8713//            if (FE.TPRO.afx.iframe.hasClass('affix')) {
8714//                var h = FE.TPRO.afx.iframe.outerHeight();
8715//                if ((FE.TPRO.afx.top + h) > FE.TPRO.afx.wh) {
8716//                    if ((FE.TPRO.afx.wh < (parseInt(FE.TPRO.afx.iframe.css('margin-top').replace("px", "")) + FE.TPRO.afx.top + h)) || d < 0) {
8717//                        FE.TPRO.afx.ssum = Math.min(0, FE.TPRO.afx.ssum - d);
8718//                        FE.TPRO.afx.iframe.css('margin-top', FE.TPRO.afx.ssum);
8719//                    }
8720//                } else {
8721//                    FE.TPRO.afx.ssum = 0;
8722//                    FE.TPRO.afx.iframe.css('margin-top', 0);
8723//                }
8724//            } else {
8725//                FE.TPRO.afx.ssum = 0;
8726//                FE.TPRO.afx.iframe.css('margin-top', 0);
8727//            }
8728//            FE.TPRO.afx.s = s;
8729//        }
8730    },
8731    map: {
8732        jsLoaded: false,
8733        mapWrapper: $('#productDetailMap'),
8734        bounds: null,
8735        markers: null,
8736        map: null,
8737        init: function () {
8738            if (productRoute.length == 0)
8739                return;
8740
8741            FE.TPRO.map.markers = productRoute;
8742
8743            var line = [],
8744                    alphabet = 'abcdefghijklmnopqrstuvwxyz'.toUpperCase().split(''),
8745                    alphabetIdx = 0, i;
8746
8747            FE.TPRO.map.bounds = new google.maps.LatLngBounds();
8748
8749            var isDraggable = $(document).width() > 480 ? true : false;
8750
8751            FE.TPRO.map.map = new google.maps.Map(
8752                    document.getElementById("productDetailMap"),
8753                    {mapTypeId: 'roadmap', scrollwheel: false, draggable: isDraggable, scrollwheel: false}
8754            );
8755
8756
8757            for (i = 0; i < FE.TPRO.map.markers.length; i++) {
8758                var position = new google.maps.LatLng(FE.TPRO.map.markers[i].latitude, FE.TPRO.map.markers[i].longitude);
8759                FE.TPRO.map.bounds.extend(position);
8760
8761                if (FE.TPRO.map.markers[i].name.length) {
8762                    new google.maps.Marker({
8763                        position: position,
8764                        map: FE.TPRO.map.map,
8765                        title: FE.TPRO.map.markers[i].name,
8766                        icon: '//chart.apis.google.com/chart?chst=d_map_pin_letter&chld='
8767                                + alphabet[alphabetIdx++] + '|FF0000|000000'
8768                    });
8769                }
8770
8771                line.push(new google.maps.LatLng(FE.TPRO.map.markers[i].latitude, FE.TPRO.map.markers[i].longitude));
8772            }
8773
8774            if (FE.TPRO.map.markers.length > 1) {
8775                FE.TPRO.map.map.fitBounds(FE.TPRO.map.bounds);
8776            } else {
8777                FE.TPRO.map.map.setZoom(10);
8778                FE.TPRO.map.map.setCenter(new google.maps.LatLng(FE.TPRO.map.markers[0].latitude, FE.TPRO.map.markers[0].longitude));
8779            }
8780
8781            var flightPath = new google.maps.Polyline({
8782                path: line,
8783                geodesic: true,
8784                strokeColor: '#FF0000',
8785                strokeOpacity: 1.0,
8786                strokeWeight: 2
8787            });
8788
8789            flightPath.setMap(FE.TPRO.map.map);
8790
8791//                
8792//            FE.TPRO.map.jsLoaded = true;
8793//            FE.TPRO.map.map = new google.maps.Map(document.getElementById(FE.TPRO.map.mapWrapper.attr('id')), {
8794//                zoom: 16,
8795//                scrollwheel: false,
8796//                center: {lat: FE.TPRO.map.data[0].latitude, lng: FE.TPRO.map.data[0].longitude}
8797//            });
8798//            var markerImage = {
8799//                url: '/assets/frontend/img/pin-producto.png',
8800//                size: new google.maps.Size(107, 107),
8801//                origin: new google.maps.Point(0, 0),
8802//                anchor: new google.maps.Point(53, 56)
8803//            };
8804//            var latLng = new google.maps.LatLng(FE.TPRO.map.data.lat, FE.TPRO.map.data.lng);
8805//            var infowindow = new google.maps.InfoWindow({
8806//                content: FE.TPRO.map.data.address + ' - ' + FE.TPRO.map.data.city
8807//            });
8808//            infowindow.setPosition(latLng);
8809//            infowindow.open(FE.TPRO.map.map);
8810//            var marker = new google.maps.Marker({
8811//                position: latLng,
8812//                icon: markerImage,
8813//                map: FE.TPRO.map.map
8814//            });
8815//            FE.TPRO.map.toggle();
8816        },
8817        putGoogleJs: function () {
8818            if (FE.TPRO.map.jsLoaded) {
8819                return;
8820            }
8821            FE.Core.putGoogleMapJs('FE.TPRO.map.init');
8822        }
8823    }
8824}, FE.Core.addInit(FE.TPRO.init);
8825FE.TPL = {
8826    jo: $('.tproductList'),
8827    productListOrder: $('.tproductListOrder'),
8828    productListPag: null,
8829    productListFiltersForm: $('.tproductListFilters'),
8830    productList: $('.tproductList'),
8831    init: function () {
8832        FE.log('FE.TPL.init');
8833
8834        if (FE.TPL.productListFiltersForm.length > 0) {
8835            var input = FE.TPL.productListFiltersForm.find('input.iCheck');
8836            input.iCheck({
8837                checkboxClass: 'icheckbox_minimal-blue',
8838                radioClass: 'iradio_minimal-blue'
8839            });
8840        }
8841
8842        var cb = FE.TPL.productListFiltersForm.find('input.iCheck');
8843        if (cb.length > 0) {
8844            cb.on('ifChecked', function (event) {
8845                $('#productPageNumber').val('1');
8846                FE.TPL.productListFiltersForm.submit();
8847            });
8848            cb.on('ifUnchecked', function (event) {
8849                $('#productPageNumber').val('1');
8850                FE.TPL.productListFiltersForm.submit();
8851            });
8852        }
8853        
8854        
8855            $('#trekksoftProductListFiltersTrgr').on('click', function () {
8856                $('.trekksoftProductListFiltersCnt').toggle();
8857            });
8858    },
8859    changedOrder: function (jo) {
8860        jo.find("option:selected").each(function () {
8861            $('#productOD').val($(this).data('od'));
8862            $('#productOF').val($(this).data('of'));
8863        });
8864        FE.TPL.productListFiltersForm.submit();
8865    }
8866}, FE.Core.addInit(FE.TPL.init);
8867FE.CRT = {
8868    dataCnt: $('#cartData'),
8869    container: $('#cart'),
8870    init: function () {
8871        FE.CRT.o.refreshMenuCart();
8872        if (FE.CRT.container.length > 0) {
8873            FE.log('FE.CRT.init');
8874
8875            FE.CRT.affix();
8876            FE.CRT.o.init();
8877
8878            $('#mobileSearchResume').hide();
8879        }
8880    },
8881    invoice: {
8882        init: function () {
8883            if ($('#invoiceData').length > 0) {
8884                $('input.invoiceEntity[type="radio"]').change(function () {
8885                    switch(this.value){
8886                        case 'P':
8887                            $('.invocename, .invocesurname').show();
8888                            $('.invocesocieta, .invocepiva, .invocecodiceunivoco').hide();
8889                            break;
8890                        case 'D':
8891                            $('.invocesocieta input').attr('placeholder',$('.invocesocieta input').data('pd'));
8892                            $('.invocesocieta, .invocepiva, .invocename, .invocesurname, .invocecodiceunivoco').show();
8893                            break;
8894                        case 'S':
8895                            $('.invocesocieta input').attr('placeholder',$('.invocesocieta input').data('ps'));
8896                            $('.invocename, .invocesurname').hide();
8897                            $('.invocepiva, .invocesocieta, .invocecodiceunivoco').show();
8898                            break;
8899                    }
8900                });
8901                
8902                $('#invoiceCopyData').on('click', function(){
8903                    var val = $('input[name="br[name]"]').val();
8904                    if(val) $('input[name="br[invoice][NomeFatturazione]"]').val(val);
8905                    var val = $('input[name="br[surname]"]').val();
8906                    if(val) $('input[name="br[invoice][CognomeFatturazione]"]').val(val);
8907                    var val = $('input[name="br[address]"]').val();
8908                    if(val) $('input[name="br[invoice][IndirizzoFatturazione]"]').val(val);
8909                    var val = $('input[name="br[city]"]').val();
8910                    if(val) $('input[name="br[invoice][CittaFatturazione]"]').val(val);
8911                    var val = $('input[name="br[zipcode]"]').val();
8912                    if(val) $('input[name="br[invoice][CapFatturazione]"]').val(val);
8913                    var val = $('input[name="br[nation]"]').val();
8914                    if(val) $('input[name="br[invoice][NazioneFatturazione]"]').val(val);
8915                    
8916                });
8917            }
8918        }
8919    },
8920    o: {
8921        cart: null,
8922        init: function () {
8923            FE.CRT.o.refreshCart();
8924        },
8925        refreshCart: function () {
8926            $.getJSON(FE.Core.configuration.routes.get_cart, function (data) {
8927                if (data) {
8928                    FE.CRT.o.updateDataAndResume(data);
8929                }
8930            });
8931        },
8932        refreshCookieProdNumber: function (cart) {
8933            var count = 0;
8934            $.each(cart.prodotti, function () {
8935                $.each(this.prezzi, function () {
8936                    count = count + parseInt(this.quantita);
8937                });
8938            });
8939            Cookies.set(FE.CRT.o.getCookieName(), count);
8940            FE.CRT.o.refreshMenuCart();
8941        },
8942        getCookieName: function () {
8943            return 'cartProdNumber';
8944        },
8945        refreshMenuCart: function () {
8946            if ($('.cartLi').length > 0) {
8947                var n = Cookies.get(FE.CRT.o.getCookieName());
8948                if (n) {
8949                    n = parseInt(n);
8950                    if (n == 0) {
8951                        $('.cartLi').hide();
8952                    } else {
8953                        var text = '<span class="glyphicon-cart icon"></span> ( ' + n + ' )';
8954                        $('.cartLi').show().find('.cartProdNum').html(text);
8955                    }
8956                }
8957            }
8958        },
8959        drawCart: function () {
8960            var e = $('#cartMain');
8961            if (FE.CRT.o.cart && e.length > 0) {
8962                e.html(FE.H.cTemplates.cart(FE.CRT.o.cart));
8963                FE.log('FE.CRT.o.cart',FE.CRT.o.cart);
8964
8965                FE.Core.bLazy.revalidate();
8966
8967                e.find('.number-control').on('keyup, change', function () {
8968                    var t = $(this);
8969                    clearInterval(FE.CRT.o.modifingActionInterval);  //clear any interval on key up
8970                    if (t.val() != t.data('origvalue')) {
8971                        var qty = t.val();// - t.data('origvalue');
8972                        FE.CRT.o.modifingActionInterval = setTimeout(function () {
8973                            var p = {action: 'set', productId: t.data('productid'), productPriceId: t.data('productpriceid'), qty: qty};
8974                            if (t.data('productcalendarid')) {
8975                                p.productCalendarId = t.data('productcalendarid');
8976                            }
8977                            FE.CRT.o.editCart(p);
8978                        }, 500);
8979                    }
8980                });
8981
8982
8983                FE.CRT.form.init();
8984
8985            }
8986        },
8987        drawResume: function () {
8988            var e = $('#priceResumeWrp');
8989            if (FE.CRT.o.cart && e.length > 0) {
8990                e.html(FE.H.cTemplates.cartResume(FE.CRT.o.cart));
8991            }
8992        },
8993        loading: false,
8994        modifingActionInterval: null,
8995        increaseProduct: function (o) {
8996            o = $(o);
8997            var e = o.prev();
8998            if (e.val() == '') {
8999                e.val(0);
9000            }
9001            var val = parseInt(e.val());
9002            e.val(parseInt(e.val()) + 1).trigger('change');
9003            return false;
9004        },
9005        decreaseProduct: function (o) {
9006            o = $(o);
9007            var e = o.next();
9008            if (e.val() == '') {
9009                e.val(0);
9010            }
9011            e.val(e.val() - 1).trigger('change');
9012            return false;
9013        },
9014        deleteProduct: function (productId, productPriceId, productCalendarId) {
9015            var p = {action: 'delete', productId: productId, productPriceId: productPriceId, productCalendarId: productCalendarId};
9016            FE.CRT.o.editCart(p);
9017        },
9018        editCart: function (p) {
9019            if (!FE.CRT.o.loading) {
9020                FE.CRT.o.loading = true;
9021                var ajaxOptions = {
9022                    url: FE.Core.configuration.routes['edit_cart'] + '.json',
9023                    dataType: 'json',
9024                    data: p,
9025                    method: 'POST',
9026                    success: function (data, statusText) {
9027                        if (data.success) {
9028                            FE.CRT.o.updateDataAndResume(data.data);
9029                        }
9030                        FE.CRT.o.loading = false;
9031                    },
9032                    error: function () {
9033                        FE.CRT.o.loading = false;
9034                    }
9035                };
9036                return $.ajax(ajaxOptions);
9037            } else {
9038                var d = $.Deferred();
9039                d.resolve({});
9040                return d;
9041            }
9042        },
9043        updateDataAndResume: function (data) {
9044            FE.CRT.o.cart = data;
9045            if(typeof cartUrlError !== 'undefined') FE.CRT.o.cart.cartUrlError = cartUrlError;
9046            if(typeof cartUrlBack !== 'undefined') FE.CRT.o.cart.cartUrlBack = cartUrlBack;
9047            if(typeof cartUrlConfirm !== 'undefined') FE.CRT.o.cart.cartUrlConfirm = cartUrlConfirm;
9048            if(typeof cartPartnerName !== 'undefined') FE.CRT.o.cart.cartPartnerName = cartPartnerName;
9049            if(typeof data.sid !== 'undefined') FE.CRT.o.cart.sid = data.sid;
9050            FE.CRT.o.refreshCookieProdNumber(data);
9051            FE.CRT.o.drawResume();
9052            FE.CRT.o.drawCart();
9053            FE.CRT.invoice.init();
9054        }
9055    },
9056    affix: function () {
9057        var e = $('#priceResumeWrp');
9058        e.affix({
9059            offset: {
9060                top: e.offset().top,
9061                bottom: function () {
9062                    if ($('#newsletterWide').length > 0) {
9063                        return $('#newsletterWide').position().top + $('#priceResumeWrp').outerHeight(true) + 200;
9064                    } else if($('.container.logoWrapper').length > 0) {
9065                        return $('.container.logoWrapper').position().top + $('#priceResumeWrp').outerHeight(true) + 200;
9066                    }
9067                    return 0;
9068                }
9069            }
9070        });
9071    },
9072    form: {
9073        o: null,
9074        init: function () {
9075            FE.CRT.form.o = $('#bookingCartForm');
9076            if (FE.CRT.form.o.length > 0) {
9077                FE.CRT.form.initValidation();
9078            }
9079        },
9080        initValidation: function () {
9081            $("#bookingCartForm input,#bookingCartForm  select,#bookingCartForm  textarea").not("[type=submit]").jqBootstrapValidation(
9082                    {
9083                        //sniffHtml: false,
9084                        prependExistingHelpBlock: false,
9085                        semanticallyStrict: true,
9086                        autoAdd: {
9087                            helpBlocks: true
9088                        },
9089                        //preventSubmit: true,
9090                        submitError: function ($form, event, errors) {
9091                            // Here I do nothing, but you could do something like display 
9092                            // the error messages to the user, log, etc.
9093                        },
9094                        submitSuccess: function ($form, event) {
9095                            FE.CRT.form.submit($form, event);
9096                        },
9097                        filter: function () {
9098                            return $(this).is(":visible");
9099                        }
9100                    }
9101            );
9102        },
9103        submit: function (form, event) {
9104            // event.preventDefault();
9105            // console.log(form.serialize());
9106            return;
9107        }
9108    },
9109    enhancedAnalytics: {
9110        init: function (code) {
9111
9112            FE.log('FE.CRT.enhancedAnalytics.init');
9113            if (typeof FE.CRT.o.cart.prodotti != 'undefined' && FE.CRT.o.cart.prodotti.length > 0) {
9114                var transactionData = {
9115                    "transaction_id": code,
9116                    "affiliation": 'ERW',
9117                    "value": FE.CRT.o.cart.totale,
9118                    "items": []
9119                };
9120
9121                $.each(FE.CRT.o.cart.prodotti, function (index, p) {
9122                    $.each(p.prezzi, function (index, price) {
9123                        transactionData.items.push({
9124                            id: price.id + '-' + price.idprodottoprezzo,
9125                            name: p.nome + ' - ' + price.nome,
9126                            brand: 'ERW',
9127                            category: '',
9128                            price: price.prezzo,
9129                            quantity: price.quantita
9130                        });
9131                    });
9132                });
9133
9134                FE.StatsT.sendPurchase(transactionData);
9135            }
9136        }
9137    },
9138}, FE.Core.addInit(FE.CRT.init);
9139FE.AR = {
9140    init: function () {
9141        FE.log('FE.AR.init');
9142        FE.AR.form.init();
9143
9144    },
9145    form: {
9146        o: null,
9147        arrival: null,
9148        departure: null,
9149        init: function () {
9150            FE.AR.form.o = $('#avilabilityRequestForm');
9151            if (FE.AR.form.o.length > 0) {
9152                FE.AR.form.initDates();
9153                FE.AR.form.initValidation();
9154                $('#structureChildren').on('change', function () {
9155                    FE.AR.form.updateChildrenFields($(this).val());
9156                });
9157            }
9158        },
9159        initValidation: function () {
9160            $("#avilabilityRequestForm input,#avilabilityRequestForm  select").not("[type=submit]").jqBootstrapValidation(
9161                    {
9162                        //sniffHtml: false,
9163                        prependExistingHelpBlock: false,
9164                        semanticallyStrict: true,
9165                        autoAdd: {
9166                            helpBlocks: true
9167                        },
9168                        //preventSubmit: true,
9169                        submitError: function ($form, event, errors) {
9170                            // Here I do nothing, but you could do something like display 
9171                            // the error messages to the user, log, etc.
9172                        },
9173                        submitSuccess: function ($form, event) {
9174                            FE.AR.form.submit($form, event);
9175                        },
9176                        filter: function () {
9177                            return $(this).is(":visible");
9178                        }
9179                    }
9180            );
9181        },
9182        updateChildrenFields: function (val) {
9183            val = parseInt(val);
9184            var $counter = 1;
9185            $('#ChildrensAge .childrenAgeCnt').each(function () {
9186                $counter++;
9187                if ($counter > (val + 1)) {
9188                    $(this).remove();
9189                }
9190            });
9191
9192            for ($i = $counter; $i <= val; $i++) {
9193                $('#ChildrensAge').append('<div class="form-group control-group col-md-3 childrenAgeCnt"><div class="controls"><input class="form-control" id="child_age_' + $i + '" name="br[child][' + $i + '][age]" placeholder="' + FE.Core.d('form.child.age') + ' ' + $i + '"  aria-invalid="false" type="number"  min="0" max="17" data-validation-min-message="' + FE.Core.d('form.child.age') + ' > 0" required data-validation-required-message="' + FE.Core.d('form.child.age') + '"></div></div>');
9194            }
9195
9196            $("#avilabilityRequestForm .childrenAgeCnt input").jqBootstrapValidation(
9197                    {
9198                        prependExistingHelpBlock: false,
9199                        semanticallyStrict: true,
9200                        autoAdd: {
9201                            helpBlocks: true
9202                        },
9203                        filter: function () {
9204                            return $(this).is(":visible");
9205                        }
9206                    }
9207            );
9208        },
9209        initDates: function () {
9210            FE.AR.form.arrival = $('#structureArrival');
9211            FE.AR.form.departure = $('#structureDeparture');
9212            FE.AR.form.arrival.datetimepicker({
9213                locale: FE.Core.configuration.app.locale,
9214                disabledHours: false,
9215                format: 'l',
9216//            inline: true,
9217                defaultDate: moment()
9218            });
9219
9220            FE.AR.form.departure.datetimepicker({
9221                useCurrent: false, //Important! See issue #1075
9222                locale: FE.Core.configuration.app.locale,
9223                disabledHours: false,
9224                format: 'l',
9225//            inline: true,
9226                defaultDate: moment().add(3, 'days')
9227            });
9228
9229
9230            FE.AR.form.arrival.on("dp.change", function (e) {
9231                FE.AR.form.departure.data("DateTimePicker").minDate(e.date);
9232                if (e.date.isSameOrAfter(FE.AR.form.departure.data("DateTimePicker").date())) {
9233                    FE.AR.form.departure.data("DateTimePicker").date(e.date.add(3, 'days'));
9234                }
9235            });
9236        },
9237        submit: function (form, event) {
9238            event.preventDefault();
9239
9240            if (form.data('sending') === 1) {
9241                return;
9242            }
9243            if (typeof grecaptcha === 'undefined') {
9244                return;
9245            }
9246
9247            grecaptcha.execute('6LfqOPMUAAAAAFGGBcvuFmMbvwE58hLS31PoA0Nk', {action: 'contatti'}).then(function (token) {
9248
9249                document.getElementById('erwavailabilityrequestform').value = token;
9250
9251                form.data('sending', 1);
9252
9253                var button = form.find('.submit').first();
9254                var spinner = form.find('.spinCnt').first();
9255
9256                spinner.html(FE.Core.spinnerHtml).show();
9257                button.hide();
9258
9259                var ajaxOptions = {
9260                    url: form.attr('action'),
9261                    method: 'POST',
9262                    data: form.serialize(),
9263                    dataType: 'json',
9264                    success: function (data, statusText) {
9265
9266                        if (data.success === true) {
9267                            FE.Stats.Track('tracking/inviata-mail-richiesta-disponibilita');
9268                            $("#avilabilityRequestForm input,#avilabilityRequestForm textarea,#avilabilityRequestForm  select, #avilabilityRequestForm  button").prop("disabled", true);
9269                            button.html('<span class="glyphicon-check"></span> ' + FE.Core.d('mail.structure.success'));
9270                        } else {
9271                            form.data('sending', 0);
9272                        }
9273
9274                        button.show();
9275                        spinner.hide();
9276                    },
9277                    error: function () {
9278                        button.show();
9279                        spinner.hide();
9280                        form.data('sending', 0);
9281                    }
9282                };
9283
9284                $.ajax(ajaxOptions);
9285            });
9286            return;
9287        }
9288    }
9289}, FE.Core.addInit(FE.AR.init);
9290FE.FXB = {
9291    init: function () {
9292        FE.log('FE.FXB.init');
9293    },
9294    phone: function(t){
9295        var je = $(t);
9296        var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()));
9297        if(!isMobile){
9298            FE.Modal.showHtml('<div style="padding:40px;text-align:center;font-size:30px">'+je.attr('modallabel')+'</div>');
9299            return false;
9300        }
9301        FE.Stats.Event('Bottoni contatto fissi', 'Telefono');
9302        return true;
9303    }
9304}, FE.Core.addInit(FE.FXB.init);

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.