+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);var e=this.options.trigger.split(" ");for(var f=e.length;f--;){var g=e[f];if(g=="click")this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if(g!="manual"){var h=g=="hover"?"mouseenter":"focus",i=g=="hover"?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="in";if(!c.options.delay||!c.options.delay.show)return c.show();c.timeout=setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="out";if(!c.options.delay||!c.options.delay.hide)return c.hide();c.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d=typeof this.options.placement=="function"?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m=this.options.container=="body"?window.innerWidth:j.outerWidth(),n=this.options.container=="body"?window.innerHeight:j.outerHeight(),o=this.options.container=="body"?0:j.offset().left;d=d=="bottom"&&g.top+g.height+i-l>n?"top":d=="top"&&g.top-l-i<0?"bottom":d=="right"&&g.right+h>m?"left":d=="left"&&g.left-h<o?"right":d,c.removeClass(k).addClass(d)}var p=this.getCalculatedOffset(d,g,h,i);this.applyPlacement(p,d),this.$element.trigger("shown.bs."+this.type)}},b.prototype.applyPlacement=function(a,b){var c,d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),a.top=a.top+g,a.left=a.left+h,d.offset(a).addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;b=="top"&&j!=f&&(c=!0,a.top=a.top+f-j);if(/bottom|top/.test(b)){var k=0;a.left<0&&(k=a.left*-2,a.left=0,d.offset(a),i=d[0].offsetWidth,j=d[0].offsetHeight),this.replaceArrow(k-e+i,i,"left")}else this.replaceArrow(j-f,j,"top");c&&d.offset(a)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function e(){b.hoverState!="in"&&c.detach()}var b=this,c=this.tip(),d=a.Event("hide.bs."+this.type);this.$element.trigger(d);if(d.isDefaultPrevented())return;return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?c.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),this.$element.trigger("hidden.bs."+this.type),this},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return a=="bottom"?{top:b.top+b.height,left:b.left+b.width/2-c/2}:a=="top"?{top:b.top-d,left:b.left+b.width/2-c/2}:a=="left"?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f=typeof c=="object"&&c;e||d.data("bs.tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||(typeof b.content=="function"?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f=typeof c=="object"&&c;e||d.data("bs.popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery);
!function(){function t(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}function e(t,e,i){for(var n in e){var s=e[n],r=t.input.getAttribute("data-"+n.toLowerCase());"number"==typeof s?t[n]=parseInt(r):!1===s?t[n]=null!==r:s instanceof Function?t[n]=null:t[n]=r,t[n]||0===t[n]||(t[n]=n in i?i[n]:s)}}function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function n(t,e){return o.call((e||document).querySelectorAll(t))}function s(){n("input.awesomplete").forEach(function(t){new r(t)})}var r=function(t,n){var s=this;r.count=(r.count||0)+1,this.count=r.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},e(this,{minChars:2,maxItems:10,autoFirst:!1,data:r.DATA,filter:r.FILTER_CONTAINS,sort:!1!==n.sort&&r.SORT_BYLENGTH,container:r.CONTAINER,item:r.ITEM,replace:r.REPLACE,tabSelect:!1},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:0!=this.minChars?"Type "+this.minChars+" or more characters for results.":"Begin typing for results."}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;s.opened&&(13===e&&s.selected?(t.preventDefault(),s.select()):9===e&&s.selected&&s.tabSelect?s.select():27===e?s.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),s[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),s.select(e,t.target))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],r.all.push(this)};r.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];o.apply(t.children).forEach(function(t){if(!t.disabled){var i=t.textContent.trim(),n=t.value||i,s=t.label||i;""!==n&&e.push({label:s,value:n})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var e=r.all.indexOf(this);-1!==e&&r.all.splice(e,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent+", list item "+(t+1)+" of "+e.length,this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var n=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:n,origin:e||t})&&(this.replace(n),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:n}))}},evaluate:function(){var e=this,i=this.input.value;i.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(n){return new t(e.data(n,i))}).filter(function(t){return e.filter(t,i)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(t,n){e.ul.appendChild(e.item(t,i,n))}),0===this.ul.children.length?(this.status.textContent="No results found",this.close({reason:"nomatches"})):(this.open(),this.status.textContent=this.ul.children.length+" results found")):(this.close({reason:"nomatches"}),this.status.textContent="No results found")}},r.all=[],r.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},r.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},r.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},r.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},r.ITEM=function(t,e,n){return i.create("li",{innerHTML:""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>"),role:"option","aria-selected":"false",id:"awesomplete_list_"+this.count+"_item_"+n})},r.REPLACE=function(t){this.input.value=t.value},r.DATA=function(t){return t},Object.defineProperty(t.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),t.prototype.toString=t.prototype.valueOf=function(){return""+this.label};var o=Array.prototype.slice;i.create=function(t,e){var n=document.createElement(t);for(var s in e){var r=e[s];if("inside"===s)i(r).appendChild(n);else if("around"===s){var o=i(r);o.parentNode.insertBefore(n,o),n.appendChild(o),null!=o.getAttribute("autofocus")&&o.focus()}else s in n?n[s]=r:n.setAttribute(s,r)}return n},i.bind=function(t,e){if(t)for(var i in e){var n=e[i];i.split(/\s+/).forEach(function(e){t.addEventListener(e,n)})}},i.unbind=function(t,e){if(t)for(var i in e){var n=e[i];i.split(/\s+/).forEach(function(e){t.removeEventListener(e,n)})}},i.fire=function(t,e,i){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0);for(var s in i)n[s]=i[s];return t.dispatchEvent(n)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=r),"undefined"!=typeof Document&&("loading"!==document.readyState?s():document.addEventListener("DOMContentLoaded",s)),r.$=i,r.$$=n,"object"==typeof module&&module.exports&&(module.exports=r)}();
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],e):e(jQuery)}(function(o){"use strict";var n=!1;return o(document).on("mouseup",function(){n=!1}),o.widget("ui.mouse",{version:"1.13.3",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===o.data(e.target,t.widgetName+".preventClickEvent"))return o.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){var t,i,s;if(!n)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),i=1===(this._mouseDownEvent=e).which,s=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&o(e.target).closest(this.options.cancel).length,i&&!s&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===o.data(e.target,this.widgetName+".preventClickEvent")&&o.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0)),!0},_mouseMove:function(e){if(this._mouseMoved){if(o.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&o.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
!function(e){function t(i){if(r[i])return r[i].exports;var a=r[i]={exports:{},id:i,loaded:!1};return e[i].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){e="error"===e?"red":"green",jQuery("#notification-panel").removeClass("red green").addClass(e).html(t)}var s="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},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),u=r(1),l=i(u),c=r(2),d=(i(c),r(3)),p=i(d),h=window.FC.fct,f=r(4).Parser,m=new f;"function"!=typeof Object.assign&&(Object.assign=function(e){if(null===e)throw new TypeError("Cannot convert undefined or null to object");e=Object(e);for(var t=1;t<arguments.length;t++){var r=arguments[t];if(null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e});var y=function(){function e(t){a(this,e),this.form=t,this.formID=t.attr("data-id"),this.parentElement=t.parents(".form-live");var r=this;this.setupAutocomplete(),this.setupInputMasks(),this.setupCharacterCount(),this.setupSliderFields(),this.setupDatepickerFields(),this.setupFileUploadFields(),this.setupTimepickerFields(),this.setupAddressFields(),t.find(".star-cover label").removeClass("fake-click fake-hover active"),this.form.find(".textarea-cover textarea").each(function(){(0,l["default"])(this)}).on("input",function(){var e=document.createEvent("Event");e.initEvent("autosize:update",!0,!1),this.dispatchEvent(e)}),jQuery().tooltip&&(p["default"].isMobile()===!0?this.parentElement.find('.fc-form [data-toggle="tooltip"]').tooltip({container:".fc-form",placement:"top"}):this.parentElement.find('.fc-form [data-toggle="tooltip"]').tooltip({container:".fc-form"})),jQuery(".formcraft-icon").each(function(){""!==jQuery(this).text()&&"no-icon"!==jQuery(this).text()||jQuery(this).remove()}),this.prepareMathFormulas(),jQuery(this.form).on("submit",function(e){e.preventDefault(),FormCraftSubmitForm(r.form,"all")}),jQuery(this.form).find("span.error").text(""),setTimeout(function(){jQuery(this.form).find(".form-element.error-field").removeClass("error-field")},300),r.form.hasClass("save-form-true")&&setInterval(function(){return r.saveProgress()},3e3),this.FormCraftLogic=window.formcraftLogic[this.formID]?window.formcraftLogic[this.formID]:null,t.on("input",'.oneLineText-cover input[type="text"], .address-cover input[type="text"], .password-cover input[type="password"], .datepicker-cover input[type="text"], .email-cover input[type="text"], .email-cover input[type="email"], .textarea-cover textarea',function(){r.setValue=[],r.checkIfApplyMath(jQuery(this)),r.checkIfApplyLogic(jQuery(this))}),t.on("change",'.customText-cover input[type="hidden"], .timepicker-cover input[type="hidden"], .slider-cover input[type="hidden"], .fileupload-cover input[type="hidden"], .checkbox-cover input[type="radio"], .star-cover input[type="radio"], .thumb-cover input[type="radio"], .checkbox-cover input[type="checkbox"], .dropdown-cover select',function(){r.setValue=[],r.checkIfApplyMath(jQuery(this)),r.checkIfApplyLogic(jQuery(this))}),t.on("change",'.checkbox-cover input[type="checkbox"]',function(){var e=t.data("FieldLabels")||{},r=jQuery(this).attr("name").replace(/[\[\]']+/g,"")+".label";e[r]=[],jQuery(this).parents(".checkbox-cover").find('input[type="checkbox"]').each(function(){if(jQuery(this).prop("checked")){var t=jQuery(this).parent().find("span").html().replace(/(<([^>]+)>)/gi,"");e[r].push(t)}}),t.data("FieldLabels",e)}),t.on("change",'.checkbox-cover input[type="radio"]',function(){var e=t.data("FieldLabels")||{},r=jQuery(this).attr("name").replace(/[\[\]']+/g,"")+".label";e[r]=[],jQuery(this).parents(".checkbox-cover").find('input[type="radio"]').each(function(){if(jQuery(this).prop("checked")){var t=jQuery(this).parent().find("span").html().replace(/(<([^>]+)>)/gi,"");e[r].push(t)}}),t.data("FieldLabels",e)}),t.on("change",".dropdown-cover select",function(){var e=t.data("FieldLabels")||{},r=jQuery(this).attr("name").replace(/[\[\]']+/g,"")+".label";e[r]=[],e[r].push(jQuery(this).find("option:selected").text()),t.data("FieldLabels",e)}),setTimeout(function(){var e={};r.form.parents(".form-live").find(".pre-populate-data").each(function(){var t=jQuery(this).text().replace(/“/g,'"').replace(/”/g,'"').replace(/″/g,'"');if(""===t)return!0;t=jQuery.parseJSON(t);for(var r in t)(""===t[r]||"object"===s(t[r])&&""===t[r][0])&&delete t[r];e=Object.assign(e,t)}),r.setFormValues(e),setTimeout(function(){jQuery('.oneLineText-cover input[type="text"],.datepicker-cover input[type="text"], .email-cover input[type="text"], .email-cover input[type="email"], .textarea-cover textarea').trigger("input"),jQuery('.customText-cover input[type="hidden"],.timepicker-cover input[type="hidden"],.slider-cover input[type="hidden"],.fileupload-cover input[type="hidden"],.star-cover input[type="radio"],.thumb-cover input[type="radio"],.dropdown-cover select').trigger("change")},0)},0),t.keypress(function(e){13===e.which&&t.hasClass("disable-enter-true")===!0&&"textarea"!=e.target.type&&e.preventDefault()}),this.form.find(".required_field").hide(),this.form.find('[make-read-only="true"]').attr("readonly",!0).addClass("is-read-only")}return o(e,[{key:"disableSubmit",value:function(){this.form.find(".submit-button").attr("disabled",!0)}},{key:"enableSubmit",value:function(){this.form.find(".submit-button").attr("disabled",!1)}},{key:"setupCharacterCount",value:function(){this.form.find(".textarea-cover textarea").on("input",function(){var e=jQuery(this).val().length,t=parseInt(jQuery(this).parents(".textarea-cover").find(".count-true > span.max-count").text(),10);e>t?jQuery(this).parents(".textarea-cover").find(".count-true").css("color","red"):jQuery(this).parents(".textarea-cover").find(".count-true").css("color","inherit"),jQuery(this).parents(".textarea-cover").find(".count-true > span.current-count").text(e)})}},{key:"setupAutocomplete",value:function(){var e=this;setTimeout(function(){e.form.find(".dropdown-cover.autocomplete-type-true").each(function(){jQuery(this).find("input").val(jQuery(this).find("select").val()),jQuery(this).parents(".form-element").css("z-index",102);var e=jQuery(this).find("input")[0],t=[];jQuery(this).find("select option").each(function(e,r){t.push(r.text)}),new Awesomplete(e,{minChars:1,list:t}),e.addEventListener("awesomplete-select",function(t){jQuery(e).parents(".dropdown-cover").find('select option:contains("'+t.text.label+'")')[0].selected=!0,jQuery(e).parents(".dropdown-cover").find("select").trigger("change")}),e.addEventListener("awesomplete-open",function(t){jQuery(e).parents(".form-element").addClass("index-true")}),e.addEventListener("awesomplete-close",function(t){jQuery(e).parents(".form-element").removeClass("index-true")})})},250)}},{key:"setupInputMasks",value:function(){this.form.find("[data-input-mask]").each(function(){var e={onComplete:function(e,t){jQuery(t.srcElement).removeClass("mask-invalid")},onChange:function(e,t){jQuery(t.srcElement).addClass("mask-invalid")}};""!==jQuery(this).attr("data-input-mask").replace(/[^a-zA-Z0-9 ():.\-\/]+/g,"").trim()&&jQuery(this).mask(jQuery(this).attr("data-input-mask").replace(/[^a-zA-Z0-9 ():.\-\/]+/g,""),e)})}},{key:"setupSliderFields",value:function(){this.form.find(".slider-cover .ui-slider-cover").each(function(){var e={};e.min=parseFloat(jQuery(this).find("> span").attr("range-min")),e.max=parseFloat(jQuery(this).find("> span").attr("range-max")),e.step=parseFloat(jQuery(this).find("> span").attr("range-step")),e.range="true"===jQuery(this).find("> span").attr("range-true")||"min";var t=jQuery(this).find("> span").attr("data-prefix")||"",r=jQuery(this).find("> span").attr("data-suffix")||"";e.create=function(){e.range===!0?jQuery(this).find(".ui-slider-range").eq(0).append('<span class="ui-slider-handle-nos">0</span>'):jQuery(this).find("span.ui-slider-handle").eq(0).append('<span class="ui-slider-handle-nos">0</span>'),jQuery(this).parents(".slider-cover").find('input[type="hidden"]').val("").trigger("change").attr("data-prefix",t).attr("data-suffix",r)},e.change=e.slide=function(e,i){jQuery(this).parents(".ui-slider-cover").find(".ui-slider-handle-nos").show();var a=jQuery(this).parents(".fc-form").attr("data-thousand"),n=jQuery(this).parents(".fc-form").attr("data-decimal");jQuery(this).parents(".slider-cover").find(".ui-slider-handle-nos").css("margin-left","-"+(jQuery(this).parents(".slider-cover").find(".ui-slider-handle-nos").outerWidth()/2-9)+"px");var s=void 0,o=void 0,u=void 0,l=void 0,c=void 0,d=void 0;i.values?(o=i.values[0]+" - "+i.values[1],c=i.values[0].toString().replace(/[.]/g,n).replace(/\B(?=(\d{3})+(?!\d))/g,a),u=i.values[1].toString().replace(/[.]/g,n).replace(/\B(?=(\d{3})+(?!\d))/g,a),d=i.values[0],l=i.values[1],i.values[0]=t+i.values[0]+r,i.values[1]=t+i.values[1]+r,s=i.values[0]+" - "+i.values[1]):(o=i.value,s=parseFloat(i.value),c=s.toString().replace(/[.]/g,n).replace(/\B(?=(\d{3})+(?!\d))/g,a),d=s,u="",l="",s=t+s+r),jQuery(this).parents(".slider-cover").find("input").val(o).trigger("change"),s=s.replace(d,c).replace(l,u),jQuery(this).parents(".slider-cover").find(".ui-slider-handle-nos").text(s)},jQuery(this).html("<span></span>"),jQuery(this).find("span").slider(e)})}},{key:"setupDatepickerFields",value:function(){this.form.find('.datepicker-cover input[type="text"]').each(function(){jQuery(this).removeClass("hasDatepicker");var e={};if(e.beforeShow=function(){jQuery("#ui-datepicker-div").removeClass("ui-datepicker").addClass("formcraft-datepicker")},e.onClose=function(){jQuery(this).trigger("blur")},e.onSelect=function(){jQuery(this).trigger("change").trigger("input"),0!==jQuery('[data-date-min-range="['+jQuery(this).attr("data-field-id")+']"]').length&&jQuery('[data-date-min-range="['+jQuery(this).attr("data-field-id")+']"]').hasClass("hasDatepicker")&&jQuery('[data-date-min-range="['+jQuery(this).attr("data-field-id")+']"]').datepicker("option","minDate",jQuery(this).datepicker("getDate"))},jQuery(this).attr("data-date-lang")&&"en"!==jQuery(this).attr("data-date-lang")&&window.datepickerLoad===!1&&(jQuery.getScript(FC.datepickerLang+"datepicker-"+jQuery(this).attr("data-date-lang")+".js"),window.datepickerLoad=!0),jQuery(this).attr("data-date-format")&&(e.dateFormat=jQuery(this).attr("data-date-format")),jQuery(this).attr("data-date-max")){var t=void 0;""!==jQuery(this).attr("data-date-max")&&parseInt(jQuery(this).attr("data-date-max"),10).toString()===jQuery(this).attr("data-date-max")?(t=new Date,t.setDate(t.getDate()+parseInt(jQuery(this).attr("data-date-max"),10))):t=new Date(jQuery(this).attr("data-date-max-alt")),e.maxDate=t}if(jQuery(this).attr("data-date-min")){var r=void 0;""!==jQuery(this).attr("data-date-min")&&parseInt(jQuery(this).attr("data-date-min"),10).toString()===jQuery(this).attr("data-date-min")?(r=new Date,r.setDate(r.getDate()+parseInt(jQuery(this).attr("data-date-min"),10))):r=new Date(jQuery(this).attr("data-date-min-alt")),e.minDate=r}if(jQuery(this).attr("data-date-days")){var i=jQuery.map(jQuery.parseJSON(jQuery(this).attr("data-date-days")),function(e,t){if(e===!0)return t.toString()});e.beforeShowDay=function(e){return i.indexOf(e.getDay().toString())!==-1?[!0,""]:[!1,""]}}e.nextText="❯",e.prevText="❮",e.hideIfNoPrevNext=!0,e.changeYear=!0,e.changeMonth=!0,e.showAnim=!1,e.yearRange="c-100:c+100",e.shortYearCutoff=50,e.showOtherMonths=!0,jQuery(this).datepicker(e)})}},{key:"setupFileUploadFields",value:function(){0!==this.form.find(".fileupload-cover .button-file input").length&&(this.form.find(".fileupload-cover .button-file input").each(function(){var e=jQuery(this).attr("data-allow-extensions").replace(/ /g,"").split(",").map(function(e){return"."+e}).join(",");jQuery(this).attr("accept",e)}),this.form.find(".fileupload-cover .button-file input").fileupload({dataType:"json",add:function(e,t){var r=jQuery(this).parents("form").data("FormCraft");if(r.disableSubmit(),""!==jQuery(this).attr("data-allow-extensions")&&jQuery(this).attr("data-allow-extensions").indexOf(",")){var i=jQuery(this).attr("data-allow-extensions").replace(/ /g,"").split(",");for(var a in t.files){var n=t.files[a].name.split("."),s=n[n.length-1];if(i.indexOf(s.toLowerCase())===-1)return"undefined"==typeof window["FC_Validation_"+r.formID].is_invalid?alert("Invalid extension"):alert(window["FC_Validation_"+r.formID].is_invalid),r.enableSubmit(),!1}}if(""!==jQuery(this).attr("data-max-files")&&jQuery(this).parent().parent().find(".files-list li").length>=parseInt(jQuery(this).attr("data-max-files"),10))return"undefined"==typeof window["FC_Validation_"+r.formID].max_files?alert("Reached max files allowed"):alert(window["FC_Validation_"+r.formID].max_files.replace("[x]",parseInt(jQuery(this).attr("data-max-files"),10))),r.enableSubmit(),!1;if("undefined"!=typeof jQuery(this).attr("data-max-size")&&""!==jQuery(this).attr("data-max-size")){var o=parseFloat(jQuery(this).attr("data-max-size"));if(t.files[0].size/1024>o)return"undefined"==typeof window["FC_Validation_"+r.formID].max_file_size?alert("File too big"):alert(window["FC_Validation_"+r.formID].max_file_size.replace("[x]",o)),r.enableSubmit(),!1}var u=jQuery(this).parents(".fc-form").attr("data-id");t.url=""+FC.ajaxurl+(FC.ajaxurl.indexOf("?")===-1?"?":"&")+"action=formcraft3_file_upload&id="+u;var l=jQuery(this).parent().parent();0===l.find(".files-list").length&&l.append('<ul class="files-list"></ul>'),l.find(".files-list").append("<li><div></div></li>"),t.listPosition=l.find("li").length-1,l.find(".files-list li").eq(t.listPosition).slideDown(100),t.timeout=0,window.jqXHR=t.submit()},progress:function e(t,r){var i=jQuery(this).parent().parent(),e=parseInt(r.loaded/r.total*100,10);i.find(".files-list li").eq(r.listPosition).find("div").css("width",e+"%")},done:function(e,t){var r=jQuery(this).parents("form").data("FormCraft");r.enableSubmit();var i=jQuery(this).parent().parent();if(t.result.success){var a=jQuery(this).attr("data-name-list");i.find(".files-list li").eq(t.listPosition).find("div").text(t.result.file_name),i.find(".files-list li").eq(t.listPosition).append('<span class="delete-file" title="Delete File">&times;</span><input type="hidden" data-field-id="'+a+'" name="'+a+'[]" value="'+t.result.success+'"/>'),i.find(".files-list li").eq(t.listPosition).find("input").trigger("change")}else t.result.failed&&(i.find(".files-list li").eq(t.listPosition).remove(),showDebug===!0&&n("error",t.result.debug))}}),this.form.find(".fileupload-cover").on("click",".files-list .delete-file",function(e){e.preventDefault();var t=jQuery(this).parent().find("input").val();jQuery(this).addClass("icon-spin5 animate-spin").html(""),jQuery.ajax({url:FC.ajaxurl,type:"POST",context:jQuery(this),data:"action=formcraft3_file_delete&id="+t+"&formcraft3_wpnonce="+jQuery("#formcraft3_wpnonce").val(),dataType:"json"}).done(function(e){e.success?jQuery(this).parent().slideUp(200,function(){jQuery(this).find("input").val("").trigger("change"),jQuery(this).remove()}):jQuery(this).removeClass("icon-spin5 animate-spin").html("×")}).always(function(){jQuery(this).removeClass("icon-spin5 animate-spin").html("×")})}))}},{key:"setupTimepickerFields",value:function(){this.form.on("input, change",".time-fields-cover > select, .time-fields-cover > input",function(){var e=jQuery(this).parent(),t=e.find("select").eq(0).val(),r=e.find("select").eq(1).val(),i=e.find("input").val();jQuery(this).parent().hasClass("hide-meridian-true")?e.parent().find('input[type="hidden"]').val(t+":"+r).trigger("change"):e.parent().find('input[type="hidden"]').val(t+":"+r+" "+i).trigger("change")}),this.form.on("focus",".meridian-picker",function(){"am"===jQuery(this).val()?jQuery(this).val("pm").trigger("change"):"pm"===jQuery(this).val()?jQuery(this).val("am").trigger("change"):jQuery(this).val("am").trigger("change"),jQuery(this).blur(),jQuery(this).trigger("input")})}},{key:"setupAddressFields",value:function(){return"undefined"==typeof AddressPicker?void jQuery(".address-picker-field").parents(".field-cover").find(".address-field-map").html(h.needAPIKey).css("height","auto").css("color","red"):void jQuery(".address-picker-field").each(function(){var e=this,t=jQuery(this);if(jQuery(this).on("click",function(e){p["default"].isiOS()&&(e.preventDefault(),t.focus())}),!jQuery(this).is("[class*=tt-]")){var r=jQuery(this).attr("data-map-restrict")||"";"true"===jQuery(this).attr("data-show-map")?(jQuery(this).parents(".field-cover").find(".address-field-map").css("height",jQuery(this).attr("data-map-height")),jQuery(this).data("addressField",new AddressPicker({map:{id:jQuery(this).parents(".field-cover").find(".address-field-map")[0]},reverseGeocoding:!0,autocompleteService:{componentRestrictions:{country:r}}})),jQuery(this).typeahead(null,{displayKey:"description",source:jQuery(this).data("addressField").ttAdapter()}),jQuery(this).on("typeahead:selected",jQuery(this).data("addressField").updateMap),jQuery(this).on("typeahead:cursorchanged",jQuery(this).data("addressField").updateMap),jQuery(jQuery(this).data("addressField")).on("addresspicker:selected",function(t,r){jQuery(e).parents(".address-cover").find(".address-picker-field-hidden").val(r.placeResult.formatted_address),jQuery(e).val(r.address())})):(jQuery(this).data("addressField",new AddressPicker({autocompleteService:{componentRestrictions:{country:r}}})),jQuery(this).typeahead(null,{displayKey:"description",source:jQuery(this).data("addressField").ttAdapter()}),jQuery(this).parents(".field-cover").find(".address-field-map").hide(),jQuery(this).on("typeahead:selected",jQuery(this).data("addressField").updateMap),jQuery(this).on("typeahead:cursorchanged",jQuery(this).data("addressField").updateMap),jQuery(jQuery(this).data("addressField")).on("addresspicker:selected",function(t,r){jQuery(e).parents(".address-cover").find(".address-picker-field-hidden").val(r.placeResult.formatted_address),jQuery(e).val(r.address())})),jQuery(".tt-hint").prop("readonly",!1).prop("disabled",!0)}})}},{key:"prepareMathFormulas",value:function(){this.FormCraftMath=[];var e=this;this.form.find('.customText-cover > div, .stripe-cover div.stripe-amount-show, .stripe-cover input.stripe-amount-hidden, .customText-cover input[type="hidden"], .allow-math').each(function(){var t=void 0,r=void 0,i=void 0,a=void 0;if("hidden"===jQuery(this).prop("type"))i=a=jQuery(this).val();else{i=jQuery(this).text(),t=jQuery(this).html();var n=jQuery("<div>").html(t);n.find(".fc-third-party").remove(),a=n.text()}for(var s=/\[(.*?)\]/g;null!==(r=s.exec(a));){r[0]=jQuery("<div/>").text(r[0]).html();var o=Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,8);"hidden"===jQuery(this).prop("type")?jQuery(this).attr("id","bind-math-"+o).val(""):(t=t.replace(r[0],'<span id="bind-math-'+o+'"></span>'),jQuery(this).html(t)),e.FormCraftMath[o]={identifier:o,variables:[]},e.FormCraftMath[o].string=r[1].replace(/[^a-zA-Z0-9.*()\-,+\/]+/g,"").toLowerCase(),""!==e.FormCraftMath[o].string.slice(-1).replace(/[^.*\-,+\/]+/g,"")&&(e.FormCraftMath[o].string=e.FormCraftMath[o].string.slice(0,e.FormCraftMath[o].string.length-1)),""===e.FormCraftMath[o].string.replace(/[^.*()\-,+\/]+/g,"")?e.FormCraftMath[o].resultType="string":e.FormCraftMath[o].resultType="math";var u=e.FormCraftMath[o].string.split(/[*()\-,+\/]/);for(var l in u)""!==u[l]&&"function"!=typeof u[l]&&u[l].replace(/[^\d.-]/g,"")!==u[l]&&e.FormCraftMath[o].variables.push(u[l]);e.FormCraftMath[o].variables=e.FormCraftMath[o].variables.sort(function(e,t){return parseInt(t.replace("field",""),10)-parseInt(e.replace("field",""),10)})}})}},{key:"checkIfApplyMath",value:function(e){var t=jQuery(e).attr("data-field-id");for(var r in this.FormCraftMath)for(var i in this.FormCraftMath[r].variables)this.FormCraftMath[r].variables[i]===t&&this.calculateAndApplyMath(this.FormCraftMath[r])}},{key:"calculateAndApplyMath",value:function(e){var t=void 0,r=jQuery("#bind-math-"+e.identifier).parents("form"),i=jQuery("#bind-math-"+e.identifier).parents("form").attr("data-thousand"),a=jQuery("#bind-math-"+e.identifier).parents("form").attr("data-decimal");if(1===e.variables.length&&e.variables[0]===e.string)t=this.getFieldValue(jQuery('[data-field-id="'+e.variables[0]+'"]'),"string"),"hidden"===jQuery("#bind-math-"+e.identifier).prop("type")?(t=parseFloat(t),setTimeout(function(){jQuery("#bind-math-"+e.identifier).val(t).trigger("change")})):(t=t.toString().replace(/[.]/g,a).replace(/\B(?=(\d{3})+(?!\d))/g,i),jQuery("#bind-math-"+e.identifier).text(t)),jQuery(document).trigger("formcraft_math_change",[r]);else{var n=e.string;for(var s in e.variables)if("function"!=typeof e.variables[s]){var o=this.getFieldValue(jQuery(r).find('[data-field-id="'+e.variables[s]+'"]'),"number"),u=new RegExp(e.variables[s],"g");o=""===o?0:o,n=n.replace(u,o)}n=n.replace(/--/g,"+"),t=parseFloat(m.evaluate(n).toFixed(2)),t=isNaN(t)?0:t,t=isFinite(t)?t:"∞","hidden"===jQuery("#bind-math-"+e.identifier).prop("type")?jQuery("#bind-math-"+e.identifier).val(t).trigger("change"):(t=t.toString().replace(/[.]/g,a).replace(/\B(?=(\d{3})+(?!\d))/g,i),jQuery("#bind-math-"+e.identifier).text(t)),jQuery(document).trigger("formcraft_math_change",[r])}}},{key:"checkIfApplyLogic",value:function(e){var t=this.form.parents(".form-live").attr("data-uniq"),r=jQuery(e).attr("data-field-id"),i=!1;if("undefined"!=typeof this.FormCraftLogic&&null!==this.FormCraftLogic&&0!==this.FormCraftLogic.length)for(var a in this.FormCraftLogic)for(var n in this.FormCraftLogic[a][0]){var s=this.FormCraftLogic[a][0][n][2];"undefined"!=typeof s&&"["===s.slice(0,1)&&s.replace("[","").replace("]","")===r?(this.applyLogic(this.FormCraftLogic[a],t),i=!0):this.FormCraftLogic[a][0][n][0]===r&&(this.applyLogic(this.FormCraftLogic[a],t),i=!0)}if(i===!0&&this.setFormValues(this.setValue),"undefined"==typeof this.finalHideShowList)return!1;for(var o in this.finalHideShowList)if("field"===o.substr(0,5)&&0!==this.finalHideShowList[o].length&&"function"!=typeof this.finalHideShowList[o]){var u="default",l=!0,c=!1,d=void 0;try{for(var p,h=this.finalHideShowList[o][Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var f=p.value;"default"!==f&&(u=f)}}catch(m){c=!0,d=m}finally{try{!l&&h["return"]&&h["return"]()}finally{if(c)throw d}}switch(u){case"hide":jQuery(".uniq-"+t+" form .form-element-"+o).hasClass("state-hidden")||(jQuery(".uniq-"+t+" form .form-element-"+o).removeClass("state-hidden state-shown over-write"),jQuery(".uniq-"+t+" form .form-element-"+o).slideUp(300).addClass("state-hidden"),jQuery(".uniq-"+t+" form .form-element-"+o).trigger("hideElement"));break;case"show":jQuery(".uniq-"+t+" form .form-element-"+o).hasClass("state-shown")||(jQuery(".uniq-"+t+" form .form-element-"+o).removeClass("state-hidden state-shown over-write"),jQuery(".uniq-"+t+" form .form-element-"+o).slideDown(300).addClass("state-shown"),jQuery(".uniq-"+t+" form .form-element-"+o).trigger("showElement"));break;case"default":jQuery(".uniq-"+t+" form .form-element-"+o).hasClass("default-false")&&jQuery(".uniq-"+t+" form .form-element-"+o).hasClass("state-hidden")&&(jQuery(".uniq-"+t+" form .form-element-"+o).slideDown(300).removeClass("state-hidden state-shown").addClass("state-shown"),jQuery(".uniq-"+t+" form .form-element-"+o).trigger("showElement")),jQuery(".uniq-"+t+" form .form-element-"+o).hasClass("default-true")&&jQuery(".uniq-"+t+" form .form-element-"+o).hasClass("state-shown")&&(jQuery(".uniq-"+t+" form .form-element-"+o).slideUp(300).removeClass("state-hidden state-shown").addClass("state-hidden"),jQuery(".uniq-"+t+" form .form-element-"+o).trigger("hideElement"))}}this.finalHideShowList=[]}},{key:"applyLogic",value:function(e,t){this.finalHideShowList=this.finalHideShowList||[],window.finalEmailsTo=window.finalEmailsTo||[];var r=this.FormCraftLogic.indexOf(e),i=e[0],a=e[1],n=0,s="or"===e[2]?1:i.length;for(var o in i){var u=this.getFieldValue(jQuery(".uniq-"+t+' [data-field-id="'+i[o][0]+'"]'),"string"),l=void 0,c=void 0;switch(i[o][2]=i[o][2]||"","["===i[o][2].slice(0,1)?(l=i[o][2].replace("[","").replace("]",""),l=this.getFieldValue(jQuery('[data-field-id="'+l+'"]'),"string")):l=i[o][2],i[o][1]){case"equal_to":c=4===l.toString().indexOf("-")&&/^\d+$/.test(l.toString().substr(0,4))?this.dateToDifference(l).toString():l,c===u.toString()&&n++;break;case"not_equal_to":c=4===l.toString().indexOf("-")?this.dateToDifference(l).toString():l,c!==u.toString()&&n++;break;case"contains":if(""===l){""!==u&&n++;break}u.toString().indexOf(l)!==-1&&n++;break;case"contains_not":u.toString().indexOf(l)===-1&&n++;break;case"greater_than":c=l.toString().indexOf("-")!==-1?this.dateToDifference(l):l,!isNaN(parseFloat(u))&&parseFloat(u)>parseFloat(c)&&n++;break;case"less_than":c=l.toString().indexOf("-")!==-1?this.dateToDifference(l):l,!isNaN(parseFloat(u))&&parseFloat(u)<parseFloat(c)&&n++}}this.executeLogic(a,r,s,n)}},{key:"executeLogic",value:function(e,t,r,i){for(var a in e)switch(e[a][0]){case"hide_fields":if(!e[a][1])continue;var n=e[a][1].split(",");for(var s in n)"function"!=typeof n[s]&&(this.finalHideShowList[n[s]]=this.finalHideShowList[n[s]]||[],i>=r?this.finalHideShowList[n[s]].push("hide"):this.finalHideShowList[n[s]].push("default"));break;case"show_fields":if(!e[a][1])continue;var o=e[a][1].split(",");for(var u in o)"function"!=typeof o[u]&&(this.finalHideShowList[o[u]]=this.finalHideShowList[o[u]]||[],i>=r?this.finalHideShowList[o[u]].push("show"):this.finalHideShowList[o[u]].push("default"));break;case"email_to":if(!e[a][2])continue;var l=e[a][2];i>=r?window.finalEmailsTo.indexOf(t+":"+l)===-1&&window.finalEmailsTo.push(t+":"+l):window.finalEmailsTo.indexOf(t+":"+l)!==-1&&window.finalEmailsTo.splice(window.finalEmailsTo.indexOf(t+":"+l),1);break;case"redirect_to":window.finalRedirect=window.finalRedirect||[],i>=r?window.finalRedirect.push(e[a][2]):window.finalRedirect.indexOf(e[a][2])!==-1&&window.finalRedirect.splice(window.finalRedirect.indexOf(e[a][2]),1);break;case"trigger_integration":if(!e[a][3])continue;window.triggerIntegration=window.triggerIntegration||[],i>=r?window.triggerIntegration.indexOf(e[a][3])===-1&&window.triggerIntegration.push(e[a][3]):window.triggerIntegration.indexOf(e[a][3])!==-1&&window.triggerIntegration.splice(window.triggerIntegration.indexOf(e[a][3]),1);break;case"set_value":this.setValue=this.setValue||[];var c=void 0;e[a][2]&&"["===e[a][2].slice(0,1)?(c=e[a][2].replace("[","").replace("]",""),c=this.getFieldValue(jQuery('[data-field-id="'+c+'"]'),"string")):c=e[a][2],i>=r?this.setValue[e[a][4]]=c:"undefined"!=typeof this.setValue[e[a][4]]&&this.setValue[e[a][4]]===c}}},{key:"saveProgress",value:function(){var e=this.form.find("input, textarea, select").not('.no-save, [type="password"], .stripe-amount-hidden').serialize()+"&id="+this.form.attr("data-id");return(!this.lastSaveProgress||this.lastSaveProgress!==e)&&(this.lastSaveProgress=e,jQuery.ajax({url:FC.ajaxurl,type:"POST",data:"action=formcraft3_save_form_progress&"+e+"&formcraft3_wpnonce="+jQuery("#formcraft3_wpnonce").val(),dataType:"json"}))}},{key:"getFieldValue",value:function(e,t){var r=this.parentElement.attr("data-uniq");if(0===jQuery(e).length)return 0;var i=jQuery(e).prop("type"),a=void 0,n=","===jQuery(e).parents(".fc-form").attr("data-decimal")?",":".";switch(i=jQuery(e).is("select")?"select":i,i=jQuery(e).hasClass("hasDatepicker")?"date":i,i=jQuery(e).parent().parent().hasClass("files-list")?"file":i,i=jQuery(e).parent().parent().hasClass("slider-cover")?"slider":i){case"text":case"password":case"select":case"hidden":case"email":case"textarea":a=jQuery(e).val().replace(n,".");break;case"slider":a=jQuery(e).val().replace(n,"."),a.indexOf(" - ")!==-1&&(a=(parseFloat(a.split(" - ")[0])+parseFloat(a.split(" - ")[1]))/2);break;case"radio":case"checkbox":a=[],jQuery(".uniq-"+r+' [name="'+jQuery(e).prop("name")+'"]:checked').each(function(){a.push(jQuery(this).val().replace(n,"."))});break;case"date":var o=jQuery(e).datepicker("getDate");if(null===o)return"";var u=new Date,l=new Date(u.getFullYear(),u.getMonth(),u.getDate());o=null===o?l:o,a=parseInt((o-l)/864e5,10);break;case"file":var c=jQuery(e).attr("name");a=0,jQuery('[name="'+c+'"]').each(function(){""!==jQuery(this).val()&&a++})}if("string"===t)return"object"===("undefined"==typeof a?"undefined":s(a))?a.join(", "):a;if("object"===("undefined"==typeof a?"undefined":s(a))){var d=0;for(var p in a)d+=isNaN(parseFloat(a[p]))?0:parseFloat(a[p]);return d}if("string"==typeof a&&a.indexOf("-")!==-1){var h=a.split("-");return a=(parseFloat(h[0].trim())+parseFloat(h[1].trim()))/2,isNaN(parseFloat(a))?0:parseFloat(a)}return isNaN(parseFloat(a))?0:parseFloat(a)}},{key:"setFormValues",value:function(e){var t=this.form;for(var r in e){var i=0===t.find('[name="'+r+'"]').length?t.find('[name="'+r+'[]"]'):t.find('[name="'+r+'"]'),a=i.prop("type");switch(a=i.is("select")?"select":a,a=i.hasClass("hasDatepicker")?"date":a,a=i.parent().parent().hasClass("files-list")?"file":a,a=i.parents(".field-cover").hasClass("slider-cover")?"slider":a,a=i.parents(".field-cover").hasClass("timepicker-cover")?"timepicker":a){case"text":case"email":case"select":case"hidden":case"textarea":case"date":if(i.attr("id")&&"bind-math"===i.attr("id").substr(0,9))break;e[r]!==i.val()&&i.val(e[r]).trigger("input").trigger("change");break;case"radio":case"checkbox":("string"==typeof e[r]&&""===e[r]||null===e[r]&&t.find('[name="'+r+'[]"]').length>0)&&t.find('[name="'+r+'[]"]').prop("checked",!1).trigger("change"),"string"==typeof e[r]&&e[r].indexOf("||")>-1&&(e[r]=e[r].split("||")),e[r]="string"==typeof e[r]?[e[r]]:e[r];for(var n in e[r])0===t.find('[name="'+r+'[]"]').length?t.find('[name="'+r+'"][value="'+e[r][n]+'"]').prop("checked",!0).trigger("change"):t.find('[name="'+r+'[]"][value="'+e[r][n]+'"]').prop("checked",!0).trigger("change");break;case"timepicker":i.val(e[r]).trigger("change");var s=e[r].replace(" ",":").split(":");s[0]=""===s[0]||"undefined"==typeof s[0]?"00":s[0],s[1]=""===s[1]||"undefined"==typeof s[1]?"00":s[1],s[2]=""===s[2]||"undefined"==typeof s[2]?"am":s[2],i.parents(".timepicker-cover").find(".time-fields-cover > select").eq(0).val(s[0]),i.parents(".timepicker-cover").find(".time-fields-cover > select").eq(1).val(s[1]),i.parents(".timepicker-cover").find(".time-fields-cover > input").eq(0).val(s[2]);break;case"slider":if(""===e[r])break;if(e[r].indexOf(" - ")!==-1){var o=e[r].split(" - ");o=o.map(function(e){return parseFloat(e.replace(/[^\d.-]/g,""))}),i.parents(".slider-cover").find(".ui-slider-cover > span").slider("values",o)}else e[r]=e[r].replace(i.attr("data-prefix"),"").replace(i.attr("data-suffix"),""),e[r]=isNaN(e[r])?0:parseFloat(e[r].replace(/[^\d.-]/g,"")),i.parents(".slider-cover").find(".ui-slider-cover > span").slider("value",e[r])}}}},{key:"dateToDifference",value:function(e){var t=e.toString().split("-"),r=new Date,i=new Date(r.getFullYear(),r.getMonth(),r.getDate()),a=new Date(t[0],parseInt(t[1],10)-1,t[2]);return parseInt((a-i)/864e5,10)}}]),e}();jQuery(document).ready(function(){jQuery(".fc-form").each(function(){var e=new y(jQuery(this));jQuery(this).data("FormCraft",e);var t=jQuery(this).parents(".form-live.align-left").length?"align-left":"";t=jQuery(this).parents(".form-live.align-center").length?"align-center":t,t=jQuery(this).parents(".form-live.align-right").length?"align-right":t,jQuery(this).addClass(t)}),jQuery("[accept]").each(function(){"."===jQuery(this).attr("accept")&&jQuery(this).removeAttr("accept")}),jQuery(".fc-form-modal").on("shown.bs.fc_modal",function(){var e=jQuery(this).find(".fc-form").attr("data-id");
jQuery(this).find(".fc-form").find("textarea").trigger("input"),jQuery.get(FC.ajaxurl+"?action=formcraft3_trigger_view&id="+e)})}),window.setFormValues=function(e,t){e.data("FormCraft").setFormValues(t)},window.datepickerLoad=!1,window.showDebug=window.location.href.indexOf("preview=true")>-1,"https:"===window.location.protocol&&(FC.ajaxurl=FC.ajaxurl.replace("http:","https:"),FC.datepickerLang=FC.datepickerLang.replace("http:","https:")),window.disableFormCraftForm=function(e){e.find(".submit-cover").addClass("disabled"),e.find(".submit-button").attr("disabled",!0)},window.enableFormCraftForm=function(e){e.find(".submit-cover").removeClass("disabled"),e.find(".submit-button").attr("disabled",!1)},window.canSubmitFormCraftForm=function(e){return!e.find(".submit-button").attr("disabled")},window.FormCraftSubmitForm=function(e,t,r){var i="",a=jQuery(e);if("all"===t&&a.find(".form-element-type-submit.state-hidden").length===a.find(".form-element-type-submit").length)return!1;if(!window.canSubmitFormCraftForm(a))return!1;window.disableFormCraftForm(a),a.find(".submit-response").slideUp("fast").html();var s=jQuery(e).hasClass("dont-submit-hidden-true")?a.find(".form-element").not(".state-hidden").find("input, select, textarea").serialize():a.serialize(),o=[];a.find(".form-element.state-hidden").each(function(){o.push(jQuery(this).attr("data-identifier"))}),o=o.join(", ");var u="";if("undefined"!=typeof window.finalEmailsTo)for(var l in window.finalEmailsTo)"function"!=typeof window.finalEmailsTo[l]&&(u=u+","+encodeURIComponent(window.finalEmailsTo[l].substr(window.finalEmailsTo[l].indexOf(":")+1)));"undefined"!=typeof window.finalRedirect&&0!==window.finalRedirect.length&&(i=encodeURIComponent(window.finalRedirect[window.finalRedirect.length-1]));var c=void 0;"undefined"!=typeof window.triggerIntegration&&(c=encodeURIComponent(JSON.stringify(window.triggerIntegration)));var d=void 0;"undefined"!=typeof a.data("FieldLabels")&&(d=encodeURIComponent(JSON.stringify(a.data("FieldLabels"))));var h=s+"&id="+a.attr("data-id")+"&location="+encodeURIComponent(window.location.href)+"&emails="+u+"&hidden="+o+"&redirect="+i+"&type="+t+"&triggerIntegration="+c+"&fieldLabels="+d,f={abort:!1};if("all"===t)a.find(".validation-lenient, .validation-strict").each(function(){if(!jQuery(this).parents(".form-element").hasClass("state-hidden")){var e=jQuery(this).fcValidate();e===!1&&(f.abort=!0)}});else{var m=t-1;a.find(".form-page-"+m+" .validation-lenient, .validation-strict").each(function(){if(!jQuery(this).parents(".form-element").hasClass("state-hidden")&&0!==jQuery(this).parents(".form-page-"+m).length){var e=jQuery(this).fcValidate();e===!1&&(f.abort=!0)}})}if("all"===t&&jQuery(document).trigger("formcraft_submit_trigger",[a,h,f]),f.abort===!0){if(0===a.find(".error-field").length)return!1;if(p["default"].isElementInViewport(a.find(".error-field").first())===!1&&"true"!==a.attr("data-auto-scroll")){var y=a.find(".error-field").first()[0];y.scrollIntoView({behavior:"smooth",block:"start"})}return"undefined"!=typeof r&&r(!1),window.enableFormCraftForm(a),!1}a.find(".form-element").removeClass("error-field");var v=a;jQuery.ajax({url:FC.ajaxurl,type:"POST",timeout:12e4,data:"action=formcraft3_form_submit&"+h+"&formcraft3_wpnonce="+jQuery("#formcraft3_wpnonce").val(),dataType:"json"}).done(function(e){if(a=v,e.debug){if(e.debug.failed&&showDebug===!0)for(var t in e.debug.failed)n("error",e.debug.failed[t]);if(e.debug.success&&showDebug===!0)for(var i in e.debug.success)n("success","<i class='formcraft-icon'>check</i> "+e.debug.success[i])}if(e.failed){if(0!==a.parents(".fc-form-modal").length&&(setTimeout(function(){a.addClass("shake")},600),setTimeout(function(){a.removeClass("shake")},1100)),a.find(".validation-lenient").addClass("validation-strict").removeClass(".validation-lenient"),a.find(".submit-response").html('<span class="has-error">'+e.failed+"</span>").slideDown("fast"),e.errors)for(var s in e.errors)a.find(".form-element-"+s).addClass("error-field"),a.find(".form-element-"+s+" .error").text(e.errors[s]);if(0!==a.find(".error-field").length&&p["default"].isElementInViewport(a.find(".error-field").first())===!1&&"true"!==a.attr("data-auto-scroll")){var o=a.find(".error-field").first()[0];o.scrollIntoView({behavior:"smooth",block:"start"})}}else if("undefined"!=typeof e.success){window.disableFormCraftForm(a),jQuery(document).trigger("formcraft_submit_result",[a,e]);var u=parseInt(a.attr("data-delay"),10);u=isNaN(u)?0:u,u=Math.max(0,u),e.redirect&&"true"===a.attr("data-no-message-redirect")?(setTimeout(function(){a.find(".submit-cover").addClass("disabled")},0),setTimeout(function(){window.location.assign(e.redirect)},1e3*u)):(a.append('<div class="final-success"><i class="final-success-check formcraft-icon">check</i><span></span></div>'),a.find(".final-success > span").html(e.success),a.addClass("submitted"),a.find(".final-success").slideDown(800,function(){}),a.find(".form-page").slideUp(800,function(){a.find(".form-element").remove()}),0===a.parents(".fc-form-modal").length&&0===a.parents(".fc-sticky").length&&"true"!==a.attr("data-auto-scroll")&&jQuery("html, body").animate({scrollTop:a.offset().top-100},800)),e.redirect&&setTimeout(function(){window.location.assign(e.redirect)},1e3*u)}"undefined"!=typeof r&&r(e,a)}).fail(function(){jQuery(e).find(".response").text("Connection error"),"undefined"!=typeof r&&r(!1)}).always(function(e){jQuery(document).trigger("formcraft_submit_success_trigger",[a,e]),a.find(".submit-cover").addClass("enabled"),a.find(".submit-cover").removeClass("disabled"),"all"===t&&window.enableFormCraftForm(a)})},jQuery(document).ready(function(){p["default"].isMobile()===!0&&jQuery('.email-cover input[type="text"]').prop("type","email"),1===jQuery("#fc-form-preview").length&&jQuery("body").addClass("formcraft-css"),jQuery("body").on("click",".fc-trigger-close",function(){jQuery(".fc-sticky").each(function(){jQuery(this).hasClass("show")&&jQuery(this).parent().find('[data-toggle="fc-sticky"]').trigger("click")})}),jQuery(".form-element.default-true").hide(),jQuery(".fc-form").removeClass("fc-temp-class"),jQuery(".fc-form .form-element.default-true").addClass("state-hidden"),jQuery("body").on("click",'.field-cover div [class^="icon-"]',function(){jQuery(this).parent().find("input").focus()}),jQuery("[href]").each(function(){var e=jQuery(this).attr("href");if(e.indexOf("form-view/")!==-1){var t=e.split("form-view/");if(jQuery('.fc-form-modal .fc-form[data-id="'+parseInt(t[t.length-1],10)+'"]').length){var r=jQuery('.fc-form-modal .fc-form[data-id="'+parseInt(t[t.length-1],10)+'"]').first(),i=r.parents(".fc-form-modal").attr("id");jQuery(this).removeAttr("href"),jQuery(this).attr("data-toggle","fc_modal"),jQuery(this).attr("data-target","#"+i)}}}),jQuery(".fc-form-modal .form-live").each(function(){if(""!==jQuery(this).attr("data-bind")){var e=jQuery(this).attr("data-uniq");jQuery(jQuery(this).attr("data-bind")).each(function(){jQuery(this).attr("data-toggle","fc_modal"),jQuery(this).attr("data-target","#modal-"+e)})}}),jQuery(".fc-form").each(function(){var e=jQuery(this);jQuery(document).trigger("formcraft_math_change",[e])}),jQuery("body").on("focus",'.password-cover input[type="password"], .address-cover input[type="text"] ,.oneLineText-cover input[type="text"],.datepicker-cover input[type="text"],.email-cover input[type="text"],.email-cover input[type="email"],.textarea-cover textarea,.dropdown-cover select,.matrix-cover input,.star-cover input,.thumb-cover input',function(){jQuery(this).parents(".field-cover").addClass("has-focus")}),jQuery("body").on("blur",'.password-cover input[type="password"], .address-cover input[type="text"] ,.oneLineText-cover input[type="text"],.datepicker-cover input[type="text"],.email-cover input[type="text"],.email-cover input[type="email"],.textarea-cover textarea,.dropdown-cover select,.matrix-cover input,.star-cover input,.thumb-cover input',function(){jQuery(this).parents(".field-cover").removeClass("has-focus")}),jQuery("body").on("change",".dropdown-cover select",function(){jQuery(this).find("option:checked").length>0&&""!==jQuery(this).find("option:checked").text()?jQuery(this).parents(".field-cover").addClass("has-input"):jQuery(this).parents(".field-cover").removeClass("has-input")}),jQuery("body").on("input",'.address-cover input[type="text"], .oneLineText-cover input[type="text"],.password-cover input[type="password"],.datepicker-cover input[type="text"],.email-cover input[type="text"],.email-cover input[type="email"], .textarea-cover textarea',function(){jQuery(this).val().length>0||"undefined"!=typeof jQuery(this).attr("placeholder")&&jQuery(this).attr("placeholder").length>0?jQuery(this).parents(".field-cover").addClass("has-input"):jQuery(this).parents(".field-cover").removeClass("has-input")}),jQuery('.oneLineText-cover input[type="text"],.datepicker-cover input[type="text"], .email-cover input[type="text"], .email-cover input[type="email"], .textarea-cover textarea').trigger("input"),jQuery('.customText-cover input[type="hidden"],.timepicker-cover input[type="hidden"],.slider-cover input[type="hidden"],.fileupload-cover input[type="hidden"],.star-cover input[type="radio"],.thumb-cover input[type="radio"],.dropdown-cover select').trigger("change"),jQuery('.checkbox-cover input[type="checkbox"], .checkbox-cover input[type="radio"]').length>50?jQuery('.checkbox-cover input[type="checkbox"], .checkbox-cover input[type="radio"]').filter(function(e,t){return jQuery(t).prop("checked")}).trigger("change"):jQuery('.checkbox-cover input[type="checkbox"], .checkbox-cover input[type="radio"]').trigger("change"),setTimeout(function(){jQuery(".time-fields-cover > select").first().trigger("change")},500),jQuery(".fc-pagination").each(function(){jQuery(this).find(".pagination-trigger").eq(0).addClass("active")}),jQuery(".fc-form .form-page-0").addClass("active"),jQuery("body").on("change",".update-label label input",function(){if(jQuery(this).is(":checked")){var e=jQuery(this).attr("name");jQuery('[name="'+e+'"]').parent().removeClass("active"),jQuery(this).parent().addClass("active")}}),jQuery("body").on("change",".checkbox-cover label input",function(){jQuery(this).is(":checked")&&(jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"))}),p["default"].isiOS()&&(jQuery("body").on("touchstart",".star-cover label, .thumb-cover label",function(){event.preventDefault(),jQuery(this).trigger("click")}),jQuery("body").on("touchstart",'[data-toggle="fc_modal"]',function(e){e.preventDefault()}),jQuery("body").on("touchstart",'[data-toggle="fc-sticky"]',function(){event.preventDefault()})),jQuery("body").on("change",".star-cover label input",function(){if(jQuery(this).is(":checked")){var e=jQuery(this).attr("name");jQuery('[name="'+e+'"]').parent().removeClass("active"),jQuery(this).parent().addClass("active");var t=jQuery(this).parent().index();jQuery(this).parent().parent().find("label").removeClass("fake-click"),jQuery(this).parent().parent().find("label").slice(0,t+1).addClass("fake-click")}}),jQuery(".update-label label.active").removeClass("active"),jQuery(".powered-by").each(function(){var e=jQuery(this).parent().find(".fc-form").outerWidth();jQuery(this).css("width",e+" px")}),setTimeout(function(){jQuery(".fc-form-modal").appendTo("body")},500),jQuery(".formcraft-css.placement-right").appendTo("body"),jQuery(".formcraft-css.placement-left").appendTo("body"),jQuery(".body-append").appendTo("body"),setTimeout(function(){jQuery(".image_button_cover a").each(function(){var e=parseInt(jQuery(this).outerWidth(),10)/2+jQuery(this).outerHeight();jQuery(this).css("top","-"+e+"px")})},100),setTimeout(function(){jQuery(".image_button_cover a").each(function(){jQuery(this).parents(".image_button_cover").addClass("now-show")})},400),jQuery("body").on("click",'[data-toggle="fc-sticky"]',function(){var e=jQuery(jQuery(this).attr("data-target")),t=jQuery(jQuery(this).attr("data-target")).parent().find(".fc-sticky-button");if(e.hasClass("show"))e.addClass("hiding"),t.addClass("showing"),setTimeout(function(){e.removeClass("show hiding"),t.removeClass("hide showing")},400);else{var r=e.find(".fc-form").attr("data-id");jQuery.get(FC.ajaxurl+"?action=formcraft3_trigger_view&id="+r),e.addClass("show"),t.addClass("hide")}}),jQuery(document).keyup(function(e){jQuery(".fc-sticky").each(function(){jQuery(this).hasClass("show")&&27===e.which&&jQuery(this).parent().find('[data-toggle="fc-sticky"]').trigger("click")})});var e=.8*parseInt(jQuery(window).height(),10);jQuery(".fc-sticky").css("max-height",e+"px"),jQuery(document).mouseup(function(e){var t=jQuery(".fc-sticky"),r=jQuery(".formcraft-datepicker"),i=jQuery(".fc-sticky-button");t.is(e.target)||0!==t.has(e.target).length||r.is(e.target)||0!==r.has(e.target).length||i.is(e.target)||jQuery(".fc-sticky").each(function(){jQuery(this).hasClass("show")&&jQuery(this).parent().find('[data-toggle="fc-sticky"]').trigger("click")})}),setTimeout(function(){jQuery(".fc-sticky").each(function(){if(jQuery(this).hasClass("fc-sticky-right")||jQuery(this).hasClass("fc-sticky-left")){var t=jQuery(this).find(".fc-form").height();t=Math.min(e,t),jQuery(this).css("margin-top","-"+t/2+"px"),jQuery(this).find(".fc-form").addClass("calculated")}})},500),jQuery(".fc-form-modal").each(function(){if(jQuery(this).attr("data-auto")&&!isNaN(parseFloat(jQuery(this).attr("data-auto")))){var e=jQuery(this);setTimeout(function(){e.fc_modal("show")},1e3*parseFloat(jQuery(this).attr("data-auto")))}if(jQuery(this).find(".pagination-trigger").length>1){var t=jQuery(this).find(".fc_close").parents(".fc_modal-dialog").find(".fc-pagination-cover").height(),r=jQuery(this).find(".fc_close").parents(".fc_modal-dialog").find(".fc-form").width();jQuery(this).find(".fc_close").css({"margin-top":t,left:"50%","margin-left":r/2-30})}}),jQuery(".fc-sticky").each(function(){if(jQuery(this).attr("data-auto")&&!isNaN(parseFloat(jQuery(this).attr("data-auto")))){var e=jQuery(this);setTimeout(function(){e.hasClass("show")||e.parent().find(".fc-sticky-button").trigger("click")},1e3*parseFloat(jQuery(this).attr("data-auto")))}}),jQuery(".star-cover label").on("hover",function(){var e=jQuery(this).index();jQuery(this).parent().find("label").slice(0,e+1-jQuery(this).prevAll(".formcraft-icon").length).addClass("fake-hover"),jQuery(this).parent().find("label").slice(e+1-jQuery(this).prevAll(".formcraft-icon").length,jQuery(this).parent().find("label").length).addClass("fake-empty")},function(){jQuery(this).parent().find("label").removeClass("fake-hover fake-empty")}),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&jQuery('.datepicker-cover input[type="text"]').attr("readonly","readonly"),setTimeout(function(){jQuery("body").on("blur change",".fc-form .validation-lenient",function(e){jQuery(this).fcValidate()===!1&&jQuery(this).addClass("validation-strict").removeClass("validation-lenient")})},1e3),jQuery("body").on("keyup change input",".fc-form .validation-strict",function(){jQuery(this).fcValidate()===!1?jQuery(this).addClass("validation-strict").removeClass("validation-lenient"):jQuery(this).addClass("validation-lenient").removeClass("validation-strict")})})},function(e,t,r){var i,a,n;!function(r,s){a=[t,e],i=s,n="function"==typeof i?i.apply(t,a):i,!(void 0!==n&&(e.exports=n))}(void 0,function(e,t){"use strict";function r(e){function t(){var t=window.getComputedStyle(e,null);h=t.overflowY,"vertical"===t.resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),p="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(p)&&(p=0),a()}function r(t){var r=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=r,h=t,d&&(e.style.overflowY=t),i()}function i(){var t=window.pageYOffset,r=document.body.scrollTop,i=e.style.height;e.style.height="auto";var a=e.scrollHeight+p;return 0===e.scrollHeight?void(e.style.height=i):(e.style.height=a+"px",f=e.clientWidth,document.documentElement.scrollTop=t,void(document.body.scrollTop=r))}function a(){var t=e.style.height;i();var a=window.getComputedStyle(e,null);if(a.height!==e.style.height?"visible"!==h&&r("visible"):"hidden"!==h&&r("hidden"),t!==e.style.height){var n=s("autosize:resized");e.dispatchEvent(n)}}var o=void 0===arguments[1]?{}:arguments[1],u=o.setOverflowX,l=void 0===u||u,c=o.setOverflowY,d=void 0===c||c;if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var p=null,h=null,f=e.clientWidth,m=function(){e.clientWidth!==f&&a()},y=function(t){window.removeEventListener("resize",m,!1),e.removeEventListener("input",a,!1),e.removeEventListener("keyup",a,!1),e.removeEventListener("autosize:destroy",y,!1),e.removeEventListener("autosize:update",a,!1),n["delete"](e),Object.keys(t).forEach(function(r){e.style[r]=t[r]})}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",y,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",a,!1),window.addEventListener("resize",m,!1),e.addEventListener("input",a,!1),e.addEventListener("autosize:update",a,!1),n.add(e),l&&(e.style.overflowX="hidden",e.style.wordWrap="break-word"),t()}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName){var t=s("autosize:destroy");e.dispatchEvent(t)}}function a(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName){var t=s("autosize:update");e.dispatchEvent(t)}}var n="function"==typeof Set?new Set:function(){var e=[];return{has:function(t){return Boolean(e.indexOf(t)>-1)},add:function(t){e.push(t)},"delete":function(t){e.splice(e.indexOf(t),1)}}}(),s=function(e){return new Event(e)};try{new Event("test")}catch(o){s=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(u=function(e){return e},u.destroy=function(e){return e},u.update=function(e){return e}):(u=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return r(e,t)}),e},u.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},u.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.exports=u})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){e.fn.fcValidate=function(){var e=void 0,t=void 0,r=void 0,i=void 0,a=void 0;jQuery(this).attr("data-allow-spaces")&&"true"===jQuery(this).attr("data-allow-spaces")?(e=/^[A-Za-z ]+$/,i=/^[0-9 ]+$/,t=/^[0-9A-Za-z ]+$/,a=/(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/,r=/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i):(e=/^[A-Za-z]+$/,i=/^[0-9]+$/,t=/^[0-9A-Za-z]+$/,a=/(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/,r=/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i);var n=jQuery(this).parents("form").attr("data-id"),s=window["FC_Validation_"+n],o=jQuery(this).val();if(jQuery(this).is('[type="checkbox"]')||jQuery(this).is('[type="radio"]')){var u=jQuery(this).attr("name");o=jQuery('[name="'+u+'"]:checked').val(),o="undefined"==typeof o?"":o}o=o||"";var l=jQuery(this);if(l.attr("data-is-required")&&"true"===l.attr("data-is-required")&&""===o.trim())return l.parents(".form-element").find(".error").text(s.is_required),l.parents(".form-element").addClass("error-field"),!1;if(jQuery(this).attr("data-input-mask")&&""!==jQuery(this).attr("data-input-mask")&&jQuery(this).hasClass("mask-invalid")&&""!==o)return l.parents(".form-element").find(".error").text(s.is_invalid),l.parents(".form-element").addClass("error-field"),!1;if(jQuery(this).attr("data-is-required")&&"false"===jQuery(this).attr("data-is-required")&&""===o.trim())return l.parents(".form-element").find(".error").text(""),l.parents(".form-element").removeClass("error-field"),!0;if(jQuery(this).attr("data-min-char")&&jQuery(this).attr("data-min-char")>o.length)return l.parents(".form-element").find(".error").text(s.min_char.replace("[x]",jQuery(this).attr("data-min-char"))),l.parents(".form-element").addClass("error-field"),!1;if(jQuery(this).attr("data-max-char")&&jQuery(this).attr("data-max-char")<o.length)return l.parents(".form-element").find(".error").text(s.max_char.replace("[x]",jQuery(this).attr("data-max-char"))),l.parents(".form-element").addClass("error-field"),!1;if(jQuery(this).attr("data-val-type")&&"email"===jQuery(this).attr("data-val-type")&&!o.match(r))return l.parents(".form-element").find(".error").text(s.allow_email),l.parents(".form-element").addClass("error-field"),!1;if(jQuery(this).attr("data-val-type")&&"alphabets"===jQuery(this).attr("data-val-type")&&!o.match(e))return l.parents(".form-element").find(".error").text(s.allow_alphabets),l.parents(".form-element").addClass("error-field"),!1;if(jQuery(this).attr("data-val-type")&&"numbers"===jQuery(this).attr("data-val-type")&&!o.match(i))return l.parents(".form-element").find(".error").text(s.allow_numbers),l.parents(".form-element").addClass("error-field"),!1;if(jQuery(this).attr("data-val-type")&&"alphanumeric"===jQuery(this).attr("data-val-type")&&!o.match(t))return l.parents(".form-element").find(".error").text(s.allow_alphanumeric),l.parents(".form-element").addClass("error-field"),!1;if(jQuery(this).attr("data-val-type")&&"url"===jQuery(this).attr("data-val-type")&&!o.match(a))return l.parents(".form-element").find(".error").text(s.allow_url),l.parents(".form-element").addClass("error-field"),!1;if(jQuery(this).attr("data-val-type")&&"regexp"===jQuery(this).attr("data-val-type")){var c=jQuery(this).attr("data-regexp").replace(/.*\/([gimy]*)$/,"$1"),d=jQuery(this).attr("data-regexp").replace(new RegExp("^/(.*?)/"+c+"$"),"$1"),p=new RegExp(d);if(null===p.exec(o))return l.parents(".form-element").find(".error").text(s.allow_regexp),l.parents(".form-element").addClass("error-field"),!1}return l.parents(".form-element").removeClass("error-field"),!0}}(jQuery);t["default"]=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={isMobile:function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm(os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s)|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg(g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v)|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v)|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},isiOS:function(){return!!navigator.userAgent.match(/iPad|iPhone|iPod/g)},spinTo:function(e,t,r,i){var a=""===jQuery(e).text()?0:parseFloat(jQuery(e).text().replace(/[^0-9.]+/g,""));t=isNaN(parseFloat(t))?0:parseFloat(t),a=isNaN(parseFloat(a))?0:parseFloat(a),r="undefined"==typeof r?"":r,i="undefined"==typeof i?".":i;var n=jQuery(e).parents("form");jQuery({someValue:a}).animate({someValue:parseFloat(t)},{duration:600,easing:"swing",context:t,step:function(){var a=void 0;a=parseInt(t,10)!==parseFloat(t,10)?(Math.ceil(100*this.someValue)/100).toString().replace(/[.]/g,i).replace(/\B(?=(\d{3})+(?!\d))/g,r):Math.ceil(this.someValue).toString().replace(/[.]/g,i).replace(/\B(?=(\d{3})+(?!\d))/g,r),jQuery(e).text(a)},complete:function(){jQuery(document).trigger("formcraft_math_change",[n])}}),setTimeout(function(){jQuery(e).text(parseFloat(t).toString().replace(/[.]/g,i).replace(/\B(?=(\d{3})+(?!\d))/g,r))},650)},isElementInViewport:function(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}};t["default"]=r},function(e,t,r){var i,a,n="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};!function(s,o){"object"==n(t)&&"undefined"!=typeof e?e.exports=o():(i=o,a="function"==typeof i?i.call(t,r,t,e):i,!(void 0!==a&&(e.exports=a)))}(void 0,function(){"use strict";function e(e,t){this.type=e,this.value=void 0!==t&&null!==t?t:0}function t(t){return new e(Z,t)}function r(t){return new e(K,t)}function i(t){return new e(J,t)}function a(t,r,i,n,s){for(var o,u,l,c,d=[],p=[],h=0;h<t.length;h++){var f=t[h],m=f.type;if(m===X)d.push(f);else if(m===ee&&s.hasOwnProperty(f.value))f=new e(X,s[f.value]),d.push(f);else if(m===K&&d.length>1)u=d.pop(),o=d.pop(),c=i[f.value],f=new e(X,c(o.value,u.value)),d.push(f);else if(m===J&&d.length>2)l=d.pop(),u=d.pop(),o=d.pop(),"?"===f.value?d.push(o.value?u.value:l.value):(c=n[f.value],f=new e(X,c(o.value,u.value,l.value)),d.push(f));else if(m===Z&&d.length>0)o=d.pop(),c=r[f.value],f=new e(X,c(o.value)),d.push(f);else if(m===re){for(;d.length>0;)p.push(d.shift());p.push(new e(re,a(f.value,r,i,n,s)))}else if(m===ie&&d.length>0)o=d.pop(),d.push(new e(X,o.value[f.value]));else{for(;d.length>0;)p.push(d.shift());p.push(f)}}for(;d.length>0;)p.push(d.shift());return p}function n(a,s,o){for(var u=[],l=0;l<a.length;l++){var c=a[l],d=c.type;if(d===ee&&c.value===s)for(var p=0;p<o.tokens.length;p++){var h,f=o.tokens[p];h=f.type===Z?t(f.value):f.type===K?r(f.value):f.type===J?i(f.value):new e(f.type,f.value),u.push(h)}else d===re?u.push(new e(re,n(c.value,s,o))):u.push(c)}return u}function s(e,t,r){for(var i,a,n,o,u=[],l=0;l<e.length;l++){var c=e[l],d=c.type;if(d===X)u.push(c.value);else if(d===K)a=u.pop(),i=u.pop(),o=t.binaryOps[c.value],u.push(o(i,a));else if(d===J)n=u.pop(),a=u.pop(),i=u.pop(),"?"===c.value?u.push(s(i?a:n,t,r)):(o=t.ternaryOps[c.value],u.push(o(i,a,n)));else if(d===ee)if(c.value in t.functions)u.push(t.functions[c.value]);else{var p=r[c.value];if(void 0===p)throw new Error("undefined variable: "+c.value);u.push(p)}else if(d===Z)i=u.pop(),o=t.unaryOps[c.value],u.push(o(i));else if(d===te){for(var h=c.value,f=[];h-- >0;)f.unshift(u.pop());if(!(o=u.pop()).apply||!o.call)throw new Error(o+" is not a function");u.push(o.apply(void 0,f))}else if(d===re)u.push(c.value);else{if(d!==ie)throw new Error("invalid Expression");i=u.pop(),u.push(i[c.value])}}if(u.length>1)throw new Error("invalid Expression (parity)");return u[0]}function o(e,t){for(var r,i,a,n,s=[],l=0;l<e.length;l++){var c=e[l],d=c.type;if(d===X)"number"==typeof c.value&&c.value<0?s.push("("+c.value+")"):s.push(u(c.value));else if(d===K)i=s.pop(),r=s.pop(),n=c.value,t?"^"===n?s.push("Math.pow("+r+", "+i+")"):"and"===n?s.push("(!!"+r+"&&!!"+i+")"):"or"===n?s.push("(!!"+r+"||!!"+i+")"):"||"===n?s.push("(String("+r+") + String("+i+"))"):"=="===n?s.push("("+r+"==="+i+")"):"!="===n?s.push("("+r+"!=="+i+")"):s.push("("+r+" "+n+" "+i+")"):s.push("("+r+" "+n+" "+i+")");else if(d===J){if(a=s.pop(),i=s.pop(),r=s.pop(),"?"!==(n=c.value))throw new Error("invalid Expression");s.push("("+r+" ? "+i+":"+a+")")}else if(d===ee)s.push(c.value);else if(d===Z)r=s.pop(),"-"===(n=c.value)||"+"===n?s.push("("+n+r+")"):t?"not"===n?s.push("(!"+r+")"):"!"===n?s.push("fac("+r+")"):s.push(n+"("+r+")"):"!"===n?s.push("("+r+"!)"):s.push("("+n+" "+r+")");else if(d===te){for(var p=c.value,h=[];p-- >0;)h.unshift(s.pop());n=s.pop(),s.push(n+"("+h.join(", ")+")")}else if(d===ie)r=s.pop(),s.push(r+"."+c.value);else{if(d!==re)throw new Error("invalid Expression");s.push("("+o(c.value,t)+")")}}if(s.length>1)throw new Error("invalid Expression (parity)");return String(s[0])}function u(e){return"string"==typeof e?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}function l(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}function c(e,t,r){for(var i=!!(r=r||{}).withMembers,a=null,n=0;n<e.length;n++){var s=e[n];s.type!==ee||l(t,s.value)?s.type===ie&&i&&null!==a?a+="."+s.value:s.type===re?c(s.value,t,r):null!==a&&(l(t,a)||t.push(a),a=null):i?null!==a?(l(t,a)||t.push(a),a=s.value):a=s.value:t.push(s.value)}null===a||l(t,a)||t.push(a)}function d(e,t){this.tokens=e,this.parser=t,this.unaryOps=t.unaryOps,this.binaryOps=t.binaryOps,this.ternaryOps=t.ternaryOps,this.functions=t.functions}function p(e,t,r){this.type=e,this.value=t,this.index=r}function h(e,t){this.pos=0,this.current=null,this.unaryOps=e.unaryOps,this.binaryOps=e.binaryOps,this.ternaryOps=e.ternaryOps,this.consts=e.consts,this.expression=t,this.savedPosition=0,this.savedCurrent=null,this.options=e.options}function f(e){return se.hasOwnProperty(e)?se[e]:e}function m(e,t,r){this.parser=e,this.tokens=t,this.current=null,this.nextToken=null,this.next(),this.savedCurrent=null,this.savedNextToken=null,this.allowMemberAccess=!1!==r.allowMemberAccess}function y(e,t){return Number(e)+Number(t)}function v(e,t){return e-t}function g(e,t){return e*t}function j(e,t){return e/t}function w(e,t){return e%t}function Q(e,t){return""+e+t}function b(e,t){return e===t}function x(e,t){return e!==t}function k(e,t){return e>t}function C(e,t){return e<t}function M(e,t){return e>=t}function F(e,t){return e<=t}function E(e,t){return Boolean(e&&t)}function T(e,t){return Boolean(e||t)}function S(e,t){return l(t,e)}function _(e){return(Math.exp(e)-Math.exp(-e))/2}function A(e){return(Math.exp(e)+Math.exp(-e))/2}function O(e){return e===1/0?1:e===-1/0?-1:(Math.exp(e)-Math.exp(-e))/(Math.exp(e)+Math.exp(-e))}function I(e){return e===-1/0?e:Math.log(e+Math.sqrt(e*e+1))}function L(e){return Math.log(e+Math.sqrt(e*e-1))}function N(e){return Math.log((1+e)/(1-e))/2}function D(e){return Math.log(e)*Math.LOG10E}function P(e){return-e}function q(e){return!e}function R(e){return e<0?Math.ceil(e):Math.floor(e)}function z(e){return Math.random()*(e||1)}function V(e){return H(e+1)}function B(e){return isFinite(e)&&e===Math.round(e)}function H(e){var t,r;if(B(e)){if(e<=0)return isFinite(e)?1/0:NaN;if(e>171)return 1/0;for(var i=e-2,a=e-1;i>1;)a*=i,i--;return 0===a&&(a=1),a}if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*H(1-e));if(e>=171.35)return 1/0;if(e>85){var n=e*e,s=n*e,o=s*e,u=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*n)-139/(51840*s)-571/(2488320*o)+163879/(209018880*u)+5246819/(75246796800*u*e))}--e,r=de[0];for(var l=1;l<de.length;++l)r+=de[l]/(e+l);
return t=e+ce+.5,Math.sqrt(2*Math.PI)*Math.pow(t,e+.5)*Math.exp(-t)*r}function U(e){return String(e).length}function W(){for(var e=0,t=0,r=0;r<arguments.length;r++){var i,a=Math.abs(arguments[r]);t<a?(e=e*(i=t/a)*i+1,t=a):e+=a>0?(i=a/t)*i:a}return t===1/0?1/0:t*Math.sqrt(e)}function $(e,t,r){return e?t:r}function G(e,t){return void 0===t||0==+t?Math.round(e):(e=+e,t=-+t,isNaN(e)||"number"!=typeof t||t%1!=0?NaN:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),+((e=e.toString().split("e"))[0]+"e"+(e[1]?+e[1]+t:t))))}function Y(e){this.options=e||{},this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||_,cosh:Math.cosh||A,tanh:Math.tanh||O,asinh:Math.asinh||I,acosh:Math.acosh||L,atanh:Math.atanh||N,sqrt:Math.sqrt,log:Math.log,ln:Math.log,lg:Math.log10||D,log10:Math.log10||D,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||R,"-":P,"+":Number,exp:Math.exp,not:q,length:U,"!":V},this.binaryOps={"+":y,"-":v,"*":g,"/":j,"%":w,"^":Math.pow,"||":Q,"==":b,"!=":x,">":k,"<":C,">=":M,"<=":F,and:E,or:T,"in":S},this.ternaryOps={"?":$},this.functions={random:z,fac:V,min:Math.min,max:Math.max,hypot:Math.hypot||W,pyt:Math.hypot||W,pow:Math.pow,atan2:Math.atan2,"if":$,gamma:H,roundTo:G},this.consts={E:Math.E,PI:Math.PI,"true":!0,"false":!1}}var X="INUMBER",Z="IOP1",K="IOP2",J="IOP3",ee="IVAR",te="IFUNCALL",re="IEXPR",ie="IMEMBER";e.prototype.toString=function(){switch(this.type){case X:case Z:case K:case J:case ee:return this.value;case te:return"CALL "+this.value;case ie:return"."+this.value;default:return"Invalid Instruction"}},d.prototype.simplify=function(e){return e=e||{},new d(a(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,e),this.parser)},d.prototype.substitute=function(e,t){return t instanceof d||(t=this.parser.parse(String(t))),new d(n(this.tokens,e,t),this.parser)},d.prototype.evaluate=function(e){return e=e||{},s(this.tokens,this,e)},d.prototype.toString=function(){return o(this.tokens,!1)},d.prototype.symbols=function(e){e=e||{};var t=[];return c(this.tokens,t,e),t},d.prototype.variables=function(e){e=e||{};var t=[];c(this.tokens,t,e);var r=this.functions;return t.filter(function(e){return!(e in r)})},d.prototype.toJSFunction=function(e,t){var r=this,i=new Function(e,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps){ return "+o(this.simplify(t).tokens,!0)+"; }");return function(){return i.apply(r,arguments)}};var ae="TOP";p.prototype.toString=function(){return this.type+": "+this.value},h.prototype.newToken=function(e,t,r){return new p(e,t,null!=r?r:this.pos)},h.prototype.save=function(){this.savedPosition=this.pos,this.savedCurrent=this.current},h.prototype.restore=function(){this.pos=this.savedPosition,this.current=this.savedCurrent},h.prototype.next=function(){return this.pos>=this.expression.length?this.newToken("TEOF","EOF"):this.isWhitespace()||this.isComment()?this.next():this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isComma()||this.isNamedOp()||this.isConst()||this.isName()?this.current:void this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')},h.prototype.isString=function(){var e=!1,t=this.pos,r=this.expression.charAt(t);if("'"===r||'"'===r)for(var i=this.expression.indexOf(r,t+1);i>=0&&this.pos<this.expression.length;){if(this.pos=i+1,"\\"!==this.expression.charAt(i-1)){var a=this.expression.substring(t+1,i);this.current=this.newToken("TSTRING",this.unescape(a),t),e=!0;break}i=this.expression.indexOf(r,i+1)}return e},h.prototype.isParen=function(){var e=this.expression.charAt(this.pos);return("("===e||")"===e)&&(this.current=this.newToken("TPAREN",e),this.pos++,!0)},h.prototype.isComma=function(){return","===this.expression.charAt(this.pos)&&(this.current=this.newToken("TCOMMA",","),this.pos++,!0)},h.prototype.isConst=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||"_"!==r&&"."!==r&&(r<"0"||r>"9")))break}if(t>e){var i=this.expression.substring(e,t);if(i in this.consts)return this.current=this.newToken("TNUMBER",this.consts[i]),this.pos+=i.length,!0}return!1},h.prototype.isNamedOp=function(){for(var e=this.pos,t=e;t<this.expression.length;t++){var r=this.expression.charAt(t);if(r.toUpperCase()===r.toLowerCase()&&(t===this.pos||"_"!==r&&(r<"0"||r>"9")))break}if(t>e){var i=this.expression.substring(e,t);if(this.isOperatorEnabled(i)&&(i in this.binaryOps||i in this.unaryOps||i in this.ternaryOps))return this.current=this.newToken(ae,i),this.pos+=i.length,!0}return!1},h.prototype.isName=function(){for(var e=this.pos,t=e,r=!1;t<this.expression.length;t++){var i=this.expression.charAt(t);if(i.toUpperCase()===i.toLowerCase()){if(t===this.pos&&"$"===i)continue;if(t===this.pos||!r||"_"!==i&&(i<"0"||i>"9"))break}else r=!0}if(r){var a=this.expression.substring(e,t);return this.current=this.newToken("TNAME",a),this.pos+=a.length,!0}return!1},h.prototype.isWhitespace=function(){for(var e=!1,t=this.expression.charAt(this.pos);!(" "!==t&&"\t"!==t&&"\n"!==t&&"\r"!==t||(e=!0,++this.pos>=this.expression.length));)t=this.expression.charAt(this.pos);return e};var ne=/^[0-9a-f]{4}$/i;h.prototype.unescape=function(e){var t=e.indexOf("\\");if(t<0)return e;for(var r=e.substring(0,t);t>=0;){var i=e.charAt(++t);switch(i){case"'":r+="'";break;case'"':r+='"';break;case"\\":r+="\\";break;case"/":r+="/";break;case"b":r+="\b";break;case"f":r+="\f";break;case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"u":var a=e.substring(t+1,t+5);ne.test(a)||this.parseError("Illegal escape sequence: \\u"+a),r+=String.fromCharCode(parseInt(a,16)),t+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+i+'"')}++t;var n=e.indexOf("\\",t);r+=e.substring(t,n<0?e.length:n),t=n}return r},h.prototype.isComment=function(){return"/"===this.expression.charAt(this.pos)&&"*"===this.expression.charAt(this.pos+1)&&(this.pos=this.expression.indexOf("*/",this.pos)+2,1===this.pos&&(this.pos=this.expression.length),!0)},h.prototype.isRadixInteger=function(){var e=this.pos;if(e>=this.expression.length-2||"0"!==this.expression.charAt(e))return!1;++e;var t,r;if("x"===this.expression.charAt(e))t=16,r=/^[0-9a-f]$/i,++e;else{if("b"!==this.expression.charAt(e))return!1;t=2,r=/^[01]$/i,++e}for(var i=!1,a=e;e<this.expression.length;){var n=this.expression.charAt(e);if(!r.test(n))break;e++,i=!0}return i&&(this.current=this.newToken("TNUMBER",parseInt(this.expression.substring(a,e),t)),this.pos=e),i},h.prototype.isNumber=function(){for(var e,t=!1,r=this.pos,i=r,a=r,n=!1,s=!1;r<this.expression.length&&((e=this.expression.charAt(r))>="0"&&e<="9"||!n&&"."===e);)"."===e?n=!0:s=!0,r++,t=s;if(t&&(a=r),"e"===e||"E"===e){r++;for(var o=!0,u=!1;r<this.expression.length;){if(e=this.expression.charAt(r),!o||"+"!==e&&"-"!==e){if(!(e>="0"&&e<="9"))break;u=!0,o=!1}else o=!1;r++}u||(r=a)}return t?(this.current=this.newToken("TNUMBER",parseFloat(this.expression.substring(i,r))),this.pos=r):this.pos=a,t},h.prototype.isOperator=function(){var e=this.pos,t=this.expression.charAt(this.pos);if("+"===t||"-"===t||"*"===t||"/"===t||"%"===t||"^"===t||"?"===t||":"===t||"."===t)this.current=this.newToken(ae,t);else if("∙"===t||"•"===t)this.current=this.newToken(ae,"*");else if(">"===t)"="===this.expression.charAt(this.pos+1)?(this.current=this.newToken(ae,">="),this.pos++):this.current=this.newToken(ae,">");else if("<"===t)"="===this.expression.charAt(this.pos+1)?(this.current=this.newToken(ae,"<="),this.pos++):this.current=this.newToken(ae,"<");else if("|"===t){if("|"!==this.expression.charAt(this.pos+1))return!1;this.current=this.newToken(ae,"||"),this.pos++}else if("="===t){if("="!==this.expression.charAt(this.pos+1))return!1;this.current=this.newToken(ae,"=="),this.pos++}else{if("!"!==t)return!1;"="===this.expression.charAt(this.pos+1)?(this.current=this.newToken(ae,"!="),this.pos++):this.current=this.newToken(ae,t)}return this.pos++,!!this.isOperatorEnabled(this.current.value)||(this.pos=e,!1)};var se={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional"};h.prototype.isOperatorEnabled=function(e){var t=f(e),r=this.options.operators||{};return"in"===t?!!r["in"]:!(t in r&&!r[t])},h.prototype.getCoordinates=function(){var e,t=0,r=-1;do t++,e=this.pos-r,r=this.expression.indexOf("\n",r+1);while(r>=0&&r<this.pos);return{line:t,column:e}},h.prototype.parseError=function(e){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+e)},m.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()},m.prototype.tokenMatches=function(e,t){return void 0===t||(Array.isArray(t)?l(t,e.value):"function"==typeof t?t(e):e.value===t)},m.prototype.save=function(){this.savedCurrent=this.current,this.savedNextToken=this.nextToken,this.tokens.save()},m.prototype.restore=function(){this.tokens.restore(),this.current=this.savedCurrent,this.nextToken=this.savedNextToken},m.prototype.accept=function(e,t){return!(this.nextToken.type!==e||!this.tokenMatches(this.nextToken,t)||(this.next(),0))},m.prototype.expect=function(e,t){if(!this.accept(e,t)){var r=this.tokens.getCoordinates();throw new Error("parse error ["+r.line+":"+r.column+"]: Expected "+(t||e))}},m.prototype.parseAtom=function(t){if(this.accept("TNAME"))t.push(new e(ee,this.current.value));else if(this.accept("TNUMBER"))t.push(new e(X,this.current.value));else if(this.accept("TSTRING"))t.push(new e(X,this.current.value));else{if(!this.accept("TPAREN","("))throw new Error("unexpected "+this.nextToken);this.parseExpression(t),this.expect("TPAREN",")")}},m.prototype.parseExpression=function(e){this.parseConditionalExpression(e)},m.prototype.parseConditionalExpression=function(t){for(this.parseOrExpression(t);this.accept(ae,"?");){var r=[],a=[];this.parseConditionalExpression(r),this.expect(ae,":"),this.parseConditionalExpression(a),t.push(new e(re,r)),t.push(new e(re,a)),t.push(i("?"))}},m.prototype.parseOrExpression=function(e){for(this.parseAndExpression(e);this.accept(ae,"or");)this.parseAndExpression(e),e.push(r("or"))},m.prototype.parseAndExpression=function(e){for(this.parseComparison(e);this.accept(ae,"and");)this.parseComparison(e),e.push(r("and"))};var oe=["==","!=","<","<=",">=",">","in"];m.prototype.parseComparison=function(e){for(this.parseAddSub(e);this.accept(ae,oe);){var t=this.current;this.parseAddSub(e),e.push(r(t.value))}};var ue=["+","-","||"];m.prototype.parseAddSub=function(e){for(this.parseTerm(e);this.accept(ae,ue);){var t=this.current;this.parseTerm(e),e.push(r(t.value))}};var le=["*","/","%"];m.prototype.parseTerm=function(e){for(this.parseFactor(e);this.accept(ae,le);){var t=this.current;this.parseFactor(e),e.push(r(t.value))}},m.prototype.parseFactor=function(e){var r=this.tokens.unaryOps;if(this.save(),this.accept(ae,function(e){return e.value in r}))if("-"!==this.current.value&&"+"!==this.current.value&&"TPAREN"===this.nextToken.type&&"("===this.nextToken.value)this.restore(),this.parseExponential(e);else{var i=this.current;this.parseFactor(e),e.push(t(i.value))}else this.parseExponential(e)},m.prototype.parseExponential=function(e){for(this.parsePostfixExpression(e);this.accept(ae,"^");)this.parseFactor(e),e.push(r("^"))},m.prototype.parsePostfixExpression=function(e){for(this.parseFunctionCall(e);this.accept(ae,"!");)e.push(t("!"))},m.prototype.parseFunctionCall=function(r){var i=this.tokens.unaryOps;if(this.accept(ae,function(e){return e.value in i})){var a=this.current;this.parseAtom(r),r.push(t(a.value))}else for(this.parseMemberExpression(r);this.accept("TPAREN","(");)if(this.accept("TPAREN",")"))r.push(new e(te,0));else{var n=this.parseArgumentList(r);r.push(new e(te,n))}},m.prototype.parseArgumentList=function(e){for(var t=0;!this.accept("TPAREN",")");)for(this.parseExpression(e),++t;this.accept("TCOMMA");)this.parseExpression(e),++t;return t},m.prototype.parseMemberExpression=function(t){for(this.parseAtom(t);this.accept(ae,".");){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect("TNAME"),t.push(new e(ie,this.current.value))}};var ce=4.7421875,de=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];Y.prototype.parse=function(e){var t=[],r=new m(this,new h(this,e),{allowMemberAccess:this.options.allowMemberAccess});return r.parseExpression(t),r.expect("TEOF","EOF"),new d(t,this)},Y.prototype.evaluate=function(e,t){return this.parse(e).evaluate(t)};var pe=new Y;return Y.parse=function(e){return pe.parse(e)},Y.evaluate=function(e,t){return pe.parse(e).evaluate(t)},{Parser:Y,Expression:d}})}]),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery||Zepto)}(function(e){var t=function(t,r,i){var a={invalid:[],getCaret:function(){try{var e,r=0,i=t.get(0),n=document.selection,s=i.selectionStart;return n&&navigator.appVersion.indexOf("MSIE 10")===-1?(e=n.createRange(),e.moveStart("character",-a.val().length),r=e.text.length):(s||"0"===s)&&(r=s),r}catch(o){}},setCaret:function(e){try{if(t.is(":focus")){var r,i=t.get(0);i.setSelectionRange?(i.focus(),i.setSelectionRange(e,e)):(r=i.createTextRange(),r.collapse(!0),r.moveEnd("character",e),r.moveStart("character",e),r.select())}}catch(a){}},events:function(){t.on("keydown.mask",function(e){t.data("mask-keycode",e.keyCode||e.which)}).on(e.jMaskGlobals.useInput?"input.mask":"keyup.mask",a.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){t.keydown().keyup()},100)}).on("change.mask",function(){t.data("changed",!0)}).on("blur.mask",function(){o===a.val()||t.data("changed")||t.trigger("change"),t.data("changed",!1)}).on("blur.mask",function(){o=a.val()}).on("focus.mask",function(t){i.selectOnFocus===!0&&e(t.target).select()}).on("focusout.mask",function(){i.clearIfNotMatch&&!n.test(a.val())&&a.val("")})},getRegexMask:function(){for(var e,t,i,a,n,o,u=[],l=0;l<r.length;l++)e=s.translation[r.charAt(l)],e?(t=e.pattern.toString().replace(/.{1}$|^.{1}/g,""),i=e.optional,a=e.recursive,a?(u.push(r.charAt(l)),n={digit:r.charAt(l),pattern:t}):u.push(i||a?t+"?":t)):u.push(r.charAt(l).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));return o=u.join(""),n&&(o=o.replace(new RegExp("("+n.digit+"(.*"+n.digit+")?)"),"($1)?").replace(new RegExp(n.digit,"g"),n.pattern)),new RegExp(o)},destroyEvents:function(){t.off(["input","keydown","keyup","paste","drop","blur","focusout",""].join(".mask "))},val:function(e){var r,i=t.is("input"),a=i?"val":"text";return arguments.length>0?(t[a]()!==e&&t[a](e),r=t):r=t[a](),r},getMCharsBeforeCount:function(e,t){for(var i=0,a=0,n=r.length;a<n&&a<e;a++)s.translation[r.charAt(a)]||(e=t?e+1:e,i++);return i},caretPos:function(e,t,i,n){var o=s.translation[r.charAt(Math.min(e-1,r.length-1))];return o?Math.min(e+i-t-n,i):a.caretPos(e+1,t,i,n)},behaviour:function(r){r=r||window.event,a.invalid=[];var i=t.data("mask-keycode");if(e.inArray(i,s.byPassKeys)===-1){var n=a.getCaret(),o=a.val(),u=o.length,l=a.getMasked(),c=l.length,d=a.getMCharsBeforeCount(c-1)-a.getMCharsBeforeCount(u-1),p=n<u;return a.val(l),p&&(8!==i&&46!==i&&(n=a.caretPos(n,u,c,d)),a.setCaret(n)),a.callbacks(r)}},getMasked:function(e,t){var n,o,u=[],l=void 0===t?a.val():t+"",c=0,d=r.length,p=0,h=l.length,f=1,m="push",y=-1;for(i.reverse?(m="unshift",f=-1,n=0,c=d-1,p=h-1,o=function(){return c>-1&&p>-1}):(n=d-1,o=function(){return c<d&&p<h});o();){var v=r.charAt(c),g=l.charAt(p),j=s.translation[v];j?(g.match(j.pattern)?(u[m](g),j.recursive&&(y===-1?y=c:c===n&&(c=y-f),n===y&&(c-=f)),c+=f):j.optional?(c+=f,p-=f):j.fallback?(u[m](j.fallback),c+=f,p-=f):a.invalid.push({p:p,v:g,e:j.pattern}),p+=f):(e||u[m](v),g===v&&(p+=f),c+=f)}var w=r.charAt(n);return d!==h+1||s.translation[w]||u.push(w),u.join("")},callbacks:function(e){var n=a.val(),s=n!==o,u=[n,e,t,i],l=function(e,t,r){"function"==typeof i[e]&&t&&i[e].apply(this,r)};l("onChange",s===!0,u),l("onKeyPress",s===!0,u),l("onComplete",n.length===r.length,u),l("onInvalid",a.invalid.length>0,[n,e,t,a.invalid,i])}};t=e(t);var n,s=this,o=a.val();r="function"==typeof r?r(a.val(),void 0,t,i):r,s.mask=r,s.options=i,s.remove=function(){var e=a.getCaret();return a.destroyEvents(),a.val(s.getCleanVal()),a.setCaret(e-a.getMCharsBeforeCount(e)),t},s.getCleanVal=function(){return a.getMasked(!0)},s.getMaskedVal=function(e){return a.getMasked(!1,e)},s.init=function(r){if(r=r||!1,i=i||{},s.clearIfNotMatch=e.jMaskGlobals.clearIfNotMatch,s.byPassKeys=e.jMaskGlobals.byPassKeys,s.translation=e.extend({},e.jMaskGlobals.translation,i.translation),s=e.extend(!0,{},s,i),n=a.getRegexMask(),r===!1){i.placeholder&&t.attr("placeholder",i.placeholder),t.data("mask")&&t.attr("autocomplete","off"),a.destroyEvents(),a.events();var o=a.getCaret();a.val(a.getMasked()),a.setCaret(o+a.getMCharsBeforeCount(o,!0))}else a.events(),a.val(a.getMasked())},s.init(!t.is("input"))};e.maskWatchers={};var r=function(){var r=e(this),a={},n="data-mask-",s=r.attr("data-mask");if(r.attr(n+"reverse")&&(a.reverse=!0),r.attr(n+"clearifnotmatch")&&(a.clearIfNotMatch=!0),"true"===r.attr(n+"selectonfocus")&&(a.selectOnFocus=!0),i(r,s,a))return r.data("mask",new t(this,s,a))},i=function(t,r,i){i=i||{};var a=e(t).data("mask"),n=JSON.stringify,s=e(t).val()||e(t).text();try{return"function"==typeof r&&(r=r(s)),"object"!=typeof a||n(a.options)!==n(i)||a.mask!==r}catch(o){}},a=function(e){var t,r=document.createElement("div");return e="on"+e,t=e in r,t||(r.setAttribute(e,"return;"),t="function"==typeof r[e]),r=null,t};e.fn.mask=function(r,a){a=a||{};var n=this.selector,s=e.jMaskGlobals,o=s.watchInterval,u=a.watchInputs||s.watchInputs,l=function(){if(i(this,r,a))return e(this).data("mask",new t(this,r,a))};return e(this).each(l),n&&""!==n&&u&&(clearInterval(e.maskWatchers[n]),e.maskWatchers[n]=setInterval(function(){e(document).find(n).each(l)},o)),this},e.fn.masked=function(e){return this.data("mask").getMaskedVal(e)},e.fn.unmask=function(){return clearInterval(e.maskWatchers[this.selector]),delete e.maskWatchers[this.selector],this.each(function(){var t=e(this).data("mask");t&&t.remove().removeData("mask")})},e.fn.cleanVal=function(){return this.data("mask").getCleanVal()},e.applyDataMask=function(t){t=t||e.jMaskGlobals.maskElements;var i=t instanceof e?t:e(t);i.filter(e.jMaskGlobals.dataMaskAttr).each(r)};var n={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,useInput:a("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};e.jMaskGlobals=e.jMaskGlobals||{},n=e.jMaskGlobals=e.extend(!0,{},n,e.jMaskGlobals),n.dataMask&&e.applyDataMask(),setInterval(function(){e.jMaskGlobals.watchDataMask&&e.applyDataMask()},n.watchInterval)}),function(e){function t(e,t){if(!(e.originalEvent.touches.length>1)){e.preventDefault();var r=e.originalEvent.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(t,!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}}if(e.support.touch="ontouchend"in document,e.support.touch){var r,i=e.ui.mouse.prototype,a=i._mouseInit,n=i._mouseDestroy;i._touchStart=function(e){var i=this;!r&&i._mouseCapture(e.originalEvent.changedTouches[0])&&(r=!0,i._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},i._touchMove=function(e){r&&(this._touchMoved=!0,t(e,"mousemove"))},i._touchEnd=function(e){r&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),r=!1)},i._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),a.call(t)},i._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),n.call(t)}}}(jQuery);
!function(a){woodmartThemeModule.footerWidgetsAccordion=function(){woodmartThemeModule.windowWidth>=576||a(".footer-widget-collapse .widget-title").on("click",function(){var b=a(this),c=b.parent(),d=c.find("> *:not(.widget-title)");c.hasClass("footer-widget-opened")?(c.removeClass("footer-widget-opened"),d.stop().slideUp(200)):(c.addClass("footer-widget-opened"),d.stop().slideDown(200),woodmartThemeModule.$document.trigger("wood-images-loaded"))})},a(document).ready(function(){woodmartThemeModule.footerWidgetsAccordion()})}(jQuery);
!function(a){woodmartThemeModule.scrollTop=function(){var b=a(".scrollToTop");woodmartThemeModule.$window.on("scroll",function(){a(this).scrollTop()>100?b.addClass("button-show"):b.removeClass("button-show")}),b.on("click",function(){return a("html, body").animate({scrollTop:0},800),!1})},a(document).ready(function(){woodmartThemeModule.scrollTop()})}(jQuery);
!function(a){woodmartThemeModule.mobileNavigation=function(){function b(){e.addClass("wd-opened"),g.addClass("wd-close-side-opened"),woodmartThemeModule.$document.trigger("wood-images-loaded")}function c(){e.removeClass("wd-opened"),g.removeClass("wd-close-side-opened"),a(".mobile-nav .searchform input[type=text]").blur()}var d=woodmartThemeModule.$body,e=a(".mobile-nav"),f=a(".mobile-nav .wd-nav-mobile .menu-item-has-children"),g=a(".wd-close-side");f.append('<span class="wd-nav-opener"></span>'),e.on("click",".wd-nav-opener",function(b){b.preventDefault();var c=a(this),d=c.parent();d.hasClass("opener-page")?(d.removeClass("opener-page").find("> ul").slideUp(200),d.removeClass("opener-page").find(".wd-dropdown-menu .container > ul, .wd-dropdown-menu > ul").slideUp(200),d.find("> .wd-nav-opener").removeClass("wd-active")):(d.addClass("opener-page").find("> ul").slideDown(200),d.addClass("opener-page").find(".wd-dropdown-menu .container > ul, .wd-dropdown-menu > ul").slideDown(200),d.find("> .wd-nav-opener").addClass("wd-active")),woodmartThemeModule.$document.trigger("wood-images-loaded")}),e.on("click",".wd-nav-mob-tab li",function(b){b.preventDefault();var c=a(this),d=c.data("menu");c.hasClass("wd-active")||(c.parent().find(".wd-active").removeClass("wd-active"),c.addClass("wd-active"),a(".wd-nav-mobile").removeClass("wd-active"),a(".mobile-"+d+"-menu").addClass("wd-active"),woodmartThemeModule.$document.trigger("wood-images-loaded"))}),d.on("click",".wd-header-mobile-nav > a",function(a){a.preventDefault(),e.hasClass("wd-opened")?c():b()}),d.on("click touchstart",".wd-close-side",function(){c()}),d.on("click",".mobile-nav .login-side-opener",function(){c()})},a(document).ready(function(){woodmartThemeModule.mobileNavigation()})}(jQuery);
!function(a){woodmartThemeModule.stickySocialButtons=function(){a(".wd-sticky-social").addClass("buttons-loaded")},a(document).ready(function(){woodmartThemeModule.stickySocialButtons()})}(jQuery);
!function(a){woodmartThemeModule.cookiesPopup=function(){var b=woodmart_settings.cookies_version;if("accepted"!==Cookies.get("woodmart_cookies_"+b)){var c=a(".wd-cookies-popup");setTimeout(function(){c.addClass("popup-display"),c.on("click",".cookies-accept-btn",function(a){a.preventDefault(),d()})},2500);var d=function(){c.removeClass("popup-display").addClass("popup-hide"),Cookies.set("woodmart_cookies_"+b,"accepted",{expires:60,path:"/",secure:woodmart_settings.cookie_secure_param})}}},a(document).ready(function(){woodmartThemeModule.cookiesPopup()})}(jQuery);