/* Minification failed. Returning unminified contents.
(7265,20-21): run-time error JS1195: Expected expression: >
(7268,59-60): run-time error JS1014: Invalid character: `
(7268,93-94): run-time error JS1003: Expected ':': {
(7268,101-102): run-time error JS1003: Expected ':': }
(7268,102-103): run-time error JS1014: Invalid character: `
(7276,25-26): run-time error JS1004: Expected ';': $
(7276,37-38): run-time error JS1003: Expected ':': ,
(7279,6-7): run-time error JS1195: Expected expression: ,
(7280,10-11): run-time error JS1193: Expected ',' or ')': :
(7282,12-13): run-time error JS1004: Expected ';': :
(7287,14-15): run-time error JS1004: Expected ';': :
(7290,5-6): run-time error JS1002: Syntax error: }
(7296,30-31): run-time error JS1195: Expected expression: >
(7298,5-6): run-time error JS1002: Syntax error: }
(7299,14-18): run-time error JS1197: Too many errors. The file might not be a JavaScript file: "li"
(2748,8891-8892): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: i
(2748,8914-8915): run-time error JS1294: Strict-mode does not allow ++ or -- on certain objects: i
 */
/*!
 * JavaScript Cookie v2.0.3
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		define(factory);
	} else if (typeof exports === 'object') {
		module.exports = factory();
	} else {
		var _OldCookies = window.Cookies;
		var api = window.Cookies = factory();
		api.noConflict = function () {
			window.Cookies = _OldCookies;
			return api;
		};
	}
}(function () {
	function extend () {
		var i = 0;
		var result = {};
		for (; i < arguments.length; i++) {
			var attributes = arguments[ i ];
			for (var key in attributes) {
				result[key] = attributes[key];
			}
		}
		return result;
	}

	function init (converter) {
		function api (key, value, attributes) {
			var result;

			// Write

			if (arguments.length > 1) {
				attributes = extend({
					path: '/'
				}, api.defaults, attributes);

				if (typeof attributes.expires === 'number') {
					var expires = new Date();
					expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
					attributes.expires = expires;
				}

				try {
					result = JSON.stringify(value);
					if (/^[\{\[]/.test(result)) {
						value = result;
					}
				} catch (e) {}

				value = encodeURIComponent(String(value));
				value = value.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);

				key = encodeURIComponent(String(key));
				key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
				key = key.replace(/[\(\)]/g, escape);

				return (document.cookie = [
					key, '=', value,
					attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE
					attributes.path    && '; path=' + attributes.path,
					attributes.domain  && '; domain=' + attributes.domain,
					attributes.secure ? '; secure' : ''
				].join(''));
			}

			// Read

			if (!key) {
				result = {};
			}

			// To prevent the for loop in the first place assign an empty array
			// in case there are no cookies at all. Also prevents odd result when
			// calling "get()"
			var cookies = document.cookie ? document.cookie.split('; ') : [];
			var rdecode = /(%[0-9A-Z]{2})+/g;
			var i = 0;

			for (; i < cookies.length; i++) {
				var parts = cookies[i].split('=');
				var name = parts[0].replace(rdecode, decodeURIComponent);
				var cookie = parts.slice(1).join('=');

				if (cookie.charAt(0) === '"') {
					cookie = cookie.slice(1, -1);
				}

				try {
					cookie = converter && converter(cookie, name) || cookie.replace(rdecode, decodeURIComponent);

					if (this.json) {
						try {
							cookie = JSON.parse(cookie);
						} catch (e) {}
					}

					if (key === name) {
						result = cookie;
						break;
					}

					if (!key) {
						result[name] = cookie;
					}
				} catch (e) {}
			}

			return result;
		}

		api.get = api.set = api;
		api.getJSON = function () {
			return api.apply({
				json: true
			}, [].slice.call(arguments));
		};
		api.defaults = {};

		api.remove = function (key, attributes) {
			api(key, '', extend(attributes, {
				expires: -1
			}));
		};

		api.withConverter = init;

		return api;
	}

	return init();
}));
;
/*!
 * Knockout JavaScript library v3.4.2
 * (c) The Knockout.js team - http://knockoutjs.com/
 * License: MIT (http://www.opensource.org/licenses/mit-license.php)
 */

(function() {(function(n){var x=this||(0,eval)("this"),t=x.document,M=x.navigator,u=x.jQuery,H=x.JSON;(function(n){"function"===typeof define&&define.amd?define(["exports","require"],n):"object"===typeof exports&&"object"===typeof module?n(module.exports||exports):n(x.ko={})})(function(N,O){function J(a,c){return null===a||typeof a in R?a===c:!1}function S(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=n;b()},c))}}function T(b,c){var d;return function(){clearTimeout(d);d=a.a.setTimeout(b,c)}}function U(a,
c){c&&c!==E?"beforeChange"===c?this.Ob(a):this.Ja(a,c):this.Pb(a)}function V(a,c){null!==c&&c.k&&c.k()}function W(a,c){var d=this.Mc,e=d[s];e.T||(this.ob&&this.Oa[c]?(d.Sb(c,a,this.Oa[c]),this.Oa[c]=null,--this.ob):e.s[c]||d.Sb(c,a,e.t?{$:a}:d.yc(a)),a.Ha&&a.Hc())}function K(b,c,d,e){a.d[b]={init:function(b,g,h,l,m){var k,r;a.m(function(){var q=g(),p=a.a.c(q),p=!d!==!p,A=!r;if(A||c||p!==k)A&&a.xa.Ca()&&(r=a.a.wa(a.f.childNodes(b),!0)),p?(A||a.f.fa(b,a.a.wa(r)),a.hb(e?e(m,q):m,b)):a.f.za(b),k=p},null,
{i:b});return{controlsDescendantBindings:!0}}};a.h.va[b]=!1;a.f.aa[b]=!0}var a="undefined"!==typeof N?N:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=c};a.H=function(a,c,d){a[c]=d};a.version="3.4.2";a.b("version",a.version);a.options={deferUpdates:!1,useOnlyNativeEvents:!1};a.a=function(){function b(a,b){for(var c in a)a.hasOwnProperty(c)&&b(c,a[c])}function c(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function d(a,b){a.__proto__=
b;return a}function e(b,c,d,e){var m=b[c].match(r)||[];a.a.r(d.match(r),function(b){a.a.ra(m,b,e)});b[c]=m.join(" ")}var f={__proto__:[]}instanceof Array,g="function"===typeof Symbol,h={},l={};h[M&&/Firefox\/2/i.test(M.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];h.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" ");b(h,function(a,b){if(b.length)for(var c=0,d=b.length;c<d;c++)l[b[c]]=a});var m={propertychange:!0},k=
t&&function(){for(var a=3,b=t.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="\x3c!--[if gt IE "+ ++a+"]><i></i><![endif]--\x3e",c[0];);return 4<a?a:n}(),r=/\S+/g;return{gc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],r:function(a,b){for(var c=0,d=a.length;c<d;c++)b(a[c],c)},o:function(a,b){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b);for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},Vb:function(a,b,c){for(var d=
0,e=a.length;d<e;d++)if(b.call(c,a[d],d))return a[d];return null},Na:function(b,c){var d=a.a.o(b,c);0<d?b.splice(d,1):0===d&&b.shift()},Wb:function(b){b=b||[];for(var c=[],d=0,e=b.length;d<e;d++)0>a.a.o(c,b[d])&&c.push(b[d]);return c},ib:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;d<e;d++)c.push(b(a[d],d));return c},Ma:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;d<e;d++)b(a[d],d)&&c.push(a[d]);return c},ta:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var c=0,d=b.length;c<
d;c++)a.push(b[c]);return a},ra:function(b,c,d){var e=a.a.o(a.a.Bb(b),c);0>e?d&&b.push(c):d||b.splice(e,1)},la:f,extend:c,$a:d,ab:f?d:c,D:b,Ea:function(a,b){if(!a)return a;var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d],d,a));return c},rb:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},nc:function(b){b=a.a.W(b);for(var c=(b[0]&&b[0].ownerDocument||t).createElement("div"),d=0,e=b.length;d<e;d++)c.appendChild(a.ba(b[d]));return c},wa:function(b,c){for(var d=0,e=b.length,m=[];d<e;d++){var k=
b[d].cloneNode(!0);m.push(c?a.ba(k):k)}return m},fa:function(b,c){a.a.rb(b);if(c)for(var d=0,e=c.length;d<e;d++)b.appendChild(c[d])},uc:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length){for(var e=d[0],m=e.parentNode,k=0,f=c.length;k<f;k++)m.insertBefore(c[k],e);k=0;for(f=d.length;k<f;k++)a.removeNode(d[k])}},Ba:function(a,b){if(a.length){for(b=8===b.nodeType&&b.parentNode||b;a.length&&a[0].parentNode!==b;)a.splice(0,1);for(;1<a.length&&a[a.length-1].parentNode!==b;)a.length--;if(1<a.length){var c=
a[0],d=a[a.length-1];for(a.length=0;c!==d;)a.push(c),c=c.nextSibling;a.push(d)}}return a},wc:function(a,b){7>k?a.setAttribute("selected",b):a.selected=b},cb:function(a){return null===a||a===n?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},sd:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},Rc:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(3===a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==
(b.compareDocumentPosition(a)&16);for(;a&&a!=b;)a=a.parentNode;return!!a},qb:function(b){return a.a.Rc(b,b.ownerDocument.documentElement)},Tb:function(b){return!!a.a.Vb(b,a.a.qb)},A:function(a){return a&&a.tagName&&a.tagName.toLowerCase()},Zb:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.Zb(b),c)},dc:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},q:function(b,
c,d){var e=a.a.Zb(d);d=k&&m[c];if(a.options.useOnlyNativeEvents||d||!u)if(d||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var f=function(a){e.call(b,a)},l="on"+c;b.attachEvent(l,f);a.a.G.qa(b,function(){b.detachEvent(l,f)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else b.addEventListener(c,e,!1);else u(b).bind(c,e)},Fa:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===
a.a.A(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(a.options.useOnlyNativeEvents||!u||d)if("function"==typeof t.createEvent)if("function"==typeof b.dispatchEvent)d=t.createEvent(l[c]||"HTMLEvents"),d.initEvent(c,!0,!0,x,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");
else u(b).trigger(c)},c:function(b){return a.I(b)?b():b},Bb:function(b){return a.I(b)?b.p():b},fb:function(b,c,d){var k;c&&("object"===typeof b.classList?(k=b.classList[d?"add":"remove"],a.a.r(c.match(r),function(a){k.call(b.classList,a)})):"string"===typeof b.className.baseVal?e(b.className,"baseVal",c,d):e(b,"className",c,d))},bb:function(b,c){var d=a.a.c(c);if(null===d||d===n)d="";var e=a.f.firstChild(b);!e||3!=e.nodeType||a.f.nextSibling(e)?a.f.fa(b,[b.ownerDocument.createTextNode(d)]):e.data=
d;a.a.Wc(b)},vc:function(a,b){a.name=b;if(7>=k)try{a.mergeAttributes(t.createElement("<input name='"+a.name+"'/>"),!1)}catch(c){}},Wc:function(a){9<=k&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},Sc:function(a){if(k){var b=a.style.width;a.style.width=0;a.style.width=b}},nd:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},W:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return b},bc:function(a){return g?Symbol(a):a},xd:6===k,
yd:7===k,C:k,ic:function(b,c){for(var d=a.a.W(b.getElementsByTagName("input")).concat(a.a.W(b.getElementsByTagName("textarea"))),e="string"==typeof c?function(a){return a.name===c}:function(a){return c.test(a.name)},k=[],m=d.length-1;0<=m;m--)e(d[m])&&k.push(d[m]);return k},kd:function(b){return"string"==typeof b&&(b=a.a.cb(b))?H&&H.parse?H.parse(b):(new Function("return "+b))():null},Gb:function(b,c,d){if(!H||!H.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");
return H.stringify(a.a.c(b),c,d)},ld:function(c,d,e){e=e||{};var k=e.params||{},m=e.includeFields||this.gc,f=c;if("object"==typeof c&&"form"===a.a.A(c))for(var f=c.action,l=m.length-1;0<=l;l--)for(var g=a.a.ic(c,m[l]),h=g.length-1;0<=h;h--)k[g[h].name]=g[h].value;d=a.a.c(d);var r=t.createElement("form");r.style.display="none";r.action=f;r.method="post";for(var n in d)c=t.createElement("input"),c.type="hidden",c.name=n,c.value=a.a.Gb(a.a.c(d[n])),r.appendChild(c);b(k,function(a,b){var c=t.createElement("input");
c.type="hidden";c.name=a;c.value=b;r.appendChild(c)});t.body.appendChild(r);e.submitter?e.submitter(r):r.submit();setTimeout(function(){r.parentNode.removeChild(r)},0)}}}();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.r);a.b("utils.arrayFirst",a.a.Vb);a.b("utils.arrayFilter",a.a.Ma);a.b("utils.arrayGetDistinctValues",a.a.Wb);a.b("utils.arrayIndexOf",a.a.o);a.b("utils.arrayMap",a.a.ib);a.b("utils.arrayPushAll",a.a.ta);a.b("utils.arrayRemoveItem",a.a.Na);a.b("utils.extend",a.a.extend);a.b("utils.fieldsIncludedWithJsonPost",
a.a.gc);a.b("utils.getFormFields",a.a.ic);a.b("utils.peekObservable",a.a.Bb);a.b("utils.postJson",a.a.ld);a.b("utils.parseJson",a.a.kd);a.b("utils.registerEventHandler",a.a.q);a.b("utils.stringifyJson",a.a.Gb);a.b("utils.range",a.a.nd);a.b("utils.toggleDomNodeCssClass",a.a.fb);a.b("utils.triggerEvent",a.a.Fa);a.b("utils.unwrapObservable",a.a.c);a.b("utils.objectForEach",a.a.D);a.b("utils.addOrRemoveItem",a.a.ra);a.b("utils.setTextContent",a.a.bb);a.b("unwrap",a.a.c);Function.prototype.bind||(Function.prototype.bind=
function(a){var c=this;if(1===arguments.length)return function(){return c.apply(a,arguments)};var d=Array.prototype.slice.call(arguments,1);return function(){var e=d.slice(0);e.push.apply(e,arguments);return c.apply(a,e)}});a.a.e=new function(){function a(b,g){var h=b[d];if(!h||"null"===h||!e[h]){if(!g)return n;h=b[d]="ko"+c++;e[h]={}}return e[h]}var c=0,d="__ko__"+(new Date).getTime(),e={};return{get:function(c,d){var e=a(c,!1);return e===n?n:e[d]},set:function(c,d,e){if(e!==n||a(c,!1)!==n)a(c,!0)[d]=
e},clear:function(a){var b=a[d];return b?(delete e[b],a[d]=null,!0):!1},J:function(){return c++ +d}}};a.b("utils.domData",a.a.e);a.b("utils.domData.clear",a.a.e.clear);a.a.G=new function(){function b(b,c){var e=a.a.e.get(b,d);e===n&&c&&(e=[],a.a.e.set(b,d,e));return e}function c(d){var e=b(d,!1);if(e)for(var e=e.slice(0),l=0;l<e.length;l++)e[l](d);a.a.e.clear(d);a.a.G.cleanExternalData(d);if(f[d.nodeType])for(e=d.firstChild;d=e;)e=d.nextSibling,8===d.nodeType&&c(d)}var d=a.a.e.J(),e={1:!0,8:!0,9:!0},
f={1:!0,9:!0};return{qa:function(a,c){if("function"!=typeof c)throw Error("Callback must be a function");b(a,!0).push(c)},tc:function(c,e){var f=b(c,!1);f&&(a.a.Na(f,e),0==f.length&&a.a.e.set(c,d,n))},ba:function(b){if(e[b.nodeType]&&(c(b),f[b.nodeType])){var d=[];a.a.ta(d,b.getElementsByTagName("*"));for(var l=0,m=d.length;l<m;l++)c(d[l])}return b},removeNode:function(b){a.ba(b);b.parentNode&&b.parentNode.removeChild(b)},cleanExternalData:function(a){u&&"function"==typeof u.cleanData&&u.cleanData([a])}}};
a.ba=a.a.G.ba;a.removeNode=a.a.G.removeNode;a.b("cleanNode",a.ba);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.G);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.G.qa);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.G.tc);(function(){var b=[0,"",""],c=[1,"<table>","</table>"],d=[3,"<table><tbody><tr>","</tr></tbody></table>"],e=[1,"<select multiple='multiple'>","</select>"],f={thead:c,tbody:c,tfoot:c,tr:[2,"<table><tbody>","</tbody></table>"],td:d,th:d,option:e,optgroup:e},
g=8>=a.a.C;a.a.na=function(c,d){var e;if(u)if(u.parseHTML)e=u.parseHTML(c,d)||[];else{if((e=u.clean([c],d))&&e[0]){for(var k=e[0];k.parentNode&&11!==k.parentNode.nodeType;)k=k.parentNode;k.parentNode&&k.parentNode.removeChild(k)}}else{(e=d)||(e=t);var k=e.parentWindow||e.defaultView||x,r=a.a.cb(c).toLowerCase(),q=e.createElement("div"),p;p=(r=r.match(/^<([a-z]+)[ >]/))&&f[r[1]]||b;r=p[0];p="ignored<div>"+p[1]+c+p[2]+"</div>";"function"==typeof k.innerShiv?q.appendChild(k.innerShiv(p)):(g&&e.appendChild(q),
q.innerHTML=p,g&&q.parentNode.removeChild(q));for(;r--;)q=q.lastChild;e=a.a.W(q.lastChild.childNodes)}return e};a.a.Eb=function(b,c){a.a.rb(b);c=a.a.c(c);if(null!==c&&c!==n)if("string"!=typeof c&&(c=c.toString()),u)u(b).html(c);else for(var d=a.a.na(c,b.ownerDocument),e=0;e<d.length;e++)b.appendChild(d[e])}})();a.b("utils.parseHtmlFragment",a.a.na);a.b("utils.setHtml",a.a.Eb);a.N=function(){function b(c,e){if(c)if(8==c.nodeType){var f=a.N.pc(c.nodeValue);null!=f&&e.push({Qc:c,hd:f})}else if(1==c.nodeType)for(var f=
0,g=c.childNodes,h=g.length;f<h;f++)b(g[f],e)}var c={};return{yb:function(a){if("function"!=typeof a)throw Error("You can only pass a function to ko.memoization.memoize()");var b=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);c[b]=a;return"\x3c!--[ko_memo:"+b+"]--\x3e"},Bc:function(a,b){var f=c[a];if(f===n)throw Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return f.apply(null,b||[]),
!0}finally{delete c[a]}},Cc:function(c,e){var f=[];b(c,f);for(var g=0,h=f.length;g<h;g++){var l=f[g].Qc,m=[l];e&&a.a.ta(m,e);a.N.Bc(f[g].hd,m);l.nodeValue="";l.parentNode&&l.parentNode.removeChild(l)}},pc:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}();a.b("memoization",a.N);a.b("memoization.memoize",a.N.yb);a.b("memoization.unmemoize",a.N.Bc);a.b("memoization.parseMemoText",a.N.pc);a.b("memoization.unmemoizeDomNodeAndDescendants",a.N.Cc);a.Z=function(){function b(){if(e)for(var b=
e,c=0,m;g<e;)if(m=d[g++]){if(g>b){if(5E3<=++c){g=e;a.a.dc(Error("'Too much recursion' after processing "+c+" task groups."));break}b=e}try{m()}catch(k){a.a.dc(k)}}}function c(){b();g=e=d.length=0}var d=[],e=0,f=1,g=0;return{scheduler:x.MutationObserver?function(a){var b=t.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c):t&&"onreadystatechange"in t.createElement("script")?function(a){var b=t.createElement("script");b.onreadystatechange=
function(){b.onreadystatechange=null;t.documentElement.removeChild(b);b=null;a()};t.documentElement.appendChild(b)}:function(a){setTimeout(a,0)},Za:function(b){e||a.Z.scheduler(c);d[e++]=b;return f++},cancel:function(a){a-=f-e;a>=g&&a<e&&(d[a]=null)},resetForTesting:function(){var a=e-g;g=e=d.length=0;return a},rd:b}}();a.b("tasks",a.Z);a.b("tasks.schedule",a.Z.Za);a.b("tasks.runEarly",a.Z.rd);a.Aa={throttle:function(b,c){b.throttleEvaluation=c;var d=null;return a.B({read:b,write:function(e){clearTimeout(d);
d=a.a.setTimeout(function(){b(e)},c)}})},rateLimit:function(a,c){var d,e,f;"number"==typeof c?d=c:(d=c.timeout,e=c.method);a.gb=!1;f="notifyWhenChangesStop"==e?T:S;a.Wa(function(a){return f(a,d)})},deferred:function(b,c){if(!0!==c)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");b.gb||(b.gb=!0,b.Wa(function(c){var e,f=!1;return function(){if(!f){a.Z.cancel(e);e=a.Z.Za(c);try{f=!0,b.notifySubscribers(n,"dirty")}finally{f=
!1}}}}))},notify:function(a,c){a.equalityComparer="always"==c?null:J}};var R={undefined:1,"boolean":1,number:1,string:1};a.b("extenders",a.Aa);a.zc=function(b,c,d){this.$=b;this.jb=c;this.Pc=d;this.T=!1;a.H(this,"dispose",this.k)};a.zc.prototype.k=function(){this.T=!0;this.Pc()};a.K=function(){a.a.ab(this,D);D.ub(this)};var E="change",D={ub:function(a){a.F={change:[]};a.Qb=1},Y:function(b,c,d){var e=this;d=d||E;var f=new a.zc(e,c?b.bind(c):b,function(){a.a.Na(e.F[d],f);e.Ka&&e.Ka(d)});e.ua&&e.ua(d);
e.F[d]||(e.F[d]=[]);e.F[d].push(f);return f},notifySubscribers:function(b,c){c=c||E;c===E&&this.Kb();if(this.Ra(c)){var d=c===E&&this.Fc||this.F[c].slice(0);try{a.l.Xb();for(var e=0,f;f=d[e];++e)f.T||f.jb(b)}finally{a.l.end()}}},Pa:function(){return this.Qb},Zc:function(a){return this.Pa()!==a},Kb:function(){++this.Qb},Wa:function(b){var c=this,d=a.I(c),e,f,g,h;c.Ja||(c.Ja=c.notifySubscribers,c.notifySubscribers=U);var l=b(function(){c.Ha=!1;d&&h===c&&(h=c.Mb?c.Mb():c());var a=f||c.Ua(g,h);f=e=!1;
a&&c.Ja(g=h)});c.Pb=function(a){c.Fc=c.F[E].slice(0);c.Ha=e=!0;h=a;l()};c.Ob=function(a){e||(g=a,c.Ja(a,"beforeChange"))};c.Hc=function(){c.Ua(g,c.p(!0))&&(f=!0)}},Ra:function(a){return this.F[a]&&this.F[a].length},Xc:function(b){if(b)return this.F[b]&&this.F[b].length||0;var c=0;a.a.D(this.F,function(a,b){"dirty"!==a&&(c+=b.length)});return c},Ua:function(a,c){return!this.equalityComparer||!this.equalityComparer(a,c)},extend:function(b){var c=this;b&&a.a.D(b,function(b,e){var f=a.Aa[b];"function"==
typeof f&&(c=f(c,e)||c)});return c}};a.H(D,"subscribe",D.Y);a.H(D,"extend",D.extend);a.H(D,"getSubscriptionsCount",D.Xc);a.a.la&&a.a.$a(D,Function.prototype);a.K.fn=D;a.lc=function(a){return null!=a&&"function"==typeof a.Y&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.K);a.b("isSubscribable",a.lc);a.xa=a.l=function(){function b(a){d.push(e);e=a}function c(){e=d.pop()}var d=[],e,f=0;return{Xb:b,end:c,sc:function(b){if(e){if(!a.lc(b))throw Error("Only subscribable things can act as dependencies");
e.jb.call(e.Lc,b,b.Gc||(b.Gc=++f))}},w:function(a,d,e){try{return b(),a.apply(d,e||[])}finally{c()}},Ca:function(){if(e)return e.m.Ca()},Va:function(){if(e)return e.Va}}}();a.b("computedContext",a.xa);a.b("computedContext.getDependenciesCount",a.xa.Ca);a.b("computedContext.isInitial",a.xa.Va);a.b("ignoreDependencies",a.wd=a.l.w);var F=a.a.bc("_latestValue");a.O=function(b){function c(){if(0<arguments.length)return c.Ua(c[F],arguments[0])&&(c.ia(),c[F]=arguments[0],c.ha()),this;a.l.sc(c);return c[F]}
c[F]=b;a.a.la||a.a.extend(c,a.K.fn);a.K.fn.ub(c);a.a.ab(c,B);a.options.deferUpdates&&a.Aa.deferred(c,!0);return c};var B={equalityComparer:J,p:function(){return this[F]},ha:function(){this.notifySubscribers(this[F])},ia:function(){this.notifySubscribers(this[F],"beforeChange")}};a.a.la&&a.a.$a(B,a.K.fn);var I=a.O.md="__ko_proto__";B[I]=a.O;a.Qa=function(b,c){return null===b||b===n||b[I]===n?!1:b[I]===c?!0:a.Qa(b[I],c)};a.I=function(b){return a.Qa(b,a.O)};a.Da=function(b){return"function"==typeof b&&
b[I]===a.O||"function"==typeof b&&b[I]===a.B&&b.$c?!0:!1};a.b("observable",a.O);a.b("isObservable",a.I);a.b("isWriteableObservable",a.Da);a.b("isWritableObservable",a.Da);a.b("observable.fn",B);a.H(B,"peek",B.p);a.H(B,"valueHasMutated",B.ha);a.H(B,"valueWillMutate",B.ia);a.ma=function(b){b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");b=a.O(b);a.a.ab(b,a.ma.fn);return b.extend({trackArrayChanges:!0})};
a.ma.fn={remove:function(b){for(var c=this.p(),d=[],e="function"!=typeof b||a.I(b)?function(a){return a===b}:b,f=0;f<c.length;f++){var g=c[f];e(g)&&(0===d.length&&this.ia(),d.push(g),c.splice(f,1),f--)}d.length&&this.ha();return d},removeAll:function(b){if(b===n){var c=this.p(),d=c.slice(0);this.ia();c.splice(0,c.length);this.ha();return d}return b?this.remove(function(c){return 0<=a.a.o(b,c)}):[]},destroy:function(b){var c=this.p(),d="function"!=typeof b||a.I(b)?function(a){return a===b}:b;this.ia();
for(var e=c.length-1;0<=e;e--)d(c[e])&&(c[e]._destroy=!0);this.ha()},destroyAll:function(b){return b===n?this.destroy(function(){return!0}):b?this.destroy(function(c){return 0<=a.a.o(b,c)}):[]},indexOf:function(b){var c=this();return a.a.o(c,b)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.ia(),this.p()[d]=c,this.ha())}};a.a.la&&a.a.$a(a.ma.fn,a.O.fn);a.a.r("pop push reverse shift sort splice unshift".split(" "),function(b){a.ma.fn[b]=function(){var a=this.p();this.ia();this.Yb(a,b,arguments);
var d=a[b].apply(a,arguments);this.ha();return d===a?this:d}});a.a.r(["slice"],function(b){a.ma.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.b("observableArray",a.ma);a.Aa.trackArrayChanges=function(b,c){function d(){if(!e){e=!0;l=b.notifySubscribers;b.notifySubscribers=function(a,b){b&&b!==E||++h;return l.apply(this,arguments)};var c=[].concat(b.p()||[]);f=null;g=b.Y(function(d){d=[].concat(d||[]);if(b.Ra("arrayChange")){var e;if(!f||1<h)f=a.a.lb(c,d,b.kb);e=f}c=d;f=null;h=0;
e&&e.length&&b.notifySubscribers(e,"arrayChange")})}}b.kb={};c&&"object"==typeof c&&a.a.extend(b.kb,c);b.kb.sparse=!0;if(!b.Yb){var e=!1,f=null,g,h=0,l,m=b.ua,k=b.Ka;b.ua=function(a){m&&m.call(b,a);"arrayChange"===a&&d()};b.Ka=function(a){k&&k.call(b,a);"arrayChange"!==a||b.Ra("arrayChange")||(l&&(b.notifySubscribers=l,l=n),g.k(),e=!1)};b.Yb=function(b,c,d){function k(a,b,c){return m[m.length]={status:a,value:b,index:c}}if(e&&!h){var m=[],l=b.length,g=d.length,G=0;switch(c){case "push":G=l;case "unshift":for(c=
0;c<g;c++)k("added",d[c],G+c);break;case "pop":G=l-1;case "shift":l&&k("deleted",b[G],G);break;case "splice":c=Math.min(Math.max(0,0>d[0]?l+d[0]:d[0]),l);for(var l=1===g?l:Math.min(c+(d[1]||0),l),g=c+g-2,G=Math.max(l,g),n=[],s=[],w=2;c<G;++c,++w)c<l&&s.push(k("deleted",b[c],c)),c<g&&n.push(k("added",d[w],c));a.a.hc(s,n);break;default:return}f=m}}}};var s=a.a.bc("_state");a.m=a.B=function(b,c,d){function e(){if(0<arguments.length){if("function"===typeof f)f.apply(g.sb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");
return this}a.l.sc(e);(g.V||g.t&&e.Sa())&&e.U();return g.M}"object"===typeof b?d=b:(d=d||{},b&&(d.read=b));if("function"!=typeof d.read)throw Error("Pass a function that returns the value of the ko.computed");var f=d.write,g={M:n,da:!0,V:!0,Ta:!1,Hb:!1,T:!1,Ya:!1,t:!1,od:d.read,sb:c||d.owner,i:d.disposeWhenNodeIsRemoved||d.i||null,ya:d.disposeWhen||d.ya,pb:null,s:{},L:0,fc:null};e[s]=g;e.$c="function"===typeof f;a.a.la||a.a.extend(e,a.K.fn);a.K.fn.ub(e);a.a.ab(e,z);d.pure?(g.Ya=!0,g.t=!0,a.a.extend(e,
Y)):d.deferEvaluation&&a.a.extend(e,Z);a.options.deferUpdates&&a.Aa.deferred(e,!0);g.i&&(g.Hb=!0,g.i.nodeType||(g.i=null));g.t||d.deferEvaluation||e.U();g.i&&e.ca()&&a.a.G.qa(g.i,g.pb=function(){e.k()});return e};var z={equalityComparer:J,Ca:function(){return this[s].L},Sb:function(a,c,d){if(this[s].Ya&&c===this)throw Error("A 'pure' computed must not be called recursively");this[s].s[a]=d;d.Ia=this[s].L++;d.pa=c.Pa()},Sa:function(){var a,c,d=this[s].s;for(a in d)if(d.hasOwnProperty(a)&&(c=d[a],this.oa&&
c.$.Ha||c.$.Zc(c.pa)))return!0},gd:function(){this.oa&&!this[s].Ta&&this.oa(!1)},ca:function(){var a=this[s];return a.V||0<a.L},qd:function(){this.Ha?this[s].V&&(this[s].da=!0):this.ec()},yc:function(a){if(a.gb&&!this[s].i){var c=a.Y(this.gd,this,"dirty"),d=a.Y(this.qd,this);return{$:a,k:function(){c.k();d.k()}}}return a.Y(this.ec,this)},ec:function(){var b=this,c=b.throttleEvaluation;c&&0<=c?(clearTimeout(this[s].fc),this[s].fc=a.a.setTimeout(function(){b.U(!0)},c)):b.oa?b.oa(!0):b.U(!0)},U:function(b){var c=
this[s],d=c.ya,e=!1;if(!c.Ta&&!c.T){if(c.i&&!a.a.qb(c.i)||d&&d()){if(!c.Hb){this.k();return}}else c.Hb=!1;c.Ta=!0;try{e=this.Vc(b)}finally{c.Ta=!1}c.L||this.k();return e}},Vc:function(b){var c=this[s],d=!1,e=c.Ya?n:!c.L,f={Mc:this,Oa:c.s,ob:c.L};a.l.Xb({Lc:f,jb:W,m:this,Va:e});c.s={};c.L=0;f=this.Uc(c,f);this.Ua(c.M,f)&&(c.t||this.notifySubscribers(c.M,"beforeChange"),c.M=f,c.t?this.Kb():b&&this.notifySubscribers(c.M),d=!0);e&&this.notifySubscribers(c.M,"awake");return d},Uc:function(b,c){try{var d=
b.od;return b.sb?d.call(b.sb):d()}finally{a.l.end(),c.ob&&!b.t&&a.a.D(c.Oa,V),b.da=b.V=!1}},p:function(a){var c=this[s];(c.V&&(a||!c.L)||c.t&&this.Sa())&&this.U();return c.M},Wa:function(b){a.K.fn.Wa.call(this,b);this.Mb=function(){this[s].da?this.U():this[s].V=!1;return this[s].M};this.oa=function(a){this.Ob(this[s].M);this[s].V=!0;a&&(this[s].da=!0);this.Pb(this)}},k:function(){var b=this[s];!b.t&&b.s&&a.a.D(b.s,function(a,b){b.k&&b.k()});b.i&&b.pb&&a.a.G.tc(b.i,b.pb);b.s=null;b.L=0;b.T=!0;b.da=
!1;b.V=!1;b.t=!1;b.i=null}},Y={ua:function(b){var c=this,d=c[s];if(!d.T&&d.t&&"change"==b){d.t=!1;if(d.da||c.Sa())d.s=null,d.L=0,c.U()&&c.Kb();else{var e=[];a.a.D(d.s,function(a,b){e[b.Ia]=a});a.a.r(e,function(a,b){var e=d.s[a],l=c.yc(e.$);l.Ia=b;l.pa=e.pa;d.s[a]=l})}d.T||c.notifySubscribers(d.M,"awake")}},Ka:function(b){var c=this[s];c.T||"change"!=b||this.Ra("change")||(a.a.D(c.s,function(a,b){b.k&&(c.s[a]={$:b.$,Ia:b.Ia,pa:b.pa},b.k())}),c.t=!0,this.notifySubscribers(n,"asleep"))},Pa:function(){var b=
this[s];b.t&&(b.da||this.Sa())&&this.U();return a.K.fn.Pa.call(this)}},Z={ua:function(a){"change"!=a&&"beforeChange"!=a||this.p()}};a.a.la&&a.a.$a(z,a.K.fn);var P=a.O.md;a.m[P]=a.O;z[P]=a.m;a.bd=function(b){return a.Qa(b,a.m)};a.cd=function(b){return a.Qa(b,a.m)&&b[s]&&b[s].Ya};a.b("computed",a.m);a.b("dependentObservable",a.m);a.b("isComputed",a.bd);a.b("isPureComputed",a.cd);a.b("computed.fn",z);a.H(z,"peek",z.p);a.H(z,"dispose",z.k);a.H(z,"isActive",z.ca);a.H(z,"getDependenciesCount",z.Ca);a.rc=
function(b,c){if("function"===typeof b)return a.m(b,c,{pure:!0});b=a.a.extend({},b);b.pure=!0;return a.m(b,c)};a.b("pureComputed",a.rc);(function(){function b(a,f,g){g=g||new d;a=f(a);if("object"!=typeof a||null===a||a===n||a instanceof RegExp||a instanceof Date||a instanceof String||a instanceof Number||a instanceof Boolean)return a;var h=a instanceof Array?[]:{};g.save(a,h);c(a,function(c){var d=f(a[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":h[c]=d;break;case "object":case "undefined":var k=
g.get(d);h[c]=k!==n?k:b(d,f,g)}});return h}function c(a,b){if(a instanceof Array){for(var c=0;c<a.length;c++)b(c);"function"==typeof a.toJSON&&b("toJSON")}else for(c in a)b(c)}function d(){this.keys=[];this.Lb=[]}a.Ac=function(c){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return b(c,function(b){for(var c=0;a.I(b)&&10>c;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.Ac(b);return a.a.Gb(b,c,d)};d.prototype={save:function(b,c){var d=a.a.o(this.keys,
b);0<=d?this.Lb[d]=c:(this.keys.push(b),this.Lb.push(c))},get:function(b){b=a.a.o(this.keys,b);return 0<=b?this.Lb[b]:n}}})();a.b("toJS",a.Ac);a.b("toJSON",a.toJSON);(function(){a.j={u:function(b){switch(a.a.A(b)){case "option":return!0===b.__ko__hasDomDataOptionValue__?a.a.e.get(b,a.d.options.zb):7>=a.a.C?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.j.u(b.options[b.selectedIndex]):n;default:return b.value}},ja:function(b,
c,d){switch(a.a.A(b)){case "option":switch(typeof c){case "string":a.a.e.set(b,a.d.options.zb,n);"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__;b.value=c;break;default:a.a.e.set(b,a.d.options.zb,c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:""}break;case "select":if(""===c||null===c)c=n;for(var e=-1,f=0,g=b.options.length,h;f<g;++f)if(h=a.j.u(b.options[f]),h==c||""==h&&c===n){e=f;break}if(d||0<=e||c===n&&1<b.size)b.selectedIndex=e;break;default:if(null===
c||c===n)c="";b.value=c}}}})();a.b("selectExtensions",a.j);a.b("selectExtensions.readValue",a.j.u);a.b("selectExtensions.writeValue",a.j.ja);a.h=function(){function b(b){b=a.a.cb(b);123===b.charCodeAt(0)&&(b=b.slice(1,-1));var c=[],d=b.match(e),r,h=[],p=0;if(d){d.push(",");for(var A=0,y;y=d[A];++A){var v=y.charCodeAt(0);if(44===v){if(0>=p){c.push(r&&h.length?{key:r,value:h.join("")}:{unknown:r||h.join("")});r=p=0;h=[];continue}}else if(58===v){if(!p&&!r&&1===h.length){r=h.pop();continue}}else 47===
v&&A&&1<y.length?(v=d[A-1].match(f))&&!g[v[0]]&&(b=b.substr(b.indexOf(y)+1),d=b.match(e),d.push(","),A=-1,y="/"):40===v||123===v||91===v?++p:41===v||125===v||93===v?--p:r||h.length||34!==v&&39!==v||(y=y.slice(1,-1));h.push(y)}}return c}var c=["true","false","null","undefined"],d=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,e=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),f=/[\])"'A-Za-z0-9_$]+$/,
g={"in":1,"return":1,"typeof":1},h={};return{va:[],ga:h,Ab:b,Xa:function(e,m){function k(b,e){var m;if(!A){var l=a.getBindingHandler(b);if(l&&l.preprocess&&!(e=l.preprocess(e,b,k)))return;if(l=h[b])m=e,0<=a.a.o(c,m)?m=!1:(l=m.match(d),m=null===l?!1:l[1]?"Object("+l[1]+")"+l[2]:m),l=m;l&&g.push("'"+b+"':function(_z){"+m+"=_z}")}p&&(e="function(){return "+e+" }");f.push("'"+b+"':"+e)}m=m||{};var f=[],g=[],p=m.valueAccessors,A=m.bindingParams,y="string"===typeof e?b(e):e;a.a.r(y,function(a){k(a.key||
a.unknown,a.value)});g.length&&k("_ko_property_writers","{"+g.join(",")+" }");return f.join(",")},fd:function(a,b){for(var c=0;c<a.length;c++)if(a[c].key==b)return!0;return!1},Ga:function(b,c,d,e,f){if(b&&a.I(b))!a.Da(b)||f&&b.p()===e||b(e);else if((b=c.get("_ko_property_writers"))&&b[d])b[d](e)}}}();a.b("expressionRewriting",a.h);a.b("expressionRewriting.bindingRewriteValidators",a.h.va);a.b("expressionRewriting.parseObjectLiteral",a.h.Ab);a.b("expressionRewriting.preProcessBindings",a.h.Xa);a.b("expressionRewriting._twoWayBindings",
a.h.ga);a.b("jsonExpressionRewriting",a.h);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",a.h.Xa);(function(){function b(a){return 8==a.nodeType&&g.test(f?a.text:a.nodeValue)}function c(a){return 8==a.nodeType&&h.test(f?a.text:a.nodeValue)}function d(a,d){for(var e=a,f=1,l=[];e=e.nextSibling;){if(c(e)&&(f--,0===f))return l;l.push(e);b(e)&&f++}if(!d)throw Error("Cannot find closing comment tag to match: "+a.nodeValue);return null}function e(a,b){var c=d(a,b);return c?0<c.length?c[c.length-
1].nextSibling:a.nextSibling:null}var f=t&&"\x3c!--test--\x3e"===t.createComment("test").text,g=f?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,h=f?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0};a.f={aa:{},childNodes:function(a){return b(a)?d(a):a.childNodes},za:function(c){if(b(c)){c=a.f.childNodes(c);for(var d=0,e=c.length;d<e;d++)a.removeNode(c[d])}else a.a.rb(c)},fa:function(c,d){if(b(c)){a.f.za(c);for(var e=c.nextSibling,f=0,l=d.length;f<l;f++)e.parentNode.insertBefore(d[f],
e)}else a.a.fa(c,d)},qc:function(a,c){b(a)?a.parentNode.insertBefore(c,a.nextSibling):a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)},kc:function(c,d,e){e?b(c)?c.parentNode.insertBefore(d,e.nextSibling):e.nextSibling?c.insertBefore(d,e.nextSibling):c.appendChild(d):a.f.qc(c,d)},firstChild:function(a){return b(a)?!a.nextSibling||c(a.nextSibling)?null:a.nextSibling:a.firstChild},nextSibling:function(a){b(a)&&(a=e(a));return a.nextSibling&&c(a.nextSibling)?null:a.nextSibling},Yc:b,vd:function(a){return(a=
(f?a.text:a.nodeValue).match(g))?a[1]:null},oc:function(d){if(l[a.a.A(d)]){var k=d.firstChild;if(k){do if(1===k.nodeType){var f;f=k.firstChild;var g=null;if(f){do if(g)g.push(f);else if(b(f)){var h=e(f,!0);h?f=h:g=[f]}else c(f)&&(g=[f]);while(f=f.nextSibling)}if(f=g)for(g=k.nextSibling,h=0;h<f.length;h++)g?d.insertBefore(f[h],g):d.appendChild(f[h])}while(k=k.nextSibling)}}}}})();a.b("virtualElements",a.f);a.b("virtualElements.allowedBindings",a.f.aa);a.b("virtualElements.emptyNode",a.f.za);a.b("virtualElements.insertAfter",
a.f.kc);a.b("virtualElements.prepend",a.f.qc);a.b("virtualElements.setDomNodeChildren",a.f.fa);(function(){a.S=function(){this.Kc={}};a.a.extend(a.S.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return null!=b.getAttribute("data-bind")||a.g.getComponentNameForNode(b);case 8:return a.f.Yc(b);default:return!1}},getBindings:function(b,c){var d=this.getBindingsString(b,c),d=d?this.parseBindingsString(d,c,b):null;return a.g.Rb(d,b,c,!1)},getBindingAccessors:function(b,c){var d=this.getBindingsString(b,
c),d=d?this.parseBindingsString(d,c,b,{valueAccessors:!0}):null;return a.g.Rb(d,b,c,!0)},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.f.vd(b);default:return null}},parseBindingsString:function(b,c,d,e){try{var f=this.Kc,g=b+(e&&e.valueAccessors||""),h;if(!(h=f[g])){var l,m="with($context){with($data||{}){return{"+a.h.Xa(b,e)+"}}}";l=new Function("$context","$element",m);h=f[g]=l}return h(c,d)}catch(k){throw k.message="Unable to parse bindings.\nBindings value: "+
b+"\nMessage: "+k.message,k;}}});a.S.instance=new a.S})();a.b("bindingProvider",a.S);(function(){function b(a){return function(){return a}}function c(a){return a()}function d(b){return a.a.Ea(a.l.w(b),function(a,c){return function(){return b()[c]}})}function e(c,e,k){return"function"===typeof c?d(c.bind(null,e,k)):a.a.Ea(c,b)}function f(a,b){return d(this.getBindings.bind(this,a,b))}function g(b,c,d){var e,k=a.f.firstChild(c),f=a.S.instance,m=f.preprocessNode;if(m){for(;e=k;)k=a.f.nextSibling(e),
m.call(f,e);k=a.f.firstChild(c)}for(;e=k;)k=a.f.nextSibling(e),h(b,e,d)}function h(b,c,d){var e=!0,k=1===c.nodeType;k&&a.f.oc(c);if(k&&d||a.S.instance.nodeHasBindings(c))e=m(c,null,b,d).shouldBindDescendants;e&&!r[a.a.A(c)]&&g(b,c,!k)}function l(b){var c=[],d={},e=[];a.a.D(b,function X(k){if(!d[k]){var f=a.getBindingHandler(k);f&&(f.after&&(e.push(k),a.a.r(f.after,function(c){if(b[c]){if(-1!==a.a.o(e,c))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+e.join(", "));
X(c)}}),e.length--),c.push({key:k,jc:f}));d[k]=!0}});return c}function m(b,d,e,k){var m=a.a.e.get(b,q);if(!d){if(m)throw Error("You cannot apply bindings multiple times to the same element.");a.a.e.set(b,q,!0)}!m&&k&&a.xc(b,e);var g;if(d&&"function"!==typeof d)g=d;else{var h=a.S.instance,r=h.getBindingAccessors||f,p=a.B(function(){(g=d?d(e,b):r.call(h,b,e))&&e.Q&&e.Q();return g},null,{i:b});g&&p.ca()||(p=null)}var s;if(g){var t=p?function(a){return function(){return c(p()[a])}}:function(a){return g[a]},
u=function(){return a.a.Ea(p?p():g,c)};u.get=function(a){return g[a]&&c(t(a))};u.has=function(a){return a in g};k=l(g);a.a.r(k,function(c){var d=c.jc.init,k=c.jc.update,f=c.key;if(8===b.nodeType&&!a.f.aa[f])throw Error("The binding '"+f+"' cannot be used with virtual elements");try{"function"==typeof d&&a.l.w(function(){var a=d(b,t(f),u,e.$data,e);if(a&&a.controlsDescendantBindings){if(s!==n)throw Error("Multiple bindings ("+s+" and "+f+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");
s=f}}),"function"==typeof k&&a.B(function(){k(b,t(f),u,e.$data,e)},null,{i:b})}catch(m){throw m.message='Unable to process binding "'+f+": "+g[f]+'"\nMessage: '+m.message,m;}})}return{shouldBindDescendants:s===n}}function k(b){return b&&b instanceof a.R?b:new a.R(b)}a.d={};var r={script:!0,textarea:!0,template:!0};a.getBindingHandler=function(b){return a.d[b]};a.R=function(b,c,d,e,k){function f(){var k=g?b():b,m=a.a.c(k);c?(c.Q&&c.Q(),a.a.extend(l,c),l.Q=r):(l.$parents=[],l.$root=m,l.ko=a);l.$rawData=
k;l.$data=m;d&&(l[d]=m);e&&e(l,c,m);return l.$data}function m(){return h&&!a.a.Tb(h)}var l=this,g="function"==typeof b&&!a.I(b),h,r;k&&k.exportDependencies?f():(r=a.B(f,null,{ya:m,i:!0}),r.ca()&&(l.Q=r,r.equalityComparer=null,h=[],r.Dc=function(b){h.push(b);a.a.G.qa(b,function(b){a.a.Na(h,b);h.length||(r.k(),l.Q=r=n)})}))};a.R.prototype.createChildContext=function(b,c,d,e){return new a.R(b,this,c,function(a,b){a.$parentContext=b;a.$parent=b.$data;a.$parents=(b.$parents||[]).slice(0);a.$parents.unshift(a.$parent);
d&&d(a)},e)};a.R.prototype.extend=function(b){return new a.R(this.Q||this.$data,this,null,function(c,d){c.$rawData=d.$rawData;a.a.extend(c,"function"==typeof b?b():b)})};a.R.prototype.ac=function(a,b){return this.createChildContext(a,b,null,{exportDependencies:!0})};var q=a.a.e.J(),p=a.a.e.J();a.xc=function(b,c){if(2==arguments.length)a.a.e.set(b,p,c),c.Q&&c.Q.Dc(b);else return a.a.e.get(b,p)};a.La=function(b,c,d){1===b.nodeType&&a.f.oc(b);return m(b,c,k(d),!0)};a.Ic=function(b,c,d){d=k(d);return a.La(b,
e(c,d,b),d)};a.hb=function(a,b){1!==b.nodeType&&8!==b.nodeType||g(k(a),b,!0)};a.Ub=function(a,b){!u&&x.jQuery&&(u=x.jQuery);if(b&&1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");b=b||x.document.body;h(k(a),b,!0)};a.nb=function(b){switch(b.nodeType){case 1:case 8:var c=a.xc(b);if(c)return c;if(b.parentNode)return a.nb(b.parentNode)}return n};a.Oc=function(b){return(b=a.nb(b))?b.$data:n};a.b("bindingHandlers",
a.d);a.b("applyBindings",a.Ub);a.b("applyBindingsToDescendants",a.hb);a.b("applyBindingAccessorsToNode",a.La);a.b("applyBindingsToNode",a.Ic);a.b("contextFor",a.nb);a.b("dataFor",a.Oc)})();(function(b){function c(c,e){var m=f.hasOwnProperty(c)?f[c]:b,k;m?m.Y(e):(m=f[c]=new a.K,m.Y(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,dd:e};delete f[c];k||e?m.notifySubscribers(b):a.Z.Za(function(){m.notifySubscribers(b)})}),k=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",
[a,c],function(a){b(a,c)}):b(null,null)})}function e(c,d,f,k){k||(k=a.g.loaders.slice(0));var g=k.shift();if(g){var q=g[c];if(q){var p=!1;if(q.apply(g,d.concat(function(a){p?f(null):null!==a?f(a):e(c,d,f,k)}))!==b&&(p=!0,!g.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else e(c,d,f,k)}else f(null)}var f={},g={};a.g={get:function(d,e){var f=g.hasOwnProperty(d)?g[d]:b;f?f.dd?a.l.w(function(){e(f.definition)}):
a.Z.Za(function(){e(f.definition)}):c(d,e)},$b:function(a){delete g[a]},Nb:e};a.g.loaders=[];a.b("components",a.g);a.b("components.get",a.g.get);a.b("components.clearCachedDefinition",a.g.$b)})();(function(){function b(b,c,d,e){function g(){0===--y&&e(h)}var h={},y=2,v=d.template;d=d.viewModel;v?f(c,v,function(c){a.g.Nb("loadTemplate",[b,c],function(a){h.template=a;g()})}):g();d?f(c,d,function(c){a.g.Nb("loadViewModel",[b,c],function(a){h[l]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)});
else if("function"===typeof b[l])d(b[l]);else if("instance"in b){var e=b.instance;d(function(){return e})}else"viewModel"in b?c(a,b.viewModel,d):a("Unknown viewModel value: "+b)}function d(b){switch(a.a.A(b)){case "script":return a.a.na(b.text);case "textarea":return a.a.na(b.value);case "template":if(e(b.content))return a.a.wa(b.content.childNodes)}return a.a.wa(b.childNodes)}function e(a){return x.DocumentFragment?a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require?
O||x.require?(O||x.require)([b.require],c):a("Uses require, but no AMD loader is present"):c(b)}function g(a){return function(b){throw Error("Component '"+a+"': "+b);}}var h={};a.g.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.g.wb(b))throw Error("Component "+b+" is already registered");h[b]=c};a.g.wb=function(a){return h.hasOwnProperty(a)};a.g.ud=function(b){delete h[b];a.g.$b(b)};a.g.cc={getConfig:function(a,b){b(h.hasOwnProperty(a)?h[a]:null)},loadComponent:function(a,
c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if("string"===typeof c)f(a.a.na(c));else if(c instanceof Array)f(c);else if(e(c))f(a.a.W(c.childNodes));else if(c.element)if(c=c.element,x.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if("string"===typeof c){var l=t.getElementById(c);l?f(d(l)):b("Cannot find element with ID "+c)}else b("Unknown element type: "+c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(g(a),
b,d)}};var l="createViewModel";a.b("components.register",a.g.register);a.b("components.isRegistered",a.g.wb);a.b("components.unregister",a.g.ud);a.b("components.defaultLoader",a.g.cc);a.g.loaders.push(a.g.cc);a.g.Ec=h})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.Ea(f,function(c){return a.m(c,null,{i:b})}),g=a.a.Ea(f,function(c){var e=c.p();return c.ca()?a.m({read:function(){return a.a.c(c())},write:a.Da(e)&&
function(a){c()(a)},i:b}):e});g.hasOwnProperty("$raw")||(g.$raw=f);return g}return{$raw:{}}}a.g.getComponentNameForNode=function(b){var c=a.a.A(b);if(a.g.wb(c)&&(-1!=c.indexOf("-")||"[object HTMLUnknownElement]"==""+b||8>=a.a.C&&b.tagName===c))return c};a.g.Rb=function(c,e,f,g){if(1===e.nodeType){var h=a.g.getComponentNameForNode(e);if(h){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var l={name:h,params:b(e,f)};c.component=g?function(){return l}:
l}}return c};var c=new a.S;9>a.a.C&&(a.g.register=function(a){return function(b){t.createElement(b);return a.apply(this,arguments)}}(a.g.register),t.createDocumentFragment=function(b){return function(){var c=b(),f=a.g.Ec,g;for(g in f)f.hasOwnProperty(g)&&c.createElement(g);return c}}(t.createDocumentFragment))})();(function(b){function c(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.wa(c);a.f.fa(d,b)}function d(a,b,c,d){var e=a.createViewModel;return e?e.call(a,
d,{element:b,templateNodes:c}):d}var e=0;a.d.component={init:function(f,g,h,l,m){function k(){var a=r&&r.dispose;"function"===typeof a&&a.call(r);q=r=null}var r,q,p=a.a.W(a.f.childNodes(f));a.a.G.qa(f,k);a.m(function(){var l=a.a.c(g()),h,v;"string"===typeof l?h=l:(h=a.a.c(l.name),v=a.a.c(l.params));if(!h)throw Error("No component name specified");var n=q=++e;a.g.get(h,function(e){if(q===n){k();if(!e)throw Error("Unknown component '"+h+"'");c(h,e,f);var l=d(e,f,p,v);e=m.createChildContext(l,b,function(a){a.$component=
l;a.$componentTemplateNodes=p});r=l;a.hb(e,f)}})},null,{i:f});return{controlsDescendantBindings:!0}}};a.f.aa.component=!0})();var Q={"class":"className","for":"htmlFor"};a.d.attr={update:function(b,c){var d=a.a.c(c())||{};a.a.D(d,function(c,d){d=a.a.c(d);var g=!1===d||null===d||d===n;g&&b.removeAttribute(c);8>=a.a.C&&c in Q?(c=Q[c],g?b.removeAttribute(c):b[c]=d):g||b.setAttribute(c,d.toString());"name"===c&&a.a.vc(b,g?"":d.toString())})}};(function(){a.d.checked={after:["value","attr"],init:function(b,
c,d){function e(){var e=b.checked,f=p?g():e;if(!a.xa.Va()&&(!l||e)){var h=a.l.w(c);if(k){var m=r?h.p():h;q!==f?(e&&(a.a.ra(m,f,!0),a.a.ra(m,q,!1)),q=f):a.a.ra(m,f,e);r&&a.Da(h)&&h(m)}else a.h.Ga(h,d,"checked",f,!0)}}function f(){var d=a.a.c(c());b.checked=k?0<=a.a.o(d,g()):h?d:g()===d}var g=a.rc(function(){return d.has("checkedValue")?a.a.c(d.get("checkedValue")):d.has("value")?a.a.c(d.get("value")):b.value}),h="checkbox"==b.type,l="radio"==b.type;if(h||l){var m=c(),k=h&&a.a.c(m)instanceof Array,
r=!(k&&m.push&&m.splice),q=k?g():n,p=l||k;l&&!b.name&&a.d.uniqueName.init(b,function(){return!0});a.m(e,null,{i:b});a.a.q(b,"click",e);a.m(f,null,{i:b});m=n}}};a.h.ga.checked=!0;a.d.checkedValue={update:function(b,c){b.value=a.a.c(c())}}})();a.d.css={update:function(b,c){var d=a.a.c(c());null!==d&&"object"==typeof d?a.a.D(d,function(c,d){d=a.a.c(d);a.a.fb(b,c,d)}):(d=a.a.cb(String(d||"")),a.a.fb(b,b.__ko__cssValue,!1),b.__ko__cssValue=d,a.a.fb(b,d,!0))}};a.d.enable={update:function(b,c){var d=a.a.c(c());
d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.d.disable={update:function(b,c){a.d.enable.update(b,function(){return!a.a.c(c())})}};a.d.event={init:function(b,c,d,e,f){var g=c()||{};a.a.D(g,function(g){"string"==typeof g&&a.a.q(b,g,function(b){var m,k=c()[g];if(k){try{var r=a.a.W(arguments);e=f.$data;r.unshift(e);m=k.apply(e,r)}finally{!0!==m&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};
a.d.foreach={mc:function(b){return function(){var c=b(),d=a.a.Bb(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.X.vb};a.a.c(c);return{foreach:d.data,as:d.as,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.X.vb}}},init:function(b,c){return a.d.template.init(b,a.d.foreach.mc(c))},update:function(b,c,d,e,f){return a.d.template.update(b,a.d.foreach.mc(c),
d,e,f)}};a.h.va.foreach=!1;a.f.aa.foreach=!0;a.d.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var g;try{g=f.activeElement}catch(k){g=f.body}e=g===b}f=c();a.h.Ga(f,d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.q(b,"focus",f);a.a.q(b,"focusin",f);a.a.q(b,"blur",g);a.a.q(b,"focusout",g)},update:function(b,c){var d=!!a.a.c(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===
d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.l.w(a.a.Fa,null,[b,d?"focusin":"focusout"]))}};a.h.ga.hasfocus=!0;a.d.hasFocus=a.d.hasfocus;a.h.ga.hasFocus=!0;a.d.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.Eb(b,c())}};K("if");K("ifnot",!1,!0);K("with",!0,!1,function(a,c){return a.ac(c)});var L={};a.d.options={init:function(b){if("select"!==a.a.A(b))throw Error("options binding applies only to SELECT elements");for(;0<
b.length;)b.remove(0);return{controlsDescendantBindings:!0}},update:function(b,c,d){function e(){return a.a.Ma(b.options,function(a){return a.selected})}function f(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?a[b]:c}function g(c,e){if(A&&k)a.j.ja(b,a.a.c(d.get("value")),!0);else if(p.length){var f=0<=a.a.o(p,a.j.u(e[0]));a.a.wc(e[0],f);A&&!f&&a.l.w(a.a.Fa,null,[b,"change"])}}var h=b.multiple,l=0!=b.length&&h?b.scrollTop:null,m=a.a.c(c()),k=d.get("valueAllowUnset")&&d.has("value"),r=
d.get("optionsIncludeDestroyed");c={};var q,p=[];k||(h?p=a.a.ib(e(),a.j.u):0<=b.selectedIndex&&p.push(a.j.u(b.options[b.selectedIndex])));m&&("undefined"==typeof m.length&&(m=[m]),q=a.a.Ma(m,function(b){return r||b===n||null===b||!a.a.c(b._destroy)}),d.has("optionsCaption")&&(m=a.a.c(d.get("optionsCaption")),null!==m&&m!==n&&q.unshift(L)));var A=!1;c.beforeRemove=function(a){b.removeChild(a)};m=g;d.has("optionsAfterRender")&&"function"==typeof d.get("optionsAfterRender")&&(m=function(b,c){g(0,c);
a.l.w(d.get("optionsAfterRender"),null,[c[0],b!==L?b:n])});a.a.Db(b,q,function(c,e,g){g.length&&(p=!k&&g[0].selected?[a.j.u(g[0])]:[],A=!0);e=b.ownerDocument.createElement("option");c===L?(a.a.bb(e,d.get("optionsCaption")),a.j.ja(e,n)):(g=f(c,d.get("optionsValue"),c),a.j.ja(e,a.a.c(g)),c=f(c,d.get("optionsText"),g),a.a.bb(e,c));return[e]},c,m);a.l.w(function(){k?a.j.ja(b,a.a.c(d.get("value")),!0):(h?p.length&&e().length<p.length:p.length&&0<=b.selectedIndex?a.j.u(b.options[b.selectedIndex])!==p[0]:
p.length||0<=b.selectedIndex)&&a.a.Fa(b,"change")});a.a.Sc(b);l&&20<Math.abs(l-b.scrollTop)&&(b.scrollTop=l)}};a.d.options.zb=a.a.e.J();a.d.selectedOptions={after:["options","foreach"],init:function(b,c,d){a.a.q(b,"change",function(){var e=c(),f=[];a.a.r(b.getElementsByTagName("option"),function(b){b.selected&&f.push(a.j.u(b))});a.h.Ga(e,d,"selectedOptions",f)})},update:function(b,c){if("select"!=a.a.A(b))throw Error("values binding applies only to SELECT elements");var d=a.a.c(c()),e=b.scrollTop;
d&&"number"==typeof d.length&&a.a.r(b.getElementsByTagName("option"),function(b){var c=0<=a.a.o(d,a.j.u(b));b.selected!=c&&a.a.wc(b,c)});b.scrollTop=e}};a.h.ga.selectedOptions=!0;a.d.style={update:function(b,c){var d=a.a.c(c()||{});a.a.D(d,function(c,d){d=a.a.c(d);if(null===d||d===n||!1===d)d="";b.style[c]=d})}};a.d.submit={init:function(b,c,d,e,f){if("function"!=typeof c())throw Error("The value for a submit binding must be a function");a.a.q(b,"submit",function(a){var d,e=c();try{d=e.call(f.$data,
b)}finally{!0!==d&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}})}};a.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.bb(b,c())}};a.f.aa.text=!0;(function(){if(x&&x.navigator)var b=function(a){if(a)return parseFloat(a[1])},c=x.opera&&x.opera.version&&parseInt(x.opera.version()),d=x.navigator.userAgent,e=b(d.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),f=b(d.match(/Firefox\/([^ ]*)/));if(10>a.a.C)var g=a.a.e.J(),h=a.a.e.J(),l=function(b){var c=
this.activeElement;(c=c&&a.a.e.get(c,h))&&c(b)},m=function(b,c){var d=b.ownerDocument;a.a.e.get(d,g)||(a.a.e.set(d,g,!0),a.a.q(d,"selectionchange",l));a.a.e.set(b,h,c)};a.d.textInput={init:function(b,d,g){function l(c,d){a.a.q(b,c,d)}function h(){var c=a.a.c(d());if(null===c||c===n)c="";u!==n&&c===u?a.a.setTimeout(h,4):b.value!==c&&(s=c,b.value=c)}function y(){t||(u=b.value,t=a.a.setTimeout(v,4))}function v(){clearTimeout(t);u=t=n;var c=b.value;s!==c&&(s=c,a.h.Ga(d(),g,"textInput",c))}var s=b.value,
t,u,x=9==a.a.C?y:v;10>a.a.C?(l("propertychange",function(a){"value"===a.propertyName&&x(a)}),8==a.a.C&&(l("keyup",v),l("keydown",v)),8<=a.a.C&&(m(b,x),l("dragend",y))):(l("input",v),5>e&&"textarea"===a.a.A(b)?(l("keydown",y),l("paste",y),l("cut",y)):11>c?l("keydown",y):4>f&&(l("DOMAutoComplete",v),l("dragdrop",v),l("drop",v)));l("change",v);a.m(h,null,{i:b})}};a.h.ga.textInput=!0;a.d.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.d.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+
++a.d.uniqueName.Nc;a.a.vc(b,d)}}};a.d.uniqueName.Nc=0;a.d.value={after:["options","foreach"],init:function(b,c,d){if("input"!=b.tagName.toLowerCase()||"checkbox"!=b.type&&"radio"!=b.type){var e=["change"],f=d.get("valueUpdate"),g=!1,h=null;f&&("string"==typeof f&&(f=[f]),a.a.ta(e,f),e=a.a.Wb(e));var l=function(){h=null;g=!1;var e=c(),f=a.j.u(b);a.h.Ga(e,d,"value",f)};!a.a.C||"input"!=b.tagName.toLowerCase()||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.o(e,"propertychange")||
(a.a.q(b,"propertychange",function(){g=!0}),a.a.q(b,"focus",function(){g=!1}),a.a.q(b,"blur",function(){g&&l()}));a.a.r(e,function(c){var d=l;a.a.sd(c,"after")&&(d=function(){h=a.j.u(b);a.a.setTimeout(l,0)},c=c.substring(5));a.a.q(b,c,d)});var m=function(){var e=a.a.c(c()),f=a.j.u(b);if(null!==h&&e===h)a.a.setTimeout(m,0);else if(e!==f)if("select"===a.a.A(b)){var g=d.get("valueAllowUnset"),f=function(){a.j.ja(b,e,g)};f();g||e===a.j.u(b)?a.a.setTimeout(f,0):a.l.w(a.a.Fa,null,[b,"change"])}else a.j.ja(b,
e)};a.m(m,null,{i:b})}else a.La(b,{checkedValue:c})},update:function(){}};a.h.ga.value=!0;a.d.visible={update:function(b,c){var d=a.a.c(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};(function(b){a.d[b]={init:function(c,d,e,f,g){return a.d.event.init.call(this,c,function(){var a={};a[b]=d();return a},e,f,g)}}})("click");a.P=function(){};a.P.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};a.P.prototype.createJavaScriptEvaluatorBlock=
function(){throw Error("Override createJavaScriptEvaluatorBlock");};a.P.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||t;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.v.n(d)}if(1==b.nodeType||8==b.nodeType)return new a.v.sa(b);throw Error("Unknown template type: "+b);};a.P.prototype.renderTemplate=function(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,c,d,e)};a.P.prototype.isTemplateRewritten=function(a,
c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.P.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.P);a.Ib=function(){function b(b,c,d,h){b=a.h.Ab(b);for(var l=a.h.va,m=0;m<b.length;m++){var k=b[m].key;if(l.hasOwnProperty(k)){var r=l[k];if("function"===typeof r){if(k=r(b[m].value))throw Error(k);}else if(!r)throw Error("This template engine does not support the '"+
k+"' binding within its templates");}}d="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+a.h.Xa(b,{valueAccessors:!0})+" } })()},'"+d.toLowerCase()+"')";return h.createJavaScriptEvaluatorBlock(d)+c}var c=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Tc:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.Ib.jd(b,
c)},d)},jd:function(a,f){return a.replace(c,function(a,c,d,e,k){return b(k,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",f)})},Jc:function(b,c){return a.N.yb(function(d,h){var l=d.nextSibling;l&&l.nodeName.toLowerCase()===c&&a.La(l,b,h)})}}}();a.b("__tr_ambtns",a.Ib.Jc);(function(){a.v={};a.v.n=function(b){if(this.n=b){var c=a.a.A(b);this.eb="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.v.n.prototype.text=function(){var b=1===
this.eb?"text":2===this.eb?"value":"innerHTML";if(0==arguments.length)return this.n[b];var c=arguments[0];"innerHTML"===b?a.a.Eb(this.n,c):this.n[b]=c};var b=a.a.e.J()+"_";a.v.n.prototype.data=function(c){if(1===arguments.length)return a.a.e.get(this.n,b+c);a.a.e.set(this.n,b+c,arguments[1])};var c=a.a.e.J();a.v.n.prototype.nodes=function(){var b=this.n;if(0==arguments.length)return(a.a.e.get(b,c)||{}).mb||(3===this.eb?b.content:4===this.eb?b:n);a.a.e.set(b,c,{mb:arguments[0]})};a.v.sa=function(a){this.n=
a};a.v.sa.prototype=new a.v.n;a.v.sa.prototype.text=function(){if(0==arguments.length){var b=a.a.e.get(this.n,c)||{};b.Jb===n&&b.mb&&(b.Jb=b.mb.innerHTML);return b.Jb}a.a.e.set(this.n,c,{Jb:arguments[0]})};a.b("templateSources",a.v);a.b("templateSources.domElement",a.v.n);a.b("templateSources.anonymousTemplate",a.v.sa)})();(function(){function b(b,c,d){var e;for(c=a.f.nextSibling(c);b&&(e=b)!==c;)b=a.f.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,h=
a.S.instance,n=h.preprocessNode;if(n){b(e,f,function(a,b){var c=a.previousSibling,d=n.call(h,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.Ba(c,g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.Ub(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.N.Cc(b,[d])});a.a.Ba(c,g)}}function d(a){return a.nodeType?a:0<a.length?a[0]:null}function e(b,e,f,h,q){q=q||{};var p=(b&&d(b)||f||{}).ownerDocument,n=q.templateEngine||g;
a.Ib.Tc(f,n,p);f=n.renderTemplate(f,h,q,p);if("number"!=typeof f.length||0<f.length&&"number"!=typeof f[0].nodeType)throw Error("Template engine must return an array of DOM nodes");p=!1;switch(e){case "replaceChildren":a.f.fa(b,f);p=!0;break;case "replaceNode":a.a.uc(b,f);p=!0;break;case "ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+e);}p&&(c(f,h),q.afterRender&&a.l.w(q.afterRender,null,[f,h.$data]));return f}function f(b,c,d){return a.I(b)?b():"function"===typeof b?b(c,d):b}
var g;a.Fb=function(b){if(b!=n&&!(b instanceof a.P))throw Error("templateEngine must inherit from ko.templateEngine");g=b};a.Cb=function(b,c,k,h,q){k=k||{};if((k.templateEngine||g)==n)throw Error("Set a template engine before calling renderTemplate");q=q||"replaceChildren";if(h){var p=d(h);return a.B(function(){var g=c&&c instanceof a.R?c:new a.R(c,null,null,null,{exportDependencies:!0}),n=f(b,g.$data,g),g=e(h,q,n,g,k);"replaceNode"==q&&(h=g,p=d(h))},null,{ya:function(){return!p||!a.a.qb(p)},i:p&&
"replaceNode"==q?p.parentNode:p})}return a.N.yb(function(d){a.Cb(b,c,k,d,"replaceNode")})};a.pd=function(b,d,g,h,q){function p(a,b){c(b,t);g.afterRender&&g.afterRender(b,a);t=null}function s(a,c){t=q.createChildContext(a,g.as,function(a){a.$index=c});var d=f(b,a,t);return e(null,"ignoreTargetNode",d,t,g)}var t;return a.B(function(){var b=a.a.c(d)||[];"undefined"==typeof b.length&&(b=[b]);b=a.a.Ma(b,function(b){return g.includeDestroyed||b===n||null===b||!a.a.c(b._destroy)});a.l.w(a.a.Db,null,[h,b,
s,g,p])},null,{i:h})};var h=a.a.e.J();a.d.template={init:function(b,c){var d=a.a.c(c());if("string"==typeof d||d.name)a.f.za(b);else{if("nodes"in d){if(d=d.nodes||[],a.I(d))throw Error('The "nodes" option must be a plain, non-observable array.');}else d=a.f.childNodes(b);d=a.a.nc(d);(new a.v.sa(b)).nodes(d)}return{controlsDescendantBindings:!0}},update:function(b,c,d,e,f){var g=c();c=a.a.c(g);d=!0;e=null;"string"==typeof c?c={}:(g=c.name,"if"in c&&(d=a.a.c(c["if"])),d&&"ifnot"in c&&(d=!a.a.c(c.ifnot)));
"foreach"in c?e=a.pd(g||b,d&&c.foreach||[],c,b,f):d?(f="data"in c?f.ac(c.data,c.as):f,e=a.Cb(g||b,f,c,b)):a.f.za(b);f=e;(c=a.a.e.get(b,h))&&"function"==typeof c.k&&c.k();a.a.e.set(b,h,f&&f.ca()?f:n)}};a.h.va.template=function(b){b=a.h.Ab(b);return 1==b.length&&b[0].unknown||a.h.fd(b,"name")?null:"This template engine does not support anonymous templates nested within its templates"};a.f.aa.template=!0})();a.b("setTemplateEngine",a.Fb);a.b("renderTemplate",a.Cb);a.a.hc=function(a,c,d){if(a.length&&
c.length){var e,f,g,h,l;for(e=f=0;(!d||e<d)&&(h=a[f]);++f){for(g=0;l=c[g];++g)if(h.value===l.value){h.moved=l.index;l.moved=h.index;c.splice(g,1);e=g=0;break}e+=g}}};a.a.lb=function(){function b(b,d,e,f,g){var h=Math.min,l=Math.max,m=[],k,n=b.length,q,p=d.length,s=p-n||1,t=n+p+1,v,u,x;for(k=0;k<=n;k++)for(u=v,m.push(v=[]),x=h(p,k+s),q=l(0,k-1);q<=x;q++)v[q]=q?k?b[k-1]===d[q-1]?u[q-1]:h(u[q]||t,v[q-1]||t)+1:q+1:k+1;h=[];l=[];s=[];k=n;for(q=p;k||q;)p=m[k][q]-1,q&&p===m[k][q-1]?l.push(h[h.length]={status:e,
value:d[--q],index:q}):k&&p===m[k-1][q]?s.push(h[h.length]={status:f,value:b[--k],index:k}):(--q,--k,g.sparse||h.push({status:"retained",value:d[q]}));a.a.hc(s,l,!g.dontLimitMoves&&10*n);return h.reverse()}return function(a,d,e){e="boolean"===typeof e?{dontLimitMoves:e}:e||{};a=a||[];d=d||[];return a.length<d.length?b(a,d,"added","deleted",e):b(d,a,"deleted","added",e)}}();a.b("utils.compareArrays",a.a.lb);(function(){function b(b,c,d,h,l){var m=[],k=a.B(function(){var k=c(d,l,a.a.Ba(m,b))||[];0<
m.length&&(a.a.uc(m,k),h&&a.l.w(h,null,[d,k,l]));m.length=0;a.a.ta(m,k)},null,{i:b,ya:function(){return!a.a.Tb(m)}});return{ea:m,B:k.ca()?k:n}}var c=a.a.e.J(),d=a.a.e.J();a.a.Db=function(e,f,g,h,l){function m(b,c){w=q[c];u!==c&&(D[b]=w);w.tb(u++);a.a.Ba(w.ea,e);t.push(w);z.push(w)}function k(b,c){if(b)for(var d=0,e=c.length;d<e;d++)c[d]&&a.a.r(c[d].ea,function(a){b(a,d,c[d].ka)})}f=f||[];h=h||{};var r=a.a.e.get(e,c)===n,q=a.a.e.get(e,c)||[],p=a.a.ib(q,function(a){return a.ka}),s=a.a.lb(p,f,h.dontLimitMoves),
t=[],v=0,u=0,x=[],z=[];f=[];for(var D=[],p=[],w,C=0,B,E;B=s[C];C++)switch(E=B.moved,B.status){case "deleted":E===n&&(w=q[v],w.B&&(w.B.k(),w.B=n),a.a.Ba(w.ea,e).length&&(h.beforeRemove&&(t.push(w),z.push(w),w.ka===d?w=null:f[C]=w),w&&x.push.apply(x,w.ea)));v++;break;case "retained":m(C,v++);break;case "added":E!==n?m(C,E):(w={ka:B.value,tb:a.O(u++)},t.push(w),z.push(w),r||(p[C]=w))}a.a.e.set(e,c,t);k(h.beforeMove,D);a.a.r(x,h.beforeRemove?a.ba:a.removeNode);for(var C=0,r=a.f.firstChild(e),F;w=z[C];C++){w.ea||
a.a.extend(w,b(e,g,w.ka,l,w.tb));for(v=0;s=w.ea[v];r=s.nextSibling,F=s,v++)s!==r&&a.f.kc(e,s,F);!w.ad&&l&&(l(w.ka,w.ea,w.tb),w.ad=!0)}k(h.beforeRemove,f);for(C=0;C<f.length;++C)f[C]&&(f[C].ka=d);k(h.afterMove,D);k(h.afterAdd,p)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Db);a.X=function(){this.allowTemplateRewriting=!1};a.X.prototype=new a.P;a.X.prototype.renderTemplateSource=function(b,c,d,e){if(c=(9>a.a.C?0:b.nodes)?b.nodes():null)return a.a.W(c.cloneNode(!0).childNodes);b=b.text();
return a.a.na(b,e)};a.X.vb=new a.X;a.Fb(a.X.vb);a.b("nativeTemplateEngine",a.X);(function(){a.xb=function(){var a=this.ed=function(){if(!u||!u.tmpl)return 0;try{if(0<=u.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f,g){g=g||t;f=f||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var h=b.data("precompiled");h||(h=b.text()||"",h=u.template(null,"{{ko_with $item.koBindingContext}}"+
h+"{{/ko_with}}"),b.data("precompiled",h));b=[e.$data];e=u.extend({koBindingContext:e},f.templateOptions);e=u.tmpl(h,b,e);e.appendTo(g.createElement("div"));u.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){t.write("<script type='text/html' id='"+a+"'>"+b+"\x3c/script>")};0<a&&(u.tmpl.tag.ko_code={open:"__.push($1 || '');"},u.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};a.xb.prototype=
new a.P;var b=new a.xb;0<b.ed&&a.Fb(b);a.b("jqueryTmplTemplateEngine",a.xb)})()})})();})();
;
(function (a) { if (typeof require === "function" && typeof exports === "object" && typeof module === "object") { a(require("knockout"), exports) } else { if (typeof define === "function" && define.amd) { define(["knockout", "exports"], a) } else { a(ko, ko.mapping = {}) } } }(function (b, B) { var d = true; var n = "__ko_mapping__"; var i = b.dependentObservable; var q = 0; var m; var v; var a = ["create", "update", "key", "arrayChanged"]; var r = {}; var h = { include: ["_destroy"], ignore: [], copy: [], observe: [] }; var w = h; function o(C, H) { var G = {}; for (var F = C.length - 1; F >= 0; --F) { G[C[F]] = C[F] } for (var F = H.length - 1; F >= 0; --F) { G[H[F]] = H[F] } var E = []; for (var D in G) { E.push(G[D]) } return E } function p(C, F) { var G; for (var D in F) { if (F.hasOwnProperty(D) && F[D]) { G = B.getType(C[D]); if (D && C[D] && G !== "array" && G !== "string") { p(C[D], F[D]) } else { var E = B.getType(C[D]) === "array" && B.getType(F[D]) === "array"; if (E) { C[D] = o(C[D], F[D]) } else { C[D] = F[D] } } } } } function g(E, D) { var C = {}; p(C, E); p(C, D); return C } B.isMapped = function (D) { var C = b.utils.unwrapObservable(D); return C && C[n] }; B.fromJS = function (D) { if (arguments.length == 0) { throw new Error("When calling ko.fromJS, pass the object you want to convert.") } try { if (!q++) { m = []; v = new c() } var F; var H; if (arguments.length == 2) { if (arguments[1][n]) { H = arguments[1] } else { F = arguments[1] } } if (arguments.length == 3) { F = arguments[1]; H = arguments[2] } if (H) { F = g(F, H[n]) } F = s(F); var C = x(H, D, F); if (H) { C = H } if (!--q) { while (m.length) { var E = m.pop(); if (E) { E(); E.__DO.throttleEvaluation = E.throttleEvaluation } } } C[n] = g(C[n], F); return C } catch (G) { q = 0; throw G } }; B.fromJSON = function (D) { var C = b.utils.parseJson(D); arguments[0] = C; return B.fromJS.apply(this, arguments) }; B.updateFromJS = function (C) { throw new Error("ko.mapping.updateFromJS, use ko.mapping.fromJS instead. Please note that the order of parameters is different!") }; B.updateFromJSON = function (C) { throw new Error("ko.mapping.updateFromJSON, use ko.mapping.fromJSON instead. Please note that the order of parameters is different!") }; B.toJS = function (D, C) { if (!w) { B.resetDefaultOptions() } if (arguments.length == 0) { throw new Error("When calling ko.mapping.toJS, pass the object you want to convert.") } if (B.getType(w.ignore) !== "array") { throw new Error("ko.mapping.defaultOptions().ignore should be an array.") } if (B.getType(w.include) !== "array") { throw new Error("ko.mapping.defaultOptions().include should be an array.") } if (B.getType(w.copy) !== "array") { throw new Error("ko.mapping.defaultOptions().copy should be an array.") } C = s(C, D[n]); return B.visitModel(D, function (E) { return b.utils.unwrapObservable(E) }, C) }; B.toJSON = function (E, C) { var D = B.toJS(E, C); return b.utils.stringifyJson(D) }; B.defaultOptions = function () { if (arguments.length > 0) { w = arguments[0] } else { return w } }; B.resetDefaultOptions = function () { w = { include: h.include.slice(0), ignore: h.ignore.slice(0), copy: h.copy.slice(0) } }; B.getType = function (C) { if ((C) && (typeof (C) === "object")) { if (C.constructor === Date) { return "date" } if (C.constructor === Array) { return "array" } } return typeof C }; function s(F, C) { var D = g({}, F); for (var E = a.length - 1; E >= 0; E--) { var G = a[E]; if (!D[G]) { continue } if (!(D[""] instanceof Object)) { D[""] = {} } D[""][G] = D[G]; delete D[G] } if (C) { D.ignore = k(C.ignore, D.ignore); D.include = k(C.include, D.include); D.copy = k(C.copy, D.copy); D.observe = k(C.observe, D.observe) } D.ignore = k(D.ignore, w.ignore); D.include = k(D.include, w.include); D.copy = k(D.copy, w.copy); D.observe = k(D.observe, w.observe); D.mappedProperties = D.mappedProperties || {}; D.copiedProperties = D.copiedProperties || {}; return D } function k(D, C) { if (B.getType(D) !== "array") { if (B.getType(D) === "undefined") { D = [] } else { D = [D] } } if (B.getType(C) !== "array") { if (B.getType(C) === "undefined") { C = [] } else { C = [C] } } return b.utils.arrayGetDistinctValues(D.concat(C)) } function f(D, F) { var E = b.dependentObservable; b.dependentObservable = function (M, G, J) { J = J || {}; if (M && typeof M == "object") { J = M } var I = J.deferEvaluation; var H = false; var L = function (N) { var P = b.dependentObservable; b.dependentObservable = i; var Q = b.isWriteableObservable(N); b.dependentObservable = P; var O = i({ read: function () { if (!H) { b.utils.arrayRemoveItem(D, N); H = true } return N.apply(N, arguments) }, write: Q && function (R) { return N(R) }, deferEvaluation: true }); if (d) { O._wrapper = true } O.__DO = N; return O }; J.deferEvaluation = true; var K = new i(M, G, J); if (!I) { K = L(K); D.push(K) } return K }; b.dependentObservable.fn = i.fn; b.computed = b.dependentObservable; var C = F(); b.dependentObservable = E; b.computed = b.dependentObservable; return C } function x(ai, E, T, aj, H, C, al) { var S = B.getType(b.utils.unwrapObservable(E)) === "array"; C = C || ""; if (B.isMapped(ai)) { var G = b.utils.unwrapObservable(ai)[n]; T = g(G, T) } var ae = { data: E, parent: al || H }; var R = function () { return T[aj] && T[aj].create instanceof Function }; var J = function (an) { return f(m, function () { if (b.utils.unwrapObservable(H) instanceof Array) { return T[aj].create({ data: an || ae.data, parent: ae.parent, skip: r }) } else { return T[aj].create({ data: an || ae.data, parent: ae.parent }) } }) }; var aa = function () { return T[aj] && T[aj].update instanceof Function }; var P = function (ao, an) { var ap = { data: an || ae.data, parent: ae.parent, target: b.utils.unwrapObservable(ao) }; if (b.isWriteableObservable(ao)) { ap.observable = ao } return T[aj].update(ap) }; var Y = v.get(E); if (Y) { return Y } aj = aj || ""; if (!S) { if (!t(E)) { switch (B.getType(E)) { case "function": if (aa()) { if (b.isWriteableObservable(E)) { E(P(E)); ai = E } else { ai = P(E) } } else { ai = E } break; default: if (b.isWriteableObservable(ai)) { if (aa()) { var V = P(ai); ai(V); return V } else { var V = b.utils.unwrapObservable(E); ai(V); return V } } else { var ab = R() || aa(); if (R()) { ai = J() } else { ai = b.observable(b.utils.unwrapObservable(E)) } if (aa()) { ai(P(ai)) } if (ab) { return ai } } } } else { ai = b.utils.unwrapObservable(ai); if (!ai) { if (R()) { var N = J(); if (aa()) { N = P(N) } return N } else { if (aa()) { return P(N) } ai = {} } } if (aa()) { ai = P(ai) } v.save(E, ai); if (aa()) { return ai } z(E, function (ao) { var ar = C.length ? C + "." + ao : ao; if (b.utils.arrayIndexOf(T.ignore, ar) != -1) { return } if (b.utils.arrayIndexOf(T.copy, ar) != -1) { ai[ao] = E[ao]; return } if (typeof E[ao] != "object" && typeof E[ao] != "array" && T.observe.length > 0 && b.utils.arrayIndexOf(T.observe, ar) == -1) { ai[ao] = E[ao]; T.copiedProperties[ar] = true; return } var aq = v.get(E[ao]); var an = x(ai[ao], E[ao], T, ao, ai, ar, ai); var ap = aq || an; if (T.observe.length > 0 && b.utils.arrayIndexOf(T.observe, ar) == -1) { ai[ao] = ap(); T.copiedProperties[ar] = true; return } if (b.isWriteableObservable(ai[ao])) { ap = b.utils.unwrapObservable(ap); if (ai[ao]() !== ap) { ai[ao](ap) } } else { ap = ai[ao] === undefined ? ap : b.utils.unwrapObservable(ap); ai[ao] = ap } T.mappedProperties[ar] = true }) } } else { var O = []; var L = false; var U = function (an) { return an }; if (T[aj] && T[aj].key) { U = T[aj].key; L = true } if (!b.isObservable(ai)) { ai = b.observableArray([]); ai.mappedRemove = function (ao) { var an = typeof ao == "function" ? ao : function (ap) { return ap === U(ao) }; return ai.remove(function (ap) { return an(U(ap)) }) }; ai.mappedRemoveAll = function (ao) { var an = u(ao, U); return ai.remove(function (ap) { return b.utils.arrayIndexOf(an, U(ap)) != -1 }) }; ai.mappedDestroy = function (ao) { var an = typeof ao == "function" ? ao : function (ap) { return ap === U(ao) }; return ai.destroy(function (ap) { return an(U(ap)) }) }; ai.mappedDestroyAll = function (ao) { var an = u(ao, U); return ai.destroy(function (ap) { return b.utils.arrayIndexOf(an, U(ap)) != -1 }) }; ai.mappedIndexOf = function (ap) { var ao = u(ai(), U); var an = U(ap); return b.utils.arrayIndexOf(ao, an) }; ai.mappedGet = function (an) { return ai()[ai.mappedIndexOf(an)] }; ai.mappedCreate = function (ao) { if (ai.mappedIndexOf(ao) !== -1) { throw new Error("There already is an object with the key that you specified.") } var an = R() ? J(ao) : ao; if (aa()) { var ap = P(an, ao); if (b.isWriteableObservable(an)) { an(ap) } else { an = ap } } ai.push(an); return an } } var W = u(b.utils.unwrapObservable(ai), U).sort(); var K = u(E, U); if (L) { K.sort() } var ac = b.utils.compareArrays(W, K); var am = {}; var ah, ag; var F = b.utils.unwrapObservable(E); var Q = {}; var ad = true; for (ah = 0, ag = F.length; ah < ag; ah++) { var M = U(F[ah]); if (M === undefined || M instanceof Object) { ad = false; break } Q[M] = F[ah] } var ak = []; var I = 0; for (ah = 0, ag = ac.length; ah < ag; ah++) { var M = ac[ah]; var D; var af = C + "[" + ah + "]"; switch (M.status) { case "added": var X = ad ? Q[M.value] : l(b.utils.unwrapObservable(E), M.value, U); D = x(undefined, X, T, aj, ai, af, H); if (!R()) { D = b.utils.unwrapObservable(D) } var Z = y(b.utils.unwrapObservable(E), X, am); if (D === r) { I++ } else { ak[Z - I] = D } am[Z] = true; break; case "retained": var X = ad ? Q[M.value] : l(b.utils.unwrapObservable(E), M.value, U); D = l(ai, M.value, U); x(D, X, T, aj, ai, af, H); var Z = y(b.utils.unwrapObservable(E), X, am); ak[Z] = D; am[Z] = true; break; case "deleted": D = l(ai, M.value, U); break } O.push({ event: M.status, item: D }) } ai(ak); if (T[aj] && T[aj].arrayChanged) { b.utils.arrayForEach(O, function (an) { T[aj].arrayChanged(an.event, an.item) }) } } return ai } function y(G, F, E) { for (var D = 0, C = G.length; D < C; D++) { if (E[D] === true) { continue } if (G[D] === F) { return D } } return null } function e(C, E) { var D; if (E) { D = E(C) } if (B.getType(D) === "undefined") { D = C } return b.utils.unwrapObservable(D) } function l(H, E, G) { H = b.utils.unwrapObservable(H); for (var D = 0, C = H.length; D < C; D++) { var F = H[D]; if (e(F, G) === E) { return F } } throw new Error("When calling ko.update*, the key '" + E + "' was not found!") } function u(D, C) { return b.utils.arrayMap(b.utils.unwrapObservable(D), function (E) { if (C) { return e(E, C) } else { return E } }) } function z(E, F) { if (B.getType(E) === "array") { for (var D = 0; D < E.length; D++) { F(D) } } else { for (var C in E) { F(C) } } } function t(C) { var D = B.getType(C); return ((D === "object") || (D === "array")) && (C !== null) } function j(F, E, D) { var C = F || ""; if (B.getType(E) === "array") { if (F) { C += "[" + D + "]" } } else { if (F) { C += "." } C += D } return C } B.visitModel = function (F, H, D) { D = D || {}; D.visitedObjects = D.visitedObjects || new c(); var G; var C = b.utils.unwrapObservable(F); if (!t(C)) { return H(F, D.parentName) } else { D = s(D, C[n]); H(F, D.parentName); G = B.getType(C) === "array" ? [] : {} } D.visitedObjects.save(F, G); var E = D.parentName; z(C, function (K) { if (D.ignore && b.utils.arrayIndexOf(D.ignore, K) != -1) { return } var I = C[K]; D.parentName = j(E, C, K); if (b.utils.arrayIndexOf(D.copy, K) === -1) { if (b.utils.arrayIndexOf(D.include, K) === -1) { if (C[n] && C[n].mappedProperties && !C[n].mappedProperties[K] && C[n].copiedProperties && !C[n].copiedProperties[K] && !(B.getType(C) === "array")) { return } } } var J; switch (B.getType(b.utils.unwrapObservable(I))) { case "object": case "array": case "undefined": var L = D.visitedObjects.get(I); G[K] = (B.getType(L) !== "undefined") ? L : B.visitModel(I, H, D); break; default: G[K] = H(I, D.parentName) } }); return G }; function A() { var D = []; var C = []; this.save = function (F, G) { var E = b.utils.arrayIndexOf(D, F); if (E >= 0) { C[E] = G } else { D.push(F); C.push(G) } }; this.get = function (F) { var E = b.utils.arrayIndexOf(D, F); var G = (E >= 0) ? C[E] : undefined; return G } } function c() { var C = {}; var D = function (F) { var E; try { E = F } catch (G) { E = "$$$" } var H = C[E]; if (H === undefined) { H = new A(); C[E] = H } return H }; this.save = function (E, F) { D(E).save(E, F) }; this.get = function (E) { return D(E).get(E) } } }));;
// ==================================================
// fancyBox v3.1.24
//
// Licensed GPLv3 for open source use
// or fancyBox Commercial License for commercial use
//
// http://fancyapps.com/fancybox/
// Copyright 2017 fancyApps
//
// ==================================================
!function(t,e,n,o){"use strict";function i(t){var e=t.currentTarget,o=t.data?t.data.options:{},i=o.selector?n(o.selector):t.data?t.data.items:[],a=n(e).attr("data-fancybox")||"",s=0,r=n.fancybox.getInstance();t.preventDefault(),t.stopPropagation(),r&&r.current.opts.$orig.is(e)||(a?(i=i.length?i.filter('[data-fancybox="'+a+'"]'):n('[data-fancybox="'+a+'"]'),s=i.index(e),s<0&&(s=0)):i=[e],n.fancybox.open(i,o,s))}if(n){if(n.fn.fancybox)return void n.error("fancyBox already initialized");var a={loop:!1,margin:[44,0],gutter:50,keyboard:!0,arrows:!0,infobar:!1,toolbar:!0,buttons:["slideShow","fullScreen","thumbs","close"],idleTime:4,smallBtn:"auto",protect:!1,modal:!1,image:{preload:"auto"},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allowtransparency="true" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><button data-fancybox-prev title="{{PREV}}" class="fancybox-button fancybox-button--left"></button><div class="fancybox-infobar__body"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><button data-fancybox-next title="{{NEXT}}" class="fancybox-button fancybox-button--right"></button></div><div class="fancybox-toolbar">{{BUTTONS}}</div><div class="fancybox-navigation"><button data-fancybox-prev title="{{PREV}}" class="fancybox-arrow fancybox-arrow--left" /><button data-fancybox-next title="{{NEXT}}" class="fancybox-arrow fancybox-arrow--right" /></div><div class="fancybox-stage"></div><div class="fancybox-caption-wrap"><div class="fancybox-caption"></div></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}<p></div>',btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"></button>',fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fullscreen" title="{{FULL_SCREEN}}"></button>',thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"></button>',smallBtn:'<button data-fancybox-close class="fancybox-close-small" title="{{CLOSE}}"></button>'},parentEl:"body",autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:4e3},thumbs:{autoStart:!1,hideOnClose:!0},onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails"},de:{CLOSE:"Schliessen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},u=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),d=function(){var t,n=e.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in i)if(n.style[t]!==o)return i[t]}(),f=function(t){return t&&t.length&&t[0].offsetHeight},h=function(t,o,i){var s=this;s.opts=n.extend(!0,{index:i},a,o||{}),o&&n.isArray(o.buttons)&&(s.opts.buttons=o.buttons),s.id=s.opts.id||++c,s.group=[],s.currIndex=parseInt(s.opts.index,10)||0,s.prevIndex=null,s.prevPos=null,s.currPos=0,s.firstRun=null,s.createGroup(t),s.group.length&&(s.$lastFocus=n(e.activeElement).blur(),s.slides={},s.init(t))};n.extend(h.prototype,{init:function(){var t,e,o,i=this,a=i.group[i.currIndex].opts;i.scrollTop=r.scrollTop(),i.scrollLeft=r.scrollLeft(),n.fancybox.getInstance()||n.fancybox.isMobile||"hidden"===n("body").css("overflow")||(t=n("body").width(),n("html").addClass("fancybox-enabled"),t=n("body").width()-t,t>1&&n("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar, .fancybox-enabled body { margin-right: '+t+"px; }</style>")),o="",n.each(a.buttons,function(t,e){o+=a.btnTpl[e]||""}),e=n(i.translate(i,a.baseTpl.replace("{{BUTTONS}}",o))).addClass("fancybox-is-hidden").attr("id","fancybox-container-"+i.id).addClass(a.baseClass).data("FancyBox",i).prependTo(a.parentEl),i.$refs={container:e},["bg","inner","infobar","toolbar","stage","caption"].forEach(function(t){i.$refs[t]=e.find(".fancybox-"+t)}),(!a.arrows||i.group.length<2)&&e.find(".fancybox-navigation").remove(),a.infobar||i.$refs.infobar.remove(),a.toolbar||i.$refs.toolbar.remove(),i.trigger("onInit"),i.activate(),i.jumpTo(i.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang];return e.replace(/\{\{(\w+)\}\}/g,function(t,e){var i=n[e];return i===o?t:i})},createGroup:function(t){var e=this,i=n.makeArray(t);n.each(i,function(t,i){var a,s,r,c,l={},u={},d=[];n.isPlainObject(i)?(l=i,u=i.opts||i):"object"===n.type(i)&&n(i).length?(a=n(i),d=a.data(),u="options"in d?d.options:{},u="object"===n.type(u)?u:{},l.src="src"in d?d.src:u.src||a.attr("href"),["width","height","thumb","type","filter"].forEach(function(t){t in d&&(u[t]=d[t])}),"srcset"in d&&(u.image={srcset:d.srcset}),u.$orig=a,l.type||l.src||(l.type="inline",l.src=i)):l={type:"html",src:i+""},l.opts=n.extend(!0,{},e.opts,u),n.fancybox.isMobile&&(l.opts=n.extend(!0,{},l.opts,l.opts.mobile)),s=l.type||l.opts.type,r=l.src||"",!s&&r&&(r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":r.match(/\.(pdf)((\?|#).*)?$/i)?s="pdf":"#"===r.charAt(0)&&(s="inline")),l.type=s,l.index=e.group.length,l.opts.$orig&&!l.opts.$orig.length&&delete l.opts.$orig,!l.opts.$thumb&&l.opts.$orig&&(l.opts.$thumb=l.opts.$orig.find("img:first")),l.opts.$thumb&&!l.opts.$thumb.length&&delete l.opts.$thumb,"function"===n.type(l.opts.caption)?l.opts.caption=l.opts.caption.apply(i,[e,l]):"caption"in d&&(l.opts.caption=d.caption),l.opts.caption=l.opts.caption===o?"":l.opts.caption+"","ajax"===s&&(c=r.split(/\s+/,2),c.length>1&&(l.src=c.shift(),l.opts.filter=c.shift())),"auto"==l.opts.smallBtn&&(n.inArray(s,["html","inline","ajax"])>-1?(l.opts.toolbar=!1,l.opts.smallBtn=!0):l.opts.smallBtn=!1),"pdf"===s&&(l.type="iframe",l.opts.iframe.preload=!1),l.opts.modal&&(l.opts=n.extend(!0,l.opts,{infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),e.group.push(l)})},addEvents:function(){var o=this;o.removeEvents(),o.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),o.close(t)}).on("click.fb-prev touchend.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),o.previous()}).on("click.fb-next touchend.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),o.next()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?u(function(){o.update()}):(o.$refs.stage.hide(),setTimeout(function(){o.$refs.stage.show(),o.update()},500))}),r.on("focusin.fb",function(t){var i=n.fancybox?n.fancybox.getInstance():null;i.isClosing||!i.current||!i.current.opts.trapFocus||n(t.target).hasClass("fancybox-container")||n(t.target).is(e)||i&&"fixed"!==n(t.target).css("position")&&!i.$refs.container.has(t.target).length&&(t.stopPropagation(),i.focus(),s.scrollTop(o.scrollTop).scrollLeft(o.scrollLeft))}),r.on("keydown.fb",function(t){var e=o.current,i=t.keyCode||t.which;if(e&&e.opts.keyboard&&!n(t.target).is("input")&&!n(t.target).is("textarea"))return 8===i||27===i?(t.preventDefault(),void o.close(t)):37===i||38===i?(t.preventDefault(),void o.previous()):39===i||40===i?(t.preventDefault(),void o.next()):void o.trigger("afterKeydown",t,i)}),o.group[o.currIndex].opts.idleTime&&(o.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseenter.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(){o.idleSecondsCounter=0,o.isIdle&&o.showControls(),o.isIdle=!1}),o.idleInterval=t.setInterval(function(){o.idleSecondsCounter++,o.idleSecondsCounter>=o.group[o.currIndex].opts.idleTime&&(o.isIdle=!0,o.idleSecondsCounter=0,o.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("focusin.fb keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e,i){var a,s,r,c,l,u,d,h=this,p=h.group.length;if(!(h.isSliding||h.isClosing||h.isAnimating&&h.firstRun)){if(t=parseInt(t,10),s=h.current?h.current.opts.loop:h.opts.loop,!s&&(t<0||t>=p))return!1;if(a=h.firstRun=null===h.firstRun,!(p<2&&!a&&h.isSliding)){if(c=h.current,h.prevIndex=h.currIndex,h.prevPos=h.currPos,r=h.createSlide(t),p>1&&((s||r.index>0)&&h.createSlide(t-1),(s||r.index<p-1)&&h.createSlide(t+1)),h.current=r,h.currIndex=r.index,h.currPos=r.pos,h.trigger("beforeShow",a),h.updateControls(),u=n.fancybox.getTranslate(r.$slide),r.isMoved=(0!==u.left||0!==u.top)&&!r.$slide.hasClass("fancybox-animated"),r.forcedDuration=o,n.isNumeric(e)?r.forcedDuration=e:e=r.opts[a?"animationDuration":"transitionDuration"],e=parseInt(e,10),a)return r.opts.animationEffect&&e&&h.$refs.container.css("transition-duration",e+"ms"),h.$refs.container.removeClass("fancybox-is-hidden"),f(h.$refs.container),h.$refs.container.addClass("fancybox-is-open"),r.$slide.addClass("fancybox-slide--current"),h.loadSlide(r),void h.preload();n.each(h.slides,function(t,e){n.fancybox.stop(e.$slide)}),r.$slide.removeClass("fancybox-slide--next fancybox-slide--previous").addClass("fancybox-slide--current"),r.isMoved?(l=Math.round(r.$slide.width()),n.each(h.slides,function(t,o){var i=o.pos-r.pos;n.fancybox.animate(o.$slide,{top:0,left:i*l+i*o.opts.gutter},e,function(){o.$slide.removeAttr("style").removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===h.currPos&&(r.isMoved=!1,h.complete())})})):h.$refs.stage.children().removeAttr("style"),r.isLoaded?h.revealContent(r):h.loadSlide(r),h.preload(),c.pos!==r.pos&&(d="fancybox-slide--"+(c.pos>r.pos?"next":"previous"),c.$slide.removeClass("fancybox-slide--complete fancybox-slide--current fancybox-slide--next fancybox-slide--previous"),c.isComplete=!1,e&&(r.isMoved||r.opts.transitionEffect)&&(r.isMoved?c.$slide.addClass(d):(d="fancybox-animated "+d+" fancybox-fx-"+r.opts.transitionEffect,n.fancybox.animate(c.$slide,d,e,function(){c.$slide.removeClass(d).removeAttr("style")}))))}}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('<div class="fancybox-slide"></div>').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,i){var a,s,r,c,l,u=this,d=u.current,f=d.$content,h=parseInt(d.$slide.width(),10),p=parseInt(d.$slide.height(),10),g=d.width,b=d.height;"image"!=d.type||d.hasError||!f||u.isAnimating||(n.fancybox.stop(f),u.isAnimating=!0,t=t===o?.5*h:t,e=e===o?.5*p:e,a=n.fancybox.getTranslate(f),c=g/a.width,l=b/a.height,s=.5*h-.5*g,r=.5*p-.5*b,g>h&&(s=a.left*c-(t*c-t),s>0&&(s=0),s<h-g&&(s=h-g)),b>p&&(r=a.top*l-(e*l-e),r>0&&(r=0),r<p-b&&(r=p-b)),u.updateCursor(g,b),n.fancybox.animate(f,{top:r,left:s,scaleX:c,scaleY:l},i||330,function(){u.isAnimating=!1}),u.SlideShow&&u.SlideShow.isActive&&u.SlideShow.stop())},scaleToFit:function(t){var e,o=this,i=o.current,a=i.$content;"image"!=i.type||i.hasError||!a||o.isAnimating||(n.fancybox.stop(a),o.isAnimating=!0,e=o.getFitPos(i),o.updateCursor(e.width,e.height),n.fancybox.animate(a,{top:e.top,left:e.left,scaleX:e.width/a.width(),scaleY:e.height/a.height()},t||330,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,o,i,a,r,c=this,l=t.$content,u=t.width,d=t.height,f=t.opts.margin;return!(!l||!l.length||!u&&!d)&&("number"===n.type(f)&&(f=[f,f]),2==f.length&&(f=[f[0],f[1],f[0],f[1]]),s.width()<800&&(f=[0,0,0,0]),e=parseInt(c.$refs.stage.width(),10)-(f[1]+f[3]),o=parseInt(c.$refs.stage.height(),10)-(f[0]+f[2]),i=Math.min(1,e/u,o/d),a=Math.floor(i*u),r=Math.floor(i*d),{top:Math.floor(.5*(o-r))+f[0],left:Math.floor(.5*(e-a))+f[3],width:a,height:r})},update:function(){var t=this;n.each(t.slides,function(e,n){t.updateSlide(n)})},updateSlide:function(t){var e=this,o=t.$content;o&&(t.width||t.height)&&(n.fancybox.stop(o),n.fancybox.setTranslate(o,e.getFitPos(t)),t.pos===e.currPos&&e.updateCursor()),t.$slide.trigger("refresh"),e.trigger("onUpdate",t)},updateCursor:function(t,e){var n,i=this,a=i.$refs.container.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-drag fancybox-can-zoomOut");i.current&&!i.isClosing&&(i.isZoomable()?(a.addClass("fancybox-is-zoomable"),n=t!==o&&e!==o?t<i.current.width&&e<i.current.height:i.isScaledDown(),n?a.addClass("fancybox-can-zoomIn"):i.current.opts.touch?a.addClass("fancybox-can-drag"):a.addClass("fancybox-can-zoomOut")):i.current.opts.touch&&a.addClass("fancybox-can-drag"))},isZoomable:function(){var t,e=this,o=e.current;if(o&&!e.isClosing)return!!("image"===o.type&&o.isLoaded&&!o.hasError&&("zoom"===o.opts.clickContent||n.isFunction(o.opts.clickContent)&&"zoom"===o.opts.clickContent(o))&&(t=e.getFitPos(o),o.width>t.width||o.height>t.height))},isScaledDown:function(){var t=this,e=t.current,o=e.$content,i=!1;return o&&(i=n.fancybox.getTranslate(o),i=i.width<e.width||i.height<e.height),i},canPan:function(){var t=this,e=t.current,n=e.$content,o=!1;return n&&(o=t.getFitPos(e),o=Math.abs(n.width()-o.width)>1||Math.abs(n.height()-o.height)>1),o},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){switch(t.isLoading=!0,a.trigger("beforeLoad",t),e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass("fancybox-slide--"+(e||"unknown")).addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;default:a.setError(t)}return!0}},setImage:function(e){var o,i,a,s,r=this,c=e.opts.image.srcset;if(c){a=t.devicePixelRatio||1,s=t.innerWidth*a,i=c.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);return 0===n?e.url=t:void(o&&(e.value=o,e.postfix=t[t.length-1]))}),e}),i.sort(function(t,e){return t.value-e.value});for(var l=0;l<i.length;l++){var u=i[l];if("w"===u.postfix&&u.value>=s||"x"===u.postfix&&u.value>=a){o=u;break}}!o&&i.length&&(o=i[i.length-1]),o&&(e.src=o.url,e.width&&e.height&&"w"==o.postfix&&(e.height=e.width/e.height*o.value,e.width=o.value))}e.$content=n('<div class="fancybox-image-wrap"></div>').addClass("fancybox-is-hidden").appendTo(e.$slide),e.opts.preload!==!1&&e.opts.width&&e.opts.height&&(e.opts.thumb||e.opts.$thumb)?(e.width=e.opts.width,e.height=e.opts.height,e.$ghost=n("<img />").one("error",function(){n(this).remove(),e.$ghost=null,r.setBigImage(e)}).one("load",function(){r.afterLoad(e),r.setBigImage(e)}).addClass("fancybox-image").appendTo(e.$content).attr("src",e.opts.thumb||e.opts.$thumb.attr("src"))):r.setBigImage(e)},setBigImage:function(t){var e=this,o=n("<img />");t.$image=o.one("error",function(){e.setError(t)}).one("load",function(){clearTimeout(t.timouts),t.timouts=null,e.isClosing||(t.width=this.naturalWidth,t.height=this.naturalHeight,t.opts.image.srcset&&o.attr("sizes","100vw").attr("srcset",t.opts.image.srcset),e.hideLoading(t),t.$ghost?t.timouts=setTimeout(function(){t.timouts=null,t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))):e.afterLoad(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),o[0].complete?o.trigger("load"):o[0].error?o.trigger("error"):t.timouts=setTimeout(function(){o[0].complete||t.hasError||e.showLoading(t)},100)},setIframe:function(t){var e,i=this,a=t.opts.iframe,s=t.$slide;t.$content=n('<div class="fancybox-content'+(a.preload?" fancybox-is-hidden":"")+'"></div>').css(a.css).appendTo(s),e=n(a.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(a.attr).appendTo(t.$content),a.preload?(i.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),i.afterLoad(t)}),s.on("refresh.fb",function(){var n,i,s,r,c,l=t.$content;if(1===e[0].isReady){try{n=e.contents(),i=n.find("body")}catch(t){}i&&i.length&&(a.css.width===o||a.css.height===o)&&(s=e[0].contentWindow.document.documentElement.scrollWidth,r=Math.ceil(i.outerWidth(!0)+(l.width()-s)),c=Math.ceil(i.outerHeight(!0)),l.css({width:a.css.width===o?r+(l.outerWidth()-l.innerWidth()):a.css.width,height:a.css.height===o?c+(l.outerHeight()-l.innerHeight()):a.css.height})),l.removeClass("fancybox-is-hidden")}})):this.afterLoad(t),e.attr("src",t.src),t.opts.smallBtn===!0&&t.$content.prepend(i.translate(t,t.opts.btnTpl.smallBtn)),s.one("onReset",function(){try{n(this).find("iframe").hide().attr("src","//about:blank")}catch(t){}n(this).empty(),t.isLoaded=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$slide.empty(),l(e)&&e.parent().length?(e.parent(".fancybox-slide--inline").trigger("onReset"),t.$placeholder=n("<div></div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("<div>").append(n.trim(e)).contents(),3===e[0].nodeType&&(e=n("<div>").html(e))),t.opts.filter&&(e=n("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){t.$placeholder&&(t.$placeholder.after(e.hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1)}),t.$content=n(e).appendTo(t.$slide),t.opts.smallBtn&&!t.$smallBtn&&(t.$smallBtn=n(o.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.removeClass("fancybox-slide--"+t.type),this.setContent(t,this.translate(t,t.opts.errorTpl))},showLoading:function(t){var e=this;t=t||e.current,t&&!t.$spinner&&(t.$spinner=n(e.opts.spinnerTpl).appendTo(t.$slide))},hideLoading:function(t){var e=this;t=t||e.current,t&&t.$spinner&&(t.$spinner.remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('<div class="fancybox-spaceball"></div>').appendTo(t.$content)),e.revealContent(t))},revealContent:function(t){var e,i,a,s,r,c=this,l=t.$slide,u=!1;return e=t.opts[c.firstRun?"animationEffect":"transitionEffect"],a=t.opts[c.firstRun?"animationDuration":"transitionDuration"],a=parseInt(t.forcedDuration===o?a:t.forcedDuration,10),!t.isMoved&&t.pos===c.currPos&&a||(e=!1),"zoom"!==e||t.pos===c.currPos&&a&&"image"===t.type&&!t.hasError&&(u=c.getThumbPos(t))||(e="fade"),"zoom"===e?(r=c.getFitPos(t),r.scaleX=r.width/u.width,r.scaleY=r.height/u.height,delete r.width,delete r.height,s=t.opts.zoomOpacity,"auto"==s&&(s=Math.abs(t.width/t.height-u.width/u.height)>.1),s&&(u.opacity=.1,r.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),u),f(t.$content),void n.fancybox.animate(t.$content,r,a,function(){c.complete()})):(c.updateSlide(t),e?(n.fancybox.stop(l),i="fancybox-animated fancybox-slide--"+(t.pos>c.prevPos?"next":"previous")+" fancybox-fx-"+e,l.removeAttr("style").removeClass("fancybox-slide--current fancybox-slide--next fancybox-slide--previous").addClass(i),t.$content.removeClass("fancybox-is-hidden"),f(l),void n.fancybox.animate(l,"fancybox-slide--current",a,function(e){l.removeClass(i).removeAttr("style"),t.pos===c.currPos&&c.complete()},!0)):(f(l),t.$content.removeClass("fancybox-is-hidden"),void(t.pos===c.currPos&&c.complete())))},getThumbPos:function(o){var i,a=this,s=!1,r=function(e){for(var o,i=e[0],a=i.getBoundingClientRect(),s=[];null!==i.parentElement;)"hidden"!==n(i.parentElement).css("overflow")&&"auto"!==n(i.parentElement).css("overflow")||s.push(i.parentElement.getBoundingClientRect()),i=i.parentElement;return o=s.every(function(t){var e=Math.min(a.right,t.right)-Math.max(a.left,t.left),n=Math.min(a.bottom,t.bottom)-Math.max(a.top,t.top);return e>0&&n>0}),o&&a.bottom>0&&a.right>0&&a.left<n(t).width()&&a.top<n(t).height()},c=o.opts.$thumb,l=c?c.offset():0;return l&&c[0].ownerDocument===e&&r(c)&&(i=a.$refs.stage.offset(),s={top:l.top-i.top+parseFloat(c.css("border-top-width")||0),left:l.left-i.left+parseFloat(c.css("border-left-width")||0),width:c.width(),height:c.height(),scaleX:1,scaleY:1}),s},complete:function(){var t=this,o=t.current,i={};o.isMoved||!o.isLoaded||o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),f(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(t.slides,function(e,o){o.pos>=t.currPos-1&&o.pos<=t.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.unbind().remove())}),t.slides=i,t.updateCursor(),t.trigger("afterShow"),(n(e.activeElement).is("[disabled]")||o.opts.autoFocus&&"image"!=o.type&&"iframe"!==o.type)&&t.focus())},preload:function(){var t,e,n=this;n.group.length<2||(t=n.slides[n.currPos+1],e=n.slides[n.currPos-1],t&&"image"===t.type&&n.loadSlide(t),e&&"image"===e.type&&n.loadSlide(e))},focus:function(){var t,e=this.current;this.isClosing||(t=e&&e.isComplete?e.$slide.find("button,:input,[tabindex],a").filter(":not([disabled]):visible:first"):null,t=t&&t.length?t:this.$refs.container,t.focus())},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.uid!==t.uid&&!e.isClosing&&e.trigger("onDeactivate")}),t.current&&(t.$refs.container.index()>0&&t.$refs.container.prependTo(e.body),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l=this,f=l.current,h=function(){l.cleanUp(t)};return!l.isClosing&&(l.isClosing=!0,l.trigger("beforeClose",t)===!1?(l.isClosing=!1,u(function(){l.update()}),!1):(l.removeEvents(),f.timouts&&clearTimeout(f.timouts),a=f.$content,o=f.opts.animationEffect,i=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.off(d).removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),f.$slide.siblings().trigger("onReset").remove(),i&&l.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing"),l.hideLoading(f),l.hideControls(),l.updateCursor(),"zoom"!==o||t!==!0&&a&&i&&"image"===f.type&&!f.hasError&&(c=l.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),r=n.fancybox.getTranslate(a),r.width=r.width*r.scaleX,r.height=r.height*r.scaleY,s=f.opts.zoomOpacity,"auto"==s&&(s=Math.abs(f.width/f.height-c.width/c.height)>.1),s&&(c.opacity=0),r.scaleX=r.width/c.width,r.scaleY=r.height/c.height,r.width=c.width,r.height=c.height,n.fancybox.setTranslate(f.$content,r),n.fancybox.animate(f.$content,c,i,h),!0):(o&&i?t===!0?setTimeout(h,i):n.fancybox.animate(f.$slide.removeClass("fancybox-slide--current"),"fancybox-animated fancybox-slide--previous fancybox-fx-"+o,i,h):h(),!0)))},cleanUp:function(t){var e,o=this;o.current.$slide.trigger("onReset"),o.$refs.container.empty().remove(),o.trigger("afterClose",t),o.$lastFocus&&o.current.opts.backFocus&&o.$lastFocus.focus(),o.current=null,e=n.fancybox.getInstance(),e?e.activate():(s.scrollTop(o.scrollTop).scrollLeft(o.scrollLeft),n("html").removeClass("fancybox-enabled"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;return s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),o===!1?o:void("afterClose"===t?r.trigger(t+".fb",i):a.$refs.container.trigger(t+".fb",i))},updateControls:function(t){var e=this,o=e.current,i=o.index,a=o.opts,s=a.caption,r=e.$refs.caption;o.$slide.trigger("refresh"),e.$caption=s&&s.length?r.html(s):null,e.isHiddenControls||e.showControls(),n("[data-fancybox-count]").html(e.group.length),n("[data-fancybox-index]").html(i+1),n("[data-fancybox-prev]").prop("disabled",!a.loop&&i<=0),n("[data-fancybox-next]").prop("disabled",!a.loop&&i>=e.group.length-1)},hideControls:function(){this.isHiddenControls=!0,this.$refs.container.removeClass("fancybox-show-infobar fancybox-show-toolbar fancybox-show-caption fancybox-show-nav")},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.isHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal),t.$caption?n.addClass("fancybox-show-caption "):n.removeClass("fancybox-show-caption")},toggleControls:function(){this.isHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.1.24",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):first').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof h&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new h(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),t===!0&&this.close())},destroy:function(){this.close(!0),r.off("click.fb-start")},isMobile:e.createTouch!==o&&/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;if(!t||!t.length)return!1;if(e=t.eq(0).css("transform"),e&&e.indexOf("matrix")!==-1?(e=e.split("(")[1],e=e.split(")")[0],e=e.split(",")):e=[],e.length)e=e.length>10?[e[13],e[12],e[0],e[5]]:[e[5],e[4],e[0],e[3]],e=e.map(parseFloat);else{e=[0,0,1,1];var n=/\.*translate\((.*)px,(.*)px\)/i,o=n.exec(t.eq(0).attr("style"));o&&(e[0]=parseFloat(o[2]),e[1]=parseFloat(o[1]))}return{top:e[0],left:e[1],scaleX:e[2],scaleY:e[3],opacity:parseFloat(t.css("opacity")),width:t.width(),height:t.height()}},setTranslate:function(t,e){var n="",i={};if(t&&e)return e.left===o&&e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&&e.scaleY!==o&&(n=(n.length?n+" ":"")+"scale("+e.scaleX+", "+e.scaleY+")"),n.length&&(i.transform=n),e.opacity!==o&&(i.opacity=e.opacity),e.width!==o&&(i.width=e.width),e.height!==o&&(i.height=e.height),t.css(i)},animate:function(t,e,i,a,s){var r=d||"transitionend";n.isFunction(i)&&(a=i,i=null),n.isPlainObject(e)||t.removeAttr("style"),t.on(r,function(i){(!i||!i.originalEvent||t.is(i.originalEvent.target)&&"z-index"!=i.originalEvent.propertyName)&&(t.off(r),n.isPlainObject(e)?e.scaleX!==o&&e.scaleY!==o&&(t.css("transition-duration","0ms"),e.width=Math.round(t.width()*e.scaleX),e.height=Math.round(t.height()*e.scaleY),e.scaleX=1,e.scaleY=1,n.fancybox.setTranslate(t,e)):s!==!0&&t.removeClass(e),n.isFunction(a)&&a(i))}),n.isNumeric(i)&&t.css("transition-duration",i+"ms"),n.isPlainObject(e)?n.fancybox.setTranslate(t,e):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger("transitionend")},i+16))},stop:function(t){clearTimeout(t.data("timer")),t.off(d)}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i)}}(window,document,window.jQuery),function(t){"use strict";var e=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e},n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},metacafe:{matcher:/metacafe.com\/watch\/(\d+)\/(.*)?/,type:"iframe",url:"//www.metacafe.com/embed/$1/?ap=1"},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:"iframe",url:"//www.dailymotion.com/embed/video/$1"},vine:{matcher:/vine.co\/v\/([a-zA-Z0-9\?\=\-]+)/,type:"iframe",url:"//vine.co/v/$1/embed/simple"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12])+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};t(document).on("onInit.fb",function(o,i){t.each(i.group,function(o,i){var a,s,r,c,l,u,d,f=i.src||"",h=!1;i.type||(a=t.extend(!0,{},n,i.opts.media),t.each(a,function(n,o){if(r=f.match(o.matcher),u={},d=n,r){if(h=o.type,o.paramPlace&&r[o.paramPlace]){l=r[o.paramPlace],"?"==l[0]&&(l=l.substring(1)),l=l.split("&");for(var a=0;a<l.length;++a){var p=l[a].split("=",2);2==p.length&&(u[p[0]]=decodeURIComponent(p[1].replace(/\+/g," ")))}}return c=t.extend(!0,{},o.params,i.opts[n],u),f="function"===t.type(o.url)?o.url.call(this,r,c,i):e(o.url,r,c),s="function"===t.type(o.thumb)?o.thumb.call(this,r,c,i):e(o.thumb,r),"vimeo"===d&&(f=f.replace("&%23","#")),!1}}),h?(i.src=f,i.type=h,i.opts.thumb||i.opts.$thumb&&i.opts.$thumb.length||(i.opts.thumb=s),"iframe"===h&&(t.extend(!0,i.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}}),i.contentProvider=d,
i.opts.slideClass+=" fancybox-slide--"+("gmap_place"==d||"gmap_search"==d?"map":"video"))):i.type="image")})})}(window.jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is("a,button,input,select,textarea")||n.isFunction(t.get(0).onclick))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],i=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},u=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};u.prototype.destroy=function(){this.$container.off(".fb.touch")},u.prototype.ontouchstart=function(o){var i=this,c=n(o.target),u=i.instance,d=u.current,f=d.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),!d||i.instance.isAnimating||i.instance.isClosing)return o.stopPropagation(),void o.preventDefault();if((!o.originalEvent||2!=o.originalEvent.button)&&c.length&&!r(c)&&!r(c.parent())&&!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left)&&(i.startPoints=a(o),i.startPoints&&!(i.startPoints.length>1&&u.isSliding))){if(i.$target=c,i.$content=f,i.canTap=!0,n(e).off(".fb.touch"),n(e).on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")),n(e).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),o.stopPropagation(),!u.current.opts.touch&&!u.canPan()||!c.is(i.$stage)&&!i.$stage.find(c).length)return void(c.is("img")&&o.preventDefault());n.fancybox.isMobile&&(l(i.$target)||l(i.$target.parent()))||o.preventDefault(),i.canvasWidth=Math.round(d.$slide[0].clientWidth),i.canvasHeight=Math.round(d.$slide[0].clientHeight),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.sliderStartPos=i.sliderLastPos||{top:0,left:0},i.contentStartPos=n.fancybox.getTranslate(i.$content),i.contentLastPos=null,1!==i.startPoints.length||i.isZooming||(i.canTap=!u.isSliding,"image"===d.type&&(i.contentStartPos.width>i.canvasWidth+1||i.contentStartPos.height>i.canvasHeight+1)?(n.fancybox.stop(i.$content),i.$content.css("transition-duration","0ms"),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-controls--isGrabbing")),2!==i.startPoints.length||u.isAnimating||d.hasError||"image"!==d.type||!d.isLoaded&&!d.$ghost||(i.isZooming=!0,i.isSwiping=!1,i.isPanning=!1,n.fancybox.stop(i.$content),i.$content.css("transition-duration","0ms"),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))}},u.prototype.ontouchmove=function(t){var e=this;if(e.newPoints=a(t),n.fancybox.isMobile&&(l(e.$target)||l(e.$target.parent())))return t.stopPropagation(),void(e.canTap=!1);if((e.instance.current.opts.touch||e.instance.canPan())&&e.newPoints&&e.newPoints.length&&(e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0)){if(!e.$target.is(e.$stage)&&!e.$stage.find(e.$target).length)return;t.stopPropagation(),t.preventDefault(),e.isSwiping?e.onSwipe():e.isPanning?e.onPan():e.isZooming&&e.onZoom()}},u.prototype.onSwipe=function(){var e,a=this,s=a.isSwiping,r=a.sliderStartPos.left||0;s===!0?Math.abs(a.distance)>10&&(a.canTap=!1,a.instance.group.length<2&&a.instance.opts.touch.vertical?a.isSwiping="y":a.instance.isSliding||a.instance.opts.touch.vertical===!1||"auto"===a.instance.opts.touch.vertical&&n(t).width()>800?a.isSwiping="x":(e=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=e>45&&e<135?"y":"x"),a.instance.isSliding=a.isSwiping,a.startPoints=a.newPoints,n.each(a.instance.slides,function(t,e){n.fancybox.stop(e.$slide),e.$slide.css("transition-duration","0ms"),e.inTransition=!1,e.pos===a.instance.current.pos&&(a.sliderStartPos.left=n.fancybox.getTranslate(e.$slide).left)}),a.instance.SlideShow&&a.instance.SlideShow.isActive&&a.instance.SlideShow.stop()):("x"==s&&(a.distanceX>0&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?r+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?r-=Math.pow(-a.distanceX,.8):r+=a.distanceX),a.sliderLastPos={top:"x"==s?0:a.sliderStartPos.top+a.distanceY,left:r},a.requestId&&(i(a.requestId),a.requestId=null),a.requestId=o(function(){a.sliderLastPos&&(n.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("fancybox-is-sliding"))}))},u.prototype.onPan=function(){var t,e,a,s=this;s.canTap=!1,t=s.contentStartPos.width>s.canvasWidth?s.contentStartPos.left+s.distanceX:s.contentStartPos.left,e=s.contentStartPos.top+s.distanceY,a=s.limitMovement(t,e,s.contentStartPos.width,s.contentStartPos.height),a.scaleX=s.contentStartPos.scaleX,a.scaleY=s.contentStartPos.scaleY,s.contentLastPos=a,s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){n.fancybox.setTranslate(s.$content,s.contentLastPos)})},u.prototype.limitMovement=function(t,e,n,o){var i,a,s,r,c=this,l=c.canvasWidth,u=c.canvasHeight,d=c.contentStartPos.left,f=c.contentStartPos.top,h=c.distanceX,p=c.distanceY;return i=Math.max(0,.5*l-.5*n),a=Math.max(0,.5*u-.5*o),s=Math.min(l-n,.5*l-.5*n),r=Math.min(u-o,.5*u-.5*o),n>l&&(h>0&&t>i&&(t=i-1+Math.pow(-i+d+h,.8)||0),h<0&&t<s&&(t=s+1-Math.pow(s-d-h,.8)||0)),o>u&&(p>0&&e>a&&(e=a-1+Math.pow(-a+f+p,.8)||0),p<0&&e<r&&(e=r+1-Math.pow(r-f-p,.8)||0)),{top:e,left:t}},u.prototype.limitPosition=function(t,e,n,o){var i=this,a=i.canvasWidth,s=i.canvasHeight;return n>a?(t=t>0?0:t,t=t<a-n?a-n:t):t=Math.max(0,a/2-n/2),o>s?(e=e>0?0:e,e=e<s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},u.prototype.onZoom=function(){var e=this,a=e.contentStartPos.width,r=e.contentStartPos.height,c=e.contentStartPos.left,l=e.contentStartPos.top,u=s(e.newPoints[0],e.newPoints[1]),d=u/e.startDistanceBetweenFingers,f=Math.floor(a*d),h=Math.floor(r*d),p=(a-f)*e.percentageOfImageAtPinchPointX,g=(r-h)*e.percentageOfImageAtPinchPointY,b=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),m=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=b-e.centerPointStartX,v=m-e.centerPointStartY,x=c+(p+y),w=l+(g+v),$={top:w,left:x,scaleX:e.contentStartPos.scaleX*d,scaleY:e.contentStartPos.scaleY*d};e.canTap=!1,e.newWidth=f,e.newHeight=h,e.contentLastPos=$,e.requestId&&(i(e.requestId),e.requestId=null),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},u.prototype.ontouchend=function(t){var o=this,s=Math.max((new Date).getTime()-o.startTime,1),r=o.isSwiping,c=o.isPanning,l=o.isZooming;return o.endPoints=a(t),o.$container.removeClass("fancybox-controls--isGrabbing"),n(e).off(".fb.touch"),o.requestId&&(i(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.canTap?o.onTap(t):(o.speed=366,o.velocityX=o.distanceX/s*.5,o.velocityY=o.distanceY/s*.5,o.speedX=Math.max(.5*o.speed,Math.min(1.5*o.speed,1/Math.abs(o.velocityX)*o.speed)),void(c?o.endPanning():l?o.endZooming():o.endSwiping(r)))},u.prototype.endSwiping=function(t){var e=this,o=!1;e.instance.isSliding=!1,e.sliderLastPos=null,"y"==t&&Math.abs(e.distanceY)>50?(n.fancybox.animate(e.instance.current.$slide,{top:e.sliderStartPos.top+e.distanceY+150*e.velocityY,opacity:0},150),o=e.instance.close(!0,300)):"x"==t&&e.distanceX>50&&e.instance.group.length>1?o=e.instance.previous(e.speedX):"x"==t&&e.distanceX<-50&&e.instance.group.length>1&&(o=e.instance.next(e.speedX)),o!==!1||"x"!=t&&"y"!=t||e.instance.jumpTo(e.instance.current.index,150),e.$container.removeClass("fancybox-is-sliding")},u.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(i.instance.current.opts.touch.momentum===!1?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+i.velocityX*i.speed,e=i.contentLastPos.top+i.velocityY*i.speed),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,330))},u.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),r<a.canvasWidth&&c<a.canvasHeight?a.instance.scaleToFit(150):r>s.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.setTranslate(a.content,n.fancybox.getTranslate(a.$content)),n.fancybox.animate(a.$content,o,150)))},u.prototype.onTap=function(t){var e,o=this,i=n(t.target),s=o.instance,r=s.current,c=t&&a(t)||o.startPoints,l=c[0]?c[0].x-o.$stage.offset().left:0,u=c[0]?c[0].y-o.$stage.offset().top:0,d=function(e){var i=r.opts[e];if(n.isFunction(i)&&(i=i.apply(s,[r,t])),i)switch(i){case"close":s.close(o.startEvent);break;case"toggleControls":s.toggleControls(!0);break;case"next":s.next();break;case"nextOrClose":s.group.length>1?s.next():s.close(o.startEvent);break;case"zoom":"image"==r.type&&(r.isLoaded||r.$ghost)&&(s.canPan()?s.scaleToFit():s.isScaledDown()?s.scaleToActual(l,u):s.group.length<2&&s.close(o.startEvent))}};if(!(t.originalEvent&&2==t.originalEvent.button||s.isSliding||l>i[0].clientWidth+i.offset().left)){if(i.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))e="Outside";else if(i.is(".fancybox-slide"))e="Slide";else{if(!s.current.$content||!s.current.$content.has(t.target).length)return;e="Content"}if(o.tapped){if(clearTimeout(o.tapped),o.tapped=null,Math.abs(l-o.tapX)>50||Math.abs(u-o.tapY)>50||s.isSliding)return this;d("dblclick"+e)}else o.tapX=l,o.tapY=u,r.opts["dblclick"+e]&&r.opts["dblclick"+e]!==r.opts["click"+e]?o.tapped=setTimeout(function(){o.tapped=null,d("click"+e)},300):d("click"+e);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new u(e))}),n(e).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,window.jQuery),function(t,e){"use strict";var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,speed:3e3,init:function(){var t=this;t.$button=t.instance.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),(t.instance.group.length<2||!t.instance.group[t.instance.currIndex].opts.slideShow)&&t.$button.hide()},set:function(){var t=this;t.instance&&t.instance.current&&(t.instance.current.opts.loop||t.instance.currIndex<t.instance.group.length-1)?t.timer=setTimeout(function(){t.instance.next()},t.instance.current.opts.slideShow.speed||t.speed):(t.stop(),t.instance.idleSecondsCounter=0,t.instance.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null},start:function(){var t=this,e=t.instance.current;t.instance&&e&&(e.opts.loop||e.index<t.instance.group.length-1)&&(t.isActive=!0,t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_STOP).addClass("fancybox-button--pause"),e.isComplete&&t.set())},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_START).removeClass("fancybox-button--pause"),t.isActive=!1},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.SlideShow;o?i&&n.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},"afterShow.fb":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.fb":function(n,o,i,a,s){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(a.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on("visibilitychange",function(){var n=e.fancybox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,window.jQuery),function(t,e){"use strict";var n=function(){var e,n,o,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a={};for(n=0;n<i.length;n++)if(e=i[n],e&&e[1]in t){for(o=0;o<e.length;o++)a[i[0][o]]=e[o];return a}return!1}();if(!n)return void(e.fancybox.defaults.btnTpl.fullScreen=!1);var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e(t).on({"onInit.fb":function(t,e){var n,i=e.$refs.toolbar.find("[data-fancybox-fullscreen]");e&&!e.FullScreen&&e.group[e.currIndex].opts.fullScreen?(n=e.$refs.container,n.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle(n[0])}),e.opts.fullScreen&&e.opts.fullScreen.autoStart===!0&&o.request(n[0]),e.FullScreen=o):i.hide()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle(e.$refs.container[0]))},"beforeClose.fb":function(t){t&&t.FullScreen&&o.exit()}}),e(t).on(n.fullscreenchange,function(){var t=e.fancybox.getInstance();t.current&&"image"===t.current.type&&t.isAnimating&&(t.current.$content.css("transition","none"),t.isAnimating=!1,t.update(!0,!0,0))})}(document,window.jQuery),function(t,e){"use strict";var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,init:function(){var t=this,e=t.instance.group[0],n=t.instance.group[1];t.$button=t.instance.$refs.toolbar.find("[data-fancybox-thumbs]"),t.instance.group.length>1&&t.instance.group[t.instance.currIndex].opts.thumbs&&("image"==e.type||e.opts.thumb||e.opts.$thumb)&&("image"==n.type||n.opts.thumb||n.opts.$thumb)?(t.$button.on("click",function(){t.toggle()}),t.isActive=!0):(t.$button.hide(),t.isActive=!1)},create:function(){var t,n,o=this.instance;this.$grid=e('<div class="fancybox-thumbs"></div>').appendTo(o.$refs.container),t="<ul>",e.each(o.group,function(e,o){n=o.opts.thumb||(o.opts.$thumb?o.opts.$thumb.attr("src"):null),n||"image"!==o.type||(n=o.src),n&&n.length&&(t+='<li data-index="'+e+'"  tabindex="0" class="fancybox-thumbs-loading"><img data-src="'+n+'" /></li>')}),t+="</ul>",this.$list=e(t).appendTo(this.$grid).on("click","li",function(){o.jumpTo(e(this).data("index"))}),this.$list.find("img").hide().one("load",function(){var t,n,o,i,a=e(this).parent().removeClass("fancybox-thumbs-loading"),s=a.outerWidth(),r=a.outerHeight();t=this.naturalWidth||this.width,n=this.naturalHeight||this.height,o=t/s,i=n/r,o>=1&&i>=1&&(o>i?(t/=i,n=r):(t=s,n/=o)),e(this).css({width:Math.floor(t),height:Math.floor(n),"margin-top":Math.min(0,Math.floor(.3*r-.3*n)),"margin-left":Math.min(0,Math.floor(.5*s-.5*t))}).show()}).each(function(){this.src=e(this).data("src")})},focus:function(){this.instance.current&&this.$list.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+this.instance.current.index+'"]').addClass("fancybox-thumbs-active").focus()},close:function(){this.$grid.hide()},update:function(){this.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),this.isVisible?(this.$grid||this.create(),this.instance.trigger("onThumbsShow"),this.focus()):this.$grid&&this.instance.trigger("onThumbsHide"),this.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.Thumbs&&(e.Thumbs=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;if(i&&i.isActive){if(n.modal)return i.$button.hide(),void i.hide();o&&e.opts.thumbs.autoStart===!0&&i.show(),i.isVisible&&i.focus()}},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&e.opts.thumbs.hideOnClose!==!1&&n.close()}})}(document,window.jQuery),function(t,e,n){"use strict";function o(){var t=e.location.hash.substr(1),n=t.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return o<1&&(o=1),{hash:t,index:o,gallery:i}}function i(t){var e;""!==t.gallery&&(e=n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1),e.length||(e=n("#"+n.escapeSelector(t.gallery))),e.length&&(s=!1,e.trigger("click")))}function a(t){var e;return!!t&&(e=t.current?t.current.opts:t.opts,e.$orig?e.$orig.data("fancybox"):e.hash||"")}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)});var s=!0,r=null,c=null;n(function(){setTimeout(function(){n.fancybox.defaults.hash!==!1&&(n(t).on({"onInit.fb":function(t,e){var n,i;e.group[e.currIndex].opts.hash!==!1&&(n=o(),i=a(e),i&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i){var l;i.opts.hash!==!1&&(l=a(o),l&&""!==l&&(e.location.hash.indexOf(l)<0&&(o.opts.origHash=e.location.hash),r=l+(o.group.length>1?"-"+(i.index+1):""),"replaceState"in e.history?(c&&clearTimeout(c),c=setTimeout(function(){e.history[s?"pushState":"replaceState"]({},t.title,e.location.pathname+e.location.search+"#"+r),c=null,s=!1},300)):e.location.hash=r))},"beforeClose.fb":function(o,i,s){var l,u;c&&clearTimeout(c),s.opts.hash!==!1&&(l=a(i),u=i&&i.opts.origHash?i.opts.origHash:"",l&&""!==l&&("replaceState"in history?e.history.replaceState({},t.title,e.location.pathname+e.location.search+u):(e.location.hash=u,n(e).scrollTop(i.scrollTop).scrollLeft(i.scrollLeft))),r=null)}}),n(e).on("hashchange.fb",function(){var t=o();n.fancybox.getInstance()?!r||r===t.gallery+"-"+t.index||1===t.index&&r==t.gallery||(r=null,n.fancybox.close(),s=!0):""!==t.gallery&&i(t)}),i(o()))},50)})}(document,window,window.jQuery);;
/*!
 * typeahead.js 0.11.1
 * https://github.com/twitter/typeahead.js
 * Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT
 */

(function(root, factory) {
    if (typeof define === "function" && define.amd) {
        define([ "jquery" ], function(a0) {
            return root["Bloodhound"] = factory(a0);
        });
    } else if (typeof exports === "object") {
        module.exports = factory(require("jquery"));
    } else {
        root["Bloodhound"] = factory(jQuery);
    }
})(this, function($) {
    var _ = function() {
        "use strict";
        return {
            isMsie: function() {
                return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
            },
            isBlankString: function(str) {
                return !str || /^\s*$/.test(str);
            },
            escapeRegExChars: function(str) {
                return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
            },
            isString: function(obj) {
                return typeof obj === "string";
            },
            isNumber: function(obj) {
                return typeof obj === "number";
            },
            isArray: $.isArray,
            isFunction: $.isFunction,
            isObject: $.isPlainObject,
            isUndefined: function(obj) {
                return typeof obj === "undefined";
            },
            isElement: function(obj) {
                return !!(obj && obj.nodeType === 1);
            },
            isJQuery: function(obj) {
                return obj instanceof $;
            },
            toStr: function toStr(s) {
                return _.isUndefined(s) || s === null ? "" : s + "";
            },
            bind: $.proxy,
            each: function(collection, cb) {
                $.each(collection, reverseArgs);
                function reverseArgs(index, value) {
                    return cb(value, index);
                }
            },
            map: $.map,
            filter: $.grep,
            every: function(obj, test) {
                var result = true;
                if (!obj) {
                    return result;
                }
                $.each(obj, function(key, val) {
                    if (!(result = test.call(null, val, key, obj))) {
                        return false;
                    }
                });
                return !!result;
            },
            some: function(obj, test) {
                var result = false;
                if (!obj) {
                    return result;
                }
                $.each(obj, function(key, val) {
                    if (result = test.call(null, val, key, obj)) {
                        return false;
                    }
                });
                return !!result;
            },
            mixin: $.extend,
            identity: function(x) {
                return x;
            },
            clone: function(obj) {
                return $.extend(true, {}, obj);
            },
            getIdGenerator: function() {
                var counter = 0;
                return function() {
                    return counter++;
                };
            },
            templatify: function templatify(obj) {
                return $.isFunction(obj) ? obj : template;
                function template() {
                    return String(obj);
                }
            },
            defer: function(fn) {
                setTimeout(fn, 0);
            },
            debounce: function(func, wait, immediate) {
                var timeout, result;
                return function() {
                    var context = this, args = arguments, later, callNow;
                    later = function() {
                        timeout = null;
                        if (!immediate) {
                            result = func.apply(context, args);
                        }
                    };
                    callNow = immediate && !timeout;
                    clearTimeout(timeout);
                    timeout = setTimeout(later, wait);
                    if (callNow) {
                        result = func.apply(context, args);
                    }
                    return result;
                };
            },
            throttle: function(func, wait) {
                var context, args, timeout, result, previous, later;
                previous = 0;
                later = function() {
                    previous = new Date();
                    timeout = null;
                    result = func.apply(context, args);
                };
                return function() {
                    var now = new Date(), remaining = wait - (now - previous);
                    context = this;
                    args = arguments;
                    if (remaining <= 0) {
                        clearTimeout(timeout);
                        timeout = null;
                        previous = now;
                        result = func.apply(context, args);
                    } else if (!timeout) {
                        timeout = setTimeout(later, remaining);
                    }
                    return result;
                };
            },
            stringify: function(val) {
                return _.isString(val) ? val : JSON.stringify(val);
            },
            noop: function() {}
        };
    }();
    var VERSION = "0.11.1";
    var tokenizers = function() {
        "use strict";
        return {
            nonword: nonword,
            whitespace: whitespace,
            obj: {
                nonword: getObjTokenizer(nonword),
                whitespace: getObjTokenizer(whitespace)
            }
        };
        function whitespace(str) {
            str = _.toStr(str);
            return str ? str.split(/\s+/) : [];
        }
        function nonword(str) {
            str = _.toStr(str);
            return str ? str.split(/\W+/) : [];
        }
        function getObjTokenizer(tokenizer) {
            return function setKey(keys) {
                keys = _.isArray(keys) ? keys : [].slice.call(arguments, 0);
                return function tokenize(o) {
                    var tokens = [];
                    _.each(keys, function(k) {
                        tokens = tokens.concat(tokenizer(_.toStr(o[k])));
                    });
                    return tokens;
                };
            };
        }
    }();
    var LruCache = function() {
        "use strict";
        function LruCache(maxSize) {
            this.maxSize = _.isNumber(maxSize) ? maxSize : 100;
            this.reset();
            if (this.maxSize <= 0) {
                this.set = this.get = $.noop;
            }
        }
        _.mixin(LruCache.prototype, {
            set: function set(key, val) {
                var tailItem = this.list.tail, node;
                if (this.size >= this.maxSize) {
                    this.list.remove(tailItem);
                    delete this.hash[tailItem.key];
                    this.size--;
                }
                if (node = this.hash[key]) {
                    node.val = val;
                    this.list.moveToFront(node);
                } else {
                    node = new Node(key, val);
                    this.list.add(node);
                    this.hash[key] = node;
                    this.size++;
                }
            },
            get: function get(key) {
                var node = this.hash[key];
                if (node) {
                    this.list.moveToFront(node);
                    return node.val;
                }
            },
            reset: function reset() {
                this.size = 0;
                this.hash = {};
                this.list = new List();
            }
        });
        function List() {
            this.head = this.tail = null;
        }
        _.mixin(List.prototype, {
            add: function add(node) {
                if (this.head) {
                    node.next = this.head;
                    this.head.prev = node;
                }
                this.head = node;
                this.tail = this.tail || node;
            },
            remove: function remove(node) {
                node.prev ? node.prev.next = node.next : this.head = node.next;
                node.next ? node.next.prev = node.prev : this.tail = node.prev;
            },
            moveToFront: function(node) {
                this.remove(node);
                this.add(node);
            }
        });
        function Node(key, val) {
            this.key = key;
            this.val = val;
            this.prev = this.next = null;
        }
        return LruCache;
    }();
    var PersistentStorage = function() {
        "use strict";
        var LOCAL_STORAGE;
        try {
            LOCAL_STORAGE = window.localStorage;
            LOCAL_STORAGE.setItem("~~~", "!");
            LOCAL_STORAGE.removeItem("~~~");
        } catch (err) {
            LOCAL_STORAGE = null;
        }
        function PersistentStorage(namespace, override) {
            this.prefix = [ "__", namespace, "__" ].join("");
            this.ttlKey = "__ttl__";
            this.keyMatcher = new RegExp("^" + _.escapeRegExChars(this.prefix));
            this.ls = override || LOCAL_STORAGE;
            !this.ls && this._noop();
        }
        _.mixin(PersistentStorage.prototype, {
            _prefix: function(key) {
                return this.prefix + key;
            },
            _ttlKey: function(key) {
                return this._prefix(key) + this.ttlKey;
            },
            _noop: function() {
                this.get = this.set = this.remove = this.clear = this.isExpired = _.noop;
            },
            _safeSet: function(key, val) {
                try {
                    this.ls.setItem(key, val);
                } catch (err) {
                    if (err.name === "QuotaExceededError") {
                        this.clear();
                        this._noop();
                    }
                }
            },
            get: function(key) {
                if (this.isExpired(key)) {
                    this.remove(key);
                }
                return decode(this.ls.getItem(this._prefix(key)));
            },
            set: function(key, val, ttl) {
                if (_.isNumber(ttl)) {
                    this._safeSet(this._ttlKey(key), encode(now() + ttl));
                } else {
                    this.ls.removeItem(this._ttlKey(key));
                }
                return this._safeSet(this._prefix(key), encode(val));
            },
            remove: function(key) {
                this.ls.removeItem(this._ttlKey(key));
                this.ls.removeItem(this._prefix(key));
                return this;
            },
            clear: function() {
                var i, keys = gatherMatchingKeys(this.keyMatcher);
                for (i = keys.length; i--; ) {
                    this.remove(keys[i]);
                }
                return this;
            },
            isExpired: function(key) {
                var ttl = decode(this.ls.getItem(this._ttlKey(key)));
                return _.isNumber(ttl) && now() > ttl ? true : false;
            }
        });
        return PersistentStorage;
        function now() {
            return new Date().getTime();
        }
        function encode(val) {
            return JSON.stringify(_.isUndefined(val) ? null : val);
        }
        function decode(val) {
            return $.parseJSON(val);
        }
        function gatherMatchingKeys(keyMatcher) {
            var i, key, keys = [], len = LOCAL_STORAGE.length;
            for (i = 0; i < len; i++) {
                if ((key = LOCAL_STORAGE.key(i)).match(keyMatcher)) {
                    keys.push(key.replace(keyMatcher, ""));
                }
            }
            return keys;
        }
    }();
    var Transport = function() {
        "use strict";
        var pendingRequestsCount = 0, pendingRequests = {}, maxPendingRequests = 6, sharedCache = new LruCache(10);
        function Transport(o) {
            o = o || {};
            this.cancelled = false;
            this.lastReq = null;
            this._send = o.transport;
            this._get = o.limiter ? o.limiter(this._get) : this._get;
            this._cache = o.cache === false ? new LruCache(0) : sharedCache;
        }
        Transport.setMaxPendingRequests = function setMaxPendingRequests(num) {
            maxPendingRequests = num;
        };
        Transport.resetCache = function resetCache() {
            sharedCache.reset();
        };
        _.mixin(Transport.prototype, {
            _fingerprint: function fingerprint(o) {
                o = o || {};
                return o.url + o.type + $.param(o.data || {});
            },
            _get: function(o, cb) {
                var that = this, fingerprint, jqXhr;
                fingerprint = this._fingerprint(o);
                if (this.cancelled || fingerprint !== this.lastReq) {
                    return;
                }
                if (jqXhr = pendingRequests[fingerprint]) {
                    jqXhr.done(done).fail(fail);
                } else if (pendingRequestsCount < maxPendingRequests) {
                    pendingRequestsCount++;
                    pendingRequests[fingerprint] = this._send(o).done(done).fail(fail).always(always);
                } else {
                    this.onDeckRequestArgs = [].slice.call(arguments, 0);
                }
                function done(resp) {
                    cb(null, resp);
                    that._cache.set(fingerprint, resp);
                }
                function fail() {
                    cb(true);
                }
                function always() {
                    pendingRequestsCount--;
                    delete pendingRequests[fingerprint];
                    if (that.onDeckRequestArgs) {
                        that._get.apply(that, that.onDeckRequestArgs);
                        that.onDeckRequestArgs = null;
                    }
                }
            },
            get: function(o, cb) {
                var resp, fingerprint;
                cb = cb || $.noop;
                o = _.isString(o) ? {
                    url: o
                } : o || {};
                fingerprint = this._fingerprint(o);
                this.cancelled = false;
                this.lastReq = fingerprint;
                if (resp = this._cache.get(fingerprint)) {
                    cb(null, resp);
                } else {
                    this._get(o, cb);
                }
            },
            cancel: function() {
                this.cancelled = true;
            }
        });
        return Transport;
    }();
    var SearchIndex = window.SearchIndex = function() {
        "use strict";
        var CHILDREN = "c", IDS = "i";
        function SearchIndex(o) {
            o = o || {};
            if (!o.datumTokenizer || !o.queryTokenizer) {
                $.error("datumTokenizer and queryTokenizer are both required");
            }
            this.identify = o.identify || _.stringify;
            this.datumTokenizer = o.datumTokenizer;
            this.queryTokenizer = o.queryTokenizer;
            this.matchAnyQueryToken = o.matchAnyQueryToken;
            this.reset();
        }
        _.mixin(SearchIndex.prototype, {
            bootstrap: function bootstrap(o) {
                this.datums = o.datums;
                this.trie = o.trie;
            },
            add: function(data) {
                var that = this;
                data = _.isArray(data) ? data : [ data ];
                _.each(data, function(datum) {
                    var id, tokens;
                    that.datums[id = that.identify(datum)] = datum;
                    tokens = normalizeTokens(that.datumTokenizer(datum));
                    _.each(tokens, function(token) {
                        var node, chars, ch;
                        node = that.trie;
                        chars = token.split("");
                        while (ch = chars.shift()) {
                            node = node[CHILDREN][ch] || (node[CHILDREN][ch] = newNode());
                            node[IDS].push(id);
                        }
                    });
                });
            },
            get: function get(ids) {
                var that = this;
                return _.map(ids, function(id) {
                    return that.datums[id];
                });
            },
            search: function search(query) {
                var that = this, tokens, matches;
                tokens = normalizeTokens(this.queryTokenizer(query));
                _.each(tokens, function(token) {
                    var node, chars, ch, ids;
                    if (matches && matches.length === 0 && !that.matchAnyQueryToken) {
                        return false;
                    }
                    node = that.trie;
                    chars = token.split("");
                    while (node && (ch = chars.shift())) {
                        node = node[CHILDREN][ch];
                    }
                    if (node && chars.length === 0) {
                        ids = node[IDS].slice(0);
                        matches = matches ? getIntersection(matches, ids) : ids;
                    } else {
                        if (!that.matchAnyQueryToken) {
                            matches = [];
                            return false;
                        }
                    }
                });
                return matches ? _.map(unique(matches), function(id) {
                    return that.datums[id];
                }) : [];
            },
            all: function all() {
                var values = [];
                for (var key in this.datums) {
                    values.push(this.datums[key]);
                }
                return values;
            },
            reset: function reset() {
                this.datums = {};
                this.trie = newNode();
            },
            serialize: function serialize() {
                return {
                    datums: this.datums,
                    trie: this.trie
                };
            }
        });
        return SearchIndex;
        function normalizeTokens(tokens) {
            tokens = _.filter(tokens, function(token) {
                return !!token;
            });
            tokens = _.map(tokens, function(token) {
                return token.toLowerCase();
            });
            return tokens;
        }
        function newNode() {
            var node = {};
            node[IDS] = [];
            node[CHILDREN] = {};
            return node;
        }
        function unique(array) {
            var seen = {}, uniques = [];
            for (var i = 0, len = array.length; i < len; i++) {
                if (!seen[array[i]]) {
                    seen[array[i]] = true;
                    uniques.push(array[i]);
                }
            }
            return uniques;
        }
        function getIntersection(arrayA, arrayB) {
            var ai = 0, bi = 0, intersection = [];
            arrayA = arrayA.sort();
            arrayB = arrayB.sort();
            var lenArrayA = arrayA.length, lenArrayB = arrayB.length;
            while (ai < lenArrayA && bi < lenArrayB) {
                if (arrayA[ai] < arrayB[bi]) {
                    ai++;
                } else if (arrayA[ai] > arrayB[bi]) {
                    bi++;
                } else {
                    intersection.push(arrayA[ai]);
                    ai++;
                    bi++;
                }
            }
            return intersection;
        }
    }();
    var Prefetch = function() {
        "use strict";
        var keys;
        keys = {
            data: "data",
            protocol: "protocol",
            thumbprint: "thumbprint"
        };
        function Prefetch(o) {
            this.url = o.url;
            this.ttl = o.ttl;
            this.cache = o.cache;
            this.prepare = o.prepare;
            this.transform = o.transform;
            this.transport = o.transport;
            this.thumbprint = o.thumbprint;
            this.storage = new PersistentStorage(o.cacheKey);
        }
        _.mixin(Prefetch.prototype, {
            _settings: function settings() {
                return {
                    url: this.url,
                    type: "GET",
                    dataType: "json"
                };
            },
            store: function store(data) {
                if (!this.cache) {
                    return;
                }
                this.storage.set(keys.data, data, this.ttl);
                this.storage.set(keys.protocol, location.protocol, this.ttl);
                this.storage.set(keys.thumbprint, this.thumbprint, this.ttl);
            },
            fromCache: function fromCache() {
                var stored = {}, isExpired;
                if (!this.cache) {
                    return null;
                }
                stored.data = this.storage.get(keys.data);
                stored.protocol = this.storage.get(keys.protocol);
                stored.thumbprint = this.storage.get(keys.thumbprint);
                isExpired = stored.thumbprint !== this.thumbprint || stored.protocol !== location.protocol;
                return stored.data && !isExpired ? stored.data : null;
            },
            fromNetwork: function(cb) {
                var that = this, settings;
                if (!cb) {
                    return;
                }
                settings = this.prepare(this._settings());
                this.transport(settings).fail(onError).done(onResponse);
                function onError() {
                    cb(true);
                }
                function onResponse(resp) {
                    cb(null, that.transform(resp));
                }
            },
            clear: function clear() {
                this.storage.clear();
                return this;
            }
        });
        return Prefetch;
    }();
    var Remote = function() {
        "use strict";
        function Remote(o) {
            this.url = o.url;
            this.prepare = o.prepare;
            this.transform = o.transform;
            this.indexResponse = o.indexResponse;
            this.transport = new Transport({
                cache: o.cache,
                limiter: o.limiter,
                transport: o.transport
            });
        }
        _.mixin(Remote.prototype, {
            _settings: function settings() {
                return {
                    url: this.url,
                    type: "GET",
                    dataType: "json"
                };
            },
            get: function get(query, cb) {
                var that = this, settings;
                if (!cb) {
                    return;
                }
                query = query || "";
                settings = this.prepare(query, this._settings());
                return this.transport.get(settings, onResponse);
                function onResponse(err, resp) {
                    err ? cb([]) : cb(that.transform(resp));
                }
            },
            cancelLastRequest: function cancelLastRequest() {
                this.transport.cancel();
            }
        });
        return Remote;
    }();
    var oParser = function() {
        "use strict";
        return function parse(o) {
            var defaults, sorter;
            defaults = {
                initialize: true,
                identify: _.stringify,
                datumTokenizer: null,
                queryTokenizer: null,
                matchAnyQueryToken: false,
                sufficient: 5,
                indexRemote: false,
                sorter: null,
                local: [],
                prefetch: null,
                remote: null
            };
            o = _.mixin(defaults, o || {});
            !o.datumTokenizer && $.error("datumTokenizer is required");
            !o.queryTokenizer && $.error("queryTokenizer is required");
            sorter = o.sorter;
            o.sorter = sorter ? function(x) {
                return x.sort(sorter);
            } : _.identity;
            o.local = _.isFunction(o.local) ? o.local() : o.local;
            o.prefetch = parsePrefetch(o.prefetch);
            o.remote = parseRemote(o.remote);
            return o;
        };
        function parsePrefetch(o) {
            var defaults;
            if (!o) {
                return null;
            }
            defaults = {
                url: null,
                ttl: 24 * 60 * 60 * 1e3,
                cache: true,
                cacheKey: null,
                thumbprint: "",
                prepare: _.identity,
                transform: _.identity,
                transport: null
            };
            o = _.isString(o) ? {
                url: o
            } : o;
            o = _.mixin(defaults, o);
            !o.url && $.error("prefetch requires url to be set");
            o.transform = o.filter || o.transform;
            o.cacheKey = o.cacheKey || o.url;
            o.thumbprint = VERSION + o.thumbprint;
            o.transport = o.transport ? callbackToDeferred(o.transport) : $.ajax;
            return o;
        }
        function parseRemote(o) {
            var defaults;
            if (!o) {
                return;
            }
            defaults = {
                url: null,
                cache: true,
                prepare: null,
                replace: null,
                wildcard: null,
                limiter: null,
                rateLimitBy: "debounce",
                rateLimitWait: 300,
                transform: _.identity,
                transport: null
            };
            o = _.isString(o) ? {
                url: o
            } : o;
            o = _.mixin(defaults, o);
            !o.url && $.error("remote requires url to be set");
            o.transform = o.filter || o.transform;
            o.prepare = toRemotePrepare(o);
            o.limiter = toLimiter(o);
            o.transport = o.transport ? callbackToDeferred(o.transport) : $.ajax;
            delete o.replace;
            delete o.wildcard;
            delete o.rateLimitBy;
            delete o.rateLimitWait;
            return o;
        }
        function toRemotePrepare(o) {
            var prepare, replace, wildcard;
            prepare = o.prepare;
            replace = o.replace;
            wildcard = o.wildcard;
            if (prepare) {
                return prepare;
            }
            if (replace) {
                prepare = prepareByReplace;
            } else if (o.wildcard) {
                prepare = prepareByWildcard;
            } else {
                prepare = idenityPrepare;
            }
            return prepare;
            function prepareByReplace(query, settings) {
                settings.url = replace(settings.url, query);
                return settings;
            }
            function prepareByWildcard(query, settings) {
                settings.url = settings.url.replace(wildcard, encodeURIComponent(query));
                return settings;
            }
            function idenityPrepare(query, settings) {
                return settings;
            }
        }
        function toLimiter(o) {
            var limiter, method, wait;
            limiter = o.limiter;
            method = o.rateLimitBy;
            wait = o.rateLimitWait;
            if (!limiter) {
                limiter = /^throttle$/i.test(method) ? throttle(wait) : debounce(wait);
            }
            return limiter;
            function debounce(wait) {
                return function debounce(fn) {
                    return _.debounce(fn, wait);
                };
            }
            function throttle(wait) {
                return function throttle(fn) {
                    return _.throttle(fn, wait);
                };
            }
        }
        function callbackToDeferred(fn) {
            return function wrapper(o) {
                var deferred = $.Deferred();
                fn(o, onSuccess, onError);
                return deferred;
                function onSuccess(resp) {
                    _.defer(function() {
                        deferred.resolve(resp);
                    });
                }
                function onError(err) {
                    _.defer(function() {
                        deferred.reject(err);
                    });
                }
            };
        }
    }();
    var Bloodhound = function() {
        "use strict";
        var old;
        old = window && window.Bloodhound;
        function Bloodhound(o) {
            o = oParser(o);
            this.sorter = o.sorter;
            this.identify = o.identify;
            this.sufficient = o.sufficient;
            this.indexRemote = o.indexRemote;
            this.local = o.local;
            this.remote = o.remote ? new Remote(o.remote) : null;
            this.prefetch = o.prefetch ? new Prefetch(o.prefetch) : null;
            this.index = new SearchIndex({
                identify: this.identify,
                datumTokenizer: o.datumTokenizer,
                queryTokenizer: o.queryTokenizer
            });
            o.initialize !== false && this.initialize();
        }
        Bloodhound.noConflict = function noConflict() {
            window && (window.Bloodhound = old);
            return Bloodhound;
        };
        Bloodhound.tokenizers = tokenizers;
        _.mixin(Bloodhound.prototype, {
            __ttAdapter: function ttAdapter() {
                var that = this;
                return this.remote ? withAsync : withoutAsync;
                function withAsync(query, sync, async) {
                    return that.search(query, sync, async);
                }
                function withoutAsync(query, sync) {
                    return that.search(query, sync);
                }
            },
            _loadPrefetch: function loadPrefetch() {
                var that = this, deferred, serialized;
                deferred = $.Deferred();
                if (!this.prefetch) {
                    deferred.resolve();
                } else if (serialized = this.prefetch.fromCache()) {
                    this.index.bootstrap(serialized);
                    deferred.resolve();
                } else {
                    this.prefetch.fromNetwork(done);
                }
                return deferred.promise();
                function done(err, data) {
                    if (err) {
                        return deferred.reject();
                    }
                    that.add(data);
                    that.prefetch.store(that.index.serialize());
                    deferred.resolve();
                }
            },
            _initialize: function initialize() {
                var that = this, deferred;
                this.clear();
                (this.initPromise = this._loadPrefetch()).done(addLocalToIndex);
                return this.initPromise;
                function addLocalToIndex() {
                    that.add(that.local);
                }
            },
            initialize: function initialize(force) {
                return !this.initPromise || force ? this._initialize() : this.initPromise;
            },
            add: function add(data) {
                this.index.add(data);
                return this;
            },
            get: function get(ids) {
                ids = _.isArray(ids) ? ids : [].slice.call(arguments);
                return this.index.get(ids);
            },
            search: function search(query, sync, async) {
                var that = this, local;
                sync = sync || _.noop;
                async = async || _.noop;
                local = this.sorter(this.index.search(query));
                sync(this.remote ? local.slice() : local);
                if (this.remote && local.length < this.sufficient) {
                    this.remote.get(query, processRemote);
                } else if (this.remote) {
                    this.remote.cancelLastRequest();
                }
                return this;
                function processRemote(remote) {
                    var nonDuplicates = [];
                    _.each(remote, function(r) {
                        !_.some(local, function(l) {
                            return that.identify(r) === that.identify(l);
                        }) && nonDuplicates.push(r);
                    });
                    that.indexRemote && that.add(nonDuplicates);
                    async(nonDuplicates);
                }
            },
            all: function all() {
                return this.index.all();
            },
            clear: function clear() {
                this.index.reset();
                return this;
            },
            clearPrefetchCache: function clearPrefetchCache() {
                this.prefetch && this.prefetch.clear();
                return this;
            },
            clearRemoteCache: function clearRemoteCache() {
                Transport.resetCache();
                return this;
            },
            ttAdapter: function ttAdapter() {
                return this.__ttAdapter();
            }
        });
        return Bloodhound;
    }();
    return Bloodhound;
});

(function(root, factory) {
    if (typeof define === "function" && define.amd) {
        define([ "jquery" ], function(a0) {
            return factory(a0);
        });
    } else if (typeof exports === "object") {
        module.exports = factory(require("jquery"));
    } else {
        factory(jQuery);
    }
})(this, function($) {
    var _ = function() {
        "use strict";
        return {
            isMsie: function() {
                return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
            },
            isBlankString: function(str) {
                return !str || /^\s*$/.test(str);
            },
            escapeRegExChars: function(str) {
                return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
            },
            isString: function(obj) {
                return typeof obj === "string";
            },
            isNumber: function(obj) {
                return typeof obj === "number";
            },
            isArray: $.isArray,
            isFunction: $.isFunction,
            isObject: $.isPlainObject,
            isUndefined: function(obj) {
                return typeof obj === "undefined";
            },
            isElement: function(obj) {
                return !!(obj && obj.nodeType === 1);
            },
            isJQuery: function(obj) {
                return obj instanceof $;
            },
            toStr: function toStr(s) {
                return _.isUndefined(s) || s === null ? "" : s + "";
            },
            bind: $.proxy,
            each: function(collection, cb) {
                $.each(collection, reverseArgs);
                function reverseArgs(index, value) {
                    return cb(value, index);
                }
            },
            map: $.map,
            filter: $.grep,
            every: function(obj, test) {
                var result = true;
                if (!obj) {
                    return result;
                }
                $.each(obj, function(key, val) {
                    if (!(result = test.call(null, val, key, obj))) {
                        return false;
                    }
                });
                return !!result;
            },
            some: function(obj, test) {
                var result = false;
                if (!obj) {
                    return result;
                }
                $.each(obj, function(key, val) {
                    if (result = test.call(null, val, key, obj)) {
                        return false;
                    }
                });
                return !!result;
            },
            mixin: $.extend,
            identity: function(x) {
                return x;
            },
            clone: function(obj) {
                return $.extend(true, {}, obj);
            },
            getIdGenerator: function() {
                var counter = 0;
                return function() {
                    return counter++;
                };
            },
            templatify: function templatify(obj) {
                return $.isFunction(obj) ? obj : template;
                function template() {
                    return String(obj);
                }
            },
            defer: function(fn) {
                setTimeout(fn, 0);
            },
            debounce: function(func, wait, immediate) {
                var timeout, result;
                return function() {
                    var context = this, args = arguments, later, callNow;
                    later = function() {
                        timeout = null;
                        if (!immediate) {
                            result = func.apply(context, args);
                        }
                    };
                    callNow = immediate && !timeout;
                    clearTimeout(timeout);
                    timeout = setTimeout(later, wait);
                    if (callNow) {
                        result = func.apply(context, args);
                    }
                    return result;
                };
            },
            throttle: function(func, wait) {
                var context, args, timeout, result, previous, later;
                previous = 0;
                later = function() {
                    previous = new Date();
                    timeout = null;
                    result = func.apply(context, args);
                };
                return function() {
                    var now = new Date(), remaining = wait - (now - previous);
                    context = this;
                    args = arguments;
                    if (remaining <= 0) {
                        clearTimeout(timeout);
                        timeout = null;
                        previous = now;
                        result = func.apply(context, args);
                    } else if (!timeout) {
                        timeout = setTimeout(later, remaining);
                    }
                    return result;
                };
            },
            stringify: function(val) {
                return _.isString(val) ? val : JSON.stringify(val);
            },
            noop: function() {}
        };
    }();
    var WWW = function() {
        "use strict";
        var defaultClassNames = {
            wrapper: "twitter-typeahead",
            input: "tt-input",
            hint: "tt-hint",
            menu: "tt-menu",
            dataset: "tt-dataset",
            suggestion: "tt-suggestion",
            selectable: "tt-selectable",
            empty: "tt-empty",
            open: "tt-open",
            cursor: "tt-cursor",
            highlight: "tt-highlight"
        };
        return build;
        function build(o) {
            var www, classes;
            classes = _.mixin({}, defaultClassNames, o);
            www = {
                css: buildCss(),
                classes: classes,
                html: buildHtml(classes),
                selectors: buildSelectors(classes)
            };
            return {
                css: www.css,
                html: www.html,
                classes: www.classes,
                selectors: www.selectors,
                mixin: function(o) {
                    _.mixin(o, www);
                }
            };
        }
        function buildHtml(c) {
            return {
                wrapper: '<span class="' + c.wrapper + '"></span>',
                menu: '<div class="' + c.menu + '"></div>'
            };
        }
        function buildSelectors(classes) {
            var selectors = {};
            _.each(classes, function(v, k) {
                selectors[k] = "." + v;
            });
            return selectors;
        }
        function buildCss() {
            var css = {
                wrapper: {
                    position: "relative",
                    display: "inline-block"
                },
                hint: {
                    position: "absolute",
                    top: "0",
                    left: "0",
                    borderColor: "transparent",
                    boxShadow: "none",
                    opacity: "1"
                },
                input: {
                    position: "relative",
                    verticalAlign: "top",
                    backgroundColor: "transparent"
                },
                inputWithNoHint: {
                    position: "relative",
                    verticalAlign: "top"
                },
                menu: {
                    position: "absolute",
                    top: "100%",
                    left: "0",
                    zIndex: "100",
                    display: "none"
                },
                ltr: {
                    left: "0",
                    right: "auto"
                },
                rtl: {
                    left: "auto",
                    right: " 0"
                }
            };
            if (_.isMsie()) {
                _.mixin(css.input, {
                    backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"
                });
            }
            return css;
        }
    }();
    var EventBus = function() {
        "use strict";
        var namespace, deprecationMap;
        namespace = "typeahead:";
        deprecationMap = {
            render: "rendered",
            cursorchange: "cursorchanged",
            select: "selected",
            autocomplete: "autocompleted"
        };
        function EventBus(o) {
            if (!o || !o.el) {
                $.error("EventBus initialized without el");
            }
            this.$el = $(o.el);
        }
        _.mixin(EventBus.prototype, {
            _trigger: function(type, args) {
                var $e;
                $e = $.Event(namespace + type);
                (args = args || []).unshift($e);
                this.$el.trigger.apply(this.$el, args);
                return $e;
            },
            before: function(type) {
                var args, $e;
                args = [].slice.call(arguments, 1);
                $e = this._trigger("before" + type, args);
                return $e.isDefaultPrevented();
            },
            trigger: function(type) {
                var deprecatedType;
                this._trigger(type, [].slice.call(arguments, 1));
                if (deprecatedType = deprecationMap[type]) {
                    this._trigger(deprecatedType, [].slice.call(arguments, 1));
                }
            }
        });
        return EventBus;
    }();
    var EventEmitter = function() {
        "use strict";
        var splitter = /\s+/, nextTick = getNextTick();
        return {
            onSync: onSync,
            onAsync: onAsync,
            off: off,
            trigger: trigger
        };
        function on(method, types, cb, context) {
            var type;
            if (!cb) {
                return this;
            }
            types = types.split(splitter);
            cb = context ? bindContext(cb, context) : cb;
            this._callbacks = this._callbacks || {};
            while (type = types.shift()) {
                this._callbacks[type] = this._callbacks[type] || {
                    sync: [],
                    async: []
                };
                this._callbacks[type][method].push(cb);
            }
            return this;
        }
        function onAsync(types, cb, context) {
            return on.call(this, "async", types, cb, context);
        }
        function onSync(types, cb, context) {
            return on.call(this, "sync", types, cb, context);
        }
        function off(types) {
            var type;
            if (!this._callbacks) {
                return this;
            }
            types = types.split(splitter);
            while (type = types.shift()) {
                delete this._callbacks[type];
            }
            return this;
        }
        function trigger(types) {
            var type, callbacks, args, syncFlush, asyncFlush;
            if (!this._callbacks) {
                return this;
            }
            types = types.split(splitter);
            args = [].slice.call(arguments, 1);
            while ((type = types.shift()) && (callbacks = this._callbacks[type])) {
                syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args));
                asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args));
                syncFlush() && nextTick(asyncFlush);
            }
            return this;
        }
        function getFlush(callbacks, context, args) {
            return flush;
            function flush() {
                var cancelled;
                for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) {
                    cancelled = callbacks[i].apply(context, args) === false;
                }
                return !cancelled;
            }
        }
        function getNextTick() {
            var nextTickFn;
            if (window.setImmediate) {
                nextTickFn = function nextTickSetImmediate(fn) {
                    setImmediate(function() {
                        fn();
                    });
                };
            } else {
                nextTickFn = function nextTickSetTimeout(fn) {
                    setTimeout(function() {
                        fn();
                    }, 0);
                };
            }
            return nextTickFn;
        }
        function bindContext(fn, context) {
            return fn.bind ? fn.bind(context) : function() {
                fn.apply(context, [].slice.call(arguments, 0));
            };
        }
    }();
    var highlight = function(doc) {
        "use strict";
        var defaults = {
            node: null,
            pattern: null,
            tagName: "strong",
            className: null,
            wordsOnly: false,
            caseSensitive: false
        };
        return function hightlight(o) {
            var regex;
            o = _.mixin({}, defaults, o);
            if (!o.node || !o.pattern) {
                return;
            }
            o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
            regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly);
            traverse(o.node, hightlightTextNode);
            function hightlightTextNode(textNode) {
                var match, patternNode, wrapperNode;
                if (match = regex.exec(textNode.data)) {
                    wrapperNode = doc.createElement(o.tagName);
                    o.className && (wrapperNode.className = o.className);
                    patternNode = textNode.splitText(match.index);
                    patternNode.splitText(match[0].length);
                    wrapperNode.appendChild(patternNode.cloneNode(true));
                    textNode.parentNode.replaceChild(wrapperNode, patternNode);
                }
                return !!match;
            }
            function traverse(el, hightlightTextNode) {
                var childNode, TEXT_NODE_TYPE = 3;
                for (var i = 0; i < el.childNodes.length; i++) {
                    childNode = el.childNodes[i];
                    if (childNode.nodeType === TEXT_NODE_TYPE) {
                        i += hightlightTextNode(childNode) ? 1 : 0;
                    } else {
                        traverse(childNode, hightlightTextNode);
                    }
                }
            }
        };
        function getRegex(patterns, caseSensitive, wordsOnly) {
            var escapedPatterns = [], regexStr;
            for (var i = 0, len = patterns.length; i < len; i++) {
                escapedPatterns.push(_.escapeRegExChars(patterns[i]));
            }
            regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
            return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
        }
    }(window.document);
    var Input = function() {
        "use strict";
        var specialKeyCodeMap;
        specialKeyCodeMap = {
            9: "tab",
            27: "esc",
            37: "left",
            39: "right",
            13: "enter",
            38: "up",
            40: "down"
        };
        function Input(o, www) {
            o = o || {};
            if (!o.input) {
                $.error("input is missing");
            }
            www.mixin(this);
            this.$hint = $(o.hint);
            this.$input = $(o.input);
            this.query = this.$input.val();
            this.queryWhenFocused = this.hasFocus() ? this.query : null;
            this.$overflowHelper = buildOverflowHelper(this.$input);
            this._checkLanguageDirection();
            if (this.$hint.length === 0) {
                this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
            }
        }
        Input.normalizeQuery = function(str) {
            return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
        };
        _.mixin(Input.prototype, EventEmitter, {
            _onBlur: function onBlur() {
                this.resetInputValue();
                this.trigger("blurred");
            },
            _onFocus: function onFocus() {
                this.queryWhenFocused = this.query;
                this.trigger("focused");
            },
            _onKeydown: function onKeydown($e) {
                var keyName = specialKeyCodeMap[$e.which || $e.keyCode];
                this._managePreventDefault(keyName, $e);
                if (keyName && this._shouldTrigger(keyName, $e)) {
                    this.trigger(keyName + "Keyed", $e);
                }
            },
            _onInput: function onInput() {
                this._setQuery(this.getInputValue());
                this.clearHintIfInvalid();
                this._checkLanguageDirection();
            },
            _managePreventDefault: function managePreventDefault(keyName, $e) {
                var preventDefault;
                switch (keyName) {
                  case "up":
                  case "down":
                    preventDefault = !withModifier($e);
                    break;

                  default:
                    preventDefault = false;
                }
                preventDefault && $e.preventDefault();
            },
            _shouldTrigger: function shouldTrigger(keyName, $e) {
                var trigger;
                switch (keyName) {
                  case "tab":
                    trigger = !withModifier($e);
                    break;

                  default:
                    trigger = true;
                }
                return trigger;
            },
            _checkLanguageDirection: function checkLanguageDirection() {
                var dir = (this.$input.css("direction") || "ltr").toLowerCase();
                if (this.dir !== dir) {
                    this.dir = dir;
                    this.$hint.attr("dir", dir);
                    this.trigger("langDirChanged", dir);
                }
            },
            _setQuery: function setQuery(val, silent) {
                var areEquivalent, hasDifferentWhitespace;
                areEquivalent = areQueriesEquivalent(val, this.query);
                hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false;
                this.query = val;
                if (!silent && !areEquivalent) {
                    this.trigger("queryChanged", this.query);
                } else if (!silent && hasDifferentWhitespace) {
                    this.trigger("whitespaceChanged", this.query);
                }
            },
            bind: function() {
                var that = this, onBlur, onFocus, onKeydown, onInput;
                onBlur = _.bind(this._onBlur, this);
                onFocus = _.bind(this._onFocus, this);
                onKeydown = _.bind(this._onKeydown, this);
                onInput = _.bind(this._onInput, this);
                this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown);
                if (!_.isMsie() || _.isMsie() > 9) {
                    this.$input.on("input.tt", onInput);
                } else {
                    this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) {
                        if (specialKeyCodeMap[$e.which || $e.keyCode]) {
                            return;
                        }
                        _.defer(_.bind(that._onInput, that, $e));
                    });
                }
                return this;
            },
            focus: function focus() {
                this.$input.focus();
            },
            blur: function blur() {
                this.$input.blur();
            },
            getLangDir: function getLangDir() {
                return this.dir;
            },
            getQuery: function getQuery() {
                return this.query || "";
            },
            setQuery: function setQuery(val, silent) {
                this.setInputValue(val);
                this._setQuery(val, silent);
            },
            hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() {
                return this.query !== this.queryWhenFocused;
            },
            getInputValue: function getInputValue() {
                return this.$input.val();
            },
            setInputValue: function setInputValue(value) {
                this.$input.val(value);
                this.clearHintIfInvalid();
                this._checkLanguageDirection();
            },
            resetInputValue: function resetInputValue() {
                this.setInputValue(this.query);
            },
            getHint: function getHint() {
                return this.$hint.val();
            },
            setHint: function setHint(value) {
                this.$hint.val(value);
            },
            clearHint: function clearHint() {
                this.setHint("");
            },
            clearHintIfInvalid: function clearHintIfInvalid() {
                var val, hint, valIsPrefixOfHint, isValid;
                val = this.getInputValue();
                hint = this.getHint();
                valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0;
                isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow();
                !isValid && this.clearHint();
            },
            hasFocus: function hasFocus() {
                return this.$input.is(":focus");
            },
            hasOverflow: function hasOverflow() {
                var constraint = this.$input.width() - 2;
                this.$overflowHelper.text(this.getInputValue());
                return this.$overflowHelper.width() >= constraint;
            },
            isCursorAtEnd: function() {
                var valueLength, selectionStart, range;
                valueLength = this.$input.val().length;
                selectionStart = this.$input[0].selectionStart;
                if (_.isNumber(selectionStart)) {
                    return selectionStart === valueLength;
                } else if (document.selection) {
                    range = document.selection.createRange();
                    range.moveStart("character", -valueLength);
                    return valueLength === range.text.length;
                }
                return true;
            },
            destroy: function destroy() {
                this.$hint.off(".tt");
                this.$input.off(".tt");
                this.$overflowHelper.remove();
                this.$hint = this.$input = this.$overflowHelper = $("<div>");
            }
        });
        return Input;
        function buildOverflowHelper($input) {
            return $('<pre aria-hidden="true"></pre>').css({
                position: "absolute",
                visibility: "hidden",
                whiteSpace: "pre",
                fontFamily: $input.css("font-family"),
                fontSize: $input.css("font-size"),
                fontStyle: $input.css("font-style"),
                fontVariant: $input.css("font-variant"),
                fontWeight: $input.css("font-weight"),
                wordSpacing: $input.css("word-spacing"),
                letterSpacing: $input.css("letter-spacing"),
                textIndent: $input.css("text-indent"),
                textRendering: $input.css("text-rendering"),
                textTransform: $input.css("text-transform")
            }).insertAfter($input);
        }
        function areQueriesEquivalent(a, b) {
            return Input.normalizeQuery(a) === Input.normalizeQuery(b);
        }
        function withModifier($e) {
            return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey;
        }
    }();
    var Dataset = function() {
        "use strict";
        var keys, nameGenerator;
        keys = {
            val: "tt-selectable-display",
            obj: "tt-selectable-object"
        };
        nameGenerator = _.getIdGenerator();
        function Dataset(o, www) {
            o = o || {};
            o.templates = o.templates || {};
            o.templates.notFound = o.templates.notFound || o.templates.empty;
            if (!o.source) {
                $.error("missing source");
            }
            if (!o.node) {
                $.error("missing node");
            }
            if (o.name && !isValidName(o.name)) {
                $.error("invalid dataset name: " + o.name);
            }
            www.mixin(this);
            this.highlight = !!o.highlight;
            this.name = o.name || nameGenerator();
            this.limit = o.limit || 5;
            this.displayFn = getDisplayFn(o.display || o.displayKey);
            this.templates = getTemplates(o.templates, this.displayFn);
            this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source;
            this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async;
            this._resetLastSuggestion();
            this.$el = $(o.node).addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
        }
        Dataset.extractData = function extractData(el) {
            var $el = $(el);
            if ($el.data(keys.obj)) {
                return {
                    val: $el.data(keys.val) || "",
                    obj: $el.data(keys.obj) || null
                };
            }
            return null;
        };
        _.mixin(Dataset.prototype, EventEmitter, {
            _overwrite: function overwrite(query, suggestions) {
                suggestions = suggestions || [];
                if (suggestions.length) {
                    this._renderSuggestions(query, suggestions);
                } else if (this.async && this.templates.pending) {
                    this._renderPending(query);
                } else if (!this.async && this.templates.notFound) {
                    this._renderNotFound(query);
                } else {
                    this._empty();
                }
                this.trigger("rendered", this.name, suggestions, false);
            },
            _append: function append(query, suggestions) {
                suggestions = suggestions || [];
                if (suggestions.length && this.$lastSuggestion.length) {
                    this._appendSuggestions(query, suggestions);
                } else if (suggestions.length) {
                    this._renderSuggestions(query, suggestions);
                } else if (!this.$lastSuggestion.length && this.templates.notFound) {
                    this._renderNotFound(query);
                }
                this.trigger("rendered", this.name, suggestions, true);
            },
            _renderSuggestions: function renderSuggestions(query, suggestions) {
                var $fragment;
                $fragment = this._getSuggestionsFragment(query, suggestions);
                this.$lastSuggestion = $fragment.children().last();
                this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions));
            },
            _appendSuggestions: function appendSuggestions(query, suggestions) {
                var $fragment, $lastSuggestion;
                $fragment = this._getSuggestionsFragment(query, suggestions);
                $lastSuggestion = $fragment.children().last();
                this.$lastSuggestion.after($fragment);
                this.$lastSuggestion = $lastSuggestion;
            },
            _renderPending: function renderPending(query) {
                var template = this.templates.pending;
                this._resetLastSuggestion();
                template && this.$el.html(template({
                    query: query,
                    dataset: this.name
                }));
            },
            _renderNotFound: function renderNotFound(query) {
                var template = this.templates.notFound;
                this._resetLastSuggestion();
                template && this.$el.html(template({
                    query: query,
                    dataset: this.name
                }));
            },
            _empty: function empty() {
                this.$el.empty();
                this._resetLastSuggestion();
            },
            _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) {
                var that = this, fragment;
                fragment = document.createDocumentFragment();
                _.each(suggestions, function getSuggestionNode(suggestion) {
                    var $el, context;
                    context = that._injectQuery(query, suggestion);
                    $el = $(that.templates.suggestion(context)).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
                    fragment.appendChild($el[0]);
                });
                this.highlight && highlight({
                    className: this.classes.highlight,
                    node: fragment,
                    pattern: query
                });
                return $(fragment);
            },
            _getFooter: function getFooter(query, suggestions) {
                return this.templates.footer ? this.templates.footer({
                    query: query,
                    suggestions: suggestions,
                    dataset: this.name
                }) : null;
            },
            _getHeader: function getHeader(query, suggestions) {
                return this.templates.header ? this.templates.header({
                    query: query,
                    suggestions: suggestions,
                    dataset: this.name
                }) : null;
            },
            _resetLastSuggestion: function resetLastSuggestion() {
                this.$lastSuggestion = $();
            },
            _injectQuery: function injectQuery(query, obj) {
                return _.isObject(obj) ? _.mixin({
                    _query: query
                }, obj) : obj;
            },
            update: function update(query) {
                var that = this, canceled = false, syncCalled = false, rendered = 0;
                this.cancel();
                this.cancel = function cancel() {
                    canceled = true;
                    that.cancel = $.noop;
                    that.async && that.trigger("asyncCanceled", query);
                };
                this.source(query, sync, async);
                !syncCalled && sync([]);
                function sync(suggestions) {
                    if (syncCalled) {
                        return;
                    }
                    syncCalled = true;
                    suggestions = (suggestions || []).slice(0, that.limit);
                    rendered = suggestions.length;
                    that._overwrite(query, suggestions);
                    if (rendered < that.limit && that.async) {
                        that.trigger("asyncRequested", query);
                    }
                }
                function async(suggestions) {
                    suggestions = suggestions || [];
                    if (!canceled && rendered < that.limit) {
                        that.cancel = $.noop;
                        that._append(query, suggestions.slice(0, that.limit - rendered));
                        rendered += suggestions.length;
                        that.async && that.trigger("asyncReceived", query);
                    }
                }
            },
            cancel: $.noop,
            clear: function clear() {
                this._empty();
                this.cancel();
                this.trigger("cleared");
            },
            isEmpty: function isEmpty() {
                return this.$el.is(":empty");
            },
            destroy: function destroy() {
                this.$el = $("<div>");
            }
        });
        return Dataset;
        function getDisplayFn(display) {
            display = display || _.stringify;
            return _.isFunction(display) ? display : displayFn;
            function displayFn(obj) {
                return obj[display];
            }
        }
        function getTemplates(templates, displayFn) {
            return {
                notFound: templates.notFound && _.templatify(templates.notFound),
                pending: templates.pending && _.templatify(templates.pending),
                header: templates.header && _.templatify(templates.header),
                footer: templates.footer && _.templatify(templates.footer),
                suggestion: templates.suggestion || suggestionTemplate
            };
            function suggestionTemplate(context) {
                return $("<div>").text(displayFn(context));
            }
        }
        function isValidName(str) {
            return /^[_a-zA-Z0-9-]+$/.test(str);
        }
    }();
    var Menu = function() {
        "use strict";
        function Menu(o, www) {
            var that = this;
            o = o || {};
            if (!o.node) {
                $.error("node is required");
            }
            www.mixin(this);
            this.$node = $(o.node);
            this.query = null;
            this.datasets = _.map(o.datasets, initializeDataset);
            function initializeDataset(oDataset) {
                var node = that.$node.find(oDataset.node).first();
                oDataset.node = node.length ? node : $("<div>").appendTo(that.$node);
                return new Dataset(oDataset, www);
            }
        }
        _.mixin(Menu.prototype, EventEmitter, {
            _onSelectableClick: function onSelectableClick($e) {
                this.trigger("selectableClicked", $($e.currentTarget));
            },
            _onRendered: function onRendered(type, dataset, suggestions, async) {
                this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty());
                this.trigger("datasetRendered", dataset, suggestions, async);
            },
            _onCleared: function onCleared() {
                this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty());
                this.trigger("datasetCleared");
            },
            _propagate: function propagate() {
                this.trigger.apply(this, arguments);
            },
            _allDatasetsEmpty: function allDatasetsEmpty() {
                return _.every(this.datasets, isDatasetEmpty);
                function isDatasetEmpty(dataset) {
                    return dataset.isEmpty();
                }
            },
            _getSelectables: function getSelectables() {
                return this.$node.find(this.selectors.selectable);
            },
            _removeCursor: function _removeCursor() {
                var $selectable = this.getActiveSelectable();
                $selectable && $selectable.removeClass(this.classes.cursor);
            },
            _ensureVisible: function ensureVisible($el) {
                var elTop, elBottom, nodeScrollTop, nodeHeight;
                elTop = $el.position().top;
                elBottom = elTop + $el.outerHeight(true);
                nodeScrollTop = this.$node.scrollTop();
                nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10);
                if (elTop < 0) {
                    this.$node.scrollTop(nodeScrollTop + elTop);
                } else if (nodeHeight < elBottom) {
                    this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight));
                }
            },
            bind: function() {
                var that = this, onSelectableClick;
                onSelectableClick = _.bind(this._onSelectableClick, this);
                this.$node.on("click.tt", this.selectors.selectable, onSelectableClick);
                this.$node.on("mouseover", this.selectors.selectable, function() {
                    that.setCursor($(this));
                });
                _.each(this.datasets, function(dataset) {
                    dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that);
                });
                return this;
            },
            isOpen: function isOpen() {
                return this.$node.hasClass(this.classes.open);
            },
            open: function open() {
                this.$node.scrollTop(0);
                this.$node.addClass(this.classes.open);
            },
            close: function close() {
                this.$node.removeClass(this.classes.open);
                this._removeCursor();
            },
            setLanguageDirection: function setLanguageDirection(dir) {
                this.$node.attr("dir", dir);
            },
            selectableRelativeToCursor: function selectableRelativeToCursor(delta) {
                var $selectables, $oldCursor, oldIndex, newIndex;
                $oldCursor = this.getActiveSelectable();
                $selectables = this._getSelectables();
                oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1;
                newIndex = oldIndex + delta;
                newIndex = (newIndex + 1) % ($selectables.length + 1) - 1;
                newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex;
                return newIndex === -1 ? null : $selectables.eq(newIndex);
            },
            setCursor: function setCursor($selectable) {
                this._removeCursor();
                if ($selectable = $selectable && $selectable.first()) {
                    $selectable.addClass(this.classes.cursor);
                    this._ensureVisible($selectable);
                }
            },
            getSelectableData: function getSelectableData($el) {
                return $el && $el.length ? Dataset.extractData($el) : null;
            },
            getActiveSelectable: function getActiveSelectable() {
                var $selectable = this._getSelectables().filter(this.selectors.cursor).first();
                return $selectable.length ? $selectable : null;
            },
            getTopSelectable: function getTopSelectable() {
                var $selectable = this._getSelectables().first();
                return $selectable.length ? $selectable : null;
            },
            update: function update(query) {
                var isValidUpdate = query !== this.query;
                if (isValidUpdate) {
                    this.query = query;
                    _.each(this.datasets, updateDataset);
                }
                return isValidUpdate;
                function updateDataset(dataset) {
                    dataset.update(query);
                }
            },
            empty: function empty() {
                _.each(this.datasets, clearDataset);
                this.query = null;
                this.$node.addClass(this.classes.empty);
                function clearDataset(dataset) {
                    dataset.clear();
                }
            },
            destroy: function destroy() {
                this.$node.off(".tt");
                this.$node = $("<div>");
                _.each(this.datasets, destroyDataset);
                function destroyDataset(dataset) {
                    dataset.destroy();
                }
            }
        });
        return Menu;
    }();
    var DefaultMenu = function() {
        "use strict";
        var s = Menu.prototype;
        function DefaultMenu() {
            Menu.apply(this, [].slice.call(arguments, 0));
        }
        _.mixin(DefaultMenu.prototype, Menu.prototype, {
            open: function open() {
                !this._allDatasetsEmpty() && this._show();
                return s.open.apply(this, [].slice.call(arguments, 0));
            },
            close: function close() {
                this._hide();
                return s.close.apply(this, [].slice.call(arguments, 0));
            },
            _onRendered: function onRendered() {
                if (this._allDatasetsEmpty()) {
                    this._hide();
                } else {
                    this.isOpen() && this._show();
                }
                return s._onRendered.apply(this, [].slice.call(arguments, 0));
            },
            _onCleared: function onCleared() {
                if (this._allDatasetsEmpty()) {
                    this._hide();
                } else {
                    this.isOpen() && this._show();
                }
                return s._onCleared.apply(this, [].slice.call(arguments, 0));
            },
            setLanguageDirection: function setLanguageDirection(dir) {
                this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl);
                return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0));
            },
            _hide: function hide() {
                this.$node.hide();
            },
            _show: function show() {
                this.$node.css("display", "block");
            }
        });
        return DefaultMenu;
    }();
    var Typeahead = function() {
        "use strict";
        function Typeahead(o, www) {
            var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged;
            o = o || {};
            if (!o.input) {
                $.error("missing input");
            }
            if (!o.menu) {
                $.error("missing menu");
            }
            if (!o.eventBus) {
                $.error("missing event bus");
            }
            www.mixin(this);
            this.eventBus = o.eventBus;
            this.minLength = _.isNumber(o.minLength) ? o.minLength : 1;
            this.input = o.input;
            this.menu = o.menu;
            this.enabled = true;
            this.active = false;
            this.input.hasFocus() && this.activate();
            this.dir = this.input.getLangDir();
            this._hacks();
            this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this);
            onFocused = c(this, "activate", "open", "_onFocused");
            onBlurred = c(this, "deactivate", "_onBlurred");
            onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed");
            onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed");
            onEscKeyed = c(this, "isActive", "_onEscKeyed");
            onUpKeyed = c(this, "isActive", "open", "_onUpKeyed");
            onDownKeyed = c(this, "isActive", "open", "_onDownKeyed");
            onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed");
            onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed");
            onQueryChanged = c(this, "_openIfActive", "_onQueryChanged");
            onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged");
            this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this);
        }
        _.mixin(Typeahead.prototype, {
            _hacks: function hacks() {
                var $input, $menu;
                $input = this.input.$input || $("<div>");
                $menu = this.menu.$node || $("<div>");
                $input.on("blur.tt", function($e) {
                    var active, isActive, hasActive;
                    active = document.activeElement;
                    isActive = $menu.is(active);
                    hasActive = $menu.has(active).length > 0;
                    if (_.isMsie() && (isActive || hasActive)) {
                        $e.preventDefault();
                        $e.stopImmediatePropagation();
                        _.defer(function() {
                            $input.focus();
                        });
                    }
                });
                $menu.on("mousedown.tt", function($e) {
                    $e.preventDefault();
                });
            },
            _onSelectableClicked: function onSelectableClicked(type, $el) {
                this.select($el);
            },
            _onDatasetCleared: function onDatasetCleared() {
                this._updateHint();
            },
            _onDatasetRendered: function onDatasetRendered(type, dataset, suggestions, async) {
                this._updateHint();
                this.eventBus.trigger("render", suggestions, async, dataset);
            },
            _onAsyncRequested: function onAsyncRequested(type, dataset, query) {
                this.eventBus.trigger("asyncrequest", query, dataset);
            },
            _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) {
                this.eventBus.trigger("asynccancel", query, dataset);
            },
            _onAsyncReceived: function onAsyncReceived(type, dataset, query) {
                this.eventBus.trigger("asyncreceive", query, dataset);
            },
            _onFocused: function onFocused() {
                this._minLengthMet() && this.menu.update(this.input.getQuery());
            },
            _onBlurred: function onBlurred() {
                if (this.input.hasQueryChangedSinceLastFocus()) {
                    this.eventBus.trigger("change", this.input.getQuery());
                }
            },
            _onEnterKeyed: function onEnterKeyed(type, $e) {
                var $selectable;
                if ($selectable = this.menu.getActiveSelectable()) {
                    this.select($selectable) && $e.preventDefault();
                }
            },
            _onTabKeyed: function onTabKeyed(type, $e) {
                var $selectable;
                if ($selectable = this.menu.getActiveSelectable()) {
                    this.select($selectable) && $e.preventDefault();
                } else if ($selectable = this.menu.getTopSelectable()) {
                    this.autocomplete($selectable) && $e.preventDefault();
                }
            },
            _onEscKeyed: function onEscKeyed() {
                this.close();
            },
            _onUpKeyed: function onUpKeyed() {
                this.moveCursor(-1);
            },
            _onDownKeyed: function onDownKeyed() {
                this.moveCursor(+1);
            },
            _onLeftKeyed: function onLeftKeyed() {
                if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
                    this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
                }
            },
            _onRightKeyed: function onRightKeyed() {
                if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
                    this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
                }
            },
            _onQueryChanged: function onQueryChanged(e, query) {
                this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty();
            },
            _onWhitespaceChanged: function onWhitespaceChanged() {
                this._updateHint();
            },
            _onLangDirChanged: function onLangDirChanged(e, dir) {
                if (this.dir !== dir) {
                    this.dir = dir;
                    this.menu.setLanguageDirection(dir);
                }
            },
            _openIfActive: function openIfActive() {
                this.isActive() && this.open();
            },
            _minLengthMet: function minLengthMet(query) {
                query = _.isString(query) ? query : this.input.getQuery() || "";
                return query.length >= this.minLength;
            },
            _updateHint: function updateHint() {
                var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match;
                $selectable = this.menu.getTopSelectable();
                data = this.menu.getSelectableData($selectable);
                val = this.input.getInputValue();
                if (data && !_.isBlankString(val) && !this.input.hasOverflow()) {
                    query = Input.normalizeQuery(val);
                    escapedQuery = _.escapeRegExChars(query);
                    frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i");
                    match = frontMatchRegEx.exec(data.val);
                    match && this.input.setHint(val + match[1]);
                } else {
                    this.input.clearHint();
                }
            },
            isEnabled: function isEnabled() {
                return this.enabled;
            },
            enable: function enable() {
                this.enabled = true;
            },
            disable: function disable() {
                this.enabled = false;
            },
            isActive: function isActive() {
                return this.active;
            },
            activate: function activate() {
                if (this.isActive()) {
                    return true;
                } else if (!this.isEnabled() || this.eventBus.before("active")) {
                    return false;
                } else {
                    this.active = true;
                    this.eventBus.trigger("active");
                    return true;
                }
            },
            deactivate: function deactivate() {
                if (!this.isActive()) {
                    return true;
                } else if (this.eventBus.before("idle")) {
                    return false;
                } else {
                    this.active = false;
                    this.close();
                    this.eventBus.trigger("idle");
                    return true;
                }
            },
            isOpen: function isOpen() {
                return this.menu.isOpen();
            },
            open: function open() {
                if (!this.isOpen() && !this.eventBus.before("open")) {
                    this.menu.open();
                    this._updateHint();
                    this.eventBus.trigger("open");
                }
                return this.isOpen();
            },
            close: function close() {
                if (this.isOpen() && !this.eventBus.before("close")) {
                    this.menu.close();
                    this.input.clearHint();
                    this.input.resetInputValue();
                    this.eventBus.trigger("close");
                }
                return !this.isOpen();
            },
            setVal: function setVal(val) {
                this.input.setQuery(_.toStr(val));
            },
            getVal: function getVal() {
                return this.input.getQuery();
            },
            select: function select($selectable) {
                var data = this.menu.getSelectableData($selectable);
                if (data && !this.eventBus.before("select", data.obj)) {
                    this.input.setQuery(data.val, true);
                    this.eventBus.trigger("select", data.obj);
                    this.close();
                    return true;
                }
                return false;
            },
            autocomplete: function autocomplete($selectable) {
                var query, data, isValid;
                query = this.input.getQuery();
                data = this.menu.getSelectableData($selectable);
                isValid = data && query !== data.val;
                if (isValid && !this.eventBus.before("autocomplete", data.obj)) {
                    this.input.setQuery(data.val);
                    this.eventBus.trigger("autocomplete", data.obj);
                    return true;
                }
                return false;
            },
            moveCursor: function moveCursor(delta) {
                var query, $candidate, data, payload, cancelMove;
                query = this.input.getQuery();
                $candidate = this.menu.selectableRelativeToCursor(delta);
                data = this.menu.getSelectableData($candidate);
                payload = data ? data.obj : null;
                cancelMove = this._minLengthMet() && this.menu.update(query);
                if (!cancelMove && !this.eventBus.before("cursorchange", payload)) {
                    this.menu.setCursor($candidate);
                    if (data) {
                        this.input.setInputValue(data.val);
                    } else {
                        this.input.resetInputValue();
                        this._updateHint();
                    }
                    this.eventBus.trigger("cursorchange", payload);
                    return true;
                }
                return false;
            },
            destroy: function destroy() {
                this.input.destroy();
                this.menu.destroy();
            }
        });
        return Typeahead;
        function c(ctx) {
            var methods = [].slice.call(arguments, 1);
            return function() {
                var args = [].slice.call(arguments);
                _.each(methods, function(method) {
                    return ctx[method].apply(ctx, args);
                });
            };
        }
    }();
    (function() {
        "use strict";
        var old, keys, methods;
        old = $.fn.typeahead;
        keys = {
            www: "tt-www",
            attrs: "tt-attrs",
            typeahead: "tt-typeahead"
        };
        methods = {
            initialize: function initialize(o, datasets) {
                var www;
                datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1);
                o = o || {};
                www = WWW(o.classNames);
                return this.each(attach);
                function attach() {
                    var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, typeahead, MenuConstructor;
                    _.each(datasets, function(d) {
                        d.highlight = !!o.highlight;
                    });
                    $input = $(this);
                    $wrapper = $(www.html.wrapper);
                    $hint = $elOrNull(o.hint);
                    $menu = $elOrNull(o.menu);
                    defaultHint = o.hint !== false && !$hint;
                    defaultMenu = o.menu !== false && !$menu;
                    defaultHint && ($hint = buildHintFromInput($input, www));
                    defaultMenu && ($menu = $(www.html.menu).css(www.css.menu));
                    $hint && $hint.val("");
                    $input = prepInput($input, www);
                    if (defaultHint || defaultMenu) {
                        $wrapper.css(www.css.wrapper);
                        $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint);
                        $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null);
                    }
                    MenuConstructor = defaultMenu ? DefaultMenu : Menu;
                    eventBus = new EventBus({
                        el: $input
                    });
                    input = new Input({
                        hint: $hint,
                        input: $input
                    }, www);
                    menu = new MenuConstructor({
                        node: $menu,
                        datasets: datasets
                    }, www);
                    typeahead = new Typeahead({
                        input: input,
                        menu: menu,
                        eventBus: eventBus,
                        minLength: o.minLength
                    }, www);
                    $input.data(keys.www, www);
                    $input.data(keys.typeahead, typeahead);
                }
            },
            isEnabled: function isEnabled() {
                var enabled;
                ttEach(this.first(), function(t) {
                    enabled = t.isEnabled();
                });
                return enabled;
            },
            enable: function enable() {
                ttEach(this, function(t) {
                    t.enable();
                });
                return this;
            },
            disable: function disable() {
                ttEach(this, function(t) {
                    t.disable();
                });
                return this;
            },
            isActive: function isActive() {
                var active;
                ttEach(this.first(), function(t) {
                    active = t.isActive();
                });
                return active;
            },
            activate: function activate() {
                ttEach(this, function(t) {
                    t.activate();
                });
                return this;
            },
            deactivate: function deactivate() {
                ttEach(this, function(t) {
                    t.deactivate();
                });
                return this;
            },
            isOpen: function isOpen() {
                var open;
                ttEach(this.first(), function(t) {
                    open = t.isOpen();
                });
                return open;
            },
            open: function open() {
                ttEach(this, function(t) {
                    t.open();
                });
                return this;
            },
            close: function close() {
                ttEach(this, function(t) {
                    t.close();
                });
                return this;
            },
            select: function select(el) {
                var success = false, $el = $(el);
                ttEach(this.first(), function(t) {
                    success = t.select($el);
                });
                return success;
            },
            autocomplete: function autocomplete(el) {
                var success = false, $el = $(el);
                ttEach(this.first(), function(t) {
                    success = t.autocomplete($el);
                });
                return success;
            },
            moveCursor: function moveCursoe(delta) {
                var success = false;
                ttEach(this.first(), function(t) {
                    success = t.moveCursor(delta);
                });
                return success;
            },
            val: function val(newVal) {
                var query;
                if (!arguments.length) {
                    ttEach(this.first(), function(t) {
                        query = t.getVal();
                    });
                    return query;
                } else {
                    ttEach(this, function(t) {
                        t.setVal(_.toStr(newVal));
                    });
                    return this;
                }
            },
            destroy: function destroy() {
                ttEach(this, function(typeahead, $input) {
                    revert($input);
                    typeahead.destroy();
                });
                return this;
            }
        };
        $.fn.typeahead = function(method) {
            if (methods[method]) {
                return methods[method].apply(this, [].slice.call(arguments, 1));
            } else {
                return methods.initialize.apply(this, arguments);
            }
        };
        $.fn.typeahead.noConflict = function noConflict() {
            $.fn.typeahead = old;
            return this;
        };
        function ttEach($els, fn) {
            $els.each(function() {
                var $input = $(this), typeahead;
                (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input);
            });
        }
        function buildHintFromInput($input, www) {
	        return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop("readonly", true).removeAttr("id name placeholder").removeProp("required").attr({
                autocomplete: "off",
                spellcheck: "false",
                tabindex: -1
            });
        }
        function prepInput($input, www) {
            $input.data(keys.attrs, {
                dir: $input.attr("dir"),
                autocomplete: $input.attr("autocomplete"),
                spellcheck: $input.attr("spellcheck"),
                style: $input.attr("style")
            });
            $input.addClass(www.classes.input).attr({
                autocomplete: "off",
                spellcheck: false
            });
            try {
                !$input.attr("dir") && $input.attr("dir", "auto");
            } catch (e) {}
            return $input;
        }
        function getBackgroundStyles($el) {
            return {
                backgroundAttachment: $el.css("background-attachment"),
                backgroundClip: $el.css("background-clip"),
                backgroundColor: $el.css("background-color"),
                backgroundImage: $el.css("background-image"),
                backgroundOrigin: $el.css("background-origin"),
                backgroundPosition: $el.css("background-position"),
                backgroundRepeat: $el.css("background-repeat"),
                backgroundSize: $el.css("background-size")
            };
        }
        function revert($input) {
            var www, $wrapper;
            www = $input.data(keys.www);
            $wrapper = $input.parent().filter(www.selectors.wrapper);
            _.each($input.data(keys.attrs), function(val, key) {
                _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val);
            });
            $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input);
            if ($wrapper.length) {
                $input.detach().insertAfter($wrapper);
                $wrapper.remove();
            }
        }
        function $elOrNull(obj) {
            var isValid, $el;
            isValid = _.isJQuery(obj) || _.isElement(obj);
            $el = isValid ? $(obj).first() : [];
            return $el.length ? $el : null;
        }
    })();
});;
var a,b;a=this,b=function(){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function t(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function c(i){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?t(Object(r),!0).forEach(function(e){var t,n;t=i,e=r[n=e],n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(r,e))})}return i}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function l(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,t=function(){};return{s:t,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}function u(e,t){for(var n=document.getElementsByClassName(e.resultsList.className),i=0;i<n.length;i++)t!==n[i]&&t!==e.inputField&&n[i].parentNode.removeChild(n[i]);e.inputField.removeAttribute("aria-activedescendant"),e.inputField.setAttribute("aria-expanded",!1)}function r(a,s,l){var e,t,u=(e=a,(t=document.createElement(e.resultsList.element)).setAttribute("id",e.resultsList.idName),t.setAttribute("aria-label",e.name),t.setAttribute("class",e.resultsList.className),t.setAttribute("role","listbox"),t.setAttribute("tabindex","-1"),e.resultsList.container&&e.resultsList.container(t),e.inputField.parentNode.appendChild(t),t);a.inputField.setAttribute("aria-expanded",!0);for(var n=function(t){var e,n,i,r,o=s.results[t],r=(e=o,n=t,i=a,(r=document.createElement(i.resultItem.element)).setAttribute("id","".concat(i.resultItem.className,"_").concat(n)),r.setAttribute("class",i.resultItem.className),r.setAttribute("role","option"),r.innerHTML=e.match,i.resultItem.content&&i.resultItem.content(e.value,r),r);r.addEventListener("click",function(){var e={matches:l,input:s.input,query:s.query,results:s.results,selection:c(c({},o),{},{index:t})};a.onSelection&&a.onSelection(e)}),u.appendChild(r)},i=0;i<s.results.length;i++)n(i);return u}function d(e,t,n){e.dispatchEvent(new CustomEvent(n,{bubbles:!0,detail:t,cancelable:!0}))}function o(n,r){function i(e,t,n,i){e.preventDefault(),n?o++:o--,a(t),i.inputField.setAttribute("aria-activedescendant",t[o].id),d(e.srcElement,c(c({event:e},r),{},{selection:r.results[o]}),"navigation")}var o=-1,a=function(e){if(!e)return!1;!function(e){for(var t=0;t<e.length;t++)e[t].removeAttribute("aria-selected"),e[t].classList.remove("autoComplete_selected")}(e),o>=e.length&&(o=0),o<0&&(o=e.length-1),e[o].setAttribute("aria-selected","true"),e[o].classList.add("autoComplete_selected")},s=n.resultsList.navigation||function(e){var t=document.getElementById(n.resultsList.idName);if(!t)return n.inputField.removeEventListener("keydown",s);t=t.getElementsByTagName(n.resultItem.element),27===e.keyCode?(n.inputField.value="",u(n)):40===e.keyCode||9===e.keyCode?i(e,t,!0,n):38===e.keyCode||9===e.keyCode?i(e,t,!1,n):13===e.keyCode&&(e.preventDefault(),-1<o&&t&&t[o].click())};n.inputField.addEventListener("keydown",s)}function a(o,a){for(var s=[],e=function(n){function e(e){var t=(e?i[e]:i).toString();t&&((t="function"==typeof o.searchEngine?o.searchEngine(a,t):function(e,t,n){var i=n.diacritics?t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""):t.toLowerCase();if("loose"===n.searchEngine){e=e.replace(/ /g,"");for(var r=[],o=0,a=0;a<i.length;a++){var s=t[a];o<e.length&&i[a]===e[o]&&(s=n.highlight?'<span class="autoComplete_highlighted">'.concat(s,"</span>"):s,o++),r.push(s)}if(o===e.length)return r.join("")}else if(i.includes(e))return e=new RegExp("".concat(e),"i").exec(t),n.highlight?t.replace(e,'<span class="autoComplete_highlighted">'.concat(e,"</span>")):t}(a,t,o))&&e?s.push({key:e,index:n,match:t,value:i}):t&&!e&&s.push({index:n,match:t,value:i}))}var i=o.data.store[n];if(o.data.key){var t,r=l(o.data.key);try{for(r.s();!(t=r.n()).done;)e(t.value)}catch(e){r.e(e)}finally{r.f()}}else e()},t=0;t<o.data.store.length;t++)e(t);return o.sort?s.sort(o.sort):s}return function(){function I(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,I);var t=e.name,n=void 0===t?"Search":t,i=e.selector,r=void 0===i?"#autoComplete":i,o=e.data,a=o.src,s=o.key,l=o.cache,u=void 0!==l&&l,c=o.store,d=e.query,h=e.trigger,p=(h=void 0===h?{}:h).event,f=void 0===p?["input"]:p,v=h.condition,m=void 0!==v&&v,b=e.searchEngine,y=void 0===b?"strict":b,g=e.diacritics,k=void 0!==g&&g,F=e.threshold,A=void 0===F?1:F,L=e.debounce,w=void 0===L?0:L,C=e.resultsList,E=(C=void 0===C?{}:C).render,O=void 0===E||E,N=C.container,x=void 0!==N&&N,j=C.destination,S=C.position,t=void 0===S?"afterend":S,i=C.element,l=void 0===i?"ul":i,o=C.idName,p=void 0===o?"autoComplete_list":o,h=C.className,v=void 0===h?"autoComplete_list":h,b=C.navigation,g=void 0!==b&&b,F=e.sort,L=void 0!==F&&F,E=e.placeHolder,N=e.maxResults,S=void 0===N?5:N,i=e.resultItem,o=(i=void 0===i?{}:i).content,h=void 0!==o&&o,C=i.element,b=void 0===C?"li":C,F=i.idName,N=void 0===F?"autoComplete_result":F,o=i.className,C=void 0===o?"autoComplete_result":o,F=e.noResults,i=e.highlight,o=void 0!==i&&i,i=e.feedback,e=e.onSelection;this.name=n,this.selector=r,this.data={src:a,key:s,cache:u,store:c},this.query=d,this.trigger={event:f,condition:m},this.searchEngine=y,this.diacritics=k,this.threshold=A,this.debounce=w,this.resultsList={render:O,container:x,destination:j||this.inputField,position:t,element:l,idName:p,className:v,navigation:g},this.sort=L,this.placeHolder=E,this.maxResults=S,this.resultItem={content:h,element:b,idName:N,className:C},this.noResults=F,this.highlight=o,this.feedback=i,this.onSelection=e,this.preInit()}var e,t,n;return e=I,(t=[{key:"start",value:function(e,t){var n=this,i=a(this,t),t={input:e,query:t,matches:i,results:i.slice(0,this.maxResults)};if(d(this.inputField,t,"results"),!i.length)return this.noResults?this.noResults(t,r):null;if(!this.resultsList.render)return this.feedback(t);i.length&&r(this,t,i);d(this.inputField,t,"rendered"),o(this,t),document.addEventListener("click",function(e){return u(n,e.target)})}},{key:"dataStore",value:function(){var i=this;return new Promise(function(t,n){return i.data.cache&&i.data.store?t(null):new Promise(function(e,t){return"function"==typeof i.data.src?i.data.src().then(e,t):e(i.data.src)}).then(function(e){try{return i.data.store=e,d(i.inputField,i.data.store,"fetch"),t()}catch(e){return n(e)}},n)})}},{key:"compose",value:function(){var s=this;return new Promise(function(e,t){var n,i,r,o;return o=s.inputField,n=(o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement?o.value:o.innerHTML).toLowerCase(),r=n,o=s.query,i=o&&o.manipulate?o.manipulate(r):r.normalize("NFD").replace(/[\u0300-\u036f]/g,""),o=i,((r=s).trigger.condition?r.trigger.condition(o):o.length>=r.threshold&&o.replace(/ /g,"").length)?s.dataStore().then(function(e){try{return u(s),s.start(n,i),a.call(s)}catch(e){return t(e)}},t):(u(s),a.call(s));function a(){return e()}})}},{key:"init",value:function(){var n,i,r,e=this;this.placeHolder&&this.inputField.setAttribute("placeholder",this.placeHolder),this.hook=(n=function(){e.compose()},i=this.debounce,function(){var e=this,t=arguments;clearTimeout(r),r=setTimeout(function(){return n.apply(e,t)},i)}),this.inputField.addEventListener(this.trigger.event,this.hook),d(this.inputField,null,"init")}},{key:"preInit",value:function(){var r=this,o=document;new MutationObserver(function(e,t){var n,i=l(e);try{for(i.s();!(n=i.n()).done;){n.value;o.querySelector(r.selector)&&(t.disconnect(),r.inputField=o.querySelector(r.selector),(n=r).inputField.setAttribute("type","text"),n.inputField.setAttribute("role","combobox"),n.inputField.setAttribute("aria-haspopup",!0),n.inputField.setAttribute("aria-expanded",!1),n.inputField.setAttribute("aria-controls",n.resultsList.idName),n.inputField.setAttribute("aria-autocomplete","both"),d(r.inputField,null,"connect"),r.init())}}catch(e){i.e(e)}finally{i.f()}}).observe(o,{childList:!0,subtree:!0})}},{key:"unInit",value:function(){this.inputField.removeEventListener("input",this.hook),d(this.inputField,null,"unInit")}}])&&i(e.prototype,t),n&&i(e,n),I}()},"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):(a="undefined"!=typeof globalThis?globalThis:a||self).autoComplete=b();
;
/*! noUiSlider - 8.0.1 - 2015-06-29 19:11:22 */

!function(a){"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?module.exports=a(require("jquery")):window.noUiSlider=a()}(function(){"use strict";function a(a){return a.filter(function(a){return this[a]?!1:this[a]=!0},{})}function b(a,b){return Math.round(a/b)*b}function c(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.defaultView||c.parentWindow,e=c.documentElement,f=d.pageXOffset;return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(f=0),{top:b.top+d.pageYOffset-e.clientTop,left:b.left+f-e.clientLeft}}function d(a){return"number"==typeof a&&!isNaN(a)&&isFinite(a)}function e(a){var b=Math.pow(10,7);return Number((Math.round(a*b)/b).toFixed(7))}function f(a,b,c){k(a,b),setTimeout(function(){l(a,b)},c)}function g(a){return Math.max(Math.min(a,100),0)}function h(a){return Array.isArray(a)?a:[a]}function j(a){var b=a.split(".");return b.length>1?b[1].length:0}function k(a,b){a.classList?a.classList.add(b):a.className+=" "+b}function l(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(new RegExp("(^|\\b)"+b.split(" ").join("|")+"(\\b|$)","gi")," ")}function m(a,b){a.classList?a.classList.contains(b):new RegExp("(^| )"+b+"( |$)","gi").test(a.className)}function n(a,b){return 100/(b-a)}function o(a,b){return 100*b/(a[1]-a[0])}function p(a,b){return o(a,a[0]<0?b+Math.abs(a[0]):b-a[0])}function q(a,b){return b*(a[1]-a[0])/100+a[0]}function r(a,b){for(var c=1;a>=b[c];)c+=1;return c}function s(a,b,c){if(c>=a.slice(-1)[0])return 100;var d,e,f,g,h=r(c,a);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],f+p([d,e],c)/n(f,g)}function t(a,b,c){if(c>=100)return a.slice(-1)[0];var d,e,f,g,h=r(c,b);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],q([d,e],(c-f)*n(f,g))}function u(a,c,d,e){if(100===e)return e;var f,g,h=r(e,a);return d?(f=a[h-1],g=a[h],e-f>(g-f)/2?g:f):c[h-1]?a[h-1]+b(e-a[h-1],c[h-1]):e}function v(a,b,c){var e;if("number"==typeof b&&(b=[b]),"[object Array]"!==Object.prototype.toString.call(b))throw new Error("noUiSlider: 'range' contains invalid value.");if(e="min"===a?0:"max"===a?100:parseFloat(a),!d(e)||!d(b[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");c.xPct.push(e),c.xVal.push(b[0]),e?c.xSteps.push(isNaN(b[1])?!1:b[1]):isNaN(b[1])||(c.xSteps[0]=b[1])}function w(a,b,c){return b?void(c.xSteps[a]=o([c.xVal[a],c.xVal[a+1]],b)/n(c.xPct[a],c.xPct[a+1])):!0}function x(a,b,c,d){this.xPct=[],this.xVal=[],this.xSteps=[d||!1],this.xNumSteps=[!1],this.snap=b,this.direction=c;var e,f=[];for(e in a)a.hasOwnProperty(e)&&f.push([a[e],e]);for(f.sort(function(a,b){return a[0]-b[0]}),e=0;e<f.length;e++)v(f[e][1],f[e][0],this);for(this.xNumSteps=this.xSteps.slice(0),e=0;e<this.xNumSteps.length;e++)w(e,this.xNumSteps[e],this)}function y(a,b){if(!d(b))throw new Error("noUiSlider: 'step' is not numeric.");a.singleStep=b}function z(a,b){if("object"!=typeof b||Array.isArray(b))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===b.min||void 0===b.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");a.spectrum=new x(b,a.snap,a.dir,a.singleStep)}function A(a,b){if(b=h(b),!Array.isArray(b)||!b.length||b.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");a.handles=b.length,a.start=b}function B(a,b){if(a.snap=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function C(a,b){if(a.animate=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function D(a,b){if("lower"===b&&1===a.handles)a.connect=1;else if("upper"===b&&1===a.handles)a.connect=2;else if(b===!0&&2===a.handles)a.connect=3;else{if(b!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");a.connect=0}}function E(a,b){switch(b){case"horizontal":a.ort=0;break;case"vertical":a.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function F(a,b){if(!d(b))throw new Error("noUiSlider: 'margin' option must be numeric.");if(a.margin=a.spectrum.getMargin(b),!a.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function G(a,b){if(!d(b))throw new Error("noUiSlider: 'limit' option must be numeric.");if(a.limit=a.spectrum.getMargin(b),!a.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function H(a,b){switch(b){case"ltr":a.dir=0;break;case"rtl":a.dir=1,a.connect=[0,2,1,3][a.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function I(a,b){if("string"!=typeof b)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var c=b.indexOf("tap")>=0,d=b.indexOf("drag")>=0,e=b.indexOf("fixed")>=0,f=b.indexOf("snap")>=0;a.events={tap:c||f,drag:d,fixed:e,snap:f}}function J(a,b){if(a.format=b,"function"==typeof b.to&&"function"==typeof b.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function K(a){var b,c={margin:0,limit:0,animate:!0,format:V};b={step:{r:!1,t:y},start:{r:!0,t:A},connect:{r:!0,t:D},direction:{r:!0,t:H},snap:{r:!1,t:B},animate:{r:!1,t:C},range:{r:!0,t:z},orientation:{r:!1,t:E},margin:{r:!1,t:F},limit:{r:!1,t:G},behaviour:{r:!0,t:I},format:{r:!1,t:J}};var d={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"};return Object.keys(d).forEach(function(b){void 0===a[b]&&(a[b]=d[b])}),Object.keys(b).forEach(function(d){var e=b[d];if(void 0===a[d]){if(e.r)throw new Error("noUiSlider: '"+d+"' is required.");return!0}e.t(c,a[d])}),c.pips=a.pips,c.style=c.ort?"top":"left",c}function L(a,b,c){var d=a+b[0],e=a+b[1];return c?(0>d&&(e+=Math.abs(d)),e>100&&(d-=e-100),[g(d),g(e)]):[d,e]}function M(a){a.preventDefault();var b,c,d=0===a.type.indexOf("touch"),e=0===a.type.indexOf("mouse"),f=0===a.type.indexOf("pointer"),g=a;return 0===a.type.indexOf("MSPointer")&&(f=!0),d&&(b=a.changedTouches[0].pageX,c=a.changedTouches[0].pageY),(e||f)&&(b=a.clientX+window.pageXOffset,c=a.clientY+window.pageYOffset),g.points=[b,c],g.cursor=e||f,g}function N(a,b){var c=document.createElement("div"),d=document.createElement("div"),e=["-lower","-upper"];return a&&e.reverse(),k(d,U[3]),k(d,U[3]+e[b]),k(c,U[2]),c.appendChild(d),c}function O(a,b,c){switch(a){case 1:k(b,U[7]),k(c[0],U[6]);break;case 3:k(c[1],U[6]);case 2:k(c[0],U[7]);case 0:k(b,U[6])}}function P(a,b,c){var d,e=[];for(d=0;a>d;d+=1)e.push(c.appendChild(N(b,d)));return e}function Q(a,b,c){k(c,U[0]),k(c,U[8+a]),k(c,U[4+b]);var d=document.createElement("div");return k(d,U[1]),c.appendChild(d),d}function R(b,d){function e(a,b,c){if("range"===a||"steps"===a)return N.xVal;if("count"===a){var d,e=100/(b-1),f=0;for(b=[];(d=f++*e)<=100;)b.push(d);a="positions"}return"positions"===a?b.map(function(a){return N.fromStepping(c?N.getStep(a):a)}):"values"===a?c?b.map(function(a){return N.fromStepping(N.getStep(N.toStepping(a)))}):b:void 0}function n(b,c,d){var e=N.direction,f={},g=N.xVal[0],h=N.xVal[N.xVal.length-1],i=!1,j=!1,k=0;return N.direction=0,d=a(d.slice().sort(function(a,b){return a-b})),d[0]!==g&&(d.unshift(g),i=!0),d[d.length-1]!==h&&(d.push(h),j=!0),d.forEach(function(a,e){var g,h,l,m,n,o,p,q,r,s,t=a,u=d[e+1];if("steps"===c&&(g=N.xNumSteps[e]),g||(g=u-t),t!==!1&&void 0!==u)for(h=t;u>=h;h+=g){for(m=N.toStepping(h),n=m-k,q=n/b,r=Math.round(q),s=n/r,l=1;r>=l;l+=1)o=k+l*s,f[o.toFixed(5)]=["x",0];p=d.indexOf(h)>-1?1:"steps"===c?2:0,!e&&i&&(p=0),h===u&&j||(f[m.toFixed(5)]=[h,p]),k=m}}),N.direction=e,f}function o(a,b,c){function e(a){return["-normal","-large","-sub"][a]}function f(a,b,c){return'class="'+b+" "+b+"-"+h+" "+b+e(c[1],c[0])+'" style="'+d.style+": "+a+'%"'}function g(a,d){N.direction&&(a=100-a),d[1]=d[1]&&b?b(d[0],d[1]):d[1],i.innerHTML+="<div "+f(a,"noUi-marker",d)+"></div>",d[1]&&(i.innerHTML+="<div "+f(a,"noUi-value",d)+">"+c.to(d[0])+"</div>")}var h=["horizontal","vertical"][d.ort],i=document.createElement("div");return k(i,"noUi-pips"),k(i,"noUi-pips-"+h),Object.keys(a).forEach(function(b){g(b,a[b])}),i}function p(a){var b=a.mode,c=a.density||1,d=a.filter||!1,f=a.values||!1,g=a.stepped||!1,h=e(b,f,g),i=n(c,b,h),j=a.format||{to:Math.round};return J.appendChild(o(i,d,j))}function q(){return H["offset"+["Width","Height"][d.ort]]}function r(a,b){void 0!==b&&(b=Math.abs(b-d.dir)),Object.keys(S).forEach(function(c){var d=c.split(".")[0];a===d&&S[c].forEach(function(a){a(h(C()),b,s(Array.prototype.slice.call(R)))})})}function s(a){return 1===a.length?a[0]:d.dir?a.reverse():a}function t(a,b,c,e){var f=function(b){return J.hasAttribute("disabled")?!1:m(J,U[14])?!1:(b=M(b),a===T.start&&void 0!==b.buttons&&b.buttons>1?!1:(b.calcPoint=b.points[d.ort],void c(b,e)))},g=[];return a.split(" ").forEach(function(a){b.addEventListener(a,f,!1),g.push([a,f])}),g}function u(a,b){var c,d=b.handles||I,e=!1,f=100*(a.calcPoint-b.start)/q(),g=d[0]===I[0]?0:1;if(c=L(f,b.positions,d.length>1),e=z(d[0],c[g],1===d.length),d.length>1){if(e=z(d[1],c[g?0:1],!1)||e)for(i=0;i<b.handles.length;i++)r("slide",i)}else e&&r("slide",g)}function v(a,b){var c=H.getElementsByClassName(U[15]),d=b.handles[0]===I[0]?0:1;c.length&&l(c[0],U[15]),a.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener));var e=document.documentElement;e.noUiListeners.forEach(function(a){e.removeEventListener(a[0],a[1])}),l(J,U[12]),r("set",d),r("change",d)}function w(a,b){var c=document.documentElement;if(1===b.handles.length&&(k(b.handles[0].children[0],U[15]),b.handles[0].hasAttribute("disabled")))return!1;a.stopPropagation();var d=t(T.move,c,u,{start:a.calcPoint,handles:b.handles,positions:[K[0],K[I.length-1]]}),e=t(T.end,c,v,{handles:b.handles});if(c.noUiListeners=d.concat(e),a.cursor){document.body.style.cursor=getComputedStyle(a.target).cursor,I.length>1&&k(J,U[12]);var f=function(){return!1};document.body.noUiListener=f,document.body.addEventListener("selectstart",f,!1)}}function x(a){var b,e,g=a.calcPoint,h=0;return a.stopPropagation(),I.forEach(function(a){h+=c(a)[d.style]}),b=h/2>g||1===I.length?0:1,g-=c(H)[d.style],e=100*g/q(),d.events.snap||f(J,U[14],300),I[b].hasAttribute("disabled")?!1:(z(I[b],e),r("slide",b),r("set",b),r("change",b),void(d.events.snap&&w(a,{handles:[I[h]]})))}function y(a){var b,c;if(!a.fixed)for(b=0;b<I.length;b+=1)t(T.start,I[b].children[0],w,{handles:[I[b]]});a.tap&&t(T.start,H,x,{handles:I}),a.drag&&(c=[H.getElementsByClassName(U[7])[0]],k(c[0],U[10]),a.fixed&&c.push(I[c[0]===I[0]?1:0].children[0]),c.forEach(function(a){t(T.start,a,w,{handles:I})}))}function z(a,b,c){var e=a!==I[0]?1:0,f=K[0]+d.margin,h=K[1]-d.margin,i=K[0]+d.limit,j=K[1]-d.limit;return I.length>1&&(b=e?Math.max(b,f):Math.min(b,h)),c!==!1&&d.limit&&I.length>1&&(b=e?Math.min(b,i):Math.max(b,j)),b=N.getStep(b),b=g(parseFloat(b.toFixed(7))),b===K[e]?!1:(a.style[d.style]=b+"%",a.previousSibling||(l(a,U[17]),b>50&&k(a,U[17])),K[e]=b,R[e]=N.fromStepping(b),r("update",e),!0)}function A(a,b){var c,e,f;for(d.limit&&(a+=1),c=0;a>c;c+=1)e=c%2,f=b[e],null!==f&&f!==!1&&("number"==typeof f&&(f=String(f)),f=d.format.from(f),(f===!1||isNaN(f)||z(I[e],N.toStepping(f),c===3-d.dir)===!1)&&r("update",e))}function B(a){var b,c,e=h(a);for(d.dir&&d.handles>1&&e.reverse(),d.animate&&-1!==K[0]&&f(J,U[14],300),b=I.length>1?3:1,1===e.length&&(b=1),A(b,e),c=0;c<I.length;c++)r("set",c)}function C(){var a,b=[];for(a=0;a<d.handles;a+=1)b[a]=d.format.to(R[a]);return s(b)}function D(){U.forEach(function(a){a&&l(J,a)}),J.innerHTML="",delete J.noUiSlider}function E(){var a=K.map(function(a,b){var c=N.getApplicableStep(a),d=j(String(c[2])),e=R[b],f=100===a?null:c[2],g=Number((e-c[2]).toFixed(d)),h=0===a?null:g>=c[1]?c[2]:c[0]||!1;return[h,f]});return s(a)}function F(a,b){S[a]=S[a]||[],S[a].push(b),"update"===a.split(".")[0]&&I.forEach(function(a,b){r("update",b)})}function G(a){var b=a.split(".")[0],c=a.substring(b.length);Object.keys(S).forEach(function(a){var d=a.split(".")[0],e=a.substring(d.length);b&&b!==d||c&&c!==e||delete S[a]})}var H,I,J=b,K=[-1,-1],N=d.spectrum,R=[],S={};if(J.noUiSlider)throw new Error("Slider was already initialized.");return H=Q(d.dir,d.ort,J),I=P(d.handles,d.dir,H),O(d.connect,J,I),y(d.events),d.pips&&p(d.pips),{destroy:D,steps:E,on:F,off:G,get:C,set:B}}function S(a,b){if(!a.nodeName)throw new Error("noUiSlider.create requires a single element.");var c=K(b,a),d=R(a,c);d.set(c.start),a.noUiSlider=d}var T=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},U=["noUi-target","noUi-base","noUi-origin","noUi-handle","noUi-horizontal","noUi-vertical","noUi-background","noUi-connect","noUi-ltr","noUi-rtl","noUi-dragable","","noUi-state-drag","","noUi-state-tap","noUi-active","","noUi-stacking"];x.prototype.getMargin=function(a){return 2===this.xPct.length?o(this.xVal,a):!1},x.prototype.toStepping=function(a){return a=s(this.xVal,this.xPct,a),this.direction&&(a=100-a),a},x.prototype.fromStepping=function(a){return this.direction&&(a=100-a),e(t(this.xVal,this.xPct,a))},x.prototype.getStep=function(a){return this.direction&&(a=100-a),a=u(this.xPct,this.xSteps,this.snap,a),this.direction&&(a=100-a),a},x.prototype.getApplicableStep=function(a){var b=r(a,this.xPct),c=100===a?2:1;return[this.xNumSteps[b-2],this.xVal[b-c],this.xNumSteps[b-c]]},x.prototype.convert=function(a){return this.getStep(this.toStepping(a))};var V={to:function(a){return a.toFixed(2)},from:Number};return{create:S}});;
!function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return g({type:O.error,iconClass:m().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=m()),v=e("#"+t.containerId),v.length?v:(n&&(v=u(t)),v)}function i(e,t,n){return g({type:O.info,iconClass:m().iconClasses.info,message:e,optionsOverride:n,title:t})}function o(e){w=e}function s(e,t,n){return g({type:O.success,iconClass:m().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return g({type:O.warning,iconClass:m().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e,t){var i=m();v||n(i),l(e,i,t)||d(i)}function c(t){var i=m();return v||n(i),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function d(t){for(var n=v.children(),i=n.length-1;i>=0;i--)l(e(n[i]),t)}function l(t,n,i){var o=i&&i.force?i.force:!1;return t&&(o||0===e(":focus",t).length)?(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0):!1}function u(t){return v=e("<div/>").attr("id",t.containerId).addClass(t.positionClass).attr("aria-live","polite").attr("role","alert"),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;</button>',newestOnTop:!0,preventDuplicates:!1,progressBar:!1}}function f(e){w&&w(e)}function g(t){function i(e){return null==e&&(e=""),new String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function o(){r(),d(),l(),u(),p(),c()}function s(){y.hover(b,O),!x.onclick&&x.tapToDismiss&&y.click(w),x.closeButton&&k&&k.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),w(!0)}),x.onclick&&y.click(function(e){x.onclick(e),w()})}function a(){y.hide(),y[x.showMethod]({duration:x.showDuration,easing:x.showEasing,complete:x.onShown}),x.timeOut>0&&(H=setTimeout(w,x.timeOut),q.maxHideTime=parseFloat(x.timeOut),q.hideEta=(new Date).getTime()+q.maxHideTime,x.progressBar&&(q.intervalId=setInterval(D,10)))}function r(){t.iconClass&&y.addClass(x.toastClass).addClass(E)}function c(){x.newestOnTop?v.prepend(y):v.append(y)}function d(){t.title&&(I.append(x.escapeHtml?i(t.title):t.title).addClass(x.titleClass),y.append(I))}function l(){t.message&&(M.append(x.escapeHtml?i(t.message):t.message).addClass(x.messageClass),y.append(M))}function u(){x.closeButton&&(k.addClass("toast-close-button").attr("role","button"),y.prepend(k))}function p(){x.progressBar&&(B.addClass("toast-progress"),y.prepend(B))}function g(e,t){if(e.preventDuplicates){if(t.message===C)return!0;C=t.message}return!1}function w(t){var n=t&&x.closeMethod!==!1?x.closeMethod:x.hideMethod,i=t&&x.closeDuration!==!1?x.closeDuration:x.hideDuration,o=t&&x.closeEasing!==!1?x.closeEasing:x.hideEasing;return!e(":focus",y).length||t?(clearTimeout(q.intervalId),y[n]({duration:i,easing:o,complete:function(){h(y),x.onHidden&&"hidden"!==j.state&&x.onHidden(),j.state="hidden",j.endTime=new Date,f(j)}})):void 0}function O(){(x.timeOut>0||x.extendedTimeOut>0)&&(H=setTimeout(w,x.extendedTimeOut),q.maxHideTime=parseFloat(x.extendedTimeOut),q.hideEta=(new Date).getTime()+q.maxHideTime)}function b(){clearTimeout(H),q.hideEta=0,y.stop(!0,!0)[x.showMethod]({duration:x.showDuration,easing:x.showEasing})}function D(){var e=(q.hideEta-(new Date).getTime())/q.maxHideTime*100;B.width(e+"%")}var x=m(),E=t.iconClass||x.iconClass;if("undefined"!=typeof t.optionsOverride&&(x=e.extend(x,t.optionsOverride),E=t.optionsOverride.iconClass||E),!g(x,t)){T++,v=n(x,!0);var H=null,y=e("<div/>"),I=e("<div/>"),M=e("<div/>"),B=e("<div/>"),k=e(x.closeHtml),q={intervalId:null,hideEta:null,maxHideTime:null},j={toastId:T,state:"visible",startTime:new Date,options:x,map:t};return o(),a(),s(),f(j),x.debug&&console&&console.log(j),y}}function m(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),C=void 0))}var v,w,C,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:c,error:t,getContainer:n,info:i,options:{},subscribe:o,success:s,version:"2.1.2",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)});
;
/*
     _ _      _       _
 ___| (_) ___| | __  (_)___
/ __| | |/ __| |/ /  | / __|
\__ \ | | (__|   < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
                   |__/

 Version: 1.6.0
  Author: Ken Wheeler
 Website: http://kenwheeler.github.io
    Docs: http://kenwheeler.github.io/slick
    Repo: http://github.com/kenwheeler/slick
  Issues: http://github.com/kenwheeler/slick/issues

 */
/* global window, document, define, jQuery, setInterval, clearInterval */
; (function (factory) {
	'use strict';
	if (typeof define === 'function' && define.amd) {
		define(['jquery'], factory);
	} else if (typeof exports !== 'undefined') {
		module.exports = factory(require('jquery'));
	} else {
		factory(jQuery);
	}

}(function ($) {
	'use strict';
	var Slick = window.Slick || {};

	Slick = (function () {

		var instanceUid = 0;

		function Slick(element, settings) {

			var _ = this, dataSettings;

			_.defaults = {
				accessibility: true,
				adaptiveHeight: false,
				appendArrows: $(element),
				appendDots: $(element),
				arrows: true,
				asNavFor: null,
				prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
				nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
				autoplay: false,
				autoplaySpeed: 3000,
				centerMode: false,
				centerPadding: '50px',
				cssEase: 'ease',
				customPaging: function (slider, i) {
					return $('<button type="button" data-role="none" role="button" tabindex="0" />').text(i + 1);
				},
				dots: false,
				dotsClass: 'slick-dots',
				draggable: true,
				easing: 'linear',
				edgeFriction: 0.35,
				fade: false,
				focusOnSelect: false,
				infinite: true,
				initialSlide: 0,
				lazyLoad: 'ondemand',
				mobileFirst: false,
				pauseOnHover: true,
				pauseOnFocus: true,
				pauseOnDotsHover: false,
				respondTo: 'window',
				responsive: null,
				rows: 1,
				rtl: false,
				slide: '',
				slidesPerRow: 1,
				slidesToShow: 1,
				slidesToScroll: 1,
				speed: 500,
				swipe: true,
				swipeToSlide: false,
				touchMove: true,
				touchThreshold: 5,
				useCSS: true,
				useTransform: true,
				variableWidth: false,
				vertical: false,
				verticalSwiping: false,
				waitForAnimate: true,
				zIndex: 1000
			};

			_.initials = {
				animating: false,
				dragging: false,
				autoPlayTimer: null,
				currentDirection: 0,
				currentLeft: null,
				currentSlide: 0,
				direction: 1,
				$dots: null,
				listWidth: null,
				listHeight: null,
				loadIndex: 0,
				$nextArrow: null,
				$prevArrow: null,
				scrolling: false,
				slideCount: null,
				slideWidth: null,
				$slideTrack: null,
				$slides: null,
				sliding: false,
				slideOffset: 0,
				swipeLeft: null,
				swiping: false,
				$list: null,
				touchObject: {},
				transformsEnabled: false,
				unslicked: false
			};

			$.extend(_, _.initials);

			_.activeBreakpoint = null;
			_.animType = null;
			_.animProp = null;
			_.breakpoints = [];
			_.breakpointSettings = [];
			_.cssTransitions = false;
			_.focussed = false;
			_.interrupted = false;
			_.hidden = 'hidden';
			_.paused = true;
			_.positionProp = null;
			_.respondTo = null;
			_.rowCount = 1;
			_.shouldClick = true;
			_.$slider = $(element);
			_.$slidesCache = null;
			_.transformType = null;
			_.transitionType = null;
			_.visibilityChange = 'visibilitychange';
			_.windowWidth = 0;
			_.windowTimer = null;

			dataSettings = $(element).data('slick') || {};

			_.options = $.extend({}, _.defaults, settings, dataSettings);

			_.currentSlide = _.options.initialSlide;

			_.originalSettings = _.options;

			if (typeof document.mozHidden !== 'undefined') {
				_.hidden = 'mozHidden';
				_.visibilityChange = 'mozvisibilitychange';
			} else if (typeof document.webkitHidden !== 'undefined') {
				_.hidden = 'webkitHidden';
				_.visibilityChange = 'webkitvisibilitychange';
			}

			_.autoPlay = $.proxy(_.autoPlay, _);
			_.autoPlayClear = $.proxy(_.autoPlayClear, _);
			_.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
			_.changeSlide = $.proxy(_.changeSlide, _);
			_.clickHandler = $.proxy(_.clickHandler, _);
			_.selectHandler = $.proxy(_.selectHandler, _);
			_.setPosition = $.proxy(_.setPosition, _);
			_.swipeHandler = $.proxy(_.swipeHandler, _);
			_.dragHandler = $.proxy(_.dragHandler, _);
			_.keyHandler = $.proxy(_.keyHandler, _);

			_.instanceUid = instanceUid++;

			// A simple way to check for HTML strings
			// Strict HTML recognition (must start with <)
			// Extracted from jQuery v1.11 source
			_.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;


			_.registerBreakpoints();
			_.init(true);

		}

		return Slick;

	}());

	Slick.prototype.activateADA = function () {
		var _ = this;

		_.$slideTrack.find('.slick-active').attr({
			'aria-hidden': 'false'
		}).find('a, input, button, select').attr({
			'tabindex': '0'
		});

	};

	Slick.prototype.addSlide = Slick.prototype.slickAdd = function (markup, index, addBefore) {

		var _ = this;

		if (typeof (index) === 'boolean') {
			addBefore = index;
			index = null;
		} else if (index < 0 || (index >= _.slideCount)) {
			return false;
		}

		_.unload();

		if (typeof (index) === 'number') {
			if (index === 0 && _.$slides.length === 0) {
				$(markup).appendTo(_.$slideTrack);
			} else if (addBefore) {
				$(markup).insertBefore(_.$slides.eq(index));
			} else {
				$(markup).insertAfter(_.$slides.eq(index));
			}
		} else {
			if (addBefore === true) {
				$(markup).prependTo(_.$slideTrack);
			} else {
				$(markup).appendTo(_.$slideTrack);
			}
		}

		_.$slides = _.$slideTrack.children(this.options.slide);

		_.$slideTrack.children(this.options.slide).detach();

		_.$slideTrack.append(_.$slides);

		_.$slides.each(function (index, element) {
			$(element).attr('data-slick-index', index);
		});

		_.$slidesCache = _.$slides;

		_.reinit();

	};

	Slick.prototype.animateHeight = function () {
		var _ = this;
		if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
			var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
			_.$list.animate({
				height: targetHeight
			}, _.options.speed);
		}
	};

	Slick.prototype.animateSlide = function (targetLeft, callback) {

		var animProps = {},
            _ = this;

		_.animateHeight();

		if (_.options.rtl === true && _.options.vertical === false) {
			targetLeft = -targetLeft;
		}
		if (_.transformsEnabled === false) {
			if (_.options.vertical === false) {
				_.$slideTrack.animate({
					left: targetLeft
				}, _.options.speed, _.options.easing, callback);
			} else {
				_.$slideTrack.animate({
					top: targetLeft
				}, _.options.speed, _.options.easing, callback);
			}

		} else {

			if (_.cssTransitions === false) {
				if (_.options.rtl === true) {
					_.currentLeft = -(_.currentLeft);
				}
				$({
					animStart: _.currentLeft
				}).animate({
					animStart: targetLeft
				}, {
					duration: _.options.speed,
					easing: _.options.easing,
					step: function (now) {
						now = Math.ceil(now);
						if (_.options.vertical === false) {
							animProps[_.animType] = 'translate(' +
                                now + 'px, 0px)';
							_.$slideTrack.css(animProps);
						} else {
							animProps[_.animType] = 'translate(0px,' +
                                now + 'px)';
							_.$slideTrack.css(animProps);
						}
					},
					complete: function () {
						if (callback) {
							callback.call();
						}
					}
				});

			} else {

				_.applyTransition();
				targetLeft = Math.ceil(targetLeft);

				if (_.options.vertical === false) {
					animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
				} else {
					animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
				}
				_.$slideTrack.css(animProps);

				if (callback) {
					setTimeout(function () {

						_.disableTransition();

						callback.call();
					}, _.options.speed);
				}

			}

		}

	};

	Slick.prototype.getNavTarget = function () {

		var _ = this,
            asNavFor = _.options.asNavFor;

		if (asNavFor && asNavFor !== null) {
			asNavFor = $(asNavFor).not(_.$slider);
		}

		return asNavFor;

	};

	Slick.prototype.asNavFor = function (index) {

		var _ = this,
            asNavFor = _.getNavTarget();

		if (asNavFor !== null && typeof asNavFor === 'object') {
			asNavFor.each(function () {
				var target = $(this).slick('getSlick');
				if (!target.unslicked) {
					target.slideHandler(index, true);
				}
			});
		}

	};

	Slick.prototype.applyTransition = function (slide) {

		var _ = this,
            transition = {};

		if (_.options.fade === false) {
			transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
		} else {
			transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
		}

		if (_.options.fade === false) {
			_.$slideTrack.css(transition);
		} else {
			_.$slides.eq(slide).css(transition);
		}

	};

	Slick.prototype.autoPlay = function () {

		var _ = this;

		_.autoPlayClear();

		if (_.slideCount > _.options.slidesToShow) {
			_.autoPlayTimer = setInterval(_.autoPlayIterator, _.options.autoplaySpeed);
		}

	};

	Slick.prototype.autoPlayClear = function () {

		var _ = this;

		if (_.autoPlayTimer) {
			clearInterval(_.autoPlayTimer);
		}

	};

	Slick.prototype.autoPlayIterator = function () {

		var _ = this,
            slideTo = _.currentSlide + _.options.slidesToScroll;

		if (!_.paused && !_.interrupted && !_.focussed) {

			if (_.options.infinite === false) {

				if (_.direction === 1 && (_.currentSlide + 1) === (_.slideCount - 1)) {
					_.direction = 0;
				}

				else if (_.direction === 0) {

					slideTo = _.currentSlide - _.options.slidesToScroll;

					if (_.currentSlide - 1 === 0) {
						_.direction = 1;
					}

				}

			}

			_.slideHandler(slideTo);

		}

	};

	Slick.prototype.buildArrows = function () {

		var _ = this;

		if (_.options.arrows === true) {

			_.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
			_.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');

			if (_.slideCount > _.options.slidesToShow) {

				_.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
				_.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');

				if (_.htmlExpr.test(_.options.prevArrow)) {
					_.$prevArrow.prependTo(_.options.appendArrows);
				}

				if (_.htmlExpr.test(_.options.nextArrow)) {
					_.$nextArrow.appendTo(_.options.appendArrows);
				}

				if (_.options.infinite !== true) {
					_.$prevArrow
                        .addClass('slick-disabled')
                        .attr('aria-disabled', 'true');
				}

			} else {

				_.$prevArrow.add(_.$nextArrow)

                    .addClass('slick-hidden')
                    .attr({
                    	'aria-disabled': 'true',
                    	'tabindex': '-1'
                    });

			}

		}

	};

	Slick.prototype.buildDots = function () {

		var _ = this,
            i, dot;

		if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

			_.$slider.addClass('slick-dotted');

			dot = $('<ul />').addClass(_.options.dotsClass);

			for (i = 0; i <= _.getDotCount() ; i += 1) {
				dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
			}

			_.$dots = dot.appendTo(_.options.appendDots);

			_.$dots.find('li').first().addClass('slick-active').attr('aria-hidden', 'false');

		}

	};

	Slick.prototype.buildOut = function () {

		var _ = this;

		_.$slides =
            _.$slider
                .children(_.options.slide + ':not(.slick-cloned)')
                .addClass('slick-slide');

		_.slideCount = _.$slides.length;

		_.$slides.each(function (index, element) {
			$(element)
                .attr('data-slick-index', index)
                .data('originalStyling', $(element).attr('style') || '');
		});

		_.$slider.addClass('slick-slider');

		_.$slideTrack = (_.slideCount === 0) ?
            $('<div class="slick-track"/>').appendTo(_.$slider) :
            _.$slides.wrapAll('<div class="slick-track"/>').parent();

		_.$list = _.$slideTrack.wrap(
            '<div aria-live="polite" class="slick-list"/>').parent();
		_.$slideTrack.css('opacity', 0);

		if (_.options.centerMode === true || _.options.swipeToSlide === true) {
			_.options.slidesToScroll = 1;
		}

		$('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');

		_.setupInfinite();

		_.buildArrows();

		_.buildDots();

		_.updateDots();


		_.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);

		if (_.options.draggable === true) {
			_.$list.addClass('draggable');
		}

	};

	Slick.prototype.buildRows = function () {

		var _ = this, a, b, c, newSlides, numOfSlides, originalSlides, slidesPerSection;

		newSlides = document.createDocumentFragment();
		originalSlides = _.$slider.children();

		if (_.options.rows > 1) {

			slidesPerSection = _.options.slidesPerRow * _.options.rows;
			numOfSlides = Math.ceil(
                originalSlides.length / slidesPerSection
            );

			for (a = 0; a < numOfSlides; a++) {
				var slide = document.createElement('div');
				for (b = 0; b < _.options.rows; b++) {
					var row = document.createElement('div');
					for (c = 0; c < _.options.slidesPerRow; c++) {
						var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
						if (originalSlides.get(target)) {
							row.appendChild(originalSlides.get(target));
						}
					}
					slide.appendChild(row);
				}
				newSlides.appendChild(slide);
			}

			_.$slider.empty().append(newSlides);
			_.$slider.children().children().children()
                .css({
                	'width': (100 / _.options.slidesPerRow) + '%',
                	'display': 'inline-block'
                });

		}

	};

	Slick.prototype.checkResponsive = function (initial, forceUpdate) {
		var _ = this,
            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
		var sliderWidth = _.$slider.width();
		var windowWidth = window.innerWidth || $(window).width();

		if (_.respondTo === 'window') {
			respondToWidth = windowWidth;
		} else if (_.respondTo === 'slider') {
			respondToWidth = sliderWidth;
		} else if (_.respondTo === 'min') {
			respondToWidth = Math.min(windowWidth, sliderWidth);
		}

		if (_.options.responsive &&
            _.options.responsive.length &&
            _.options.responsive !== null) {

			targetBreakpoint = null;

			for (breakpoint in _.breakpoints) {
				if (_.breakpoints.hasOwnProperty(breakpoint)) {
					if (_.originalSettings.mobileFirst === false) {
						if (respondToWidth < _.breakpoints[breakpoint]) {
							targetBreakpoint = _.breakpoints[breakpoint];
						}
					} else {
						if (respondToWidth > _.breakpoints[breakpoint]) {
							targetBreakpoint = _.breakpoints[breakpoint];
						}
					}
				}
			}

			if (targetBreakpoint !== null) {
				if (_.activeBreakpoint !== null) {
					if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
						_.activeBreakpoint =
                            targetBreakpoint;
						if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
							_.unslick(targetBreakpoint);
						} else {
							_.options = $.extend({}, _.originalSettings,
                                _.breakpointSettings[
                                    targetBreakpoint]);
							if (initial === true) {
								_.currentSlide = _.options.initialSlide;
							}
							_.refresh(initial);
						}
						triggerBreakpoint = targetBreakpoint;
					}
				} else {
					_.activeBreakpoint = targetBreakpoint;
					if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
						_.unslick(targetBreakpoint);
					} else {
						_.options = $.extend({}, _.originalSettings,
                            _.breakpointSettings[
                                targetBreakpoint]);
						if (initial === true) {
							_.currentSlide = _.options.initialSlide;
						}
						_.refresh(initial);
					}
					triggerBreakpoint = targetBreakpoint;
				}
			} else {
				if (_.activeBreakpoint !== null) {
					_.activeBreakpoint = null;
					_.options = _.originalSettings;
					if (initial === true) {
						_.currentSlide = _.options.initialSlide;
					}
					_.refresh(initial);
					triggerBreakpoint = targetBreakpoint;
				}
			}

			// only trigger breakpoints during an actual break. not on initialize.
			if (!initial && triggerBreakpoint !== false) {
				_.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
			}
		}

	};

	Slick.prototype.changeSlide = function (event, dontAnimate) {

		var _ = this,
            $target = $(event.currentTarget),
            indexOffset, slideOffset, unevenOffset;

		// If target is a link, prevent default action.
		if ($target.is('a')) {
			event.preventDefault();
		}

		// If target is not the <li> element (ie: a child), find the <li>.
		if (!$target.is('li')) {
			$target = $target.closest('li');
		}

		unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
		indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;

		switch (event.data.message) {

			case 'previous':
				slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
				if (_.slideCount > _.options.slidesToShow) {
					_.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
				}
				break;

			case 'next':
				slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
				if (_.slideCount > _.options.slidesToShow) {
					_.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
				}
				break;

			case 'index':
				var index = event.data.index === 0 ? 0 :
                    event.data.index || $target.index() * _.options.slidesToScroll;

				_.slideHandler(_.checkNavigable(index), false, dontAnimate);
				$target.children().trigger('focus');
				break;

			default:
				return;
		}

	};

	Slick.prototype.checkNavigable = function (index) {

		var _ = this,
            navigables, prevNavigable;

		navigables = _.getNavigableIndexes();
		prevNavigable = 0;
		if (index > navigables[navigables.length - 1]) {
			index = navigables[navigables.length - 1];
		} else {
			for (var n in navigables) {
				if (index < navigables[n]) {
					index = prevNavigable;
					break;
				}
				prevNavigable = navigables[n];
			}
		}

		return index;
	};

	Slick.prototype.cleanUpEvents = function () {

		var _ = this;

		if (_.options.dots && _.$dots !== null) {

			$('li', _.$dots)
                .off('click.slick', _.changeSlide)
                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));

		}

		_.$slider.off('focus.slick blur.slick');

		if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
			_.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
			_.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
		}

		_.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
		_.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
		_.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
		_.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);

		_.$list.off('click.slick', _.clickHandler);

		$(document).off(_.visibilityChange, _.visibility);

		_.cleanUpSlideEvents();

		if (_.options.accessibility === true) {
			_.$list.off('keydown.slick', _.keyHandler);
		}

		if (_.options.focusOnSelect === true) {
			$(_.$slideTrack).children().off('click.slick', _.selectHandler);
		}

		$(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);

		$(window).off('resize.slick.slick-' + _.instanceUid, _.resize);

		$('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);

		$(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);

	};

	Slick.prototype.cleanUpSlideEvents = function () {

		var _ = this;

		_.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
		_.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));

	};

	Slick.prototype.cleanUpRows = function () {

		var _ = this, originalSlides;

		if (_.options.rows > 1) {
			originalSlides = _.$slides.children().children();
			originalSlides.removeAttr('style');
			_.$slider.empty().append(originalSlides);
		}

	};

	Slick.prototype.clickHandler = function (event) {

		var _ = this;

		if (_.shouldClick === false) {
			event.stopImmediatePropagation();
			event.stopPropagation();
			event.preventDefault();
		}

	};

	Slick.prototype.destroy = function (refresh) {

		var _ = this;

		_.autoPlayClear();

		_.touchObject = {};

		_.cleanUpEvents();

		$('.slick-cloned', _.$slider).detach();

		if (_.$dots) {
			_.$dots.remove();
		}

		if (_.$prevArrow && _.$prevArrow.length) {

			_.$prevArrow
                .removeClass('slick-disabled slick-arrow slick-hidden')
                .removeAttr('aria-hidden aria-disabled tabindex')
                .css('display', '');

			if (_.htmlExpr.test(_.options.prevArrow)) {
				_.$prevArrow.remove();
			}
		}

		if (_.$nextArrow && _.$nextArrow.length) {

			_.$nextArrow
                .removeClass('slick-disabled slick-arrow slick-hidden')
                .removeAttr('aria-hidden aria-disabled tabindex')
                .css('display', '');

			if (_.htmlExpr.test(_.options.nextArrow)) {
				_.$nextArrow.remove();
			}
		}


		if (_.$slides) {

			_.$slides
                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
                .removeAttr('aria-hidden')
                .removeAttr('data-slick-index')
                .each(function () {
                	$(this).attr('style', $(this).data('originalStyling'));
                });

			_.$slideTrack.children(this.options.slide).detach();

			_.$slideTrack.detach();

			_.$list.detach();

			_.$slider.append(_.$slides);
		}

		_.cleanUpRows();

		_.$slider.removeClass('slick-slider');
		_.$slider.removeClass('slick-initialized');
		_.$slider.removeClass('slick-dotted');

		_.unslicked = true;

		if (!refresh) {
			_.$slider.trigger('destroy', [_]);
		}

	};

	Slick.prototype.disableTransition = function (slide) {

		var _ = this,
            transition = {};

		transition[_.transitionType] = '';

		if (_.options.fade === false) {
			_.$slideTrack.css(transition);
		} else {
			_.$slides.eq(slide).css(transition);
		}

	};

	Slick.prototype.fadeSlide = function (slideIndex, callback) {

		var _ = this;

		if (_.cssTransitions === false) {

			_.$slides.eq(slideIndex).css({
				zIndex: _.options.zIndex
			});

			_.$slides.eq(slideIndex).animate({
				opacity: 1
			}, _.options.speed, _.options.easing, callback);

		} else {

			_.applyTransition(slideIndex);

			_.$slides.eq(slideIndex).css({
				opacity: 1,
				zIndex: _.options.zIndex
			});

			if (callback) {
				setTimeout(function () {

					_.disableTransition(slideIndex);

					callback.call();
				}, _.options.speed);
			}

		}

	};

	Slick.prototype.fadeSlideOut = function (slideIndex) {

		var _ = this;

		if (_.cssTransitions === false) {

			_.$slides.eq(slideIndex).animate({
				opacity: 0,
				zIndex: _.options.zIndex - 2
			}, _.options.speed, _.options.easing);

		} else {

			_.applyTransition(slideIndex);

			_.$slides.eq(slideIndex).css({
				opacity: 0,
				zIndex: _.options.zIndex - 2
			});

		}

	};

	Slick.prototype.filterSlides = Slick.prototype.slickFilter = function (filter) {

		var _ = this;

		if (filter !== null) {

			_.$slidesCache = _.$slides;

			_.unload();

			_.$slideTrack.children(this.options.slide).detach();

			_.$slidesCache.filter(filter).appendTo(_.$slideTrack);

			_.reinit();

		}

	};

	Slick.prototype.focusHandler = function () {

		var _ = this;

		_.$slider
            .off('focus.slick blur.slick')
            .on('focus.slick blur.slick',
                '*:not(.slick-arrow)', function (event) {

                	event.stopImmediatePropagation();
                	var $sf = $(this);

                	setTimeout(function () {

                		if (_.options.pauseOnFocus) {
                			_.focussed = $sf.is(':focus');
                			_.autoPlay();
                		}

                	}, 0);

                });
	};

	Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function () {

		var _ = this;
		return _.currentSlide;

	};

	Slick.prototype.getDotCount = function () {

		var _ = this;

		var breakPoint = 0;
		var counter = 0;
		var pagerQty = 0;

		if (_.options.infinite === true) {
			while (breakPoint < _.slideCount) {
				++pagerQty;
				breakPoint = counter + _.options.slidesToScroll;
				counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
			}
		} else if (_.options.centerMode === true) {
			pagerQty = _.slideCount;
		} else if (!_.options.asNavFor) {
			pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
		} else {
			while (breakPoint < _.slideCount) {
				++pagerQty;
				breakPoint = counter + _.options.slidesToScroll;
				counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
			}
		}

		return pagerQty - 1;

	};

	Slick.prototype.getLeft = function (slideIndex) {

		var _ = this,
            targetLeft,
            verticalHeight,
            verticalOffset = 0,
            targetSlide;

		_.slideOffset = 0;
		verticalHeight = _.$slides.first().outerHeight(true);

		if (_.options.infinite === true) {
			if (_.slideCount > _.options.slidesToShow) {
				_.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
				verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
			}
			if (_.slideCount % _.options.slidesToScroll !== 0) {
				if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
					if (slideIndex > _.slideCount) {
						_.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
						verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
					} else {
						_.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
						verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
					}
				}
			}
		} else {
			if (slideIndex + _.options.slidesToShow > _.slideCount) {
				_.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
				verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
			}
		}

		if (_.slideCount <= _.options.slidesToShow) {
			_.slideOffset = 0;
			verticalOffset = 0;
		}

		if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
			_.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
		} else if (_.options.centerMode === true && _.options.infinite === true) {
			_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
		} else if (_.options.centerMode === true) {
			_.slideOffset = 0;
			_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
		}

		if (_.options.vertical === false) {
			targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
		} else {
			targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
		}

		if (_.options.variableWidth === true) {

			if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
				targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
			} else {
				targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
			}

			if (_.options.rtl === true) {
				if (targetSlide[0]) {
					targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
				} else {
					targetLeft = 0;
				}
			} else {
				targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
			}

			if (_.options.centerMode === true) {
				if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
					targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
				} else {
					targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
				}

				if (_.options.rtl === true) {
					if (targetSlide[0]) {
						targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
					} else {
						targetLeft = 0;
					}
				} else {
					targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
				}

				targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
			}
		}

		return targetLeft;

	};

	Slick.prototype.getOption = Slick.prototype.slickGetOption = function (option) {

		var _ = this;

		return _.options[option];

	};

	Slick.prototype.getNavigableIndexes = function () {

		var _ = this,
            breakPoint = 0,
            counter = 0,
            indexes = [],
            max;

		if (_.options.infinite === false) {
			max = _.slideCount;
		} else {
			breakPoint = _.options.slidesToScroll * -1;
			counter = _.options.slidesToScroll * -1;
			max = _.slideCount * 2;
		}

		while (breakPoint < max) {
			indexes.push(breakPoint);
			breakPoint = counter + _.options.slidesToScroll;
			counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
		}

		return indexes;

	};

	Slick.prototype.getSlick = function () {

		return this;

	};

	Slick.prototype.getSlideCount = function () {

		var _ = this,
            slidesTraversed, swipedSlide, centerOffset;

		centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;

		if (_.options.swipeToSlide === true) {
			_.$slideTrack.find('.slick-slide').each(function (index, slide) {
				if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
					swipedSlide = slide;
					return false;
				}
			});

			slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;

			return slidesTraversed;

		} else {
			return _.options.slidesToScroll;
		}

	};

	Slick.prototype.goTo = Slick.prototype.slickGoTo = function (slide, dontAnimate) {

		var _ = this;

		_.changeSlide({
			data: {
				message: 'index',
				index: parseInt(slide)
			}
		}, dontAnimate);

	};

	Slick.prototype.init = function (creation) {

		var _ = this;

		if (!$(_.$slider).hasClass('slick-initialized')) {

			$(_.$slider).addClass('slick-initialized');

			_.buildRows();
			_.buildOut();
			_.setProps();
			_.startLoad();
			_.loadSlider();
			_.initializeEvents();
			_.updateArrows();
			_.updateDots();
			_.checkResponsive(true);
			_.focusHandler();

		}

		if (creation) {
			_.$slider.trigger('init', [_]);
		}

		if (_.options.accessibility === true) {
			_.initADA();
		}

		if (_.options.autoplay) {

			_.paused = false;
			_.autoPlay();

		}

	};

	Slick.prototype.initADA = function () {
		var _ = this;
		_.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
			'aria-hidden': 'true',
			'tabindex': '-1'
		}).find('a, input, button, select').attr({
			'tabindex': '-1'
		});

		_.$slideTrack.attr('role', 'listbox');

		_.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function (i) {
			$(this).attr('role', 'option');

			//Evenly distribute aria-describedby tags through available dots.
			var describedBySlideId = _.options.centerMode ? i : Math.floor(i / _.options.slidesToShow);

			if (_.options.dots === true) {
				$(this).attr('aria-describedby', 'slick-slide' + _.instanceUid + describedBySlideId + '');
			}
		});

		if (_.$dots !== null) {
			_.$dots.attr('role', 'tablist').find('li').each(function (i) {
				$(this).attr({
					'role': 'presentation',
					'aria-selected': 'false',
					'aria-controls': 'navigation' + _.instanceUid + i + '',
					'id': 'slick-slide' + _.instanceUid + i + ''
				});
			})
                .first().attr('aria-selected', 'true').end()
                .find('button').attr('role', 'button').end()
                .closest('div').attr('role', 'toolbar');
		}
		_.activateADA();

	};

	Slick.prototype.initArrowEvents = function () {

		var _ = this;

		if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
			_.$prevArrow
               .off('click.slick')
               .on('click.slick', {
               	message: 'previous'
               }, _.changeSlide);
			_.$nextArrow
               .off('click.slick')
               .on('click.slick', {
               	message: 'next'
               }, _.changeSlide);
		}

	};

	Slick.prototype.initDotEvents = function () {

		var _ = this;

		if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
			$('li', _.$dots).on('click.slick', {
				message: 'index'
			}, _.changeSlide);
		}

		if (_.options.dots === true && _.options.pauseOnDotsHover === true) {

			$('li', _.$dots)
                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));

		}

	};

	Slick.prototype.initSlideEvents = function () {

		var _ = this;

		if (_.options.pauseOnHover) {

			_.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
			_.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));

		}

	};

	Slick.prototype.initializeEvents = function () {

		var _ = this;

		_.initArrowEvents();

		_.initDotEvents();
		_.initSlideEvents();

		_.$list.on('touchstart.slick mousedown.slick', {
			action: 'start'
		}, _.swipeHandler);
		_.$list.on('touchmove.slick mousemove.slick', {
			action: 'move'
		}, _.swipeHandler);
		_.$list.on('touchend.slick mouseup.slick', {
			action: 'end'
		}, _.swipeHandler);
		_.$list.on('touchcancel.slick mouseleave.slick', {
			action: 'end'
		}, _.swipeHandler);

		_.$list.on('click.slick', _.clickHandler);

		$(document).on(_.visibilityChange, $.proxy(_.visibility, _));

		if (_.options.accessibility === true) {
			_.$list.on('keydown.slick', _.keyHandler);
		}

		if (_.options.focusOnSelect === true) {
			$(_.$slideTrack).children().on('click.slick', _.selectHandler);
		}

		$(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));

		$(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));

		$('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);

		$(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
		$(_.setPosition);
		// LANDI-2545
		$('.collapsible-heading').on('click', $.proxy(_.resize, _));

	};

	Slick.prototype.initUI = function () {

		var _ = this;

		if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

			_.$prevArrow.show();
			_.$nextArrow.show();

		}

		if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

			_.$dots.show();

		}

	};

	Slick.prototype.keyHandler = function (event) {

		var _ = this;
		//Dont slide if the cursor is inside the form fields and arrow keys are pressed
		if (!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
			if (event.keyCode === 37 && _.options.accessibility === true) {
				_.changeSlide({
					data: {
						message: _.options.rtl === true ? 'next' : 'previous'
					}
				});
			} else if (event.keyCode === 39 && _.options.accessibility === true) {
				_.changeSlide({
					data: {
						message: _.options.rtl === true ? 'previous' : 'next'
					}
				});
			}
		}

	};

	Slick.prototype.lazyLoad = function () {

		var _ = this,
            loadRange, cloneRange, rangeStart, rangeEnd;

		function loadImages(imagesScope) {

			$('img[data-lazy]', imagesScope).each(function () {

				var image = $(this),
                    imageSource = $(this).attr('data-lazy'),
                    imageSrcSet = $(this).attr('data-srcset'),
                    imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
                    imageToLoad = document.createElement('img');

				imageToLoad.onload = function () {

					image
                        .animate({ opacity: 0 }, 100, function () {

                        	if (imageSrcSet) {
                        		image
                                    .attr('srcset', imageSrcSet);

                        		if (imageSizes) {
                        			image
                                        .attr('sizes', imageSizes);
                        		}
                        	}

                        	image
                                .attr('src', imageSource)
                                .animate({ opacity: 1 }, 200, function () {
                                	image
                                        .removeAttr('data-lazy data-srcset data-sizes')
                                        .removeClass('slick-loading');
                                });
                        	_.$slider.trigger('lazyLoaded', [_, image, imageSource]);
                        });

				};

				imageToLoad.onerror = function () {

					image
                        .removeAttr('data-lazy')
                        .removeClass('slick-loading')
                        .addClass('slick-lazyload-error');

					_.$slider.trigger('lazyLoadError', [_, image, imageSource]);

				};

				imageToLoad.src = imageSource;

			});

		}

		if (_.options.centerMode === true) {
			if (_.options.infinite === true) {
				rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
				rangeEnd = rangeStart + _.options.slidesToShow + 2;
			} else {
				rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
				rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
			}
		} else {
			rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
			rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
			if (_.options.fade === true) {
				if (rangeStart > 0) rangeStart--;
				if (rangeEnd <= _.slideCount) rangeEnd++;
			}
		}

		loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);

		if (_.options.lazyLoad === 'anticipated') {
			var prevSlide = rangeStart - 1,
                nextSlide = rangeEnd,
                $slides = _.$slider.find('.slick-slide');

			for (var i = 0; i < _.options.slidesToScroll; i++) {
				if (prevSlide < 0) prevSlide = _.slideCount - 1;
				loadRange = loadRange.add($slides.eq(prevSlide));
				loadRange = loadRange.add($slides.eq(nextSlide));
				prevSlide--;
				nextSlide++;
			}
		}

		loadImages(loadRange);

		if (_.slideCount <= _.options.slidesToShow) {
			cloneRange = _.$slider.find('.slick-slide');
			loadImages(cloneRange);
		} else
			if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
				cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
				loadImages(cloneRange);
			} else if (_.currentSlide === 0) {
				cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
				loadImages(cloneRange);
			}

	};

	Slick.prototype.loadSlider = function () {

		var _ = this;

		_.setPosition();

		_.$slideTrack.css({
			opacity: 1
		});

		_.$slider.removeClass('slick-loading');

		_.initUI();

		if (_.options.lazyLoad === 'progressive') {
			_.progressiveLazyLoad();
		}

	};

	Slick.prototype.next = Slick.prototype.slickNext = function () {

		var _ = this;

		_.changeSlide({
			data: {
				message: 'next'
			}
		});

	};

	Slick.prototype.orientationChange = function () {

		var _ = this;

		_.checkResponsive();
		_.setPosition();

	};

	Slick.prototype.pause = Slick.prototype.slickPause = function () {

		var _ = this;

		_.autoPlayClear();
		_.paused = true;

	};

	Slick.prototype.play = Slick.prototype.slickPlay = function () {

		var _ = this;

		_.autoPlay();
		_.options.autoplay = true;
		_.paused = false;
		_.focussed = false;
		_.interrupted = false;

	};

	Slick.prototype.postSlide = function (index) {

		var _ = this;

		if (!_.unslicked) {

			_.$slider.trigger('afterChange', [_, index]);

			_.animating = false;

			_.setPosition();

			_.swipeLeft = null;

			if (_.options.autoplay) {
				_.autoPlay();
			}

			if (_.options.accessibility === true) {
				_.initADA();
			}

		}

	};

	Slick.prototype.prev = Slick.prototype.slickPrev = function () {

		var _ = this;

		_.changeSlide({
			data: {
				message: 'previous'
			}
		});

	};

	Slick.prototype.preventDefault = function (event) {

		event.preventDefault();

	};

	Slick.prototype.progressiveLazyLoad = function (tryCount) {

		tryCount = tryCount || 1;

		var _ = this,
            $imgsToLoad = $('img[data-lazy]', _.$slider),
            image,
            imageSource,
            imageSrcSet,
            imageSizes,
            imageToLoad;

		if ($imgsToLoad.length) {

			image = $imgsToLoad.first();
			imageSource = image.attr('data-lazy');
			imageSrcSet = image.attr('data-srcset');
			imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes');
			imageToLoad = document.createElement('img');

			imageToLoad.onload = function () {

				if (imageSrcSet) {
					image
                        .attr('srcset', imageSrcSet);

					if (imageSizes) {
						image
                            .attr('sizes', imageSizes);
					}
				}

				image
                    .attr('src', imageSource)
                    .removeAttr('data-lazy data-srcset data-sizes')
                    .removeClass('slick-loading');

				if (_.options.adaptiveHeight === true) {
					_.setPosition();
				}

				_.$slider.trigger('lazyLoaded', [_, image, imageSource]);
				_.progressiveLazyLoad();

			};

			imageToLoad.onerror = function () {

				if (tryCount < 3) {

					/**
                     * try to load the image 3 times,
                     * leave a slight delay so we don't get
                     * servers blocking the request.
                     */
					setTimeout(function () {
						_.progressiveLazyLoad(tryCount + 1);
					}, 500);

				} else {

					image
                        .removeAttr('data-lazy')
                        .removeClass('slick-loading')
                        .addClass('slick-lazyload-error');

					_.$slider.trigger('lazyLoadError', [_, image, imageSource]);

					_.progressiveLazyLoad();

				}

			};

			imageToLoad.src = imageSource;

		} else {

			_.$slider.trigger('allImagesLoaded', [_]);

		}

	};

	Slick.prototype.refresh = function (initializing) {

		var _ = this, currentSlide, lastVisibleIndex;

		lastVisibleIndex = _.slideCount - _.options.slidesToShow;

		// in non-infinite sliders, we don't want to go past the
		// last visible index.
		if (!_.options.infinite && (_.currentSlide > lastVisibleIndex)) {
			_.currentSlide = lastVisibleIndex;
		}

		// if less slides than to show, go to start.
		if (_.slideCount <= _.options.slidesToShow) {
			_.currentSlide = 0;

		}

		currentSlide = _.currentSlide;

		_.destroy(true);

		$.extend(_, _.initials, { currentSlide: currentSlide });

		_.init();

		if (!initializing) {

			_.changeSlide({
				data: {
					message: 'index',
					index: currentSlide
				}
			}, false);

		}

	};

	Slick.prototype.registerBreakpoints = function () {

		var _ = this, breakpoint, currentBreakpoint, l,
            responsiveSettings = _.options.responsive || null;

		if ($.type(responsiveSettings) === 'array' && responsiveSettings.length) {

			_.respondTo = _.options.respondTo || 'window';

			for (breakpoint in responsiveSettings) {

				l = _.breakpoints.length - 1;

				if (responsiveSettings.hasOwnProperty(breakpoint)) {
					currentBreakpoint = responsiveSettings[breakpoint].breakpoint;

					// loop through the breakpoints and cut out any existing
					// ones with the same breakpoint number, we don't want dupes.
					while (l >= 0) {
						if (_.breakpoints[l] && _.breakpoints[l] === currentBreakpoint) {
							_.breakpoints.splice(l, 1);
						}
						l--;
					}

					_.breakpoints.push(currentBreakpoint);
					_.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;

				}

			}

			_.breakpoints.sort(function (a, b) {
				return (_.options.mobileFirst) ? a - b : b - a;
			});

		}

	};

	Slick.prototype.reinit = function () {

		var _ = this;

		_.$slides =
            _.$slideTrack
                .children(_.options.slide)
                .addClass('slick-slide');

		_.slideCount = _.$slides.length;

		if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
			_.currentSlide = _.currentSlide - _.options.slidesToScroll;
		}

		if (_.slideCount <= _.options.slidesToShow) {
			_.currentSlide = 0;
		}

		_.registerBreakpoints();

		_.setProps();
		_.setupInfinite();
		_.buildArrows();
		_.updateArrows();
		_.initArrowEvents();
		_.buildDots();
		_.updateDots();
		_.initDotEvents();
		_.cleanUpSlideEvents();
		_.initSlideEvents();

		_.checkResponsive(false, true);

		if (_.options.focusOnSelect === true) {
			$(_.$slideTrack).children().on('click.slick', _.selectHandler);
		}

		_.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);

		_.setPosition();
		_.focusHandler();

		_.paused = !_.options.autoplay;
		_.autoPlay();

		_.$slider.trigger('reInit', [_]);

	};

	Slick.prototype.resize = function () {

		var _ = this;

		if ($(window).width() !== _.windowWidth) {
			clearTimeout(_.windowDelay);
			_.windowDelay = window.setTimeout(function () {
				_.windowWidth = $(window).width();
				_.checkResponsive();
				if (!_.unslicked) { _.setPosition(); }
			}, 50);
		}
	};

	Slick.prototype.removeSlide = Slick.prototype.slickRemove = function (index, removeBefore, removeAll) {

		var _ = this;

		if (typeof (index) === 'boolean') {
			removeBefore = index;
			index = removeBefore === true ? 0 : _.slideCount - 1;
		} else {
			index = removeBefore === true ? --index : index;
		}

		if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
			return false;
		}

		_.unload();

		if (removeAll === true) {
			_.$slideTrack.children().remove();
		} else {
			_.$slideTrack.children(this.options.slide).eq(index).remove();
		}

		_.$slides = _.$slideTrack.children(this.options.slide);

		_.$slideTrack.children(this.options.slide).detach();

		_.$slideTrack.append(_.$slides);

		_.$slidesCache = _.$slides;

		_.reinit();

	};

	Slick.prototype.setCSS = function (position) {

		var _ = this,
            positionProps = {},
            x, y;

		if (_.options.rtl === true) {
			position = -position;
		}
		x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
		y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';

		positionProps[_.positionProp] = position;

		if (_.transformsEnabled === false) {
			_.$slideTrack.css(positionProps);
		} else {
			positionProps = {};
			if (_.cssTransitions === false) {
				positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
				_.$slideTrack.css(positionProps);
			} else {
				positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
				_.$slideTrack.css(positionProps);
			}
		}

	};

	Slick.prototype.setDimensions = function () {

		var _ = this;

		if (_.options.vertical === false) {
			if (_.options.centerMode === true) {
				_.$list.css({
					padding: ('0px ' + _.options.centerPadding)
				});
			}
		} else {
			_.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
			if (_.options.centerMode === true) {
				_.$list.css({
					padding: (_.options.centerPadding + ' 0px')
				});
			}
		}

		_.listWidth = _.$list.width();
		_.listHeight = _.$list.height();


		if (_.options.vertical === false && _.options.variableWidth === false) {
			_.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
			_.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));

		} else if (_.options.variableWidth === true) {
			_.$slideTrack.width(5000 * _.slideCount);
		} else {
			_.slideWidth = Math.ceil(_.listWidth);
			_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
		}

		var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
		if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);

	};

	Slick.prototype.setFade = function () {

		var _ = this,
            targetLeft;

		_.$slides.each(function (index, element) {
			targetLeft = (_.slideWidth * index) * -1;
			if (_.options.rtl === true) {
				$(element).css({
					position: 'relative',
					right: targetLeft,
					top: 0,
					zIndex: _.options.zIndex - 2,
					opacity: 0
				});
			} else {
				$(element).css({
					position: 'relative',
					left: targetLeft,
					top: 0,
					zIndex: _.options.zIndex - 2,
					opacity: 0
				});
			}
		});

		_.$slides.eq(_.currentSlide).css({
			zIndex: _.options.zIndex - 1,
			opacity: 1
		});

	};

	Slick.prototype.setHeight = function () {

		var _ = this;

		if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
			var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
			_.$list.css('height', targetHeight);
		}

	};

	Slick.prototype.setOption =
    Slick.prototype.slickSetOption = function () {

    	/**
         * accepts arguments in format of:
         *
         *  - for changing a single option's value:
         *     .slick("setOption", option, value, refresh )
         *
         *  - for changing a set of responsive options:
         *     .slick("setOption", 'responsive', [{}, ...], refresh )
         *
         *  - for updating multiple values at once (not responsive)
         *     .slick("setOption", { 'option': value, ... }, refresh )
         */

    	var _ = this, l, item, option, value, refresh = false, type;

    	if ($.type(arguments[0]) === 'object') {

    		option = arguments[0];
    		refresh = arguments[1];
    		type = 'multiple';

    	} else if ($.type(arguments[0]) === 'string') {

    		option = arguments[0];
    		value = arguments[1];
    		refresh = arguments[2];

    		if (arguments[0] === 'responsive' && $.type(arguments[1]) === 'array') {

    			type = 'responsive';

    		} else if (typeof arguments[1] !== 'undefined') {

    			type = 'single';

    		}

    	}

    	if (type === 'single') {

    		_.options[option] = value;


    	} else if (type === 'multiple') {

    		$.each(option, function (opt, val) {

    			_.options[opt] = val;

    		});


    	} else if (type === 'responsive') {

    		for (item in value) {

    			if ($.type(_.options.responsive) !== 'array') {

    				_.options.responsive = [value[item]];

    			} else {

    				l = _.options.responsive.length - 1;

    				// loop through the responsive object and splice out duplicates.
    				while (l >= 0) {

    					if (_.options.responsive[l].breakpoint === value[item].breakpoint) {

    						_.options.responsive.splice(l, 1);

    					}

    					l--;

    				}

    				_.options.responsive.push(value[item]);

    			}

    		}

    	}

    	if (refresh) {

    		_.unload();
    		_.reinit();

    	}

    };

	Slick.prototype.setPosition = function () {

		var _ = this;

		_.setDimensions();

		_.setHeight();

		if (_.options.fade === false) {
			_.setCSS(_.getLeft(_.currentSlide));
		} else {
			_.setFade();
		}

		_.$slider.trigger('setPosition', [_]);

	};

	Slick.prototype.setProps = function () {

		var _ = this,
            bodyStyle = document.body.style;

		_.positionProp = _.options.vertical === true ? 'top' : 'left';

		if (_.positionProp === 'top') {
			_.$slider.addClass('slick-vertical');
		} else {
			_.$slider.removeClass('slick-vertical');
		}

		if (bodyStyle.WebkitTransition !== undefined ||
            bodyStyle.MozTransition !== undefined ||
            bodyStyle.msTransition !== undefined) {
			if (_.options.useCSS === true) {
				_.cssTransitions = true;
			}
		}

		if (_.options.fade) {
			if (typeof _.options.zIndex === 'number') {
				if (_.options.zIndex < 3) {
					_.options.zIndex = 3;
				}
			} else {
				_.options.zIndex = _.defaults.zIndex;
			}
		}

		if (bodyStyle.OTransform !== undefined) {
			_.animType = 'OTransform';
			_.transformType = '-o-transform';
			_.transitionType = 'OTransition';
			if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
		}
		if (bodyStyle.MozTransform !== undefined) {
			_.animType = 'MozTransform';
			_.transformType = '-moz-transform';
			_.transitionType = 'MozTransition';
			if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
		}
		if (bodyStyle.webkitTransform !== undefined) {
			_.animType = 'webkitTransform';
			_.transformType = '-webkit-transform';
			_.transitionType = 'webkitTransition';
			if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
		}
		if (bodyStyle.msTransform !== undefined) {
			_.animType = 'msTransform';
			_.transformType = '-ms-transform';
			_.transitionType = 'msTransition';
			if (bodyStyle.msTransform === undefined) _.animType = false;
		}
		if (bodyStyle.transform !== undefined && _.animType !== false) {
			_.animType = 'transform';
			_.transformType = 'transform';
			_.transitionType = 'transition';
		}
		_.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
	};


	Slick.prototype.setSlideClasses = function (index) {

		var _ = this,
            centerOffset, allSlides, indexOffset, remainder;

		allSlides = _.$slider
            .find('.slick-slide')
            .removeClass('slick-active slick-center slick-current')
            .attr('aria-hidden', 'true');

		_.$slides
            .eq(index)
            .addClass('slick-current');

		if (_.options.centerMode === true) {

			centerOffset = Math.floor(_.options.slidesToShow / 2);

			if (_.options.infinite === true) {

				if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {

					_.$slides
                        .slice(index - centerOffset, index + centerOffset + 1)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

				} else {

					indexOffset = _.options.slidesToShow + index;
					allSlides
                        .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

				}

				if (index === 0) {

					allSlides
                        .eq(allSlides.length - 1 - _.options.slidesToShow)
                        .addClass('slick-center');

				} else if (index === _.slideCount - 1) {

					allSlides
                        .eq(_.options.slidesToShow)
                        .addClass('slick-center');

				}

			}

			_.$slides
                .eq(index)
                .addClass('slick-center');

		} else {

			if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {

				_.$slides
                    .slice(index, index + _.options.slidesToShow)
                    .addClass('slick-active')
                    .attr('aria-hidden', 'false');

			} else if (allSlides.length <= _.options.slidesToShow) {

				allSlides
                    .addClass('slick-active')
                    .attr('aria-hidden', 'false');

			} else {

				remainder = _.slideCount % _.options.slidesToShow;
				indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;

				if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {

					allSlides
                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

				} else {

					allSlides
                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
                        .addClass('slick-active')
                        .attr('aria-hidden', 'false');

				}

			}

		}

		if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
			_.lazyLoad();
		}
	};

	Slick.prototype.setupInfinite = function () {

		var _ = this,
            i, slideIndex, infiniteCount;

		if (_.options.fade === true) {
			_.options.centerMode = false;
		}

		if (_.options.infinite === true && _.options.fade === false) {

			slideIndex = null;

			if (_.slideCount > _.options.slidesToShow) {

				if (_.options.centerMode === true) {
					infiniteCount = _.options.slidesToShow + 1;
				} else {
					infiniteCount = _.options.slidesToShow;
				}

				for (i = _.slideCount; i > (_.slideCount -
                        infiniteCount) ; i -= 1) {
					slideIndex = i - 1;
					$(_.$slides[slideIndex]).clone(true).attr('id', '')
                        .attr('data-slick-index', slideIndex - _.slideCount)
                        .prependTo(_.$slideTrack).addClass('slick-cloned');
				}
				for (i = 0; i < infiniteCount; i += 1) {
					slideIndex = i;
					$(_.$slides[slideIndex]).clone(true).attr('id', '')
                        .attr('data-slick-index', slideIndex + _.slideCount)
                        .appendTo(_.$slideTrack).addClass('slick-cloned');
				}
				_.$slideTrack.find('.slick-cloned').find('[id]').each(function () {
					$(this).attr('id', '');
				});

			}

		}

	};

	Slick.prototype.interrupt = function (toggle) {

		var _ = this;

		if (!toggle) {
			_.autoPlay();
		}
		_.interrupted = toggle;

	};

	Slick.prototype.selectHandler = function (event) {

		var _ = this;

		var targetElement =
            $(event.target).is('.slick-slide') ?
                $(event.target) :
                $(event.target).parents('.slick-slide');

		var index = parseInt(targetElement.attr('data-slick-index'));

		if (!index) index = 0;

		if (_.slideCount <= _.options.slidesToShow) {

			_.setSlideClasses(index);
			_.asNavFor(index);
			return;

		}

		_.slideHandler(index);

	};

	Slick.prototype.slideHandler = function (index, sync, dontAnimate) {

		var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
            _ = this, navTarget;

		sync = sync || false;

		if (_.animating === true && _.options.waitForAnimate === true) {
			return;
		}

		if (_.options.fade === true && _.currentSlide === index) {
			return;
		}

		if (_.slideCount <= _.options.slidesToShow) {
			return;
		}

		if (sync === false) {
			_.asNavFor(index);
		}

		targetSlide = index;
		targetLeft = _.getLeft(targetSlide);
		slideLeft = _.getLeft(_.currentSlide);

		_.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;

		if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
			if (_.options.fade === false) {
				targetSlide = _.currentSlide;
				if (dontAnimate !== true) {
					_.animateSlide(slideLeft, function () {
						_.postSlide(targetSlide);
					});
				} else {
					_.postSlide(targetSlide);
				}
			}
			return;
		} else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
			if (_.options.fade === false) {
				targetSlide = _.currentSlide;
				if (dontAnimate !== true) {
					_.animateSlide(slideLeft, function () {
						_.postSlide(targetSlide);
					});
				} else {
					_.postSlide(targetSlide);
				}
			}
			return;
		}

		if (_.options.autoplay) {
			clearInterval(_.autoPlayTimer);
		}

		if (targetSlide < 0) {
			if (_.slideCount % _.options.slidesToScroll !== 0) {
				animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
			} else {
				animSlide = _.slideCount + targetSlide;
			}
		} else if (targetSlide >= _.slideCount) {
			if (_.slideCount % _.options.slidesToScroll !== 0) {
				animSlide = 0;
			} else {
				animSlide = targetSlide - _.slideCount;
			}
		} else {
			animSlide = targetSlide;
		}

		_.animating = true;

		_.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);

		oldSlide = _.currentSlide;
		_.currentSlide = animSlide;

		_.setSlideClasses(_.currentSlide);

		if (_.options.asNavFor) {

			navTarget = _.getNavTarget();
			navTarget = navTarget.slick('getSlick');

			if (navTarget.slideCount <= navTarget.options.slidesToShow) {
				navTarget.setSlideClasses(_.currentSlide);
			}

		}

		_.updateDots();
		_.updateArrows();

		if (_.options.fade === true) {
			if (dontAnimate !== true) {

				_.fadeSlideOut(oldSlide);

				_.fadeSlide(animSlide, function () {
					_.postSlide(animSlide);
				});

			} else {
				_.postSlide(animSlide);
			}
			_.animateHeight();
			return;
		}

		if (dontAnimate !== true) {
			_.animateSlide(targetLeft, function () {
				_.postSlide(animSlide);
			});
		} else {
			_.postSlide(animSlide);
		}

	};

	Slick.prototype.startLoad = function () {

		var _ = this;

		if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {

			_.$prevArrow.hide();
			_.$nextArrow.hide();

		}

		if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {

			_.$dots.hide();

		}

		_.$slider.addClass('slick-loading');

	};

	Slick.prototype.swipeDirection = function () {

		var xDist, yDist, r, swipeAngle, _ = this;

		xDist = _.touchObject.startX - _.touchObject.curX;
		yDist = _.touchObject.startY - _.touchObject.curY;
		r = Math.atan2(yDist, xDist);

		swipeAngle = Math.round(r * 180 / Math.PI);
		if (swipeAngle < 0) {
			swipeAngle = 360 - Math.abs(swipeAngle);
		}

		if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
			return (_.options.rtl === false ? 'left' : 'right');
		}
		if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
			return (_.options.rtl === false ? 'left' : 'right');
		}
		if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
			return (_.options.rtl === false ? 'right' : 'left');
		}
		if (_.options.verticalSwiping === true) {
			if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
				return 'down';
			} else {
				return 'up';
			}
		}

		return 'vertical';

	};

	Slick.prototype.swipeEnd = function (event) {

		var _ = this,
            slideCount,
            direction;

		_.dragging = false;
		_.swiping = false;

		if (_.scrolling) {
			_.scrolling = false;
			return false;
		}

		_.interrupted = false;
		_.shouldClick = (_.touchObject.swipeLength > 10) ? false : true;

		if (_.touchObject.curX === undefined) {
			return false;
		}

		if (_.touchObject.edgeHit === true) {
			_.$slider.trigger('edge', [_, _.swipeDirection()]);
		}

		if (_.touchObject.swipeLength >= _.touchObject.minSwipe) {

			direction = _.swipeDirection();

			switch (direction) {

				case 'left':
				case 'down':

					slideCount =
                        _.options.swipeToSlide ?
                            _.checkNavigable(_.currentSlide + _.getSlideCount()) :
                            _.currentSlide + _.getSlideCount();

					_.currentDirection = 0;

					break;

				case 'right':
				case 'up':

					slideCount =
                        _.options.swipeToSlide ?
                            _.checkNavigable(_.currentSlide - _.getSlideCount()) :
                            _.currentSlide - _.getSlideCount();

					_.currentDirection = 1;

					break;

				default:


			}

			if (direction != 'vertical') {

				_.slideHandler(slideCount);
				_.touchObject = {};
				_.$slider.trigger('swipe', [_, direction]);

			}

		} else {

			if (_.touchObject.startX !== _.touchObject.curX) {

				_.slideHandler(_.currentSlide);
				_.touchObject = {};

			}

		}

	};

	Slick.prototype.swipeHandler = function (event) {

		var _ = this;

		if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
			return;
		} else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
			return;
		}

		_.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
            event.originalEvent.touches.length : 1;

		_.touchObject.minSwipe = _.listWidth / _.options
            .touchThreshold;

		if (_.options.verticalSwiping === true) {
			_.touchObject.minSwipe = _.listHeight / _.options
                .touchThreshold;
		}

		switch (event.data.action) {

			case 'start':
				_.swipeStart(event);
				break;

			case 'move':
				_.swipeMove(event);
				break;

			case 'end':
				_.swipeEnd(event);
				break;

		}

	};

	Slick.prototype.swipeMove = function (event) {

		var _ = this,
            edgeWasHit = false,
            curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;

		touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;

		if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
			return false;
		}

		curLeft = _.getLeft(_.currentSlide);

		_.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
		_.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;

		_.touchObject.swipeLength = Math.round(Math.sqrt(
            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));

		verticalSwipeLength = Math.round(Math.sqrt(
            Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));

		if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
			_.scrolling = true;
			return false;
		}

		if (_.options.verticalSwiping === true) {
			_.touchObject.swipeLength = verticalSwipeLength;
		}

		swipeDirection = _.swipeDirection();

		if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
			_.swiping = true;
			event.preventDefault();
		}

		positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
		if (_.options.verticalSwiping === true) {
			positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
		}


		swipeLength = _.touchObject.swipeLength;

		_.touchObject.edgeHit = false;

		if (_.options.infinite === false) {
			if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
				swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
				_.touchObject.edgeHit = true;
			}
		}

		if (_.options.vertical === false) {
			_.swipeLeft = curLeft + swipeLength * positionOffset;
		} else {
			_.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
		}
		if (_.options.verticalSwiping === true) {
			_.swipeLeft = curLeft + swipeLength * positionOffset;
		}

		if (_.options.fade === true || _.options.touchMove === false) {
			return false;
		}

		if (_.animating === true) {
			_.swipeLeft = null;
			return false;
		}

		_.setCSS(_.swipeLeft);

	};

	Slick.prototype.swipeStart = function (event) {

		var _ = this,
            touches;

		_.interrupted = true;

		if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
			_.touchObject = {};
			return false;
		}

		if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
			touches = event.originalEvent.touches[0];
		}

		_.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
		_.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;

		_.dragging = true;

	};

	Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function () {

		var _ = this;

		if (_.$slidesCache !== null) {

			_.unload();

			_.$slideTrack.children(this.options.slide).detach();

			_.$slidesCache.appendTo(_.$slideTrack);

			_.reinit();

		}

	};

	Slick.prototype.unload = function () {

		var _ = this;

		$('.slick-cloned', _.$slider).remove();

		if (_.$dots) {
			_.$dots.remove();
		}

		if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
			_.$prevArrow.remove();
		}

		if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
			_.$nextArrow.remove();
		}

		_.$slides
            .removeClass('slick-slide slick-active slick-visible slick-current')
            .attr('aria-hidden', 'true')
            .css('width', '');

	};

	Slick.prototype.unslick = function (fromBreakpoint) {

		var _ = this;
		_.$slider.trigger('unslick', [_, fromBreakpoint]);
		_.destroy();

	};

	Slick.prototype.updateArrows = function () {

		var _ = this,
            centerOffset;

		centerOffset = Math.floor(_.options.slidesToShow / 2);

		if (_.options.arrows === true &&
            _.slideCount > _.options.slidesToShow &&
            !_.options.infinite) {

			_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
			_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

			if (_.currentSlide === 0) {

				_.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
				_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

			} else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {

				_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
				_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

			} else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {

				_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
				_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');

			}

		}

	};

	Slick.prototype.updateDots = function () {

		var _ = this;

		if (_.$dots !== null) {

			_.$dots
                .find('li')
                .removeClass('slick-active')
                .attr('aria-hidden', 'true');

			_.$dots
                .find('li')
                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
                .addClass('slick-active')
                .attr('aria-hidden', 'false');

		}

	};

	Slick.prototype.visibility = function () {

		var _ = this;

		if (_.options.autoplay) {

			if (document[_.hidden]) {

				_.interrupted = true;

			} else {

				_.interrupted = false;

			}

		}

	};

	$.fn.slick = function () {
		var _ = this,
            opt = arguments[0],
            args = Array.prototype.slice.call(arguments, 1),
            l = _.length,
            i,
            ret;
		for (i = 0; i < l; i++) {
			if (typeof opt == 'object' || typeof opt == 'undefined')
				_[i].slick = new Slick(_[i], opt);
			else
				ret = _[i].slick[opt].apply(_[i].slick, args);
			if (typeof ret != 'undefined') return ret;
		}
		return _;
	};

}));;
/*! threesixty-slider 2015-05-28 verison 2.0.5 */
/* http://github.com/vml-webdev/threesixty-slider.git */
!function(a){"use strict";a.ThreeSixty=function(b,c){var d,e=this,f=[];e.$el=a(b),e.el=b,e.$el.data("ThreeSixty",e),e.init=function(){d=a.extend({},a.ThreeSixty.defaultOptions,c),d.disableSpin&&(d.currentFrame=1,d.endFrame=1),e.initProgress(),e.loadImages()},e.resize=function(){},e.initProgress=function(){e.$el.css({width:d.width+"px",height:d.height+"px","background-image":"none !important"}),d.styles&&e.$el.css(d.styles),e.responsive(),e.$el.find(d.progress).css({marginTop:d.height/2-15+"px"}),e.$el.find(d.progress).fadeIn("slow"),e.$el.find(d.imgList).hide()},e.loadImages=function(){var b,c,g,h;b=document.createElement("li"),h=d.zeroBased?0:1,c=d.imgArray?d.imgArray[d.loadedImages]:d.domain+d.imagePath+d.filePrefix+e.zeroPad(d.loadedImages+h)+d.ext+(e.browser.isIE()?"?"+(new Date).getTime():""),g=a("<img>").attr("src",c).addClass("previous-image").appendTo(b),f.push(g),e.$el.find(d.imgList).append(b),a(g).load(function(){e.imageLoaded()})},e.imageLoaded=function(){d.loadedImages+=1,a(d.progress+" span").text(Math.floor(d.loadedImages/d.totalFrames*100)+"%"),d.loadedImages>=d.totalFrames?(d.disableSpin&&f[0].removeClass("previous-image").addClass("current-image"),a(d.progress).fadeOut("slow",function(){a(this).hide(),e.showImages(),e.showNavigation()})):e.loadImages()},e.showImages=function(){e.$el.find(".txtC").fadeIn(),e.$el.find(d.imgList).fadeIn(),e.ready=!0,d.ready=!0,d.drag&&e.initEvents(),e.refresh(),e.initPlugins(),d.onReady(),setTimeout(function(){e.responsive()},50)},e.initPlugins=function(){a.each(d.plugins,function(b,c){if("function"!=typeof a[c])throw new Error(c+" not available.");a[c].call(e,e.$el,d)})},e.showNavigation=function(){if(d.navigation&&!d.navigation_init){var b,c,f,g;b=a("<div/>").attr("class","nav_bar"),c=a("<a/>").attr({href:"#","class":"nav_bar_next"}).html("next"),f=a("<a/>").attr({href:"#","class":"nav_bar_previous"}).html("previous"),g=a("<a/>").attr({href:"#","class":"nav_bar_play"}).html("play"),b.append(f),b.append(g),b.append(c),e.$el.prepend(b),c.bind("mousedown touchstart",e.next),f.bind("mousedown touchstart",e.previous),g.bind("mousedown touchstart",e.play_stop),d.navigation_init=!0}},e.play_stop=function(b){b.preventDefault(),d.autoplay?(d.autoplay=!1,a(b.currentTarget).removeClass("nav_bar_stop").addClass("nav_bar_play"),clearInterval(d.play),d.play=null):(d.autoplay=!0,d.play=setInterval(e.moveToNextFrame,d.playSpeed),a(b.currentTarget).removeClass("nav_bar_play").addClass("nav_bar_stop"))},e.next=function(a){a&&a.preventDefault(),d.endFrame-=5,e.refresh()},e.previous=function(a){a&&a.preventDefault(),d.endFrame+=5,e.refresh()},e.play=function(a,b){var c=a||d.playSpeed,f=b||d.autoplayDirection;d.autoplayDirection=f,d.autoplay||(d.autoplay=!0,d.play=setInterval(e.moveToNextFrame,c))},e.stop=function(){d.autoplay&&(d.autoplay=!1,clearInterval(d.play),d.play=null)},e.moveToNextFrame=function(){1===d.autoplayDirection?d.endFrame-=1:d.endFrame+=1,e.refresh()},e.gotoAndPlay=function(a){if(d.disableWrap)d.endFrame=a,e.refresh();else{var b=Math.ceil(d.endFrame/d.totalFrames);0===b&&(b=1);var c=b>1?d.endFrame-(b-1)*d.totalFrames:d.endFrame,f=d.totalFrames-c,g=0;g=a-c>0?a-c<c+(d.totalFrames-a)?d.endFrame+(a-c):d.endFrame-(c+(d.totalFrames-a)):f+a>c-a?d.endFrame-(c-a):d.endFrame+(f+a),c!==a&&(d.endFrame=g,e.refresh())}},e.initEvents=function(){e.$el.bind("mousedown touchstart touchmove touchend mousemove click",function(a){a.preventDefault(),"mousedown"===a.type&&1===a.which||"touchstart"===a.type?(d.pointerStartPosX=e.getPointerEvent(a).pageX,d.dragging=!0,d.onDragStart(d.currentFrame)):"touchmove"===a.type?e.trackPointer(a):"touchend"===a.type&&(d.dragging=!1,d.onDragStop(d.endFrame))}),a(document).bind("mouseup",function(b){d.dragging=!1,d.onDragStop(d.endFrame),a(this).css("cursor","none")}),a(window).bind("resize",function(a){e.responsive()}),a(document).bind("mousemove",function(a){d.dragging?(a.preventDefault(),!e.browser.isIE&&d.showCursor&&e.$el.css("cursor","url(assets/images/hand_closed.png), auto")):!e.browser.isIE&&d.showCursor&&e.$el.css("cursor","url(assets/images/hand_open.png), auto"),e.trackPointer(a)}),a(window).resize(function(){e.resize()})},e.getPointerEvent=function(a){return a.originalEvent.targetTouches?a.originalEvent.targetTouches[0]:a},e.trackPointer=function(a){d.ready&&d.dragging&&(d.pointerEndPosX=e.getPointerEvent(a).pageX,d.monitorStartTime<(new Date).getTime()-d.monitorInt&&(d.pointerDistance=d.pointerEndPosX-d.pointerStartPosX,d.pointerDistance>0?d.endFrame=d.currentFrame+Math.ceil((d.totalFrames-1)*d.speedMultiplier*(d.pointerDistance/e.$el.width())):d.endFrame=d.currentFrame+Math.floor((d.totalFrames-1)*d.speedMultiplier*(d.pointerDistance/e.$el.width())),d.disableWrap&&(d.endFrame=Math.min(d.totalFrames-(d.zeroBased?1:0),d.endFrame),d.endFrame=Math.max(d.zeroBased?0:1,d.endFrame)),e.refresh(),d.monitorStartTime=(new Date).getTime(),d.pointerStartPosX=e.getPointerEvent(a).pageX))},e.refresh=function(){0===d.ticker&&(d.ticker=setInterval(e.render,Math.round(1e3/d.framerate)))},e.render=function(){var a;d.currentFrame!==d.endFrame?(a=d.endFrame<d.currentFrame?Math.floor(.1*(d.endFrame-d.currentFrame)):Math.ceil(.1*(d.endFrame-d.currentFrame)),e.hidePreviousFrame(),d.currentFrame+=a,e.showCurrentFrame(),e.$el.trigger("frameIndexChanged",[e.getNormalizedCurrentFrame(),d.totalFrames])):(window.clearInterval(d.ticker),d.ticker=0)},e.hidePreviousFrame=function(){f[e.getNormalizedCurrentFrame()].removeClass("current-image").addClass("previous-image")},e.showCurrentFrame=function(){f[e.getNormalizedCurrentFrame()].removeClass("previous-image").addClass("current-image")},e.getNormalizedCurrentFrame=function(){var a,b;return d.disableWrap?(a=Math.min(d.currentFrame,d.totalFrames-(d.zeroBased?1:0)),b=Math.min(d.endFrame,d.totalFrames-(d.zeroBased?1:0)),a=Math.max(a,d.zeroBased?0:1),b=Math.max(b,d.zeroBased?0:1),d.currentFrame=a,d.endFrame=b):(a=Math.ceil(d.currentFrame%d.totalFrames),0>a&&(a+=d.totalFrames-(d.zeroBased?1:0))),a},e.getCurrentFrame=function(){return d.currentFrame},e.responsive=function(){d.responsive&&e.$el.css({height:e.$el.find(".current-image").first().css("height"),width:"100%"})},e.zeroPad=function(a){function b(a,b){var c=a.toString();if(d.zeroPadding)for(;c.length<b;)c="0"+c;return c}var c=Math.log(d.totalFrames)/Math.LN10,e=1e3,f=Math.round(c*e)/e,g=Math.floor(f)+1;return b(a,g)},e.browser={},e.browser.isIE=function(){var a=-1;if("Microsoft Internet Explorer"===navigator.appName){var b=navigator.userAgent,c=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})");null!==c.exec(b)&&(a=parseFloat(RegExp.$1))}return-1!==a},e.getConfig=function(){return d},a.ThreeSixty.defaultOptions={dragging:!1,ready:!1,pointerStartPosX:0,pointerEndPosX:0,pointerDistance:0,monitorStartTime:0,monitorInt:10,ticker:0,speedMultiplier:7,totalFrames:180,currentFrame:0,endFrame:0,loadedImages:0,framerate:60,domains:null,domain:"",parallel:!1,queueAmount:8,idle:0,filePrefix:"",ext:"png",height:300,width:300,styles:{},navigation:!1,autoplay:!1,autoplayDirection:1,disableSpin:!1,disableWrap:!1,responsive:!1,zeroPadding:!1,zeroBased:!1,plugins:[],showCursor:!1,drag:!0,onReady:function(){},onDragStart:function(){},onDragStop:function(){},imgList:".threesixty_images",imgArray:null,playSpeed:100},e.init()},a.fn.ThreeSixty=function(b){return Object.create(new a.ThreeSixty(this,b))}}(jQuery),"function"!=typeof Object.create&&(Object.create=function(a){"use strict";function b(){}return b.prototype=a,new b});;

$.validator.setDefaults({
    highlight: function (element) {
        $(element).closest('.form-group').addClass('has-error');
    },
    unhighlight: function (element) {
        $(element).closest('.form-group').removeClass('has-error');
    },
    errorElement: 'span',
    errorClass: 'text-danger',
    errorPlacement: function (error, element) {
        if (element.parent('.checkbox-inline, .radio-inline, .fileinput-button').length) {
            error.insertAfter(element.parent().parent());
        } else
            if (element.parent().parent('.checkbox, .radio').length) {
                error.insertAfter(element.parent().parent().parent());
            } else
                if (element.parent('.btn, .input-group').length) {
                    error.insertAfter(element.parent());
                } else {
                    error.insertAfter(element);
                }
    },
    // so we can validate hidden of date-picker, I don't want to include all hiddens because I don't know what I am breaking
    ignore: ':hidden:not(input.is-date-picker)'
});


$.validator.addMethod('maxuploadsizevalidator', function (value, element, params) {
    var maxsize = params[0];
    var totalSize = 0;
    if (element.files) {
        for (i = 0; i < element.files.length; i++) {
            totalSize += element.files[i].size;
        }
    }
    return totalSize <= maxsize;
});

$.validator.addMethod('maxfilecountvalidator', function (value, element, maxfilecount) {
    var totalcount = 0;
    $(element).parents(".fileupload").find('input[type=file]').each(function () {
        if (this.files) {
            totalcount += this.files.length;
        }
        else if (this.value) {
            totalcount += 1;
        }
    });
    return totalcount <= maxfilecount;
});


$(function () {
    $('form.formbuilder').each(function () {
        $(this).validate();
    });


    $("form.formbuilder").on("submit", function (event) {

        if (!$("form.formbuilder").valid()) {
            event.preventDefault();
        }
        var totalUploadSize = 0;
        $(this).find('input[type=file]').each(function () {
            if (this.files) {
                for (i = 0; i < this.files.length; i++) {
                    totalUploadSize += this.files[i].size;
                }
            }
        });
        var maxUploadSize = $(this).attr('maxuploadsize');
        if (totalUploadSize > maxUploadSize) {
            alert($(this).attr('maxuploadsizemessage'));
            event.preventDefault();
        }
        return;
    });

    $('form.formbuilder input[maxuploadsize]').each(function () {
        var maxsize = $(this).attr('maxuploadsize');
        var maxsizemessage = $(this).attr('maxuploadsizemessage');

        $(this).rules('add', {
            maxuploadsizevalidator: [maxsize, maxsizemessage]
        });
    });

    $('form.formbuilder .fileupload[maxfilecount]').each(function () {
        var maxfilecount = $(this).attr('maxfilecount');
        var el = $(this).find("input[type=file]:first");
        el.rules('add', {
            maxfilecountvalidator: maxfilecount
        });
    });



    $('form.formbuilder .fileupload-required').each(function () {
        $(this).rules('add', {
            required: function (element) {
                var totalcount = 0;
                $(element).parents(".fileupload").find('input[type=file]').each(function () {
                    if (this.files) {
                        totalcount += this.files.length;
                    } else if (this.value) { // for IE9
                        totalcount += 1;
                    }
                });
                return totalcount == 0;
            }
        });
    });
});

function fileUpload_PreviewFileTemplate(o) {
    var rows = $();
    $.each(o.files, function (index, file) {
        var row = $('<tr class="template-upload fade">' +
            '<td><span class="preview"></span></td>' +
            '<td><p class="name"></p>' +
            '<p class="text-danger error"></p>' +
            '</td>' +
            '<td><p class="size"></p>' +
            '</td>' +
            '</tr>');
        row.find('.name').text(file.name);
        row.find('.size').text(o.formatFileSize(file.size));
        rows = rows.add(row);
    });
    return rows;
}

function fileUpload_DeletePreviewFileRows(clientid, leaveRowsCount) {
    leaveRowsCount = typeof leaveRowsCount !== 'undefined' ? leaveRowsCount : 1;
    var table = document.getElementById(clientid);
    while (table.rows.length > leaveRowsCount) {
        table.deleteRow(0);
    };
}

function fileUpload_resetFormElement(e) {
    e.wrap('<form>').closest('form').get(0).reset();
    e.unwrap();
}

function fileUpload_resetFormSimpleFileElement(e) {
    if (e[0].files && e[0].files.length == 1) {
        fileUpload_resetFormElement(e);
    }
}

function fileUpload_cancelSelection(clientID) {
    $('#files_' + clientID).html('');
    $('#cancel_' + clientID).hide();
    $('#inputFileds_' + clientID).html('');
}

function replaceDateValidator() {
    var originalDateValidator = $.validator.methods.date;

    function dateValidation(e, i) {
        if (e === '') {
            return true;
        }
        var isGerman = e.indexOf('.') !== -1;
        
        // for retrocompatibility..
        if (isGerman) {
            var dateFragment = e.split('.')
            if (dateFragment.length === 3) {
                if (dateFragment[0] > 31 || dateFragment[0] < 0) {
                    return false
                } else if (dateFragment[1] > 12 || dateFragment[1] < 0) {
                    return false;
                } else if (dateFragment[2] < 1900 || dateFragment[2] > 2050) {
                    return false
                }
            } else {
                return false;
            }
 
            return true;
        }
        else 
        {
            // preserve original behavior for all normal dates
            return originalDateValidator.call($.validator.prototype, e, i);
        }
    }

    $.validator.methods.date = dateValidation;
}

replaceDateValidator();
;
var Landi = Landi || {};

if (!String.prototype.startsWith) {
	String.prototype.startsWith = function (searchString, position) {
		position = position || 0;
		return this.indexOf(searchString, position) === position;
	};
}

var downloadFile = function (url, fileName) {
	var xhr = new XMLHttpRequest();
	xhr.open("GET", url, true);
	xhr.responseType = "blob";

	if (navigator.msSaveOrOpenBlob) {
		xhr.onload = function() {
			navigator.msSaveBlob(xhr.response, fileName);
		};
	} else {
		xhr.onload = function() {
			var urlCreator = window.URL || window.webkitURL;
			var imageUrl = urlCreator.createObjectURL(this.response);
			var tag = document.createElement('a');
			tag.href = imageUrl;
			tag.download = fileName;
			document.body.appendChild(tag);
			tag.click();
			document.body.removeChild(tag);
		};
	}

	xhr.send();
};

(function (screen, $) {
	screen.Breakpoints = {
		xsMax: 767,
		smMin: 767,
		smMax: 1024,
		mdMin: 1024,
		mdMax: 1200,
		lgMin: 1200
	};

	screen.isInXsWidth = function() {
		var ww = $(window).width();
		return ww <= screen.Breakpoints.xsMax;
	};

}(Landi.Screen = Landi.Screen || {}, jQuery = jQuery || {}));

// Detect when the modal is inserted an move the modal to the body element. Otherwise Navigation and backdrop overlay the modal.
function bindObserverForModals() {
	const parentsToObserveFrom = $("[js-observe-dom-change-modal]");

	if (parentsToObserveFrom.length) {
		parentsToObserveFrom.each(function() {
			(new MutationObserver(function(mutationsList, observer) {
				mutationsList.forEach(function (mutation) {
					$(".places-overlay-panel").insertAfter($($(".modal-backdrop")[0]));
				});
			})).observe(this,
				{
					attributes: true,
					childList: true,
					subtree: true,
				});
		});
	}
}


$(document).ready(function() {
	bindObserverForModals();
});


if (navigator.userAgent.match(/Trident\/7\./)) { // if IE
	$('body').on("mousewheel", function () {
		// remove default behavior
		event.preventDefault();

		//scroll without smoothing
		var wheelDelta = event.wheelDelta;
		var currentScrollPosition = window.pageYOffset;
		window.scrollTo(0, currentScrollPosition - wheelDelta);
	});
}
;

var Landi = Landi || {};

Landi.throttle = function (func, wait, options) {
	var context, args, result;
	var timeout = null;
	var previous = 0;
	if (!options) options = {};
	var later = function () {
		previous = options.leading === false ? 0 : Date.now();
		timeout = null;
		result = func.apply(context, args);
		if (!timeout) context = args = null;
	};
	return function () {
		var now = Date.now();
		if (!previous && options.leading === false) previous = now;
		var remaining = wait - (now - previous);
		context = this;
		args = arguments;
		if (remaining <= 0 || remaining > wait) {
			if (timeout) {
				clearTimeout(timeout);
				timeout = null;
			}
			previous = now;
			result = func.apply(context, args);
			if (!timeout) context = args = null;
		} else if (!timeout && options.trailing !== false) {
			timeout = setTimeout(later, remaining);
		}
		return result;
	};
};

Landi.debounce = function(func, wait, immediate) {
	var timeout;
	return function () {
		var context = this, args = arguments;
		var later = function () {
			timeout = null;
			if (!immediate) func.apply(context, args);
		};
		var callNow = immediate && !timeout;
		clearTimeout(timeout);
		timeout = setTimeout(later, wait);
		if (callNow) func.apply(context, args);
	};
};;
/**
* showLoaderWhen replaces the content of a container with a loading spinner
* when the bound value is truthy.
* Styling requires the .loader class to be defined for the page as well as the loaderClass property 
* (or a default of .loader-dark)
*/
ko.bindingHandlers.showLoaderWhen = {
	init: function (element, valueAccessor, allBindingsAccessor) {
		var loaderClass = ko.utils.unwrapObservable(allBindingsAccessor()).loaderClass || "loader-white",
			hideChildren = ko.utils.unwrapObservable(allBindingsAccessor()).hideChildren || false,
			$element = $(element),
			currentPosition = $element.css("position"),
			$loader = $("<div>", { "class": loaderClass }).addClass("loader").hide();

		//add the loader
		$element.append($loader);
		$element.data('hide-children-on-loading', hideChildren);
		//make sure that we can absolutely position the loader against the original element
		if (currentPosition === "auto" || currentPosition === "static") {
			$element.css("position", "relative");
		}

		$element.css('min-height', '100px');
	},
	update: function (element, valueAccessor) {
		var isLoading = ko.utils.unwrapObservable(valueAccessor()),
			$element = $(element),
			hideChildren = $element.data('hie-children-on-loading'),
			$childrenToHide = $element.children(":not(div.loader)"),
			$loader = $element.find("div.loader");

		if (isLoading) {
			if (hideChildren) {
				$childrenToHide.css("visibility", "hidden").attr("disabled", "disabled");
			}
			$loader.show();
		}
		else {
			$loader.fadeOut("fast");
			if (hideChildren) {
				$childrenToHide.css("visibility", "visible").removeAttr("disabled");
			}
		}
	}
};;
ko.bindingHandlers.slider = {
	init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
		var $win = $(window);
		var $slider = $(element);
		var $input = $slider.siblings('input');
		
		var $baseContainer;
		var $activeArea;
		var slider;

		var oldSliderValue = -1;

		var args = ko.unwrap(valueAccessor());

		var usePips = args.usePips === undefined || args.usePips === null ? true : args.usePips;
		var fillSlider = args.fillSlider === undefined || args.fillSlider == null ? false : args.fillSlider;
		var uiSliderValue = args.sliderValue;
		var sliderDay     = {
			divisions           : createDayDivisionsArray(args.divisionsCount),
			start               : args.startIndex,
			step                : args.step,
			last                : args.divisionsCount,
			lastSelectableValue : args.divisionsCount - 1,
			handleOffset        : (100 / args.divisionsCount / 2).toString() + '%'
		};

		var onUserInteration = args.onUserInteraction;

		var sliderOptions = {
			start: sliderDay.start,
			range: {
				min: [0, sliderDay.step],
				max: sliderDay.last
			}
		};

		if (usePips) {
			sliderOptions.pips = {
				mode: 'values',
				values: sliderDay.divisions,
				format: {
					to: function(value) {
						var hour = parseInt((24 / sliderDay.last) * value * 10) / 10;
						return parseInt(hour).toString().length <= 1 ? ('0' + (hour).toString()) : hour;
					}
				}
			}
		}

		noUiSlider.create(element, sliderOptions);

		slider = element.noUiSlider;

		$baseContainer = $slider.find('.noUi-base');
		$baseContainer.css('margin-left', sliderDay.handleOffset);
		$slider.append('<div class="noUi-activearea"><div /></div>');
		$activeArea = $slider.find('.noUi-activearea');

		// -------------------

		slider.on('slide', function(value) {
			var sliderValue = Number(value);

			if(sliderValue > sliderDay.lastSelectableValue)
				slider.set(sliderDay.lastSelectableValue);

			onUserInteration();
		});

		slider.on('update', function(value) {
			var sliderValue = Number(value);

			if(sliderValue <= sliderDay.lastSelectableValue && sliderValue !== oldSliderValue) {
				$input.val(sliderValue);
				updateActiveArea(sliderValue);
				uiSliderValue(sliderValue);

				oldSliderValue = sliderValue;
			}
		});

		// -------------------

		function createDayDivisionsArray(dayPartsCount) {
			var dayPartsArray = [];

			for(var index = 0; index <= dayPartsCount; index++) {
				dayPartsArray.push(index);
			}

			return dayPartsArray;
		};

		function updateActiveArea(sliderValue) {
			var active = Number($input.val());
			var width = 100 / (sliderDay.last);
			var left = active * width;
			var right = 100 - width - left;

			$activeArea
				.removeClass('left right')
				.addClass(sliderValue > oldSliderValue ? 'right' : 'left')
				.css({
					left: left + '%',
					right: right + '%'
			});

			if (fillSlider) {
				var barWidth = width * sliderValue + width;
				$activeArea.css({
					left: 0,
					width: barWidth + '%'
				});
			}
		};
	},
	update: function(element, valueAccessor) {
		var slider = element.noUiSlider;
		var args   = ko.unwrap(valueAccessor());

		var uiSliderValue = args.sliderValue;

		slider.set(uiSliderValue());
	}
};;
ko.bindingHandlers.typeahead      = {
	init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
		var $typeahead       = $(element);
		var args             = ko.unwrap(valueAccessor());
		var url              = args.url;
		var onSelectCallback = args.onSelect;
		var format           = args.suggestionFormat || function(object) {
			return object.plz + ' ' + object.name;
		};

		$typeahead.typeahead({
			hint: true,
			highlight: true,
			minLength: 1
		},{
			name: 'places',
			display: format,
			source: new Bloodhound({
				datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
  				queryTokenizer: Bloodhound.tokenizers.whitespace,
				remote: {
					url: url,
					wildcard: '{suchbegriff}',
					transform: function(response) {
						return response.orte;
					}
				}
			})
		});

		$typeahead.on('typeahead:select', function(e, place) {
			$typeahead.blur().val('');
			onSelectCallback(place);
		});
	}
};;

var Landi = Landi || {};

Landi.ImageLoadDependentInitializer = function(container, imgSelector, initializeFunction) {
	var images = container.find(imgSelector);

	if (images.length > 0) {
		var imagesToLoad = images.length;

		var imageLoadCompleted = function() {
			imagesToLoad--;

			if (imagesToLoad === 0) {
				initializeFunction();
			}
		}

		images.each(function (index) {
			$(this).on('load', imageLoadCompleted);
			if (this.complete) {
				$(this).off('load');
			}
		});
	} else {
		initializeFunction();
	}
};
var Landi = Landi || {};

Landi.MobileNavigation = function() {

	var animationTimeInSecWithoutUnit = 400;

	/**
	 * When clicking on the "burger" icon, the page content is slid left and reveals the mobile navigation.
	 * And vice versa for closing the mobile navigation with the "x" icon.
	 */
	function setUpTogglingVisibilityOfMobileNavigation() {
		var widthOfOverlapInPxWithoutUnit = 0;

		

		function shiftPageContent() {
			// Elements to move.
			var $pageContentContainer = $("#PageContentContainer");
			var $fixedNavBar1 = $("#LandiHeader");
			var $fixedNavShadow = $("#LandiHeader:after");
			var $fixedNavBar2 = $("#TopNavigation");

			// Calculating distance for the movememnt.
			var htmlWidth = $("body").css("width").replace("px", "");
			var shiftingDistancePx = htmlWidth - widthOfOverlapInPxWithoutUnit + "px";

			var $pageContentClone;

			// Doing the shift.
			if ($pageContentContainer.css("right") !== shiftingDistancePx) {
				$pageContentContainer.animate({ "right": shiftingDistancePx }, animationTimeInSecWithoutUnit, "swing", function() {
					$pageContentContainer.css("display", "none");
				});
				$fixedNavBar1.animate({ "left": "-" + shiftingDistancePx }, animationTimeInSecWithoutUnit);
				$fixedNavShadow.animate({ "left": "-" + shiftingDistancePx }, animationTimeInSecWithoutUnit);
				$fixedNavBar2.animate({ "left": "-" + shiftingDistancePx }, animationTimeInSecWithoutUnit);
				
			} else {
				$pageContentContainer.css("display", "block");
				
				$pageContentContainer.animate({ "right": "0px" }, animationTimeInSecWithoutUnit);
				$fixedNavBar1.animate({ "left": "0px" }, animationTimeInSecWithoutUnit);
				$fixedNavShadow.animate({ "left": "0px" }, animationTimeInSecWithoutUnit);
				$fixedNavBar2.animate({ "left": "0px" }, animationTimeInSecWithoutUnit);
			}
		}

		function bindToggle() {
			var navTogglerButton = $("[data-mobilenavtoggle]");
			navTogglerButton.on("click", shiftPageContent);
			navTogglerButton.on("touch", shiftPageContent);
		}

		// Bind page content shift to events.
		bindToggle();
	}

	/**
	 * When you open the navigation panel on a cellphone, you will see a list of child pages, if any.
	 * Also you will see a chevron pointing to the left. Clicking this slides in another list of child pages but at the level of the parent node.
	 * Vice versa also for chevrons pointing to the right and child nodes.
	 */
	function setUpMovingThroughSitemapNodeScreens() {

		function showSiteMapNodeScreen(event) {
			event.preventDefault();
			var targetUrl = $(event.target).data("mobilenavgotositemapnodescreen");
			var apiUrl = "/api/navigation/mobile/screen-for?target=" + targetUrl;
			var toParent = $(event.target).data("mobilenavdirection") === "parent";
			$.ajax({
					url: apiUrl,
					method: "GET"
				})
				.done(function(data) {
					var $predecessor = $(".screen-container");
					var $successor = $($.parseHTML(data));

					if (toParent) {
						$predecessor.css("z-index", "1");
						$successor.css("z-index", "2").css("left", "-100%");

						$("#mobile-navigation-collapsible-container").append($successor);

						$successor.animate({ "left": "0%" },
							animationTimeInSecWithoutUnit,
							"swing",
							function() {
								// When complete.
								$predecessor.remove();
							});
					} else {
						$predecessor.css("z-index", "2");
						$successor.css("z-index", "1");

						$("#mobile-navigation-collapsible-container").append($successor);

						$predecessor.animate({ "left": "-100%" },
							animationTimeInSecWithoutUnit,
							"swing",
							function() {
								// When complete.
								$predecessor.remove();
							});
					}
				})
				.then(function() {
					bindToggle();
				});
		}

		function bindToggle() {
			var levelToggleButton = $("[data-mobilenavgotositemapnodescreen]");
			// Bind page content shift to events.
			levelToggleButton.on("click", showSiteMapNodeScreen);
			levelToggleButton.on("touch", showSiteMapNodeScreen);
		}

		bindToggle();
	}

	// Initialization of the setups.
	setUpMovingThroughSitemapNodeScreens();
	setUpTogglingVisibilityOfMobileNavigation();
};

jQuery(document).ready(function () {
	Landi.MobileNavigation();
});;

var Landi = Landi || {};

Landi.CarouselInitializer = function () {
	// Vars
	// ------------------------------------------------------

	var $carousel = $('.slick-carousel');
	
	if ($carousel.length === 0) {
		return;
	}

	$carousel.each(function () {
		var $slider       = $(this);
		var isInitialized = $slider.data('initialized') === true;

		var slidesToShowDesktop = 1;
		var slidesToShowTablet = 1;
		var slidesToShowMobile = 1;

		if ($slider.hasClass('slick-carousel-lg-6')) {
			slidesToShowDesktop = 6;
			slidesToShowTablet = 6;
		}

		if ($slider.hasClass('slick-carousel-lg-3')) {
			slidesToShowDesktop = 3;
			slidesToShowTablet = 3;
		}

		if ($slider.hasClass('slick-carousel-lg-4')) {
			slidesToShowDesktop = 4;
			slidesToShowTablet = 4;
		}

		if ($slider.hasClass('slick-carousel-sm-4')) {
			slidesToShowTablet = 4;
		}

		if ($slider.hasClass('slick-carousel-lg-2')) {
			slidesToShowDesktop = 2;
		}

		if ($slider.hasClass('slick-carousel-xs-2')) {
			slidesToShowMobile = 2;
		}

		if(!isInitialized) {
			createCarousel($slider, slidesToShowDesktop, slidesToShowTablet, slidesToShowMobile);
			$slider.data('initialized', true);
		}
	});

	// ----------------------------------------------------------

	function createCarousel($slick, slidesToShowDesktop, slidesToShowTablet, slidesToShowMobile) {
		// Slider Initializing
		// ------------------------------------------------------

		$slick.slick({
			autoplay: true,
			arrows: true,
			dots: true,
			infinite: true,
			slidesToShow: slidesToShowDesktop,
			slidesToScroll: slidesToShowDesktop,
			speed: 300,
			responsive: [
				{
					breakpoint: 1025,
					settings: {
						slidesToShow: slidesToShowTablet,
						slidesToScroll: slidesToShowTablet
					}
				},
				{
					breakpoint: 768,
					settings: {
						slidesToShow: slidesToShowMobile,
						slidesToScroll: slidesToShowMobile
					}
				}
			]
		});

		// Update Width after Image load
		Landi.ImageLoadDependentInitializer($slick, '.product-item-wrap > a > img', function () {
			$slick.slick('slickSetOption', null, null, true);
		});
	};
}

jQuery(document).ready(function($) {
	Landi.CarouselInitializer();
});;

jQuery(document).ready(function () {

	var megaDropdowns = [];

	var closeAllMegadropdowns = function() {
		$.each(megaDropdowns, function() {
			var megaDropdown = $(this);
			megaDropdown.parent().removeClass('hover');
			megaDropdown.hide();
			$(this).hide();
		});
	}
	
	var addHoverEffect = function(navItem, megaDropdown) {
		var hoverInTimeout = null;
		var hoverOutTimeout = null;

		navItem.on('mouseenter focusin', function () {
			clearTimeout(hoverOutTimeout);
			navItem.addClass('hover');

			hoverInTimeout = setTimeout(function () {
				closeAllMegadropdowns(megaDropdown);
				navItem.addClass('hover');
				megaDropdown.show();
			}, 250);
		}).on('mouseleave focusout', function () {
			clearTimeout(hoverInTimeout);

			hoverOutTimeout = setTimeout(function () {
				navItem.removeClass('hover');
				megaDropdown.hide();
			}, 500);
		});
	}

	$('.top-navigation .navigation-item-link, .tab-navigation .navigation-item-link').each(function() {
		var linkContainer = $(this);
		var link = linkContainer.find('a');
		var navItem = linkContainer.parent();
		var megaDropdown = navItem.find('.megadropdown');

		if (megaDropdown.length > 0) {
			megaDropdowns.push(megaDropdown);

			addHoverEffect(navItem, megaDropdown);

			navItem.on('touchstart', function (event) {
				event.stopPropagation();
				if (megaDropdown.is(':hidden')) {
					event.preventDefault();
					closeAllMegadropdowns();
					navItem.addClass('hover');
					megaDropdown.show();
				}
			});

			$('body').on('touchstart', function(event) {
				closeAllMegadropdowns();
			});
		} else {
			addHoverEffect(navItem, megaDropdown);
		}
	});
});;
var Landi = Landi || {};

Landi.Search = function () {

	/************* SEARCH RESULT URL *************/

	var searchResultUrl = $('#SearchForm').attr('action');

	/************* SEARCH RESULT URL *************/

	var responseObject = new Array();
	var placesResponseObject = new Array();
	var contentResponseObject = new Array();

	var categoryLimit = 4;
	var productPerCategoryLimit = 8;
	var placesLimit = 4;
	var contentLimit = 4;

	var responseLoading = false;

	var $searchElement = $('#MainSearch');
	var $form = $searchElement.closest('form');

	var substringMatcher = new Bloodhound({
		datumTokenizer: Bloodhound.tokenizers.whitespace,
		queryTokenizer: Bloodhound.tokenizers.whitespace,
		identify: function (obj) { return obj.Sku; },
		prefetch: false,
		remote: {
			url: window.location.origin + getApiBaseUrl() + "/search/typeahead?query=%query%&categoriescount=" + categoryLimit + "&productscount=" +
				productPerCategoryLimit + "&placescount=" + placesLimit + "&contentcount=" + contentLimit,
			transform: function (response) {
				responseObject = response;
				responseLoading = false;

				// set search query id if available
				if (response.length) {
					$('#SearchForm').data('qid', response[0].Qid.toString());
				}

				if (responseObject.length <= 0) {
					$(".tt-dataset-products").text(window.SearchResources.SearchNoResults);
				} else {
					var html = $(".tt-dataset-products").html();
					$(".tt-dataset-products").html(html.replace(window.SearchResources.SearchNoResults, ''));
				}

				if (!responseLoading) {
					hideLoaderForElement();
				}

				return responseObject;
			},
			prepare: function (query, settings) {
				responseLoading = true;
				showLoaderForElement();

				settings.url = settings.url.replace("%query%", prepareQuery(query));
				return settings;
			}
		}
	});

	$(document).on('mouseover', '.tt-suggestion', function (event) {
		$('.tt-suggestion').removeClass('tt-cursor');
	});

	substringMatcher.initialize();

	$searchElement.typeahead({
			hint: true,
			highlight: true,
			minLength: 2,
			async: true
		},
		{
			name: 'products',
			limit: 1,
			source: substringMatcher,
			display: function(object) { return object.name; },
			templates: {
				suggestion: function (object) {
					return object.ElementHtml;
				},
				header: function(object) {
					return '';
				},
				footer: function(object) {
					return '';
				}
			}
		});
	
	$searchElement.on("typeahead:open", function (event, sender) {
		var foundItemLength = responseObject.length + placesResponseObject.length + contentResponseObject.length;

		if (foundItemLength <= 0) {
			$('#SearchForm .tt-menu').addClass('tt-empty');
		}
	});

	$('#SearchClose').on('click', function (event) {
		event.preventDefault();
	});

	$('#SearchSubmit').on('click', function (event) {
		event.preventDefault();
		closeSearchAndSubmit(event);
	});

	var $navigationButtons = $('.navigation-buttons');
	$('#toggle-search').on('click', function (event) {
		$navigationButtons.addClass('is-search-open');
	});
	
	$('#close-search').on('click', function (event) {
		event.preventDefault();
		$navigationButtons.removeClass('is-search-open');
	});

	function closeSearchAndSubmit(event) {
		$searchElement.typeahead('close');
		$form.submit();
	}

	function hideLoaderForElement() {
		$(".tt-menu").removeClass("loading");
		$(".tt-menu").css("left", "");
	}

	function showLoaderForElement() {
		$(".tt-menu").css("left", "");

		$(".tt-menu").addClass("loading");
	}

	function prepareQuery(query) {
		return encodeURIComponent(query.trim());
	}

	/**
	 * Show products when hovering over their respective category.
	 */ 
	function showProductsOnHover() {
		
		$(".tt-menu").mouseenter(function () {
			$.each($("[data-tt-showproductsonhover='cause']"),
				function(index, value) {
					var categoryId = $(value).attr("data-tt-categoryid");
					var allProducts = $("[data-tt-showproductsonhover='effect']");
					var productsOfCategory =
						$("[data-tt-showproductsonhover='effect'][data-tt-categoryid='" + categoryId + "']");
					$(value).mouseenter(function () {
						$("[data-tt-showproductsonhover='cause']").css("background-color", "#ffffff");
						$(value).css("background-color", "#f0f0f0");
						allProducts.css("display", "none");
						productsOfCategory.css("display", "block");
					});
				});
		});
	}

	showProductsOnHover();
};

jQuery(document).ready(function () {
	Landi.Search();
});

// direct links to tab
$(document).ready(function () {
	var hash = window.location.hash;
	hash && $('ul.tab-navigation a[href="' + hash + '"]').tab('show');

	$('.tab-navigation a').click(function (e) {
		$(this).tab('show');

		var scrollmem = $('body').scrollTop();
		window.location.hash = this.hash;
		$('html,body').scrollTop(scrollmem);
	});

	$('div#search-all a[href="#search-products"], div#search-all a[href="#search-content"], div#search-all a[href="#search-places"]').click(function (e) {
		e.preventDefault();

		var buttonHash = $(this).attr('href');
		buttonHash && $('ul.tab-navigation a[href="' + buttonHash + '"]').tab('show');

		var scrollmem = $('body').scrollTop();
		window.location.hash = this.hash;
		$('html,body').scrollTop(scrollmem);
	});
});

;
(function ($) {
	$.widget('landi.cartitem',
	{
		productCode: null,
		productId: null,
		shopType: null,
		toShopType: null,
		quantityControl: null,
		deleteControl: null,
		singlePriceText: null,
		totalPriceText: null,
		availablePickupQuantityText: null,
		pickupTimeText: null,
		pickupTimeTextMobile: null,
		serviceControl: null,
		totalDeliveryText: null,
		
		_create: function () {
			var self = this;

			this.productCode = this.element.data().productCode;
			this.productId = this.element.data().productId;
			this.shopType = this.element.data().shopType;
			this.toShopType = this.element.data().toShopType;

			this.quantityControl = $('[data-role=quantityinput]', this.element);
			this.deleteControl = $(".action-remove-cart-item", this.element);
			this.moveControl = $(".action-move-cart-item", this.element);
			this.moveWishlistControl = $(".action-move-wishlist-item", this.element);
			this.singlePriceText = $('.product-single-price-value', this.element);
			this.totalPriceText = $('.cart-product-total-price', this.element);
			this.availablePickupQuantityText = $('.cart-available-pickup-quantity', this.element);
			this.pickupTimeText = $('.product-availability .text', this.element);
			this.pickupTimeTextMobile = $('.cart-pickup-time', this.element);
			this.serviceControl = $('[data-role=service-checkbox]', this.element);
			this.totalDeliveryText = $('.cart-page-probably-delivery-text > b');

			this.quantityControl.on('quantitychanged', Landi.debounce(function (event, data) {
				self._updateQuantity(data.quantity);
			}, 250));

			this.deleteControl.on('click', function () {
				self._removeItem();
			});

			this.moveControl.on('click', function (e) {
				e.preventDefault();
				self._moveItem(self.toShopType, true);
			});

			this.moveWishlistControl.on('click', function (e) {
				var this$ = $(this);
				e.preventDefault();
				self._moveItem(this$.data().wishlistToShopType, false);
			});
			
			this.serviceControl.on('change', function(e) {
				var this$ = $(this);
				var serviceCode = this$.data().serviceCode;
				var hasModal = this$.data().hasModal;
				var modalText = this$.data().modalText;
				var modalTitle = this$.data().modalTitle;
				var modalCloseButton = this$.data().modalCloseButton;
				var isChecked = this$.is(':checked');

				Landi.toggleServiceToCart(
					self.productCode, 
					serviceCode, 
					self.shopType, 
					function(result) {
						if(isChecked) {
							var key = 'productServiceInformationModalAlreadyShown_' + serviceCode;
							var messageAlreadyShown = landicomponents.StorageApi.sessionStore.getItem(key);

							if (hasModal && !messageAlreadyShown) {
								Landi.generalMessageModal(modalTitle, modalText, modalCloseButton);
								landicomponents.StorageApi.sessionStore.setItem(key, 'true');
							}
						}

						self._refreshCartCostOverview(result.CartCostOverview);

						if (result.Products.length > 0 && result.Products[0].ProductCode.toString() === self.productCode.toString()) {
							self._refreshCartItem(result.Products[0]);
						}

					}
				);
			});

		},
		_removeItem: function() {
			var self = this;
			Landi.removeFromCart(
				this.productCode,
				this.shopType,
				function(result) {
					self._refreshCartCostOverview(result.CartCostOverview);
					self.element.remove();
					self._reloadIfNoItemsLeft(result.Products);

					// hide move all if not permitted
					if (!result.MoveAllPermitted) {
						$('.action-move-all-items').hide();
					}

					Landi.UpdateCartButtonCounters(); // Update Counter on Cart Buttons in Main Menu.
				},
				function(result) {
				}
			);
		},
		_updateQuantity: function(quantity) {
			var self = this;

			Landi.updateCartQuantity(
				this.productCode,
				quantity,
				this.shopType,
				function (result) {
					Landi.showToaster(result);

					if (result.Products.length > 0 && result.Products[0].ProductCode.toString() === self.productCode.toString()) {
						self._refreshCartItem(result.Products[0]);
					}
					self._refreshCartCostOverview(result.CartCostOverview);
					Landi.UpdateCartButtonCounters(); // Update Counter on Cart Buttons in Main Menu.
					Landi.UpdateMinOrderValue(result.CartCostOverview.MinimumOrderAmountReached);
				},
				function (result) {
				}
			);
		},
		_moveItem: function (toShopType, isRemoveCartItem) {
			var self = this;
			self.isRemoveCartItem = isRemoveCartItem;

			Landi.moveItem(
				this.productCode,
				this.shopType,
				toShopType,
				function (result) {
					Landi.showToaster(result);
					if (self.isRemoveCartItem) {
						self._removeCartItemIfMoved(result.Products);
					}

					// hide move all if not permitted
					if (!result.MoveAllPermitted) {
						$('.action-move-all-items').hide();
					}

					self._refreshCartCostOverview(result.CartCostOverview);
					self._reloadIfNoItemsLeft(result.Products);
					
					Landi.UpdateCartButtonCounters(); // Update Counter on Cart Buttons in Main Menu.
				},
				function (result) {
				}
			);
		},
		_removeCartItemIfMoved: function (productInfos) {
			var self = this;

			var items = $.grep(productInfos, function (e) { return e.productCode === self.productCode; });
			if (items.length <= 0)
			{
				self.element.remove();
			}
		},
		_reloadIfNoItemsLeft: function (products) {
			if (products.length <= 0) {
				// reload page
				window.location = window.location.pathname + window.location.hash;
			}
		},
		_refreshCartItem: function (productInfo) {
			var inputField = this.quantityControl.find(".quantityinput-item-quantity")[0];
			if (inputField.value !== productInfo.Quantity) {
				inputField.value = productInfo.Quantity;
			}

			this.singlePriceText.text(Landi.formatCurrency(productInfo.Price));
			this.totalPriceText.text(Landi.formatCurrency(productInfo.TotalPrice));
			this.availablePickupQuantityText.text(productInfo.AvailablePickupQuantity);
			this.pickupTimeText.text(productInfo.PickupOrDeliveryTime);
			this.pickupTimeTextMobile.text(productInfo.PickupOrDeliveryTime);
		},
		_refreshCartCostOverview: function (cartCostOverview) {
			Landi.refreshCartCostOverview(cartCostOverview);
		},

		_destroy: function () {
			$.Widget.prototype.destroy.apply(this, arguments); // default destroy
		}
	});
})(jQuery);

$(document).ready(function () {
	$('[data-role=cartitem]').each(function (index, element) {
		$(element).cartitem();
	});
});;
// ---------------------------------------
// functions - define all functions here
// ---------------------------------------

// PICKPOST: Open Modal
function OpenPickPostModal() {
	$('#checkout-confirm-shipping-pickpost-modal').modal();
	loadRiaFrameworks();
}

// ADDRESS: On save button click
function CreateAddress(event, clickedButton, successCallback) {
	var $form = $(clickedButton).closest('#create-address-form');

	event.preventDefault();

	if ($form.valid()) {
		$.ajax({
			url: getApiBaseUrl() + "/addresses/createaddress",
			data: $form.serialize(),
			type: "POST"
		})
		.done(function (result) {
			if (result.Success) {
				// excute callback function
				if (successCallback) {
					successCallback(result);
				}
				window.location = window.location.pathname + window.location.hash;
			} else {
				window.toastr.error(result.ToasterText,
					result.ToasterTitle,
					{ timeout: 5000, positionClass: "toast-top-right", closeButton: false });
			}
		})
		.fail(function (result) {
		});
	}
}

// ADDRESS: On show: confirm delete modal
function ConfirmDeleteAddress (e) {
	var $invoker = $(e.relatedTarget);
	var addressId = $invoker.data().addressId;

	// Insert the address to delete into the modal body
	var address = $('[data-address="address-' + addressId + '"]').html();
	$('#modal-address-to-delete').html(address);

	// Set the address id as a data attribute on the confirm delete link
	$('[data-action="delete-address"]').data('address-id', addressId);
}

// ADDRESS: On save button click
function SaveAddress(event, self) {
	var addressId = self.data().addressId;
	var addressType = self.data().addressType;
	var $form = $('#address-form-' + addressType + '-' + addressId);

	event.preventDefault();

	if ($form.valid()) {
		$.ajax({
			url: getApiBaseUrl() + "/addresses/saveaddress",
			data: $form.serialize(),
			type: "PUT"
		})
		.done(function (result) {
			if (result.Success) {
				window.location = window.location.pathname + window.location.hash;
			} else {
				$('[data-address-id="' + addressId + '"] .validation-summary-errors').html('<p>' + result.ToasterText + '</p>');
			}
		})
		.fail(function (result) {
		});
	}
}

// ADDRESS: On radio button change, change main address
function SetSelectedAddress(addressId, addressTypeToSet, cartType, reloadPage) {
	$.ajax({
		url: getApiBaseUrl() + "/addresses/setaddress/" + addressId + "/" + addressTypeToSet + "/" + cartType,
		type: "PUT"
	})
	.always(function(result) {

		$.each(result.ReturnValues, function(key, value)
		{
			if (key.startsWith('sel_')) {
				var itemSelector = $('#' + key);
				var labelSelector = $('#' + key + '_label');

				if (value === 'True') {
					itemSelector.prop("disabled", false);
					labelSelector.removeClass('delivery-option-disabled');
				} else {
					itemSelector.prop("disabled", true);
					itemSelector.prop("checked", false).change();
					labelSelector.addClass('delivery-option-disabled');
				}
			}

		});
		if (result.Success) {
			if (reloadPage) {
				window.location = window.location.pathname + window.location.hash;
			}
		} else {
			window.toastr.error(result.ToasterText,
				result.ToasterTitle,
				{ timeout: 5000, positionClass: "toast-top-right", closeButton: false });
		}
	});
}

// ADDRESS: On confirm delete button click
function DeleteAddress(event, self) {
	var addressId = self.data().addressId;

	$.ajax({
		url: getApiBaseUrl() + "/addresses/deleteaddress/" + addressId,
		type: "DELETE"
	})
	.done(function (result) {
		if (result.Success) {
			window.location = window.location.pathname + window.location.hash;
		} else {
			window.toastr.error(result.ToasterText,
				result.ToasterTitle,
				{ timeout: 5000, positionClass: "toast-top-right", closeButton: false });
		}
	});
}

// ADDRESS: On change address click open in modalview
function ModifyAddressInModal(event, self) {
	var addressType = self.attr('addressType');
	var cartType = self.attr('cartType');

	// unbind already existing event for create address
	$('[data-action="create-address"]').unbind('click');

	// bind again to create address but also give a callbackfunction, to add new address  directly to checkoutObj
	$('[data-action="create-address"]').on('click', function (event) {
		CreateAddress(event, this, function (result) {
			var addressId = result.Id;
			SetSelectedAddress(addressId, addressType, cartType);
		});
	});

	// bind setAddress function
	$('[data-action="set-address"]').on('click',
		function (event) {
			var name = "SelectedAddressId_" + addressType;

			var checkedRadio = $('input[type=radio][name=' + name + ']:checked')[0];
			var addressId = checkedRadio.value;

			SetSelectedAddress(addressId, addressType, cartType);

			javascript: location.reload();
		});

	// open modal
	$('#checkout-confirm-' + addressType + '-address-modal').modal();
}

// USER (PersonalData): On save button click
function SaveUser(event) {
	var $form = $('#save-user-form');

	event.preventDefault();

	if ($form.valid()) {
		$.ajax({
			url: getApiBaseUrl() + "/addresses/saveuser",
			data: $form.serialize(),
			type: "POST"
		})
		.done(function (result) {
			if (result.Success) {
				window.toastr.success(result.ToasterText,
					result.ToasterTitle,
					{ timeout: 5000, positionClass: "toast-top-right", closeButton: false });
			} else {
				window.toastr.error(result.ToasterText,
					result.ToasterTitle,
					{ timeout: 5000, positionClass: "toast-top-right", closeButton: false });
			}
		})
		.fail(function (result) {
		});
	}
}


// ---------------------------------------
// bindings - add all bindinds here
// ---------------------------------------

// MISC: prevent default on links with class 'prevent-default'
$('.prevent-default').on('click', function (e) {
	e.preventDefault();
});

// ADDRESS: On save button click
$('[data-action="create-address"]').on('click', function (event) {
	CreateAddress(event, this);
});

// ADDRESS: On show: confirm delete modal
$('#confirm-delete-address').on('show.bs.modal', function (e) {
	ConfirmDeleteAddress(e);
});

// ADDRESS: On save button click
$('[data-action="save-address"]').on('click', function (event) {
	var self = $(this);
	SaveAddress(event, self);
});

// ADDRESS: On radio button change, change shipping address
$('input[type=radio][name=SelectedAddressId_shipping]').on('change', function () {
	var addressId = this.value;
	var addressTypeToSet = this.dataset.addressTypeToSet;
	var cartType = this.dataset.cartTypeToSet;
	var isModal = $(this).attr('ismodal');

	if (isModal != 'True') {
		SetSelectedAddress(addressId, addressTypeToSet, cartType, true);
	}
});

// ADDRESS: On radio button change, change billing address
$('input[type=radio][name=SelectedAddressId_billing]').on('change', function () {
	var addressId = this.value;
	var addressTypeToSet = this.dataset.addressTypeToSet;
	var cartType = this.dataset.cartTypeToSet;
	var isModal = $(this).attr('ismodal');

	if (isModal != 'True') {
		SetSelectedAddress(addressId, addressTypeToSet, cartType, false);
	}
});

// ADDRESS: On radio button change, change main address
$('input[type=radio][name=SelectedAddressId_main]').on('change', function () {
	var addressId = this.value;
	var addressTypeToSet = this.dataset.addressTypeToSet;
	var cartType = this.dataset.cartTypeToSet;
	var isModal = $(this).attr('ismodal');

	if (isModal != 'True') {
		SetSelectedAddress(addressId, addressTypeToSet, cartType, false);
	}
});

// ADDRESS: On confirm delete button click
$('[data-action="delete-address"]').on('click', function(event) {
		var self = $(this);
		DeleteAddress(event, self);
	});

// ADDRESS: On change address click open in modalview
$('[data-action="modify-address"]').on('click', function (event) {
	var self = $(this);
	ModifyAddressInModal(event, self);
});

// USER (PersonalData): On save button click
$('[data-action="save-user"]').on('click', function(event) {
		SaveUser(event);
	});

// USER: Register and Return
$('[data-action="submitRequestReturnForm"]').on('click', function(event) {
	RegisterAndReturn(event);
});

// PICKPOST: Open Modal
$('[data-action="modal-pickpost"]').on('click', function (event) {
	OpenPickPostModal();
});;
var Landi = Landi || {};

Landi.AddressAutocomplete = function () {

	/********************************************/
	/************* ZIP AUTOCOMPLETE *************/
	/********************************************/

	$('.zip-autocomplete').on('blur', function () {
		$(".city-autocomplete").each(function () {
			$(this).valid();
		});
	});

	$('.zip-autocomplete').each(function (index, item) {
		var autocompleteID = $(item).attr('id')
		autocompleteID = autocompleteID.replace('Zipcode', '');

		new autoComplete({
			data: {
				src: async () => {
					var zipCode = $("#Zipcode" + autocompleteID).val();

					var url = window.location.origin + getApiBaseUrl() + `/addresses/autocomplete/zip?zip=${zipCode}`;

					var cartType = $(".zip-autocomplete").closest('form').find('#CartType').val();

					if (cartType !== undefined && cartType !== null) {
						url += ("&cartType=" + cartType);
					}

					var source = await $.ajax({ url, type: 'GET' });

					return source;
				},
				cache: false
			},
			selector: "#Zipcode" + autocompleteID,
			debounce: 300,
			searchEngine: "strict",
			resultsList: {
				render: true,
				container: source => {
					source.setAttribute("id", "autoComplete_list");
					source.setAttribute("class", "autoComplete_list");
				},
				destination: document.querySelector("#Zipcode" + autocompleteID),
				position: "afterend",
				element: "ul"
			},
			resultItem: {
				content: (source, data) => {
					source.innerHTML = data.match;
				},
				element: "li"
			},
			onSelection: feedback => {
				const selection = feedback.selection.value;
				// Clear Input
				document.querySelector("#Zipcode" + autocompleteID).value = selection;
			}

		})
	});
	/***********************************************/
	/************* STREET AUTOCOMPLETE *************/
	/***********************************************/
	$('.street-autocomplete').each(function (index, item) {
		var autocompleteID = $(item).attr('id')
		autocompleteID = autocompleteID.replace('Street', '');

		new autoComplete({
			data: {
				src: async () => {
					var zipCode = $('#Zipcode' + autocompleteID).val();
					var street = $('#Street' + autocompleteID).val();

					var url = window.location.origin + getApiBaseUrl() + `/addresses/autocomplete/street?zip=${zipCode}&street=${street}`;

					var cartType = $(".street-autocomplete").closest('form').find('#CartType').val();

					if (cartType !== undefined && cartType !== null) {
						url += ("&cartType=" + cartType);
					}

					var source = await $.ajax({ url, type: 'GET' });

					return source;
				},
				cache: false
			},
			selector: '#Street' + autocompleteID,
			debounce: 300,
			searchEngine: "strict",
			resultsList: {
				render: true,
				container: source => {
					source.setAttribute("id", "autoComplete_list");
					source.setAttribute("class", "autoComplete_list");
				},
				destination: document.querySelector('#Street' + autocompleteID),
				position: "afterend",
				element: "ul"
			},
			resultItem: {
				content: (source, data) => {
					source.innerHTML = data.match;
				},
				element: "li"
			},
			onSelection: feedback => {
				const selection = feedback.selection.value;
				// Clear Input
				document.querySelector('#Street' + autocompleteID).value = selection;
			}

		})
	});

	/**************************************************/
	/************* STREET NO AUTOCOMPLETE *************/
	/**************************************************/
	$('.streetNo-autocomplete').each(function (index, item) {
		var autocompleteID = $(item).attr('id')
		autocompleteID = autocompleteID.replace('StreetNo', '');
		new autoComplete({
			data: {
				src: async () => {
					var zipCode = $('#Zipcode' + autocompleteID).val();
					var street = $('#Street' + autocompleteID).val();
					var streetNo = $('#StreetNo' + autocompleteID).val();

					var url = window.location.origin + getApiBaseUrl() + `/addresses/autocomplete/houses?zip=${zipCode}&street=${street}&streetNo=${streetNo}`;

					var cartType = $(".streetNo-autocomplete").closest('form').find('#CartType').val();

					if (cartType !== undefined && cartType !== null) {
						url += ("&cartType=" + cartType);
					}

					var source = await $.ajax({ url: url, type: 'GET' });

					return source;
				},
				cache: false
			},
			selector: '#StreetNo' + autocompleteID,
			debounce: 300,
			searchEngine: "strict",
			resultsList: {
				render: true,
				container: source => {
					source.setAttribute("id", "autoComplete_list");
					source.setAttribute("class", "autoComplete_list");
				},
				destination: document.querySelector('#StreetNo' + autocompleteID),
				position: "afterend",
				element: "ul"
			},
			resultItem: {
				content: (source, data) => {
					source.innerHTML = data.match;
				},
				element: "li"
			},
			onSelection: feedback => {
				const selection = feedback.selection.value;
				// Clear Input
				document.querySelector('#StreetNo' + autocompleteID).value = selection;
			}

		})
	});

	$('.city-autocomplete').each(function (index, item) {
		var autocompleteID = $(item).attr('id')
		autocompleteID = autocompleteID.replace('City', '');
		initCityAutocomplete(autocompleteID);
	})
	

	// This is a function to reinitialize it if the zip code changes. The performance is bad but there seems to be no other way.
	function initCityAutocomplete(autocompleteID) {
		/*********************************************/
		/************* CITY AUTOCOMPLETE *************/
		/*********************************************/
		new autoComplete({
			data: {
				src: async () => {
					var zipCode = $(".city-autocomplete").closest('form').find('#Zipcode'+autocompleteID).val();

					var url = window.location.origin + getApiBaseUrl() + `/addresses/autocomplete/city?zip=${zipCode}`;

					var cartType = $(".city-autocomplete").closest('form').find('#CartType').val();

					if (cartType !== undefined && cartType !== null) {
						url += ("&cartType=" + cartType);
					}

					var source = await $.ajax({ url, type: 'GET' });

					return source;
				},
				cache: false
			},
			selector: "#City"+autocompleteID,
			debounce: 300,
			searchEngine: "strict",
			resultsList: {
				render: true,
				container: source => {
					source.setAttribute("id", "autoComplete_list");
					source.setAttribute("class", "autoComplete_list");
				},
				destination: document.querySelector("#City" + autocompleteID),
				position: "afterend",
				element: "ul"
			},
			resultItem: {
				content: (source, data) => {
					source.innerHTML = data.match;
				},
				element: "li"
			},
			onSelection: feedback => {
				const selection = feedback.selection.value;
				// Clear Input
				document.querySelector("#City" + autocompleteID).value = selection;
			}

		})
	}
};

jQuery(document).ready(function () {
	Landi.AddressAutocomplete();
});;
var Landi = Landi || {};

(function (that) {
	function handleRequestSuccess(currentForm, suggestions) {
		$(currentForm).find("[addressuidsearch--error]").hide();
		$(currentForm).find("[addressuidsearch--list]").empty();

		for (var uid in suggestions) {
			// append the element and handle click as insertion of the UID.
			$(currentForm).find("[addressuidsearch--list]")
				.append("<li class=\"list-group-item\"><a href=\"#\" value=\"" + uid + "\">" + suggestions[uid] + "</a></li>")
				.click(function(event) {
					event.preventDefault();
					var inputElement = $(currentForm).find("[addressuidsearch--input]")
					inputElement.val($(event.target).attr("value"));
					inputElement.trigger('change');
					$(currentForm).find("[addressuidsearch--list]").css({"display": "none"}).children().remove();
				});
		}

		// show the dropdown.
		$(currentForm).find("[addressuidsearch--list]").css({
			"display": "block",
			"position": "absolute",
			"cursor": "pointer",
			"z-index": "1000",
		});

		// ensure dropdown closes, if one clicks outside of it.
		var closeOnClickOutside = function () {
			$("[addressuidsearch--list]").css({ "display": "none" }).children().remove();
		};

		$(document).click(closeOnClickOutside);
	}

	function handleRequestError(currentForm, errorMessage) {
		$(currentForm).find("[addressuidsearch--error]").hide();
		$(currentForm).find("[addressuidsearch--error]").find("span").text(errorMessage);
		$(currentForm).find("[addressuidsearch--error]").show();
	}

	function requestUidSuggestions(e) {
		if (e === undefined || e === null) {
			return;
		}

		var currentForm = e.target.closest("form");

		$.ajax({
			url: getApiBaseUrl() + "/addresses/uidsearch/" + $(currentForm).find("[addressuidsearch--companyname]").val(),
			type: "post",
			contentType: "application/json; charset=utf-8"
		}).done(function(result) {
			if (result.Success) {
				handleRequestSuccess(currentForm, result.ReturnValues);
			} else {
				handleRequestError(currentForm, result.ErrorMessage);
			}
		});
	}

	function bindUidSearchButtonClick() {
		$("[addressuidsearch--button]").click(function (e) {
			requestUidSuggestions(e);
		});
	}

	function init() {
		bindUidSearchButtonClick();
	}

	that.init = init;
})(Landi.AddressUidSearch = {});

jQuery(document).ready(function () {
	Landi.AddressUidSearch.init();
});;
var Landi = Landi || {};

Landi.Identity = function () {
	// Signout
	$('[data-action="signout"]').on('click', function () {

		$('#explicit-logout-request').val("True");
		var $form = $('#logout-form');

		$form.submit();
	});
};

jQuery(document).ready(function ($) {
	Landi.Identity();
});
;
var Landi = Landi || {};

// responsible for handling the dropdown of the two carts when hovering the cart button in the green main menu
Landi.CartDropdown = function () {
	var initCartButton = function (buttonClass) {

		// DOM Object of the current button. all other DOM elements are children of this one.
		var button = $(buttonClass);
		// check if this is the layout for desktop or mobile and return bool wether the functionality shall work
		var dropdownFunctionalityEnabled = function () {
			// min content width for which the dropdown shall work
			var minContentWidth = "720";
			var contentWidth = $(".container").first().width();
			return contentWidth >= minContentWidth;
		};
		// flag that indicates whether the mouse is still over the button or its respective dropdown or has left again. 
		// this is required to prevent showing the dropdown when one enters and leaves faster than the ajax call responds.
		var mouseIsInside = false;
		// returns the value of the Cart Page Id that is stored in the data-cartpageid attribute
		var getCartPageId = function () {
			return button.children(".cart-dropdown").first().data("cartpageid");
		};
		// returns the value of the Shop Page Id that is stored in the data-shoppageid attribute
		var getShopPageId = function () {
			return button.children(".cart-dropdown").first().data("shoppageid");
		};
		// returns the value of the ShoppingCartType (int) that is stored in the data-shoptype attribute
		var getCartType = function () {
			return button.children(".cart-dropdown").first().data("shoptype");
		};
		// returns the url for ajax calls to the web api that returns the content for the dropdown
		var getApiPathForDropdownContent = function (cartPageId, shopPageId, cartType) {
			return getApiBaseUrl() + "/cart/dropdown/" + cartPageId + "/" + shopPageId + "/" + cartType;
		};
		// returns the DOM object of the dropdown box that can contain content delivered by the web api
		var getDropdownContainer = function () {
			return button.children(".cart-dropdown").first();
		};
		// returns the DOM object of the outer container of cart items
		var getCartDropdownItemsSection = function () {
			return button.find(".cart-dropdown-items");
		};
		// returns the DOM object of the inner container of cart items, that is scrollable
		var getCartDropdownItemsScrollableSection = function () {
			return button.find(".cart-dropdown-items-scrollable");
		};
		// returns an array of DOM objects of all cart items in the current dropdown
		var getCartDropdownItems = function () {
			return button.find(".cart-dropdown-item");
		};
		// returns the DOM element of the dropdown section that holds the total costs
		var getCartDropdownTotalCostsSection = function () {
			return button.find(".cart-dropdown-costs");
		};
		// insert the api response as HTML into the dropdown container
		var setCartDropdownContent = function (data) {
			// check if there already exists content. if yes, remove.
			getDropdownContainer().children().remove();
			// insert data as HTML
			getDropdownContainer().append($.parseHTML(data));
		};
		// set the height of the scrollable section by hight of some of the cart items
		var setCartDropdownItemsSectionsHeight = function () {
			var getHeight = function () {
				var height = 0;
				var firstThreeCartItems = getCartDropdownItems().slice(0, 3); // are to be displaid in full
				var fourthCartItem = getCartDropdownItems().slice(3, 4); // to be displaid only half
				// calculate the height
				firstThreeCartItems.each(function () {
					var item = $(this);
					height += item.height();
				});
				height += fourthCartItem.height() / 2;

				return height;
			};
			var setHeight = function (domObject) {
				var cssParameters = {
					'height': getHeight() + 'px',
					'max-height': getHeight() + 'px'
				};
				domObject.css(cssParameters);
			};

			// set height to entiere section and to scrollable part
			setHeight(getCartDropdownItemsSection());
			setHeight(getCartDropdownItemsScrollableSection());
		};
		// if there is a scrollbar, style needs some right padding
		var setCartDropdownItemsScrollableSectionRightPadding = function () {
			var cssSettings = {
				'padding': "0 10px 0 0"
			};
			getCartDropdownItemsScrollableSection().css(cssSettings);
		};
		// adds a white overlay fadeout on the scrolling area to indicate that there are more items if you scroll
		var setCartDropdownItemsSectionFadeOut = function () {
			var fadeOutWidthWithoutScrollbar = getCartDropdownItems().first().width();
			var fadeOutHtml = '<div class="cart-dropdown-items-shadow"></div>';
			var fadeOutCss = {
				'width': fadeOutWidthWithoutScrollbar
			};
			var newfadeOutElement = $(fadeOutHtml);
			newfadeOutElement.css(fadeOutCss);
			getCartDropdownItemsSection().append(newfadeOutElement);
		};
		// function to get the width of the item rows and assign that width to the total sum section as well for both being aligned properly
		var setCartDropdownTotalCostsSectionWidth = function () {
			var cartItemRowWidth = getCartDropdownItems().first().width();
			var cssSettings = {
				'width': cartItemRowWidth + "px",
				'max-width': cartItemRowWidth + "px"
			};
			getCartDropdownTotalCostsSection().css(cssSettings);
		};
		// set the dropdown layout initially when added
		var setCartDropdownLayoutInitial = function () {
			// execute if there are more than 3 items in the cart
			if (getCartDropdownItems().length > 3) {
				setCartDropdownItemsSectionsHeight();
				setCartDropdownItemsScrollableSectionRightPadding();
				setCartDropdownItemsSectionFadeOut();
				setCartDropdownTotalCostsSectionWidth();
			}
		};
		// unhide the dropdown
		var showDropdown = function () {
			getDropdownContainer().css({
				'display': "block"
			});
		};
		// start rendering the dropdown
		var startDropdown = function () {
			// set flag!
			mouseIsInside = true;
			// execute the ajax call
			$.ajax({
				url: getApiPathForDropdownContent(getCartPageId(), getShopPageId(), getCartType()),
				method: "GET"
			})
				.done(function (data) {
					if (mouseIsInside) {
						setCartDropdownContent(data);
					}
				})
				.then(function () {
					if (mouseIsInside) {
						showDropdown(); // needs to be first. otherwise cannot get correct css properties from dom elements.
						setCartDropdownLayoutInitial();
					}
				});
		};
		// terminate the dropdown when no more needed
		var endDropdown = function () {
			// set flag!
			mouseIsInside = false;
			// hide dropdown container
			var cssSettings = {
				'display': "none"
			};
			getDropdownContainer().css(cssSettings);

		};
		// toggle the dropdown (handles the triggering actions)
		var toggleDropdown = function () {
			button.mouseenter(function () {
				if (dropdownFunctionalityEnabled()) {
					startDropdown();
				}
			});
			button.mouseleave(function () {
				if (dropdownFunctionalityEnabled()) {
					endDropdown();
				}
			});
		};
		// triggers
		toggleDropdown();
	};

	// assign the cart dropdown functionality to buttons by css-class or css-id
	initCartButton(".button-pickup");
	initCartButton(".button-delivery");
};

jQuery(document).ready(function () {
	Landi.CartDropdown();
});

Landi.ExpandMinibasket = function () {
	$(".minibasket-expander").toggle();
	$(".minibasket").toggleClass("minibasket-expanded");
	$(".minibasket-chevron").toggleClass("bottom");
};
var Landi = Landi || {};

Landi.UpdateMinOrderValue = function (minimumOrderAmountReached) {
	var dailyOrderQuotaForShopReached = $('#dailyOrderQuotaForShopReached').val();
	if (minimumOrderAmountReached && dailyOrderQuotaForShopReached == 'false') {
		// enable buttons
		$('.cart-page-order-button').removeClass("disabled");
		$('.cart-page-places-button').removeClass("disabled");
		$('.minimum-order-amount-container').hide();
	}
	else {
		// disable buttons
		$('.cart-page-order-button').addClass("disabled");
		$('.cart-page-places-button').addClass("disabled");
		$('.minimum-order-amount-container').show();
	}
};;
var Landi = Landi || {};



(function ($) {
	$.widget('landi.quantityinput',
	{
		options: {
			minValue: 1,
			maxValue: 9999,
			stepQuantity: 1
		},
		quantityControl: null,
		decrementControl: null,
		incrementControl: null,

		_create: function () {
			var self = this;

			this.decrementControl = $(".quantityinput-decrease-quantity", this.element);
			this.incrementControl = $(".quantityinput-increase-quantity", this.element);
			this.quantityControl = $(".quantityinput-item-quantity", this.element);

			if (this.element.data().minValue !== undefined) {
				this.options.minValue = parseInt(this.element.data().minValue);
			}

			if (this.element.data().maxValue !== undefined) {
				this.options.maxValue = parseInt(this.element.data().maxValue);
			}

			if (this.element.data().stepQuantity !== undefined) {
				this.options.stepQuantity = parseInt(this.element.data().stepQuantity);
			}

			this.decrementControl.on('click', function () {
				var quantity = parseInt(self.quantityControl.val(), 10);

				if (quantity - self.options.stepQuantity >= self.options.minValue) {
					self.quantityControl.val(quantity - self.options.stepQuantity);
				}

				self.quantityControl.change();
			});

			this.incrementControl.on('click', function () {
				var quantity = parseInt(self.quantityControl.val(), 10);

				if (quantity + self.options.stepQuantity <= self.options.maxValue) {
					self.quantityControl.val(quantity + self.options.stepQuantity);
					self.quantityControl.change();
				}
			});

			this.quantityControl.on('change', function () {
				var quantity = parseInt($(this).val(), 10);
				if (!$.isNumeric(quantity)) {
					quantity = $(this).attr("value");
				} else {
					$(this).attr("value", quantity);
				}

				if (quantity <= self.options.minValue) {
					quantity = self.options.minValue;
				}

				if (quantity > self.options.maxValue) {
					quantity = self.options.maxValue;
				}
				
				quantity = self._validate(quantity);

				$(this).val(quantity);

				var productId = $(this).data().productid;

				self.element.trigger('quantitychanged', { quantity: quantity, productId: productId });
			});

			this._correctMinValue();

			this.quantityControl.numericalinput({
				minValue: this.options.minValue,
				maxValue: this.options.maxValue,
				stepQuantity: this.options.stepQuantity
			});

			this._correctValue();
		},
		_correctMinValue: function() {
			var mod = this.options.minValue % this.options.stepQuantity;

			if (mod > 0) {
				this.options.minValue = this.options.minValue - mod;
			}
		},
		_correctValue: function () {
			var quantity = parseInt(this.quantityControl.val(), 10);
			var value = this._validate(quantity);

			if (value !== quantity) {
				this.quantityControl.val(value).change();
			}
		},
		_validate: function (value) {
			var mod = value % this.options.stepQuantity;

			if (mod > 0) {
				value = value - mod;
			}

			if (value < this.options.minValue) {
				value = this.options.minValue;
			}

			return value;
		},
		_destroy: function () {
			$.Widget.prototype.destroy.apply(this, arguments); // default destroy
		}
	});
})(jQuery);

$(document).ready(function () {
	$('[data-role=quantityinput]').each(function (index, element) {
		$(element).quantityinput();
	});
});

Landi.QuantityInput = function () {
	$('[data-role=quantityinput]').each(function (index, element) {
		$(element).quantityinput();
	});
};

/******************************
 *  REQUIRED IF
*******************************/

$.validator.addMethod('requiredif', function (value, element, parameters) {
	var searchByName = parameters['searchbyname'];
	
	var selector;
	if(!searchByName || searchByName === 'False') {
		selector = '#' + parameters['dependentproperty'];
	}
	else {
		selector = '[name="' + parameters['dependentproperty'] + '"]';
	}

	// get the target value (as a string, 
	// as that's what actual value will be)
	var targetvalue = parameters['targetvalue'];
	targetvalue =
		(targetvalue == null ? '' : targetvalue).toString();

	var comp = parameters['comp'];

	// get the actual value of the target control
	// note - this probably needs to cater for more 
	// control types, e.g. radios
	var control = $(selector);

	var controltype = control.attr('type');
	var actualvalue = '';
	switch(controltype)
	{
		case 'checkbox':
			actualvalue = control.is(':checked');
			break;
		case 'radio':
			actualvalue = control.filter(':checked').val();
			break;
		default:
			actualvalue = control.val();
			break;
		
	}

	// if the condition is true, reuse the existing 
	// required field validator functionality

	if (actualvalue !== undefined && actualvalue !== null) {
		if (comp === 'isequalto') {
			if (targetvalue.toString() === actualvalue.toString())
				return $.validator.methods.required.call(
					this, value, element, parameters);
		} else {
			if (targetvalue.toString() !== actualvalue.toString())
				return $.validator.methods.required.call(
					this, value, element, parameters);
		}
	}

	return true;
});

$.validator.unobtrusive.adapters.add("requiredif", ['other', 'value', 'comp', 'searchbyname'], function (options) {
	options.rules['requiredif'] = {
		dependentproperty: options.params['other'],
		targetvalue: options.params['value'],
		comp: options.params['comp'],
		searchbyname: options.params['searchbyname']
	};
	options.messages['requiredif'] = options.message;
});

/******************************
 *  MUST BE CHECKED
*******************************/

$.validator.unobtrusive.adapters.addBool("mustbechecked", "required");

/******************************
 * POST ADDRESS VALIDATION
*******************************/

$.validator.addMethod('postaddress', function (value, element, parameters) {
	
	var valResult = false;
	var valueString = '' + value;

	var urlFormat;
	var url;

	var zipCodeElementId = '#' + parameters['zipField'];
	var zipCode = $(element).closest('form').find(zipCodeElementId).val();

	var streetElementId = '#' + parameters['streetField'];
	var street = $(element).closest('form').find(streetElementId).val();

	var cartTypeElementId = '#' + parameters['cartTypeField'];
	var cartType = $(element).closest('form').find(cartTypeElementId).val();
	var cartParam = cartType !== undefined && cartType !== null ? "&cartType=" + cartType : "";
	
	var enableForPickup = parameters['enableForPickup'] === 'True';
	var enableForDelivery = parameters['enableForDelivery'] === 'True';

	if(cartType && cartType.toLowerCase() === 'pickup' && !enableForPickup)
	{
		return true;
	}
	else if (cartType && cartType.toLowerCase() === 'delivery' && !enableForDelivery) {
		return true;
	}

	var type = parameters['type'];

	if (type === "zip") {

		valResult = false;
		urlFormat = getApiBaseUrl() + "/addresses/autocomplete/zip?zip=%zip%" + cartParam;
		url = urlFormat.replace("%zip%", valueString.trim());
		$.ajax({
			url: url,
			async: false
		}).done(function (result) {
			valResult = jQuery.inArray(valueString, result) !== -1 || jQuery.inArray("error", result) !== -1;
		}).fail(function () {
			valResult = false;
		});

	} else if (type === "city") {

		valResult = false;
		urlFormat = getApiBaseUrl() + "/addresses/autocomplete/city?zip=%zip%" + cartParam;
		url = urlFormat.replace("%zip%", zipCode);

		$.ajax({
			url: url,
			async: false
		}).done(function (result) {
			var inputAsLowerCaseItem = valueString.toLowerCase();
			var resultAsLowerCaseItems = $.map(result, function (n, i) { return n.toLowerCase(); });
			// special case: if autocomplete is turned off then the autocomplete-api is returning all the value as it was sent.
			// e.g. if /addresses/autocomplete/city?zip=3172 will return 3172. normaly it would return the city.
			if (zipCode == resultAsLowerCaseItems) {
				valResult = true;
			}
			else
			{
				valResult = jQuery.inArray(inputAsLowerCaseItem, resultAsLowerCaseItems) !== -1 || jQuery.inArray("error", resultAsLowerCaseItems) !== -1;
			}
		}).fail(function () {
			valResult = false;
		});

	} else if (type === "street") {

		valResult = false;
		urlFormat = getApiBaseUrl() + "/addresses/autocomplete/street?zip=%zip%&street=%street%" + cartParam;
		url = urlFormat.replace("%zip%", zipCode.trim());
		url = url.replace("%street%", valueString);

		$.ajax({
			url: url,
			async: false
		}).done(function (result) {
			var inputAsLowerCaseItem = valueString.toLowerCase();
			var resultAsLowerCaseItems = $.map(result, function (n, i) { return n.toLowerCase(); });
			valResult = jQuery.inArray(inputAsLowerCaseItem, resultAsLowerCaseItems) !== -1 || jQuery.inArray("error", resultAsLowerCaseItems) !== -1;
		}).fail(function () {
			valResult = false;
		});

	} else if (type === "houses") {

		valResult = false;
		urlFormat = getApiBaseUrl() + "/addresses/autocomplete/houses?zip=%zip%&street=%street%" + cartParam;
		url = urlFormat.replace("%zip%", zipCode.trim());
		url = url.replace("%street%", street);

		$.ajax({
			url: url,
			async: false
		}).done(function (result) {
			valResult = jQuery.inArray(valueString, result) !== -1 || jQuery.inArray("error", result) !== -1;
		}).fail(function () {
			valResult = false;
		});
	}

	return valResult;
});

$.validator.unobtrusive.adapters.add("postAddress", ['type', 'zipfield', 'cityfield', 'streetfield', 'streetnofield', 'carttypefield', 'enableforpickup', 'enablefordelivery'], function (options) {
	options.rules['postaddress'] = {
		type: options.params['type'],
		zipField: options.params['zipfield'],
		cityField: options.params['cityfield'],
		streetField: options.params['streetfield'],
		streetNoField: options.params['streetnofield'],
		cartTypeField: options.params['carttypefield'],
		enableForPickup: options.params['enableforpickup'],
		enableForDelivery: options.params['enablefordelivery']
	};
	options.messages['postaddress'] = options.message;
});
;
var Landi = Landi || {};


Landi.toggleServiceToCart = function (productCode, serviceProductCode, cartType, successCallback) {
    Landi.callCart(
        getApiBaseUrl() + "/cart/toggleService/" + productCode + "/" + serviceProductCode + "/" + cartType,
        "put",
        function (result) {
            if (!!successCallback) {
                successCallback(result);
            }
            Landi.showToaster(result);
        },
        function (result) {
            console.log(result);
        }
    );
}

Landi.addToGarden = function (productCode, name, description, successText, linkText, linkUrl) {
    var plant = {
        Name: name,
        ProductPlantId: productCode,
        Description: description,
    };

    $.ajax({
        url: getApiBaseUrl() + "/garden/AddPlant/",
        type: "post",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        data: JSON.stringify(plant)
    })
        .done(function (result) {
            Landi.showToaster({
                ToasterText: successText,
                ToasterType: 1,
                ToasterTitle: '',
                ToasterFooter: linkText,
                ToasterLink: linkUrl
            });
        })
        .fail(function (result) {
            console.log(result);
        });
}

Landi.addOrderToCart = function (orderId) {
    Landi.callCart(
        getApiBaseUrl() + "/cart/addorder/" + orderId,
        "put",
        function (result) {
            Landi.showToaster(result);
            Landi.UpdateCartButtonCounters();
        },
        function (result) {
            console.log(result);
        }
    );
}

Landi.showAddToCalendar = function (isAuthenticated, extCategory) {

    if (!("" + extCategory).startsWith('1101')) return;

    $.ajax({
        url: getApiBaseUrl() + "/garden/hasGarden",
        type: "get",
        contentType: "application/json; charset=utf-8"
    })
        .done(function (result) {
            if (result) {
                $('#garden-calendar-action-div').show();

            }
        })
        .fail(function (result) {
            console.log(result);
        });
}

Landi.generalMessageModal = function (title, message, closeButton) {
    if (!!window.instances && !!window.instances.GeneralMessageModal) {
        const component = window.instances.GeneralMessageModal;
        component.show({title, message, closeButton});
    }
}

Landi.checkProductVariants = function (productCode, quantity, cartType, isCheckForProductAccessoires, onAddToCart) {
    $.ajax({
        url: getApiBaseUrl() + "/catalog/hashazards/" + cartType + "/" + productCode,
        type: "get",
        contentType: "application/json; charset=utf-8"
    })
        .done(function (result) {
            if (result) {
                var linkElement = $("a[data-productcode=" + productCode + "]");

                if (linkElement.length) {
                    window.location.href = linkElement.attr('href');

                    return;
                }

                var recoItem = $(".epoq-rs-link p:contains('" + productCode + "')");
                if (recoItem.length) {
                    var recoLink = recoItem.parents("a.epoq-rs-link");
                    if (recoLink.length) {
                        window.location.href = recoLink.attr('href');

                        return;
                    }
                }
            }

            Landi.callCart(
                getApiBaseUrl() + "/catalog/variants/" + productCode + "/" + cartType,
                "get",
                function (result) {

                    if (result.trim().length > 0) {

                        $('#product-variant-modal .modal-body').html(result);
                        $('#product-variant-modal').appendTo("body");
                        $('#product-variant-modal').modal();
                    } else {
                        Landi.addToCart(productCode, quantity, cartType, isCheckForProductAccessoires, onAddToCart);
                    }
                },
                function (result) {
                    console.log(result);
                }
            );
        })
        .fail(function (result) {
        });
}

Landi.updateCartQuantity = function (productCode, quantity, shopType, successCallback, errorCallback) {
    Landi.callCart(
        getApiBaseUrl() + "/cart/setquantity/" + productCode + "/" + quantity + "/" + shopType,
        "put",
        successCallback,
        errorCallback
    );
}

Landi.removeFromCart = function (productCode, shopType, successCallback, errorCallback) {
    Landi.callCart(
        getApiBaseUrl() + "/cart/" + productCode + "/" + shopType,
        "delete",
        successCallback,
        errorCallback
    );
}

Landi.moveItem = function (productCode, from, to, successCallback, errorCallback) {
    Landi.callCart(
        getApiBaseUrl() + "/cart/move/" + productCode + "/" + from + "/" + to,
        "post",
        successCallback,
        errorCallback
    );
}

Landi.refreshCartCostOverview = function (cartCostOverview) {
    $('.cart-cost-overview-value').each(function (index, element) {
        $(element).text(Landi.formatCurrency(cartCostOverview.CostSummary.MerchandiseTotal));
    });
    $('.cart-cost-overview-shipping-value').each(function (index, element) {
        $(element).text(Landi.formatCurrency(cartCostOverview.CostSummary.ShippingTotal));
    });
    $('.cart-cost-overview-total-value').each(function (index, element) {
        $(element).text(Landi.formatCurrency(cartCostOverview.CostSummary.OrderTotal));
    });

    $('.cart-page-probably-delivery-text > b').each(function (index, element) {
        $(element).text(cartCostOverview.FirstDeliveryWindow);
    });
 
    var hasServices = cartCostOverview.CostSummary.Services && cartCostOverview.CostSummary.Services.length > 0;
    
    var serviceCostsContainer = $('.service-costs');
    if (!hasServices) {
        serviceCostsContainer.hide();
    }
    else {
        serviceCostsContainer.show();
        
        serviceCostsContainer.each(function (index, element) {
            var servicesContainer$ = $(element).find('.list');
            var total$ = $(element).find('.total');

            // update total
            total$.text(Landi.formatCurrency(cartCostOverview.CostSummary.ServicesTotal));

            var existingServices = servicesContainer$.find('.service');

            var indexedExistingServices = {};
            for (var i = 0; i < existingServices.length; i++) {
                var service = existingServices[i];
                var serviceId = $(service).data('service-id');
                indexedExistingServices[serviceId] = service;
            }

            // purge the removed services
            var resultServiceIds = cartCostOverview.CostSummary.Services.map(function (s) {
                return s.ProductId.toString();
            });
            let toRemoveServiceIds = Object.keys(indexedExistingServices).filter(x => !resultServiceIds.includes(x));

            for (var i = 0; i < toRemoveServiceIds.length; i++) {
                var toRemoveServiceId = toRemoveServiceIds[i];
                $(indexedExistingServices[toRemoveServiceId]).remove();
                delete indexedExistingServices[toRemoveServiceId];
            }

            // correct existing services or add new services
            for (var i = 0; i < cartCostOverview.CostSummary.Services.length; i++) {
                var costSummaryService = cartCostOverview.CostSummary.Services[i];

                var service = indexedExistingServices[costSummaryService.ProductId];

                if (!!service) {
                    $(service).find('.single').text(Landi.formatCurrency(costSummaryService.Total));
                } else {
                    var span = $('<span>')
                        .addClass('label-single')
                        .text(costSummaryService.Label);

                    var labelContainer = $('<div>')
                        .addClass('col-xs-7')
                        .append(span);

                    var total = $('<span>')
                        .addClass('single text-right')
                        .text(Landi.formatCurrency(costSummaryService.Total));

                    var totalContainer = $('<div>')
                        .addClass('col-xs-5')
                        .append(total);

                    $('<div>')
                        .addClass('row service')
                        .data('service-id', costSummaryService.ProductId)
                        .append(labelContainer)
                        .append(totalContainer)
                        .appendTo(servicesContainer$);
                }
            }
        });
    }
};
;
(function ($) {
    $(document).on('standortselected',
        function (event, data) {
            // eventId 0 is global
            if (data.eventId === 0) {
                var b4lLadenId = $('#place-content').data('b4lladenid'),
                    textContainer;

                // The new button
                $('.cart-page-order-button').removeClass('hidden');

                // The old button(s)
                $('.cart-page-places-button').addClass('hidden');

                textContainer = $('.cart-page-order-button-pickup-shop-text');

                if (b4lLadenId !== undefined && textContainer.length > 0 && textContainer.data() !== undefined) {
                    textContainer.text(textContainer.data().pickupshopTextTemplate
                        .replace('{shopname}', $('#' + data.b4lLadenId).data('place-name')));
                }

                if (data.redirectOnSelection) {
                    window.location = $('.cart-page-order-button').attr('href');
                }

                if (data.refresh) {
                    window.location = window.location.pathname + window.location.hash;
                }

                if (data.productCode) {
                    var minQuantity = !!data.minQuantity ? data.minQuantity : 1;
                    var cartType = !!data.cartType ? data.cartType : 2;
                    var isCheckForProductAccessoires = cartType != 1;
                    Landi.checkProductVariants(data.productCode, minQuantity, cartType, isCheckForProductAccessoires, function () {
                        var placeReloadContainer = $('.place-overlay-reload-on-select');
                        if (placeReloadContainer.length > 0) {
                            // reload
                            window.location = window.location.pathname + window.location.hash;
                        }
                    });
                }
            }
        });

    $('.action-move-all-items').on('click',
        function (event) {
            var self = $(this);
            var from = self.data().shopType;
            var to = self.data().toShopType;

            event.preventDefault();

            $.ajax({
                url: getApiBaseUrl() + "/cart/moveall/" + from + "/" + to,
                type: "post",
                contentType: "application/json; charset=utf-8"
            })
                .done(function (result) {
                    Landi.showToaster(result);
                    if (result.CartCookie !== "") {
                        document.cookie = result.CartCookie;
                    }

                    // hide move all if not permitted
                    if (!result.MoveAllPermitted) {
                        $('.action-move-all-items').hide();
                    }

                    if (result.Products.length <= 0) {
                        // reload page
                        window.location = window.location.pathname + window.location.hash;
                    } else {
                        // Remove all moved cart items
                        $('[data-role=cartitem]').each(function () {
                            self = $(this);

                            var items = $.grep(result.Products, function (e) {
                                return e.ProductCode == self.data().productCode;
                            });
                            if (items.length <= 0) {
                                self.remove();
                            }
                        });

                        Landi.refreshCartCostOverview(result.CartCostOverview);

                        // Update header counters
                        Landi.UpdateCartButtonCounters();
                    }
                })
                .fail(function (result) {
                });
        });

    $('.action-remove-cart-item').on('click',
        function (event) {
            var self = $(this);
            var to = self.data().shopType;
            var productCode = self.data().productCode;

            event.preventDefault();

            var self = this;
            Landi.removeFromCart(
                productCode,
                to,
                function (result) {
                    $("#item_" + productCode).remove();
                    $('#delivery-lane-deactivated-modal').modal('hide');
                    // reload page
                    window.location = window.location.pathname + window.location.hash;
                },
                function (result) {
                }
            );
        });


    $('.action-move-cart-item').on('click',
        function (event) {
            var self = $(this);
            var to = self.data().toShopType;
            var productCode = self.data().productCode;
            var shopType = self.data().shopType


            event.preventDefault();

            Landi.moveItem(
                productCode,
                shopType,
                to,
                function (result) {
                    $("#item_" + productCode).remove();
                    $('#delivery-lane-deactivated-modal').modal('hide');
                    // reload page
                    window.location = window.location.pathname + window.location.hash;
                },
                function (result) {
                }
            );
        });

    $('.delivery-options-selector').change(function (event) {
        var self = $(this);
        var option = self.data('option');
        var selected = self.is(':checked');

        $.ajax({
            url: getApiBaseUrl() + "/cart/setdeliveryoption/" + option + "/" + selected,
            type: "post",
            contentType: "application/json; charset=utf-8"
        })
            .done(function (result) {
                Landi.refreshCartCostOverview(result.CartCostOverview);
            })
            .fail(function (result) {
            });
    });

    $('#shipping-submit').on('click', function (event) {
        $('#ShippingPage').submit();
    });
})(jQuery);;
var Landi = Landi || {};

(function(forms) {

	(function(upload) {

		var getModule = function(item) { return $(item).closest("[data-fileupload='module']"); };
		var getImagePreviewTemplate = function() { return $($("[data-fileupload='preview-template']")[0]); };
		var getPreviewContainer = function(item) { return getModule(item).find("[data-fileupload='preview-container']"); };

		var getNewBlankPreviewItem = function() {
			var newPreviewDomElementTemplate = getImagePreviewTemplate().clone();
			newPreviewDomElementTemplate.removeAttr("id");
			newPreviewDomElementTemplate.removeAttr("hidden");
			return newPreviewDomElementTemplate;
		};

		var showPreviewContainer = function(item) {
			getPreviewContainer(item).parent().removeAttr("hidden");
		};

		var conditionallyHidePreviewContainer = function(item) {
			var hasAnyImagesToShow = getPreviewContainer(item).children().length > 1; // one is needed as template
			if (hasAnyImagesToShow) {
				getPreviewContainer(item).parent().removeAttr("hidden");
			} else {
				getPreviewContainer(item).parent().attr("hidden", "hidden");
			}
		};

		var addFilePreview = function(item, file, name) {

			var reader = new FileReader();
			reader.fileName = file.name;
			reader.onload = function(e) {
				var newPreviewDomElement = getNewBlankPreviewItem();
				newPreviewDomElement.find("img").attr("src", e.target.result);
				newPreviewDomElement.find("button").attr("data-fileupload-imgname", name);
				newPreviewDomElement.find(".preview-label").html(file.name);
				getPreviewContainer(item).append(newPreviewDomElement);
			};
			reader.readAsDataURL(file, "test");
		};

		var removeFilePreview = function(button) {
			$(button).parent().remove();
		};

		// adds a file to a directory
		var addFile = function(input) {

			var path = $(input).data("fileupload-path");
			var files = $(input)[0].files;

			for (var i = 0; i < files.length; i++) {
				(function(file) {
					var formData = new FormData();
					formData.append("path", path);
					formData.append("accept", $(input).attr('accept'));
					formData.append("file", file);
					
					$.ajax({
							url: getApiBaseUrl() + "/upload/single",
							data: formData,
							processData: false, // do not process data
							contentType: false, // do not force content type. 
							type: "POST"
						})
						.done(function (result) {
							if (result.ErrorMessage) {
								var message = result.ErrorMessage.replace(/"/g, "");

								$('#upload-message-error-container').text(message);
								$('#upload-message-error-container').show();
							} else {
								$('#upload-message-error-container').hide();
								$('#upload-choose-files').attr("disabled", false);

								addFilePreview(input, file, result.ReturnValues.fileName);
								showPreviewContainer(input);
							}

							if (result.DisableButton === true) {
								$('#upload-choose-files').attr("disabled", true);
							}
						})
						.fail(function(result) {
							console.log(result);
						});
				})(files[i]);
			}
		};

		// removes a file from a directory
		var removeFile = function(button) {
			var path = $(button).attr("data-fileupload-path");
			var fileName = $(button).attr("data-fileupload-imgname");

			var formData = new FormData();
			formData.append("relativePath", path);
			formData.append("fileName", fileName);

			$.ajax({
				url: getApiBaseUrl() + "/upload/remove",
				data: formData,
				processData: false, // do not process data
				contentType: false, // do not force content type. 
				type: "POST"
			})
			.done(function (result) {

				if (result.ErrorMessage) {
					var message = result.ErrorMessage.replace(/"/g, "");

					$('#upload-message-error-container').text(message);
					$('#upload-message-error-container').show();

					if (result.DisableButton === true) {
						$('#upload-choose-files').attr("disabled", true);
					}
				} else {
					$('#upload-message-error-container').hide();

					$('#upload-choose-files').attr("disabled", false);
				}

				var sibling = $(button).closest("[data-fileupload='preview-template']").siblings()[0];
				removeFilePreview(button);
				conditionallyHidePreviewContainer(sibling);
			})
			.fail(function(result) {
			});

		};

		// If Browser does not support modern html5 file inputs, the file input will not be provided.
		var hideFileInputOnOldBrowsers = function() {
			if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
				getModule().remove();
			}
		};

		// public methods
		upload.HideFileInputOnOldBrowsers = function() {
			return hideFileInputOnOldBrowsers();
		};
		upload.AddFile = function(input) {
			return addFile(input);
		};
		upload.RemoveFile = function(button) {
			return removeFile(button);
		};

	}(forms.Upload = forms.Upload || {}));

	(function(submitButton) {

		var change = function (button, dataAttr) {
			button = $(button);
			var attr = button.attr(dataAttr);
			// For some browsers, `attr` is undefined; for others, attr` is false. Check for both.
			if (typeof attr !== typeof undefined && attr !== false) {
				button.val(attr);
			}
		}

		var indicateSend = function (button) {
			change(button, "data-submitbutton-text-send");
		};
		
		var indicateSending = function (button) {
			change(button, "data-submitbutton-text-sending");
		};

		var indicateSent = function (button) {
			change(button, "data-submitbutton-text-sent");
		};

		var enable = function (button) {
			$(button).removeClass("btn-disabled");
		}

		var disable = function(button) {
			$(button).addClass("btn-disabled");
		}

		submitButton.IndicateSend = function(button) { indicateSend(button); };

		submitButton.IndicateSending = function (button) { indicateSending(button); };

		submitButton.IndicateSentSuccessfully = function (button) { indicateSent(button); };

		submitButton.Enable = function(button) { enable(button); };

		submitButton.Disable = function(button) { disable(button); };

	}(forms.SubmitButton = forms.SubmitButton || {}));

	(function(convert) {
		
		convert.toObject = function(form, useOnlyFormModelNames) {
			form = $(form);

			var fields = {};

			form.find(":input").each(function () {
				var fieldName = this.name;

				if (useOnlyFormModelNames) {
					var parts = fieldName.split('.');
					fieldName = parts.pop();
				}

				fields[fieldName] = $(this).val();
			});

			return fields;
		}

	}(forms.Convert = forms.Convert || {}));

}(Landi.Forms = Landi.Forms || {}));


(function($) {

	// Hide File Input in old browsers.
	Landi.Forms.Upload.HideFileInputOnOldBrowsers();

	// add a file to be uploaded
	$("html").on("change", "input[data-fileupload='input']", function () {
		if (fileTypeValid(this)) {
			$('#upload-message-error-container').hide();
			Landi.Forms.Upload.AddFile(this);
		} else {
			$('#upload-message-error-container').text($('#not-supported-file-message').val());
			$('#upload-message-error-container').show();
		}
	});

	// remove a file from files to be uploaded
	$("html").on("click", "button[data-fileupload='remove']", function() {
			Landi.Forms.Upload.RemoveFile(this);
		});

	$('#checkSubmitForm').submit(function (event) {
		var valid = $('#checkSubmitForm').valid();

		// custom check end
		if (valid) {
			$('#checkSubmitForm button[type=submit]').prop('disabled', true).text($('#checkSubmitForm').attr('data-submittext'));
		} else {
			event.preventDefault();
			
			return false;
		}
	});

	$("html").on("click", "[type='submit']", function() {
		Landi.Forms.SubmitButton.IndicateSending(this);
	});

	function fileTypeValid(input) {
		var acceptedFileTypes = $(input).attr('accept').split(',');
		var files = $(input)[0].files;

		var lastFile = files[files.length - 1];
		var fileEnding = lastFile.name.substring(lastFile.name.lastIndexOf('.'));

		return $.inArray(fileEnding, acceptedFileTypes) !== -1;
	}

})(jQuery);;
var Landi = Landi || {};

Landi.Input = function () {
    // tooltip
    $('.tooltiptext').on('click', function (e) {
        $(e.target).closest('.tooltiptext').toggleClass("show");
    });

    function initPrivateAndCompany() {
        function showAndEnablePrivate(form) {
            form.find('.show-private').show();
            form.find('.show-company').hide();
            form.find('.enable-private').prop("disabled", false);
            form.find('.enable-company').prop("disabled", true);
        }

        function showAndEnableCompany(form) {
            form.find('.show-private').hide();
            form.find('.show-company').show();
            form.find('.enable-private').prop("disabled", true);
            form.find('.enable-company').prop("disabled", false);
        }

        function hideAndDisableBoth(form) {
            form.find('.show-private').hide();
            form.find('.show-company').hide();
            form.find('.enable-private').prop("disabled", true);
            form.find('.enable-company').prop("disabled", true);
        }

        // Toggles fields according to selected salutation.
        //   salutationId: 0: unknown
        //   salutationId: 1, 2: private customer (male, female)
        //   salutationId: 3: company
        function toggleCompanyAndPrivateElementsFromDropdown(e) {
            if (e === undefined || e === null) {
                return;
            }

            var currentForm = $(e.target.closest("form"));
            var salutationId = $(currentForm).find('select.salutation-selection option:selected').val();

            if (salutationId === "0") {
                hideAndDisableBoth(currentForm);
            } else if (salutationId === "3") {
                currentForm.find('.enable-company').val("");
                showAndEnableCompany(currentForm);
            } else {
                showAndEnablePrivate(currentForm);
            }
        }

        function toggleCompanyAndPrivateElements(e, radioName) {
            if (e === undefined || e === null) {
                return;
            }

            var currentForm = $(e.target.closest("form"));
            var selection = currentForm.find('input[type=radio][name="' + radioName + '"]:checked').val();

            if (selection === "3") {
                showAndEnableCompany(currentForm);
            } else {
                // when unknown we have a sub radiobutton to select the gender
                showAndEnablePrivate(currentForm);
            }
        }

        var selectedGenderRadio = $('input[type=radio][name="SelectedGender"]');
        selectedGenderRadio.change(function (e) {
            toggleCompanyAndPrivateElements(e, 'SelectedGender');
        });
        var selectedAddressGenderRadio = $('input[type=radio][name="Address.SelectedGender"]')
        selectedAddressGenderRadio.change(function (e) {
            toggleCompanyAndPrivateElements(e, 'Address.SelectedGender');
        });

        var selectedSalutationSelect = $('select.salutation-selection');
        selectedSalutationSelect.change(function (e) {
            toggleCompanyAndPrivateElementsFromDropdown(e);
        });

        selectedGenderRadio.trigger("change");
        selectedAddressGenderRadio.trigger("change");
        selectedSalutationSelect.trigger("change");
    }

    initPrivateAndCompany();

    var inputsWithFloatingLabels = $('.has-floating-label input');
    inputsWithFloatingLabels.each(function () {
        if ($(this).val() !== '') {
            $(this).prev('label').addClass('moveUp');
        }
    })

    setTimeout(function () {
        $('.has-floating-label input').each(function () {
            if ($(this).val() !== '') {
                $(this).prev('label').addClass('moveUp');
            }
        });
    }, 1000);

    inputsWithFloatingLabels.on('focus', function () {
        $(this).prev('label').addClass('moveUp');
    });

    inputsWithFloatingLabels.on('focusout', function () {
        if (!$(this).val()) $(this).prev('label').removeClass('moveUp');
    });

    inputsWithFloatingLabels.on('change', function () {
        if (!$(this).val()) {
            $(this).prev('label').removeClass('moveUp');
        } else {
            $(this).prev('label').addClass('moveUp');
        }
    });

    // dropdown menu with single selectable elements inside (custom html)
    var allDropdowns = $('.selectable-dropdown');
    allDropdowns.each(function (index) {
        var masterElement = $(allDropdowns[index]);
        masterElement.find('.dropdown-menu li, .dropdownPlaceholder li').on('click', function (e) {
            clickDdElement(e, masterElement)
        });
    });


    function clickDdElement(e, masterElement) {
        // identify element
        var parent = e.currentTarget.parentElement;
        if (!$(parent).hasClass('dropdownPlaceholder')) {
            // cut currently selected out and paste it to the selected items
            var selectedElement = masterElement.find('.dropdownPlaceholder li');
            var destiny = masterElement.find('.dropdown-menu')
            var index = selectedElement.data('order');
            //selectedElement.appendTo(destiny); // old but working
            var totalItems = destiny.children().length;

            if (index < totalItems) {
                destiny.children(':eq(' + (index) + ')').before(selectedElement);
            } else {
                destiny.children(':eq(' + (index - 1) + ')').after(selectedElement);
            }


            // cut it out and paste it to the selected items
            $(e.currentTarget).appendTo(masterElement.find(".dropdownPlaceholder"));

            // apply click again
            selectedElement.on('click', clickDdElement);

            // select correct element for form submission
            var radios = masterElement.find('input[type="radio"]')
            var checked = radios.filter(':checked');
            checked.prop("checked", false);

            $(e.currentTarget).find('input').prop("checked", true);
            // make sure change event is triggered, we never know what oder events are bound
            $(e.currentTarget).find('input').trigger('change');
        }
    }
};

jQuery(document).ready(function ($) {
    Landi.Input();
});
;
var Landi = Landi || {};

(function ($) {
	Landi.getVariant = function (baseProductCode) {
		var modalSelected = $('#Variant_SelectedVariant_Modal option:selected').val();
		if (modalSelected) {
			return modalSelected;
		} else {
			var selected = $('#Variant_SelectedVariant option:selected').val();

			if (selected) {
				return selected;
			}
			else {
				return baseProductCode;
			}
		}
	};

	Landi.lazyload = function () {
		var wt = $(window).scrollTop();    //* top of the window
		var wb = wt + $(window).height();  //* bottom of the window
		$('.lazypage').each(function () {
			var ot = $(this).offset().top;  //* top of object (i.e. list div)
			var ob = ot + $(this).height(); //* bottom of object
			if (!$(this).attr('loaded') && wt <= ob && wb >= ot) {
				var pageIndex = parseInt($(this).attr('pageIndex'));
				var lazyLoadingTimes = parseInt($(this).attr('lazyLoadingTimes'));
				if (pageIndex < lazyLoadingTimes) {
					$('#LoadMore').hide();
					Landi.lazyload.loadNextPage(this);
				} else {
					$(this).find('.loader').hide();
					$('#LoadMore').show();
				}
			}
		});
	};

	Landi.lazyload.loadNextPage = function (container) {
		var loader = $(container).find('.loader');
		loader.show();
		var dataContainer = $(container).parent();
		var searchUrl = $('#searchUrl').val() + "&" + $(container).attr('pageStart') + "&" + $(container).attr('pageSize');
		var currentScrollPosition = $(document).scrollTop();
		$.ajax({
			url: searchUrl
		}).done(function (result) {
			loader.hide();
			if (result.trim().length > 0) {
				dataContainer.replaceWith(result);
				$('[data-toggle="tooltip"]').tooltip({ placement: "top", delay: { "show": 150, "hide": 0 }, trigger: "hover" });
				var lastContainer = $('#ProductList .product-listing:last .loader-container');
				if (!lastContainer.attr('pageIndex')) {
					$('#LoadMore').hide();
				}
				$(document).scrollTop(currentScrollPosition);
			}
		}).fail(function () {
			loader.hide();
		});
		$(container).attr("loaded", true);
	};

	Landi.loadMoreButtonClick = function () {
		var container = $('#ProductList .product-listing:last .loader-container');
		Landi.lazyload.loadNextPage(container);
	};

	var selectedProductThumbnail = 0;
	var fancyBoxOptions = {
		thumbs: {
			showOnStart: true
		},
		slideShow: false,
		fullScreen: false,
		onInit: function (instance) {
			$('.fancybox-thumbs').ready(function () {
				if ($('.fancybox-thumbs').length > 0) {
					$('.fancybox-thumbs ul').slick({
						slidesToShow: 8,
						slidesToScroll: 8
					});
				}
			});
		}
	};
	
	Landi.openAndScrollToCustomerQuestionsAccordion = function () {
		// open collapse
		var $productQuestion = $('.product-question');
		if($productQuestion) {
			$productQuestion.find('.collapse').collapse('show');
			
			// scroll to with some offset (cause of topbar)
			var element = $productQuestion.get(0);
			if(!!element) {
				var y = element.getBoundingClientRect().top + window.pageYOffset - 80;
				window.scrollTo({top: y, behavior: 'smooth'});
			}
		}
	}

	Landi.addQuestion = function (isAuthenticated) {
		$('#customer-questions').customerQuestions('addQuestion', isAuthenticated === 'True');
	}

	$('[data-action="save-customer-question"]').on('click', function (event) {
		var self = $(this);
		SaveCustomerQuestion(event, self);
	});

	function SaveCustomerQuestion(event, self) {
		
		var $form = $('#question-form');

		var s = $form.serialize();

		event.preventDefault();

		if ($form.valid()) {
			$.ajax({
				url: getApiBaseUrl() + "/catalog/savecustomerquestion",
				data: $form.serialize(),
				type: "PUT"
			})
				.done(function (result) {
					if (result.Success) {
						$('#product-questions-modal').hide();
						$('#product-questions-thanks-modal').modal(true);
					} else {
						
					}
				})
				.fail(function (result) {
				});
		}
	}





	$('[data-page=product-details] [data-fancybox="productImages"]').fancybox(fancyBoxOptions);

	$("[data-page=product-details] .thumbnails").slick({
		slidesToShow: 3,
		slidesToScroll: 3,
		draggable: false,
		variableWidth: true
	});

	// when the user selects a different variant, the page is refreshed.
	$('[data-trigger="variant-selection"]').on('change', function () {
		window.location.href = this.value;
	});

	// when the user selects a different variant in the modal on the category page, the image and title are refreshed.
	$(document).on('change', '[data-trigger="variant-modal-selection"]', function () {
		var productCode = this.value;

		$.ajax({
			url: getApiBaseUrl() + "/catalog/variants/data/" + productCode,
			async: true
		}).done(function (result) {
			if (result.title && $("#variant-modal-title")) {
				$("#variant-modal-title").html(result.title);
			}

			if (result.imageUrl && $("#variant-modal-image")) {
				$("#variant-modal-image").attr("src", result.imageUrl);
			}

		}).fail(function () {
		});
	});

	$("[data-page=product-details] .thumbnails .slick-slide[data-productimage]").mouseover(function (tmbElement) {
		var thumbnail = $(tmbElement.currentTarget);
		var thumbnailType = thumbnail.attr('data-productimage');

		selectedProductThumbnail = $("[data-page=product-details] .thumbnails .slick-slide[data-productimage]").index(this);

		if (thumbnail.attr('data-productimage') === 'image') {
			var newOriginalImageUrl = thumbnail.attr('href');
			var oldOriginalImageUrl = $("[data-productimage=main-image]").attr('href');

			if (newOriginalImageUrl !== oldOriginalImageUrl) {
				var newLargeImageUrl = thumbnail.attr('data-product-large-image');
				$("[data-productimage=main-image]").attr('href', newOriginalImageUrl);
				$("[data-productimage=main-image] img.product-img").attr('src', newLargeImageUrl);
			}
		}

		$("[data-page=product-details] .thumbnails .slick-slide").removeClass('active-tmb');
		thumbnail.addClass('active-tmb');
	});

	$("[data-productimage=main-image]").click(function () {
		var $what = $.extend({}, $("[data-page=product-details] .thumbnails .slick-slide[data-productimage]"));
		$what[selectedProductThumbnail] = this;
		$.fancybox.open($what, fancyBoxOptions, selectedProductThumbnail);
		return false;
	});

	$(".info-link").click(function (e) {
		e.preventDefault();

		var position = $($(this).attr("href")).offset().top;

		$("body, html").animate({
			scrollTop: position
		}, 700);
	});

	var resizeYoutubePlayButton = function() {
		$.each($("[data-youtube-playbutton]"), function(index, element) {
			var element$ = $(element);
			element$.css("padding", 0);
			var image$ = $(element$.parent().find("img")[0]);
			var parentpadding = parseInt(element$.parent().css("padding-top"));
			var imageWidth = image$.width();
			var imageHeight = image$.height();
			
			var elementSize = element$.height();
			if (imageHeight < elementSize) {
				element$.css("font-size", imageHeight + "px");
				elementSize = imageHeight;
			}
			var top = (((imageHeight - elementSize) / 2) + parentpadding) + "px";
			var left = (((imageWidth - elementSize) / 2) + parentpadding) + "px";
			element$.css("top", top).css("left", left).css("display", "block");
		});
		
	};
	resizeYoutubePlayButton();

})(jQuery);

// EPOQ lazyload

(function ($) {


	var getUrlParameter = function (sParam) {
		var sPageURL = decodeURIComponent(window.location.search.substring(1));
		var sURLVariables = sPageURL.split('&');
		var sParameterName;
		var i;

		for (i = 0; i < sURLVariables.length; i++) {
			sParameterName = sURLVariables[i].split('=');

			if (sParameterName[0] === sParam) {
				return sParameterName[1] === undefined ? true : sParameterName[1];
			}
		}

		return ' ';
	};

	var query = getUrlParameter('query');
	var loading = false;

	Landi.epoqLazyload = function () {
		var wt = $(window).scrollTop();    //* top of the window
		var wb = wt + $(window).height();  //* bottom of the window
		$('.epoq-lazypage').each(function () {
			if ($('#product-search-tab').length &&
				$('#product-search-tab').hasClass('active') &&
				$(this).attr('data-active').toLowerCase() == 'true') {

				var $this = $(this);

				var loader = $('.loader-container');
				var container = $('#ProductList');
				var ot = $this.offset().top; //* top of object (i.e. list div)
				var ob = ot + $this.height(); //* bottom of object

				var pageNumberToLoad = parseInt($this.attr('data-page-to-load-next'));
				var maxPages = parseInt($this.attr('data-max-pages'));
				if (pageNumberToLoad >= maxPages) {
					$this.attr("loaded", true);
					loader.hide();
				}

				if (!$this.attr('loaded') && !loading && wt <= ob && wb >= ot) {
					loading = true;
					loader.show();

					var searchBaseUrl = $this.data().searchUrl;
					var language = $this.data().lng;

					var searchUrl = searchBaseUrl + "/" + query + "/" + pageNumberToLoad + "/" + language;
					$.ajax({
						url: searchUrl,
						async: false
					}).done(function(result) {
						if (result.trim().length > 0) {
							container.append(result);
							$('[data-toggle="tooltip"]').tooltip({ placement: "top", delay: { "show": 150, "hide": 0 }, trigger: "hover" });

							var newPageNumber = pageNumberToLoad + 1;
							$this.attr('data-page-to-load-next', newPageNumber.toString());
						} else {
							$this.attr("loaded", true);
						}
					}).fail(function() {

					});

					loader.hide();
					loading = false;
				}
			} else {
				$('.loader-container').hide();
			}
		});
	};
})(jQuery);

$(document).ready(function () {
	if ($('#epoq-lazyloader').length) {
		$(window).scroll(Landi.epoqLazyload);
	} else if ($('.lazypage').length) {
		$(window).scroll(Landi.lazyload);
		Landi.lazyload();
	}
});;
var Landi = Landi || {};

(function ($) {
    Landi.getQuantity = function (buttonElement) {
        var cartPanel = $(buttonElement).closest(".cart-panel");
        if (cartPanel.length) {
            var quantityInput = cartPanel.find('[data-role=quantityinput] input');
            if (quantityInput.length) {
                return parseInt(quantityInput.val());
            }
        }

        return 1;
    };

})(jQuery);

$(document).ready(function () {
    var modal = $('#product-accessoires-modal');
    modal.on('shown.bs.modal', function () {
        var $accessoryRows = $('.product-accessory-row');

        $accessoryRows
            .each(function () {
                var $row = $(this);
                var $unitPrice = $row.find('.price-and-quantity')
                var $totalPrice = $row.find('.total')
                var unitPrice = parseFloat($unitPrice.data().singlePrice);

                $row.find('[data-role=quantityinput]')
                    .on('quantitychanged', Landi.debounce(function (event, data) {
                        var totalPrice = data.quantity * unitPrice;
                        $totalPrice.text(Landi.formatCurrency(totalPrice));
                    }, 100));
            })
    })
});;
function DatepickerSingle(e) {
	var self = this,
		originalDate;

	if ($(e).data("datepickersingle")) {
		return $(e).data("datepickersingle");
	}

	this.element = $(e);
	this.element.data("datepickersingle", this);
	this.validator = this.element.parents('form').data('validator');

	this.dateInput = $("input[type=hidden]", this.element);
	this.dayPicker = $(".datepickersingle-day", this.element);
	this.monthPicker = $(".datepickersingle-month", this.element);
	this.yearPicker = $(".datepickersingle-year", this.element);

	this.dateInput.rules('remove');

	if (this.dateInput.val() !== '') {
		var date = new Date(Date.parse(this.dateInput.val()));

		// slice: 9 -> 09 -> 09 or 12 -> 012 -> 12 (take last two)
		this.dayPicker.val(('0' + (date.getDate())).slice(-2));
		this.monthPicker.val(('0' + (date.getMonth() + 1 )).slice(-2));
		this.yearPicker.val(date.getFullYear());
	}

	var showError = function (message) {
		var options = {};
		options[self.dateInput[0].name] = message;
		self.validator.showErrors(options);
	};

	var validateCurrent = function () {
		var day, month, year;

		if (self.dayPicker.val() === '' || self.monthPicker.val() === '' || self.yearPicker.val() === '') {

			if (self.dayPicker.val() === '' && self.monthPicker.val() === '' && self.yearPicker.val() === '') {
				showError('');
			}

			self.dateInput.val('');
			return false;
		}

		day = parseInt(self.dayPicker.val(), 10);
		month = parseInt(self.monthPicker.val(), 10);
		year = parseInt(self.yearPicker.val(), 10);

		var date = new Date(year, month - 1, day);

		if (year !== date.getFullYear() || month - 1 !== date.getMonth() || day !== date.getDate()) {
			showError(self.element.data().invalidDateMessage);
			return false;
		}

		showError('');

		return true;
	};

	var writeDate = function () {
		var day = parseInt(self.dayPicker.val(), 10);
		var month = parseInt(self.monthPicker.val(), 10);
		var year = parseInt(self.yearPicker.val(), 10);

		var date = new Date(year, month - 1, day);

		self.dateInput.val(date.toISOString());
		self.validator.element(self.dateInput);
	};

	this.dayPicker.on("change",
		function (event) {
			if (validateCurrent()) {
				writeDate();
			}
		});

	this.monthPicker.on("change",
		function (event) {
			if (validateCurrent()) {
				writeDate();
			}
		});

	this.yearPicker.on("change",
		function (event) {
			if (validateCurrent()) {
				writeDate();
			}
		});

	return this;
}

//$.fn.datePickerSingle

$.fn.datepickersingle = function (option, val) {
	return this.each(function () {
		var $this = $(this),
			data = $this.data('datepickersingle'),
			options = typeof option === 'object' && option;

		if (!data) {
			//$this.data('datepicker', (data = new DatepickerSingle(this, $.extend({}, $.fn.datepicker.defaults, options))));
			$this.data('datepicker', (data = new DatepickerSingle(this)));
		}
		//if (typeof option === 'string') data[option](val);
	});
};

$(document).ready(function () {
	$('[data-role=datepickersingle]').each(function (index, element) {
		$(element).datepickersingle();
	});
});;
(function($) {
	$.widget("landi.numericalinput",
	{
		options: {
			decimalInput: false,
			minValue: -Infinity,
			maxValue: Infinity,
			convertEmptyValues: true,
			numberOfDecimals: 2,
			stepQuantity: 1
		},

		_create: function() {
			var self = this;

			if (this.element.data().minValue !== undefined) {
				this.options.minValue = parseInt(this.element.data().minValue);
			}

			if (this.element.data().maxValue !== undefined) {
				this.options.maxValue = parseInt(this.element.data().maxValue);
			}

			if (this.element.data().convertEmptyValues !== undefined) {
				this.options.convertEmptyValues = !!Boolean(this.element.data().convertEmptyValues);
			}

			if (this.element.data().stepQuantity !== undefined) {
				this.options.stepQuantity = parseInt(this.element.data().stepQuantity);
			}

			if (this._getValue(this.element.val()) < this.options.minValue) {
				this.element.val(this.options.minValue);
				this.element.change();
			}

			if (this._getValue(this.element.val()) > this.options.maxValue) {
				this.element.val(this.options.maxValue);
				this.element.change();
			}

			this.element.on("focusout",
				function(event) {
					self._validate();
					self._parseFinalValue();
					self.element.change();
				});

			this.element.on("keydown",
				function(event) {
					self._handleKeyDown(event);
				});

			this.element.on("keypress",
				function(event) {
					self._handleKeyPress(event);
				});

		},
		_handleKeyDown: function(event) {
			var self = this,
				startPos = self.element[0].selectionStart;

			switch (event.keyCode) {
				case $.ui.keyCode.UP:
				{
					event.preventDefault();
					event.stopImmediatePropagation();
					self._add();
					self.element.change();
					return false;
				}
				case $.ui.keyCode.DOWN:
				{
					event.preventDefault();
					event.stopImmediatePropagation();
					self._subtract();
					self.element.change();
					return false;
				}
				case $.ui.keyCode.HOME:
				case $.ui.keyCode.END:
				case $.ui.keyCode.LEFT:
				case $.ui.keyCode.RIGHT:
				case $.ui.keyCode.DELETE:
				case $.ui.keyCode.BACKSPACE:
				case $.ui.keyCode.ESCAPE:
				{
					return true;
				}
				case 109:
				case 189:
					if (startPos === 0 && self.options.minValue < 0) {
						if (self.element.val().length === 0 || 0 - self._getValue(self.element.val()) >= self.options.minValue) {
							return true;
						}
					}

					return false;
				case $.ui.keyCode.ENTER:
				case $.ui.keyCode.TAB:
				{
					self._parseFinalValue();
					self.element.change();
					return true;
				}
				default:
				{
					return true;
				}
			}
		},
		_handleKeyPress: function(event) {
			var self = this,
				startPos = self.element[0].selectionStart,
				endPos = self.element[0].selectionEnd,
				decimalPointPosition,
				character,
				content,
				value;

			if (event.altKey || event.ctrlKey) {
				return true;
			}

			// Pressed the dot
			if (self.options.decimalInput && event.which === 46) {
				if (startPos === 0 || self._hasDecimalPoint()) {
					return false;
				}
				return true;
			}

			// Pressed the minus sign
			if (event.which === 45) {
				if (startPos === 0 && !self._hasMinusSign() && self.options.minValue < 0) {
					return true;
				}
			}

			// Pressed a number
			if (event.which >= 48 && event.which <= 57) {
				if (startPos === 0 && self.element.val().startsWith("-")) {
					return false;
				}

				character = String.fromCharCode(event.which);
				content = self.element.val();

				if (self.options.decimalInput && self._hasDecimalPoint()) {
					decimalPointPosition = self._getDecimalPointPosition();

					if (startPos > decimalPointPosition) {
						// Pressed a number after the dot and already has 2 decimals
						if (content.length - decimalPointPosition > self.options.numberOfDecimals) {
							// pressed at end of number
							if (startPos >= content.length) {
								return false;
							} else {
								content = content.substr(0, startPos) + character + content.substr(startPos + 1);
								self._setElementValue(content, startPos + 1);
								return false;
							}
						}
					}
				}

				if (startPos !== endPos) {
					content = content.substr(0, startPos) + content.substr(endPos);
				}

				content = content.substr(0, startPos) + character + content.substr(startPos);
				value = self._getValue(content);

				return true;

				//if (value >= self.options.minValue && value <= self.options.maxValue) {
				//	return true;
				//}
			}

			return false;
		},
		_validate: function() {
			var value = this._getValue(this.element.val());

			if (value < this.options.minValue) {
				this.element.val(this.options.minValue);
			}

			if (value > this.options.maxValue) {
				this.element.val(this.options.maxValue);
			}

			return;
		},
		_setElementValue: function(value, cursorPosition) {
			this.element.val(value);
			this.element[0].selectionStart = cursorPosition;
			this.element[0].selectionEnd = cursorPosition;
		},
		_getDecimalPointPosition: function() {
			return this.element.val().indexOf(".");
		},
		_hasDecimalPoint: function() {
			return this._getDecimalPointPosition() >= 0;
		},
		_hasMinusSign: function() {
			return this.element.val().indexOf("-") >= 0;
		},
		_add: function() {
			var value = this.element.val(),
				newValue;

			if (value.length > 0) {
				newValue = this._getValue(value) + this.options.stepQuantity;

				if (newValue <= this.options.maxValue) {
					this.element.val(newValue);
				}
			} else {
				this.element.val(1);
			}
		},
		_subtract: function() {
			var value = this.element.val(),
				newValue;

			if (value.length > 0) {
				newValue = this._getValue(value) - this.options.stepQuantity;

				if (newValue >= this.options.minValue) {
					this.element.val(newValue);
				}
			} else {
				this.element.val(-1);
			}
		},
		_parseFinalValue: function() {
			var self = this,
				value = self.element.val();

			if (value.length > 0 && value[value.length - 1] === ".") {
				value = value + "0";
			}

			if (value.length > 0 && !(value.length === 1 && value[0] === "-")) {
				if (!this.options.decimalInput) {
					this.element.val(this._getValue(value));
				} else {
					this.element.val(this._getValue(value).toFixed(2));
				}
			} else {
				if (this.options.convertEmptyValues) {
					this.element.val(this.options.decimalInput ? "0.00" : "0");
				}
			}
		},
		_getValue: function(stringValue) {
			if (!this.options.decimalInput) {
				return parseInt(stringValue);
			} else {
				return parseFloat(stringValue);
			}
		},
		destroy: function() {
			$.Widget.prototype.destroy.apply(this, arguments); // default destroy
		}
	});
})(jQuery);

$(document).ready(function() {
	$("[data-role=numericalinput]").each(function(index, element) {
		$(element).numericalinput();
	});

	$("[data-role=decimalinput]").each(function(index, element) {
		$(element).numericalinput({ decimalInput: true });
	});
});;
var Landi = Landi || {};

Landi.ShopPriceFilter = function () {
	var root = $("#ProductPriceFilter");

	var minPrice = parseFloat($("#minimumPrice").attr("value"));
	var maxPrice = parseFloat($("#maximumPrice").attr("value"));
	var selMinPrice = parseFloat($("#selectedMinimumPrice").attr("value"));
	var selMaxPrice = parseFloat($("#selectedMaximumPrice").attr("value"));

	var loader = root.find(".loader");
	var slider = root.find(".price-slider")[0];
	//var parameters = '';//$.parseParams(window.location.href.split('?')[1] || '');

	var initializePriceSlider = function () {
		noUiSlider.create(slider, {
			start: [selMinPrice, selMaxPrice],
			step: .05,
			connect: true,
			orientation: "horizontal",
			range: {
				'min': minPrice,
				'max': maxPrice
			}
		});
		slider.noUiSlider.on("update", function (values, handle) {
			$('[data-filtergroup="price"] .quantity').text(values[0] + " - " + values[1]);
			$('[data-filtergroup="price"] .dropdown-quantity').show();

			$("#PriceRangeLower").val(values[0]);
			$("#PriceRangeLowerDisplay").html(values[0]);
			$("#PriceRangeUpper").val(values[1]);
			$("#PriceRangeUpperDisplay").html(values[1]);

		});
		slider.noUiSlider.on("change", function (values, handle) {
			refreshProducts();
		});
	}

	var bindCartChange = function () {
		$(document).on("change", ".product-filter-carttype", function (event) {
			event.preventDefault();
			refreshProducts();
		});
	}

	var bindSortingChange = function () {
		$(document).on("click", ".select-sort-option", function (event) {
			var newValue = $(this).attr("value");
			var newText = $(this).text();

			var valueElement = $("#sort-value");

			valueElement.attr("value", newValue);
			valueElement.text(newText);

			event.preventDefault();
			refreshProducts();
		});
	}
	
	var bindSingleSelectClick = function () {
		$(document).on("click", ".select-option.select-single-option", function (event) {
			var groupId = $(this).data().groupId;
			var attributeName = $(this).data().name;
			var attributeId = $(this).attr("value");

			// set text and currently selected to dropdown
			var singleSelectlabelElement = $("#single-select-" + groupId);
			if (singleSelectlabelElement) {
				singleSelectlabelElement.text(attributeName);
				singleSelectlabelElement.attr("value", attributeId);
			}

			// remove single select that are already selected
			var existingElement = $('[data-action="deselect-option"][data-group-id="' + groupId + '"][value="' + attributeId + '"]');
			if (existingElement.length) {
				existingElement.remove();
			}

			event.preventDefault();
			refreshProducts();
			addToSelected($(this));
		});
	}
	
	var bindMultiSelectClick = function () {
		$(document).on("click", ".select-option.select-multi-option", function (event) {
			var groupId = $(this).data().groupId;
			var attributeId = $(this).attr("value");

			// remove multi select that are already selected
			var existingElement = $('[data-action="deselect-option"][data-group-id="' + groupId + '"][value="' + attributeId + '"]');
			if (existingElement.length) {
				existingElement.remove();
			} else {
				addToSelected($(this));
			}

			refreshProducts();
		});
	}

	var bindDropdownAutoCloseFunction = function () {
		// mouse click outside of dropdown to close it
		var mouseIsInside = false;
		$("#ProductFilter .dropdown-container").hover(function () { mouseIsInside = true; }, function () { mouseIsInside = false; });

		$("body").mouseup(function () {
			if (!mouseIsInside) {
				$("#ProductFilter .dropdown-container").removeClass("open");
			}
		});
	}

	var initQuantities = function() {
		$('#ProductFilter .dropdown-container [type="checkbox"]').each(function () {
			setFilterQuantity($(this));
		});
	}

	var setFilterQuantity = function (element) {
		var filterGroupId = element.data().groupId;
		var numChecked = $('input[type="checkbox"][data-group-id="' + filterGroupId + '"]:checked').length;

		if (numChecked) {
			$('[data-filtergroup="' + filterGroupId + '"] .quantity').text(numChecked);
			$('[data-filtergroup="' + filterGroupId + '"] .dropdown-quantity').show();
		} else {
			$('[data-filtergroup="' + filterGroupId + '"] .dropdown-quantity').hide();
		}
	}

	var refreshProducts = function (target) {

		loader.show();

		var filterParamArray = [];

		var priceRangeParam = getPriceRangeParam();
		if (priceRangeParam) { filterParamArray.push(priceRangeParam) }
		
		var attMultiParam = getMultiSelectParam();
		if (attMultiParam) { filterParamArray.push(attMultiParam) }
		
		var attSingleParam = getSingleSelectParam();
		if (attSingleParam) { filterParamArray.push(attSingleParam) }
		
		var sortParam = getSortParam();
		if (sortParam) { filterParamArray.push(sortParam) }
		
		var cartParam = getCartParam();
		if (cartParam) { filterParamArray.push(cartParam) }
		
		var customParam = getCustomParam();
		if (customParam) { filterParamArray.push(customParam) }
		
		var categoryParam = getCategoryParam();
		if (categoryParam) { filterParamArray.push(categoryParam) }

		var productListUrl = $("#searchUrl").val();
		var listQueryParamIndex = productListUrl.indexOf("?");
		if (listQueryParamIndex > 0) {
			productListUrl = productListUrl.substring(0, listQueryParamIndex);
		}

		var newSearchUrl = productListUrl + "?" + filterParamArray.join("&");
		$("#searchUrl").val(newSearchUrl);

		// get new product list
		$.ajax({
			url: newSearchUrl
		}).done(function (result) {
			loader.hide();
			if (result.trim().length > 0) {

				if (result.indexOf('div id="ProductFilterAndList"') >= 0) {
					var tempDom = $("<output>").append($.parseHTML(result));
					var html = $("#ProductFilterAndList", tempDom).html();

					if (html) {
						$("#ProductFilterAndList").html(html);
						
						// filter also loaded
						reloadPriceFilter();
					}
					
				} else {
					$("#ProductList").html(result);
				}
				
				$('[data-toggle="tooltip"]').tooltip({ placement: "top", delay: { "show": 150, "hide": 0 }, trigger: "hover" });
			}
		}).fail(function () {
			loader.hide();
		});

		// get new filter only if requested
		if ($("#filterUrl").length) {
			var filterUrl = $("#filterUrl").val();
			var filterQueryParamIndex = filterUrl.indexOf("?");
			if (filterQueryParamIndex > 0) {
				filterUrl = filterUrl.substring(0, filterQueryParamIndex);
			}

			var newFilterUrl = filterUrl + "?" + filterParamArray.join("&");
			$("#searchUrl").val(newFilterUrl);

			$.ajax({
				url: newFilterUrl
			}).done(function (result) {
				if (result.trim().length > 0) {
					var filterResult = $("<output>").append($.parseHTML(result));
					var html = $("#ProductFilter", filterResult);

					if (html) {
						$("#ProductFilter").html(html.html());
						
						reloadPriceFilter();
					}
				}

			}).fail(function () {
				loader.hide();
			});
		}
	}

	var addToSelected = function (selectElement) {
		var listElement = $("#already-filtered");

		if (selectElement && !selectElement.hasClass("select-sort-option") && listElement) {
			var attrId = selectElement.attr("value");
			var groupId = selectElement.data().groupId;

			if (attrId !== "1") {
				var attrName = selectElement.data().name;
				
				listElement.append('<label class="tag label label-danger label-large label-btn" data-action="deselect-option" data-group-id="' + groupId + '" value="' + attrId + '">' + attrName + "</label>");
			}
		}
	}

	var reloadPriceFilter = function () {
		minPrice = parseFloat($("#minimumPrice").attr("value"));
		maxPrice = parseFloat($("#maximumPrice").attr("value"));
		selMinPrice = parseFloat($("#selectedMinimumPrice").attr("value"));
		selMaxPrice = parseFloat($("#selectedMaximumPrice").attr("value"));
		root = $("#ProductPriceFilter");
		slider = root.find(".price-slider")[0];

		initializePriceSlider();
		arrangeFilters();
		initQuantities();
	}

	// get multi select filters
	// each group generates groupId_attribute_attribute (eg. 1460_12_13_45) and will be added comma separated (eg. 1460_12_13,1234_34)
	var getMultiSelectParam = function () {
		
		var filterGroupArray = [];
		$("[data-filtergroup]").each(function (i, filtergroup) {
			var groupId = $(filtergroup).attr("data-filtergroup");
			if (groupId != "price") {
				var filterParamArray = [];
				$(filtergroup).find('[type="checkbox"]:checked').each(function (i, filterItem) {
					filterParamArray.push($(filterItem).val());
				});

				if (filterParamArray.length > 0) {
					filterParamArray.sort();
					filterParamArray.splice(0, 0, groupId);
					filterGroupArray.push(filterParamArray.join("_"));
				}
			}
		});
		if (filterGroupArray.length > 0) {
			filterGroupArray.sort();
			return "amid=" + filterGroupArray.join(",");
		}
	}

	// get single select filters
	var getSingleSelectParam = function () {
		var filterParamArray = [];
		$(".dropdown-single-select").each(function () {
			var attributeId = $(this).attr("value");
			if (attributeId !== 1 && attributeId !== "1") {
				filterParamArray.push(attributeId);
			}
		});

		if (filterParamArray.length > 0) {
			filterParamArray.sort();
			return "aidl=" + filterParamArray.join(",");
		}
	}

	var getSortParam = function () {
		return "sf=" + $("#sort-value").attr("value");
	}

	var getCartParam = function () {
		var filterCartArray = [];
		$('.product-filter-carttype [type="checkbox"]:checked').each(function (i, filtercart) {
			filterCartArray.push($(filtercart).val());
			});
		if (filterCartArray.length > 0) {
			filterCartArray.sort();
			return "ot=" + filterCartArray.join(",");
		}
	}

	var getCustomParam = function () {
		var custom = $("#CustomSearch").val();
		if (custom.length > 0) {
			return "cu=" + custom;
		}
	}

	var getCategoryParam = function () {
		if ($("#CurrentCategory")) {
			return "scid=" + $("#CurrentCategory").val();
		}
	}

	var getPriceRangeParam = function () {
		var selMin = $("#PriceRangeLower").val();
		var selMax = $("#PriceRangeUpper").val();

		var filterPriceArray = [];
		if (selMin >= minPrice) {
			filterPriceArray.push("pf=" + selMin);
		}
		if (selMax <= maxPrice) {
			filterPriceArray.push("pt=" + selMax);
		}
		if (filterPriceArray.length > 0) {
			return filterPriceArray.join("&");
		}
	}

	initializePriceSlider();
	bindSortingChange();
	bindCartChange();
	bindSingleSelectClick();
	bindMultiSelectClick();
	bindDropdownAutoCloseFunction();
	initQuantities();
	
	$(document).on("click", ".select-option.select-single-option", function () {
		$("#ProductFilter .dropdown-container").removeClass("open");
	});

	$(document).on("click", ".select-option.select-sort-option", function () {
		$("#ProductFilter .dropdown-container").removeClass("open");
	});

	$(document).on("click", "#ProductFilter .dropdown-container .dropdown-button", function () {
			var isOpen = $(this).parent().hasClass("open");
			$("#ProductFilter .dropdown-container").removeClass("open");

			if (!isOpen) {
				$(this).parent().addClass("open");
			}
		})
		.on("change", '#ProductFilter .dropdown-container [type="checkbox"]', function () {
			setFilterQuantity($(this));
		});

	$(document).on("click", '[data-action="deselect-option"]', function () {
		var $this = $(this);

		var groupId = $this.data().groupId;
		var attrId = $this.attr("value");
		var singleSelectElement = $('[value="1"][data-group-id="' + groupId + '"]');
		var multiSelectElement = $('[value="' + attrId + '"][data-group-id="' + groupId + '"][type="checkbox"]');

		if (singleSelectElement.length) {
			singleSelectElement.click();
		}

		if (multiSelectElement.length) {
			multiSelectElement.click();
		}

		$this.remove();
	});

	var arrangeFilters = function () {

		var moveCartFilterBeforePriceFilter = function() {
			$("#ProductFilter .js_product-filter_container-for-filters")
				.prepend($("#ProductFilter .js_product-filter_container-for-cart-filter"));
		};

		if (Landi.Screen.isInXsWidth()) {
			moveCartFilterBeforePriceFilter();
		}
	};

	arrangeFilters();

};

$(document).ready(function () {
	if ($("#ProductFilter").length) {
		Landi.ShopPriceFilter({});
	}

	$('[data-toggle="tooltip"]').tooltip({ placement: "top", delay: { "show": 150, "hide": 0 }, trigger: "hover" });
});;
var Landi = Landi || {};

Landi.GardenPlantProductFilter = function (id) {
	var root = $("#" + id);

	var bindCartChange = function () {
		root.on("change", ".product-filter-carttype", function (event) {
			event.preventDefault();
			refreshProducts();
		});
	}

	var bindSortingChange = function () {
		root.on("click", ".select-sort-option", function (event) {
			var newValue = $(this).attr("value");
			var newText = $(this).text();

			var valueElement = root.find("#sort-value");

			valueElement.attr("value", newValue);
			valueElement.text(newText);

			event.preventDefault();
			refreshProducts();
		});
	}

	var bindSingleSelectClick = function () {
		root.on("click", ".select-option.select-single-option", function (event) {
			var groupId = $(this).data().groupId;
			var attributeName = $(this).data().name;
			var attributeId = $(this).attr("value");

			// set text and currently selected to dropdown
			var singleSelectlabelElement = root.find("#single-select-" + groupId);
			if (singleSelectlabelElement) {
				singleSelectlabelElement.text(attributeName);
				singleSelectlabelElement.attr("value", attributeId);
			}

			// remove single select that are already selected
			var existingElement = root.find('[data-action="deselect-option"][data-group-id="' + groupId + '"][value="' + attributeId + '"]');
			if (existingElement.length) {
				existingElement.remove();
			}

			event.preventDefault();
			refreshProducts();
			addToSelected($(this));
		});
	}

	var bindMultiSelectClick = function () {
		root.on("click", ".select-option.select-multi-option", function (event) {
			var groupId = $(this).data().groupId;
			var attributeId = $(this).attr("value");

			// remove multi select that are already selected
			var existingElement = root.find('[data-action="deselect-option"][data-group-id="' + groupId + '"][value="' + attributeId + '"]');
			if (existingElement.length) {
				existingElement.remove();
			} else {
				addToSelected($(this));
			}

			refreshProducts();
		});
	}

	var bindDropdownAutoCloseFunction = function () {
		// mouse click outside of dropdown to close it
		var mouseIsInside = false;
		root.find("#ProductFilter .dropdown-container").hover(function () { mouseIsInside = true; }, function () { mouseIsInside = false; });

		$("body").mouseup(function () {
			if (!mouseIsInside) {
				root.find("#ProductFilter .dropdown-container").removeClass("open");
			}
		});
	}

	var bindSearchButtonClick = function () {
		root.find('#ProductFilterSearchButton').click(function () {
			refreshProducts();
		});

		root.find('#fulltextSearch').keyup(function (e) {
			if (e.keyCode === 13) {
				refreshProducts();
			}
		});
	}

	var initQuantities = function () {
		root.find('#ProductFilter .dropdown-container [type="checkbox"]').each(function () {
			setFilterQuantity($(this));
		});
	}

	var setFilterQuantity = function (element) {
		var filterGroupId = element.data().groupId;
		var numChecked = root.find('input[type="checkbox"][data-group-id="' + filterGroupId + '"]:checked').length;

		if (numChecked) {
			root.find('[data-filtergroup="' + filterGroupId + '"] .quantity').text(numChecked);
			root.find('[data-filtergroup="' + filterGroupId + '"] .dropdown-quantity').show();
		} else {
			root.find('[data-filtergroup="' + filterGroupId + '"] .dropdown-quantity').hide();
		}
	}

	var refreshProducts = function (target) {
		root.find(".loader").show();

		var filterParamArray = [];

		var attMultiParam = getMultiSelectParam();
		if (attMultiParam) { filterParamArray.push(attMultiParam) }

		var attSingleParam = getSingleSelectParam();
		if (attSingleParam) { filterParamArray.push(attSingleParam) }

		var sortParam = getSortParam();
		if (sortParam) { filterParamArray.push(sortParam) }

		var langParam = getLanguage();
		if (langParam) { filterParamArray.push(langParam) }

		var cartParam = getCartParam();
		if (cartParam) { filterParamArray.push(cartParam) }

		var customParam = getCustomParam();
		if (customParam) { filterParamArray.push(customParam) }

		var categoryParam = getCategoryParam();
		if (categoryParam) { filterParamArray.push(categoryParam) }

		var fulltextSearch = getFulltextParam();
		if (fulltextSearch) { filterParamArray.push(fulltextSearch) }

		var productListUrl = root.find("#searchUrl").val();
		var listQueryParamIndex = productListUrl.indexOf("?");
		if (listQueryParamIndex > 0) {
			productListUrl = productListUrl.substring(0, listQueryParamIndex);
		}

		var newSearchUrl = productListUrl + "?" + filterParamArray.join("&");
		root.find("#searchUrl").val(newSearchUrl);

		// get new product list
		$.ajax({
			url: newSearchUrl
		}).done(function (result) {
			root.find(".loader").hide();
			if (result.trim().length > 0) {

				if (result.indexOf('div id="ProductFilterAndList"') >= 0) {
					if (result) {
						root.find("#ProductFilterAndList").html(result);
					}

				} else {
					root.find("#ProductList").html(result);
				}
				bindSearchButtonClick();
				root.find('[data-toggle="tooltip"]').tooltip({ placement: "top", delay: { "show": 150, "hide": 0 }, trigger: "hover" });
			}
		}).fail(function () {
			root.find(".loader").hide();
		});

		// get new filter only if requested
		if (root.find("#filterUrl").length) {
			var filterUrl = root.find("#filterUrl").val();
			var filterQueryParamIndex = filterUrl.indexOf("?");
			if (filterQueryParamIndex > 0) {
				filterUrl = filterUrl.substring(0, filterQueryParamIndex);
			}

			var newFilterUrl = filterUrl + "?" + filterParamArray.join("&");
			root.find("#searchUrl").val(newFilterUrl);

			$.ajax({
				url: newFilterUrl
			}).done(function (result) {
				if (result.trim().length > 0) {
					var filterResult = $("<output>").append($.parseHTML(result));
					var html = root.find("#ProductFilter", filterResult);

					if (html) {
						root.find("#ProductFilter").html(html.html());
					}
				}

			}).fail(function () {
				root.find(".loader").hide();
			});
		}
	}

	var addToSelected = function (selectElement) {
		var listElement = $(this).attr('data-type') !== 'category' ? root.find("#already-filtered") : root.find("#already-filtered-category");

		if (selectElement && !selectElement.hasClass("select-sort-option") && listElement) {
			var attrId = selectElement.attr("value");
			var groupId = selectElement.data().groupId;

			if (attrId !== "1") {
				var attrName = selectElement.data().name;

				listElement.append('<label class="tag label label-danger label-large label-btn" data-action="deselect-option" data-group-id="' + groupId + '" value="' + attrId + '">' + attrName + "</label>");
			}
		}
	}

	// get multi select filters
	// each group generates groupId_attribute_attribute (eg. 1460_12_13_45) and will be added comma separated (eg. 1460_12_13,1234_34)
	var getMultiSelectParam = function () {

		var filterGroupArray = [];
		root.find("[data-filtergroup]").each(function (i, filtergroup) {
			var groupId = $(filtergroup).attr("data-filtergroup");
			if (groupId != "price") {
				var filterParamArray = [];
				$(filtergroup).find('[type="checkbox"]:checked').each(function (i, filterItem) {
					filterParamArray.push($(filterItem).val());
				});

				if (filterParamArray.length > 0) {
					filterParamArray.sort();
					filterParamArray.splice(0, 0, groupId);
					filterGroupArray.push(filterParamArray.join("_"));
				}
			}
		});
		if (filterGroupArray.length > 0) {
			filterGroupArray.sort();
			return "amid=" + filterGroupArray.join(",");
		}
	}

	// get single select filters
	var getSingleSelectParam = function () {
		var filterParamArray = [];
		root.find(".dropdown-single-select").each(function () {
			var attributeId = $(this).attr("value");
			if (attributeId !== 1 && attributeId !== "1") {
				filterParamArray.push(attributeId);
			}
		});

		if (filterParamArray.length > 0) {
			filterParamArray.sort();
			return "aidl=" + filterParamArray.join(",");
		}
	}

	var getSortParam = function () {
		return "sf=" + root.find("#sort-value").attr("value");
	}

	var getLanguage = function () {
		return "lang=" + root.find("#CurrentLng").attr("value");
	}

	var getCartParam = function () {
		var filterCartArray = [];
		root.find('.product-filter-carttype [type="checkbox"]:checked').each(function (i, filtercart) {
			filterCartArray.push($(filtercart).val());
		});
		if (filterCartArray.length > 0) {
			filterCartArray.sort();
			return "ot=" + filterCartArray.join(",");
		}
	}

	var getCustomParam = function () {
		var custom = root.find("#CustomSearch").val();
		if (custom.length > 0) {
			return "cu=" + custom;
		}
	}

	var getCategoryParam = function () {
		var cagegories = root.find('#categoryFilterDropdown [type="checkbox"]:checked');
		var categoryId = $(cagegories[cagegories.length - 1]).val();

		if (categoryId) {
			return "scid=" + categoryId;
		}
		if (root.find("#CurrentCategory")) {
			return "scid=" + root.find("#CurrentCategory").val();
		}
	}

	var getFulltextParam = function () {
		if (root.find("#fulltextSearch")) {
			return "fts=" + root.find("#fulltextSearch").val();
		}
	}



	bindSortingChange();
	bindCartChange();
	bindSingleSelectClick();
	bindMultiSelectClick();
	bindDropdownAutoCloseFunction();
	bindSearchButtonClick();
	initQuantities();

	root.on("click", ".select-option.select-single-option", function () {
		root.find("#ProductFilter .dropdown-container").toggleClass("open");
	});

	root.on("click", ".select-option.select-sort-option", function () {
		root.find("#ProductFilter .dropdown-container").toggleClass("open");
	});

	root.on("click", "#ProductFilter .dropdown-container .dropdown-button", function () {
		var isOpen = $(this).parent().hasClass("open");
		root.find("#ProductFilter .dropdown-container").removeClass("open");

		if (!isOpen) {
			$(this).parent().addClass("open");
		}
	})
		.on("change", '#ProductFilter .dropdown-container [type="checkbox"]', function () {
			setFilterQuantity($(this));
		});

	root.on("click", '[data-action="deselect-option"]', function () {
		var $this = $(this);

		if ($this.attr('data-type') !== 'category') {
			var groupId = $this.data().groupId;
			var attrId = $this.attr("value");
			var singleSelectElement = root.find('[value="1"][data-group-id="' + groupId + '"]');
			var multiSelectElement = root.find('[value="' + attrId + '"][data-group-id="' + groupId + '"][type="checkbox"]');

			if (singleSelectElement.length) {
				singleSelectElement.click();
			}

			if (multiSelectElement.length) {
				multiSelectElement.click();
			}
		}
		else {
			root.find('#categoryFilterDropdown [type="checkbox"]').click();
		}

		$this.remove();
	});

	var arrangeFilters = function () {

		var moveCartFilterBeforePriceFilter = function () {
			root.find("#ProductFilter .js_product-filter_container-for-filters")
				.prepend(root.find("#ProductFilter .js_product-filter_container-for-cart-filter"));
		};

		if (Landi.Screen.isInXsWidth()) {
			moveCartFilterBeforePriceFilter();
		}
	};

	arrangeFilters();

};;
var Landi = Landi || {};

(function ($) {
	Landi.GartenplanerProductsLoadMore = function (container, searchUrl) {
		var loader = $("#productLoader");
		loader.show();
		
		$.ajax({
			url: searchUrl
		}).done(function (result) {
			loader.hide();
			if (result.trim().length > 0) {
				var containerListings = $("#ProductList");
				containerListings.append(result);
			}
		}).fail(function () {
			loader.hide();
		});
		$(container).attr("loaded", true);
	};

	Landi.GartenplanerProductsloadMoreButtonClick = function () {
		var searchUrl = $('.load-more-url:last').val();

		var container = $('#ProductList .product-listing:last .loader-container');
		Landi.GartenplanerProductsLoadMore(container, searchUrl);
	};
})(jQuery);;
/// <reference path="Landi.MyLandi.js" />

// this code was copied and slightly changed from 
// https://places.post.ch/ria?containerId=standorteAppContainer&apiKey=ffe6dfbb-96bf-49c8-84b3-7a7eee8d6ebe&lang=de
// this is needed to correctly load stao in a modal view
var Stao;
(function (Stao) {
})(Stao || (Stao = {}));

function loadRiaFrameworks() {
	loadScript('https://places.post.ch/bundles/RIAFrameworks?v=Ku9z--gp8-jFtGp4N5iC8BCqpguQOgEc860gmdpfkMo1', loadRia);
}

function loadRia() {
	loadScript('https://places.post.ch/bundles/RIA?v=2VrMKwOyQpgu8tKxYXSnK4mBwWVPKbtExfAkzJdoTrw1', initRia);
}

function initRia() {
	PickPostReady();
	Stao.App.init('#standorteAppContainer', 'ffe6dfbb-96bf-49c8-84b3-7a7eee8d6ebe', 'https://places.post.ch/', 'https://places.post.ch/Public/Configuration/ConfigurationEndpointConfiguration', 'de');
}

function loadScript(url, callback) {
	var head = document.getElementsByTagName('head')[0];
	var script = document.createElement('script');
	script.type = 'text/javascript';
	script.src = url;
	if (script.readyState) { // IE, incl. IE9
		script.onreadystatechange = function () {
			if (script.readyState == 'loaded' || script.readyState == 'complete') {
				script.onreadystatechange = null;
				callback();
			}
		};
	} else {
		script.onload = function () { // Other browsers
			callback();
		};
	}
	head.appendChild(script);
}

function PickPostReady() {
	var pickpostLink = $('[data-action="modal-pickpost"]');
	var zip = pickpostLink.attr('pickpostZip');
	
	// Die Funktion "ready" wird ausgeführt, sobald die Applikation Standortsuche vollständig geladen wurde
	Stao.ready = function () {
		var config = Stao.Api.configuration.getConfiguration();
		config.SelectAddressEnabled = true;

		if (zip) {
			config.PreselectText = zip;
		}

		// Die Konfiguration wird überschrieben/angepasst, um die Funktionalität "Standort übernehmen" zu aktivieren.
		Stao.Api.configuration.setConfiguration(config);
		// Ein Listener für das Event "addressSelected" wird hinzugefügt.
		Stao.Api.events.addListener("addressSelected", HandleAddressSelectedEvent);
	};
}

function HandleAddressSelectedEvent(address) {
	var streetArr = address.Street.split(' ');
	var streetnumber = '';
	var streetName = '';

	if (streetArr.length >= 2 && !isNaN(parseInt(streetArr[streetArr.length - 1][0], 10))) {
		// format: Am Hauseggen 15 OR Hauseggen 15 OR Hauseggen 15a
		streetnumber = streetArr[streetArr.length - 1];
		streetName = streetArr.splice(0, streetArr.length - 1).join(' ');
	} else if (streetArr.length >= 1) {
		// format: Am Hauseggen or Hauseggen
		streetName = streetArr.splice(0, streetArr.length).join(' ');
	}
 
	var pickupPoint = address.AddressTypeName + '|' + streetName + '|' + streetnumber + '|' + address.Zip + '|' + address.City;
 
	SetPickupPointId(pickupPoint, true);
 
	// close Modal view
	javascript: $('#checkout-confirm-shipping-pickpost-modal').modal('toggle');
}

///-----------------------------------------------------------------
/// pickupPoint FORMAT: {pickuppointtype}|{street}|{streetno}|{zip}|{city}
///-----------------------------------------------------------------
function SetPickupPointId(pickupPoint, reload) {
	// upon selection we set the pickpost radio button as selected
	$('#address-pickpost').prop('checked',true);

	// set pickup point
	$.ajax({
		url: getApiBaseUrl() + "/standort/pickpost",
		data: JSON.stringify(pickupPoint),
		contentType: "application/json; charset=utf-8",
		type: "POST"
	})
	.done(function (result) {
		if (reload) {
			location.reload(true);
		}
	})
	.fail(function(result) {
		console.log(result);
	});
}

//$('#address-pickpost').change(function (event) {
//	var selected = this.checked;
//	var idSelector = $('#selectedPickupPoint');

//	if (selected && idSelector.length) {
//		SetPickupPointId($('#selectedPickupPoint').val());
//	}

//	if (!idSelector.length) {
//		OpenPickPostModal();
//	}
//});

$('#checkout-confirm-shipping-pickpost-modal').on('hidden.bs.modal', function () {
	var idSelector = $('#selectedPickupPoint');
	if (!idSelector.length) {

		// set address to random
		var selector = $('input[type=radio][name=SelectedAddressId_shipping]').first();
		selector.prop('checked', true);
		selector.trigger('change');
	}
});;
// These functions run on the FAQ / Customerservice-Contatct Form page. They get the specific contact form and send the form data.

// gRecaptcha 2 Callback
var grecaptchaFaq = function () {
	if (Landi.Forms.Grecaptcha.ValidatesOk()) {
		Landi.CustomerService.GeneralCustomerRequestForm.SubmitButton.Enable();
		Landi.CustomerService.MowingMachineRequestForm.SubmitButton.Enable();
	} else {
		Landi.CustomerService.GeneralCustomerRequestForm.SubmitButton.Disable();
		Landi.CustomerService.MowingMachineRequestForm.SubmitButton.Disable();
	}
};

(function (CustomerService) {
	(function (GeneralCustomerRequestForm) {

		(function (SubmitButton) {

			SubmitButton.Enable = function () {
				$("[data-action='general-customer-request-form-submission']").prop("disabled", false);
			};

			SubmitButton.Disable = function () {
				$("[data-action='general-customer-request-form-submission']").prop("disabled", true);
			};

		}(GeneralCustomerRequestForm.SubmitButton = GeneralCustomerRequestForm.SubmitButton || {}));

		GeneralCustomerRequestForm.Submit = function (event) {
			event.preventDefault();
			
			// validation
			var form = $("#general-customer-request-form");

			var formOk = form.valid();
			var captchaOK = true;
			if (typeof grecaptcha !== 'undefined') {
				captchaOK = grecaptcha.ValidatesOk();
			}

			if (!formOk || !captchaOK) {
				Landi.Forms.SubmitButton.IndicateSend($(form).find("[type='submit']"));
				return;
			}

			form = form[0];
			
			// run the async call
			$.ajax({
				url: "/mvc/service/generalrequestform",
				data: new FormData(form),
				processData: false, // do not process data
				contentType: false, // do not force content type
				type: "POST"
			})
			.done(function (result) {
				Landi.CustomerService.ResponseAlert.Show(result, $(form).parent().parent(), $(form));
			})
			.fail(function (result) {
				Landi.CustomerService.ResponseAlert.Show(result, $(form).parent().parent(), $(form));
			});
		};

	}(CustomerService.GeneralCustomerRequestForm = CustomerService.GeneralCustomerRequestForm || {}));

	(function (ProductReturnForm) {

		ProductReturnForm.Submit = function (event) {
			event.preventDefault();
			
			// ensure the form fields are valid
			var form = $("form[data-form='product-return']");

			// disable button
			Landi.Forms.SubmitButton.Disable(form.find("[type = 'submit']"));

			if (!form.valid()) {
				Landi.Forms.SubmitButton.IndicateSend($(form).find("[type='submit']"));
				return;
			}

			form = form[0];
			
			// run the async call
			$.ajax({
				url: "/mvc/service/productreturn",
				data: new FormData(form),
				processData: false, // do not process data
				contentType: false, // do not force content type
				type: "POST"
			})
			.done(function (result) {
				Landi.CustomerService.ResponseAlert.Show(result, $(form).parent().parent(), $(form));
			})
			.fail(function (result) {
				Landi.CustomerService.ResponseAlert.Show(result, $(form).parent().parent(), $(form));
			});
		};

	}(CustomerService.ProductReturnForm = CustomerService.ProductReturnForm || {}));

	(function(responseAlert) {
		
		responseAlert.Show = function(response, successContainer, elseContainer) {
			var responseType = $(response).data("responsetype");
			switch (responseType) {
				case "Success":
					successContainer.children().remove();
					successContainer.append(response);
					break;
				default:
					elseContainer.find("div[data-responsetype]").remove();
					elseContainer.append(response);
					Landi.Forms.SubmitButton.IndicateSend(elseContainer.find("[type='submit']"));
					break;
			}
		}

	}(CustomerService.ResponseAlert = CustomerService.ResponseAlert || {}));

	(function (newsletter) {
		// PRIVATE STUFF
		var submitSignupForm = function (event, button) {
			event.preventDefault();

			var form = $(button).closest('[data-form="newslettersignup"]');

			$.ajax({
				url: "/mvc/newsletter/signup",
				data: form.serialize(),
				type: "POST"
			})
				.done(function (result) {
					Landi.showToaster(result);
				})
				.fail(function (result) {
					Landi.showToaster(result);
				});
		};

		// PUBLIC STUFF
		newsletter.submitSignupForm = function (event, button) { return submitSignupForm(event, button) };

	})(CustomerService.Newsletter = CustomerService.Newsletter || {});

	(function (MowingMachineRequestForm) {

		(function (SubmitButton) {

			SubmitButton.Enable = function () {
				$("[data-action='general-customer-request-form-submission']").prop("disabled", false);
			};

			SubmitButton.Disable = function () {
				$("[data-action='general-customer-request-form-submission']").prop("disabled", true);
			};

		}(MowingMachineRequestForm.SubmitButton = MowingMachineRequestForm.SubmitButton || {}));

		MowingMachineRequestForm.Submit = function (event) {
			event.preventDefault();

			// validation
			var form = $("#mowing-machine-request-form");
			var formOk = form.valid();
			var captchaOK = true;
			if (typeof grecaptcha !== 'undefined') {
				captchaOK = grecaptcha.ValidatesOk();
			}

			if (!formOk || !captchaOK) {
				Landi.Forms.SubmitButton.IndicateSend($(form).find("[type='submit']"));
				return;
			}

			form = form[0];

			// run the async call
			$.ajax({
				url: "/mvc/service/mowingmachinerequestform",
				data: new FormData(form),
				processData: false, // do not process data
				contentType: false, // do not force content type
				type: "POST"
			})
				.done(function (result) {
					Landi.CustomerService.ResponseAlert.Show(result, $(form).parent().parent(), $(form));
				})
				.fail(function (result) {
					Landi.CustomerService.ResponseAlert.Show(result, $(form).parent().parent(), $(form));
				});
		};

	}(CustomerService.MowingMachineRequestForm = CustomerService.MowingMachineRequestForm || {}));

}(Landi.CustomerService = Landi.CustomerService || {}));


// assign event handlers
(function($) {

	// submitting the customer service form
	$("html").on("click", "#general-customer-request-submit", function (event) {
		Landi.CustomerService.GeneralCustomerRequestForm.Submit(event);
	});

	// submitting the customer service form
	$("html").on("click", "#product-return-request-submit", function (event) {
		Landi.CustomerService.ProductReturnForm.Submit(event);
	});

	$('html').on('click', '[data-action="newslettersubscribe"]', function (event) {
		Landi.CustomerService.Newsletter.submitSignupForm(event, this);
	});

	$("html").on("click", "#mowing-machine-request-submit", function (event) {
		Landi.CustomerService.MowingMachineRequestForm.Submit(event);
	});
})(jQuery);

;
var Landi = Landi || {};

Landi.GiftCard = function () {
	var errorMessageContainer = $('#giftCardMessageContainer .alert-danger');
	var paymentMethodPOS = 'POS';

	function showErrorMessage(message) {
		errorMessageContainer.text(message).show();
	}

	function getSelectedPaymentMethod() {
		return $('input[name="SelectedPaymentMethod"]:checked').val();
	}

	function isPaymentMethodPOS() {
		return getSelectedPaymentMethod() == paymentMethodPOS;
	}

	function checkPaymentType() {
		if (!isPaymentMethodPOS()) {
			$('#giftCardContainer').removeClass('disabled');
		}
		else {
			$('#giftCardContainer').addClass('disabled');
		}
	}

	function checkFirstPaymentTypeIfNoneIsSelected() {
		if ($('input[name="SelectedPaymentMethod"]:checked').length === 0) {
			$('input[name="SelectedPaymentMethod"]:first').prop("checked", true);
		}
	}

	$('li[data-name="paymentprodider-POS"]').on('click', function (event) {
		var hasGiftCards = $('#giftCardList > li').length > 0;

		if (hasGiftCards) {
			removeAllGiftCards(2);
		}
	});

	function removeAllGiftCards(shopType) {
		$.ajax({
			url: getApiBaseUrl() + "/giftcard/cancelall/" + shopType,
			method: "DELETE",
			dataType: "json",
			success: function (result) {
				if (result.Success) {
					reloadPage();
				} else {
					showErrorMessage(result.ErrorMessage);
				}
			},
			error: function (error) {
				showErrorMessage(error.ErrorMessage);
			}
		});
	}

	function setSubmitButtonLoading(submitButtonObj, isLoading) {
		var data = submitButtonObj.data();

		if (isLoading) {
			submitButtonObj.text(data.labelLoading);
			submitButtonObj.prop('disabled', true);
		} else {
			submitButtonObj.text(data.label);
			submitButtonObj.prop('disabled', false);
		}
	}

	function reloadPage() {
		window.location.search = '?SelectedPaymentMethod=' + getSelectedPaymentMethod();
	}

	$('#giftCardInputNumberSubmit').on('click', function (event) {
		event.preventDefault();

		var submitButton = $(this);
		setSubmitButtonLoading(submitButton, true);

		$('#giftCardMessageContainer .alert-danger').hide();

		var giftCardNr = $('#giftCardInputNumber').val();
		var data = $(this).data();
		if (giftCardNr.trim().length > 0) {
			$.ajax({
				url: getApiBaseUrl() + "/giftcard/add/" + giftCardNr + "/" + data.shopType,
				method: "PUT",
				dataType: "json",
				success: function (result) {
					setSubmitButtonLoading(submitButton, false);

					if (result.Success) {
						reloadPage();
					} else {
						showErrorMessage(result.ErrorMessage);
						if (result.GiftCardTooManyFailedTries === true) {
							$("#giftCardInput").hide();
						}
					}
				},
				error: function (error) {
					setSubmitButtonLoading(submitButton, false);
					showErrorMessage(error.ErrorMessage);
					if (error.GiftCardTooManyFailedTries === true) {
						$("#giftCardInput").hide();
					}
				}
			});
		}
	});

	$('input[name="SelectedPaymentMethod"]').change(function () {
		checkPaymentType();
	});

	$("html").on("click", "[data-action=remove-giftcard]", function () {
		var data = $(this).data();
		$.ajax({
			url: getApiBaseUrl() + "/giftcard/cancel/" + data.giftCardId + "/" + data.shopType,
			method: "DELETE",
			dataType: "json",
			success: function (result) {
				if (result.Success) {
					reloadPage();
				} else {
					showErrorMessage(result.ErrorMessage);
				}
			},
			error: function (error) {
				showErrorMessage(error.ErrorMessage);
			}
		});
	});

	checkFirstPaymentTypeIfNoneIsSelected();
	checkPaymentType();
};

jQuery(document).ready(function ($) {
	Landi.GiftCard();
});
;
$(document).ready(function () {

	// *************************************************************
	// EPOQ Search item clicked feedback
	// *************************************************************

	$(document).on('click', '.product-link', function () {
		var qidInput = $(this).closest('[data-qid]');
		if (qidInput.length) {
			var qid = qidInput.data().qid;
			var productCode = $(this).data().productcode;

			searchedProductClicked(qid, productCode);
		}
	});

	$(document).on('click', 'div.search-results div.product-action > button', function () {
		var qidInput = $(this).closest('[data-qid]');
		if (qidInput.length) {
			var qid = qidInput.data().qid;
			var productWrap = $(this).closest('div.product-item-wrap');

			if (productWrap.length) {
				var productLink = productWrap.find('a.product-link');

				if (productLink.length) {
					var productCode = productLink.data().productcode;
					searchedProductClicked(qid, productCode);
				}
			}
		}
	});

	function searchedProductClicked(qid, productCode) {
		if (productCode && qid && epoq_tenantId) {
			$.ajax({
				async: false, // want a sync call and continue with click after returning
				url: getApiBaseUrl() + "/search/searchedproductclicked/" + productCode + "/" + qid,
				type: "POST"
			}).always(function (result) {
				// nothing to do
			});
		}
	}
});;
(function ($) {

	$('.equal-height-container').each(function(e) {
		var maxHeight = 0;
		var $elements = $(this).find('.equal-height');
		$elements.each(function() {
			if ($(this).height() > maxHeight) {
				maxHeight = $(this).height();
			}
		});

		$elements.height(maxHeight);
	});

})(jQuery);;
var Landi = Landi || {};

(function ($) {
	var cssClassCollapsedHeader = "header-collapsed";
	var getCurrentScrollPosition = function () {
		var goodBrowsersPosition = $("html").scrollTop();
		var ieAndEdgePosition = $("body").scrollTop();
		var larger = Math.max(goodBrowsersPosition, ieAndEdgePosition);
		return larger;
	};
	var isAtTop = function () {
		return getCurrentScrollPosition() === 0;
	};
	var $container = $("#PageContentContainer");
	var headerIsCollapsed = function() {
		return $container.hasClass(cssClassCollapsedHeader);
	};
	var setHeaderState = function() {
		if (isAtTop() && headerIsCollapsed()) {
			$container.removeClass(cssClassCollapsedHeader);
		} else if (!isAtTop() && !headerIsCollapsed()) {
			$container.addClass(cssClassCollapsedHeader);
		}
	};

	if (Landi.throttle) {
		$(window).scroll(Landi.throttle(setHeaderState, 200));
	}

	$(document).ready(setHeaderState());

})(jQuery);;
var Landi = Landi || {};
var $ = $ || {};

(function(that) {
	function getCurrentScrollPosition() {
		var goodBrowsersPosition = $("html").scrollTop();
		var ieAndEdgePosition = $("body").scrollTop();
		var larger = Math.max(goodBrowsersPosition, ieAndEdgePosition);
		return larger;
	}

	function isAtTop() {
		return getCurrentScrollPosition() === 0;
	}

	that.getCurrentScrollPosition = getCurrentScrollPosition;
	that.isAtTop = isAtTop;

})(Landi.ScrollingHelp = {});

(function(that) {
	function executeScrollToTop() {
		document.body.scrollTop = 0; // For Safari
		document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
	}

	function bindTrigger() {
		$("[data-scrolltotop='trigger']").on("click", executeScrollToTop);
	}

	function toggleButtonVisibility() {
		var $button = $("[data-scrolltotop='trigger']");
		if (Landi.ScrollingHelp.isAtTop()) {
			if ($button.css("display") !== "none") {
				$button.css("display", "none");
			}

		} else {
			if ($button.css("display") !== "block") {
				$button.css("display", "block");
			}
		}
	}

	function bindButtonVisibility() {
		if (Landi.throttle) {
			$(window).scroll(Landi.throttle(toggleButtonVisibility, 200));
		}
	}

	function init() {
		bindTrigger();
		bindButtonVisibility();
	}

	that.init = init;

})(Landi.ScrollToTop = {});



$(document).ready(function () {
	Landi.ScrollToTop.init();
});;
var Landi = Landi || {};

Landi.ProductTeaserBy = {};
(function($, that) {

	function getAllProductTeaserBysOnPage() {
		return $("[landi-productteaserby--container]");
	}

	function initProductTeaserBy() {
		// Elements
		var $theProductTeaserBy = $(this);
		var $allElements = null;
		var $button = $theProductTeaserBy.find("[landi-productteaserby--loadmoretrigger]");

		// State
		var allProductIdsString = $theProductTeaserBy.find("[landi-productteaserby--product-ids]").attr("landi-productteaserby--product-ids");
		var allProductIds = allProductIdsString ? allProductIdsString.split(",") : [];
		var allElementsCount = allProductIds.length;
		var currentlyVisibleElementsCount = 0;

		var countOfElementsPerRow = 1;

		function calculateNumberOfElementsPerRow() {
			if ($theProductTeaserBy.find("[landi-productteaserby--numberofproductsperrow]").attr("landi-productteaserby--numberofproductsperrow")) {
				countOfElementsPerRow = $theProductTeaserBy.find("[landi-productteaserby--numberofproductsperrow]").attr("landi-productteaserby--numberofproductsperrow");
				return;
            }
			var containerWidth = $theProductTeaserBy.outerWidth();
			var minWidthProductItem = 240;
			for (var i = 4; i > 1; i--) {
				if (containerWidth >= i * minWidthProductItem) {
					countOfElementsPerRow = i;
					return;
				}
			}
			countOfElementsPerRow = 1;
		}

		/**
			Anzahl Produkte pro Zeile muss abhängig sein von Breite, welche dem Teaser tatsächlich zur Verfügung steht.
			Nicht von einer Media Query. (z.B. Layout mit oder ohne Spalte unterschiedlich).
			Ein Produkt sollte in einer Breite von min. 240px dargestellt werden. Dies entspricht aktuell der Darstellung auf einer Kategorie-Seite auf Desktop.
			Bei einer Breite des Containers von mind. 960px, werden 4 Produkte in einer Zeile dargestellt. (240*4 = 960)
			... 720px ... 3 Produkte ...
			... 480px ... 2 Produkte ...
			Darunter wird nur noch ein Produkt pro Zeile angezeigt.
			Class set via jQuery.
		*/
		function setProductItemWidth() {
			// Update state.
			calculateNumberOfElementsPerRow();
			findAllProductItems();

			var newProductItemWidth = 100 / countOfElementsPerRow + "%";
			$allElements.css("width", newProductItemWidth);
			$button.css("width", newProductItemWidth);
		}

		function findAllProductItems() {
			$allElements = $theProductTeaserBy.find("[landi-productteaserby--element]");
		}

		function insertProductItems(html) {
			$theProductTeaserBy.find("[landi-productteaserby--product-ids]").append(html);
		}

		function showNextSetOfElements() {
			// Update state.
			calculateNumberOfElementsPerRow();

			var countOfInvisibleElements = allElementsCount - currentlyVisibleElementsCount;
			var overflowDueToWindowResizing = currentlyVisibleElementsCount % countOfElementsPerRow;
			var countOfElementsToShowNext = Math.min(countOfInvisibleElements, countOfElementsPerRow) - overflowDueToWindowResizing;
			var productIdsToShow = allProductIds.slice(currentlyVisibleElementsCount, currentlyVisibleElementsCount + countOfElementsToShowNext);

			$.ajax({
				url: getApiBaseUrl() + "/catalog/productteaserby/" + productIdsToShow.join("-"),
				method: "GET",
				success: function(result) {
					insertProductItems(result);
					setProductItemWidth();
					currentlyVisibleElementsCount += countOfElementsToShowNext;
					// Hide button, if no more products.
					if (currentlyVisibleElementsCount === allElementsCount) {
						$button.css("display", "none");
					}
					landicomponents.ProductOverviewOrderabilityAvailabilityWidgetBuilder.mount($theProductTeaserBy.find("[landi-productteaserby--product-ids]")[0]);
				},
				error: function(error) {
				}
			});
		}

		function bindLoadMoreButtonClick() {
			$button.on("click", showNextSetOfElements);
		}

		function bindWindowResize() {
			if (Landi.throttle) {
				$(window).resize(Landi.throttle(setProductItemWidth, 200));
			}
		}

		bindLoadMoreButtonClick();
		bindWindowResize();
		setProductItemWidth();
		showNextSetOfElements();
	}

	function initAllProductTeaserBys() {
		var $allPTBs = getAllProductTeaserBysOnPage();
		$allPTBs.each(initProductTeaserBy);
	}

	function init() {
		jQuery(document).ready(function () {
			initAllProductTeaserBys();
		});
	}

	init();

})(jQuery, Landi.ProductTeaserBy);;
var Landi = Landi || {};

Landi.CheckoutPayment = function () {
	
	$('#sel_1').change(function (e, val) {
		var selectedSaturdayDelivery = $('#sel_1').prop('checked');
		showCorrectDeliveryWindows(selectedSaturdayDelivery);
	})

	var initDeliveryWindows = function (selectedSaturdayDelivery) {
		var deliverywindowSaturdayJson = document.getElementById(selectedSaturdayDelivery ? 'deliverwindow-saturdays-json' : 'deliverwindow-json');
		if (deliverywindowSaturdayJson) {
			var deliverywindowData = JSON.parse(deliverywindowSaturdayJson?.textContent ?? '');
			const deliveryWindowComponent = landicomponents.DeliveryWindowSelectorBuilder.mount(document.getElementById(selectedSaturdayDelivery ? 'my-delivery-window-saturday' : 'my-delivery-window'), { data: deliverywindowData });
			deliveryWindowComponent.$on('selected', function (value) {
				$('#selected-delivery-window').val(value);
			});
		}
	}

	var selectFirstDeliveryWindow = function (showSaturdayDeliveryWindows) {
		var deliverywindowSaturdayJson = document.getElementById('deliverwindow-saturdays-json');
		var deliveryWeekDays = document.getElementById('deliverwindow-json');

		var deliveryWindows = showSaturdayDeliveryWindows ? deliverywindowSaturdayJson : deliveryWeekDays;
		if (deliveryWindows) {
			var deliverywindowData = JSON.parse(deliveryWindows?.textContent ?? '');
			// select first delivery window
			$('#selected-delivery-window').val(deliverywindowData[0].date);
		}
    }

	var showCorrectDeliveryWindows = function (showSaturdayDeliveryWindows) {
		var dw = $('#my-delivery-window-wrapper')
		var dwSaturday = $('#my-delivery-window-saturday-wrapper')
		if (showSaturdayDeliveryWindows) {
			dw.hide();
			dwSaturday.show();
			selectFirstDeliveryWindow(true);
		}
		else {
			dw.show();
			dwSaturday.hide();
			selectFirstDeliveryWindow(false);
        }
	}

	initDeliveryWindows(false);
	initDeliveryWindows(true);

	var selectedSaturdayDelivery = $('#sel_1').prop('checked');
	showCorrectDeliveryWindows(selectedSaturdayDelivery);
	selectFirstDeliveryWindow(selectedSaturdayDelivery);
};

jQuery(document).ready(function ($) {
	Landi.CheckoutPayment();
});
;
(window["webpackJsonplandicomponents"]=window["webpackJsonplandicomponents"]||[]).push([["chunk-vendors"],{"0363":function(e,t,n){var r,i,o;(function(n){if("undefined"!==typeof window){var a=0,s=!1,u=!1,c="message",l=c.length,f="[iFrameSizer]",d=f.length,p=null,h=window.requestAnimationFrame,v={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},m={},g=null,y={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){A("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},b={};window.jQuery&&Z(window.jQuery),i=[],r=K,o="function"===typeof r?r.apply(t,i):r,o===n||(e.exports=o),window.iFrameResize=window.iFrameResize||K()}function w(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function _(e,t,n){e.addEventListener(t,n,!1)}function O(e,t,n){e.removeEventListener(t,n,!1)}function C(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!h;e+=1)h=window[t[e]+"RequestAnimationFrame"];h?h=h.bind(window):S("setup","RequestAnimationFrame not supported")}function x(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}function j(e){return f+"["+x(e)+"]"}function T(e){return m[e]?m[e].log:s}function S(e,t){M("log",e,t,T(e))}function k(e,t){M("info",e,t,T(e))}function A(e,t){M("warn",e,t,!0)}function M(e,t,n,r){!0===r&&"object"===typeof window.console&&console[e](j(t),n)}function E(e){function t(){function e(){L(X),N(Q),E("onResized",X)}o("Height"),o("Width"),U(e,X,"init")}function n(){var e=V.substr(d).split(":"),t=e[1]?parseInt(e[1],10):0,n=m[e[0]]&&m[e[0]].iframe,o=getComputedStyle(n);return{iframe:n,id:e[0],height:t+r(o)+i(o),width:e[2],type:e[3]}}function r(e){if("border-box"!==e.boxSizing)return 0;var t=e.paddingTop?parseInt(e.paddingTop,10):0,n=e.paddingBottom?parseInt(e.paddingBottom,10):0;return t+n}function i(e){if("border-box"!==e.boxSizing)return 0;var t=e.borderTopWidth?parseInt(e.borderTopWidth,10):0,n=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return t+n}function o(e){var t=Number(m[Q]["max"+e]),n=Number(m[Q]["min"+e]),r=e.toLowerCase(),i=Number(X[r]);S(Q,"Checking "+r+" is in range "+n+"-"+t),i<n&&(i=n,S(Q,"Set "+r+" to min value")),i>t&&(i=t,S(Q,"Set "+r+" to max value")),X[r]=""+i}function a(){function t(){function e(){var e=0,t=!1;for(S(Q,"Checking connection is from allowed list of origins: "+r);e<r.length;e++)if(r[e]===n){t=!0;break}return t}function t(){var e=m[Q]&&m[Q].remoteHost;return S(Q,"Checking connection is from: "+e),n===e}return r.constructor===Array?e():t()}var n=e.origin,r=m[Q]&&m[Q].checkOrigin;if(r&&""+n!=="null"&&!t())throw new Error("Unexpected message received from: "+n+" for "+X.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}function s(){return f===(""+V).substr(0,d)&&V.substr(d).split(":")[0]in m}function u(){var e=X.type in{true:1,false:1,undefined:1};return e&&S(Q,"Ignoring init message from meta parent page"),e}function c(e){return V.substr(V.indexOf(":")+l+e)}function h(e){S(Q,"onMessage passed: {iframe: "+X.iframe.id+", message: "+e+"}"),E("onMessage",{iframe:X.iframe,message:JSON.parse(e)}),S(Q,"--")}function v(){var e=document.body.getBoundingClientRect(),t=X.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function g(e,t){function n(){z("Send Page Info","pageInfo:"+v(),e,t)}Y(n,32,t)}function y(){function e(e,n){function i(){m[r]?g(m[r].iframe,r):t()}["scroll","resize"].forEach((function(t){S(r,e+t+" listener for sendPageInfo"),n(window,t,i)}))}function t(){e("Remove ",O)}function n(){e("Add ",_)}var r=Q;n(),m[r]&&(m[r].stopPageInfo=t)}function b(){m[Q]&&m[Q].stopPageInfo&&(m[Q].stopPageInfo(),delete m[Q].stopPageInfo)}function w(){var e=!0;return null===X.iframe&&(A(Q,"IFrame ("+X.id+") not found"),e=!1),e}function C(e){var t=e.getBoundingClientRect();return $(Q),{x:Math.floor(Number(t.left)+Number(p.x)),y:Math.floor(Number(t.top)+Number(p.y))}}function x(e){function t(){p=o,j(),S(Q,"--")}function n(){return{x:Number(X.width)+i.x,y:Number(X.height)+i.y}}function r(){window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](o.x,o.y):A(Q,"Unable to scroll to requested position, window.parentIFrame not found")}var i=e?C(X.iframe):{x:0,y:0},o=n();S(Q,"Reposition requested from iFrame (offset x:"+i.x+" y:"+i.y+")"),window.top!==window.self?r():t()}function j(){!1!==E("onScroll",p)?N(Q):R()}function T(e){function t(){var e=C(o);S(Q,"Moving to in page link (#"+r+") at x: "+e.x+" y: "+e.y),p={x:e.x,y:e.y},j(),S(Q,"--")}function n(){window.parentIFrame?window.parentIFrame.moveToAnchor(r):S(Q,"In page link #"+r+" not found and window.parentIFrame not found")}var r=e.split("#")[1]||"",i=decodeURIComponent(r),o=document.getElementById(i)||document.getElementsByName(i)[0];o?t():window.top!==window.self?n():S(Q,"In page link #"+r+" not found")}function M(e){var t={};if(0===Number(X.width)&&0===Number(X.height)){var n=c(9).split(":");t={x:n[1],y:n[0]}}else t={x:X.width,y:X.height};E(e,{iframe:X.iframe,screenX:Number(t.x),screenY:Number(t.y),type:X.type})}function E(e,t){return I(Q,e,t)}function P(){switch(m[Q]&&m[Q].firstRun&&B(),X.type){case"close":D(X.iframe);break;case"message":h(c(6));break;case"mouseenter":M("onMouseEnter");break;case"mouseleave":M("onMouseLeave");break;case"autoResize":m[Q].autoResize=JSON.parse(c(9));break;case"scrollTo":x(!1);break;case"scrollToOffset":x(!0);break;case"pageInfo":g(m[Q]&&m[Q].iframe,Q),y();break;case"pageInfoStop":b();break;case"inPageLink":T(c(9));break;case"reset":F(X);break;case"init":t(),E("onInit",X.iframe);break;default:0===Number(X.width)&&0===Number(X.height)?A("Unsupported message received ("+X.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):t()}}function H(e){var t=!0;return m[e]||(t=!1,A(X.type+" No settings for "+e+". Message was: "+V)),t}function q(){for(var e in m)z("iFrame requested init",W(e),m[e].iframe,e)}function B(){m[Q]&&(m[Q].firstRun=!1)}var V=e.data,X={},Q=null;"[iFrameResizerChild]Ready"===V?q():s()?(X=n(),Q=X.id,m[Q]&&(m[Q].loaded=!0),!u()&&H(Q)&&(S(Q,"Received: "+V),w()&&a()&&P())):k(Q,"Ignored: "+V)}function I(e,t,n){var r=null,i=null;if(m[e]){if(r=m[e][t],"function"!==typeof r)throw new TypeError(t+" on iFrame["+e+"] is not a function");i=r(n)}return i}function P(e){var t=e.id;delete m[t]}function D(e){var t=e.id;if(!1!==I(t,"onClose",t)){S(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(n){A(n)}I(t,"onClosed",t),S(t,"--"),P(e)}else S(t,"Close iframe cancelled by onClose event")}function $(e){null===p&&(p={x:window.pageXOffset!==n?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==n?window.pageYOffset:document.documentElement.scrollTop},S(e,"Get page position: "+p.x+","+p.y))}function N(e){null!==p&&(window.scrollTo(p.x,p.y),S(e,"Set page position: "+p.x+","+p.y),R())}function R(){p=null}function F(e){function t(){L(e),z("reset","reset",e.iframe,e.id)}S(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),$(e.id),U(t,e,"reset")}function L(e){function t(t){e.id?(e.iframe.style[t]=e[t]+"px",S(e.id,"IFrame ("+i+") "+t+" set to "+e[t]+"px")):S("undefined","messageData id not set")}function n(t){u||"0"!==e[t]||(u=!0,S(i,"Hidden iFrame detected, creating visibility listener"),V())}function r(e){t(e),n(e)}var i=e.iframe.id;m[i]&&(m[i].sizeHeight&&r("height"),m[i].sizeWidth&&r("width"))}function U(e,t,n){n!==t.type&&h&&!window.jasmine?(S(t.id,"Requesting animation frame"),h(e)):e()}function z(e,t,n,r,i){function o(){var i=m[r]&&m[r].targetOrigin;S(r,"["+e+"] Sending msg to iframe["+r+"] ("+t+") targetOrigin: "+i),n.contentWindow.postMessage(f+t,i)}function a(){A(r,"["+e+"] IFrame("+r+") not found")}function s(){n&&"contentWindow"in n&&null!==n.contentWindow?o():a()}function u(){function e(){!m[r]||m[r].loaded||c||(c=!0,A(r,"IFrame has not responded within "+m[r].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}i&&m[r]&&m[r].warningTimeout&&(m[r].msgTimeout=setTimeout(e,m[r].warningTimeout))}var c=!1;r=r||n.id,m[r]&&(s(),u())}function W(e){return e+":"+m[e].bodyMarginV1+":"+m[e].sizeWidth+":"+m[e].log+":"+m[e].interval+":"+m[e].enablePublicMethods+":"+m[e].autoResize+":"+m[e].bodyMargin+":"+m[e].heightCalculationMethod+":"+m[e].bodyBackground+":"+m[e].bodyPadding+":"+m[e].tolerance+":"+m[e].inPageLinks+":"+m[e].resizeFrom+":"+m[e].widthCalculationMethod+":"+m[e].mouseEvents}function H(e){return"number"===typeof e}function q(e,t){function r(){function t(t){var n=m[x][t];1/0!==n&&0!==n&&(e.style[t]=H(n)?n+"px":n,S(x,"Set "+t+" = "+e.style[t]))}function n(e){if(m[x]["min"+e]>m[x]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),t("maxHeight"),t("minHeight"),t("maxWidth"),t("minWidth")}function i(){var e=t&&t.id||y.id+a++;return null!==document.getElementById(e)&&(e+=a++),e}function o(n){return""===n&&(e.id=n=i(),s=(t||{}).log,S(n,"Added missing iframe ID: "+n+" ("+e.src+")")),n}function u(){switch(S(x,"IFrame scrolling "+(m[x]&&m[x].scrolling?"enabled":"disabled")+" for "+x),e.style.overflow=!1===(m[x]&&m[x].scrolling)?"hidden":"auto",m[x]&&m[x].scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=m[x]?m[x].scrolling:"no"}}function c(){"number"!==typeof(m[x]&&m[x].bodyMargin)&&"0"!==(m[x]&&m[x].bodyMargin)||(m[x].bodyMarginV1=m[x].bodyMargin,m[x].bodyMargin=m[x].bodyMargin+"px")}function l(){var t=m[x]&&m[x].firstRun,n=m[x]&&m[x].heightCalculationMethod in v;!t&&n&&F({iframe:e,height:0,width:0,type:"init"})}function f(){m[x]&&(m[x].iframe.iFrameResizer={close:D.bind(null,m[x].iframe),removeListeners:P.bind(null,m[x].iframe),resize:z.bind(null,"Window resize","resize",m[x].iframe),moveToAnchor:function(e){z("Move to anchor","moveToAnchor:"+e,m[x].iframe,x)},sendMessage:function(e){e=JSON.stringify(e),z("Send Message","message:"+e,m[x].iframe,x)}})}function d(t){function r(){z("iFrame.onload",t,e,n,!0),l()}function i(t){if(e.parentNode){var n=new t((function(t){t.forEach((function(t){var n=Array.prototype.slice.call(t.removedNodes);n.forEach((function(t){t===e&&D(e)}))}))}));n.observe(e.parentNode,{childList:!0})}}var o=w();o&&i(o),_(e,"load",r),z("init",t,e,n,!0)}function p(e){if("object"!==typeof e)throw new TypeError("Options is not an object")}function h(e){for(var t in y)Object.prototype.hasOwnProperty.call(y,t)&&(m[x][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:y[t])}function g(e){return""===e||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e}function b(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],A(x,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function O(t){t=t||{},m[x]={firstRun:!0,iframe:e,remoteHost:e.src&&e.src.split("/").slice(0,3).join("/")},p(t),Object.keys(t).forEach(b,t),h(t),m[x]&&(m[x].targetOrigin=!0===m[x].checkOrigin?g(m[x].remoteHost):"*")}function C(){return x in m&&"iFrameResizer"in e}var x=o(e.id);C()?A(x,"Ignored iFrame, already setup."):(O(t),u(),r(),c(),d(W(x)),f())}function B(e,t){null===g&&(g=setTimeout((function(){g=null,e()}),t))}function Y(e,t,n){b[n]||(b[n]=setTimeout((function(){b[n]=null,e()}),t))}function V(){function e(){function e(e){function t(t){return"0px"===(m[e]&&m[e].iframe.style[t])}function n(e){return null!==e.offsetParent}m[e]&&n(m[e].iframe)&&(t("height")||t("width"))&&z("Visibility change","resize",m[e].iframe,e)}Object.keys(m).forEach((function(t){e(t)}))}function t(t){S("window","Mutation observed: "+t[0].target+" "+t[0].type),B(e,16)}function n(){var e=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},i=new r(t);i.observe(e,n)}var r=w();r&&n()}function X(e){function t(){G("Window "+e,"resize")}S("window","Trigger event: "+e),B(t,16)}function Q(){function e(){G("Tab Visable","resize")}"hidden"!==document.visibilityState&&(S("document","Trigger event: Visiblity change"),B(e,16))}function G(e,t){function n(e){return m[e]&&"parent"===m[e].resizeFrom&&m[e].autoResize&&!m[e].firstRun}Object.keys(m).forEach((function(r){n(r)&&z(e,t,m[r].iframe,r)}))}function J(){_(window,"message",E),_(window,"resize",(function(){X("resize")})),_(document,"visibilitychange",Q),_(document,"-webkit-visibilitychange",Q)}function K(){function e(e,t){function n(){if(!t.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==t.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+t.tagName+">")}t&&(n(),q(t,e),r.push(t))}function t(e){e&&e.enablePublicMethods&&A("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}var r;return C(),J(),function(i,o){switch(r=[],t(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),e.bind(n,i));break;case"object":e(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return r}}function Z(e){e.fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(e){function t(t,n){q(n,e)}return this.filter("iframe").each(t).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")}})()},"0f97":function(e,t,n){"use strict";var r=n("2fc8"),i=Object(r["a"])((function(e,t){return Array.prototype.slice.call(t,0).sort((function(t,n){var r=0,i=0;while(0===r&&i<e.length)r=e[i](t,n),i+=1;return r}))}));t["a"]=i},1212:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("fd3a"),i=n("8c86");function o(e,t){Object(i["a"])(2,arguments);var n=Object(r["a"])(e),o=Object(r["a"])(t);return n.getTime()>o.getTime()}},"1b40":function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"c",(function(){return r["a"]})),n.d(t,"b",(function(){return T})),n.d(t,"d",(function(){return S}));var r=n("2b0e");
/**
  * vue-class-component v7.2.6
  * (c) 2015-present Evan You
  * @license MIT
  */function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return s(e)||u(e)||c()}function s(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function u(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function l(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function f(e,t){d(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){d(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){d(e,t,n)}))}function d(e,t,n){var r=n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t);r.forEach((function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)}))}var p={__proto__:[]},h=p instanceof Array;function v(e){return function(t,n,r){var i="function"===typeof t?t:t.constructor;i.__decorators__||(i.__decorators__=[]),"number"!==typeof r&&(r=void 0),i.__decorators__.push((function(t){return e(t,n,r)}))}}function m(e){var t=i(e);return null==e||"object"!==t&&"function"!==t}function g(e,t){var n=t.prototype._init;t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t},configurable:!0})}))};var r=new t;t.prototype._init=n;var i={};return Object.keys(r).forEach((function(e){void 0!==r[e]&&(i[e]=r[e])})),i}var y=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(e){if("constructor"!==e)if(y.indexOf(e)>-1)t[e]=n[e];else{var r=Object.getOwnPropertyDescriptor(n,e);void 0!==r.value?"function"===typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(t.mixins||(t.mixins=[])).push({data:function(){return o({},e,r.value)}}):(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}})),(t.mixins||(t.mixins=[])).push({data:function(){return g(this,e)}});var i=e.__decorators__;i&&(i.forEach((function(e){return e(t)})),delete e.__decorators__);var a=Object.getPrototypeOf(e.prototype),s=a instanceof r["a"]?a.constructor:r["a"],u=s.extend(t);return _(u,e,s),l()&&f(u,e),u}var w={prototype:!0,arguments:!0,callee:!0,caller:!0};function _(e,t,n){Object.getOwnPropertyNames(t).forEach((function(r){if(!w[r]){var i=Object.getOwnPropertyDescriptor(e,r);if(!i||i.configurable){var o=Object.getOwnPropertyDescriptor(t,r);if(!h){if("cid"===r)return;var a=Object.getOwnPropertyDescriptor(n,r);if(!m(o.value)&&a&&a.value===o.value)return}0,Object.defineProperty(e,r,o)}}}))}function O(e){return"function"===typeof e?b(e):function(t){return b(t,e)}}O.registerHooks=function(e){y.push.apply(y,a(e))};var C=O;var x="undefined"!==typeof Reflect&&"undefined"!==typeof Reflect.getMetadata;function j(e,t,n){if(x&&!Array.isArray(e)&&"function"!==typeof e&&!e.hasOwnProperty("type")&&"undefined"===typeof e.type){var r=Reflect.getMetadata("design:type",t,n);r!==Object&&(e.type=r)}}function T(e){return void 0===e&&(e={}),function(t,n){j(e,t,n),v((function(t,n){(t.props||(t.props={}))[n]=e}))(t,n)}}function S(e,t){void 0===t&&(t={});var n=t.deep,r=void 0!==n&&n,i=t.immediate,o=void 0!==i&&i;return v((function(t,n){"object"!==typeof t.watch&&(t.watch=Object.create(null));var i=t.watch;"object"!==typeof i[e]||Array.isArray(i[e])?"undefined"===typeof i[e]&&(i[e]=[]):i[e]=[i[e]],i[e].push({handler:n,deep:r,immediate:o})}))}},"23aa":function(e,t,n){"use strict";var r=n("2fc8"),i=Object(r["a"])((function(e,t){return null!=t&&t.constructor===e||t instanceof e}));t["a"]=i},2550:function(e,t,n){"use strict";function r(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,i){return t.apply(this,arguments)};case 5:return function(e,n,r,i,o){return t.apply(this,arguments)};case 6:return function(e,n,r,i,o,a){return t.apply(this,arguments)};case 7:return function(e,n,r,i,o,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,i,o,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,i,o,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,i,o,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}n.d(t,"a",(function(){return r}))},2877:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,s){var u,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=u):i&&(u=s?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(e,t){return u.call(t),l(e,t)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,u):[u]}return{exports:e,options:c}}n.d(t,"a",(function(){return r}))},"28c9":function(e,t,n){"use strict";var r=n("2fc8"),i=n("8127");function o(e,t){var n=0,r=t.length,i=[];while(n<r)e(t[n])&&(i[i.length]=t[n]),n+=1;return i}function a(e){return"[object Object]"===Object.prototype.toString.call(e)}var s=n("3843"),u=n("64c8"),c=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=u["a"].init,e.prototype["@@transducer/result"]=u["a"].result,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}(),l=Object(r["a"])((function(e,t){return new c(e,t)})),f=l,d=n("66e1"),p=Object(r["a"])(Object(i["a"])(["filter"],f,(function(e,t){return a(t)?Object(s["a"])((function(n,r){return e(t[r])&&(n[r]=t[r]),n}),{},Object(d["a"])(t)):o(e,t)})));t["a"]=p},"2b0e":function(e,t,n){"use strict";(function(e){
/*!
 * Vue.js v2.6.12
 * (c) 2014-2020 Evan You
 * Released under the MIT License.
 */
var n=Object.freeze({});function r(e){return void 0===e||null===e}function i(e){return void 0!==e&&null!==e}function o(e){return!0===e}function a(e){return!1===e}function s(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e||"boolean"===typeof e}function u(e){return null!==e&&"object"===typeof e}var c=Object.prototype.toString;function l(e){return"[object Object]"===c.call(e)}function f(e){return"[object RegExp]"===c.call(e)}function d(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return i(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function h(e){return null==e?"":Array.isArray(e)||l(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function v(e){var t=parseFloat(e);return isNaN(t)?e:t}function m(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}m("slot,component",!0);var g=m("key,ref,slot,slot-scope,is");function y(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function w(e,t){return b.call(e,t)}function _(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var O=/-(\w)/g,C=_((function(e){return e.replace(O,(function(e,t){return t?t.toUpperCase():""}))})),x=_((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),j=/\B([A-Z])/g,T=_((function(e){return e.replace(j,"-$1").toLowerCase()}));function S(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function k(e,t){return e.bind(t)}var A=Function.prototype.bind?k:S;function M(e,t){t=t||0;var n=e.length-t,r=new Array(n);while(n--)r[n]=e[n+t];return r}function E(e,t){for(var n in t)e[n]=t[n];return e}function I(e){for(var t={},n=0;n<e.length;n++)e[n]&&E(t,e[n]);return t}function P(e,t,n){}var D=function(e,t,n){return!1},$=function(e){return e};function N(e,t){if(e===t)return!0;var n=u(e),r=u(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),o=Array.isArray(t);if(i&&o)return e.length===t.length&&e.every((function(e,n){return N(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||o)return!1;var a=Object.keys(e),s=Object.keys(t);return a.length===s.length&&a.every((function(n){return N(e[n],t[n])}))}catch(c){return!1}}function R(e,t){for(var n=0;n<e.length;n++)if(N(e[n],t))return n;return-1}function F(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var L="data-server-rendered",U=["component","directive","filter"],z=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],W={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:D,isReservedAttr:D,isUnknownElement:D,getTagNamespace:P,parsePlatformTagName:$,mustUseProp:D,async:!0,_lifecycleHooks:z},H=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function q(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function B(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var Y=new RegExp("[^"+H.source+".$_\\d]");function V(e){if(!Y.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}var X,Q="__proto__"in{},G="undefined"!==typeof window,J="undefined"!==typeof WXEnvironment&&!!WXEnvironment.platform,K=J&&WXEnvironment.platform.toLowerCase(),Z=G&&window.navigator.userAgent.toLowerCase(),ee=Z&&/msie|trident/.test(Z),te=Z&&Z.indexOf("msie 9.0")>0,ne=Z&&Z.indexOf("edge/")>0,re=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===K),ie=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/)),oe={}.watch,ae=!1;if(G)try{var se={};Object.defineProperty(se,"passive",{get:function(){ae=!0}}),window.addEventListener("test-passive",null,se)}catch(Ca){}var ue=function(){return void 0===X&&(X=!G&&!J&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),X},ce=G&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function le(e){return"function"===typeof e&&/native code/.test(e.toString())}var fe,de="undefined"!==typeof Symbol&&le(Symbol)&&"undefined"!==typeof Reflect&&le(Reflect.ownKeys);fe="undefined"!==typeof Set&&le(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var pe=P,he=0,ve=function(){this.id=he++,this.subs=[]};ve.prototype.addSub=function(e){this.subs.push(e)},ve.prototype.removeSub=function(e){y(this.subs,e)},ve.prototype.depend=function(){ve.target&&ve.target.addDep(this)},ve.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t<n;t++)e[t].update()},ve.target=null;var me=[];function ge(e){me.push(e),ve.target=e}function ye(){me.pop(),ve.target=me[me.length-1]}var be=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},we={child:{configurable:!0}};we.child.get=function(){return this.componentInstance},Object.defineProperties(be.prototype,we);var _e=function(e){void 0===e&&(e="");var t=new be;return t.text=e,t.isComment=!0,t};function Oe(e){return new be(void 0,void 0,void 0,String(e))}function Ce(e){var t=new be(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var xe=Array.prototype,je=Object.create(xe),Te=["push","pop","shift","unshift","splice","sort","reverse"];Te.forEach((function(e){var t=xe[e];B(je,e,(function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];var i,o=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2);break}return i&&a.observeArray(i),a.dep.notify(),o}))}));var Se=Object.getOwnPropertyNames(je),ke=!0;function Ae(e){ke=e}var Me=function(e){this.value=e,this.dep=new ve,this.vmCount=0,B(e,"__ob__",this),Array.isArray(e)?(Q?Ee(e,je):Ie(e,je,Se),this.observeArray(e)):this.walk(e)};function Ee(e,t){e.__proto__=t}function Ie(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];B(e,o,t[o])}}function Pe(e,t){var n;if(u(e)&&!(e instanceof be))return w(e,"__ob__")&&e.__ob__ instanceof Me?n=e.__ob__:ke&&!ue()&&(Array.isArray(e)||l(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new Me(e)),t&&n&&n.vmCount++,n}function De(e,t,n,r,i){var o=new ve,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,u=a&&a.set;s&&!u||2!==arguments.length||(n=e[t]);var c=!i&&Pe(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return ve.target&&(o.depend(),c&&(c.dep.depend(),Array.isArray(t)&&Re(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!==t&&r!==r||s&&!u||(u?u.call(e,t):n=t,c=!i&&Pe(t),o.notify())}})}}function $e(e,t,n){if(Array.isArray(e)&&d(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(De(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function Ne(e,t){if(Array.isArray(e)&&d(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||w(e,t)&&(delete e[t],n&&n.dep.notify())}}function Re(e){for(var t=void 0,n=0,r=e.length;n<r;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&Re(t)}Me.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)De(e,t[n])},Me.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Pe(e[t])};var Fe=W.optionMergeStrategies;function Le(e,t){if(!t)return e;for(var n,r,i,o=de?Reflect.ownKeys(t):Object.keys(t),a=0;a<o.length;a++)n=o[a],"__ob__"!==n&&(r=e[n],i=t[n],w(e,n)?r!==i&&l(r)&&l(i)&&Le(r,i):$e(e,n,i));return e}function Ue(e,t,n){return n?function(){var r="function"===typeof t?t.call(n,n):t,i="function"===typeof e?e.call(n,n):e;return r?Le(r,i):i}:t?e?function(){return Le("function"===typeof t?t.call(this,this):t,"function"===typeof e?e.call(this,this):e)}:t:e}function ze(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?We(n):n}function We(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}function He(e,t,n,r){var i=Object.create(e||null);return t?E(i,t):i}Fe.data=function(e,t,n){return n?Ue(e,t,n):t&&"function"!==typeof t?e:Ue(e,t)},z.forEach((function(e){Fe[e]=ze})),U.forEach((function(e){Fe[e+"s"]=He})),Fe.watch=function(e,t,n,r){if(e===oe&&(e=void 0),t===oe&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in E(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Fe.props=Fe.methods=Fe.inject=Fe.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return E(i,e),t&&E(i,t),i},Fe.provide=Ue;var qe=function(e,t){return void 0===t?e:t};function Be(e,t){var n=e.props;if(n){var r,i,o,a={};if(Array.isArray(n)){r=n.length;while(r--)i=n[r],"string"===typeof i&&(o=C(i),a[o]={type:null})}else if(l(n))for(var s in n)i=n[s],o=C(s),a[o]=l(i)?i:{type:i};else 0;e.props=a}}function Ye(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(l(n))for(var o in n){var a=n[o];r[o]=l(a)?E({from:o},a):{from:a}}else 0}}function Ve(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"===typeof r&&(t[n]={bind:r,update:r})}}function Xe(e,t,n){if("function"===typeof t&&(t=t.options),Be(t,n),Ye(t,n),Ve(t),!t._base&&(t.extends&&(e=Xe(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=Xe(e,t.mixins[r],n);var o,a={};for(o in e)s(o);for(o in t)w(e,o)||s(o);function s(r){var i=Fe[r]||qe;a[r]=i(e[r],t[r],n,r)}return a}function Qe(e,t,n,r){if("string"===typeof n){var i=e[t];if(w(i,n))return i[n];var o=C(n);if(w(i,o))return i[o];var a=x(o);if(w(i,a))return i[a];var s=i[n]||i[o]||i[a];return s}}function Ge(e,t,n,r){var i=t[e],o=!w(n,e),a=n[e],s=et(Boolean,i.type);if(s>-1)if(o&&!w(i,"default"))a=!1;else if(""===a||a===T(e)){var u=et(String,i.type);(u<0||s<u)&&(a=!0)}if(void 0===a){a=Je(r,i,e);var c=ke;Ae(!0),Pe(a),Ae(c)}return a}function Je(e,t,n){if(w(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"===typeof r&&"Function"!==Ke(t.type)?r.call(e):r}}function Ke(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Ze(e,t){return Ke(e)===Ke(t)}function et(e,t){if(!Array.isArray(t))return Ze(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Ze(t[n],e))return n;return-1}function tt(e,t,n){ge();try{if(t){var r=t;while(r=r.$parent){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{var a=!1===i[o].call(r,e,t,n);if(a)return}catch(Ca){rt(Ca,r,"errorCaptured hook")}}}rt(e,t,n)}finally{ye()}}function nt(e,t,n,r,i){var o;try{o=n?e.apply(t,n):e.call(t),o&&!o._isVue&&p(o)&&!o._handled&&(o.catch((function(e){return tt(e,r,i+" (Promise/async)")})),o._handled=!0)}catch(Ca){tt(Ca,r,i)}return o}function rt(e,t,n){if(W.errorHandler)try{return W.errorHandler.call(null,e,t,n)}catch(Ca){Ca!==e&&it(Ca,null,"config.errorHandler")}it(e,t,n)}function it(e,t,n){if(!G&&!J||"undefined"===typeof console)throw e;console.error(e)}var ot,at=!1,st=[],ut=!1;function ct(){ut=!1;var e=st.slice(0);st.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!==typeof Promise&&le(Promise)){var lt=Promise.resolve();ot=function(){lt.then(ct),re&&setTimeout(P)},at=!0}else if(ee||"undefined"===typeof MutationObserver||!le(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())ot="undefined"!==typeof setImmediate&&le(setImmediate)?function(){setImmediate(ct)}:function(){setTimeout(ct,0)};else{var ft=1,dt=new MutationObserver(ct),pt=document.createTextNode(String(ft));dt.observe(pt,{characterData:!0}),ot=function(){ft=(ft+1)%2,pt.data=String(ft)},at=!0}function ht(e,t){var n;if(st.push((function(){if(e)try{e.call(t)}catch(Ca){tt(Ca,t,"nextTick")}else n&&n(t)})),ut||(ut=!0,ot()),!e&&"undefined"!==typeof Promise)return new Promise((function(e){n=e}))}var vt=new fe;function mt(e){gt(e,vt),vt.clear()}function gt(e,t){var n,r,i=Array.isArray(e);if(!(!i&&!u(e)||Object.isFrozen(e)||e instanceof be)){if(e.__ob__){var o=e.__ob__.dep.id;if(t.has(o))return;t.add(o)}if(i){n=e.length;while(n--)gt(e[n],t)}else{r=Object.keys(e),n=r.length;while(n--)gt(e[r[n]],t)}}}var yt=_((function(e){var t="&"===e.charAt(0);e=t?e.slice(1):e;var n="~"===e.charAt(0);e=n?e.slice(1):e;var r="!"===e.charAt(0);return e=r?e.slice(1):e,{name:e,once:n,capture:r,passive:t}}));function bt(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(r))return nt(r,null,arguments,t,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)nt(i[o],null,e,t,"v-on handler")}return n.fns=e,n}function wt(e,t,n,i,a,s){var u,c,l,f;for(u in e)c=e[u],l=t[u],f=yt(u),r(c)||(r(l)?(r(c.fns)&&(c=e[u]=bt(c,s)),o(f.once)&&(c=e[u]=a(f.name,c,f.capture)),n(f.name,c,f.capture,f.passive,f.params)):c!==l&&(l.fns=c,e[u]=l));for(u in t)r(e[u])&&(f=yt(u),i(f.name,t[u],f.capture))}function _t(e,t,n){var a;e instanceof be&&(e=e.data.hook||(e.data.hook={}));var s=e[t];function u(){n.apply(this,arguments),y(a.fns,u)}r(s)?a=bt([u]):i(s.fns)&&o(s.merged)?(a=s,a.fns.push(u)):a=bt([s,u]),a.merged=!0,e[t]=a}function Ot(e,t,n){var o=t.options.props;if(!r(o)){var a={},s=e.attrs,u=e.props;if(i(s)||i(u))for(var c in o){var l=T(c);Ct(a,u,c,l,!0)||Ct(a,s,c,l,!1)}return a}}function Ct(e,t,n,r,o){if(i(t)){if(w(t,n))return e[n]=t[n],o||delete t[n],!0;if(w(t,r))return e[n]=t[r],o||delete t[r],!0}return!1}function xt(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function jt(e){return s(e)?[Oe(e)]:Array.isArray(e)?St(e):void 0}function Tt(e){return i(e)&&i(e.text)&&a(e.isComment)}function St(e,t){var n,a,u,c,l=[];for(n=0;n<e.length;n++)a=e[n],r(a)||"boolean"===typeof a||(u=l.length-1,c=l[u],Array.isArray(a)?a.length>0&&(a=St(a,(t||"")+"_"+n),Tt(a[0])&&Tt(c)&&(l[u]=Oe(c.text+a[0].text),a.shift()),l.push.apply(l,a)):s(a)?Tt(c)?l[u]=Oe(c.text+a):""!==a&&l.push(Oe(a)):Tt(a)&&Tt(c)?l[u]=Oe(c.text+a.text):(o(e._isVList)&&i(a.tag)&&r(a.key)&&i(t)&&(a.key="__vlist"+t+"_"+n+"__"),l.push(a)));return l}function kt(e){var t=e.$options.provide;t&&(e._provided="function"===typeof t?t.call(e):t)}function At(e){var t=Mt(e.$options.inject,e);t&&(Ae(!1),Object.keys(t).forEach((function(n){De(e,n,t[n])})),Ae(!0))}function Mt(e,t){if(e){for(var n=Object.create(null),r=de?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){var a=e[o].from,s=t;while(s){if(s._provided&&w(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s)if("default"in e[o]){var u=e[o].default;n[o]="function"===typeof u?u.call(t):u}else 0}}return n}}function Et(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,u=n[s]||(n[s]=[]);"template"===o.tag?u.push.apply(u,o.children||[]):u.push(o)}}for(var c in n)n[c].every(It)&&delete n[c];return n}function It(e){return e.isComment&&!e.asyncFactory||" "===e.text}function Pt(e,t,r){var i,o=Object.keys(t).length>0,a=e?!!e.$stable:!o,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&r&&r!==n&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var u in i={},e)e[u]&&"$"!==u[0]&&(i[u]=Dt(t,u,e[u]))}else i={};for(var c in t)c in i||(i[c]=$t(t,c));return e&&Object.isExtensible(e)&&(e._normalized=i),B(i,"$stable",a),B(i,"$key",s),B(i,"$hasNormal",o),i}function Dt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return e=e&&"object"===typeof e&&!Array.isArray(e)?[e]:jt(e),e&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function $t(e,t){return function(){return e[t]}}function Nt(e,t){var n,r,o,a,s;if(Array.isArray(e)||"string"===typeof e)for(n=new Array(e.length),r=0,o=e.length;r<o;r++)n[r]=t(e[r],r);else if("number"===typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(u(e))if(de&&e[Symbol.iterator]){n=[];var c=e[Symbol.iterator](),l=c.next();while(!l.done)n.push(t(l.value,n.length)),l=c.next()}else for(a=Object.keys(e),n=new Array(a.length),r=0,o=a.length;r<o;r++)s=a[r],n[r]=t(e[s],s,r);return i(n)||(n=[]),n._isVList=!0,n}function Rt(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=E(E({},r),n)),i=o(n)||t):i=this.$slots[e]||t;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function Ft(e){return Qe(this.$options,"filters",e,!0)||$}function Lt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Ut(e,t,n,r,i){var o=W.keyCodes[t]||n;return i&&r&&!W.keyCodes[t]?Lt(i,r):o?Lt(o,e):r?T(r)!==t:void 0}function zt(e,t,n,r,i){if(n)if(u(n)){var o;Array.isArray(n)&&(n=I(n));var a=function(a){if("class"===a||"style"===a||g(a))o=e;else{var s=e.attrs&&e.attrs.type;o=r||W.mustUseProp(t,s,a)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var u=C(a),c=T(a);if(!(u in o)&&!(c in o)&&(o[a]=n[a],i)){var l=e.on||(e.on={});l["update:"+a]=function(e){n[a]=e}}};for(var s in n)a(s)}else;return e}function Wt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),qt(r,"__static__"+e,!1)),r}function Ht(e,t,n){return qt(e,"__once__"+t+(n?"_"+n:""),!0),e}function qt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!==typeof e[r]&&Bt(e[r],t+"_"+r,n);else Bt(e,t,n)}function Bt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Yt(e,t){if(t)if(l(t)){var n=e.on=e.on?E({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function Vt(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Array.isArray(o)?Vt(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function Xt(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"===typeof r&&r&&(e[t[n]]=t[n+1])}return e}function Qt(e,t){return"string"===typeof e?t+e:e}function Gt(e){e._o=Ht,e._n=v,e._s=h,e._l=Nt,e._t=Rt,e._q=N,e._i=R,e._m=Wt,e._f=Ft,e._k=Ut,e._b=zt,e._v=Oe,e._e=_e,e._u=Vt,e._g=Yt,e._d=Xt,e._p=Qt}function Jt(e,t,r,i,a){var s,u=this,c=a.options;w(i,"_uid")?(s=Object.create(i),s._original=i):(s=i,i=i._original);var l=o(c._compiled),f=!l;this.data=e,this.props=t,this.children=r,this.parent=i,this.listeners=e.on||n,this.injections=Mt(c.inject,i),this.slots=function(){return u.$slots||Pt(e.scopedSlots,u.$slots=Et(r,i)),u.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return Pt(e.scopedSlots,this.slots())}}),l&&(this.$options=c,this.$slots=this.slots(),this.$scopedSlots=Pt(e.scopedSlots,this.$slots)),c._scopeId?this._c=function(e,t,n,r){var o=fn(s,e,t,n,r,f);return o&&!Array.isArray(o)&&(o.fnScopeId=c._scopeId,o.fnContext=i),o}:this._c=function(e,t,n,r){return fn(s,e,t,n,r,f)}}function Kt(e,t,r,o,a){var s=e.options,u={},c=s.props;if(i(c))for(var l in c)u[l]=Ge(l,c,t||n);else i(r.attrs)&&en(u,r.attrs),i(r.props)&&en(u,r.props);var f=new Jt(r,u,a,o,e),d=s.render.call(null,f._c,f);if(d instanceof be)return Zt(d,r,f.parent,s,f);if(Array.isArray(d)){for(var p=jt(d)||[],h=new Array(p.length),v=0;v<p.length;v++)h[v]=Zt(p[v],r,f.parent,s,f);return h}}function Zt(e,t,n,r,i){var o=Ce(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function en(e,t){for(var n in t)e[C(n)]=t[n]}Gt(Jt.prototype);var tn={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;tn.prepatch(n,n)}else{var r=e.componentInstance=on(e,Mn);r.$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions,r=t.componentInstance=e.componentInstance;$n(r,n.propsData,n.listeners,t,n.children)},insert:function(e){var t=e.context,n=e.componentInstance;n._isMounted||(n._isMounted=!0,Ln(n,"mounted")),e.data.keepAlive&&(t._isMounted?Kn(n):Rn(n,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?Fn(t,!0):t.$destroy())}},nn=Object.keys(tn);function rn(e,t,n,a,s){if(!r(e)){var c=n.$options._base;if(u(e)&&(e=c.extend(e)),"function"===typeof e){var l;if(r(e.cid)&&(l=e,e=_n(l,c),void 0===e))return wn(l,t,n,a,s);t=t||{},_r(e),i(t.model)&&un(e.options,t);var f=Ot(t,e,s);if(o(e.options.functional))return Kt(e,f,t,n,a);var d=t.on;if(t.on=t.nativeOn,o(e.options.abstract)){var p=t.slot;t={},p&&(t.slot=p)}an(t);var h=e.options.name||s,v=new be("vue-component-"+e.cid+(h?"-"+h:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:f,listeners:d,tag:s,children:a},l);return v}}}function on(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;return i(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns),new e.componentOptions.Ctor(n)}function an(e){for(var t=e.hook||(e.hook={}),n=0;n<nn.length;n++){var r=nn[n],i=t[r],o=tn[r];i===o||i&&i._merged||(t[r]=i?sn(o,i):o)}}function sn(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}function un(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var o=t.on||(t.on={}),a=o[r],s=t.model.callback;i(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(o[r]=[s].concat(a)):o[r]=s}var cn=1,ln=2;function fn(e,t,n,r,i,a){return(Array.isArray(n)||s(n))&&(i=r,r=n,n=void 0),o(a)&&(i=ln),dn(e,t,n,r,i)}function dn(e,t,n,r,o){if(i(n)&&i(n.__ob__))return _e();if(i(n)&&i(n.is)&&(t=n.is),!t)return _e();var a,s,u;(Array.isArray(r)&&"function"===typeof r[0]&&(n=n||{},n.scopedSlots={default:r[0]},r.length=0),o===ln?r=jt(r):o===cn&&(r=xt(r)),"string"===typeof t)?(s=e.$vnode&&e.$vnode.ns||W.getTagNamespace(t),a=W.isReservedTag(t)?new be(W.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!i(u=Qe(e.$options,"components",t))?new be(t,n,r,void 0,void 0,e):rn(u,n,e,r,t)):a=rn(t,n,e,r);return Array.isArray(a)?a:i(a)?(i(s)&&pn(a,s),i(n)&&hn(n),a):_e()}function pn(e,t,n){if(e.ns=t,"foreignObject"===e.tag&&(t=void 0,n=!0),i(e.children))for(var a=0,s=e.children.length;a<s;a++){var u=e.children[a];i(u.tag)&&(r(u.ns)||o(n)&&"svg"!==u.tag)&&pn(u,t,n)}}function hn(e){u(e.style)&&mt(e.style),u(e.class)&&mt(e.class)}function vn(e){e._vnode=null,e._staticTrees=null;var t=e.$options,r=e.$vnode=t._parentVnode,i=r&&r.context;e.$slots=Et(t._renderChildren,i),e.$scopedSlots=n,e._c=function(t,n,r,i){return fn(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return fn(e,t,n,r,i,!0)};var o=r&&r.data;De(e,"$attrs",o&&o.attrs||n,null,!0),De(e,"$listeners",t._parentListeners||n,null,!0)}var mn,gn=null;function yn(e){Gt(e.prototype),e.prototype.$nextTick=function(e){return ht(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&(t.$scopedSlots=Pt(i.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=i;try{gn=t,e=r.call(t._renderProxy,t.$createElement)}catch(Ca){tt(Ca,t,"render"),e=t._vnode}finally{gn=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof be||(e=_e()),e.parent=i,e}}function bn(e,t){return(e.__esModule||de&&"Module"===e[Symbol.toStringTag])&&(e=e.default),u(e)?t.extend(e):e}function wn(e,t,n,r,i){var o=_e();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}function _n(e,t){if(o(e.error)&&i(e.errorComp))return e.errorComp;if(i(e.resolved))return e.resolved;var n=gn;if(n&&i(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n),o(e.loading)&&i(e.loadingComp))return e.loadingComp;if(n&&!i(e.owners)){var a=e.owners=[n],s=!0,c=null,l=null;n.$on("hook:destroyed",(function(){return y(a,n)}));var f=function(e){for(var t=0,n=a.length;t<n;t++)a[t].$forceUpdate();e&&(a.length=0,null!==c&&(clearTimeout(c),c=null),null!==l&&(clearTimeout(l),l=null))},d=F((function(n){e.resolved=bn(n,t),s?a.length=0:f(!0)})),h=F((function(t){i(e.errorComp)&&(e.error=!0,f(!0))})),v=e(d,h);return u(v)&&(p(v)?r(e.resolved)&&v.then(d,h):p(v.component)&&(v.component.then(d,h),i(v.error)&&(e.errorComp=bn(v.error,t)),i(v.loading)&&(e.loadingComp=bn(v.loading,t),0===v.delay?e.loading=!0:c=setTimeout((function(){c=null,r(e.resolved)&&r(e.error)&&(e.loading=!0,f(!1))}),v.delay||200)),i(v.timeout)&&(l=setTimeout((function(){l=null,r(e.resolved)&&h(null)}),v.timeout)))),s=!1,e.loading?e.loadingComp:e.resolved}}function On(e){return e.isComment&&e.asyncFactory}function Cn(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(i(n)&&(i(n.componentOptions)||On(n)))return n}}function xn(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&kn(e,t)}function jn(e,t){mn.$on(e,t)}function Tn(e,t){mn.$off(e,t)}function Sn(e,t){var n=mn;return function r(){var i=t.apply(null,arguments);null!==i&&n.$off(e,r)}}function kn(e,t,n){mn=e,wt(t,n||{},jn,Tn,Sn,e),mn=void 0}function An(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;var s=a.length;while(s--)if(o=a[s],o===t||o.fn===t){a.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?M(n):n;for(var r=M(arguments,1),i='event handler for "'+e+'"',o=0,a=n.length;o<a;o++)nt(n[o],t,r,t,i)}return t}}var Mn=null;function En(e){var t=Mn;return Mn=e,function(){Mn=t}}function In(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){while(n.$options.abstract&&n.$parent)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function Pn(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=En(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Ln(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||y(t.$children,e),e._watcher&&e._watcher.teardown();var n=e._watchers.length;while(n--)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Ln(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}function Dn(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=_e),Ln(e,"beforeMount"),r=function(){e._update(e._render(),n)},new nr(e,r,P,{before:function(){e._isMounted&&!e._isDestroyed&&Ln(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Ln(e,"mounted")),e}function $n(e,t,r,i,o){var a=i.data.scopedSlots,s=e.$scopedSlots,u=!!(a&&!a.$stable||s!==n&&!s.$stable||a&&e.$scopedSlots.$key!==a.$key),c=!!(o||e.$options._renderChildren||u);if(e.$options._parentVnode=i,e.$vnode=i,e._vnode&&(e._vnode.parent=i),e.$options._renderChildren=o,e.$attrs=i.data.attrs||n,e.$listeners=r||n,t&&e.$options.props){Ae(!1);for(var l=e._props,f=e.$options._propKeys||[],d=0;d<f.length;d++){var p=f[d],h=e.$options.props;l[p]=Ge(p,h,t,e)}Ae(!0),e.$options.propsData=t}r=r||n;var v=e.$options._parentListeners;e.$options._parentListeners=r,kn(e,r,v),c&&(e.$slots=Et(o,i.context),e.$forceUpdate())}function Nn(e){while(e&&(e=e.$parent))if(e._inactive)return!0;return!1}function Rn(e,t){if(t){if(e._directInactive=!1,Nn(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Rn(e.$children[n]);Ln(e,"activated")}}function Fn(e,t){if((!t||(e._directInactive=!0,!Nn(e)))&&!e._inactive){e._inactive=!0;for(var n=0;n<e.$children.length;n++)Fn(e.$children[n]);Ln(e,"deactivated")}}function Ln(e,t){ge();var n=e.$options[t],r=t+" hook";if(n)for(var i=0,o=n.length;i<o;i++)nt(n[i],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),ye()}var Un=[],zn=[],Wn={},Hn=!1,qn=!1,Bn=0;function Yn(){Bn=Un.length=zn.length=0,Wn={},Hn=qn=!1}var Vn=0,Xn=Date.now;if(G&&!ee){var Qn=window.performance;Qn&&"function"===typeof Qn.now&&Xn()>document.createEvent("Event").timeStamp&&(Xn=function(){return Qn.now()})}function Gn(){var e,t;for(Vn=Xn(),qn=!0,Un.sort((function(e,t){return e.id-t.id})),Bn=0;Bn<Un.length;Bn++)e=Un[Bn],e.before&&e.before(),t=e.id,Wn[t]=null,e.run();var n=zn.slice(),r=Un.slice();Yn(),Zn(n),Jn(r),ce&&W.devtools&&ce.emit("flush")}function Jn(e){var t=e.length;while(t--){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Ln(r,"updated")}}function Kn(e){e._inactive=!1,zn.push(e)}function Zn(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Rn(e[t],!0)}function er(e){var t=e.id;if(null==Wn[t]){if(Wn[t]=!0,qn){var n=Un.length-1;while(n>Bn&&Un[n].id>e.id)n--;Un.splice(n+1,0,e)}else Un.push(e);Hn||(Hn=!0,ht(Gn))}}var tr=0,nr=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++tr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new fe,this.newDepIds=new fe,this.expression="","function"===typeof t?this.getter=t:(this.getter=V(t),this.getter||(this.getter=P)),this.value=this.lazy?void 0:this.get()};nr.prototype.get=function(){var e;ge(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(Ca){if(!this.user)throw Ca;tt(Ca,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&mt(e),ye(),this.cleanupDeps()}return e},nr.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},nr.prototype.cleanupDeps=function(){var e=this.deps.length;while(e--){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},nr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():er(this)},nr.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||u(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(Ca){tt(Ca,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},nr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nr.prototype.depend=function(){var e=this.deps.length;while(e--)this.deps[e].depend()},nr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);var e=this.deps.length;while(e--)this.deps[e].removeSub(this);this.active=!1}};var rr={enumerable:!0,configurable:!0,get:P,set:P};function ir(e,t,n){rr.get=function(){return this[t][n]},rr.set=function(e){this[t][n]=e},Object.defineProperty(e,n,rr)}function or(e){e._watchers=[];var t=e.$options;t.props&&ar(e,t.props),t.methods&&hr(e,t.methods),t.data?sr(e):Pe(e._data={},!0),t.computed&&lr(e,t.computed),t.watch&&t.watch!==oe&&vr(e,t.watch)}function ar(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;o||Ae(!1);var a=function(o){i.push(o);var a=Ge(o,t,n,e);De(r,o,a),o in e||ir(e,"_props",o)};for(var s in t)a(s);Ae(!0)}function sr(e){var t=e.$options.data;t=e._data="function"===typeof t?ur(t,e):t||{},l(t)||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);while(i--){var o=n[i];0,r&&w(r,o)||q(o)||ir(e,"_data",o)}Pe(t,!0)}function ur(e,t){ge();try{return e.call(t,t)}catch(Ca){return tt(Ca,t,"data()"),{}}finally{ye()}}var cr={lazy:!0};function lr(e,t){var n=e._computedWatchers=Object.create(null),r=ue();for(var i in t){var o=t[i],a="function"===typeof o?o:o.get;0,r||(n[i]=new nr(e,a||P,P,cr)),i in e||fr(e,i,o)}}function fr(e,t,n){var r=!ue();"function"===typeof n?(rr.get=r?dr(t):pr(n),rr.set=P):(rr.get=n.get?r&&!1!==n.cache?dr(t):pr(n.get):P,rr.set=n.set||P),Object.defineProperty(e,t,rr)}function dr(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),ve.target&&t.depend(),t.value}}function pr(e){return function(){return e.call(this,this)}}function hr(e,t){e.$options.props;for(var n in t)e[n]="function"!==typeof t[n]?P:A(t[n],e)}function vr(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)mr(e,n,r[i]);else mr(e,n,r)}}function mr(e,t,n,r){return l(n)&&(r=n,n=n.handler),"string"===typeof n&&(n=e[n]),e.$watch(t,n,r)}function gr(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=$e,e.prototype.$delete=Ne,e.prototype.$watch=function(e,t,n){var r=this;if(l(t))return mr(r,e,t,n);n=n||{},n.user=!0;var i=new nr(r,e,t,n);if(n.immediate)try{t.call(r,i.value)}catch(o){tt(o,r,'callback for immediate watcher "'+i.expression+'"')}return function(){i.teardown()}}}var yr=0;function br(e){e.prototype._init=function(e){var t=this;t._uid=yr++,t._isVue=!0,e&&e._isComponent?wr(t,e):t.$options=Xe(_r(t.constructor),e||{},t),t._renderProxy=t,t._self=t,In(t),xn(t),vn(t),Ln(t,"beforeCreate"),At(t),or(t),kt(t),Ln(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}function wr(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}function _r(e){var t=e.options;if(e.super){var n=_r(e.super),r=e.superOptions;if(n!==r){e.superOptions=n;var i=Or(e);i&&E(e.extendOptions,i),t=e.options=Xe(n,e.extendOptions),t.name&&(t.components[t.name]=e)}}return t}function Or(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}function Cr(e){this._init(e)}function xr(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=M(arguments,1);return n.unshift(this),"function"===typeof e.install?e.install.apply(e,n):"function"===typeof e&&e.apply(null,n),t.push(e),this}}function jr(e){e.mixin=function(e){return this.options=Xe(this.options,e),this}}function Tr(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name;var a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=Xe(n.options,e),a["super"]=n,a.options.props&&Sr(a),a.options.computed&&kr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,U.forEach((function(e){a[e]=n[e]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=E({},a.options),i[r]=a,a}}function Sr(e){var t=e.options.props;for(var n in t)ir(e.prototype,"_props",n)}function kr(e){var t=e.options.computed;for(var n in t)fr(e.prototype,n,t[n])}function Ar(e){U.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&l(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"===typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}function Mr(e){return e&&(e.Ctor.options.name||e.tag)}function Er(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function Ir(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=Mr(a.componentOptions);s&&!t(s)&&Pr(n,o,r,i)}}}function Pr(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,y(n,t)}br(Cr),gr(Cr),An(Cr),Pn(Cr),yn(Cr);var Dr=[String,RegExp,Array],$r={name:"keep-alive",abstract:!0,props:{include:Dr,exclude:Dr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Pr(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){Ir(e,(function(e){return Er(t,e)}))})),this.$watch("exclude",(function(t){Ir(e,(function(e){return!Er(t,e)}))}))},render:function(){var e=this.$slots.default,t=Cn(e),n=t&&t.componentOptions;if(n){var r=Mr(n),i=this,o=i.include,a=i.exclude;if(o&&(!r||!Er(o,r))||a&&r&&Er(a,r))return t;var s=this,u=s.cache,c=s.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;u[l]?(t.componentInstance=u[l].componentInstance,y(c,l),c.push(l)):(u[l]=t,c.push(l),this.max&&c.length>parseInt(this.max)&&Pr(u,c[0],c,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Nr={KeepAlive:$r};function Rr(e){var t={get:function(){return W}};Object.defineProperty(e,"config",t),e.util={warn:pe,extend:E,mergeOptions:Xe,defineReactive:De},e.set=$e,e.delete=Ne,e.nextTick=ht,e.observable=function(e){return Pe(e),e},e.options=Object.create(null),U.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,E(e.options.components,Nr),xr(e),jr(e),Tr(e),Ar(e)}Rr(Cr),Object.defineProperty(Cr.prototype,"$isServer",{get:ue}),Object.defineProperty(Cr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Cr,"FunctionalRenderContext",{value:Jt}),Cr.version="2.6.12";var Fr=m("style,class"),Lr=m("input,textarea,option,select,progress"),Ur=function(e,t,n){return"value"===n&&Lr(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},zr=m("contenteditable,draggable,spellcheck"),Wr=m("events,caret,typing,plaintext-only"),Hr=function(e,t){return Xr(t)||"false"===t?"false":"contenteditable"===e&&Wr(t)?t:"true"},qr=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Br="http://www.w3.org/1999/xlink",Yr=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Vr=function(e){return Yr(e)?e.slice(6,e.length):""},Xr=function(e){return null==e||!1===e};function Qr(e){var t=e.data,n=e,r=e;while(i(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(t=Gr(r.data,t));while(i(n=n.parent))n&&n.data&&(t=Gr(t,n.data));return Jr(t.staticClass,t.class)}function Gr(e,t){return{staticClass:Kr(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function Jr(e,t){return i(e)||i(t)?Kr(e,Zr(t)):""}function Kr(e,t){return e?t?e+" "+t:e:t||""}function Zr(e){return Array.isArray(e)?ei(e):u(e)?ti(e):"string"===typeof e?e:""}function ei(e){for(var t,n="",r=0,o=e.length;r<o;r++)i(t=Zr(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}function ti(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}var ni={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},ri=m("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),ii=m("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),oi=function(e){return ri(e)||ii(e)};function ai(e){return ii(e)?"svg":"math"===e?"math":void 0}var si=Object.create(null);function ui(e){if(!G)return!0;if(oi(e))return!1;if(e=e.toLowerCase(),null!=si[e])return si[e];var t=document.createElement(e);return e.indexOf("-")>-1?si[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:si[e]=/HTMLUnknownElement/.test(t.toString())}var ci=m("text,number,password,search,email,tel,url");function li(e){if("string"===typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function fi(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n}function di(e,t){return document.createElementNS(ni[e],t)}function pi(e){return document.createTextNode(e)}function hi(e){return document.createComment(e)}function vi(e,t,n){e.insertBefore(t,n)}function mi(e,t){e.removeChild(t)}function gi(e,t){e.appendChild(t)}function yi(e){return e.parentNode}function bi(e){return e.nextSibling}function wi(e){return e.tagName}function _i(e,t){e.textContent=t}function Oi(e,t){e.setAttribute(t,"")}var Ci=Object.freeze({createElement:fi,createElementNS:di,createTextNode:pi,createComment:hi,insertBefore:vi,removeChild:mi,appendChild:gi,parentNode:yi,nextSibling:bi,tagName:wi,setTextContent:_i,setStyleScope:Oi}),xi={create:function(e,t){ji(t)},update:function(e,t){e.data.ref!==t.data.ref&&(ji(e,!0),ji(t))},destroy:function(e){ji(e,!0)}};function ji(e,t){var n=e.data.ref;if(i(n)){var r=e.context,o=e.componentInstance||e.elm,a=r.$refs;t?Array.isArray(a[n])?y(a[n],o):a[n]===o&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])?a[n].indexOf(o)<0&&a[n].push(o):a[n]=[o]:a[n]=o}}var Ti=new be("",{},[]),Si=["create","activate","update","remove","destroy"];function ki(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&i(e.data)===i(t.data)&&Ai(e,t)||o(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&r(t.asyncFactory.error))}function Ai(e,t){if("input"!==e.tag)return!0;var n,r=i(n=e.data)&&i(n=n.attrs)&&n.type,o=i(n=t.data)&&i(n=n.attrs)&&n.type;return r===o||ci(r)&&ci(o)}function Mi(e,t,n){var r,o,a={};for(r=t;r<=n;++r)o=e[r].key,i(o)&&(a[o]=r);return a}function Ei(e){var t,n,a={},u=e.modules,c=e.nodeOps;for(t=0;t<Si.length;++t)for(a[Si[t]]=[],n=0;n<u.length;++n)i(u[n][Si[t]])&&a[Si[t]].push(u[n][Si[t]]);function l(e){return new be(c.tagName(e).toLowerCase(),{},[],void 0,e)}function f(e,t){function n(){0===--n.listeners&&d(e)}return n.listeners=t,n}function d(e){var t=c.parentNode(e);i(t)&&c.removeChild(t,e)}function p(e,t,n,r,a,s,u){if(i(e.elm)&&i(s)&&(e=s[u]=Ce(e)),e.isRootInsert=!a,!h(e,t,n,r)){var l=e.data,f=e.children,d=e.tag;i(d)?(e.elm=e.ns?c.createElementNS(e.ns,d):c.createElement(d,e),O(e),b(e,f,t),i(l)&&_(e,t),y(n,e.elm,r)):o(e.isComment)?(e.elm=c.createComment(e.text),y(n,e.elm,r)):(e.elm=c.createTextNode(e.text),y(n,e.elm,r))}}function h(e,t,n,r){var a=e.data;if(i(a)){var s=i(e.componentInstance)&&a.keepAlive;if(i(a=a.hook)&&i(a=a.init)&&a(e,!1),i(e.componentInstance))return v(e,t),y(n,e.elm,r),o(s)&&g(e,t,n,r),!0}}function v(e,t){i(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,w(e)?(_(e,t),O(e)):(ji(e),t.push(e))}function g(e,t,n,r){var o,s=e;while(s.componentInstance)if(s=s.componentInstance._vnode,i(o=s.data)&&i(o=o.transition)){for(o=0;o<a.activate.length;++o)a.activate[o](Ti,s);t.push(s);break}y(n,e.elm,r)}function y(e,t,n){i(e)&&(i(n)?c.parentNode(n)===e&&c.insertBefore(e,t,n):c.appendChild(e,t))}function b(e,t,n){if(Array.isArray(t)){0;for(var r=0;r<t.length;++r)p(t[r],n,e.elm,null,!0,t,r)}else s(e.text)&&c.appendChild(e.elm,c.createTextNode(String(e.text)))}function w(e){while(e.componentInstance)e=e.componentInstance._vnode;return i(e.tag)}function _(e,n){for(var r=0;r<a.create.length;++r)a.create[r](Ti,e);t=e.data.hook,i(t)&&(i(t.create)&&t.create(Ti,e),i(t.insert)&&n.push(e))}function O(e){var t;if(i(t=e.fnScopeId))c.setStyleScope(e.elm,t);else{var n=e;while(n)i(t=n.context)&&i(t=t.$options._scopeId)&&c.setStyleScope(e.elm,t),n=n.parent}i(t=Mn)&&t!==e.context&&t!==e.fnContext&&i(t=t.$options._scopeId)&&c.setStyleScope(e.elm,t)}function C(e,t,n,r,i,o){for(;r<=i;++r)p(n[r],o,e,t,!1,n,r)}function x(e){var t,n,r=e.data;if(i(r))for(i(t=r.hook)&&i(t=t.destroy)&&t(e),t=0;t<a.destroy.length;++t)a.destroy[t](e);if(i(t=e.children))for(n=0;n<e.children.length;++n)x(e.children[n])}function j(e,t,n){for(;t<=n;++t){var r=e[t];i(r)&&(i(r.tag)?(T(r),x(r)):d(r.elm))}}function T(e,t){if(i(t)||i(e.data)){var n,r=a.remove.length+1;for(i(t)?t.listeners+=r:t=f(e.elm,r),i(n=e.componentInstance)&&i(n=n._vnode)&&i(n.data)&&T(n,t),n=0;n<a.remove.length;++n)a.remove[n](e,t);i(n=e.data.hook)&&i(n=n.remove)?n(e,t):t()}else d(e.elm)}function S(e,t,n,o,a){var s,u,l,f,d=0,h=0,v=t.length-1,m=t[0],g=t[v],y=n.length-1,b=n[0],w=n[y],_=!a;while(d<=v&&h<=y)r(m)?m=t[++d]:r(g)?g=t[--v]:ki(m,b)?(A(m,b,o,n,h),m=t[++d],b=n[++h]):ki(g,w)?(A(g,w,o,n,y),g=t[--v],w=n[--y]):ki(m,w)?(A(m,w,o,n,y),_&&c.insertBefore(e,m.elm,c.nextSibling(g.elm)),m=t[++d],w=n[--y]):ki(g,b)?(A(g,b,o,n,h),_&&c.insertBefore(e,g.elm,m.elm),g=t[--v],b=n[++h]):(r(s)&&(s=Mi(t,d,v)),u=i(b.key)?s[b.key]:k(b,t,d,v),r(u)?p(b,o,e,m.elm,!1,n,h):(l=t[u],ki(l,b)?(A(l,b,o,n,h),t[u]=void 0,_&&c.insertBefore(e,l.elm,m.elm)):p(b,o,e,m.elm,!1,n,h)),b=n[++h]);d>v?(f=r(n[y+1])?null:n[y+1].elm,C(e,f,n,h,y,o)):h>y&&j(t,d,v)}function k(e,t,n,r){for(var o=n;o<r;o++){var a=t[o];if(i(a)&&ki(e,a))return o}}function A(e,t,n,s,u,l){if(e!==t){i(t.elm)&&i(s)&&(t=s[u]=Ce(t));var f=t.elm=e.elm;if(o(e.isAsyncPlaceholder))i(t.asyncFactory.resolved)?I(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(o(t.isStatic)&&o(e.isStatic)&&t.key===e.key&&(o(t.isCloned)||o(t.isOnce)))t.componentInstance=e.componentInstance;else{var d,p=t.data;i(p)&&i(d=p.hook)&&i(d=d.prepatch)&&d(e,t);var h=e.children,v=t.children;if(i(p)&&w(t)){for(d=0;d<a.update.length;++d)a.update[d](e,t);i(d=p.hook)&&i(d=d.update)&&d(e,t)}r(t.text)?i(h)&&i(v)?h!==v&&S(f,h,v,n,l):i(v)?(i(e.text)&&c.setTextContent(f,""),C(f,null,v,0,v.length-1,n)):i(h)?j(h,0,h.length-1):i(e.text)&&c.setTextContent(f,""):e.text!==t.text&&c.setTextContent(f,t.text),i(p)&&i(d=p.hook)&&i(d=d.postpatch)&&d(e,t)}}}function M(e,t,n){if(o(n)&&i(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var E=m("attrs,class,staticClass,staticStyle,key");function I(e,t,n,r){var a,s=t.tag,u=t.data,c=t.children;if(r=r||u&&u.pre,t.elm=e,o(t.isComment)&&i(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(i(u)&&(i(a=u.hook)&&i(a=a.init)&&a(t,!0),i(a=t.componentInstance)))return v(t,n),!0;if(i(s)){if(i(c))if(e.hasChildNodes())if(i(a=u)&&i(a=a.domProps)&&i(a=a.innerHTML)){if(a!==e.innerHTML)return!1}else{for(var l=!0,f=e.firstChild,d=0;d<c.length;d++){if(!f||!I(f,c[d],n,r)){l=!1;break}f=f.nextSibling}if(!l||f)return!1}else b(t,c,n);if(i(u)){var p=!1;for(var h in u)if(!E(h)){p=!0,_(t,n);break}!p&&u["class"]&&mt(u["class"])}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,s){if(!r(t)){var u=!1,f=[];if(r(e))u=!0,p(t,f);else{var d=i(e.nodeType);if(!d&&ki(e,t))A(e,t,f,null,null,s);else{if(d){if(1===e.nodeType&&e.hasAttribute(L)&&(e.removeAttribute(L),n=!0),o(n)&&I(e,t,f))return M(t,f,!0),e;e=l(e)}var h=e.elm,v=c.parentNode(h);if(p(t,f,h._leaveCb?null:v,c.nextSibling(h)),i(t.parent)){var m=t.parent,g=w(t);while(m){for(var y=0;y<a.destroy.length;++y)a.destroy[y](m);if(m.elm=t.elm,g){for(var b=0;b<a.create.length;++b)a.create[b](Ti,m);var _=m.data.hook.insert;if(_.merged)for(var O=1;O<_.fns.length;O++)_.fns[O]()}else ji(m);m=m.parent}}i(v)?j([e],0,0):i(e.tag)&&x(e)}}return M(t,f,u),t.elm}i(e)&&x(e)}}var Ii={create:Pi,update:Pi,destroy:function(e){Pi(e,Ti)}};function Pi(e,t){(e.data.directives||t.data.directives)&&Di(e,t)}function Di(e,t){var n,r,i,o=e===Ti,a=t===Ti,s=Ni(e.data.directives,e.context),u=Ni(t.data.directives,t.context),c=[],l=[];for(n in u)r=s[n],i=u[n],r?(i.oldValue=r.value,i.oldArg=r.arg,Fi(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(Fi(i,"bind",t,e),i.def&&i.def.inserted&&c.push(i));if(c.length){var f=function(){for(var n=0;n<c.length;n++)Fi(c[n],"inserted",t,e)};o?_t(t,"insert",f):f()}if(l.length&&_t(t,"postpatch",(function(){for(var n=0;n<l.length;n++)Fi(l[n],"componentUpdated",t,e)})),!o)for(n in s)u[n]||Fi(s[n],"unbind",e,e,a)}var $i=Object.create(null);function Ni(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)r=e[n],r.modifiers||(r.modifiers=$i),i[Ri(r)]=r,r.def=Qe(t.$options,"directives",r.name,!0);return i}function Ri(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function Fi(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(Ca){tt(Ca,n.context,"directive "+e.name+" "+t+" hook")}}var Li=[xi,Ii];function Ui(e,t){var n=t.componentOptions;if((!i(n)||!1!==n.Ctor.options.inheritAttrs)&&(!r(e.data.attrs)||!r(t.data.attrs))){var o,a,s,u=t.elm,c=e.data.attrs||{},l=t.data.attrs||{};for(o in i(l.__ob__)&&(l=t.data.attrs=E({},l)),l)a=l[o],s=c[o],s!==a&&zi(u,o,a);for(o in(ee||ne)&&l.value!==c.value&&zi(u,"value",l.value),c)r(l[o])&&(Yr(o)?u.removeAttributeNS(Br,Vr(o)):zr(o)||u.removeAttribute(o))}}function zi(e,t,n){e.tagName.indexOf("-")>-1?Wi(e,t,n):qr(t)?Xr(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):zr(t)?e.setAttribute(t,Hr(t,n)):Yr(t)?Xr(n)?e.removeAttributeNS(Br,Vr(t)):e.setAttributeNS(Br,t,n):Wi(e,t,n)}function Wi(e,t,n){if(Xr(n))e.removeAttribute(t);else{if(ee&&!te&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var Hi={create:Ui,update:Ui};function qi(e,t){var n=t.elm,o=t.data,a=e.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Qr(t),u=n._transitionClasses;i(u)&&(s=Kr(s,Zr(u))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Bi,Yi={create:qi,update:qi},Vi="__r",Xi="__c";function Qi(e){if(i(e[Vi])){var t=ee?"change":"input";e[t]=[].concat(e[Vi],e[t]||[]),delete e[Vi]}i(e[Xi])&&(e.change=[].concat(e[Xi],e.change||[]),delete e[Xi])}function Gi(e,t,n){var r=Bi;return function i(){var o=t.apply(null,arguments);null!==o&&Zi(e,i,n,r)}}var Ji=at&&!(ie&&Number(ie[1])<=53);function Ki(e,t,n,r){if(Ji){var i=Vn,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}Bi.addEventListener(e,t,ae?{capture:n,passive:r}:n)}function Zi(e,t,n,r){(r||Bi).removeEventListener(e,t._wrapper||t,n)}function eo(e,t){if(!r(e.data.on)||!r(t.data.on)){var n=t.data.on||{},i=e.data.on||{};Bi=t.elm,Qi(n),wt(n,i,Ki,Zi,Gi,t.context),Bi=void 0}}var to,no={create:eo,update:eo};function ro(e,t){if(!r(e.data.domProps)||!r(t.data.domProps)){var n,o,a=t.elm,s=e.data.domProps||{},u=t.data.domProps||{};for(n in i(u.__ob__)&&(u=t.data.domProps=E({},u)),s)n in u||(a[n]="");for(n in u){if(o=u[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=o;var c=r(o)?"":String(o);io(a,c)&&(a.value=c)}else if("innerHTML"===n&&ii(a.tagName)&&r(a.innerHTML)){to=to||document.createElement("div"),to.innerHTML="<svg>"+o+"</svg>";var l=to.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(l.firstChild)a.appendChild(l.firstChild)}else if(o!==s[n])try{a[n]=o}catch(Ca){}}}}function io(e,t){return!e.composing&&("OPTION"===e.tagName||oo(e,t)||ao(e,t))}function oo(e,t){var n=!0;try{n=document.activeElement!==e}catch(Ca){}return n&&e.value!==t}function ao(e,t){var n=e.value,r=e._vModifiers;if(i(r)){if(r.number)return v(n)!==v(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}var so={create:ro,update:ro},uo=_((function(e){var t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach((function(e){if(e){var n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}));function co(e){var t=lo(e.style);return e.staticStyle?E(e.staticStyle,t):t}function lo(e){return Array.isArray(e)?I(e):"string"===typeof e?uo(e):e}function fo(e,t){var n,r={};if(t){var i=e;while(i.componentInstance)i=i.componentInstance._vnode,i&&i.data&&(n=co(i.data))&&E(r,n)}(n=co(e.data))&&E(r,n);var o=e;while(o=o.parent)o.data&&(n=co(o.data))&&E(r,n);return r}var po,ho=/^--/,vo=/\s*!important$/,mo=function(e,t,n){if(ho.test(t))e.style.setProperty(t,n);else if(vo.test(n))e.style.setProperty(T(t),n.replace(vo,""),"important");else{var r=yo(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},go=["Webkit","Moz","ms"],yo=_((function(e){if(po=po||document.createElement("div").style,e=C(e),"filter"!==e&&e in po)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<go.length;n++){var r=go[n]+t;if(r in po)return r}}));function bo(e,t){var n=t.data,o=e.data;if(!(r(n.staticStyle)&&r(n.style)&&r(o.staticStyle)&&r(o.style))){var a,s,u=t.elm,c=o.staticStyle,l=o.normalizedStyle||o.style||{},f=c||l,d=lo(t.data.style)||{};t.data.normalizedStyle=i(d.__ob__)?E({},d):d;var p=fo(t,!0);for(s in f)r(p[s])&&mo(u,s,"");for(s in p)a=p[s],a!==f[s]&&mo(u,s,null==a?"":a)}}var wo={create:bo,update:bo},_o=/\s+/;function Oo(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(_o).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Co(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(_o).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function xo(e){if(e){if("object"===typeof e){var t={};return!1!==e.css&&E(t,jo(e.name||"v")),E(t,e),t}return"string"===typeof e?jo(e):void 0}}var jo=_((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),To=G&&!te,So="transition",ko="animation",Ao="transition",Mo="transitionend",Eo="animation",Io="animationend";To&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ao="WebkitTransition",Mo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Eo="WebkitAnimation",Io="webkitAnimationEnd"));var Po=G?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Do(e){Po((function(){Po(e)}))}function $o(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Oo(e,t))}function No(e,t){e._transitionClasses&&y(e._transitionClasses,t),Co(e,t)}function Ro(e,t,n){var r=Lo(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===So?Mo:Io,u=0,c=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++u>=a&&c()};setTimeout((function(){u<a&&c()}),o+1),e.addEventListener(s,l)}var Fo=/\b(transform|all)(,|$)/;function Lo(e,t){var n,r=window.getComputedStyle(e),i=(r[Ao+"Delay"]||"").split(", "),o=(r[Ao+"Duration"]||"").split(", "),a=Uo(i,o),s=(r[Eo+"Delay"]||"").split(", "),u=(r[Eo+"Duration"]||"").split(", "),c=Uo(s,u),l=0,f=0;t===So?a>0&&(n=So,l=a,f=o.length):t===ko?c>0&&(n=ko,l=c,f=u.length):(l=Math.max(a,c),n=l>0?a>c?So:ko:null,f=n?n===So?o.length:u.length:0);var d=n===So&&Fo.test(r[Ao+"Property"]);return{type:n,timeout:l,propCount:f,hasTransform:d}}function Uo(e,t){while(e.length<t.length)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return zo(t)+zo(e[n])})))}function zo(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Wo(e,t){var n=e.elm;i(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var o=xo(e.data.transition);if(!r(o)&&!i(n._enterCb)&&1===n.nodeType){var a=o.css,s=o.type,c=o.enterClass,l=o.enterToClass,f=o.enterActiveClass,d=o.appearClass,p=o.appearToClass,h=o.appearActiveClass,m=o.beforeEnter,g=o.enter,y=o.afterEnter,b=o.enterCancelled,w=o.beforeAppear,_=o.appear,O=o.afterAppear,C=o.appearCancelled,x=o.duration,j=Mn,T=Mn.$vnode;while(T&&T.parent)j=T.context,T=T.parent;var S=!j._isMounted||!e.isRootInsert;if(!S||_||""===_){var k=S&&d?d:c,A=S&&h?h:f,M=S&&p?p:l,E=S&&w||m,I=S&&"function"===typeof _?_:g,P=S&&O||y,D=S&&C||b,$=v(u(x)?x.enter:x);0;var N=!1!==a&&!te,R=Bo(I),L=n._enterCb=F((function(){N&&(No(n,M),No(n,A)),L.cancelled?(N&&No(n,k),D&&D(n)):P&&P(n),n._enterCb=null}));e.data.show||_t(e,"insert",(function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),I&&I(n,L)})),E&&E(n),N&&($o(n,k),$o(n,A),Do((function(){No(n,k),L.cancelled||($o(n,M),R||(qo($)?setTimeout(L,$):Ro(n,s,L)))}))),e.data.show&&(t&&t(),I&&I(n,L)),N||R||L()}}}function Ho(e,t){var n=e.elm;i(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var o=xo(e.data.transition);if(r(o)||1!==n.nodeType)return t();if(!i(n._leaveCb)){var a=o.css,s=o.type,c=o.leaveClass,l=o.leaveToClass,f=o.leaveActiveClass,d=o.beforeLeave,p=o.leave,h=o.afterLeave,m=o.leaveCancelled,g=o.delayLeave,y=o.duration,b=!1!==a&&!te,w=Bo(p),_=v(u(y)?y.leave:y);0;var O=n._leaveCb=F((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),b&&(No(n,l),No(n,f)),O.cancelled?(b&&No(n,c),m&&m(n)):(t(),h&&h(n)),n._leaveCb=null}));g?g(C):C()}function C(){O.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),d&&d(n),b&&($o(n,c),$o(n,f),Do((function(){No(n,c),O.cancelled||($o(n,l),w||(qo(_)?setTimeout(O,_):Ro(n,s,O)))}))),p&&p(n,O),b||w||O())}}function qo(e){return"number"===typeof e&&!isNaN(e)}function Bo(e){if(r(e))return!1;var t=e.fns;return i(t)?Bo(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function Yo(e,t){!0!==t.data.show&&Wo(t)}var Vo=G?{create:Yo,activate:Yo,remove:function(e,t){!0!==e.data.show?Ho(e,t):t()}}:{},Xo=[Hi,Yi,no,so,wo,Vo],Qo=Xo.concat(Li),Go=Ei({nodeOps:Ci,modules:Qo});te&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&ia(e,"input")}));var Jo={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?_t(n,"postpatch",(function(){Jo.componentUpdated(e,t,n)})):Ko(e,t,n.context),e._vOptions=[].map.call(e.options,ta)):("textarea"===n.tag||ci(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",na),e.addEventListener("compositionend",ra),e.addEventListener("change",ra),te&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Ko(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,ta);if(i.some((function(e,t){return!N(e,r[t])}))){var o=e.multiple?t.value.some((function(e){return ea(e,i)})):t.value!==t.oldValue&&ea(t.value,i);o&&ia(e,"change")}}}};function Ko(e,t,n){Zo(e,t,n),(ee||ne)&&setTimeout((function(){Zo(e,t,n)}),0)}function Zo(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,u=e.options.length;s<u;s++)if(a=e.options[s],i)o=R(r,ta(a))>-1,a.selected!==o&&(a.selected=o);else if(N(ta(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function ea(e,t){return t.every((function(t){return!N(t,e)}))}function ta(e){return"_value"in e?e._value:e.value}function na(e){e.target.composing=!0}function ra(e){e.target.composing&&(e.target.composing=!1,ia(e.target,"input"))}function ia(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function oa(e){return!e.componentInstance||e.data&&e.data.transition?e:oa(e.componentInstance._vnode)}var aa={bind:function(e,t,n){var r=t.value;n=oa(n);var i=n.data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Wo(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value,i=t.oldValue;if(!r!==!i){n=oa(n);var o=n.data&&n.data.transition;o?(n.data.show=!0,r?Wo(n,(function(){e.style.display=e.__vOriginalDisplay})):Ho(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none"}},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}},sa={model:Jo,show:aa},ua={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ca(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?ca(Cn(t.children)):e}function la(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[C(o)]=i[o];return t}function fa(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function da(e){while(e=e.parent)if(e.data.transition)return!0}function pa(e,t){return t.key===e.key&&t.tag===e.tag}var ha=function(e){return e.tag||On(e)},va=function(e){return"show"===e.name},ma={name:"transition",props:ua,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(ha),n.length)){0;var r=this.mode;0;var i=n[0];if(da(this.$vnode))return i;var o=ca(i);if(!o)return i;if(this._leaving)return fa(e,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var u=(o.data||(o.data={})).transition=la(this),c=this._vnode,l=ca(c);if(o.data.directives&&o.data.directives.some(va)&&(o.data.show=!0),l&&l.data&&!pa(o,l)&&!On(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=E({},u);if("out-in"===r)return this._leaving=!0,_t(f,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),fa(e,i);if("in-out"===r){if(On(o))return c;var d,p=function(){d()};_t(u,"afterEnter",p),_t(u,"enterCancelled",p),_t(f,"delayLeave",(function(e){d=e}))}}return i}}},ga=E({tag:String,moveClass:String},ua);delete ga.mode;var ya={props:ga,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=En(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=la(this),s=0;s<i.length;s++){var u=i[s];if(u.tag)if(null!=u.key&&0!==String(u.key).indexOf("__vlist"))o.push(u),n[u.key]=u,(u.data||(u.data={})).transition=a;else;}if(r){for(var c=[],l=[],f=0;f<r.length;f++){var d=r[f];d.data.transition=a,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?c.push(d):l.push(d)}this.kept=e(t,null,c),this.removed=l}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(ba),e.forEach(wa),e.forEach(_a),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,r=n.style;$o(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Mo,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Mo,e),n._moveCb=null,No(n,t))})}})))},methods:{hasMove:function(e,t){if(!To)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){Co(n,e)})),Oo(n,t),n.style.display="none",this.$el.appendChild(n);var r=Lo(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function ba(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function wa(e){e.data.newPos=e.elm.getBoundingClientRect()}function _a(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}var Oa={Transition:ma,TransitionGroup:ya};Cr.config.mustUseProp=Ur,Cr.config.isReservedTag=oi,Cr.config.isReservedAttr=Fr,Cr.config.getTagNamespace=ai,Cr.config.isUnknownElement=ui,E(Cr.options.directives,sa),E(Cr.options.components,Oa),Cr.prototype.__patch__=G?Go:P,Cr.prototype.$mount=function(e,t){return e=e&&G?li(e):void 0,Dn(this,e,t)},G&&setTimeout((function(){W.devtools&&ce&&ce.emit("init",Cr)}),0),t["a"]=Cr}).call(this,n("c8ba"))},"2fc8":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("4aa2"),i=n("9ebd");function o(e){return function t(n,o){switch(arguments.length){case 0:return t;case 1:return Object(i["a"])(n)?t:Object(r["a"])((function(t){return e(n,t)}));default:return Object(i["a"])(n)&&Object(i["a"])(o)?t:Object(i["a"])(n)?Object(r["a"])((function(t){return e(t,o)})):Object(i["a"])(o)?Object(r["a"])((function(t){return e(n,t)})):e(n,o)}}}},3843:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n("4aa2"),i=n("fcfb");function o(e){return"[object String]"===Object.prototype.toString.call(e)}var a=Object(r["a"])((function(e){return!!Object(i["a"])(e)||!!e&&("object"===typeof e&&(!o(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))})),s=a,u=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();function c(e){return new u(e)}var l=n("2550"),f=n("2fc8"),d=Object(f["a"])((function(e,t){return Object(l["a"])(e.length,(function(){return e.apply(t,arguments)}))})),p=d;function h(e,t,n){var r=0,i=n.length;while(r<i){if(t=e["@@transducer/step"](t,n[r]),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}function v(e,t,n){var r=n.next();while(!r.done){if(t=e["@@transducer/step"](t,r.value),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function m(e,t,n,r){return e["@@transducer/result"](n[r](p(e["@@transducer/step"],e),t))}var g="undefined"!==typeof Symbol?Symbol.iterator:"@@iterator";function y(e,t,n){if("function"===typeof e&&(e=c(e)),s(n))return h(e,t,n);if("function"===typeof n["fantasy-land/reduce"])return m(e,t,n,"fantasy-land/reduce");if(null!=n[g])return v(e,t,n[g]());if("function"===typeof n.next)return v(e,t,n);if("function"===typeof n.reduce)return m(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}},"4aa2":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("9ebd");function i(e){return function t(n){return 0===arguments.length||Object(r["a"])(n)?t:e.apply(this,arguments)}}},"529a":function(e,t,n){"use strict";var r=n("2fc8"),i=n("8127");function o(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}var a=n("64c8"),s=function(){function e(e,t){this.xf=t,this.f=e,this.found=!1}return e.prototype["@@transducer/init"]=a["a"].init,e.prototype["@@transducer/result"]=function(e){return this.found||(e=this.xf["@@transducer/step"](e,void 0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)&&(this.found=!0,e=o(this.xf["@@transducer/step"](e,t))),e},e}(),u=Object(r["a"])((function(e,t){return new s(e,t)})),c=u,l=Object(r["a"])(Object(i["a"])(["find"],c,(function(e,t){var n=0,r=t.length;while(n<r){if(e(t[n]))return t[n];n+=1}})));t["a"]=l},6433:function(e,t,n){"use strict";var r=n("d73f"),i=Object(r["a"])((function(e,t,n){var r=e(t),i=e(n);return r>i?-1:r<i?1:0}));t["a"]=i},"64c8":function(e,t,n){"use strict";t["a"]={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}}},"66e1":function(e,t,n){"use strict";var r=n("4aa2"),i=n("c325"),o=Object.prototype.toString,a=function(){return"[object Arguments]"===o.call(arguments)?function(e){return"[object Arguments]"===o.call(e)}:function(e){return Object(i["a"])("callee",e)}}(),s=a,u=!{toString:null}.propertyIsEnumerable("toString"),c=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],l=function(){return arguments.propertyIsEnumerable("length")}(),f=function(e,t){var n=0;while(n<e.length){if(e[n]===t)return!0;n+=1}return!1},d="function"!==typeof Object.keys||l?Object(r["a"])((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=l&&s(e);for(t in e)!Object(i["a"])(t,e)||o&&"length"===t||(r[r.length]=t);if(u){n=c.length-1;while(n>=0)t=c[n],Object(i["a"])(t,e)&&!f(r,t)&&(r[r.length]=t),n-=1}return r})):Object(r["a"])((function(e){return Object(e)!==e?[]:Object.keys(e)}));t["a"]=d},7620:function(e,t,n){"use strict";var r=n("2fc8");function i(e){var t,n=[];while(!(t=e.next()).done)n.push(t.value);return n}function o(e,t,n){var r=0,i=n.length;while(r<i){if(e(t,n[r]))return!0;r+=1}return!1}function a(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}var s=n("c325");function u(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}var c="function"===typeof Object.is?Object.is:u,l=n("66e1"),f=n("4aa2"),d=Object(f["a"])((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)})),p=d;function h(e,t,n,r){var a=i(e),s=i(t);function u(e,t){return v(e,t,n.slice(),r.slice())}return!o((function(e,t){return!o(u,t,e)}),s,a)}function v(e,t,n,r){if(c(e,t))return!0;var i=p(e);if(i!==p(t))return!1;if(null==e||null==t)return!1;if("function"===typeof e["fantasy-land/equals"]||"function"===typeof t["fantasy-land/equals"])return"function"===typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"===typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"===typeof e.equals||"function"===typeof t.equals)return"function"===typeof e.equals&&e.equals(t)&&"function"===typeof t.equals&&t.equals(e);switch(i){case"Arguments":case"Array":case"Object":if("function"===typeof e.constructor&&"Promise"===a(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!==typeof t||!c(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!c(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1;break}var o=n.length-1;while(o>=0){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size===t.size&&h(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&h(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=Object(l["a"])(e);if(u.length!==Object(l["a"])(t).length)return!1;var f=n.concat([e]),d=r.concat([t]);o=u.length-1;while(o>=0){var m=u[o];if(!Object(s["a"])(m,t)||!v(t[m],e[m],f,d))return!1;o-=1}return!0}var m=Object(r["a"])((function(e,t){return v(e,t,[],[])}));t["a"]=m},7677:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("fd3a"),i=n("8c86");function o(e,t){Object(i["a"])(2,arguments);var n=Object(r["a"])(e),o=Object(r["a"])(t);return n.getTime()<o.getTime()}},8127:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("fcfb");function i(e){return null!=e&&"function"===typeof e["@@transducer/step"]}function o(e,t,n){return function(){if(0===arguments.length)return n();var o=Array.prototype.slice.call(arguments,0),a=o.pop();if(!Object(r["a"])(a)){var s=0;while(s<e.length){if("function"===typeof a[e[s]])return a[e[s]].apply(a,o);s+=1}if(i(a)){var u=t.apply(null,o);return u(a)}}return n.apply(this,arguments)}}},"8c86":function(e,t,n){"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,"a",(function(){return r}))},"8db5":function(e,t,n){(function(t){if("undefined"!==typeof window){var n=!0,r=10,i="",o=0,a="",s=null,u="",c=!1,l={resize:1,click:1},f=128,d=!0,p=1,h="bodyOffset",v=h,m=!0,g="",y={},b=32,w=null,_=!1,O=!1,C="[iFrameSizer]",x=C.length,j="",T={max:1,min:1,bodyScroll:1,documentElementScroll:1},S="child",k=!0,A=window.parent,M="*",E=0,I=!1,P=null,D=16,$=1,N="scroll",R=N,F=window,L=function(){ne("onMessage function not defined")},U=function(){},z=function(){},W={height:function(){return ne("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return ne("Custom width calculation function not defined"),document.body.scrollWidth}},H={},q=!1;try{var B=Object.create({},{passive:{get:function(){q=!0}}});window.addEventListener("test",Q,B),window.removeEventListener("test",Q,B)}catch(Ue){}var Y={bodyOffset:function(){return document.body.offsetHeight+Te("marginTop")+Te("marginBottom")},offset:function(){return Y.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return W.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,Ae(Y))},min:function(){return Math.min.apply(null,Ae(Y))},grow:function(){return Y.max()},lowestElement:function(){return Math.max(Y.bodyOffset()||Y.documentElementOffset(),ke("bottom",Ee()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},V={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return W.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(V.bodyScroll(),V.documentElementScroll())},max:function(){return Math.max.apply(null,Ae(V))},min:function(){return Math.min.apply(null,Ae(V))},rightMostElement:function(){return ke("right",Ee())},taggedElement:function(){return Me("right","data-iframe-width")}},X=Z(Ie);G(window,"message",Fe),G(window,"readystatechange",Le),Le()}function Q(){}function G(e,t,n,r){e.addEventListener(t,n,!!q&&(r||{}))}function J(e,t,n){e.removeEventListener(t,n,!1)}function K(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Z(e){var t,n,r,i=null,o=0,a=function(){o=Date.now(),i=null,r=e.apply(t,n),i||(t=n=null)};return function(){var s=Date.now();o||(o=s);var u=D-(s-o);return t=this,n=arguments,u<=0||u>D?(i&&(clearTimeout(i),i=null),o=s,r=e.apply(t,n),i||(t=n=null)):i||(i=setTimeout(a,u)),r}}function ee(e){return C+"["+j+"] "+e}function te(e){_&&"object"===typeof window.console&&console.log(ee(e))}function ne(e){"object"===typeof window.console&&console.warn(ee(e))}function re(){ie(),te("Initialising iFrame ("+window.location.href+")"),ae(),ce(),ue("background",i),ue("padding",u),be(),he(),ve(),le(),Oe(),_e(),me(),y=we(),Pe("init","Init message from host page"),U()}function ie(){function e(e){return"true"===e}var r=g.substr(x).split(":");j=r[0],o=t!==r[1]?Number(r[1]):o,c=t!==r[2]?e(r[2]):c,_=t!==r[3]?e(r[3]):_,b=t!==r[4]?Number(r[4]):b,n=t!==r[6]?e(r[6]):n,a=r[7],v=t!==r[8]?r[8]:v,i=r[9],u=r[10],E=t!==r[11]?Number(r[11]):E,y.enable=t!==r[12]&&e(r[12]),S=t!==r[13]?r[13]:S,R=t!==r[14]?r[14]:R,O=t!==r[15]?Boolean(r[15]):O}function oe(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],ne("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function ae(){function e(){var e=window.iFrameResizer;te("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(oe,e),L="onMessage"in e?e.onMessage:L,U="onReady"in e?e.onReady:U,M="targetOrigin"in e?e.targetOrigin:M,v="heightCalculationMethod"in e?e.heightCalculationMethod:v,R="widthCalculationMethod"in e?e.widthCalculationMethod:R}function t(e,t){return"function"===typeof e&&(te("Setup custom "+t+"CalcMethod"),W[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),v=t(v,"height"),R=t(R,"width")),te("TargetOrigin for parent set to: "+M)}function se(e,t){return-1!==t.indexOf("-")&&(ne("Negative CSS value ignored for "+e),t=""),t}function ue(e,n){t!==n&&""!==n&&"null"!==n&&(document.body.style[e]=n,te("Body "+e+' set to "'+n+'"'))}function ce(){t===a&&(a=o+"px"),ue("margin",se("margin",a))}function le(){document.documentElement.style.height="",document.body.style.height="",te('HTML & body height set to "auto"')}function fe(e){var t={add:function(t){function n(){Pe(e.eventName,e.eventType)}H[t]=n,G(window,t,n,{passive:!0})},remove:function(e){var t=H[e];delete H[e],J(window,e,t)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),te(K(e.method)+" event listener: "+e.eventType)}function de(e){fe({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),fe({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),fe({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),fe({method:e,eventType:"Input",eventName:"input"}),fe({method:e,eventType:"Mouse Up",eventName:"mouseup"}),fe({method:e,eventType:"Mouse Down",eventName:"mousedown"}),fe({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),fe({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),fe({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),fe({method:e,eventType:"Touch Start",eventName:"touchstart"}),fe({method:e,eventType:"Touch End",eventName:"touchend"}),fe({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),fe({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),fe({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),fe({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===S&&fe({method:e,eventType:"IFrame Resized",eventName:"resize"})}function pe(e,t,n,r){return t!==e&&(e in n||(ne(e+" is not a valid option for "+r+"CalculationMethod."),e=t),te(r+' calculation method set to "'+e+'"')),e}function he(){v=pe(v,h,Y,"height")}function ve(){R=pe(R,N,V,"width")}function me(){!0===n?(de("add"),je()):te("Auto Resize disabled")}function ge(){null!==s&&s.disconnect()}function ye(){de("remove"),ge(),clearInterval(w)}function be(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function we(){function e(){return{x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}}function n(t){var n=t.getBoundingClientRect(),r=e();return{x:parseInt(n.left,10)+parseInt(r.x,10),y:parseInt(n.top,10)+parseInt(r.y,10)}}function r(e){function r(e){var t=n(e);te("Moving to in page link (#"+i+") at x: "+t.x+" y: "+t.y),Re(t.y,t.x,"scrollToOffset")}var i=e.split("#")[1]||e,o=decodeURIComponent(i),a=document.getElementById(o)||document.getElementsByName(o)[0];t!==a?r(a):(te("In page link (#"+i+") not found in iFrame, so sending to parent"),Re(0,0,"inPageLink","#"+i))}function i(){var e=window.location.hash,t=window.location.href;""!==e&&"#"!==e&&r(t)}function o(){function e(e){function t(e){e.preventDefault(),r(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&G(e,"click",t)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),e)}function a(){G(window,"hashchange",i)}function s(){setTimeout(i,f)}function u(){Array.prototype.forEach&&document.querySelectorAll?(te("Setting up location.hash handlers"),o(),a(),s()):ne("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return y.enable?u():te("In page linking not enabled"),{findTarget:r}}function _e(){function e(e){Re(0,0,e.type,e.screenY+":"+e.screenX)}function t(t,n){te("Add event listener: "+n),G(window.document,t,e)}!0===O&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}function Oe(){te("Enable public methods"),F.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,me()):!1===e&&!0===n&&(n=!1,ye()),Re(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Re(0,0,"close")},getId:function(){return j},getPageInfo:function(e){"function"===typeof e?(z=e,Re(0,0,"pageInfo")):(z=function(){},Re(0,0,"pageInfoStop"))},moveToAnchor:function(e){y.findTarget(e)},reset:function(){Ne("parentIFrame.reset")},scrollTo:function(e,t){Re(t,e,"scrollTo")},scrollToOffset:function(e,t){Re(t,e,"scrollToOffset")},sendMessage:function(e,t){Re(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){v=e,he()},setWidthCalculationMethod:function(e){R=e,ve()},setTargetOrigin:function(e){te("Set targetOrigin: "+e),M=e},size:function(e,t){var n=(e||"")+(t?","+t:"");Pe("size","parentIFrame.size("+n+")",e,t)}}}function Ce(){0!==b&&(te("setInterval: "+b+"ms"),w=setInterval((function(){Pe("interval","setInterval: "+b)}),Math.abs(b)))}function xe(){function e(e){function t(e){!1===e.complete&&(te("Attach listeners to "+e.src),e.addEventListener("load",i,!1),e.addEventListener("error",o,!1),u.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function t(e){u.splice(u.indexOf(e),1)}function n(e){te("Remove listeners from "+e.src),e.removeEventListener("load",i,!1),e.removeEventListener("error",o,!1),t(e)}function r(e,t,r){n(e.target),Pe(t,r+": "+e.target.src)}function i(e){r(e,"imageLoad","Image loaded")}function o(e){r(e,"imageLoadFailed","Image load failed")}function a(t){Pe("mutationObserver","mutationObserver: "+t[0].target+" "+t[0].type),t.forEach(e)}function s(){var e=document.querySelector("body"),t={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return l=new c(a),te("Create body MutationObserver"),l.observe(e,t),l}var u=[],c=window.MutationObserver||window.WebKitMutationObserver,l=s();return{disconnect:function(){"disconnect"in l&&(te("Disconnect body MutationObserver"),l.disconnect(),u.forEach(n))}}}function je(){var e=0>b;window.MutationObserver||window.WebKitMutationObserver?e?Ce():s=xe():(te("MutationObserver not supported in this browser!"),Ce())}function Te(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=null!==n?n[e]:0,parseInt(n,r)}function Se(e){e>D/2&&(D=2*e,te("Event throttle increased to "+D+"ms"))}function ke(e,t){for(var n=t.length,r=0,i=0,o=K(e),a=Date.now(),s=0;s<n;s++)r=t[s].getBoundingClientRect()[e]+Te("margin"+o,t[s]),r>i&&(i=r);return a=Date.now()-a,te("Parsed "+n+" HTML elements"),te("Element position calculated in "+a+"ms"),Se(a),i}function Ae(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Me(e,t){function n(){return ne("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var r=document.querySelectorAll("["+t+"]");return 0===r.length&&n(),ke(e,r)}function Ee(){return document.querySelectorAll("body *")}function Ie(e,n,r,i){function o(){p=d,$=h,Re(p,$,e)}function a(){function e(e,t){var n=Math.abs(e-t)<=E;return!n}return d=t!==r?r:Y[v](),h=t!==i?i:V[R](),e(p,d)||c&&e($,h)}function s(){return!(e in{init:1,interval:1,size:1})}function u(){return v in T||c&&R in T}function l(){te("No change in size detected")}function f(){s()&&u()?Ne(n):e in{interval:1}||l()}var d,h;a()||"init"===e?(De(),o()):f()}function Pe(e,t,n,r){function i(){e in{reset:1,resetPage:1,init:1}||te("Trigger event: "+t)}function o(){return I&&e in l}o()?te("Trigger event cancelled: "+e):(i(),"init"===e?Ie(e,t,n,r):X(e,t,n,r))}function De(){I||(I=!0,te("Trigger event lock on")),clearTimeout(P),P=setTimeout((function(){I=!1,te("Trigger event lock off"),te("--")}),f)}function $e(e){p=Y[v](),$=V[R](),Re(p,$,e)}function Ne(e){var t=v;v=h,te("Reset trigger event: "+e),De(),$e("reset"),v=t}function Re(e,n,r,i,o){function a(){t===o?o=M:te("Message targetOrigin: "+o)}function s(){var a=e+":"+n,s=j+":"+a+":"+r+(t!==i?":"+i:"");te("Sending message to host page ("+s+")"),A.postMessage(C+s,o)}!0===k&&(a(),s())}function Fe(t){var n={init:function(){g=t.data,A=t.source,re(),d=!1,setTimeout((function(){m=!1}),f)},reset:function(){m?te("Page reset ignored by init"):(te("Page size reset by host page"),$e("resetPage"))},resize:function(){Pe("resizeParent","Parent window requested size check")},moveToAnchor:function(){y.findTarget(o())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=o();te("PageInfoFromParent called from parent: "+e),z(JSON.parse(e)),te(" --")},message:function(){var e=o();te("onMessage called from parent: "+e),L(JSON.parse(e)),te(" --")}};function r(){return C===(""+t.data).substr(0,x)}function i(){return t.data.split("]")[1].split(":")[0]}function o(){return t.data.substr(t.data.indexOf(":")+1)}function a(){return!e.exports&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype}function s(){return t.data.split(":")[2]in{true:1,false:1}}function u(){var e=i();e in n?n[e]():a()||s()||ne("Unexpected message ("+t.data+")")}function c(){!1===d?u():s()?n.init():te('Ignored message of type "'+i()+'". Received before initialization.')}r()&&c()}function Le(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}})()},"95bf":function(e,t,n){"use strict";(function(e){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var a=function(e,t){return e.matches?e.matches(t):e.msMatchesSelector?e.msMatchesSelector(t):e.webkitMatchesSelector?e.webkitMatchesSelector(t):null},s=function(e,t){var n=e;while(n&&1===n.nodeType){if(a(n,t))return n;n=n.parentNode}return null},u=function(e,t){return e.closest?e.closest(t):s(e,t)},c=function(e){return Boolean(e&&"function"===typeof e.then)},l=function e(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=i.search,a=i.autoSelect,s=void 0!==a&&a,l=i.setValue,f=void 0===l?function(){}:l,d=i.setAttribute,p=void 0===d?function(){}:d,h=i.onUpdate,v=void 0===h?function(){}:h,m=i.onSubmit,g=void 0===m?function(){}:m,y=i.onShow,b=void 0===y?function(){}:y,w=i.onHide,_=void 0===w?function(){}:w,O=i.onLoading,C=void 0===O?function(){}:O,x=i.onLoaded,j=void 0===x?function(){}:x;n(this,e),r(this,"value",""),r(this,"searchCounter",0),r(this,"results",[]),r(this,"selectedIndex",-1),r(this,"handleInput",(function(e){var n=e.target.value;t.updateResults(n),t.value=n})),r(this,"handleKeyDown",(function(e){var n=e.key;switch(n){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var r="ArrowUp"===n||"Up"===n?t.selectedIndex-1:t.selectedIndex+1;e.preventDefault(),t.handleArrows(r);break;case"Tab":t.selectResult();break;case"Enter":var i=t.results[t.selectedIndex];t.selectResult(),t.onSubmit(i);break;case"Esc":case"Escape":t.hideResults(),t.setValue();break;default:return}})),r(this,"handleFocus",(function(e){var n=e.target.value;t.updateResults(n),t.value=n})),r(this,"handleBlur",(function(){t.hideResults()})),r(this,"handleResultMouseDown",(function(e){e.preventDefault()})),r(this,"handleResultClick",(function(e){var n=e.target,r=u(n,"[data-result-index]");if(r){t.selectedIndex=parseInt(r.dataset.resultIndex,10);var i=t.results[t.selectedIndex];t.selectResult(),t.onSubmit(i)}})),r(this,"handleArrows",(function(e){var n=t.results.length;t.selectedIndex=(e%n+n)%n,t.onUpdate(t.results,t.selectedIndex)})),r(this,"selectResult",(function(){var e=t.results[t.selectedIndex];e&&t.setValue(e),t.hideResults()})),r(this,"updateResults",(function(e){var n=++t.searchCounter;t.onLoading(),t.search(e).then((function(e){n===t.searchCounter&&(t.results=e,t.onLoaded(),0!==t.results.length?(t.selectedIndex=t.autoSelect?0:-1,t.onUpdate(t.results,t.selectedIndex),t.showResults()):t.hideResults())}))})),r(this,"showResults",(function(){t.setAttribute("aria-expanded",!0),t.onShow()})),r(this,"hideResults",(function(){t.selectedIndex=-1,t.results=[],t.setAttribute("aria-expanded",!1),t.setAttribute("aria-activedescendant",""),t.onUpdate(t.results,t.selectedIndex),t.onHide()})),r(this,"checkSelectedResultVisible",(function(e){var n=e.querySelector('[data-result-index="'.concat(t.selectedIndex,'"]'));if(n){var r=e.getBoundingClientRect(),i=n.getBoundingClientRect();i.top<r.top?e.scrollTop-=r.top-i.top:i.bottom>r.bottom&&(e.scrollTop+=i.bottom-r.bottom)}})),this.search=c(o)?o:function(e){return Promise.resolve(o(e))},this.autoSelect=s,this.setValue=f,this.setAttribute=p,this.onUpdate=v,this.onSubmit=g,this.onShow=b,this.onHide=_,this.onLoading=C,this.onLoaded=j},f=0,d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(e).concat(++f)},p=function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.bottom+r.height>window.innerHeight&&window.innerHeight-n.bottom<n.top&&window.pageYOffset+n.top-r.height>0;return i?"above":"below"},h=function(e,t,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||e.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(a,t),s&&e.apply(i,o)}},v={name:"Autocomplete",inheritAttrs:!1,props:{search:{type:Function,required:!0},baseClass:{type:String,default:"autocomplete"},autoSelect:{type:Boolean,default:!1},getResultValue:{type:Function,default:function(e){return e}},defaultValue:{type:String,default:""},debounceTime:{type:Number,default:0}},data:function(){var e=new l({search:this.search,autoSelect:this.autoSelect,setValue:this.setValue,onUpdate:this.handleUpdate,onSubmit:this.handleSubmit,onShow:this.handleShow,onHide:this.handleHide,onLoading:this.handleLoading,onLoaded:this.handleLoaded});return this.debounceTime>0&&(e.handleInput=h(e.handleInput,this.debounceTime)),{core:e,value:this.defaultValue,resultListId:d("".concat(this.baseClass,"-result-list-")),results:[],selectedIndex:-1,expanded:!1,loading:!1,position:"below",resetPosition:!0}},computed:{rootProps:function(){return{class:this.baseClass,style:{position:"relative"},"data-expanded":this.expanded,"data-loading":this.loading,"data-position":this.position}},inputProps:function(){return o({class:"".concat(this.baseClass,"-input"),value:this.value,role:"combobox",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:"false","aria-autocomplete":"list","aria-haspopup":"listbox","aria-owns":this.resultListId,"aria-expanded":this.expanded?"true":"false","aria-activedescendant":this.selectedIndex>-1?this.resultProps[this.selectedIndex].id:""},this.$attrs)},inputListeners:function(){return{input:this.handleInput,keydown:this.core.handleKeyDown,focus:this.core.handleFocus,blur:this.core.handleBlur}},resultListProps:function(){var e="below"===this.position?"top":"bottom";return{id:this.resultListId,class:"".concat(this.baseClass,"-result-list"),role:"listbox",style:r({position:"absolute",zIndex:1,width:"100%",visibility:this.expanded?"visible":"hidden",pointerEvents:this.expanded?"auto":"none"},e,"100%")}},resultListListeners:function(){return{mousedown:this.core.handleResultMouseDown,click:this.core.handleResultClick}},resultProps:function(){var e=this;return this.results.map((function(t,n){return o({id:"".concat(e.baseClass,"-result-").concat(n),class:"".concat(e.baseClass,"-result"),"data-result-index":n,role:"option"},e.selectedIndex===n?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){this.$refs.input&&this.$refs.resultList&&(this.resetPosition&&this.results.length>0&&(this.resetPosition=!1,this.position=p(this.$refs.input,this.$refs.resultList)),this.core.checkSelectedResultVisible(this.$refs.resultList))},methods:{setValue:function(e){this.value=e?this.getResultValue(e):""},handleUpdate:function(e,t){this.results=e,this.selectedIndex=t,this.$emit("update",e,t)},handleShow:function(){this.expanded=!0},handleHide:function(){this.expanded=!1,this.resetPosition=!0},handleLoading:function(){this.loading=!0},handleLoaded:function(){this.loading=!1},handleInput:function(e){this.value=e.target.value,this.core.handleInput(e)},handleSubmit:function(e){this.$emit("submit",e)},handleDocumentClick:function(e){this.$refs.root.contains(e.target)||this.core.hideResults()}}};function m(e,t,n,r,i,o,a,s,u,c){"boolean"!==typeof a&&(u=s,s=a,a=!1);const l="function"===typeof n?n.options:n;let f;if(e&&e.render&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),r&&(l._scopeId=r),o?(f=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,u(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},l._ssrRegister=f):t&&(f=a?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,s(e))}),f)if(l.functional){const e=l.render;l.render=function(t,n){return f.call(n),e(t,n)}}else{const e=l.beforeCreate;l.beforeCreate=e?[].concat(e,f):[f]}return n}const g=v;var y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"root"},[e._t("default",[n("div",e._b({},"div",e.rootProps,!1),[n("input",e._g(e._b({ref:"input",on:{input:e.handleInput,keydown:e.core.handleKeyDown,focus:e.core.handleFocus,blur:e.core.handleBlur}},"input",e.inputProps,!1),e.$listeners)),e._v(" "),n("ul",e._g(e._b({ref:"resultList"},"ul",e.resultListProps,!1),e.resultListListeners),[e._l(e.results,(function(t,r){return[e._t("result",[n("li",e._b({key:e.resultProps[r].id},"li",e.resultProps[r],!1),[e._v("\n              "+e._s(e.getResultValue(t))+"\n            ")])],{result:t,props:e.resultProps[r]})]}))],2)])],{rootProps:e.rootProps,inputProps:e.inputProps,inputListeners:e.inputListeners,resultListProps:e.resultListProps,resultListListeners:e.resultListListeners,results:e.results,resultProps:e.resultProps})],2)},b=[];const w=void 0,_=void 0,O=void 0,C=!1,x=m({render:y,staticRenderFns:b},w,g,_,C,O,!1,void 0,void 0,void 0);function j(e){j.installed||(j.installed=!0,e.component("Autocomplete",x))}var T,S={install:j};"undefined"!==typeof window?T=window.Vue:"undefined"!==typeof e&&(T=e.Vue),T&&T.use(S),x.install=j,t["a"]=x}).call(this,n("c8ba"))},"99da":function(e,t,n){e.exports=n("cd33")},"9ab4":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));function r(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}},"9ebd":function(e,t,n){"use strict";function r(e){return null!=e&&"object"===typeof e&&!0===e["@@functional/placeholder"]}n.d(t,"a",(function(){return r}))},a78e:function(e,t,n){var r,i;
/*!
 * JavaScript Cookie v2.2.1
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */(function(o){var a;if(r=o,i="function"===typeof r?r.call(t,n,t,e):r,void 0===i||(e.exports=i),a=!0,e.exports=o(),a=!0,!a){var s=window.Cookies,u=window.Cookies=o();u.noConflict=function(){return window.Cookies=s,u}}})((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function n(r){function i(){}function o(t,n,o){if("undefined"!==typeof document){o=e({path:"/"},i.defaults,o),"number"===typeof o.expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(c){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var u in o)o[u]&&(s+="; "+u,!0!==o[u]&&(s+="="+o[u].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!==typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],a=0;a<o.length;a++){var s=o[a].split("="),u=s.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var c=t(s[0]);if(u=(r.read||r)(u,c)||t(u),n)try{u=JSON.parse(u)}catch(l){}if(i[c]=u,e===c)break}catch(l){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return a(e,!1)},i.getJSON=function(e){return a(e,!0)},i.remove=function(t,n){o(t,"",e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}return n((function(){}))}))},b0db:function(e,t,n){"use strict";var r=n("2fc8"),i=n("8127");function o(e,t){var n=0,r=t.length,i=Array(r);while(n<r)i[n]=e(t[n]),n+=1;return i}var a=n("3843"),s=n("64c8"),u=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=s["a"].init,e.prototype["@@transducer/result"]=s["a"].result,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),c=Object(r["a"])((function(e,t){return new u(e,t)})),l=c,f=n("2550"),d=n("4aa2"),p=n("9ebd");function h(e,t,n){return function(){var r=[],i=0,o=e,a=0;while(a<t.length||i<arguments.length){var s;a<t.length&&(!Object(p["a"])(t[a])||i>=arguments.length)?s=t[a]:(s=arguments[i],i+=1),r[a]=s,Object(p["a"])(s)||(o-=1),a+=1}return o<=0?n.apply(this,r):Object(f["a"])(o,h(e,r,n))}}var v=Object(r["a"])((function(e,t){return 1===e?Object(d["a"])(t):Object(f["a"])(e,h(e,[],t))})),m=v,g=n("66e1"),y=Object(r["a"])(Object(i["a"])(["fantasy-land/map","map"],l,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return m(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return Object(a["a"])((function(n,r){return n[r]=e(t[r]),n}),{},Object(g["a"])(t));default:return o(e,t)}})));t["a"]=y},b166:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ie}));var r=n("fd3a"),i=n("8c86");function o(e){Object(i["a"])(1,arguments);var t=Object(r["a"])(e);return!isNaN(t)}var a={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function s(e,t,n){var r;return n=n||{},r="string"===typeof a[e]?a[e]:1===t?a[e].one:a[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r}function u(e){return function(t){var n=t||{},r=n.width?String(n.width):e.defaultWidth,i=e.formats[r]||e.formats[e.defaultWidth];return i}}var c={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},l={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},f={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},d={date:u({formats:c,defaultWidth:"full"}),time:u({formats:l,defaultWidth:"full"}),dateTime:u({formats:f,defaultWidth:"full"})},p=d,h={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function v(e,t,n,r){return h[e]}function m(e){return function(t,n){var r,i=n||{},o=i.context?String(i.context):"standalone";if("formatting"===o&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=i.width?String(i.width):a;r=e.formattingValues[s]||e.formattingValues[a]}else{var u=e.defaultWidth,c=i.width?String(i.width):e.defaultWidth;r=e.values[c]||e.values[u]}var l=e.argumentCallback?e.argumentCallback(t):t;return r[l]}}var g={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},y={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},b={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},w={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},O={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};function C(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"}var x={ordinalNumber:C,era:m({values:g,defaultWidth:"wide"}),quarter:m({values:y,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:m({values:b,defaultWidth:"wide"}),day:m({values:w,defaultWidth:"wide"}),dayPeriod:m({values:_,defaultWidth:"wide",formattingValues:O,defaultFormattingWidth:"wide"})},j=x;function T(e){return function(t,n){var r=String(t),i=n||{},o=r.match(e.matchPattern);if(!o)return null;var a=o[0],s=r.match(e.parsePattern);if(!s)return null;var u=e.valueCallback?e.valueCallback(s[0]):s[0];return u=i.valueCallback?i.valueCallback(u):u,{value:u,rest:r.slice(a.length)}}}function S(e){return function(t,n){var r=String(t),i=n||{},o=i.width,a=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],s=r.match(a);if(!s)return null;var u,c=s[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?A(l,(function(e){return e.test(c)})):k(l,(function(e){return e.test(c)})),u=e.valueCallback?e.valueCallback(u):u,u=i.valueCallback?i.valueCallback(u):u,{value:u,rest:r.slice(c.length)}}}function k(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function A(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}var M=/^(\d+)(th|st|nd|rd)?/i,E=/\d+/i,I={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},P={any:[/^b/i,/^(a|c)/i]},D={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$={any:[/1/i,/2/i,/3/i,/4/i]},N={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},R={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},F={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},L={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},U={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},z={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},W={ordinalNumber:T({matchPattern:M,parsePattern:E,valueCallback:function(e){return parseInt(e,10)}}),era:S({matchPatterns:I,defaultMatchWidth:"wide",parsePatterns:P,defaultParseWidth:"any"}),quarter:S({matchPatterns:D,defaultMatchWidth:"wide",parsePatterns:$,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:S({matchPatterns:N,defaultMatchWidth:"wide",parsePatterns:R,defaultParseWidth:"any"}),day:S({matchPatterns:F,defaultMatchWidth:"wide",parsePatterns:L,defaultParseWidth:"any"}),dayPeriod:S({matchPatterns:U,defaultMatchWidth:"any",parsePatterns:z,defaultParseWidth:"any"})},H=W,q={code:"en-US",formatDistance:s,formatLong:p,formatRelative:v,localize:j,match:H,options:{weekStartsOn:0,firstWeekContainsDate:1}},B=q,Y=n("fe1f");function V(e,t){Object(i["a"])(2,arguments);var n=Object(r["a"])(e).getTime(),o=Object(Y["a"])(t);return new Date(n+o)}function X(e,t){Object(i["a"])(2,arguments);var n=Object(Y["a"])(t);return V(e,-n)}function Q(e,t){var n=e<0?"-":"",r=Math.abs(e).toString();while(r.length<t)r="0"+r;return n+r}var G={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Q("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Q(n+1,2)},d:function(e,t){return Q(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return Q(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Q(e.getUTCHours(),t.length)},m:function(e,t){return Q(e.getUTCMinutes(),t.length)},s:function(e,t){return Q(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return Q(i,t.length)}},J=G,K=864e5;function Z(e){Object(i["a"])(1,arguments);var t=Object(r["a"])(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=t.getTime(),a=n-o;return Math.floor(a/K)+1}function ee(e){Object(i["a"])(1,arguments);var t=1,n=Object(r["a"])(e),o=n.getUTCDay(),a=(o<t?7:0)+o-t;return n.setUTCDate(n.getUTCDate()-a),n.setUTCHours(0,0,0,0),n}function te(e){Object(i["a"])(1,arguments);var t=Object(r["a"])(e),n=t.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(n+1,0,4),o.setUTCHours(0,0,0,0);var a=ee(o),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var u=ee(s);return t.getTime()>=a.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function ne(e){Object(i["a"])(1,arguments);var t=te(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=ee(n);return r}var re=6048e5;function ie(e){Object(i["a"])(1,arguments);var t=Object(r["a"])(e),n=ee(t).getTime()-ne(t).getTime();return Math.round(n/re)+1}function oe(e,t){Object(i["a"])(1,arguments);var n=t||{},o=n.locale,a=o&&o.options&&o.options.weekStartsOn,s=null==a?0:Object(Y["a"])(a),u=null==n.weekStartsOn?s:Object(Y["a"])(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=Object(r["a"])(e),l=c.getUTCDay(),f=(l<u?7:0)+l-u;return c.setUTCDate(c.getUTCDate()-f),c.setUTCHours(0,0,0,0),c}function ae(e,t){Object(i["a"])(1,arguments);var n=Object(r["a"])(e,t),o=n.getUTCFullYear(),a=t||{},s=a.locale,u=s&&s.options&&s.options.firstWeekContainsDate,c=null==u?1:Object(Y["a"])(u),l=null==a.firstWeekContainsDate?c:Object(Y["a"])(a.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(o+1,0,l),f.setUTCHours(0,0,0,0);var d=oe(f,t),p=new Date(0);p.setUTCFullYear(o,0,l),p.setUTCHours(0,0,0,0);var h=oe(p,t);return n.getTime()>=d.getTime()?o+1:n.getTime()>=h.getTime()?o:o-1}function se(e,t){Object(i["a"])(1,arguments);var n=t||{},r=n.locale,o=r&&r.options&&r.options.firstWeekContainsDate,a=null==o?1:Object(Y["a"])(o),s=null==n.firstWeekContainsDate?a:Object(Y["a"])(n.firstWeekContainsDate),u=ae(e,t),c=new Date(0);c.setUTCFullYear(u,0,s),c.setUTCHours(0,0,0,0);var l=oe(c,t);return l}var ue=6048e5;function ce(e,t){Object(i["a"])(1,arguments);var n=Object(r["a"])(e),o=oe(n,t).getTime()-se(n,t).getTime();return Math.round(o/ue)+1}var le={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},fe={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return J.y(e,t)},Y:function(e,t,n,r){var i=ae(e,r),o=i>0?i:1-i;if("YY"===t){var a=o%100;return Q(a,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Q(o,t.length)},R:function(e,t){var n=te(e);return Q(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return Q(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Q(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Q(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return J.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Q(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=ce(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Q(i,t.length)},I:function(e,t,n){var r=ie(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Q(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):J.d(e,t)},D:function(e,t,n){var r=Z(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Q(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Q(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Q(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return Q(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours(),i=r/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?le.noon:0===i?le.midnight:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?le.evening:i>=12?le.afternoon:i>=4?le.morning:le.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return J.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):J.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Q(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Q(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):J.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):J.s(e,t)},S:function(e,t){return J.S(e,t)},X:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return pe(o);case"XXXX":case"XX":return he(o);case"XXXXX":case"XXX":default:return he(o,":")}},x:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return pe(o);case"xxxx":case"xx":return he(o);case"xxxxx":case"xxx":default:return he(o,":")}},O:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+de(o,":");case"OOOO":default:return"GMT"+he(o,":")}},z:function(e,t,n,r){var i=r._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+de(o,":");case"zzzz":default:return"GMT"+he(o,":")}},t:function(e,t,n,r){var i=r._originalDate||e,o=Math.floor(i.getTime()/1e3);return Q(o,t.length)},T:function(e,t,n,r){var i=r._originalDate||e,o=i.getTime();return Q(o,t.length)}};function de(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+Q(o,2)}function pe(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Q(Math.abs(e)/60,2)}return he(e,t)}function he(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=Q(Math.floor(i/60),2),a=Q(i%60,2);return r+o+n+a}var ve=fe;function me(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function ge(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}function ye(e,t){var n,r=e.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return me(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",me(i,t)).replace("{{time}}",ge(o,t))}var be={p:ge,P:ye},we=be;function _e(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var Oe=["D","DD"],Ce=["YY","YYYY"];function xe(e){return-1!==Oe.indexOf(e)}function je(e){return-1!==Ce.indexOf(e)}function Te(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var Se=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ke=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ae=/^'([^]*?)'?$/,Me=/''/g,Ee=/[a-zA-Z]/;function Ie(e,t,n){Object(i["a"])(2,arguments);var a=String(t),s=n||{},u=s.locale||B,c=u.options&&u.options.firstWeekContainsDate,l=null==c?1:Object(Y["a"])(c),f=null==s.firstWeekContainsDate?l:Object(Y["a"])(s.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=u.options&&u.options.weekStartsOn,p=null==d?0:Object(Y["a"])(d),h=null==s.weekStartsOn?p:Object(Y["a"])(s.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!u.localize)throw new RangeError("locale must contain localize property");if(!u.formatLong)throw new RangeError("locale must contain formatLong property");var v=Object(r["a"])(e);if(!o(v))throw new RangeError("Invalid time value");var m=_e(v),g=X(v,m),y={firstWeekContainsDate:f,weekStartsOn:h,locale:u,_originalDate:v},b=a.match(ke).map((function(e){var t=e[0];if("p"===t||"P"===t){var n=we[t];return n(e,u.formatLong,y)}return e})).join("").match(Se).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return Pe(n);var i=ve[r];if(i)return!s.useAdditionalWeekYearTokens&&je(n)&&Te(n,t,e),!s.useAdditionalDayOfYearTokens&&xe(n)&&Te(n,t,e),i(g,n,u.localize,y);if(r.match(Ee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return b}function Pe(e){return e.match(Ae)[1].replace(Me,"'")}},c325:function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(t,e)}n.d(t,"a",(function(){return r}))},c4e2:function(e,t,n){"use strict";var r=n("d73f"),i=Object(r["a"])((function(e,t,n){var r=e(t),i=e(n);return r<i?-1:r>i?1:0}));t["a"]=i},c800:function(e,t,n){"use strict";var r=n("2fc8"),i=Object(r["a"])((function(e,t){return Array.prototype.slice.call(t,0).sort(e)}));t["a"]=i},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},cd33:function(e,t,n){var r=n("0363");t.iframeResize=r,t.iframeResizer=r,t.iframeResizerContentWindow=n("8db5")},d73f:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("4aa2"),i=n("2fc8"),o=n("9ebd");function a(e){return function t(n,a,s){switch(arguments.length){case 0:return t;case 1:return Object(o["a"])(n)?t:Object(i["a"])((function(t,r){return e(n,t,r)}));case 2:return Object(o["a"])(n)&&Object(o["a"])(a)?t:Object(o["a"])(n)?Object(i["a"])((function(t,n){return e(t,a,n)})):Object(o["a"])(a)?Object(i["a"])((function(t,r){return e(n,t,r)})):Object(r["a"])((function(t){return e(n,a,t)}));default:return Object(o["a"])(n)&&Object(o["a"])(a)&&Object(o["a"])(s)?t:Object(o["a"])(n)&&Object(o["a"])(a)?Object(i["a"])((function(t,n){return e(t,n,s)})):Object(o["a"])(n)&&Object(o["a"])(s)?Object(i["a"])((function(t,n){return e(t,a,n)})):Object(o["a"])(a)&&Object(o["a"])(s)?Object(i["a"])((function(t,r){return e(n,t,r)})):Object(o["a"])(n)?Object(r["a"])((function(t){return e(t,a,s)})):Object(o["a"])(a)?Object(r["a"])((function(t){return e(n,t,s)})):Object(o["a"])(s)?Object(r["a"])((function(t){return e(n,a,t)})):e(n,a,s)}}}},e3ee:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n("fe1f"),i=n("8c86"),o=36e5,a=6e4,s=2,u={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},c=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,l=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,f=/^([+-])(\d{2})(?::?(\d{2}))?$/;function d(e,t){Object(i["a"])(1,arguments);var n=t||{},o=null==n.additionalDigits?s:Object(r["a"])(n.additionalDigits);if(2!==o&&1!==o&&0!==o)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var a,u=p(e);if(u.date){var c=h(u.date,o);a=v(c.restDateString,c.year)}if(isNaN(a)||!a)return new Date(NaN);var l,f=a.getTime(),d=0;if(u.time&&(d=g(u.time),isNaN(d)||null===d))return new Date(NaN);if(!u.timezone){var m=new Date(f+d),y=new Date(0);return y.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),y.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),y}return l=b(u.timezone),isNaN(l)?new Date(NaN):new Date(f+d+l)}function p(e){var t,n={},r=e.split(u.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1],u.timeZoneDelimiter.test(n.date)&&(n.date=e.split(u.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var i=u.timezone.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}function h(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:null};var i=r[1]&&parseInt(r[1]),o=r[2]&&parseInt(r[2]);return{year:null==o?i:100*o,restDateString:e.slice((r[1]||r[2]).length)}}function v(e,t){if(null===t)return null;var n=e.match(c);if(!n)return null;var r=!!n[4],i=m(n[1]),o=m(n[2])-1,a=m(n[3]),s=m(n[4]),u=m(n[5])-1;if(r)return j(t,s,u)?w(t,s,u):new Date(NaN);var l=new Date(0);return C(t,o,a)&&x(t,i)?(l.setUTCFullYear(t,o,Math.max(i,a)),l):new Date(NaN)}function m(e){return e?parseInt(e):1}function g(e){var t=e.match(l);if(!t)return null;var n=y(t[1]),r=y(t[2]),i=y(t[3]);return T(n,r,i)?n*o+r*a+1e3*i:NaN}function y(e){return e&&parseFloat(e.replace(",","."))||0}function b(e){if("Z"===e)return 0;var t=e.match(f);if(!t)return 0;var n="+"===t[1]?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return S(r,i)?n*(r*o+i*a):NaN}function w(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=7*(t-1)+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var _=[31,null,31,30,31,30,31,31,30,31,30,31];function O(e){return e%400===0||e%4===0&&e%100}function C(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(_[t]||(O(e)?29:28))}function x(e,t){return t>=1&&t<=(O(e)?366:365)}function j(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function T(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function S(e,t){return t>=0&&t<=59}},f7f1:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("fe1f"),i=n("fd3a"),o=n("8c86");function a(e,t){Object(o["a"])(2,arguments);var n=Object(i["a"])(e),a=Object(r["a"])(t);return isNaN(a)?new Date(NaN):a?(n.setDate(n.getDate()+a),n):n}},fcfb:function(e,t,n){"use strict";t["a"]=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)}},fd3a:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("8c86");function i(e){Object(r["a"])(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},fe1f:function(e,t,n){"use strict";function r(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,"a",(function(){return r}))}}]);;
var landicomponents=function(t){function e(e){for(var a,o,n=e[0],c=e[1],l=e[2],u=0,h=[];u<n.length;u++)o=n[u],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&h.push(i[o][0]),i[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(t[a]=c[a]);d&&d(e);while(h.length)h.shift()();return r.push.apply(r,l||[]),s()}function s(){for(var t,e=0;e<r.length;e++){for(var s=r[e],a=!0,n=1;n<s.length;n++){var c=s[n];0!==i[c]&&(a=!1)}a&&(r.splice(e--,1),t=o(o.s=s[0]))}return t}var a={},i={app:0},r=[];function o(e){if(a[e])return a[e].exports;var s=a[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=t,o.c=a,o.d=function(t,e,s){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(o.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)o.d(s,a,function(e){return t[e]}.bind(null,a));return s},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/";var n=window["webpackJsonplandicomponents"]=window["webpackJsonplandicomponents"]||[],c=n.push.bind(n);n.push=e,n=n.slice();for(var l=0;l<n.length;l++)e(n[l]);var d=c;return r.push([0,"chunk-vendors"]),s()}({0:function(t,e,s){t.exports=s("cd49")},"0c5c":function(t,e,s){},"15ff":function(t,e,s){"use strict";s("6bca")},"182a":function(t,e,s){"use strict";s("f8f0")},1834:function(t,e,s){"use strict";s("0c5c")},1933:function(t,e,s){},3745:function(t,e,s){"use strict";s("1933")},3846:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAbCAMAAACp3USTAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAkUExURQAAAL2eSnWw1MOeREWOPkWOROfCfF2OPtWuUEWOSo3C5gAAAL9UQQEAAAAMdFJOU///////////////ABLfzs4AAAAJcEhZcwAADsIAAA7CARUoSoAAAABXSURBVChTtdDdDoAgCAXgLNKS939fm4AeFvOqzg3bN342Nn7nJ0u71B6xg05AsVwQddah3UA0QxwGOG0iGF9Ed33qui/YF9wFMkNSc6QW/SX6n8+3xtwAPqoUIjPzuxIAAAAASUVORK5CYII="},"3b0f":function(t,e,s){},"3b87":function(t,e,s){},5122:function(t,e,s){"use strict";s("6387")},"51d3":function(t,e,s){"use strict";s("ebdf")},6387:function(t,e,s){},"6bca":function(t,e,s){},"82a6":function(t,e,s){"use strict";s("9055")},"84cb":function(t,e,s){"use strict";s("3b87")},9055:function(t,e,s){},"92b6":function(t,e,s){"use strict";s("3b0f")},"9a43":function(t,e,s){"use strict";s("cc1f")},a398:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAbCAMAAACp3USTAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAkUExURQAAAHWw1L2eSkWOREWOPsOeRF2OPufCfI3C5kWOStWuUAAAAEyagnUAAAAMdFJOU///////////////ABLfzs4AAAAJcEhZcwAADsIAAA7CARUoSoAAAABaSURBVChTtdDLEoAgCAXQLHoo//+/GSRc0nZ1N+IZBmaYuM+flmZ9wdJCqxRulbZdKjMnM6BmSLcFUoskdmSiol/JW99w3nBvxGaIZoBuFz7vUrG/n+VbYz4BFS4T/Ob51O4AAAAASUVORK5CYII="},ace1:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAABcGlDQ1BpY2MAACiRdZE7SwNBFIW/xEeCRlNoIWKRIoqIAVFQS41FmiASIxi1SdZsIuSx7CZIsBVsLAIWoo2vwn+grWCrIAiKIGLjH/DVSFjvGCFBzCyz9+PMnMvMGXCGM1rWah6BbK5gRkJB32Jsyed6oRU3nQwxEdcsY3puLkzD8XmHQ9XbgOrVeN+/o301aWngcAuPa4ZZEJ4SDq8XDMXbwt1aOr4qfCg8bMoBha+Unqjys+JUld8Vm9HIDDhVT1+qjhN1rKXNrPCgsD+bKWq/51E38SRzC/NSe2X2YREhRBAfCYqskaFAQGpOMvvfN/LjmyUvHk3+BiVMcaRIi3dY1KJ0TUrVRU/Kl6Gkcv+bp6WPjVa7e4LQ8mTbb/3g2oFK2ba/jmy7cgxNj3CRq/nzktPkh+jlmuY/AO8mnF3WtMQunG9Bz4MRN+M/UpNMp67D6yl0xKDrBtqWq1n9rnNyD9ENeaJr2NuHAdnvXfkGGZxoFsJwNjIAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAIHSURBVEhLxZa9SgNBEMcvEUKawIkewcJSQ5oUIZhSfApB8gBp0qcKVvYWPoAQyFuEVAG1ECzuniAGBImkEBTMub+Qgb31Ppv1YLnl9v9xszszd04Yhk6RsVqtXMdxQgbzIlywZUW0ehU23FOXvKE+z/3WebbE9/2T4XB40+l0niqVypdsKXOesQYmj1bq+S2XS6/X690rg42YpNw3YOGkGScazufzs3q9/ioGzWbTH41G19Pp9DwIglMGc56xJjg4cJNMYw0hVKvVT0Q8z3ubTCaXSqCU8uYlMGDhwE0y/WPIlkhkjUYjWCwWx3nOBgxYOJiiEbe9fwx3Z7aNLMWMaGMjhiORomW+bMSQTJME2W1jZH08Hl+12+1HVQ7fDOY8M0Xh7s50Y2ZvRJD0BkgSmBH0+/27pAxlzTAtSSKhqa9FDKkpRMk8HUQUWWVhRooGHDQjhvRDxnq9PpCiJt11ULfbfcgyBKNz0ICDJtriQ0faNmJ9UGM6mfPKMgSjc9CI4xTupbl7ZgKwrELdZ6iwD1X4ROKo+jnS8eocnrOMTIxooIm2+JRd1/1g1Gq191ar9YLwbDa70A0Gg8FtlqGJEQ000Raf/y0L64VPllltbRhab96YWv08SfFa/QCLqdVfDL1NWfuJivvS04ilRzLP+zcguMK99Edd0nX0eVYnkvXChnmFk3C/7MadqMTAJm8AAAAASUVORK5CYII="},cc1f:function(t,e,s){},cd49:function(t,e,s){"use strict";s.r(e),s.d(e,"StorageApi",(function(){return D})),s.d(e,"DeliveryWindowSelectorBuilder",(function(){return bt})),s.d(e,"GeneralMessageModalBuilder",(function(){return It})),s.d(e,"MyOrderedProductsBuilder",(function(){return as})),s.d(e,"OrdersOverviewBuilder",(function(){return As})),s.d(e,"RequestUserLocationModalBuilder",(function(){return Zs})),s.d(e,"TicketDetailBuilder",(function(){return na})),s.d(e,"TicketsBuilder",(function(){return Oa})),s.d(e,"CustomerQuestionsWidgetBuilder",(function(){return ka})),s.d(e,"ProductOrderabilityAvailabilityWidgetBuilder",(function(){return Ta})),s.d(e,"ProductOverviewOrderabilityAvailabilityWidgetBuilder",(function(){return Aa}));var a=s("2b0e"),i=s("23aa");function r(t){return Object(i["a"])(String,t)}function o(t){return Object(i["a"])(Number,t)}function n(t){return Object(i["a"])(Object,t)}function c(t){if(r(t)){const e=parseInt(t,10);if(!isNaN(e)&&e>=0&&e<=3)return!0}return!1}const l=()=>{switch("production"){case"development":return"LOCAL";default:return"PROD"}},d=()=>{const t=$("meta[name=lng]").attr("content");if(t)switch(t.toLowerCase()){case"fr":return"fr";default:return"de"}return"de"};function u(t){return"/places/api/"+t}const h={env:l(),language:d(),buildPlacesUrl:u};function p(){return d()}function m(){return"/api/"+p()}function b(){const t=function(t){const e=$(t);if(0===e.length)return;const s=function(t){return m()+"/cart/dropdown/"+t},a=function(){return e.find(".button-bubble-counter")},i=function(){const e=t.replace(".button-","");return c(e),e},r=function(t){t>0&&a().text(t)},o=function(){const t=a().text();return t?parseInt(t,10):0},n=function(){if(o()>0){const t={display:"inline-block"};a().css(t)}};$.ajax({url:s(i()),method:"GET"}).done(t=>{r(t)}).then(()=>{n()})};t(".button-pickup"),t(".button-delivery"),t(".button-wishlist")}function g(t){if(void 0!==t.ToasterText&&null!==t.ToasterText&&""!==t.ToasterText){var e={timeout:5e3,positionClass:"toast-top-right",closeButton:!1};switch(t.ToasterLink&&(e["onclick"]=function(){window.location.href=t.ToasterLink}),t.ToasterType){case 1:window.toastr.success(t.ToasterText+t.ToasterFooter,t.ToasterTitle,e);break;case 2:window.toastr.warning(t.ToasterText+t.ToasterFooter,t.ToasterTitle,e);break;case 3:window.toastr.error(t.ToasterText+t.ToasterFooter,t.ToasterTitle,e);break}}}function v(t){return!!(t&&t.CartCookie&&t.EpoqCartTrackingScript)}function f(t,e,s,a){$.ajax({url:t,type:e,contentType:"application/json; charset=utf-8"}).done(t=>{if(v(t)&&(""!==t.CartCookie&&(document.cookie=t.CartCookie),t.EpoqCartTrackingScript)){const e=$("#epoq-cart-tracking-script");e&&e.length&&$("#epoq-cart-tracking-script").empty().append(t.EpoqCartTrackingScript)}s(t)}).fail(t=>{a(t)})}function y(t,e){f(m()+"/catalog/accessoriesAndServices/"+t+"/"+e,"get",t=>{t.trim().length>0&&($("#product-accessoires-modal .modal-body").html(t),$("#product-accessoires-modal").appendTo("body"),$("#product-accessoires-modal").modal())},t=>{console.log(t)})}function w(t,e,s,a,i){f(m()+"/cart/add/"+t+"/"+e+"/"+s,"put",e=>{a&&y(t,s),g(e),b(),i&&i()},(function(t){console.error(t)}))}function C(t){if(t.length){const e=t.val();if(r(e)&&e&&e.length>0)return parseInt(e);if(o(e))return e}return 1}function O(t){if(t.length){const e=t.find("input");return C(e)}return 1}function _(t){if(t.length){const e=t.find("[data-role=quantityinput] input");return C(e)}return 1}function k(t){const e=$(t).closest(".cart-panel");return _(e)}function S(t){const e=$(t);return _(e)}function T(t){return t&&!t||isNaN(t)?"":t.toLocaleString("de-CH",{minimumFractionDigits:2})}function A(t,e){const s=$(t),a=a=>{if(a.target){const r=$(a.target);!r.closest(t).length&&s.is(":visible")&&(e(t),i())}},i=()=>{document.removeEventListener("click",a)};document.addEventListener("click",a)}function P(t){const e=$(t),s=e.find(".dropdown-button"),a=e.find("select"),i=e.find(".select-option.select-single-option");a.on("change",()=>{const t=a.val();if(t){const a=e.find(`[data-value=${t}]`);a&&s.text($(a).text())}}),s.on("click",()=>{e.toggleClass("open"),e.hasClass("open")&&A(t,()=>e.removeClass("open"))}),i.on("click",t=>{e.removeClass("open");const i=t.currentTarget,r=$(i),o=r.data("value");s.text(r.text()),a.val(o),a.trigger("change")})}function x(t,e,s){if(window.instances&&window.instances.RequestUserLocation){const a=window.instances.RequestUserLocation;a.$on("confirm",(async function(t,e){if(a.$off(),t&&""!==t)try{let a="/api/de/mylandi/set-zip?zip="+t;const i=await fetch(a);200===i.status&&e&&s&&s()}catch(i){console.error(i)}})),a.$on("login",(function(){a.$off(),e&&(window.location.href=e)})),a.request(t)}else s&&s()}window.getLng=p,window.getApiBaseUrl=m,jQuery(document).ready((function(){b()})),document.addEventListener("DOMContentLoaded",()=>{const t=$(document),e=t.find(".is-dropdown");e.each((t,e)=>{P(e)})},!1);var j=s("b166");function I(t){let e={};const s=0;function a(){try{const e="__some_random_key_you_are_not_going_to_use__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return!1}}function i(){a()?t.clear():e={}}function r(s){return a()?t.getItem(s):Object.prototype.hasOwnProperty.call(e,s)?e[s]:null}function o(s){return a()?t.key(s):Object.keys(e)[s]||null}function n(s){a()?t.removeItem(s):delete e[s]}function c(s,i){a()?t.setItem(s,i):e[s]=String(i)}return{getItem:r,setItem:c,removeItem:n,clear:i,key:o,length:s}}$(document).ready((function(){let t=$.extend({},$.datepicker.regional["de-CH"],{dateFormat:"dd.mm.yy",changeMonth:!0,yearRange:"-100:+0",changeYear:!0});const e=$(".datepicker");e.each((e,s)=>{const a=$(s),i=a.data("alt-id"),r=$(i),o=i&&r&&r.length;function n(){const t=a.datepicker("getDate");t?r.val(Object(j["a"])(t,"yyyy-MM-dd")):r.val("")}o&&(t={...t,altFormat:"yy-mm-dd",altField:i}),$(a).datepicker(t),o&&(n(),$(a).on("change",()=>{n()}))})}));const L=I(localStorage),B=I(sessionStorage),M={localStore:L,sessionStore:B},D={localStore:M.localStore,sessionStore:M.sessionStore};var N=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"dw-container"},[a("div",{staticClass:"dw-left",on:{click:t.moveLeft}},[a("img",{attrs:{src:s("a398"),alt:"zurück"}})]),a("div",{ref:"dw-scroll-container",staticClass:"dw-scroll-container"},[a("div",{staticClass:"dw-row",style:"--n: "+t.data.length},t._l(t.data,(function(e){return a("div",{key:e.date,staticClass:"dw-item"},[a("p",[a("span",[t._v(t._s(e.day))]),a("br"),a("span",[t._v(t._s(e.shortdate))])]),a("button",{directives:[{name:"show",rawName:"v-show",value:e.date!=t.selectedValue,expression:"item.date != selectedValue"}],staticClass:"btn btn-secondary",on:{click:function(s){return t.select(e.date,s)}}},[t._v(" "+t._s(t.t.get("DeliveryWindow_Select"))+" ")]),a("span",{directives:[{name:"show",rawName:"v-show",value:e.date==t.selectedValue,expression:"item.date == selectedValue"}],staticClass:"positive"},[a("span",{staticClass:"material-icons"},[t._v("done")]),t._v(" "+t._s(t.t.get("DeliveryWindow_Selected"))+" ")])])})),0)]),a("div",{staticClass:"dw-right",on:{click:t.moveRight}},[a("img",{attrs:{src:s("3846"),alt:"vor"}})])])},E=[],R=s("9ab4");function F(t,e){return t.replace(/{(\d+)}/g,(function(t,s){return"undefined"!=typeof e[s]?e[s]:t}))}function U(t){var e=(new DOMParser).parseFromString(t,"text/html");let s=e.documentElement.textContent;return s||""}var q=s("c800");const V=Object(q["a"])((t,e)=>t.localeCompare(e));function H(t){return!!(t&&n(t)&&Object.prototype.hasOwnProperty.call(t,"de")&&Object.prototype.hasOwnProperty.call(t,"fr"))}var G=s("7677"),K=s("f7f1"),z=s("7620");const Q=["Account_Orders_Label","Button_ShowMore","OrderStatus_AllOrders","GeneralDropdown_NoData","LandiState_InProgress","LandiState_PendingByCustomer","LandiState_Cancelled","LandiState_PartiallyShipped","LandiState_ReadyForPickup","LandiState_Shipped","LandiState_Failed","LandiState_DeliveryCancelled","RequestUserLocationModal_ErrorMessage","RequestUserLocationModal_Title","RequestUserLocationModal_RequestLocationMessage","RequestUserLocationModal_ZipCodePlace","RequestUserLocationModal_ConfirmButton","RequestUserLocationModal_LoginMessage","RequestUserLocationModal_LoginButton","OrderNumber","Date","State","Account_UserOrders_TotalValue","Account_UserOrders_Mobile","Ticket_CustomerServiceInquiries","Button_CreateNewTicket","NewTicket_Category","NewTicket_Subject","NewTicket_Message","NewTicket_Attachments","Ticket_Subject","Ticket_Category","Ticket_Status","ProductFilter_SortTitle","ProductFilter_FilterTitle","ProductFilter_Sort_Price_Asc","ProductFilter_Sort_Price_Desc","ProductFilter_Sort_Name_Asc","ProductFilter_Sort_Name_Desc","Product_Teaser_NotAvailable","TopOffer","WhileStockLasts","DeliveryWindow_Select","DeliveryWindow_Selected","NewTicket_Thanks","NewTicket_ThanksSecondLine","NewTicket_MandatoryField"],W="LANDI_TRANSLATIONS";let J=null;const Z=(t,e)=>{let s=t;return e&&(e.maxLength&&(s=t.substring(0,e.maxLength)),e.decodeResource&&(s=U(t),t=s),e.replaces&&(s=F(t,e.replaces))),s};class Y{constructor(t){this.translations=t,this.missingKeys=[]}get(t,e){var s,a;let i="";return H(t)?i=null!==(a=t[null!==(s=null===e||void 0===e?void 0:e.language)&&void 0!==s?s:h.language])&&void 0!==a?a:"":(i=this.translations[t],i||(Object.keys(this.translations).length>0&&-1===Q.indexOf(t)&&-1===this.missingKeys.indexOf(t)&&(this.missingKeys.push(t),console.error(`Add the missing keys ${this.missingKeys}!`)),i=t)),Z(i,e)}isTranslated(t,e){if(t){const s=this.get(t,{language:null!==e&&void 0!==e?e:h.language});return!!s}return!1}}function X(){const t=M.localStore.getItem(W);if(t){const e=JSON.parse(t);if(e.language==h.language&&e.expiresIn&&e.translations&&Object(G["a"])(Date.now(),new Date(e.expiresIn))){const t=Object.keys(e.translations);if(Object(z["a"])(V(t),V(Q)))return e.translations}}return M.localStore.removeItem(W),null}const tt=async()=>{let t;if(t="LOCAL"===h.env?await fetch("/mocks/translations.json",{method:"GET",headers:{"Content-Type":"application/json"}}):await fetch(`/api/${h.language}/resx`,{method:"POST",body:JSON.stringify(Q),headers:{"Content-Type":"application/json"}}),200==t.status){const e=await t.json();if(e)return e}return{}},et=t=>{const e={language:h.language,expiresIn:Object(K["a"])(new Date,1),translations:t};M.localStore.setItem(W,JSON.stringify(e))},st=async()=>(J||(J=new Promise(async t=>{let e=X();e||(e=await tt(),et(e)),t(new Y(e))})),J),at=(t,e)=>new Y({}).isTranslated(t,e);st();const it={getTranslator:st,isTranslatedLocalizedString:at};var rt=s("1b40");let ot=class extends rt["c"]{constructor(){super(...arguments),this.translator=new Y({})}get t(){return this.translator}async created(){this.translator=await it.getTranslator()}translateLocalizedString(t,e){return this.translator.get(t,e)}async translateResource(t,e){return this.translator=await it.getTranslator(),this.translator.get(t,e)}};ot=Object(R["a"])([rt["a"]],ot);var nt=ot;let ct=class extends nt{constructor(){super(...arguments),this.selectedValue=""}async mounted(){!this.selectedValue&&this.data&&this.data.length&&this.select(this.data[0].date,null)}moveRight(){const t=this.$refs["dw-scroll-container"],e=t.clientWidth;t.scroll({left:t.scrollLeft+e})}moveLeft(){const t=this.$refs["dw-scroll-container"],e=t.clientWidth;t.scroll({left:t.scrollLeft-e})}select(t,e){e&&e.preventDefault(),this.selectedValue=t,this.$emit("selected",this.selectedValue,!0)}};Object(R["a"])([Object(rt["b"])()],ct.prototype,"data",void 0),ct=Object(R["a"])([Object(rt["a"])({mixins:[nt]})],ct);var lt=ct,dt=lt,ut=(s("1834"),s("2877")),ht=Object(ut["a"])(dt,N,E,!1,null,"fdef547c",null),pt=ht.exports;const mt=(t,e,s=null)=>{if(s)for(const a in s)e.$props[a]=s[a];if(t.dataset)for(const a in t.dataset)e.$props[a]=t.dataset[a];return e.$mount(t),e},bt={mount:(t,e)=>mt(t,new pt,e)};var gt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("modal",{attrs:{show:t.showModal,title:t.title},on:{closed:t.handleClosedModal}},[s("div",{staticClass:"rows"},[t._v(" "+t._s(t.message)+" ")]),s("hr"),s("div",{staticClass:"rows"},[s("button",{staticClass:"btn btn-primary",on:{click:t.handleClosedModal}},[t._v(" "+t._s(t.closeButton)+" ")])])])},vt=[],ft=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{ref:"modal",staticClass:"modal fade",class:{"modal-small":t.small},staticStyle:{display:"block","padding-right":"17px"},style:{zIndex:t.show?"110000":"-1"},attrs:{"data-backdrop":"static",tabindex:"-1",role:"dialog"}},[s("div",{staticClass:"modal-dialog",attrs:{role:"document"}},[s("div",{staticClass:"modal-content"},[s("div",{staticClass:"modal-header"},[s("span",[t._v(t._s(t.title))]),t._m(0)]),s("div",{staticClass:"modal-body"},[t._t("default")],2)])])])])},yt=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"}},[s("span",{attrs:{"aria-hidden":"true"}},[t._v("×")])])}];const wt=rt["c"].extend({props:{title:{type:String,required:!0},show:{type:Boolean,required:!1,default:!1},small:{type:Boolean,required:!1,default:!1}}});let Ct=class extends wt{mounted(){window.$(this.$refs.modal).on("shown.bs.modal",()=>{this.$emit("opened")}),window.$(this.$refs.modal).on("hidden.bs.modal",()=>{this.$emit("closed")})}onPropertyChanged(t){t?this.showModal():this.closeModal()}showModal(){window.$(this.$refs.modal).modal("show")}closeModal(){window.$(this.$refs.modal).modal("hide")}};Object(R["a"])([Object(rt["b"])()],Ct.prototype,"show",void 0),Object(R["a"])([Object(rt["b"])()],Ct.prototype,"title",void 0),Object(R["a"])([Object(rt["b"])()],Ct.prototype,"small",void 0),Object(R["a"])([Object(rt["d"])("show")],Ct.prototype,"onPropertyChanged",null),Ct=Object(R["a"])([rt["a"]],Ct);var Ot=Ct,_t=Ot,kt=Object(ut["a"])(_t,ft,yt,!1,null,null,null),St=kt.exports;let Tt=class extends rt["c"]{constructor(){super(...arguments),this.showModal=!1,this.title="",this.message="",this.closeButton=""}show({title:t,message:e,closeButton:s}){this.title=t,this.message=e,this.closeButton=s,this.showModal=!0}handleClosedModal(){this.showModal=!1}};Tt=Object(R["a"])([Object(rt["a"])({components:{modal:St},mixins:[nt]})],Tt);var At=Tt,Pt=At,xt=(s("84cb"),Object(ut["a"])(Pt,gt,vt,!1,null,"f955ff32",null)),jt=xt.exports;const It={mount:t=>mt(t,new jt)};var Lt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("product-filters",{attrs:{sort:t.sort},on:{textKeyUp:t.handleFilterTextKeyUp,sortChange:t.handleSortChange}}),t.isBusy?s("spinner"):t._e(),s("div",{staticClass:"row"},t._l(t.filteredProducts,(function(t){return s("product-teaser",{key:t.ID,attrs:{item:t}})})),1)],1)},Bt=[],Mt=s("e3ee");const $t=t=>"string"===typeof t||t instanceof String,Dt={string:$t},Nt=t=>{let e;return e=Dt.string(t)?Object(Mt["a"])(t):t,e},Et={parse:Nt};var Rt,Ft,Ut,qt=s("1212");(function(t){t["PriceReductionInfo"]="PriceReductionInfo",t["IsNew"]="IsNew",t["CountryOfOrigin"]="CountryOfOrigin",t["ProductFreshInfo"]="ProductFreshInfo",t["LandiLeader"]="LandiLeader",t["WarrantyDuration"]="Garantiedauer",t["SuisseWarranty"]="SuisseWarranty",t["Award"]="Award"})(Rt||(Rt={})),function(t){t["Price_Asc"]="pri_a",t["Price_Desc"]="pri_d",t["Name_Asc"]="tit_a",t["Name_Desc"]="tit_d"}(Ft||(Ft={})),function(t){t[t["None"]=0]="None",t[t["DP"]=1]="DP",t[t["TA"]=2]="TA",t[t["AK"]=4]="AK"}(Ut||(Ut={}));const Vt=(t,e,s)=>{if(s===Rt.Award&&it.isTranslatedLocalizedString(e.Product.AwardHeadline,t)&&it.isTranslatedLocalizedString(e.Product.AwardText,t)){const t=Et.parse(e.AwardTo);if(Object(qt["a"])(t,new Date))return!0}return!1},Ht=(t,e,s)=>{if(s===Rt.PriceReductionInfo&&it.isTranslatedLocalizedString(e.Product.PriceReduction,t)){const t=Et.parse(e.PriceReductionTo);if(Object(qt["a"])(t,new Date))return!0}return!1};var Gt=s("0f97"),Kt=s("6433"),zt=s("c4e2"),Qt=s("28c9"),Wt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"collapse purchased-products-filter",staticStyle:{height:"120px"},attrs:{id:"ProductFilter"}},[s("div",{staticClass:"product-filter-body"},[s("div",{staticClass:"col-xs-12 col-sm-8 col-lg-9"},[s("div",{staticClass:"row"},[s("div",{staticClass:"hidden-xs col-sm-12 product-filter-header"},[t._v(" "+t._s(t.t.get("ProductFilter_FilterTitle"))+" ")])]),s("div",{staticClass:"row"},[s("div",{staticClass:"col-xs-12 product-filter-item"},[s("input",{staticClass:"form-control",attrs:{type:"text"},on:{keyup:t.handleFilterTextKeyUp}})])])]),s("div",{staticClass:"col-xs-12 col-sm-4 col-lg-3"},[s("div",{staticClass:"row"},[s("div",{staticClass:"hidden-xs col-sm-12 product-filter-header"},[t._v(" "+t._s(t.t.get("ProductFilter_SortTitle"))+" ")])]),s("div",{staticClass:"row"},[s("div",{staticClass:"col-xs-12 product-filter-item"},[s("dropdown",{attrs:{"initial-value":t.sort},on:{change:t.handleSortChange}})],1)])])])])},Jt=[],Zt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"dropdown-container",class:{open:t.isOpen},on:{click:t.handleToggle}},[s("div",{staticClass:"dropdown-button noselect"},[s("span",{staticClass:"dropdown-label",attrs:{id:"sort-value"}},[t._v(" "+t._s(t.t.get(t.textByValue))+" ")])]),s("div",{staticClass:"dropdown-list"},[s("ul",[s("li",{staticClass:"select-option select-sort-option",attrs:{value:"pri_a"},on:{click:t.handleSelect}},[t._v(" "+t._s(t.t.get("ProductFilter_Sort_Price_Asc"))+" ")]),s("li",{staticClass:"select-option select-sort-option",attrs:{value:"pri_d"},on:{click:t.handleSelect}},[t._v(" "+t._s(t.t.get("ProductFilter_Sort_Price_Desc"))+" ")]),s("li",{staticClass:"select-option select-sort-option",attrs:{value:"tit_a"},on:{click:t.handleSelect}},[t._v(" "+t._s(t.t.get("ProductFilter_Sort_Name_Asc"))+" ")]),s("li",{staticClass:"select-option select-sort-option",attrs:{value:"tit_d"},on:{click:t.handleSelect}},[t._v(" "+t._s(t.t.get("ProductFilter_Sort_Name_Desc"))+" ")])])])])},Yt=[];const Xt=rt["c"].extend({props:{initialValue:{type:String,required:!0}}});let te=class extends Xt{constructor(){super(...arguments),this.value=this.initialValue,this.isOpen=!1}handleToggle(){this.isOpen=!this.isOpen}handleSelect(t){const e=t.target,s=e.getAttribute("value");s&&(this.value=s,this.$emit("change",s))}get textByValue(){switch(this.value){case Ft.Price_Asc:return"ProductFilter_Sort_Price_Asc";case Ft.Price_Desc:return"ProductFilter_Sort_Price_Desc";case Ft.Name_Asc:return"ProductFilter_Sort_Name_Asc";case Ft.Name_Desc:return"ProductFilter_Sort_Name_Desc";default:return""}}};Object(R["a"])([Object(rt["b"])()],te.prototype,"initialValue",void 0),te=Object(R["a"])([Object(rt["a"])({mixins:[nt]})],te);var ee=te,se=ee,ae=Object(ut["a"])(se,Zt,Yt,!1,null,null,null),ie=ae.exports;const re=rt["c"].extend({props:{sort:{type:String,required:!1,default:Ft.Price_Desc}}});let oe=class extends re{handleFilterTextKeyUp(t){const e=t.currentTarget;this.$emit("textKeyUp",e.value)}handleSortChange(t){this.$emit("sortChange",t)}};Object(R["a"])([Object(rt["b"])()],oe.prototype,"sort",void 0),oe=Object(R["a"])([Object(rt["a"])({components:{dropdown:ie},mixins:[nt]})],oe);var ne=oe,ce=ne,le=Object(ut["a"])(ce,Wt,Jt,!1,null,null,null),de=le.exports,ue=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.item?s("div",{staticClass:"col-xs-6 col-md-3 product-item"},[s("div",{staticClass:"product-item-wrap"},[s("a",{staticClass:"product-link",attrs:{href:t.item.ProductUrl,title:t.t.get(t.item.Product.BaseName),"data-productcode":t.item.Product.ProductCode}},[s("span",{staticClass:"product-metadata price-info",class:{"is-top-angebot":t.item.IsTopOffer}},[t.item.IsTopOffer?s("span",{staticClass:"price-text"},[t._v(" "+t._s(t.t.get("TopOffer"))+" ")]):t._e(),t.item.IsCurrentOffer?s("span",{staticClass:"price-text"},[t._v(" "+t._s(t.t.get("CurrentOffer"))+" ")]):t._e(),s("img",{staticClass:"product-image-price",attrs:{src:t.item.PriceUrl,height:"38"}}),t.item.IsTopOffer?s("span",{staticClass:"price-subtext"},[t._v(" "+t._s(t.t.get("WhileStockLasts"))+" ")]):t._e(),s("span",{staticClass:"meta-line"},[s("marketing-feature",{attrs:{item:t.item.Product.MarketingFeature1}}),s("marketing-feature",{attrs:{item:t.item.Product.MarketingFeature2}}),s("marketing-feature",{attrs:{item:t.item.Product.MarketingFeature3}}),s("marketing-feature",{attrs:{item:t.item.Product.MarketingFeature4}}),t.item.Product.CustomerUOM&&1!==t.item.Product.ProductUOMtoCustomerUOM?s("span",{staticClass:"meta-line-item"},[s("span",{staticClass:"meta-line-trapezoid"},[s("span",{staticClass:"meta-line-content meta-line-content-list"},[t._v(" "+t._s((t.item.Product.Price/t.item.Product.ProductUOMtoCustomerUOM).toFixed(2))+t._s(" / "+t.t.get("ProductUOM_"+t.item.Product.CustomerUOM))+" ")])])]):t._e()],1),t.item.ProductAwardIcons.length?s("span",{staticClass:"product-badges-top"},t._l(t.item.ProductAwardIcons,(function(t){return s("eco-picture",{key:t.Url,class:"product-image-badge small",attrs:{item:t}})})),1):t._e()]),s("span",{staticClass:"product-badges product-badges-list"},t._l(t.item.ProductSpecificationIcons,(function(t,e){return s("eco-picture",{key:e,class:"product-image-badge",attrs:{item:t}})})),1),s("eco-picture",{class:"product-image-main",attrs:{item:t.item.Picture}}),s("div",{staticClass:"product-caption"},[s("h3",[t._v(t._s(t.t.get(t.item.Product.BaseName)))]),s("div",{staticClass:"product-caption-info",staticStyle:{display:"block",width:"100%"}},[s("div",{staticClass:"product-caption-code",staticStyle:{display:"inline-block",width:"50%",float:"left"}},[t._v(" "+t._s(t.item.Product.ProductCode)+" ")]),s("div",{staticClass:"product-caption-price",staticStyle:{display:"inline-block",width:"50%","text-align":"right"}})])])],1),s("div",{staticClass:"product-actions"},[t.showButtons?s("div",{domProps:{innerHTML:t._s(t.item.PickupButtonHtml)}}):t._e(),t.showButtons?s("div",{domProps:{innerHTML:t._s(t.item.DirectButtonHtml)}}):t._e(),t.showButtons?s("div",{domProps:{innerHTML:t._s(t.item.WishlistButtonHtml)}}):t._e(),t.showButtons?t._e():s("div",{staticClass:"product-not-on-sale"},[t._v(" "+t._s(t.t.get("Product_Teaser_NotAvailable"))+" ")])])])]):t._e()},he=[],pe=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("img",{attrs:{src:t.item.Url,alt:t.item.AlternateText}})},me=[];const be=rt["c"].extend({props:{item:{type:Object,required:!0}}});let ge=class extends be{};Object(R["a"])([Object(rt["b"])()],ge.prototype,"item",void 0),ge=Object(R["a"])([rt["a"]],ge);var ve=ge,fe=ve,ye=Object(ut["a"])(fe,pe,me,!1,null,null,null),we=ye.exports,Ce=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.t.isTranslated(t.item)?s("span",{staticClass:"meta-line-item"},[s("span",{staticClass:"meta-line-trapezoid"},[s("span",{staticClass:"meta-line-content meta-line-content-list"},[t._v(" "+t._s(t.t.get(t.item))+" ")])])]):t._e()},Oe=[];const _e=nt.extend({props:{item:{type:Object,required:!0}}});let ke=class extends _e{};Object(R["a"])([Object(rt["b"])()],ke.prototype,"item",void 0),ke=Object(R["a"])([Object(rt["a"])({mixins:[nt]})],ke);var Se=ke,Te=Se,Ae=Object(ut["a"])(Te,Ce,Oe,!1,null,null,null),Pe=Ae.exports,xe=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.hasAward?s("div",{staticClass:"product-badge"},[s("div",{staticClass:"product-badge-award"},[s("div",{staticClass:"product-badge-bordered medium"},[s("div",{staticClass:"product-badge-border top"}),s("div",{staticClass:"product-badge-border right"}),s("div",{staticClass:"product-badge-content"},[s("span",{staticClass:"product-badge-headline"},[t._v(" "+t._s(t.translate(t.productTeaser.Product.AwardHeadline,{maxLength:15}))+" ")]),s("span",{staticClass:"product-badge-text"},[t._v(" "+t._s(t.translate(t.productTeaser.Product.AwardText,{maxLength:30}))+" ")])]),s("div",{staticClass:"product-badge-border bottom"}),s("div",{staticClass:"product-badge-border left"})])])]):t.hasPriceReduction?s("div",[s("div",{staticClass:"product-badge"},[s("div",{staticClass:"product-badge-pricereduction small"},[s("eco-picture",{class:"product-image-badge",attrs:{item:t.picture}}),s("p",{staticClass:"pricereduction-text"},[t._v(" "+t._s(t.translate(t.productTeaser.Product.PriceReduction))+" ")])],1)])]):s("div",[s("eco-picture",{class:"product-image-badge",attrs:{item:t.picture}})],1)},je=[];const Ie=rt["c"].extend({props:{key:{type:String,required:!0},productTeaser:{type:Object,required:!0},ecoPicture:{type:Object,required:!0}}});let Le=class extends Ie{get hasAward(){return Vt(h.language,this.productTeaser,this.key)}get hasPriceReduction(){return Ht(h.language,this.productTeaser,this.key)}};Object(R["a"])([Object(rt["b"])()],Le.prototype,"key",void 0),Object(R["a"])([Object(rt["b"])()],Le.prototype,"productTeaser",void 0),Object(R["a"])([Object(rt["b"])()],Le.prototype,"picture",void 0),Le=Object(R["a"])([Object(rt["a"])({components:{ecoPicture:we},mixins:[nt]})],Le);var Be=Le,Me=Be,$e=Object(ut["a"])(Me,xe,je,!1,null,null,null),De=$e.exports;const Ne=rt["c"].extend({props:{item:{type:Object,required:!0}}});let Ee=class extends Ne{get showButtons(){return this.item.Product.OnSale}};Object(R["a"])([Object(rt["b"])()],Ee.prototype,"item",void 0),Ee=Object(R["a"])([Object(rt["a"])({components:{marketingFeature:Pe,ecoPicture:we,productState:De},mixins:[nt]})],Ee);var Re=Ee,Fe=Re,Ue=(s("182a"),Object(ut["a"])(Fe,ue,he,!1,null,"f0b9cb96",null)),qe=Ue.exports,Ve=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"loader new"},[t._v(" Loading... ")])},He=[];let Ge=class extends rt["c"]{};Ge=Object(R["a"])([rt["a"]],Ge);var Ke=Ge,ze=Ke,Qe=Object(ut["a"])(ze,Ve,He,!1,null,"17a61b63",null),We=Qe.exports;const Je=Object(Gt["a"])([Object(Kt["a"])(t=>t.Product.Price)]),Ze=Object(Gt["a"])([Object(zt["a"])(t=>t.Product.Price)]);let Ye=class extends nt{constructor(){super(...arguments),this.isBusy=!1,this.filterByText="",this.sort=Ft.Price_Desc,this.myOrderedProducts={Products:[]}}async created(){this.isBusy=!0;try{let t=`/api/${h.language}/mylandi/my-ordered-products`;"LOCAL"===h.env&&(t="/mocks/my-ordered-products.json");const e=await fetch(t);if(200==e.status){const t=await e.json();this.myOrderedProducts=t}}catch(t){console.error(t)}this.isBusy=!1}handleFilterTextKeyUp(t){this.filterByText=t}handleSortChange(t){this.sort=t}get filteredProducts(){let t=this.myOrderedProducts.Products;this.filterByText.length&&(t=Object(Qt["a"])(t=>-1!==this.translateLocalizedString(t.Product.BaseName).toLowerCase().indexOf(this.filterByText.toLowerCase())||-1!==this.translateLocalizedString(t.Product.Description).toLowerCase().indexOf(this.filterByText.toLowerCase()),t));const e=Object(Gt["a"])([Object(Kt["a"])(t=>this.translateLocalizedString(t.Product.BaseName))]),s=Object(Gt["a"])([Object(zt["a"])(t=>this.translateLocalizedString(t.Product.BaseName))]);switch(this.sort){case Ft.Price_Desc:return Je(t);case Ft.Price_Asc:return Ze(t);case Ft.Name_Desc:return e(t);case Ft.Name_Asc:return s(t);default:return t}}};Ye=Object(R["a"])([Object(rt["a"])({components:{spinner:We,productFilters:de,productTeaser:qe},mixins:[nt]})],Ye);var Xe=Ye,ts=Xe,es=Object(ut["a"])(ts,Lt,Bt,!1,null,null,null),ss=es.exports;const as={mount:t=>mt(t,new ss)};var is=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",[s("div",{staticClass:"header-filter"},[s("h1",[t._v(" "+t._s(t.t.get("Account_Orders_Label"))+" ")]),s("generalDropdown",{attrs:{"data-source":t.allOrderStates},on:{change:t.filterOrderStateChanged}})],1),s("div",[t.isBusy?s("spinner"):t._e(),s("generalTable",{staticClass:"visible-sm-block visible-md-block visible-lg-block",attrs:{headers:t.tableHeaders,body:t.tableBody}}),s("div",{staticClass:"flex-table hidden-sm hidden-md hidden-lg"},[s("ul",{staticClass:"flex-table-body"},t._l(t.tableBody.Items,(function(e){return s("li",{key:e.Id,on:{click:e.Callback}},[s("div",{key:e.Id,staticClass:"flex-table-cell mobile"},[s("span",{domProps:{innerHTML:t._s(t.t.get("Account_UserOrders_Mobile",{decodeResource:!0,replaces:[e.Id,e.ShortDate,e.StateText,e.OrderTotal]}))}}),s("span",{domProps:{innerHTML:t._s(e.Link)}})])])})),0)])],1)]),s("div",{staticClass:"top-padding"},[s("button",{directives:[{name:"show",rawName:"v-show",value:t.myOrdersOverview.HasMoreOrder,expression:"myOrdersOverview.HasMoreOrder"}],staticClass:"btn btn-secondary right-align ",on:{click:t.showMoreOrders}},[t._v(" "+t._s(t.t.get("Button_ShowMore"))+" ")])])])},rs=[],os=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"flex-table"},[s("div",{staticClass:"flex-table-header"},t._l(t.headers,(function(e){return s("div",{key:e.Id,staticClass:"flex-table-cell",style:{"flex-grow":e.Grow?e.Grow:1}},[t._v(" "+t._s(e.Title)+" ")])})),0),s("ul",{staticClass:"flex-table-body"},t._l(t.body.Items,(function(e){return s("li",{key:e.Id,on:{click:e.Callback}},t._l(t.body.Keys,(function(a){return s("div",{key:a.Key,class:["flex-table-cell",a.Class],style:{"flex-grow":a.Grow?a.Grow:1}},[a.IsHtml?[s("span",{domProps:{innerHTML:t._s(e[a.Key])}})]:[t._v(" "+t._s(e[a.Key])+" ")]],2)})),0)})),0)])},ns=[];const cs=rt["c"].extend({props:{headers:{type:Object,required:!0},body:{type:Object,required:!0}}});let ls=class extends cs{};Object(R["a"])([Object(rt["b"])()],ls.prototype,"headers",void 0),Object(R["a"])([Object(rt["b"])()],ls.prototype,"body",void 0),ls=Object(R["a"])([Object(rt["a"])({mixins:[nt]})],ls);var ds=ls,us=ds,hs=Object(ut["a"])(us,os,ns,!1,null,null,null),ps=hs.exports,ms=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"dropdown-wrapper"},[s("div",{staticClass:"dropdown-container",class:{open:t.isOpen},on:{click:t.handleToggle}},[t.hasItems?s("div",{staticClass:"dropdown-button noselect"},[s("span",{staticClass:"dropdown-label",attrs:{id:"sort-value"}},[t._v(" "+t._s(t.getSelectedItemLabel)+" ")])]):t._e(),s("div",{staticClass:"dropdown-list"},[s("ul",t._l(t.items,(function(e){return s("li",{key:e.Id,staticClass:"select-option select-sort-option",attrs:{value:e.Id},on:{click:t.handleSelect}},[t._v(" "+t._s(e.Label)+" ")])})),0)]),t.hasItems?t._e():s("div",[s("input",{staticClass:"form-control",attrs:{type:"text",readonly:""},domProps:{value:t.t.get("GeneralDropdown_NoData")}})])])])},bs=[];const gs=rt["c"].extend({props:{dataSource:{type:Object,required:!0}}});let vs=class extends gs{constructor(){super(...arguments),this.selectedItem=this.dataSource.InitialItem,this.items=this.dataSource.Items,this.isOpen=!1}onPropertyChanged(t){t&&(this.selectedItem={...t.InitialItem},this.items=t.Items)}handleToggle(){this.isOpen=!this.isOpen}get getSelectedItemLabel(){return this.selectedItem?this.selectedItem.Label:"No data available"}get hasItems(){return!!this.items&&!!this.items.length}handleSelect(t){const e=t.target,s=e.getAttribute("value");if(s){var a=this.items.find(t=>t.Id==+s);a&&(this.selectedItem=a,this.$emit("change",a))}}};Object(R["a"])([Object(rt["b"])()],vs.prototype,"dataSource",void 0),Object(R["a"])([Object(rt["d"])("dataSource")],vs.prototype,"onPropertyChanged",null),vs=Object(R["a"])([Object(rt["a"])({mixins:[nt]})],vs);var fs=vs,ys=fs,ws=(s("92b6"),Object(ut["a"])(ys,ms,bs,!1,null,"64d2a963",null)),Cs=ws.exports;let Os=class extends nt{constructor(){super(...arguments),this.isBusy=!1,this.myOrdersOverview={Orders:[],HasMoreOrder:!1,Page:0,PageSize:5},this.selectedFilterOrderState=[],this.allOrderStates={Items:[],InitialItem:{Value:0,Label:"",Id:0}},this.tableHeaders=[],this.tableBody={Keys:[],Items:[]}}async created(){this.allOrderStates=await this.buildAllOrderStates(),this.tableHeaders=await this.buildTableHeaders(),await this.fetchOrders()}async fetchOrders(){this.isBusy=!0;try{let t=`/api/${h.language}/mylandi/my-orders-overview/${this.myOrdersOverview.Page+1}/${this.myOrdersOverview.PageSize}/`;"LOCAL"===h.env&&(t="/mocks/my-orders-overview.json");const e=await fetch(t);if(200==e.status){const t=await e.json();t.Orders=this.myOrdersOverview.Orders.concat(t.Orders),this.myOrdersOverview=t,this.tableBody=this.buildTableBody()}}catch(t){console.error(t)}this.isBusy=!1}async showMoreOrders(){await this.fetchOrders()}filterOrderStateChanged(t){t&&t.Value&&(this.selectedFilterOrderState=t.Value,this.tableBody=this.buildTableBody())}async buildAllOrderStates(){var t=[{Id:0,Value:[],Label:await this.translateResource("OrderStatus_AllOrders")},{Id:1,Value:[8,9,30,34,37,40],Label:await this.translateResource("LandiState_InProgress")},{Id:2,Value:[5,31],Label:await this.translateResource("LandiState_PendingByCustomer")},{Id:3,Value:[60],Label:await this.translateResource("LandiState_Cancelled")},{Id:4,Value:[45],Label:await this.translateResource("LandiState_PartiallyShipped")},{Id:5,Value:[45],Label:await this.translateResource("LandiState_ReadyForPickup")},{Id:6,Value:[50],Label:await this.translateResource("LandiState_Shipped")},{Id:7,Value:[100],Label:await this.translateResource("LandiState_Failed")},{Id:8,Value:[65],Label:await this.translateResource("LandiState_DeliveryCancelled")}];return{InitialItem:t[0],Items:t}}async buildTableHeaders(){return[{Id:"OrderNumber",Title:await this.translateResource("OrderNumber")},{Id:"Date",Title:await this.translateResource("Date")},{Id:"State",Grow:2,Title:await this.translateResource("State")},{Id:"Account_UserOrders_TotalValue",Title:await this.translateResource("Account_UserOrders_TotalValue")},{Id:"Navigation_icon",Title:""}]}buildTableBody(){let t=this.myOrdersOverview.Orders.filter(t=>!this.selectedFilterOrderState.length||!!this.selectedFilterOrderState.includes(t.State));return{Keys:[{Key:"Id",IsHtml:!1},{Key:"ShortDate",IsHtml:!1},{Key:"StateText",Grow:2,IsHtml:!1},{Key:"OrderTotal",IsHtml:!1},{Key:"Link",Class:"no-border text-right",IsHtml:!0}],Items:t.map(t=>{let e=`<span class="order-navigation"><a\n          href="${"fr"==h.language?"/fr":""}/mylandi/orders/${t.Id}" >\n          &nbsp;</a></span>`;return{...t,Link:e,Callback:()=>{window.location.href=`${"fr"==h.language?"/fr":""}/mylandi/orders/${t.Id}`}}})}}};Os=Object(R["a"])([Object(rt["a"])({components:{spinner:We,generalTable:ps,generalDropdown:Cs},mixins:[nt]})],Os);var _s=Os,ks=_s,Ss=(s("5122"),s("3745"),Object(ut["a"])(ks,is,rs,!1,null,"4abbab0b",null)),Ts=Ss.exports;const As={mount:t=>mt(t,new Ts)};var Ps=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("modal",{attrs:{show:t.showModal,title:t.t.get("RequestUserLocationModal_Title"),small:"true"},on:{closed:t.handleClosedModal}},[a("div",{staticClass:"rows"},[t._v(" "+t._s(t.t.get("RequestUserLocationModal_RequestLocationMessage"))+" "),a("div",{staticClass:"input-group"},[a("autocomplete",{attrs:{placeholder:t.t.get("RequestUserLocationModal_ZipCodePlace"),value:t.selectedValue,"min-chars":3,"error-message":t.t.get("RequestUserLocationModal_ErrorMessage")},on:{change:t.handleValueChange}}),a("span",{staticClass:"input-group-btn hidden-md hidden-lg"},[a("button",{staticClass:"btn btn-light get-coordinates",on:{click:t.handleGetCoordinates}},[t.isGetCoordinatesBusy?a("spinner"):a("img",{attrs:{src:s("ace1"),alt:"get-coordinates"}})],1)])],1),a("button",{staticClass:"btn btn-primary",attrs:{disabled:!t.selectedValue},on:{click:t.handleConfirm}},[t._v(" "+t._s(t.t.get("RequestUserLocationModal_ConfirmButton"))+" ")])]),a("hr"),a("div",{staticClass:"rows"},[t._v(" "+t._s(t.t.get("RequestUserLocationModal_LoginMessage"))+" "),a("button",{staticClass:"btn btn-primary",on:{click:t.handleLogin}},[t._v(" "+t._s(t.t.get("RequestUserLocationModal_LoginButton"))+" ")])])])},xs=[];const js=()=>new Promise((t,e)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>t(e.coords),e):e()}),Is={get:js},Ls=async(t,e)=>{try{let s=h.buildPlacesUrl(`/zipcode/${t}/${e}/`);"LOCAL"===h.env&&(s="/mocks/get-nearest-zip-code-by-coordinates.json");const a=await fetch(s);if(200==a.status)return await a.json()}catch(s){console.error(s)}return null},Bs=async t=>{try{let e=h.buildPlacesUrl("/zipcode/search/"+t);"LOCAL"===h.env&&(e="/mocks/search-zip-codes.json");const s=await fetch(e);return 200==s.status?await s.json():[]}catch(e){console.error(e)}},Ms={searchZipCodes:Bs,getNearestZipCodeByCoordinates:Ls};var $s=s("a78e"),Ds=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("autocomplete",{ref:"autocomplete",class:["autocomplete form-control",t.invalidInput?"invalid-input":""],attrs:{type:"search",search:t.search,placeholder:t.placeholder,"aria-label":t.placeholder,"debounce-time":500},on:{submit:t.handleChange}}),s("span",{directives:[{name:"show",rawName:"v-show",value:t.invalidInput,expression:"invalidInput"}],staticClass:"error-box"},[t._v(" "+t._s(t.errorMessage)+" ")])],1)},Ns=[],Es=s("95bf"),Rs=s("b0db");const Fs=rt["c"].extend({props:{value:{type:Object,required:!0},placeholder:{type:String,required:!0},minChars:{type:Number,required:!0}}});let Us=class extends Fs{constructor(){super(...arguments),this.invalidInput=!1,this.isBusy=!1}onPropertyChanged(t){if(t){const e=this.$refs.autocomplete;e.setValue(t)}}async search(t){return t.length<this.minChars?[]:(this.isBusy=!0,new Promise((e,s)=>{Ms.searchZipCodes(t).then(t=>{let s=[];if(t&&(s=Object(Rs["a"])(t=>t.PLZ.toString(),t)),this.invalidInput=!1,0==s.length&&(this.invalidInput=!0),this.isBusy=!1,1==s.length){const t=this.$refs.autocomplete;t.setValue(s[0]),this.handleChange(s[0])}e(s)}).catch(s)}))}handleChange(t){t&&this.$emit("change",t)}};Object(R["a"])([Object(rt["b"])()],Us.prototype,"placeholder",void 0),Object(R["a"])([Object(rt["b"])()],Us.prototype,"value",void 0),Object(R["a"])([Object(rt["b"])()],Us.prototype,"minChars",void 0),Object(R["a"])([Object(rt["b"])()],Us.prototype,"errorMessage",void 0),Object(R["a"])([Object(rt["d"])("value")],Us.prototype,"onPropertyChanged",null),Us=Object(R["a"])([Object(rt["a"])({components:{autocomplete:Es["a"]}})],Us);var qs=Us,Vs=qs,Hs=(s("82a6"),s("f149"),Object(ut["a"])(Vs,Ds,Ns,!1,null,"a11cf40c",null)),Gs=Hs.exports;let Ks=class extends rt["c"]{constructor(){super(...arguments),this.showModal=!1,this.isGetCoordinatesBusy=!1,this.selectedValue="",this.COOKIE_SELECTED_ZIP_CODE="REQUEST_USER_LOCATION_SELECTED_ZIP_CODE",this.COOKIE_CANCELED="REQUEST_USER_LOCATION_CANCELED"}request(t=!1){const e=Object($s["get"])(this.COOKIE_SELECTED_ZIP_CODE);if(e)this.$emit("confirm",e,!1);else{const e=Object($s["get"])(this.COOKIE_CANCELED);e&&!t||(this.showModal=!0)}}hasSelectedZipCode(){const t=Object($s["get"])(this.COOKIE_SELECTED_ZIP_CODE);return!!t}clearCookies(){Object($s["remove"])(this.COOKIE_SELECTED_ZIP_CODE),Object($s["remove"])(this.COOKIE_CANCELED)}async handleGetCoordinates(){this.isGetCoordinatesBusy=!0;try{const t=await Is.get(),e=await Ms.getNearestZipCodeByCoordinates(t.latitude,t.longitude);e&&(this.selectedValue=e.PLZ.toString())}catch(t){console.error(t)}this.isGetCoordinatesBusy=!1}handleValueChange(t){this.selectedValue=t}handleClosedModal(){this.showModal=!1,Object($s["set"])(this.COOKIE_CANCELED,(!0).toString(),this.buildCookieOptions(1))}handleLogin(){this.showModal=!1,this.$emit("login")}handleConfirm(){this.showModal=!1,Object($s["set"])(this.COOKIE_SELECTED_ZIP_CODE,this.selectedValue,this.buildCookieOptions(90)),this.$emit("confirm",this.selectedValue,!0)}buildCookieOptions(t){const e=86400;return{domain:window.location.hostname,expires:e*t}}};Ks=Object(R["a"])([Object(rt["a"])({components:{modal:St,spinner:We,autocomplete:Gs},mixins:[nt]})],Ks);var zs=Ks,Qs=zs,Ws=(s("51d3"),Object(ut["a"])(Qs,Ps,xs,!1,null,"b15686a8",null)),Js=Ws.exports;const Zs={mount:t=>mt(t,new Js)};var Ys=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("iframe",{ref:"iframe",staticStyle:{overflow:"hidden","overflow-x":"hidden","overflow-y":"hidden"},attrs:{id:"ticketDetailIframe",src:t.ticketDetailURL,frameborder:"0",width:"100%"}},[t._v(" > ")])},Xs=[],ta=s("99da"),ea=s.n(ta);let sa=class extends rt["c"]{constructor(){super(...arguments),this.isBusy=!1,this.ticketDetailURL=""}async mounted(){this.fetchTicket(this.id);const t=this.$refs.iframe;t.onload=function(){ea.a.iframeResizer({checkOrigin:!1,heightCalculationMethod:"lowestElement",inPageLinks:!0},"#ticketDetailIframe")}}async fetchTicket(t){this.isBusy=!0;try{let e=`/api/${h.language}/mylandi/get-ticket-url/${t}`;const s=await fetch(e);if(200==s.status){const t=await s.json();this.ticketDetailURL=t}}catch(e){console.error(e)}this.isBusy=!1}};Object(R["a"])([Object(rt["b"])()],sa.prototype,"id",void 0),sa=Object(R["a"])([Object(rt["a"])({components:{}})],sa);var aa=sa,ia=aa,ra=Object(ut["a"])(ia,Ys,Xs,!1,null,null,null),oa=ra.exports;const na={mount:(t,e)=>mt(t,new oa,e)};var ca=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"header-filter"},[s("h1",[t._v(" "+t._s(t.t.get("Ticket_CustomerServiceInquiries"))+" ")]),s("span",[s("button",{staticClass:"btn btn-secondary btn-block btn-morepadding",on:{click:t.createNewTicket}},[t._v(" "+t._s(t.t.get("Button_CreateNewTicket"))+" ")])])]),s("div",[t.isBusy?s("spinner"):t._e(),s("generalTable",{staticClass:"visible-sm-block visible-md-block visible-lg-block",attrs:{headers:t.tableHeaders,body:t.tableBody}}),s("div",{staticClass:"flex-table hidden-sm hidden-md hidden-lg"},[s("ul",{staticClass:"flex-table-body"},t._l(t.tableBody.Items,(function(e){return s("li",{key:e.Id,on:{click:e.Callback}},[s("div",{key:e.Id,staticClass:"flex-table-cell mobile"},[s("div",{staticClass:"category"},[t._v(" "+t._s(e.CategoryText)+" ")]),s("div",{staticClass:"date"},[t._v(" "+t._s(e.ShortDate)+" ")]),s("div",{staticClass:"text"},[t._v(" "+t._s(e.Subject)+" ")]),s("div",{staticClass:"status"},[t._v(" "+t._s(e.StatusText)+" ")]),s("span",{staticClass:"link",domProps:{innerHTML:t._s(e.Link)}})])])})),0)])],1),s("div",{staticClass:"top-padding"},[s("button",{directives:[{name:"show",rawName:"v-show",value:t.tickets.HasMoreTickets,expression:"tickets.HasMoreTickets"}],staticClass:"btn btn-secondary right-align",on:{click:t.showMoreTickets}},[t._v(" "+t._s(t.t.get("Button_ShowMore"))+" ")])]),s("modal",{attrs:{show:t.showModal,title:t.t.get("Button_CreateNewTicket"),small:!0},on:{closed:t.handleClosedModal}},[s("newTicket",{on:{saved:t.handleTicketCreated}})],1)],1)},la=[],da=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[t.isSendingTicket?s("div",[s("spinner")],1):s("div",{staticClass:"row"},[s("div",{staticClass:"col-12"},[s("div",{staticClass:"row"},[s("div",{staticClass:"hidden-xs col-sm-12"},[t._v(" "+t._s(t.t.get("NewTicket_Category"))+"* "),t.missingHelpdeskTeam?s("span",{staticClass:"error"},[t._v(" "+t._s(t.t.get("NewTicket_MandatoryField"))+" ")]):t._e()])]),s("div",{staticClass:"row"},[t.isBusy?s("div",{staticClass:"col-xs-12"},[s("spinner")],1):s("div",{staticClass:"col-xs-12"},[s("generalDropdown",{attrs:{"data-source":t.getHelpDeskTeamDropdownModel},on:{change:t.handleHelpDeskTeamDropdownChanged}})],1)])]),s("div",{staticClass:"col-12"},[s("div",{staticClass:"row"},[s("div",{staticClass:"hidden-xs col-sm-12"},[t._v(" "+t._s(t.t.get("NewTicket_Subject"))+"* "),t.missingSubject?s("span",{staticClass:"error"},[t._v(" "+t._s(t.t.get("NewTicket_MandatoryField"))+" ")]):t._e()])]),s("div",{staticClass:"row"},[s("div",{staticClass:"col-xs-12"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.subject,expression:"subject"}],staticClass:"form-control",attrs:{type:"text"},domProps:{value:t.subject},on:{input:function(e){e.target.composing||(t.subject=e.target.value)}}})])])]),s("div",{staticClass:"col-12"},[s("div",{staticClass:"row"},[s("div",{staticClass:"hidden-xs col-sm-12"},[t._v(" "+t._s(t.t.get("NewTicket_Message"))+"* "),t.missingMessage?s("span",{staticClass:"error"},[t._v(" "+t._s(t.t.get("NewTicket_MandatoryField"))+" ")]):t._e()])]),s("div",{staticClass:"row"},[s("div",{staticClass:"col-xs-12"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.message,expression:"message"}],staticClass:"form-control",attrs:{cols:"20",rows:"5",spellcheck:"false"},domProps:{value:t.message},on:{input:function(e){e.target.composing||(t.message=e.target.value)}}})])])]),s("div",{staticClass:"col-12"},[s("div",{staticClass:"row"},[s("div",{staticClass:"hidden-xs col-sm-12"},[t._v(" "+t._s(t.t.get("NewTicket_Attachments"))+" ")])]),s("div",{staticClass:"row"},[s("div",{staticClass:"col-xs-12"},[s("input",{ref:"files",attrs:{type:"file",multiple:""}})])])]),s("div",{staticClass:"col-12"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-xs-12"},[s("button",{staticClass:"btn btn-primary",on:{click:t.sendNewTicket}},[t._v(" "+t._s(t.t.get("RequestUserLocationModal_ConfirmButton"))+" ")])])])])])])},ua=[];let ha=class extends nt{constructor(){super(...arguments),this.isBusy=!1,this.isSendingTicket=!1,this.message="",this.missingMessage=!1,this.subject="",this.missingSubject=!1,this.missingHelpdeskTeam=!1,this.selectedHelpDeskTeam=0,this.helpdeskTeamsTranslated=[]}async created(){this.isBusy=!0;try{let t=`/api/${h.language}/mylandi/ticket/helpdeskTeams/`;const e=await fetch(t);if(200==e.status){const t=await e.json();this.helpdeskTeamsTranslated=t,this.helpdeskTeamsTranslated&&(this.selectedHelpDeskTeam=this.helpdeskTeamsTranslated[0].Id)}}catch(t){console.error(t)}this.isBusy=!1}get getHelpDeskTeamDropdownModel(){var t=this.helpdeskTeamsTranslated.map(t=>{var e={Id:t.Id,Label:t.TeamName,Value:t};return e}),e={InitialItem:t?t[0]:{Id:0,Value:{},Label:""},Items:t};return e}handleHelpDeskTeamDropdownChanged(t){t&&t.Value&&(this.selectedHelpDeskTeam=t.Value.Id)}async sendNewTicket(){if(this.message?this.missingMessage=!1:this.missingMessage=!0,this.subject?this.missingSubject=!1:this.missingSubject=!0,this.selectedHelpDeskTeam?this.missingHelpdeskTeam=!1:this.missingHelpdeskTeam=!0,!(this.missingMessage||this.missingSubject||this.missingHelpdeskTeam)){this.isSendingTicket=!0;try{let e=this.$refs.files.files,s=[];for(var t=0;t<e.length;t++){let a=e.item(t);if(a){let t=await this.fileToByteArray(a),e={FileName:a.name,ContentType:a.type,Bytes:t};s.push(e)}}let a={Message:this.message,Subject:this.subject,Files:s,TeamId:this.selectedHelpDeskTeam},i=`/api/${h.language}/mylandi/createticket/`;const r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});200==r.status&&(this.isSendingTicket=!1,this.message="",this.subject="",Landi.showToaster({Success:!0,ToasterTitle:await this.translateResource("NewTicket_Thanks"),ToasterText:await this.translateResource("NewTicket_ThanksSecondLine",{decodeResource:!0}),ToasterFooter:"",ToasterLink:"",ErrorMessage:"",ToasterType:1}),this.$emit("saved"))}catch(e){console.error(e)}this.isSendingTicket=!1}}fileToByteArray(t){return new Promise((e,s)=>{try{let s=new FileReader,a=[];s.readAsArrayBuffer(t),s.onloadend=t=>{if(t&&t.target&&t.target.readyState==FileReader.DONE){let e=t.target.result;if(e&&"object"==typeof e){let t=new Uint8Array(e);for(let e of t)a.push(e)}}e(a)}}catch(a){s(a)}})}};ha=Object(R["a"])([Object(rt["a"])({components:{spinner:We,generalDropdown:Cs},mixins:[nt]})],ha);var pa=ha,ma=pa,ba=(s("15ff"),Object(ut["a"])(ma,da,ua,!1,null,"90a871c0",null)),ga=ba.exports;let va=class extends nt{constructor(){super(...arguments),this.isBusy=!1,this.showModal=!1,this.tableHeaders=[],this.tableBody={Keys:[],Items:[]},this.tickets={Tickets:[],HasMoreTickets:!1,Page:0,PageSize:5}}async created(){this.tableHeaders=await this.buildTableHeaders(),await this.fetchTickets()}async refreshTickets(){this.tickets={Tickets:[],HasMoreTickets:!1,Page:0,PageSize:5},await this.fetchTickets()}async fetchTickets(){this.isBusy=!0;try{let t=`/api/${h.language}/mylandi/paged-tickets/${this.tickets.Page+1}/${this.tickets.PageSize}/`;"LOCAL"===h.env&&(t="/mocks/my-tickets.json");const e=await fetch(t);if(200==e.status){const t=await e.json();this.tickets=t,this.tableBody=this.buildTableBody()}}catch(t){console.error(t)}this.isBusy=!1}async showMoreTickets(){await this.fetchTickets()}async createNewTicket(){this.showModal=!0}handleTicketCreated(){this.showModal=!1,this.refreshTickets()}handleClosedModal(){this.showModal=!1}async buildTableHeaders(){return[{Id:"Date",Title:await this.translateResource("Date"),Grow:2},{Id:"Subject",Title:await this.translateResource("Ticket_Subject"),Grow:4},{Id:"CategoryText",Title:await this.translateResource("Ticket_Category"),Grow:4},{Id:"StateText",Title:await this.translateResource("Ticket_Status"),Grow:2},{Id:"Navigation_icon",Title:"",Grow:1}]}buildTableBody(){return{Keys:[{Key:"ShortDate",Grow:2,IsHtml:!1},{Key:"Subject",Grow:4,IsHtml:!1},{Key:"CategoryText",Grow:4,IsHtml:!1},{Key:"StatusText",Grow:2,IsHtml:!1},{Key:"Link",Grow:1,Class:"no-border text-right",IsHtml:!0}],Items:this.tickets.Tickets.map(t=>{let e=`<span class="order-navigation"><a\n              href="${window.location.href}/${t.Id}" >\n              &nbsp;</a></span>`;return{...t,Link:e,Callback:()=>{window.location.href=`${window.location.href}/${t.Id}`}}})}}};va=Object(R["a"])([Object(rt["a"])({components:{spinner:We,generalTable:ps,modal:St,newTicket:ga},mixins:[nt]})],va);var fa=va,ya=fa,wa=(s("9a43"),Object(ut["a"])(ya,ca,la,!1,null,"30b48448",null)),Ca=wa.exports;const Oa={mount:t=>mt(t,new Ca)};var _a=s("529a");(function(t){class e{constructor(e){this.element=e,this.querystringKey="showQuestionModal",this.guest=null,this.userId=e.data("user-id")||"";const s=parseInt(e.data("product-id"),10);this.productId=isNaN(s)?0:s,this.modal=t(".customer-questions-modal",e),this.loginForm=this.modal.find(".as-login"),this.guestForm=this.modal.find(".as-guest"),this.dataForm=this.modal.find(".as-data"),this.thankYou=this.modal.find(".as-thank-you"),this.loginSubmit=this.loginForm.find(":submit"),this.dataSubmit=this.dataForm.find(":submit"),this.modal.find(".btn-as-guest").on("click",()=>{this.showGuestForm()}),this.modal.find(".btn-as-login").on("click",()=>{this.showLoginForm()}),this.loginForm.on("submit",async t=>{if(t.preventDefault(),this.loginForm.valid()){const t=this.loginForm.serializeArray(),e=this.getFormValue(t,"Identity.Email"),s=this.getFormValue(t,"Identity.Password"),a=this.getFormValue(t,"Identity.RememberMe");e&&s&&a&&(this.loginSubmit.addClass("with-loader"),await this.signIn(e,s,"true"===a)||this.loginSubmit.removeClass("with-loader"))}return!1}),this.guestForm.on("submit",t=>{if(t.preventDefault(),this.guestForm.valid()){const t=this.guestForm.serializeArray(),e=this.getFormValue(t,"FirstName"),s=this.getFormValue(t,"LastName"),a=this.getFormValue(t,"Email"),i=this.getFormValue(t,"PhoneNumber");e&&s&&a&&i&&this.showDataFormAsGuest(e,s,a,i)}return!1}),this.dataForm.on("submit",async t=>{if(t.preventDefault(),this.dataForm.valid()){const t=this.dataForm.serializeArray(),e=this.getFormValue(t,"CustomerQuestion");e&&(this.dataSubmit.addClass("with-loader"),await this.postQuestion(e)&&this.showThankYou(),this.dataSubmit.removeClass("with-loader"))}return!1});const a=new URL(location.href);a.searchParams.has(this.querystringKey)&&(a.searchParams.delete(this.querystringKey),history.replaceState(null,"",a.href),this.addQuestion(!0))}addQuestion(t){this.modal.modal(),t?this.showDataFormAsAuthenticated():this.showLoginForm()}hide(){this.loginForm.hide(),this.guestForm.hide(),this.dataForm.hide(),this.thankYou.hide()}showLoginForm(){this.hide(),this.loginForm.show()}showGuestForm(){this.hide(),this.guestForm.show()}showDataFormAsGuest(t,e,s,a){this.guest={firstName:t,lastName:e,email:s,phoneNumber:a},this.showDataForm()}showDataFormAsAuthenticated(){this.guest=null,this.showDataForm()}showDataForm(){this.hide(),this.dataForm.show()}showThankYou(){this.hide(),this.thankYou.show()}getFormValue(t,e){const s=Object(_a["a"])(t=>t.name===e,t);return s?s.value:""}async signIn(t,e,s){try{const a=new URL(location.href);a.searchParams.append("showQuestionModal","1");const i={Email:t,Password:e,RememberMe:s,ReturnUrl:a.pathname+a.search,AllowAnonymous:!1,RegisterPageUrl:"",RegisterAnonymousPageUrl:"",ForgotPasswordPageUrl:"",IsInCheckout:!1},r=await fetch(`/api/${h.language}/identity/signin`,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}});if(200==r.status){const t=await r.json();return t&&t.RedirectUrl&&(location.href=t.RedirectUrl),!0}}catch(a){console.error(a),Landi.showToaster(a)}return!1}async postQuestion(t){try{const e=new URL(location.href);e.searchParams.append("showQuestionModal","1");const s={ProductId:this.productId,UserId:this.userId,CustomerQuestion:t};this.guest&&(s.FirstName=this.guest.firstName,s.LastName=this.guest.lastName,s.Email=this.guest.email,s.PhoneNumber=this.guest.phoneNumber);const a=await fetch(`/api/${h.language}/catalog/savecustomerquestion`,{method:"PUT",body:JSON.stringify(s),headers:{"Content-Type":"application/json"}});if(200==a.status){const t=await a.json();return t&&Landi.showToaster(t),!0}}catch(e){console.error(e),Landi.showToaster(e)}return!1}}function s(){let t;return{_create:function(){t=new e(this.element)},_destroy:function(){},addQuestion:function(e){t&&t.addQuestion(e)}}}t.widget("landi.customerQuestions",s())})(window.jQuery);const ka={mount:t=>window.jQuery(t).customerQuestions()};var Sa;(function(t){t[t["Undefined"]=0]="Undefined",t[t["Wishlist"]=1]="Wishlist",t[t["Pickup"]=2]="Pickup",t[t["Delivery"]=3]="Delivery"})(Sa||(Sa={})),function(t){class e{constructor(e){var s,a,i,r,o;this.pickupOrderability="NotOrderable",this.deliveryOrderability="NotOrderable",this.unitPrice=0,this.checkOrderabilityStatus=async()=>{this.pickupButton$.addClass("with-loader"),this.deliveryButton$.addClass("with-loader");const t=O(this.quantityInput$),e=await fetch(`${m()}/catalog/orderability/${this.productCode}/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(200==e.status){const t=await e.json();t&&(this.updatePickupStatus(t),this.updateDeliveryStatus(t))}this.pickupButton$.removeClass("with-loader"),this.deliveryButton$.removeClass("with-loader")},this.updatePickupStatus=t=>{switch(this.pickupOrderability=t.PickupOrderability,this.pickupAvailabilityText$.text(t.PickupAvailabilityText),this.pickupOrderability){case"NotOrderable":this.pickupStoreDescription$.hide(),this.pickupStoreSelectorContainer$.hide();break;case"MustRequestPosition":this.pickupStoreDescription$.hide(),this.pickupStoreSelectorContainer$.show(),this.pickupStoreSelectorNoStoreLabel$.show(),this.pickupStoreSelectorSelectedStoreLabel$.hide(),this.pickupStoreDescriptionText$.text("");break;case"NotOrderableInThisPosition":case"Orderable":this.pickupStoreDescription$.show(),this.pickupStoreSelectorContainer$.show(),this.pickupStoreSelectorNoStoreLabel$.hide(),this.pickupStoreSelectorSelectedStoreLabel$.show(),this.pickupStoreDescriptionText$.text(t.PickupStoreDescription);break}switch(this.pickupOrderability){case"NotOrderable":case"NotOrderableInThisPosition":this.pickupButton$.prop("disabled",!0);break;case"MustRequestPosition":case"Orderable":this.pickupButton$.prop("disabled",!1);break}},this.updateDeliveryStatus=t=>{switch(this.deliveryOrderability=t.DeliveryOrderability,this.estimatedDeliveryText$.text(t.EstimatedDeliveryText),this.shippingCostsText$.text("CHF "+t.ShippingCostsTotal),this.deliveryOrderability){case"NotOrderableInThisPosition":case"NotOrderable":this.deliveryButton$.prop("disabled",!0),this.shippingCostsContainer$.hide();break;case"MustRequestPosition":this.deliveryButton$.prop("disabled",!1),this.shippingCostsContainer$.show();break;case"Orderable":this.deliveryButton$.prop("disabled",!1),this.shippingCostsContainer$.show();break}},this.addProductToCart=t=>{w(this.productCode,O(this.quantityInput$),t,!0)},this.openPlacesModal=e=>{const s=t("#WarenkorbTeaser"),a=t("#PlacesSearch");a.data("event-id",this.standortEventId),a.data("product-code",this.productCode),a.data("product-inventory-managed",this.productInventoryManaged),a.data("product-pickup-time-code",this.productPickupTimeCode),console.log(a,this.productInventoryManaged),s.modal("toggle");const i="standortselected."+this.standortEventId;t(document).on(i,async(t,s)=>{s.eventId===this.standortEventId&&e()});const r="hidden.bs.modal."+this.standortEventId;s.on(r,()=>{t(document).off(i),s.off(r),a.data("event-id",null),a.data("product-code",null),a.data("product-inventory-managed",null),a.data("product-pickup-time-code",null)})},this.loginUrl=null!==(s=e.data("login-url"))&&void 0!==s?s:"/",this.productCode=null!==(a=e.data("product-code"))&&void 0!==a?a:"",this.productInventoryManaged=null!==(i=e.data("product-inventory-managed"))&&void 0!==i?i:"",this.productPickupTimeCode=null!==(r=e.data("product-pickup-time-code"))&&void 0!==r?r:"",this.standortEventId=null!==(o=e.data("standort-event-id"))&&void 0!==o?o:"",this.quantityInput$=t(".quantity-input",e),this.productTotalPriceText$=t(".product-total-price",e),this.pickupAvailabilityText$=t(".pickup-availability-text",e),this.pickupStoreSelectorContainer$=t(".pickup-store-selector-container",e),this.pickupStoreSelector$=t("> button",this.pickupStoreSelectorContainer$),this.pickupStoreSelectorNoStoreLabel$=t(".with-no-store",this.pickupStoreSelectorContainer$),this.pickupStoreSelectorSelectedStoreLabel$=t(".with-selected-store",this.pickupStoreSelectorContainer$),this.pickupStoreDescription$=t(".pickup-store-description",e),this.pickupStoreDescriptionText$=t(".pickup-store-description-text",this.pickupStoreDescription$),this.estimatedDeliveryText$=t(".estimated-delivery-text",e),this.shippingCostsContainer$=t(".shipping-cost-container",e),this.shippingCostsText$=t(".product-shipping-cost",e),this.pickupButton$=t(".btn-pickup",e),this.deliveryButton$=t(".btn-delivery",e);const n=t(".product-unit-price",e);n.length&&(this.unitPrice=parseFloat(n.data().singlePrice)),this.quantityInput$.on("quantitychanged",async(t,e)=>{const s=e.quantity*this.unitPrice;return this.productTotalPriceText$.text(T(s)),await this.checkOrderabilityStatus()}),this.pickupStoreSelector$.on("click",t=>{switch(this.pickupOrderability){case"NotOrderable":return t.preventDefault(),!1;case"NotOrderableInThisPosition":case"MustRequestPosition":case"Orderable":return this.openPlacesModal(async()=>{await this.checkOrderabilityStatus()}),t.preventDefault(),!1}}),this.pickupButton$.on("click",t=>{switch(this.pickupOrderability){case"NotOrderable":return t.preventDefault(),!1;case"NotOrderableInThisPosition":case"MustRequestPosition":return this.openPlacesModal(async()=>{await this.checkOrderabilityStatus(),"Orderable"===this.pickupOrderability&&this.addProductToCart(Sa.Pickup)}),t.preventDefault(),!1;case"Orderable":return this.addProductToCart(Sa.Pickup),t.preventDefault(),!1}}),this.deliveryButton$.on("click",t=>{switch(this.deliveryOrderability){case"NotOrderableInThisPosition":case"NotOrderable":return t.preventDefault(),!1;case"MustRequestPosition":return x(!0,this.loginUrl,async()=>{await this.checkOrderabilityStatus(),"Orderable"===this.deliveryOrderability&&this.addProductToCart(Sa.Delivery)}),t.preventDefault(),!1;case"Orderable":return this.addProductToCart(Sa.Delivery),t.preventDefault(),!1}}),this.checkOrderabilityStatus()}}function s(){let t=null;return{_create:function(){t=new e(this.element)},_destroy:function(){},checkOrderabilityStatus:function(){t&&t.checkOrderabilityStatus()}}}t.widget("landi.productOrderabilityAvailability",s())}(window.jQuery);const Ta={mount:t=>window.jQuery(t).productOrderabilityAvailability()};(function(t){class e{constructor(e){var s,a;this.openPlacesModal=(e,s,a,i,r)=>{const o=t("#WarenkorbTeaser"),n=t("#PlacesSearch");n.data("event-id",s),n.data("product-code",e),n.data("product-inventory-managed",a),n.data("product-pickup-time-code",i),o.modal("toggle");const c="standortselected";t(document).on(c,async(t,e)=>{e.eventId===this.standortEventId&&(console.log("standort selectedCallback"),r())});const l="hidden.bs.modal."+this.standortEventId;o.on(l,()=>{t(document).off(c),o.off(l),n.data("event-id",null),n.data("product-code",null),n.data("product-inventory-managed",null),n.data("product-pickup-time-code",null)})},this.checkOrderabilityStatus=async()=>{this.pickupButtons$.addClass("with-loader"),this.deliveryButtons$.addClass("with-loader");const t=await fetch(m()+"/catalog/orderabilities",{method:"POST",body:JSON.stringify(this.productCodes),headers:{"Content-Type":"application/json"}});if(200==t.status){const a=await t.json();if(a){this.orderabilityStates=a;for(var e=0;e<a.length;e++){var s=a[e];this.updatePickupStatus(s),this.updateDeliveryStatus(s)}}}this.pickupButtons$.removeClass("with-loader"),this.deliveryButtons$.removeClass("with-loader")},this.updatePickupStatus=e=>{var s=t(".btn-horizontal-with-icon-pickup-green[data-product-code="+e.ProductCode+"]");switch(e.PickupOrderability){case"NotOrderable":s.parent().addClass("warning"),s.prop("disabled",!0);break;case"NotOrderableInThisPosition":s.parent().addClass("warning"),s.prop("disabled",!0),this.makeButtonOpenStore(s);break;case"MustRequestPosition":s.parent().removeClass("warning"),s.prop("disabled",!1),this.makeButtonOpenStore(s);break;case"Orderable":s.parent().removeClass("warning"),s.prop("disabled",!1),this.removeButtonOpenStore(s);break}},this.updateDeliveryStatus=e=>{var s=t(".btn-horizontal-with-icon-delivery-green[data-product-code="+e.ProductCode+"]");switch(s.attr("title",e.EstimatedDeliveryText),e.DeliveryOrderability){case"NotOrderableInThisPosition":case"NotOrderable":s.prop("disabled",!0),s.parent().addClass("warning");break;case"MustRequestPosition":s.prop("disabled",!1),s.parent().removeClass("warning");break;case"Orderable":s.prop("disabled",!1),s.parent().removeClass("warning");break}},this.addProductToCart=(t,e)=>{w(e,1,t,!0)},this.makeButtonOpenStore=t=>{t.attr({"data-toggle":"modal","data-target":"#WarenkorbTeaser"})},this.removeButtonOpenStore=t=>{t.removeAttr("data-toggle data-target")},this.loginUrl=null!==(s=e.data("login-url"))&&void 0!==s?s:"/",this.productCodes=new Array,this.standortEventId=null!==(a=e.data("standort-event-id"))&&void 0!==a?a:"",this.UpdateProductCodesToCheck(e),this.orderabilityStates=[],this.pickupButtons$=t(".btn-horizontal-with-icon-pickup-green",e),this.deliveryButtons$=t(".btn-horizontal-with-icon-delivery-green",e),this.wishlistButtons$=t(".btn-horizontal-with-icon-wishlist-green",e);var i=new MutationObserver(s=>{s.forEach(s=>{s.addedNodes.length&&(this.UpdateProductCodesToCheck(e),this.pickupButtons$=t(".btn-horizontal-with-icon-pickup-green",e),this.deliveryButtons$=t(".btn-horizontal-with-icon-delivery-green",e),this.wishlistButtons$=t(".btn-horizontal-with-icon-wishlist-green",e),this.bindButtons(),this.checkOrderabilityStatus())})});i.observe(e[0],{childList:!0,attributes:!0}),this.bindButtons(),this.checkOrderabilityStatus()}bindButtons(){this.pickupButtons$.off(),this.pickupButtons$.on("click",e=>{var s=t(e.target),a=s.data("product-code"),i=s.data("data-inventory-managed"),r=s.data("data-pickup-time-code"),o=s.data("data-event-id"),n=this.GetState(a);switch(n.PickupOrderability){case"NotOrderableInThisPosition":case"NotOrderable":return e.preventDefault(),!1;case"MustRequestPosition":return this.openPlacesModal(a,o,i,r,async()=>{await this.checkOrderabilityStatus(),n=this.GetState(a),"Orderable"===n.PickupOrderability&&(console.log("after request position"),this.addProductToCart(Sa.Pickup,a))}),e.preventDefault(),!1;case"Orderable":return console.log("orderable click"),this.addProductToCart(Sa.Pickup,a),e.preventDefault(),!1}}),this.deliveryButtons$.off(),this.deliveryButtons$.on("click",e=>{var s=t(e.target),a=s.data("product-code"),i=this.GetState(a);switch(i.DeliveryOrderability){case"NotOrderableInThisPosition":case"NotOrderable":return e.preventDefault(),!1;case"MustRequestPosition":return x(!0,this.loginUrl,async()=>{await this.checkOrderabilityStatus(),i=this.GetState(a),"Orderable"===i.DeliveryOrderability&&this.addProductToCart(Sa.Delivery,s.data("product-code"))}),e.preventDefault(),!1;case"Orderable":return this.addProductToCart(Sa.Delivery,s.data("product-code")),e.preventDefault(),!1}}),this.wishlistButtons$.off(),this.wishlistButtons$.on("click",e=>{var s=t(e.target),a=s.data("product-code");this.addProductToCart(Sa.Wishlist,a)})}UpdateProductCodesToCheck(t){var e=new Array;t.find(".btn-horizontal-with-icon-pickup-green").each((function(t,s){s.dataset.productCode&&e.push(s.dataset.productCode)})),this.productCodes=e}GetState(t){var e=this.orderabilityStates.filter(e=>e.ProductCode==t);return e&&e.length>0?e[0]:{}}}function s(){return{_create:function(){new e(this.element)},_destroy:function(){}}}t.widget("landi.productOverviewOrderabilityAvailability",s())})(window.jQuery);const Aa={mount:t=>window.jQuery(t).productOverviewOrderabilityAvailability()};var Pa;window.Landi={...null!==(Pa=window.Landi)&&void 0!==Pa?Pa:{},showToaster:g,UpdateCartButtonCounters:b,requestUserLocation:x,initDropdown:P,checkProductAccessoires:y,callCart:f,addToCart:w,getQuantity:k,getQuantityBy:S,formatCurrency:T},a["a"].config.productionTip=!0},ebdf:function(t,e,s){},f149:function(t,e,s){"use strict";s("fa58")},f8f0:function(t,e,s){},fa58:function(t,e,s){}});;
