text: /*! Chico UI v1.2.2 chico-ui.com.ar | chico-ui.com.ar/license */
  !function(a,b){"use strict";{var c={},d=(b(a),a.navigator),e=d.userAgent,f=a.document,g=b(f),h=f.body,i=(b(h),f.getElementsByTagName("html")[0]),j=b(i),k=a.Object,l=a.Array;!function(){var a,b=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,c=f.getElementsByTagName("script")[0].style;for(a in c)if(b.test(a))return a.match(b)[0].toLowerCase();return"WebkitOpacity"in c?"webkit":"KhtmlOpacity"in c?"khtml":""}()}c.util={isArray:function(){return"function"==typeof l.isArray?l.isArray:function(a){if(void 0===a)throw new Error('"ch.util.isArray(obj)": It must receive a parameter.');return"[object Array]"===k.prototype.toString.call(a)}}(),isUrl:function(a){return void 0===a||"string"!=typeof a?!1:/^(((https|http|ftp|file):\/\/)|www\.|\.\/|(\.\.\/)+|(\/{1,2})|(\d{1,3}\.){3}\d{1,3})(((\w+|-)(\.?)(\/?))+)(\:\d{1,5}){0,1}(((\w+|-)(\.?)(\/?)(#?))+)((\?)(\w+=(\w?)+(&?))+)?(\w+#\w+)?$/.test(a)},is$:function(){return void 0===b.zepto?function(a){return a instanceof b}:function(a){return b.zepto.isZ(a)}}(),avoidTextSelection:function(){var a=arguments,c=arguments.length,d=0;if(arguments.length<1)throw new Error('"ch.util.avoidTextSelection(selector);": The selector parameter is required.');for(d;c>d;d+=1){if(!(a[d]instanceof b||b.zepto.isZ(a[d])))throw new Error('"ch.util.avoidTextSelection(selector);": The parameter must be a jQuery or Zepto selector.');j.hasClass("lt-ie10")?a[d].attr("unselectable","on"):a[d].addClass("ch-user-no-select")}},getStyles:function(b,c){if(void 0===b||1!==b.nodeType)throw new Error('"ch.util.getStyles(el, prop)": The "el" parameter is required and must be a HTMLElement.');if(void 0===c||"string"!=typeof c)throw new Error('"ch.util.getStyles(el, prop)": The "prop" parameter is required and must be a string.');return a.getComputedStyle?a.getComputedStyle(b,"").getPropertyValue(c):(c=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b.currentStyle[c])},clone:function(a){if(void 0===a||"object"!=typeof a)throw new Error('"ch.util.clone(obj)": The "obj" parameter is required and must be a object.');var b,c={};for(b in a)void 0!==a[b]&&(c[b]=a[b]);return c},inherits:function(a,c){if(void 0===a||"function"!=typeof a)throw new Error('"ch.util.inherits(obj, superConstructor)": The "obj" parameter is required and must be a constructor function.');if(void 0===c||"function"!=typeof c)throw new Error('"ch.util.inherits(obj, superConstructor)": The "superConstructor" parameter is required and must be a constructor function.');var d=a.prototype||{};return a.prototype=b.extend(d,c.prototype),c.prototype},prevent:function(a){"object"==typeof a&&a.preventDefault()},getScroll:function(){return{left:a.pageXOffset||f.documentElement.scrollLeft||0,top:a.pageYOffset||f.documentElement.scrollTop||0}},getOuterDimensions:function(a){var b=a.getBoundingClientRect();return{width:b.right-b.left,height:b.bottom-b.top}},getOffset:function(a){var b=a.getBoundingClientRect(),d=c.util.getPositionedParent(a,"fixed"),e=c.util.getScroll(),f={left:b.left,top:b.top};return"fixed"!==c.util.getStyles(a,"position")&&null===d&&(f.left+=e.left,f.top+=e.top),f},getPositionedParent:function(a,b){for(var d,e=a.offsetParent;void 0===d;){if(null===e){d=null;break}c.util.getStyles(e,"position")!==b?e=e.offsetParent:d=e}return d},VENDOR_PREFIX:function(){var a,b=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,c=f.getElementsByTagName("script")[0].style;for(a in c)if(b.test(a))return a.match(b)[0].toLowerCase();return"WebkitOpacity"in c?"webkit":"KhtmlOpacity"in c?"khtml":""}(),zIndex:1e3},c.util.fixLabels=function(){function a(){d=f.getElementById(this.getAttribute("for")),-1!==["radio","checkbox"].indexOf(d.getAttribute("type"))?d.setAttribute("selected",!d.getAttribute("selected")):d.focus()}for(var d,e=f.getElementsByTagName("label"),g=0;e[g];g+=1)e[g].getAttribute("for")&&b(e[g]).on(c.onpointertap,a)},c.util.cancelPointerOnScroll=function(){g.on("touchmove",function(){c.pointerCanceled=!0,g.one("touchend",function(){c.pointerCanceled=!1})})},c.util.MBP={viewportmeta:b("meta[name=viewport]"),gestureStart:function(){c.util.MBP.viewportmeta.content="width=device-width, minimum-scale=0.25, maximum-scale=1.6"},scaleFix:function(){c.util.MBP.viewportmeta&&/iPhone|iPad|iPod/.test(e)&&!/Opera Mini/.test(e)&&(c.util.MBP.viewportmeta.content="width=device-width, minimum-scale=1.0, maximum-scale=1.0",f.addEventListener("gesturestart",c.util.MBP.gestureStart,!1))},BODY_SCROLL_TOP:!1,hideUrlBar:function(){a.location.hash||c.util.MBP.BODY_SCROLL_TOP===!1||a.scrollTo(0,1===c.util.MBP.BODY_SCROLL_TOP?0:1)},hideUrlBarOnLoad:function(){if(!a.location.hash&&a.addEventListener){var b=c.util.getScroll().top;a.scrollTo(0,1),c.util.MBP.BODY_SCROLL_TOP=1;var d=setInterval(function(){h&&(clearInterval(d),c.util.MBP.BODY_SCROLL_TOP=b,c.util.MBP.hideUrlBar())},15);a.addEventListener("load",function(){setTimeout(function(){20>b&&c.util.MBP.hideUrlBar()},0)})}},preventZoom:function(){for(var a=b("input, select, textarea"),d="width=device-width,initial-scale=1,maximum-scale=",e=0;e<a.length;e+=1)a[e].onfocus=function(){c.util.MBP.viewportmeta.content=d+"1"},a[e].onblur=function(){c.util.MBP.viewportmeta.content=d+"10"}}},c.support={transition:void 0!==h.style.WebkitTransition||void 0!==h.style.MozTransition||void 0!==h.style.MSTransition||void 0!==h.style.OTransition||void 0!==h.style.transition,fx:!!b.fn.slideDown,touch:"createTouch"in f},c.onlayoutchange="layoutchange",c.onresize="resize",c.onscroll="scroll",c.onpointerdown=c.support.touch?"touchstart":"mousedown",c.onpointerup=c.support.touch?"touchend":"mouseup",c.onpointermove=c.support.touch?"touchmove":"mousemove",c.onpointertap=c.support.touch?"touchend":"click",c.onpointerenter=c.support.touch?"touchstart":"mouseenter",c.onpointerleave=c.support.touch?"touchend":"mouseleave",c.onkeyinput="oninput"in f.createElement("input")?"input":"keydown",c.factory=function(a,d){var e=a.prototype.name,f=a.prototype._preset||e;c[e.charAt(0).toUpperCase()+e.substr(1)]=a,b[e]=function(b,c){return new a(b,c)},b.fn[e]=function(c){var e=[];return c=void 0!==d?d.apply(this,arguments):c,b.each(this,function(){var d=b(this),g=d.data(f);void 0===g?(g=new a(d,c),d.data(f,g)):void 0!==g.emit&&g.emit("exist",c),e.push(g)}),e.length>1?e:e[0]}},j.removeClass("no-js"),c.util.MBP.scaleFix(),c.util.MBP.hideUrlBarOnLoad(),c.util.MBP.preventZoom(),c.util.fixLabels(),c.util.cancelPointerOnScroll(),c.$=b,c.version="1.2.2",a.ch=c}(this,this.$),function(a){"use strict";function b(){}b.prototype.on=function(a,b,c){if(void 0===a)throw new Error('ch.EventEmitter - "on(event, listener)": It should receive an event.');if(void 0===b)throw new Error('ch.EventEmitter - "on(event, listener)": It should receive a listener function.');return this._eventsCollection=this._eventsCollection||{},b.once=c||!1,void 0===this._eventsCollection[a]&&(this._eventsCollection[a]=[]),this._eventsCollection[a].push(b),this},b.prototype.once=function(a,b){return this.on(a,b,!0),this},b.prototype.off=function(a,b){if(void 0===a)throw new Error('EventEmitter - "off(event, listener)": It should receive an event.');if(void 0===b)throw new Error('EventEmitter - "off(event, listener)": It should receive a listener function.');var c,d=this._eventsCollection[a],e=0;if(void 0!==d)for(c=d.length,e;c>e;e+=1)if(d[e]===b){d.splice(e,1);break}return this},b.prototype.getListeners=function(a){if(void 0===a)throw new Error('ch.EventEmitter - "getListeners(event)": It should receive an event.');return this._eventsCollection[a]},b.prototype.emit=function(){var a,b,c=Array.prototype.slice.call(arguments,0),d=c.shift(),e=0;if(void 0===d)throw new Error('ch.EventEmitter - "emit(event)": It should receive an event.');if("string"==typeof d&&(d={type:d}),d.target||(d.target=this),void 0!==this._eventsCollection&&void 0!==this._eventsCollection[d.type])for(a=this._eventsCollection[d.type],b=a.length,e;b>e;e+=1)a[e].apply(this,c),a[e].once&&(this.off(d.type,a[e]),b-=1,e-=1);return this},a.EventEmitter=b}(this.ch),function(a,b){"use strict";function c(){function c(a){f._$content.html(a.response),f.emit("_contentchange"),f.emit("content"+a.status,a)}function d(a){f._$content.html(a),f._options.cache=!0,f.emit("_contentchange"),f.emit("contentdone")}function e(b,d){d=a.extend({method:"GET",params:"",async:!0,waiting:'<div class="ch-loading-large"></div>'},d||g),void 0!==d.cache&&(f._options.cache=d.cache),c({status:"waiting",response:d.waiting}),a.ajax({url:b,type:d.method,data:"x=x"+(""!==d.params?"&"+d.params:""),cache:f._options.cache,async:d.async,beforeSend:function(a){a.setRequestHeader("X-Requested-With","XMLHttpRequest")},success:function(a){c({status:"done",response:a})},error:function(a,b,d){c({status:"error",response:"<p>Error on ajax call.</p>",data:{jqXHR:a,textStatus:b,errorThrown:d}})}})}var f=this,g={method:this._options.method,params:this._options.params,cache:this._options.cache,async:this._options.async,waiting:this._options.waiting};this.content=function(c,g){return void 0===c?f._$content.html():(f._options.content=c,void 0===f._options.cache&&(f._options.cache=!0),"string"==typeof c?b.util.isUrl(c)?e(c,g):d(c):(b.util.is$(c)||void 0!==c.nodeType)&&d(a(c).remove(null,!0).removeClass("ch-hide")),f)},this.once("_show",function(){f.content(f._options.content),f.on("show",function(){f._options.cache||f.content(f._options.content)})})}b.Content=c}(this.ch.$,this.ch),function(a){"use strict";function b(){function b(){e.$container.removeClass("ch-hide").attr("aria-hidden","false"),e.emit("show")}function d(){e.$container.addClass("ch-hide").attr("aria-hidden","true"),e.emit("hide")}var e=this,f="ch-"+this.name+"-trigger-on",g=this._options.fx,h=a.support.fx&&"none"!==g&&g!==!1;this._shown=!1,this._show=function(){return e._shown=!0,void 0!==e.$trigger&&e.$trigger.addClass(f),e.emit("beforeshow"),h?e.$container[g]("fast",b):b(),e.emit("_show"),e},this._hide=function(){return e._shown=!1,void 0!==e.$trigger&&e.$trigger.removeClass(f),e.emit("beforehide"),h?e.$container[c[g]]("fast",d):d(),e},this._toggle=function(){return e._shown?e.hide():e.show(),e},this.on("disable",this.hide)}var c={slideDown:"slideUp",slideUp:"slideDown",fadeIn:"fadeOut",fadeOut:"fadeIn"};a.Collapsible=b}(this.ch),function(a,b,c){"use strict";function d(){var a=g?c.onresize:c.onscroll;this.refresh(),g=!1,h=!1,this.emit(a)}function e(){this._init()}var f=b(a),g=!1,h=!1,i=function(){return a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||function(b){a.setTimeout(b,1e3/60)}}();c.util.inherits(e,c.EventEmitter),e.prototype._init=function(){var a=this;this.$el=f,this.refresh(),f.on(c.onresize+".viewport",function(){g||(g=!0,i(function(){d.call(a)}))}).on(c.onscroll+".viewport",function(){h||(h=!0,i(function(){d.call(a)}))})},e.prototype.calculateClientRect=function(){return this.top=this.left=0,this.bottom=this.$el.height(),this.right=this.$el.width(),this},e.prototype.calculateDimensions=function(){return this.calculateClientRect(),this.height=this.bottom,this.width=this.right,this},e.prototype.calculateOffset=function(){var a=c.util.getScroll();return this.offsetTop=a.top,this.offsetLeft=a.left,this.offsetRight=this.left+this.width,this.offsetBottom=this.offsetTop+this.height,this},e.prototype.calculateOrientation=function(){return this.orientation=90===Math.abs(this.$el.orientation)?"landscape":"portrait",this},e.prototype.inViewport=function(a){var b=a.getBoundingClientRect();return b.top>0&&b.right<this.width&&b.bottom<this.height&&b.left>0},e.prototype.isVisible=function(a){var b=a.getBoundingClientRect();return b.height>=this.offsetTop},e.prototype.refresh=function(){return this.calculateDimensions(),this.calculateOffset(),this.calculateOrientation(),this},c.viewport=new e}(this,this.ch.$,this.ch),function(a,b,c){"use strict";function d(b){if(void 0===b)throw new a.Error("ch.Positioner: Expected options defined.");this._options=c.util.clone(this._defaults),this._configure(b)}d.prototype.name="positioner",d.prototype._constructor=d,d.prototype._defaults={offsetX:0,offsetY:0,side:"center",align:"center",reference:c.viewport,position:"fixed"},d.prototype._configure=function(a){return b.extend(this._options,a),this._options.offsetX=parseInt(this._options.offsetX,10),this._options.offsetY=parseInt(this._options.offsetY,10),this.$target=a.target||this.$target,this.$reference=a.reference||this.$reference,this._reference=this._options.reference,this.$target.css("position",this._options.position),this},d.prototype.refresh=function(a){return void 0!==a&&this._configure(a),this._reference!==c.viewport&&this._calculateReference(),this._calculateTarget(),this._setPoint(),this},d.prototype._calculateReference=function(){var a,b=this.$reference[0];return b.setAttribute("data-side",this._options.side),b.setAttribute("data-align",this._options.align),this._reference=c.util.getOuterDimensions(b),b.offsetParent===this.$target[0].offsetParent?(this._reference.left=b.offsetLeft,this._reference.top=b.offsetTop):(a=c.util.getOffset(b),this._reference.left=a.left,this._reference.top=a.top),this},d.prototype._calculateTarget=function(){var a=this.$target[0];return a.setAttribute("data-side",this._options.side),a.setAttribute("data-align",this._options.align),this._target=c.util.getOuterDimensions(a),this},d.prototype._setPoint=function(){var a,b,c=this._options.side,d="top"===c||"bottom"===c?"horizontal":"right"===c||"left"===c?"vertical":"center";return"center"===d?a={top:this._reference.top+(this._reference.height/2-this._target.height/2),left:this._reference.left+(this._reference.width/2-this._target.width/2)}:"horizontal"===d?(b={left:this._reference.left,center:this._reference.left+(this._reference.width/2-this._target.width/2),right:this._reference.left+this._reference.width-this._target.width,top:this._reference.top-this._target.height,bottom:this._reference.top+this._reference.height},a={top:b[c],left:b[this._options.align]}):(b={top:this._reference.top,center:this._reference.top+(this._reference.height/2-this._target.height/2),bottom:this._reference.top+this._reference.height-this._target.height,right:this._reference.left+this._reference.width,left:this._reference.left-this._target.width},a={top:b[this._options.align],left:b[c]}),a.top+=this._options.offsetY,a.left+=this._options.offsetX,this.$target.css(a),this},c.Positioner=d}(this,this.ch.$,this.ch),function(a,b,c){"use strict";function d(b,c){var d=this;this._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50)}var e=c.util,f=0;c.util.inherits(d,c.EventEmitter),d.prototype.name="component",d.prototype.constructor=d,d.prototype._init=function(c,d){var g=this._defaults?e.clone(this._defaults):{};if(void 0===d)void 0===c?this._options=g:e.is$(c)?(this._$el=c,this._el=c[0],this._options=g):"object"==typeof c&&(d=c,c=void 0,this._options=b.extend(g,d));else{if("object"!=typeof d)throw new a.Error("Unexpected parameters were found in the '"+this.name+"' instantiation.");void 0===c?this._options=b.extend(g,d):e.is$(c)&&(this._$el=c,this._el=c[0],this._options=b.extend(g,d))}this.uid=f+=1,this._enabled=!0},d.prototype.require=function(){var a,b=0,d=arguments.length;for(b;d>b;b+=1)a=arguments[b],void 0===this[a.toLowerCase()]&&c[a].call(this);return this},d.prototype.enable=function(){return this._enabled=!0,this.emit("enable"),this},d.prototype.disable=function(){return this._enabled=!1,this.emit("disable"),this},d.prototype.destroy=function(){this.disable(),void 0!==this._el&&this._$el.removeData(this.name),this.emit("destroy")},c.Component=d}(this,this.ch.$,this.ch),function(a,b,c){"use strict";function d(a){return("string"==typeof a||c.util.is$(a))&&(a={content:a}),a}function e(b,c){var d=this;this._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50)}var f=b(a.document),g=c.util.inherits(e,c.Component);e.prototype.name="expandable",e.prototype.constructor=e,e.prototype._defaults={_classNameTrigger:"ch-expandable-trigger ch-expandable-ico",_classNameContainer:"ch-expandable-container ch-hide",fx:!1,toggle:!0},e.prototype._init=function(a,b){g._init.call(this,a,b),this.require("Collapsible","Content");var d=this;return this.$trigger=this._$el.addClass(this._options._classNameTrigger).on(c.onpointertap+"."+this.name,function(a){c.pointerCanceled||(c.util.prevent(a),d._options.toggle?d._toggle():d.show())}),this.$container=this._$content=(this._options.container||this._$el.next()).addClass(this._options._classNameContainer).attr("aria-expanded","false"),""===this.$container.prop("id")&&this.$container.prop("id","ch-expandable-"+this.uid),this.$trigger.attr("aria-controls",this.$container.prop("id")),this.on("show",function(){f.trigger(c.onlayoutchange)}).on("hide",function(){f.trigger(c.onlayoutchange)}),c.util.avoidTextSelection(this.$trigger),this},e.prototype.show=function(a,b){return this._enabled?(this._show(),this.$container.attr("aria-expanded","true"),void 0!==a&&this.content(a,b),this):this},e.prototype.hide=function(){return this._enabled?(this._hide(),this.$container.attr("aria-expanded","false"),this):this},e.prototype.isShown=function(){return this._shown},e.prototype.destroy=function(){this.$trigger.off(".expandable").removeClass("ch-expandable-trigger ch-expandable-ico ch-user-no-select").removeAttr("aria-controls"),this.$container.removeClass("ch-expandable-container ch-hide").removeAttr("aria-expanded aria-hidden"),f.trigger(c.onlayoutchange),g.destroy.call(this)},c.factory(e,d)}(this,this.ch.$,this.ch),function(a,b,c){"use strict";function d(b,c){var d=this;d._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50)}function e(a){d.prototype[a]=function(b){var c,d=this.folds[b-1];if(d&&"expandable"===d.name)d[a]();else{for(c=this.folds.length;c;)d=this.folds[c-=1],"expandable"===d.name&&d[a]();f[a].call(this),this._el.setAttribute("aria-disabled",!this._enabled)}return this}}var f=c.util.inherits(d,c.Component),g=["enable","disable"],h=g.length;for(d.prototype.name="menu",d.prototype.constructor=d,d.prototype._defaults={fx:"slideDown"},d.prototype._init=function(a,b){return f._init.call(this,a,b),this._snippet=this._el.cloneNode(!0),this.$container=this._$el.attr("role","navigation").addClass("ch-menu "+(this._options._className||"")+" "+(this._options.addClass||"")),this.folds=[],this._createExpandables(),this},d.prototype._createExpandables=function(){function a(a,f){if(c=b(f).addClass("ch-menu-fold"),d=c.children(":first-child"),"A"===d[0].tagName)c.attr("role","presentation"),d.addClass("ch-fold-trigger"),e.folds.push(d);else{var g=d.expandable({fx:e._options.fx});g.on("show",function(){e.emit("show",a+1)}).on("hide",function(){e.emit("hide")}),d.next().attr("role","menu").children().attr("role","presentation").children().attr("role","menuitem"),e.folds.push(g)}}var c,d,e=this;return b.each(this.$container.children(),a),this},d.prototype.show=function(a){return this.folds[a-1].show(),this},d.prototype.hide=function(a){return this.folds[a-1].hide(),this},d.prototype.content=function(b,c,d){if(void 0===b||"number"!=typeof b)throw new a.Error("Menu.content(fold, content, options): Expected number of fold.");return void 0===c?this.folds[b-1].content():(this.folds[b-1].content(c,d),this)};h;)e(g[h-=1]);d.prototype.destroy=function(){b.each(this.folds,function(a,b){void 0!==b.destroy&&b.destroy()}),this._el.parentNode.replaceChild(this._snippet,this._el),b(a.document).trigger(c.onlayoutchange),f.destroy.call(this)},c.factory(d)}(this,this.ch.$,this.ch),function(a,b,c){"use strict";function d(b,c){var d=this;this._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50)}var e=b(a.document),f=b("body"),g=c.util.inherits(d,c.Component),h={pointertap:c.onpointertap,pointerenter:c.onpointerenter};d.prototype.name="popover",d.prototype.constructor=d,d.prototype._defaults={_ariaRole:"dialog",_className:"",_hideDelay:400,addClass:"",fx:"fadeIn",width:"auto",height:"auto",shownby:"pointertap",hiddenby:"button",waiting:'<div class="ch-loading ch-loading-centered"></div>',position:"absolute"},d.prototype._init=function(a,d){g._init.call(this,a,d),this.require("Collapsible","Content");var f=this;return this.$container=b(["<div",' class="ch-popover ch-hide '+this._options._className+" "+this._options.addClass+'"',' role="'+this._options._ariaRole+'"',' id="ch-'+this.name+"-"+this.uid+'"',' style="z-index:'+(c.util.zIndex+=1)+";width:"+this._options.width+";height:"+this._options.height+'"',">"].join("")).on(c.onpointertap+"."+this.name,function(a){a.stopPropagation()}),this._$content=b('<div class="ch-popover-content">').appendTo(this.$container),this._configureTrigger(),this._configureHiding(),this._positioner=new c.Positioner({target:this.$container,reference:this._options.reference,side:this._options.side,align:this._options.align,offsetX:this._options.offsetX,offsetY:this._options.offsetY,position:this._options.position}),this._refreshPositionListener=function(){return f._shown&&f._positioner.refresh(d),f},e.on(c.onlayoutchange,this._refreshPositionListener),c.viewport.on(c.onresize,this._refreshPositionListener),this.once("_show",this._refreshPositionListener).on("_contentchange",this._refreshPositionListener).on("hide",function(){f.$container.remove(null,!0)}),this},d.prototype._configureTrigger=function(){if(void 0!==this._el){var a=this,b=function(){var b=a._toggle;return("pointerenter"===a._options.shownby||"none"===a._options.hiddenby||"button"===a._options.hiddenby)&&(b=function(){a._shown||a.show()}),b}();this._snippet=this._el.cloneNode(!0),this._options.reference=this._options.reference||this._$el,"none"!==this._options.shownby&&this._$el.addClass("ch-shownby-"+this._options.shownby).on(h[this._options.shownby]+"."+this.name,function(a){c.util.prevent(a),b()}),void 0===this._options.content&&("A"===this._el.nodeName&&""!==this._el.href?this._options.content=this._el.href:(""!==this._el.title||""!==this._el.alt)&&(this._options.content=this._el.title||this._el.alt,this._el.setAttribute("data-title",this._options.content),this._el.title=this._el.alt="")),this._el.setAttribute("aria-owns","ch-"+this.name+"-"+this.uid),this._el.setAttribute("aria-haspopup","true"),this.$trigger=this._$el}},d.prototype._configureHiding=function(){function d(){e=a.setTimeout(function(){f.hide()},f._options._hideDelay)}var e,f=this,g=this._options.hiddenby,h=c.onpointertap+"."+this.name,i={};"none"!==g&&("pointerleave"===g&&void 0!==this.$trigger&&(i[c.onpointerenter+"."+this.name]=function(){a.clearTimeout(e)},i[c.onpointerleave+"."+this.name]=d,this.$trigger.on(i),this.$container.on(i)),("button"===g||"all"===g)&&b('<i class="ch-close" role="button" aria-label="Close"></i>').on(h,function(){f.hide()}).prependTo(this.$container),"pointers"!==g&&"all"!==g||void 0===this._hidingShortcuts||this._hidingShortcuts())},d.prototype._normalizeOptions=function(a){return("string"==typeof a||c.util.is$(a))&&(a={content:a}),a},d.prototype.show=function(a,b){return!this._enabled||this._shown?this:(this.$container.css("z-index",c.util.zIndex+=1).appendTo(f),this._show(),void 0!==a&&this.content(a,b),this)},d.prototype.hide=function(){return this._enabled&&this._shown?(this._hide(),this):this},d.prototype.isShown=function(){return this._shown},d.prototype.width=function(a){return void 0===a?this._options.width:(this.$container.css("width",a),this._options.width=a,this.refreshPosition(),this)},d.prototype.height=function(a){return void 0===a?this._options.height:(this.$container.css("height",a),this._options.height=a,this.refreshPosition(),this)},d.prototype.refreshPosition=function(a){return this._shown?this._positioner.refresh(a):this._positioner._configure(a),this},d.prototype.enable=function(){return void 0!==this._el&&this._el.setAttribute("aria-disabled",!1),g.enable.call(this),this},d.prototype.disable=function(){return void 0!==this._el&&this._el.setAttribute("aria-disabled",!0),this._shown&&this.hide(),g.disable.call(this),this},d.prototype.destroy=function(){void 0!==this.$trigger&&this.$trigger.off("."+this.name).removeClass("ch-"+this.name+"-trigger").removeAttr("data-title aria-owns aria-haspopup data-side data-align role").attr({alt:this._snippet.alt,title:this._snippet.title}),e.off(c.onlayoutchange,this._refreshPositionListener),c.viewport.off(c.onresize,this._refreshPositionListener),g.destroy.call(this)},c.factory(d,d.prototype._normalizeOptions)}(this,this.ch.$,this.ch),function(a,b,c){"use strict";function d(b,c){var d=this;this._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50)}var e=b("body"),f=b('<div class="ch-underlay ch-hide" tabindex="-1">'),g=c.util.inherits(d,c.Popover);d.prototype.name="modal",d.prototype.constructor=d,d.prototype._defaults=b.extend(c.util.clone(g._defaults),{_className:"ch-modal ch-box-lite",_ariaRole:"dialog",width:"50%",hiddenby:"all",reference:c.viewport,waiting:'<div class="ch-loading-large ch-loading-centered"></div>',position:"fixed"}),d.prototype._showUnderlay=function(){f.css("z-index",c.util.zIndex).appendTo(e),"none"!==this._options.fx?f.fadeIn(function(){f.removeClass("ch-hide")}):f.removeClass("ch-hide")},d.prototype._hideUnderlay=function(){"none"!==this._options.fx?f.fadeOut("normal",function(){f.remove(null,!0)}):f.addClass("ch-hide").remove(null,!0)},d.prototype.show=function(a,b){if(!this._enabled||this._shown)return this;var d=this;return("all"===this._options.hiddenby||"pointers"===this._options.hiddenby)&&f.one(c.onpointertap,function(){d.hide()}),this._showUnderlay(),g.show.call(this,a,b),this},d.prototype.hide=function(){return this._shown?(f.off(c.onpointertap),this._hideUnderlay(),g.hide.call(this),this):this},c.factory(d,g._normalizeOptions)}(this,this.ch.$,this.ch),function(a,b){"use strict";function c(c,d){return void 0!==d||void 0===c||b.util.is$(c)||(d=c,c=void 0),d=a.extend(b.util.clone(this._defaults),d),d.content=a('<div class="ch-loading-large"></div><p>'+d.content+"</p>"),new b.Modal(c,d)}c.prototype.name="transition",c.prototype.constructor=c,c.prototype._defaults=a.extend(b.util.clone(b.Modal.prototype._defaults),{_className:"ch-transition ch-box-lite",_ariaRole:"alert",hiddenby:"none",content:"Please wait..."}),b.factory(c,b.Modal.prototype._normalizeOptions)}(this.ch.$,this.ch),function(a,b,c){"use strict";function d(b,c){var d=this;d._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50)}var e=c.util.inherits(d,c.Component);d.prototype.name="form",d.prototype.constructor=d,d.prototype._init=function(a,b){e._init.call(this,a,b);var d=this;return this.errors=[],this._messages=this._options.messages||{},this.validations=[],this.$container=this._$el.addClass("ch-form").attr("novalidate","novalidate").on("submit.form",function(a){d.validate(a)}),this.$container.find('input[type="reset"]').on(c.onpointertap+".form",function(a){c.util.prevent(a),d.reset()}),this.on("disable",this.clear),this},d.prototype.validate=function(a){if(!this._enabled)return this;this.emit("beforevalidate");var b,d,e,f,g=this,h=0,i=g.validations.length;for(this.errors.length=0,h;i>h;h+=1)b=g.validations[h],b.validate(),b.isShown()&&g.errors.push(b);if(g.errors.length>0){for(d=g.errors[0],e=d.$trigger[0];"none"===c.util.getStyles(e,"display")&&e!==document.documentElement;)e=e.parentElement;e.scrollIntoView(),f=d.$trigger[0],"DIV"===f.tagName&&d.$trigger.find("input:first").focus(),("hidden"!==f.type||"SELECT"===f.tagName)&&f.focus(),c.util.prevent(a),this.emit("error",this.errors)}else this.emit("success",a);return this},d.prototype.hasError=function(){if(!this._enabled)return!1;this.errors.length=0;var a,b=0,c=this.validations.length;for(b;c>b;b+=1)a=this.validations[b],a.hasError()&&this.errors.push(a);return this.errors.length>0?!0:!1},d.prototype.clear=function(){var a=0,b=this.validations.length;for(a;b>a;a+=1)this.validations[a].clear();return this.emit("clear"),this},d.prototype.reset=function(){return this.clear(),this._el.reset(),this.emit("reset"),this},d.prototype.destroy=function(){this.$container.off(".form").removeAttr("novalidate"),b.each(this.validations,function(a,b){b.destroy()}),e.destroy.call(this)},c.factory(d)}(this,this.ch.$,this.ch),function(a,b){"use strict";function c(b){return a.extend(this,d[b.name],b),("min"===this.name||"max"===this.name||"minLength"===this.name||"maxLength"===this.name)&&(this.message=this.message.replace("{#num#}",this.num)),this._enabled=!0,this}var d={string:{fn:function(a){return/^([a-zA-Z\u00C0-\u00C4\u00C8-\u00CF\u00D2-\u00D6\u00D9-\u00DC\u00E0-\u00E4\u00E8-\u00EF\u00F2-\u00F6\u00E9-\u00FC\u00C7\u00E7\s]*)$/i.test(a)},message:"Use only letters."},email:{fn:function(a){return/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/i.test(a)},message:"Use a valid e-mail such as name@example.com."},url:{fn:function(a){return/^((https?|ftp|file):\/\/|((www|ftp)\.)|(\/|.*\/)*)[a-z0-9-]+((\.|\/)[a-z0-9-]+)+([/?].*)?$/i.test(a)},message:"It must be a valid URL."},minLength:{fn:function(a,b){return a.length>=b},message:"Enter at least {#num#} characters."},maxLength:{fn:function(a,b){return a.length<=b},message:"The maximum amount of characters is {#num#}."},number:{fn:function(a){return/^(-?[0-9]+)$/i.test(a)},message:"Use only numbers."},max:{fn:function(a,b){return b>=a},message:"The amount must be smaller than {#num#}."},min:{fn:function(a,b){return a>=b},message:"The amount must be higher than {#num#}."},required:{fn:function(b){var c,d=this.$trigger.hasClass("ch-form-options")?"OPTIONS":this._el.tagName;switch(d){case"OPTIONS":c=0!==this.$trigger.find("input:checked").length;break;case"SELECT":c="-1"!==b&&""!==b;break;default:c=0!==a.trim(b).length}return c},message:"Fill in this information."},custom:{message:"Error"}};c.prototype.name="condition",c.prototype.constructor=c,c.prototype.enable=function(){return this._enabled=!0,this},c.prototype.disable=function(){return this._enabled=!1,this},c.prototype.test=function(a,b){return this._enabled?this.fn.call(b,a,this.num):!0},b.Condition=c}(this.ch.$,this.ch),function(a,b){"use strict";function c(b,c){var d=this;this._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50)}function d(a){c.prototype[a]=function(b){var c;if(void 0!==b&&void 0!==this.conditions[b])this.conditions[b][a]();else{for(c in this.conditions)void 0!==this.conditions[c]&&this.conditions[c][a]();e[a].call(this)}return this}}var e=b.util.inherits(c,b.Component),f=["enable","disable"],g=f.length;for(c.prototype.name="validation",c.prototype.constructor=c,c.prototype._defaults={offsetX:10},c.prototype._init=function(a,b){var c=this;return e._init.call(this,a,b),this.$trigger=this._$el,this._configureContainer(),this.conditions={},this._mergeConditions(b.conditions),this._shown=!1,this.error=null,this.on("exist",function(a){this._mergeConditions(a.conditions)}).on("disable",this.clear),this.form=c.$trigger.parents("form").data("form")||c.$trigger.parents("form").form(),this.form.validations.push(this),this._validationEvent=this.$trigger.hasClass("ch-form-options")||"SELECT"===this._el.tagName||"INPUT"===this._el.tagName&&"range"===this._el.type?"change":"blur",this},c.prototype._mergeConditions=function(a){var c=0,d=a.length;for(c;d>c;c+=1)this.conditions[a[c].name]=new b.Condition(a[c]);return this},c.prototype.validate=function(){return this.hasError()?this._error():this._success(),this},c.prototype._error=function(){var a,b=this;return this.$trigger.on(this._validationEvent+".validation",function(){(a!==this.value||"change"===b._validationEvent&&b.isShown())&&(a=this.value,b.validate()),void 0===b.conditions.required&&""===this.value&&b.clear()}),this._error=function(){return b._previousError.condition&&b._shown||(("INPUT"===b._el.nodeName||"TEXTAREA"===b._el.nodeName)&&b.$trigger.addClass("ch-validation-error"),b._showErrorMessage(b.error.message||"Error")),b.error.condition!==b._previousError.condition&&b._showErrorMessage(b.error.message||b.form._messages[b.error.condition]||"Error"),
  b._shown=!0,b.emit("error",b.error),b},this._error(),this},c.prototype._success=function(){return(this._shown||!this._enabled)&&(this._shown=!1),this.$trigger.removeClass("ch-validation-error").removeAttr("aria-label"),this._hideErrorMessage(),this.emit("success"),this},c.prototype.hasError=function(){if(this.$trigger.attr("disabled")||!this._enabled)return!1;var a,c=this.conditions.required,d=this._el.value;if(!c&&""===d&&this._shown===!1)return!1;this._previousError=b.util.clone(this.error);for(a in this.conditions)if(void 0!==this.conditions[a]&&!this.conditions[a].test(d,this))return this.error={condition:a,message:this.conditions[a].message},!0;return this.error=null,!1},c.prototype.clear=function(){return this.$trigger.removeClass("ch-validation-error").removeAttr("aria-label"),this.error=null,this._hideErrorMessage(),this._shown=!1,this.emit("clear"),this},c.prototype.and=function(){return this.$trigger},c.prototype.isShown=function(){return this._shown},c.prototype.message=function(a,b){if(void 0===a)throw new Error("validation.message(condition, message): Please, a condition parameter is required.");return void 0===b?this.conditions[a].message:(this.conditions[a].message=b,this.isShown()&&this.error.condition===a&&this._showErrorMessage(b),this)};g;)d(f[g-=1]);c.prototype.destroy=function(){this.$trigger.off(".validation").removeAttr("data-side data-align"),e.destroy.call(this)},b.factory(c)}(this,this.ch),function(a,b){"use strict";a.Validation.prototype._configureContainer=function(){return this._container=b('<div class="ch-validation-message ch-hide">').appendTo(this.$trigger.parent()),this},a.Validation.prototype._showErrorMessage=function(a){return this._container.html(a).removeClass("ch-hide"),this},a.Validation.prototype._hideErrorMessage=function(){return this._container.addClass("ch-hide"),this}}(this.ch,this.ch.$),function(a){"use strict";function b(a){var b,c={name:"string"};return"object"==typeof a?(b=a,c.message=b.message,delete b.message):(b={},c.message=a),b.conditions=[c],b}function c(b,c){return new a.Validation(b,c)}c.prototype.name="string",c.prototype.constructor=c,c.prototype._preset="validation",a.factory(c,b)}(this.ch),function(a,b){"use strict";function c(a,b){var c,d={name:"maxLength"};return"object"==typeof a?(c=a,d.num=c.num,d.message=c.message,delete c.num,delete c.message):(c={},d.num=a,d.message=b),c.conditions=[d],c}function d(a,c){return new b.Validation(a,c)}d.prototype.name="maxLength",d.prototype.constructor=b.MaxLength,d.prototype._preset="validation",b.factory(d,c)}(this,this.ch),function(a,b){"use strict";function c(a,b){var c,d={name:"minLength"};return"object"==typeof a?(c=a,d.num=c.num,d.message=c.message,delete c.num,delete c.message):(c={},d.num=a,d.message=b),c.conditions=[d],c}function d(a,c){return new b.Validation(a,c)}d.prototype.name="minLength",d.prototype.constructor=b.MinLength,d.prototype._preset="validation",b.factory(d,c)}(this,this.ch),function(a,b){"use strict";function c(a){var b,c={name:"email"};return"object"==typeof a?(b=a,c.message=b.message,delete b.message):(b={},c.message=a),b.conditions=[c],b}function d(a,c){return new b.Validation(a,c)}d.prototype.name="email",d.prototype.constructor=d,d.prototype._preset="validation",b.factory(d,c)}(this,this.ch),function(a){"use strict";function b(a){var b,c={name:"url"};return"object"==typeof a?(b=a,c.message=b.message,delete b.message):(b={},c.message=a),b.conditions=[c],b}function c(b,c){return new a.Validation(b,c)}c.prototype.name="url",c.prototype.constructor=c,c.prototype._preset="validation",a.factory(c,b)}(this.ch),function(a){"use strict";function b(a){var b,c={name:"number"};return"object"==typeof a?(b=a,c.message=b.message,delete b.message):(b={},c.message=a),b.conditions=[c],b}function c(b,c){return new a.Validation(b,c)}c.prototype.name="number",c.prototype.constructor=c,c.prototype._preset="validation",a.factory(c,b)}(this.ch),function(a,b){"use strict";function c(a,b){var c,d={name:"min"};return"object"==typeof a?(c=a,d.num=c.num,d.message=c.message,delete c.num,delete c.message):(c={},d.num=a,d.message=b),c.conditions=[d],c}function d(a,c){return new b.Validation(a,c)}d.prototype.name="min",d.prototype.constructor=d,d.prototype._preset="validation",b.factory(d,c)}(this,this.ch),function(a,b){"use strict";function c(a,b){var c,d={name:"max"};return"object"==typeof a?(c=a,d.num=c.num,d.message=c.message,delete c.num,delete c.message):(c={},d.num=a,d.message=b),c.conditions=[d],c}function d(a,c){return new b.Validation(a,c)}d.prototype.name="max",d.prototype.constructor=d,d.prototype._preset="validation",b.factory(d,c)}(this,this.ch),function(a,b){"use strict";function c(a,b,c){var d,e={};return"object"==typeof a?(d=a,e.name=d.name,e.fn=d.fn,e.message=d.message,delete d.name,delete d.fn,delete d.message):(d={},e.name=a,e.fn=b,e.message=c),d.conditions=[e],d}function d(a,c){return new b.Validation(a,c)}d.prototype.name="custom",d.prototype.constructor=d,d.prototype._preset="validation",b.factory(d,c)}(this,this.ch),function(a,b){"use strict";function c(a){var b,c={name:"required"};return"object"==typeof a?(b=a,c.message=b.message,delete b.message):(b={},c.message=a),b.conditions=[c],b}function d(a,c){return new b.Validation(a,c)}d.prototype.name="required",d.prototype.constructor=d,d.prototype._preset="validation",b.factory(d,c)}(this,this.ch),function(a,b,c){"use strict";function d(b){var c=a.parseInt(b,10);return a.isNaN(c)||(b={max:c}),b}function e(b,c){var d=this;d._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50)}var f=c.util.inherits(e,c.Component);e.prototype.name="countdown",e.prototype.constructor=e,e.prototype._defaults={plural:"# characters left.",singular:"# character left.",max:500},e.prototype._init=function(a,c){f._init.call(this,a,c);var d,e=this,g="ch-countdown-message-"+e.uid;return this.$trigger=this._$el.on("keyup.countdown keypress.countdown keydown.countdown paste.countdown cut.countdown input.countdown",function(){e._count()}),e._remaining=e._options.max-e._contentLength(),d=1===e._remaining?e._options.singular:e._options.plural,e.$container=b('<p class="ch-countdown ch-form-hint" id="'+g+'">'+d.replace("#",e._remaining)+"</p>").appendTo(e._$el.parent()),this.on("disable",this._removeError),this},e.prototype._contentLength=function(){return this._el.value.length},e.prototype._count=function(){if(!this._enabled)return this;var a,b=this._contentLength();return this._remaining=this._options.max-b,b<=this._options.max?this._exceeded&&(this._exceeded=!1,this._removeError()):b>this._options.max&&(this.emit("exceed"),this._exceeded=!0,this.$trigger.addClass("ch-validation-error").attr("aria-invalid","true"),this.$container.addClass("ch-countdown-exceeded")),a=(1!==this._remaining?this._options.plural:this._options.singular).replace(/\#/g,this._remaining),this.$container.text(a),this},e.prototype._removeError=function(){return this.$trigger.removeClass("ch-validation-error").attr("aria-invalid","false"),this.$container.removeClass("ch-countdown-exceeded"),this},e.prototype.destroy=function(){this.$trigger.off(".countdown"),this.$container.remove(),b(a.document).trigger(c.onlayoutchange),f.destroy.call(this)},c.factory(e,d)}(this,this.ch.$,this.ch),function(a,b,c){"use strict";function d(b,c){var d=this;this._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50)}var e=c.onpointertap+".carousel",f=a.Math,g=a.setTimeout,h=c.util.inherits(d,c.Component);d.prototype.name="carousel",d.prototype.constructor=d,d.prototype._defaults={async:0,arrows:!0,pagination:!1,fx:!0},d.prototype._init=function(d,f){h._init.call(this,d,f);var g=this;return this._snippet=this._el.cloneNode(!0),this._$list=this._$el.addClass("ch-carousel").children().addClass("ch-carousel-list"),this._$items=this._$list.children().addClass("ch-carousel-item"),this._$mask=b('<div class="ch-carousel-mask" role="tabpanel">').html(this._$list).appendTo(this._$el),this._maskWidth=c.util.getOuterDimensions(this._$mask[0]).width,this._itemWidth=this._$items.width(),this._itemOuterWidth=c.util.getOuterDimensions(this._$items[0]).width,this._itemExtraWidth=0,this._itemHeight=this._$items.height(),this._itemMargin=0,this._arrowsCreated=!1,this._paginationCreated=!1,this._limitPerPage=0,this._currentPage=1,this._pages=0,this._pageWidth=0,this._async=this._options.async,this._$prevArrow=b('<div class="ch-carousel-prev ch-carousel-disabled" role="button" aria-hidden="true">').on(e,function(){g.prev()}),g._$nextArrow=b('<div class="ch-carousel-next" role="button" aria-hidden="false">').on(e,function(){g.next()}),this._$pagination=b('<div class="ch-carousel-pages" role="navigation">').on(e,function(b){var c=b.target.getAttribute("data-page");null!==c&&g.select(a.parseInt(c,10))}),c.viewport.on("resize",function(){g.refresh()}),this._options.fx||this._$list.addClass("ch-carousel-nofx"),c.support.transition||this._$list.css({position:"absolute",left:"0"}),this._options.pagination&&this._addPagination(),void 0!==this._options.arrows&&this._options.arrows!==!1&&this._addArrows(),this._updateARIA(),this._updateLimitPerPage(),this._updateDistribution(),this},d.prototype._updateARIA=function(){var a,c=this,d=this._$items.length+this._async;b.each(this._$items,function(b,e){a=f.floor(b/c._limitPerPage)+1,e.setAttribute("aria-hidden",a!==c._currentPage),e.setAttribute("aria-setsize",d),e.setAttribute("aria-posinset",b+1),e.setAttribute("aria-label","page"+a)})},d.prototype._loadAsyncItems=function(){if(0!==this._async){var a,c=this._currentPage*this._limitPerPage,d=c-this._$items.length,e=this._itemWidth+this._itemExtraWidth,f=(e*this._itemHeight/this._itemWidth).toFixed(3),g=["<li",' class="ch-carousel-item"',' style="width:'+e+"px;height:"+f+"px;margin-right:"+this._itemMargin+'px"',"></li>"].join(""),h="";if(!(1>d)){for(d=this._async<d?this._async:d;d;)h+=g,d-=1;a=b(h),this._$list.append(a),this._$items=this._$list.children(),this._updateARIA(),this._async-=d,this.emit("itemsadd",a)}}},d.prototype._addPagination=function(){this._paginationCreated&&this._removePagination();for(var a,b=this,d=[],e=b._pages;e;)a=e===b._currentPage,d.unshift("<span",' role="button"',' aria-selected="'+a+'"',' aria-controls="page'+e+'"',' data-page="'+e+'"',' class="'+(a?"ch-carousel-selected":"")+'"',">"+e+"</span>"),e-=1;b._$pagination.html(d.join("")).appendTo(b._$el),c.util.avoidTextSelection(b._$pagination),b._paginationCreated=!0},d.prototype._removePagination=function(){this._paginationCreated&&(this._$pagination[0].innerHTML="",this._paginationCreated=!1)},d.prototype._standbyFX=function(a){var b=this;this._options.fx?(this._$list.addClass("ch-carousel-nofx"),a.call(this),g(function(){b._$list.removeClass("ch-carousel-nofx")},0)):a.call(this)},d.prototype._updatePages=function(){this._pages=f.ceil((this._$items.length+this._async)/this._limitPerPage),this._loadAsyncItems(),this._updateARIA(),this._updateArrows(),this._options.pagination&&this._addPagination()},d.prototype._updateLimitPerPage=function(){var a,b=this._options.limitPerPage,c=f.floor(this._maskWidth/this._itemOuterWidth)||1;void 0!==b&&c>b&&(c=b),c!==this._limitPerPage&&(a=(this._currentPage-1)*this._limitPerPage+1,this._limitPerPage=c,this._updatePages(),this.select(f.ceil(a/c)))},d.prototype._updateDistribution=function(){var a,b,d=this._limitPerPage>1,e=this._maskWidth-this._itemOuterWidth*this._limitPerPage,g=f.ceil(d?e/this._limitPerPage/2:e);g===this._itemExtraWidth&&g>0||(this._itemExtraWidth=g,a=d?this._limitPerPage-1:0,b=this._itemWidth+g,this._itemMargin=d?f.ceil(e/a/2):0,this._pageWidth=(this._itemOuterWidth+g+this._itemMargin)*this._limitPerPage,this._standbyFX(function(){this._$list.css("width",this._pageWidth*this._pages)}),this._$items.css({width:b,height:(b*this._itemHeight/this._itemWidth).toFixed(3),"margin-right":this._itemMargin}),this._$mask[0].style.height=c.util.getOuterDimensions(this._$items[0]).height+"px",this._standbyFX(function(){this._translate(-this._pageWidth*(this._currentPage-1))}))},d.prototype._addArrows=function(){c.util.avoidTextSelection(this._$prevArrow,this._$nextArrow),this._$el.prepend(this._$prevArrow).append(this._$nextArrow),this._arrowsCreated=!0},d.prototype._disableArrows=function(a,b){this._$prevArrow.attr("aria-disabled",a)[a?"addClass":"removeClass"]("ch-carousel-disabled"),this._$nextArrow.attr("aria-disabled",b)[b?"addClass":"removeClass"]("ch-carousel-disabled")},d.prototype._updateArrows=function(){this._arrowsCreated&&(1===this._pages?this._disableArrows(!0,!0):1===this._currentPage?this._disableArrows(!0,!1):this._currentPage===this._pages?this._disableArrows(!1,!0):this._disableArrows(!1,!1))},d.prototype._translate=function(){var a="-"+c.util.VENDOR_PREFIX+"-transform";return c.support.transition?function(b){this._$list.css(a,"translateX("+b+"px)")}:function(a){this._$list[this._options.fx?"animate":"css"]({left:a})}}(),d.prototype._switchPagination=function(a,b){if(this._paginationCreated){var c=this._$pagination.children();c.eq(a-1).attr("aria-selected",!1).removeClass("ch-carousel-selected"),c.eq(b-1).attr("aria-selected",!0).addClass("ch-carousel-selected")}},d.prototype.refresh=function(){var a=this,b=c.util.getOuterDimensions(this._$mask[0]).width;return b!==this._maskWidth&&(this._maskWidth=b,this._updateLimitPerPage(),this._updateDistribution(),this.emit("refresh")),this._$list.children().length!==this._$items.length&&(this._$items=this._$list.children(),this._updatePages(),this._currentPage>this._pages&&this._standbyFX(function(){a.select(a._pages)}),this.emit("refresh")),this},d.prototype.select=function(a){return void 0===a?this._currentPage:!this._enabled||a===this._currentPage||1>a||a>this._pages?this:(this._translate(-this._pageWidth*(a-1)),this._switchPagination(this._currentPage,a),this._currentPage=a,this._updateArrows(),this._loadAsyncItems(),this.emit("select"),this)},d.prototype.prev=function(){return this.select(this._currentPage-1),this.emit("prev"),this},d.prototype.next=function(){return this.select(this._currentPage+1),this.emit("next"),this},d.prototype.enable=function(){return this._el.setAttribute("aria-disabled",!1),this._disableArrows(!1,!1),h.enable.call(this),this},d.prototype.disable=function(){return this._el.setAttribute("aria-disabled",!0),this._disableArrows(!0,!0),h.disable.call(this),this},d.prototype.destroy=function(){this._el.parentNode.replaceChild(this._snippet,this._el),b(a.document).trigger(c.onlayoutchange),h.destroy.call(this)},c.factory(d)}(this,this.ch.$,this.ch),function(a,b,c){"use strict";function d(b,c){var d=this;return this._init(b,c),void 0!==this.initialize&&this.initialize(),a.setTimeout(function(){d.emit("ready")},50),this}var e=c.util.inherits(d,c.Component);d.prototype.name="autocomplete",d.prototype.constructor=d,d.prototype._defaults={loadingClass:"ch-autocomplete-loading",highlightedClass:"ch-autocomplete-highlighted",itemClass:"ch-autocomplete-item",addClass:"ch-box-lite ch-autocomplete",side:"bottom",align:"left",html:!1,_hiddenby:"none",keystrokesTime:150,_itemTemplate:'<li class="{{itemClass}}"{{suggestedData}}>{{term}}<i class="ch-icon-arrow-up" data-js="ch-autocomplete-complete-query"></i></li>'},d.prototype._init=function(a,d){var f=this,g="mousedown."+this.name,h="mouseover."+this.name,i=c.support.touch?g:h;return e._init.call(this,a,d),this._options._itemTemplate=this._options._itemTemplate.replace("{{itemClass}}",this._options.itemClass),this._options.html&&(this._options._itemTemplate=this._options._itemTemplate.replace("{{suggestedData}}","")),this._$suggestionsList=b('<ul class="ch-autocomplete-list"></ul>'),this._popover=b.popover({reference:this._$el,content:this._$suggestionsList,side:this._options.side,align:this._options.align,addClass:this._options.addClass,hiddenby:this._options._hiddenby,width:this._el.getBoundingClientRect().width+"px",fx:this._options.fx}),this.$container=this._popover.$container.attr("aria-hidden","true").on(i,function(a){f._highlightSuggestion(b(a.target))}).on(g,function(a){return"I"!==a.target.nodeName||f._options.html?void(("LI"===a.target.nodeName&&-1!==a.target.className.indexOf(f._options.itemClass)||"LI"===a.target.parentElement.nodeName&&-1!==a.target.parentElement.className.indexOf(f._options.itemClass))&&f._selectSuggestion()):(c.util.prevent(a),f._el.value=f._suggestions[f._highlighted],void f.emit("type",f._el.value))}),this.$trigger=this._$el.attr({"aria-autocomplete":"list","aria-haspopup":"true","aria-owns":this.$container[0].id,autocomplete:"off"}).on("focus."+this.name,function(){f._turnOn()}).on("blur."+this.name,function(){f._turnOff()}),this._highlighted=null,this._suggestions=[],this._originalQuery=this._currentQuery=this._el.value,void 0!==this._configureShortcuts&&this._configureShortcuts(),this._$el.is(":focus")&&this._turnOn(),this},d.prototype._turnOn=function(){if(!this._enabled)return this;var b=this;return this._originalQuery=this._el.value,this.$trigger.on(c.onkeyinput,function(){return b._currentQuery=b._el.value.replace(/^\s+|\s+$/g,""),""===b._currentQuery?b.hide():(a.clearTimeout(b._stopTyping),void(b._stopTyping=a.setTimeout(function(){b.$trigger.addClass(b._options.loadingClass),b.emit("type",b._currentQuery)},b._options.keystrokesTime)))}),this},d.prototype._turnOff=function(){return this._enabled?(this.hide(),this.$trigger.off(c.onkeyinput),this):this},d.prototype._selectSuggestion=function(){return a.clearTimeout(this._stopTyping),null===this._highlighted?this:(this._options.html||(this._el.value=this._suggestions[this._highlighted]),this._el.blur(),this.emit("select"),this)},d.prototype._highlightSuggestion=function(a){var b=a.attr("aria-posinset")?a:a.parents("li[aria-posinset]");return this._highlighted=void 0!==b[0]?parseInt(b.attr("aria-posinset"),10)-1:null,this._toogleHighlighted(),this},d.prototype._toogleHighlighted=function(){var a="#"+this.$container[0].id,c=null===this._highlighted?null:this._highlighted+1;return b(a+" [aria-posinset]."+this._options.highlightedClass).removeClass(this._options.highlightedClass),b(a+' [aria-posinset="'+c+'"]').addClass(this._options.highlightedClass),this},d.prototype.suggest=function(c){var d,e,f,g,h=this,i=[],j=new RegExp("("+this._currentQuery.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")+")","ig"),k=0,l=this._options._itemTemplate,m=c.length;if(this.$trigger.removeClass(h._options.loadingClass),0===m)return this._popover.hide(),this;for(this._popover.isShown()||a.document.activeElement!==this._el||this._popover.show(),b("."+this._options.highlightedClass,this.$container).removeClass(this._options.highlightedClass),e=0;m>e;e+=1)f=c[e],h._options.html||(f=f.replace(j,"<strong>$1</strong>"),l=this._options._itemTemplate.replace("{{suggestedData}}",' data-suggested="'+c[e]+'"')),i.push(l.replace("{{term}}",f));for(this._$suggestionsList[0].innerHTML=i.join(""),d=b("."+this._options.itemClass,this.$container),k=d.length,this._suggestions.length=0,e=0;k>e;e+=1)g=d[e],h._suggestions.push(g.getAttribute("data-suggested")),g.setAttribute("aria-posinset",h._suggestions.length),g.setAttribute("aria-setsize",k);return this._highlighted=null,this._suggestionsQuantity=this._suggestions.length,this},d.prototype.hide=function(){return this._enabled?(this._popover.hide(),this.emit("hide"),this):this},d.prototype.isShown=function(){return this._popover.isShown()},d.prototype.disable=function(){return this.isShown()&&(this.hide(),this._el.blur()),e.disable.call(this),this},d.prototype.destroy=function(){this.$trigger.off("."+this.name).removeAttr("autocomplete aria-autocomplete aria-haspopup aria-owns"),this._popover.destroy(),e.destroy.call(this)},c.factory(d)}(this,this.ch.$,this.ch);