!function(){"use strict";let e;const t=function(e){return"json"===this.responseType||!0===this.json?e({message:this.statusText},!1):"text"===this.responseType?e(this.statusText):void console.error(this)},i=function(e){if(0===this.status||this.status>=200&&this.status<300||304===this.status){if("json"===this.responseType)return e(this.response.data,this.response.success);if("text"===this.responseType)return e(this.responseText);if(!0===this.json){const t=JSON.parse(this.response);return e(t.data,t.success)}}else t.bind(this,e)},s=e=>{let t=new FormData;const i=Object.prototype.toString.call(e);return"[object FormData]"===i&&(t=e),"[object HTMLFormElement]"===i&&(t=new FormData(e)),"[object Object]"===i&&Object.keys(e).forEach(i=>t.append(i,e[i])),t.append("action",GLSR.action),t.append("_ajax_request",!0),t},n=s=>{e=new XMLHttpRequest,e.addEventListener("load",i.bind(e,s)),e.addEventListener("error",t.bind(e,s))},r=t=>{(t=t||{})["X-Requested-With"]="XMLHttpRequest";for(let i in t)t.hasOwnProperty(i)&&e.setRequestHeader(i,t[i])};var a={data:(e,t={})=>{let i={};t._action=e;for(let e of Object.keys(t))i[`${GLSR.nameprefix}[${e}]`]=t[e];return i},get:(t,i,s)=>{n(i),e.open("GET",t,!0),e.responseType="text",r(s),e.send()},post:(t,i,a)=>{n(i),e.open("POST",GLSR.ajax_url,!0),e.responseType="json",e.json=!0,r(a),e.send(s(t))}};const o={},l=function(e,t){const i=o[e]||[],s=[];t&&[].forEach.call(i,e=>{t!==e.fn&&t!==e.fn.once&&s.push(e)}),s.length?o[e]=s:delete o[e]},c=function(e,t,i){(o[e]||(o[e]=[])).push({fn:t,context:i})};var h={events:o,off:l,on:c,once:function(e,t,i){const s=function(){l(e,s),t.apply(i,arguments)};s.once=t,c(e,s,i)},trigger:function(e){const t=[].slice.call(arguments,1),i=(o[e]||[]).slice();[].forEach.call(i,e=>e.fn.apply(e.context,t))}};const d="function",u="isNode",p=(e,t)=>typeof e===t,f=(e,t)=>{null!==t&&(Array.isArray(t)?t.map(t=>f(e,t)):(g[u](t)||(t=document.createTextNode(t)),e.appendChild(t)))};function g(e,t){let i,s,n=arguments,r=1;if(!g.isElement(e)){let t=["circle","clipPath","ellipse","g","line","linearGradient","mask","path","polygon","polyline","radialGradient","rect","stop","svg","text","textPath"].includes(e)?"2000/svg":"1999/xhtml";e=document.createElementNS(`http://www.w3.org/${t}`,e)}if("string"==typeof t&&(t={class:t}),p(t,"object")&&!g[u](t)&&!Array.isArray(t))for(i in r++,t)s=t[i],i=g.attrMap[i]||i,p(i,d)?i(e,s):p(s,d)?e[i]=s:e.setAttribute(i,s);for(;r<n.length;r++)f(e,n[r]);return e}g.attrMap={style:(e,t)=>{p(t,"string")?e.style.cssText=t:p(t,"object")&&Object.assign(e.style,t)}},g.isElement=e=>e instanceof Element,g[u]=e=>e instanceof Node;const m="glsr-read-more",v=".glsr-hidden-text",y=".glsr-tag-value";class _{constructor(e){this.events={click:this._onClick.bind(this)},(e||document).querySelectorAll(v).forEach(e=>this.init(e))}init(e){const t=this._insertLink(e);t&&("expand"===e.dataset.trigger&&(t.dataset.text=e.dataset.showLess,t.removeEventListener("click",this.events.click),t.addEventListener("click",this.events.click)),"modal"===e.dataset.trigger&&(t.dataset.glsrTrigger="glsr-modal-review"))}_insertLink(e){let t=e.parentElement.querySelector("."+m);t&&t.parentElement.removeChild(t);const i=g("a",{href:"#"},e.dataset.showMore),s=g("span",{class:m},i);return e.appendChild(s).querySelector("a")}_onClick(e){e.preventDefault();const t=e.currentTarget,i=t.parentElement,s=t.closest(y),n=s.querySelector(v),r=t.dataset.text,a=t.innerText;t.dataset.text=a,t.innerText=r,t.removeEventListener("click",this.events.click),"false"===s.dataset.expanded?(s.querySelector("p:last-of-type").appendChild(i),s.dataset.expanded="true"):(n.appendChild(i),s.dataset.expanded="false"),t.addEventListener("click",this.events.click),t.focus()}}var w=e=>({el:e,loading:()=>{"false"===e.getAttribute("aria-busy")&&(e.setAttribute("aria-busy",!0),e.setAttribute("disabled",""),e.dataset.text=e.innerText,e.innerHTML='<span class="glsr-loading"></span>'+(e.dataset.loading||e.dataset.text))},loaded:()=>{"true"===e.getAttribute("aria-busy")&&(e.innerHTML=e.dataset.text,e.setAttribute("aria-busy",!1),e.removeAttribute("data-text"),e.removeAttribute("disabled"))}});class b{constructor(e){this.Form=e,this.captcha={friendlycaptcha:"friendlyChallenge",friendlycaptcha_v2:"frcaptcha",hcaptcha:"hcaptcha",procaptcha:"procaptcha",recaptcha_v2_invisible:"grecaptcha",recaptcha_v3:"grecaptcha",turnstile:"turnstile"}[GLSR.captcha.type],this.captchaEl=!1,this.containerEl=this.Form.form.querySelector(".glsr-captcha-holder"),this.loaded=!1,this.token=null,this.widget=-1,this.fixCompatibility()}execute(){if(this.captchaEl&&this.isWidgetLoaded())try{this["execute_"+GLSR.captcha.type]()}catch(e){console.error(e),this.Form.submitForm()}else this.Form.submitForm()}execute_friendlycaptcha(e){1===+this.captchaEl.dataset.error?this._submitFormWithToken("sitekey_invalid"):this.token?this.Form.submitForm():this._retry_execute(e=>this.execute_friendlycaptcha(e),e)}execute_friendlycaptcha_v2(){this.execute_friendlycaptcha()}execute_hcaptcha(){1===+this.captchaEl.dataset.error?this._submitFormWithToken("sitekey_invalid"):this.token?this._submitFormWithToken(this.token):window[this.captcha].execute(this.widget,{action:"submit_review",async:!0}).then(({response:e})=>{this._submitFormWithToken(e)}).catch(e=>{console.error(e)})}execute_procaptcha(){1===+this.captchaEl.dataset.error?this._submitFormWithToken("sitekey_invalid"):this.Form.submitForm()}execute_recaptcha_v2_invisible(){this.execute_recaptcha_v3()}execute_recaptcha_v3(){1===+this.captchaEl.dataset.error?this._submitFormWithToken("sitekey_invalid"):window[this.captcha].execute(this.widget,{action:"submit_review"})}execute_turnstile(e){let t=window[this.captcha].getResponse(this.widget);1===+this.captchaEl.dataset.error||this.token||void 0===t?this.Form.submitForm():this._retry_execute(e=>this.execute_turnstile(e),e)}fixCompatibility(){"hcaptcha"===GLSR.captcha.type&&void 0!==window.hCaptchaOnLoad&&document.body.click()}isLoaded(e){for(let t=0;t<document.scripts.length;t++)if(e.split("?")[0]===document.scripts[t].src.split("?")[0])return!0;return!1}isWidgetLoaded(){return-1!==this.widget&&null!=this.widget}load(e,t){if(void 0===e||this.isLoaded(e))return Promise.resolve();const i=e.split("?")[0];return b._loading[i]||(b._loading[i]=new Promise((i,s)=>{const n=document.createElement("script");n.onload=i,n.onerror=s,n.src=e,n.type="module"===t?"module":"text/javascript","module"!==t&&void 0!==GLSR.captcha.urls.module&&n.setAttribute("nomodule",""),n.setAttribute("async",""),n.setAttribute("defer",""),document.head.append(n)})),b._loading[i]}render(e){if(this.Form.form.onsubmit=null,this.containerEl&&!this.isWidgetLoaded())if(void 0===window[this.captcha])this.loaded?this._retry_render(e=>this.render(e),e):this.load(GLSR.captcha.urls.module,"module").then(()=>{this.load(GLSR.captcha.urls.nomodule,"nomodule")}).then(()=>this.loaded=!0).then(()=>this._retry_render(e=>this.render(e),e)).catch(e=>console.error(e));else{this.reset(),this._buildContainer();try{this["render_"+GLSR.captcha.type]()}catch(e){this.captchaEl.dataset.error=1,console.error(e)}}}render_friendlycaptcha(){this.widget=new window[this.captcha].WidgetInstance(this.captchaEl,{doneCallback:e=>this.token=e,errorCallback:e=>{console.error(e),this.captchaEl.dataset.error=1}})}render_friendlycaptcha_v2(){this.widget=window[this.captcha].createWidget({element:this.captchaEl,sitekey:GLSR.captcha.sitekey,startMode:"focus",theme:GLSR.captcha.theme}),this.captchaEl.addEventListener("frc:widget.complete",e=>{this.token=e?.detail?.response}),this.captchaEl.addEventListener("frc:widget.error",e=>{console.error(e),this.captchaEl.dataset.error=1})}render_hcaptcha(e){void 0!==window[this.captcha]?.render?this.widget=window[this.captcha].render(this.captchaEl,{callback:e=>this.token=e,"chalexpired-callback":()=>this.reset(),"close-callback":()=>this.Form.button.loaded(),"error-callback":()=>this.captchaEl.dataset.error=1,"expired-callback":()=>this.reset()}):this._retry_render(e=>this.render_hcaptcha(e),e)}render_procaptcha(){this.widget=window[this.captcha].render(this.captchaEl,{callback:e=>this.token=e,captchaType:GLSR.captcha.captcha_type,language:GLSR.captcha.language,siteKey:GLSR.captcha.sitekey,theme:GLSR.captcha.theme,"chalexpired-callback":()=>this.reset(),"close-callback":()=>this.Form.button.loaded(),"error-callback":()=>this.captchaEl.dataset.error=1,"expired-callback":()=>this.reset()})||1}render_recaptcha_v2_invisible(){this.render_recaptcha_v3()}render_recaptcha_v3(e){void 0!==window[this.captcha]?.render?this.widget=window[this.captcha].render(this.captchaEl,{callback:e=>this._submitFormWithToken(e),"error-callback":()=>this.captchaEl.dataset.error=1,"expired-callback":()=>this.reset(),isolated:!0}):this._retry_render(e=>this.render_recaptcha_v3(e),e)}render_turnstile(){this.widget=window[this.captcha].render(this.captchaEl,{action:"submit_review",callback:e=>this.token=e,"error-callback":()=>this.captchaEl.dataset.error=1,"expired-callback":()=>this.reset(),language:GLSR.captcha.language,sitekey:GLSR.captcha.sitekey,theme:GLSR.captcha.theme})}reset(){this.token=null,this.captchaEl&&(this.captchaEl.dataset.error=0),this.isWidgetLoaded()&&(["friendlycaptcha","friendlycaptcha_v2"].includes(GLSR.captcha.type)?this.widget.reset():window[this.captcha].reset(this.widget))}_buildContainer(){["friendlycaptcha","friendlycaptcha_v2"].includes(GLSR.captcha.type)&&this.isWidgetLoaded()&&this.widget.destroy(),Array.from(this.containerEl.getElementsByClassName(GLSR.captcha.class)).forEach(e=>e.remove()),this.captchaEl=g("div",{class:GLSR.captcha.class,"data-badge":GLSR.captcha.badge,"data-captcha-type":GLSR.captcha.captcha_type,"data-lang":GLSR.captcha.language,"data-isolated":!0,"data-sitekey":GLSR.captcha.sitekey,"data-size":GLSR.captcha.size,"data-theme":GLSR.captcha.theme,"data-type":GLSR.captcha.type}),this.containerEl.appendChild(this.captchaEl)}_retry_execute(e,t){if(void 0===t&&(t=1e4),t<=0)return console.warn("Site Reviews: captcha execute timed out"),this.captchaEl&&(this.captchaEl.dataset.error=1),void this.Form.submitForm();setTimeout(()=>e(t-100),100)}_retry_render(e,t){void 0===t&&(t=1e4),t<=0?console.warn("Site Reviews: captcha render timed out"):setTimeout(()=>e(t-100),100)}_submitFormWithToken(e){this.Form.form[GLSR.captcha.token_field]&&e&&(this.Form.form[GLSR.captcha.token_field].value=e),this.Form.submitForm()}}b._loading={};const E=(e,t,i=400,s={delay:0,direction:"normal",easing:"cubic-bezier(0.54,1.5,0.38,1.11)",endDelay:0,fill:"forwards",iterations:1})=>new Promise(n=>{t.animate([{opacity:"in"===e?0:1},{opacity:"in"===e?1:0}],{duration:i,...s}).onfinish=()=>n()}),L=(e,t,i)=>{e&&t.split(" ").forEach(t=>e.classList[i?"add":"remove"](t))},S=e=>"."+e.trim().split(" ").join("."),x=(e,t=200)=>{let i=null;return(...s)=>{clearTimeout(i),i=setTimeout(e,t,...s)}},k=e=>{try{return[null,JSON.parse(e)]}catch(t){return[t,e]}},R={contains:(e,t)=>e.includes(t),equals:(e,t)=>{if(Array.isArray(e)){let i=t.split(/\s*(?:,|$)\s*/);return e.sort().toString()===i.sort().toString()}return G(t)?F(e)===+t:String(e)===String(t)},greater:(e,t)=>!!G(t)&&F(e)>+t,less:(e,t)=>!!G(t)&&F(e)<+t,not:(e,t)=>!R.equals(e,t)},T=e=>String(e.getAttribute("type")||e.nodeName).toLowerCase(),F=e=>isNaN(e)?e.length:+e,G=e=>!isNaN(parseInt(e));class A{constructor(e){this.config=GLSR.validation_config,this.elements=Array.from(e.form.elements),this.event=this.onChange.bind(this),this.Form=e}init(){this.eventListeners("add"),this.elements.forEach(e=>e.conditions={criteria:"always",observes:[],triggers:[]}),this._setConditionObserves(),this._setConditionTriggers()}destroy(){this.eventListeners("remove"),this.elements.forEach(e=>delete e.conditions)}eventListeners(e){this.elements.forEach(t=>t[e+"EventListener"](this.eventName(t),this.event))}eventName(e){return["radio","checkbox","select"].includes(T(e))?"change":"input"}onChange(e){e.currentTarget.conditions.triggers.forEach(e=>{let t=[];e.conditions.observes.forEach(e=>t.push(this.test(e))),t=t.filter(e=>e);const i=t.length===e.conditions.observes.length,s=t.length&&"any"===e.conditions.criteria,n=e.closest(S(this.config.field));i||s?(n.classList.remove(this.config.field_hidden),this.Form.validation.initField(e)):(e.validation&&this.Form.validation.destroyField(e.validation),this.resetValue(e),n.classList.add(this.config.field_hidden))})}resetValue(e){const t=T(e);if("select"===t)Array.from(e.options).forEach(e=>e.selected=e.defaultSelected);else if(["checkbox","radio"].includes(t)){let t=this.Form.form.elements[e.name];Array.from(t.length?t:[t]).forEach(e=>e.checked=e.defaultChecked)}else e.value=e.defaultValue||"";e.dispatchEvent(new Event(this.eventName(e)))}test(e){return!R.hasOwnProperty(e.operator)||R[e.operator](this.value(e.el),e.value)}value(e){const t=e.getAttribute("name"),i=T(e),s=this.Form.form.elements[t];return"radio"===i?s.value:["checkbox","select"].includes(i)?Array.from(s.length?s:[s]).filter(e=>e["checkbox"===i?"checked":"selected"]).map(e=>e.value):new String(e.value)}_setConditionObserves(){this.elements.filter(e=>e.dataset.conditions).forEach(e=>{let[t,i]=k(e.dataset.conditions);null===t&&i?.conditions?.length&&(i.conditions.forEach(t=>{const i=this.elements.filter(e=>e.closest(`[data-field="${t.name}"]`)).shift();i&&e.conditions.observes.push({el:i,...t})}),e.conditions.observes.length&&(e.conditions.criteria=i.criteria))})}_setConditionTriggers(){this.elements.forEach(e=>{this.elements.filter(e=>e.dataset.conditions).forEach(t=>{t.conditions.observes.forEach(i=>{i.el.getAttribute("name")===e.getAttribute("name")&&e.conditions.triggers.push(t)})})})}}const N=e=>"checkbox"===e.type?e.name+e.value:e.name,M=e=>sessionStorage.setItem(N(e.target),e.target.value);class O{constructor(e){this.fields=[],e.classList.contains("glsr-persist-data")&&[...e.elements].forEach(e=>{e.disabled||e.readonly||["file","hidden","password","submit"].includes(e.type)||!["input","select","textarea"].includes(e.localName)||this.fields.push(e)})}clear(){this.fields.length&&sessionStorage.clear()}destroy(){this.fields.forEach(e=>(e=>e.removeEventListener("change",M))(e))}init(){this.fields.forEach(e=>{(e=>{const t=sessionStorage.getItem(N(e));null!==t&&(["checkbox","radio"].includes(e.type)?e.checked=e.value===t:e.value=t,e.dispatchEvent(new Event("change")))})(e),(e=>{e.addEventListener("change",M)})(e)})}}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}(e.prototype,t),e}var q={classNames:{active:"gl-active",base:"gl-star-rating",selected:"gl-selected"},clearable:!0,maxStars:10,prebuilt:!1,stars:null,tooltip:"Select a Rating"},P=function(e,t,i){e.classList[t?"add":"remove"](i)},H=function(e){var t=document.createElement("span");for(var i in e=e||{})t.setAttribute(i,e[i]);return t},D=function(e,t,i){var s=H(i);return e.parentNode.insertBefore(s,t?e.nextSibling:e),s},$=function e(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];var n={};return i.forEach(function(t){Object.keys(t||{}).forEach(function(s){if(void 0!==i[0][s]){var r=t[s];"Object"!==I(r)||"Object"!==I(n[s])?n[s]=r:n[s]=e(n[s],r)}})}),n},I=function(e){return{}.toString.call(e).slice(8,-1)},V=function(){function e(t,i){var s,n,r;C(this,e),this.direction=window.getComputedStyle(t,null).getPropertyValue("direction"),this.el=t,this.events={change:this.onChange.bind(this),keydown:this.onKeyDown.bind(this),mousedown:this.onPointerDown.bind(this),mouseleave:this.onPointerLeave.bind(this),mousemove:this.onPointerMove.bind(this),reset:this.onReset.bind(this),touchend:this.onPointerDown.bind(this),touchmove:this.onPointerMove.bind(this)},this.indexActive=null,this.indexSelected=null,this.props=i,this.tick=null,this.ticking=!1,this.values=function(e){var t=[];return[].forEach.call(e.options,function(e){var i=parseInt(e.value,10)||0;i>0&&t.push({index:e.index,text:e.text,value:i})}),t.sort(function(e,t){return e.value-t.value})}(t),this.widgetEl=null,this.el.widget&&this.el.widget.destroy(),s=this.values.length,n=1,r=this.props.maxStars,/^\d+$/.test(s)&&n<=s&&s<=r?this.build():this.destroy()}return j(e,[{key:"build",value:function(){this.destroy(),this.buildWidget(),this.selectValue(this.indexSelected=this.selected(),!1),this.handleEvents("add"),this.el.widget=this}},{key:"buildWidget",value:function(){var e=this,t=null,i=null;this.props.prebuilt&&(t=this.el.parentNode,i=t.querySelector("."+this.props.classNames.base+"--stars")),null===i&&((t=D(this.el,!1,{class:this.props.classNames.base})).appendChild(this.el),i=D(this.el,!0,{class:this.props.classNames.base+"--stars"}),this.values.forEach(function(t,s){var n=H({"data-index":s,"data-value":t.value});"function"==typeof e.props.stars&&e.props.stars.call(e,n,t,s),[].forEach.call(n.children,function(e){return e.style.pointerEvents="none"}),i.innerHTML+=n.outerHTML})),t.dataset.starRating="",t.classList.add(this.props.classNames.base+"--"+this.direction),this.props.tooltip&&i.setAttribute("role","tooltip"),this.widgetEl=i}},{key:"changeIndexTo",value:function(e,t){var i=this;if(this.indexActive!==e||t){if([].forEach.call(this.widgetEl.children,function(t,s){P(t,s<=e,i.props.classNames.active),P(t,s===i.indexSelected,i.props.classNames.selected)}),this.widgetEl.setAttribute("data-rating",e+1),"function"==typeof this.props.stars||this.props.prebuilt||(this.widgetEl.classList.remove("s"+10*(this.indexActive+1)),this.widgetEl.classList.add("s"+10*(e+1))),this.props.tooltip){var s,n=e<0?this.props.tooltip:null===(s=this.values[e])||void 0===s?void 0:s.text;this.widgetEl.setAttribute("aria-label",n)}this.indexActive=e}this.ticking=!1}},{key:"destroy",value:function(){this.indexActive=null,this.indexSelected=this.selected();var e=this.el.parentNode;e.classList.contains(this.props.classNames.base)&&(this.props.prebuilt?(this.widgetEl=e.querySelector("."+this.props.classNames.base+"--stars"),e.classList.remove(this.props.classNames.base+"--"+this.direction),delete e.dataset.starRating):e.parentNode.replaceChild(this.el,e),this.handleEvents("remove")),delete this.el.widget}},{key:"eventListener",value:function(e,t,i,s){var n=this;i.forEach(function(i){return e[t+"EventListener"](i,n.events[i],s||!1)})}},{key:"handleEvents",value:function(e){var t=this.el.closest("form");t&&"FORM"===t.tagName&&this.eventListener(t,e,["reset"]),this.eventListener(this.el,e,["change"]),"add"===e&&this.el.disabled||(this.eventListener(this.el,e,["keydown"]),this.eventListener(this.widgetEl,e,["mousedown","mouseleave","mousemove","touchend","touchmove"],!1))}},{key:"indexFromEvent",value:function(e){var t,i,s=(null===(t=e.touches)||void 0===t?void 0:t[0])||(null===(i=e.changedTouches)||void 0===i?void 0:i[0])||e,n=document.elementFromPoint(s.clientX,s.clientY);return n.parentNode===this.widgetEl?[].slice.call(n.parentNode.children).indexOf(n):this.indexActive}},{key:"onChange",value:function(){this.changeIndexTo(this.selected(),!0)}},{key:"onKeyDown",value:function(e){var t=e.key.slice(5);if(~["Left","Right"].indexOf(t)){e.preventDefault();var i="Left"===t?-1:1;"rtl"===this.direction&&(i*=-1);var s=this.values.length-1,n=Math.min(Math.max(this.selected()+i,-1),s);this.selectValue(n,!0)}}},{key:"onPointerDown",value:function(e){e.preventDefault();var t=this.indexFromEvent(e);this.props.clearable&&t===this.indexSelected&&(t=-1),this.selectValue(t,!0)}},{key:"onPointerLeave",value:function(e){var t=this;e.preventDefault(),cancelAnimationFrame(this.tick),requestAnimationFrame(function(){return t.changeIndexTo(t.indexSelected)})}},{key:"onPointerMove",value:function(e){var t=this;e.preventDefault(),this.ticking||(this.tick=requestAnimationFrame(function(){return t.changeIndexTo(t.indexFromEvent(e))}),this.ticking=!0)}},{key:"onReset",value:function(){var e,t=this.valueIndex(null===(e=this.el.querySelector("[selected]"))||void 0===e?void 0:e.value);this.selectValue(t||-1,!1)}},{key:"selected",value:function(){return this.valueIndex(this.el.value)}},{key:"selectValue",value:function(e,t){var i;this.el.value=(null===(i=this.values[e])||void 0===i?void 0:i.value)||"",this.indexSelected=this.selected(),!1===t?this.changeIndexTo(this.selected(),!0):this.el.dispatchEvent(new Event("change"))}},{key:"valueIndex",value:function(e){return this.values.findIndex(function(t){return t.value===+e})}}]),e}(),W=function(){function e(t,i){C(this,e),this.destroy=this.destroy.bind(this),this.props=i,this.rebuild=this.rebuild.bind(this),this.selector=t,this.widgets=[],this.build()}return j(e,[{key:"build",value:function(){var e=this;this.queryElements(this.selector).forEach(function(t){var i=$(q,e.props,JSON.parse(t.getAttribute("data-options")));"SELECT"!==t.tagName||t.widget||(!i.prebuilt&&t.parentNode.classList.contains(i.classNames.base)&&e.unwrap(t),e.widgets.push(new V(t,i)))})}},{key:"destroy",value:function(){this.widgets.forEach(function(e){return e.destroy()}),this.widgets=[]}},{key:"queryElements",value:function(e){return"HTMLSelectElement"===I(e)?[e]:"NodeList"===I(e)?[].slice.call(e):"String"===I(e)?[].slice.call(document.querySelectorAll(e)):[]}},{key:"rebuild",value:function(){this.destroy(),this.build()}},{key:"unwrap",value:function(e){var t=e.parentNode,i=t.parentNode;i.insertBefore(e,t),i.removeChild(t)}}]),e}();const J={classNames:{base:"glsr-star-rating"},clearable:!1,tooltip:!1};const Y=["required","max","maxlength","min","minlength","pattern"],K=e=>{const t=e.getAttribute("name");return e.validation.form.querySelectorAll(`input[name="${t}"]:checked`).length},B={email:{fn:function(e){return!e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}},max:{fn:function(e,t){return!e||("checkbox"===this.type?K(this)<=parseInt(t):parseFloat(e)<=parseFloat(t))}},maxlength:{fn:function(e,t){return!e||e.length<=parseInt(t)}},min:{fn:function(e,t){return!e||("checkbox"===this.type?K(this)>=parseInt(t):parseFloat(e)>=parseFloat(t))}},minlength:{fn:function(e,t){return!e||e.length>=parseInt(t)}},number:{fn:function(e){return!e||!isNaN(parseFloat(e))},priority:2},pattern:{fn:function(e,t){let i=t.match(new RegExp("^/(.*?)/([gimy]*)$"));return!e||new RegExp(i[1],i[2]).test(e)}},required:{fn:function(e){return~["checkbox","radio"].indexOf(this.type)?K(this):null!=e&&String(e).replace(/\s/g,"").length>0},priority:99,halt:!0},tel:{fn:function(e){let t=e.replace(/[^0-9]/g,"").length;return!e||4<=t&&15>=t&&new RegExp("^[+]?[\\d\\s()-]*$").test(e)}},url:{fn:function(e){return!e||new RegExp("^(https?)://([\\p{L}\\p{N}\\p{S}\\-_.])+(.?([\\p{L}\\p{N}]|xn--[\\p{L}\\p{N}\\-]+)+.?)(:[0-9]+)?(?:/(?:[\\p{L}\\p{N}\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*(?:\\?(?:[\\p{L}\\p{N}\\-._~!$&'\\[\\]()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?(?:#(?:[\\p{L}\\p{N}\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?$","iu").test(e)}}};class z{constructor(e){this.config=GLSR.validation_config,this.event=this._onChange.bind(this),this.fields=[],this.form=e,this.form.setAttribute("novalidate",""),this.strings=GLSR.validation_strings}destroy(){for(;this.fields.length;)this.destroyField(this.fields[0])}destroyField(e){this.resetField(e),this._eventListener("remove",e.input),delete e.input.validation,this.fields=this.fields.filter(t=>t.input!==e.input)}init(){this.form.querySelectorAll("input:not([type=hidden]):not([type=submit]), select, textarea, [data-glsr-validate]").forEach(e=>this.initField(e))}initField(e){if(this.fields.find(t=>t.input.name===e.name&&"radio"!==e.type&&!e.name.endsWith("[]")))return;const t=e.closest(S(this.config.field));t?.offsetParent&&this.fields.push(this._initField(e))}reset(){this.fields.forEach(e=>this.resetField(e))}resetField(e){let t=e.input.closest(S(this.config.field));L(e.input,this.config.input_error,!1),L(e.input,this.config.input_valid,!1),t&&(L(t,this.config.field_error,!1),L(t,this.config.field_valid,!1)),e.errors=[]}setErrors(e,t){e.hasOwnProperty("validation")||this._initField(e),e.validation.errors=t}setInvalid(e){this.toggleError(e,!0)}setValid(e){this.toggleError(e,!1)}toggleError(e,t){let i=e.input.closest(S(this.config.field)),s=[e.input];if(e?.input?.form instanceof HTMLFormElement&&(s=e.input.form.querySelectorAll(`[name="${e.input.name}"]`)),s.forEach(e=>{L(e,this.config.input_error,t),L(e,this.config.input_valid,!t)}),i){L(i,this.config.field_error,t),L(i,this.config.field_valid,!t);let s=i.querySelector(S(this.config.field_message));s&&(s.innerHTML=t?e.errors.join("<br>"):"",s.style.display=t?"":"none")}}validate(e){let t=!0,i=this.fields;return e instanceof HTMLElement&&e.hasOwnProperty("validation")&&(i=[e.validation]),i.forEach(e=>{this._validateField(e)?this.toggleError(e,!1):(this.toggleError(e,!0),t=!1)}),t}_addValidators(e,t,i){[].forEach.call(e,e=>{let s=e.name.replace("data-","");~Y.indexOf(s)?this._addValidatorToField(t,i,s,e.value):"type"===e.name&&this._addValidatorToField(t,i,e.value)})}_addValidatorToField(e,t,i,s){if(B.hasOwnProperty(i)&&(B[i].name=i,e.push(B[i]),s)){let e="pattern"===i?[s]:s.split(",");e.unshift(null),t[i]=e}}_eventListener(e,t){const i=t.getAttribute("type")||t.nodeName,s=~["radio","checkbox","SELECT"].indexOf(i)?"change":"input";t[e+"EventListener"](s,this.event)}_onChange(e){this.validate(e.currentTarget)}_initField(e){let t={},i=[];return null!==e.offsetParent&&(this._addValidators(e.attributes,i,t),this._sortValidators(i),this._eventListener("add",e)),e.validation={form:this.form,input:e,params:t,validate:()=>this.validate(e),validators:i}}_sortValidators(e){e.sort((e,t)=>(t.priority||1)-(e.priority||1))}_validateField(e){let t=[],i=!0;for(let s in e.validators){if(!e.validators.hasOwnProperty(s))continue;let n=e.validators[s],r=e.params[n.name]?e.params[n.name]:[];if(r[0]=e.input.value,!n.fn.apply(e.input,r)){i=!1;let e=this.strings[n.name];if(t.push(e.replace(/(\%s)/g,r[1])),!0===n.halt)break}}return e.errors=t,i}}class X{constructor(e,t){this.button=w(t),this.config=GLSR.validation_config,this.events={reset:this._onReset.bind(this),submit:this._onSubmit.bind(this)},this.form=e,this.isActive=!1,this.stars=(()=>{let e=null;const t=()=>!!e&&(e.rebuild(),!0);return{init:(i,s={})=>(t()||(e=new W(i,Object.assign({},J,s))),e),destroy:()=>!!e&&(e.destroy(),!0),rebuild:t}})(),this.strings=GLSR.validation_strings,this.captcha=new b(this),this.conditions=new A(this),this.validation=new z(e),this.reviewsEl=document.getElementById(e.closest(".glsr")?.dataset?.reviews_id),this.session=new O(e),this.summaryEl=document.getElementById(e.closest(".glsr")?.dataset?.summary_id)}destroy(){this._destroyForm(),this.stars.destroy(),this.captcha.reset(),this.isActive=!1}init(){this.isActive||(this._initForm(),this.stars.init(this.form.querySelectorAll(".glsr-field-rating select"),GLSR.stars_config),this.captcha.render(),this.isActive=!0)}submitForm(){this.button.loading(),GLSR.ajax.post(this._data(),this._handleResponse.bind(this))}_data(){const e=new FormData(this.form),t={_reviews_atts:this.reviewsEl,_summary_atts:this.summaryEl};this.reviewsEl&&(e.append([`${GLSR.nameprefix}[_pagination_atts][page]`],1),e.append([`${GLSR.nameprefix}[_pagination_atts][url]`],location.href));for(let i in t)if(t[i])try{const s=JSON.parse(JSON.stringify(t[i].dataset));for(let t of Object.keys(s)){let n;try{n=JSON.parse(s[t])}catch(e){n=s[t]}e.append(`${GLSR.nameprefix}[${i}][${t}]`,n)}}catch(e){console.error(e)}return e}_destroyForm(){this.form.removeEventListener("reset",this.events.reset),this.form.removeEventListener("submit",this.events.submit),this._resetErrors(),this.conditions.destroy(),this.session.destroy(),this.validation.destroy()}_handleResponse(e,t){const i=!0===t&&void 0!==e;if(this.captcha.reset(),i&&(this.form.reset(),this.session.clear()),this._showFieldErrors(e?.errors),this._showResults(e?.message,i),this.button.loaded(),GLSR.Event.trigger("site-reviews/form/handle",e,this.form),i){if(e.redirect&&""!==e.redirect)return void(window.location=e.redirect);if(this.reviewsEl&&e.reviews&&(this.reviewsEl.innerHTML=e.reviews,GLSR.url_parameter)){let e=new URL(location.href);e.searchParams.delete(GLSR.url_parameter),window.history.replaceState({},"",e.toString())}this.summaryEl&&e.summary&&(this.summaryEl.innerHTML=e.summary),GLSR.Event.trigger("site-reviews/init")}}_initForm(){this._destroyForm(),this.form.addEventListener("reset",this.events.reset),this.form.addEventListener("submit",this.events.submit),this.conditions.init(),this.session.init(),this.validation.init()}_onReset(e){this.conditions.destroy(),this.conditions.init()}_onSubmit(e){if(!this.validation.validate())return e.preventDefault(),void this._showResults(this.strings.errors,!1);e.preventDefault(),this._resetErrors(),this.button.loading(),this.captcha.execute()}_resetErrors(){L(this.form,this.config.form_error,!1),this._showResults("",null),this.validation.reset()}_showFieldErrors(e){if(e)for(let t in e){if(!e.hasOwnProperty(t))continue;const i=GLSR.nameprefix?GLSR.nameprefix+"["+t+"]":t,s=this.form.querySelector('[name="'+i+'"]');s&&(this.validation.setErrors(s,e[t]),this.validation.toggleError(s.validation,"add"))}}_showResults(e,t){if(!e)return;const i=this.form.querySelector(S(this.config.form_message));null!==i&&(L(this.form,this.config.form_error,!1===t),L(i,this.config.form_message_failed,!1===t),L(i,this.config.form_message_success,!0===t),i.innerHTML=e)}}const U=["[contenteditable]",'[tabindex]:not([tabindex^="-"])',"a[href]","button:not([disabled]):not([aria-hidden])",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])"],Q={focus:!1,onClose:()=>{},onOpen:()=>{}},Z="data-glsr-close",ee="glsr-modal",te="is-open",ie="data-glsr-trigger",se=(e,t={})=>(t.class=ee+"__"+e,t);class ne{constructor(e,t={}){this.events={_open:this._openModal.bind(this),mouseup:this._onClick.bind(this),keydown:this._onKeydown.bind(this),touchstart:this._onClick.bind(this)},this.id=e,this.triggers=[],this._config(t),this._reset()}header(e,t){return this._insertHtml(this.dom.header,e,t)}content(e,t){return this._insertHtml(this.dom.content,e,t)}footer(e,t){return this._insertHtml(this.dom.footer,e,t)}_closeModal(e=null){if(!re.open.includes(this.id))return;e&&(e.preventDefault(),e.stopPropagation());const t=()=>{this.root.removeEventListener("animationend",t,!1),this.root.classList.remove(te),re.open.pop(),this.config.onClose(this,e),GLSR.Event.trigger("site-reviews/modal/close",this,e),x(()=>this._reset())()};this.root.addEventListener("animationend",t,!1),this.root.setAttribute("aria-hidden","true"),this._eventHandler("remove"),document.documentElement.classList.remove("glsr-modal-open"),this.trigger&&this.trigger.focus&&this.trigger.focus()}_config(e){return this.config=Object.assign({},Q,e),this}_eventHandler(e){this._eventListener(this.dom.close,e,["keydown"]),this._eventListener(this.root,e,["mouseup","touchstart"]),this._eventListener(document,e,["keydown"])}_eventListener(e,t,i){e&&i.forEach(i=>e[t+"EventListener"](i,this.events[i]))}_focusableNodes(){return this.root?Array.from(this.root.querySelectorAll(U)):[]}_insertHtml(e,t=null,i={}){if(e&&null!==t){if(""!==t){const e=g("div",i);e.innerHTML=t,t=e.outerHTML}e.innerHTML=t}return e}_insertModal(){const e=g("button",se("close",{"aria-label":GLSR.text.close_modal,"data-glsr-close":""})),t=g("div",se("content",{tabindex:-1})),i=g("div",se("header")),s=g("div",se("footer")),n=g("div",se("body"),g("div",se("inner"),t)),r=g("div",se("dialog",{"aria-modal":!0,role:"dialog"}),e,i,n,s),a=g("div",{class:ee,id:this.id,"aria-hidden":!0},g("div",se("overlay",{tabindex:-1,"data-glsr-close":""}),r));this.dom={...this.dom,body:n,close:e,content:t,dialog:r,footer:s,header:i};const o=document.querySelector("body > #page.site")??document.body;this.root=o.appendChild(a)}_onClick(e){e.target.hasAttribute(Z)&&this._closeModal(e)}_onKeydown(e){[13,32].includes(e.keyCode)&&e.target===this.dom.close&&this._closeModal(e),27===e.keyCode&&re.open.slice(-1)[0]===this.id&&this._closeModal(e),9===e.keyCode&&this._retainFocus(e)}_openModal(e){re.open.push(this.id),this.trigger=document.activeElement,e&&(e.preventDefault(),this.trigger=e.currentTarget),this._insertModal();const t=this.trigger.closest(".glsr");t&&(this.root.style.fontSize=getComputedStyle(t).fontSize),document.documentElement.classList.add("glsr-modal-open"),this.config.onOpen(this,e),GLSR.Event.trigger("site-reviews/modal/open",this,e),this.root.setAttribute("aria-hidden","false"),this.root.classList.add(te),this._eventHandler("add");const i=()=>{this.root.removeEventListener("animationend",i,!1),this._setFocusToFirstNode()};this.root.addEventListener("animationend",i,!1)}_registerTrigger(e){this._removeTrigger(e),e.addEventListener("click",this.events._open),this.triggers.push(e)}_removeTrigger(e){this.triggers=this.triggers.filter(t=>t!==e),e.removeEventListener("click",this.events._open)}_removeTriggers(){this.triggers.forEach(e=>this._removeTrigger(e)),this.triggers=[]}_reset(){this.dom={close:null,content:null,footer:null,header:null},this.root&&this.root.remove(),this.root=null,this.trigger=null}_retainFocus(e){let t=this._focusableNodes();if(0!==t.length)if(t=t.filter(e=>null!==e.offsetParent),this.root.contains(document.activeElement)){const i=t.indexOf(document.activeElement);e.shiftKey&&0===i?(t[t.length-1].focus(),e.preventDefault()):!e.shiftKey&&t.length>0&&i===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}_setFocusToFirstNode(){if(!this.config.focus)return;const e=this._focusableNodes();if(0===e.length)return;const t=e.filter(e=>!e.hasAttribute(Z));t.length>0?t[0].focus():0===t.length&&e[0].focus()}}const re={active:{},open:[]};var ae={close:e=>{if(e)re.active[e]&&re.active[e]._closeModal();else for(let e in re.active)re.active[e]._closeModal()},init:(e,t)=>{let i;return re.active[e]?(i=re.active[e],i._removeTriggers(),t&&i._config(t)):i=new ne(e,t),document.querySelectorAll(`[${ie}]`).forEach(t=>{e===t.getAttribute(ie)&&i._registerTrigger(t)}),re.active[e]=i,re.active},modals:re,modify:(e,t)=>{e&&re.active[e]&&t(re.active[e])},open:(e,t)=>{let i;re.active[e]?(i=re.active[e],i.root&&i._eventHandler("remove"),t&&i._config(t)):i=new ne(e,t),re.active[e]=i,i._openModal()}};const oe="glsr-hide",le=16,ce=468,he="button.glsr-button-loadmore",de=".glsr-pagination a[data-page]",ue=".glsr-reviews, [data-reviews]";class pe{constructor(e,t){this.events={button:{click:this._onLoadMore.bind(this)},link:{click:this._onPaginate.bind(this)},window:{popstate:this._onPopstate.bind(this)}},this.paginationEl=t,this.reviewsEl=e.querySelector(ue),this.wrapperEl=e}destroy(){this._eventHandler("remove")}init(){this._eventHandler("add");const e=this.paginationEl.querySelector(".current");if(e){const t=this._data(e),i=e.nextElementSibling;t&&i&&2===+i.dataset.page&&GLSR.url_parameter&&window.history.replaceState(t,"",window.location)}}_data(e){try{const i=JSON.parse(JSON.stringify(this.paginationEl.dataset)),s={page:e.dataset.page||1,schema:!1,url:e.href||location.href};for(var t of Object.keys(i)){let e;try{e=JSON.parse(i[t])}catch(s){e=i[t]}s[`atts][${t}`]=e}return GLSR.ajax.data("fetch-paged-reviews",s)}catch(e){return console.error("Invalid pagination config."),!1}}_eventHandler(e){this._eventListener(window,e,this.events.window),this.wrapperEl.querySelectorAll(he).forEach(t=>{this._eventListener(t,e,this.events.button)}),this.wrapperEl.querySelectorAll(de).forEach(t=>{this._eventListener(t,e,this.events.link)})}_eventListener(e,t,i){Object.keys(i).forEach(s=>e[t+"EventListener"](s,i[s]))}_handleLoadMore(e,t,i,s){if(!s)return void(window.location=location);e.loaded();const n=Number(e.el.dataset.page)+1;e.el.dataset.page=n,i.max_num_pages<=n&&(this.paginationEl.innerHTML=""),this.reviewsEl.insertAdjacentHTML("beforeend",i.reviews),GLSR.Event.trigger("site-reviews/pagination/handle",i,this)}_handlePagination(e,t,i,s){s?(this._paginate(i),GLSR.url_parameter&&window.history.pushState(t,"",e.href)):window.location=e.href}_handlePopstate(e,t,i){i?this._paginate(t):console.error(t)}_loaded(){const e=this.paginationEl.querySelector(".glsr-spinner");e&&this.paginationEl.removeChild(e),this.wrapperEl.classList.remove(oe)}_loading(){this.wrapperEl.classList.add(oe),this.paginationEl.insertAdjacentHTML("beforeend",'<div class="glsr-spinner"></div>')}_onLoadMore(e){const t=e.currentTarget,i=this._data(t);if(i){const s=w(t);s.loading(),e.preventDefault(),GLSR.ajax.post(i,this._handleLoadMore.bind(this,s,i))}}_onPaginate(e){const t=e.currentTarget,i=this._data(t);i&&(this._loading(),e.preventDefault(),GLSR.ajax.post(i,this._handlePagination.bind(this,t,i)))}_onPopstate(e){GLSR.Event.trigger("site-reviews/pagination/popstate",e,this),e.state&&e.state[`${GLSR.nameprefix}[_action]`]&&(this._loading(),GLSR.ajax.post(e.state,this._handlePopstate.bind(this,e.state)))}_paginate(e){this.destroy(),this.paginationEl.innerHTML=e.pagination,this.reviewsEl.innerHTML=e.reviews,this.init(),this._scrollToTop(),this._loaded(),GLSR.Event.trigger("site-reviews/pagination/handle",e,this)}_scrollStep(e){const t=Math.min(1,(window.performance.now()-e.startTime)/ce),i=.5*(1-Math.cos(Math.PI*t)),s=e.startY+(e.endY-e.startY)*i;window.scroll(0,e.offset+s),s!==e.endY&&window.requestAnimationFrame(this._scrollStep.bind(this,e))}_scrollToTop(){let e=le;[].forEach.call(GLSR.ajax_pagination,t=>{const i=document.querySelector(t);i&&"fixed"===window.getComputedStyle(i).getPropertyValue("position")&&(e+=i.clientHeight)});const t=this.reviewsEl.getBoundingClientRect().top-e;t>0||this._scrollStep({endY:t,offset:window.pageYOffset,startTime:window.performance.now(),startY:this.reviewsEl.scrollTop})}}const fe="block:site-reviews/form",ge="block:site-reviews/review",me="block:site-reviews/reviews",ve="site-reviews/excerpts/init",ye="site-reviews/forms/init",_e="site-reviews/init",we="site-reviews/loaded",be="site-reviews/modal/init",Ee="site-reviews/pagination/init",Le=e=>{new _(e),h.trigger(be)},Se=()=>{GLSR.forms=GLSR.forms.filter(e=>!!e.form.closest("body")),document.querySelectorAll("form.glsr-review-form").forEach(e=>{const t=e.querySelector("[type=submit]");if(t){let i,s=GLSR.forms.findIndex(t=>t.form===e);-1!==s?(i=GLSR.forms[s],i.destroy()):(i=new X(e,t),GLSR.forms.push(i)),i.init()}})},xe=()=>{GLSR.Modal.init("glsr-modal-review",{onOpen:e=>{const t=e.trigger.closest(".glsr"),i=t.cloneNode(!0),s=e.trigger.closest(".glsr-review").cloneNode(!0);s.querySelectorAll('[data-expanded="false"]').forEach(e=>e.dataset.expanded="true"),s.removeAttribute("id"),i.innerHTML="",i.removeAttribute("id"),i.appendChild(s);const n=GLSR.modal_wrapped_by.includes(i.dataset.from)?g("div",{class:t.parentElement.className,id:t.parentElement.parentElement.id,style:t.parentElement.style.cssText},i):i;e.dom.content.appendChild(n)}})},ke=()=>{GLSR.pagination.forEach(e=>e.destroy()),GLSR.pagination=[],document.querySelectorAll(".glsr").forEach(e=>{const t=e.querySelector(".glsr-pagination");if(t&&(t.classList.contains("glsr-ajax-loadmore")||t.classList.contains("glsr-ajax-pagination"))){const i=new pe(e,t);i.init(),GLSR.pagination.push(i)}})},Re=()=>{document.querySelectorAll(".glsr").forEach(e=>{const t="glsr-"+window.getComputedStyle(e,null).getPropertyValue("direction");e.classList.add(t)}),h.trigger(ve),h.trigger(ye),h.trigger(Ee),h.trigger(we)},Te=()=>{h.on(ge,Le),h.on(me,Le),h.on(fe,Se),h.on(ve,Le),h.on(ye,Se),h.on(be,xe),h.on(Ee,ke),h.on(_e,Re),h.on("site-reviews/pagination/handle",(e,t)=>{h.trigger(ve,t.wrapperEl)})};window.hasOwnProperty("GLSR")||(window.GLSR={}),window.GLSR.ajax=a,window.GLSR.forms=[],window.GLSR.pagination=[],window.GLSR.Event=h,window.GLSR.Modal=ae,window.GLSR.Utils={debounce:x,dom:g,fadeIn:async(e,t,i)=>E("in",e,t,i),fadeOut:async(e,t,i)=>E("out",e,t,i),isEmpty:e=>[Object,Array].includes((e||{}).constructor)&&!Object.entries(e||{}).length,parseJson:k,throttle:(e,t=32)=>{let i=null,s=0;return function(...n){const r=Date.now(),a=r-s;if(a>=t)return i&&(clearTimeout(i),i=null),s=r,e.apply(this,n);i||(i=setTimeout(()=>{s=Date.now(),i=null,e.apply(this,n)},t-a))}}},window.GLSR_init=(e,...t)=>{0===Object.keys(h.events).length&&Te(),h.trigger(e||_e,...t)},document.addEventListener("DOMContentLoaded",()=>{Te(),setTimeout(()=>h.trigger(_e),5),setTimeout(()=>(()=>{const e=new URL(location.href),t=Object.fromEntries(e.searchParams);if(!t.review_id)return;const i=t.verified?"verified":"approved",s=["form","review_id","theme","verified"],n=Object.fromEntries(s.filter(e=>e in t).map(e=>[e,t[e]]));s.forEach(t=>e.searchParams.delete(t)),history.replaceState({},"",e),GLSR.ajax.post(GLSR.ajax.data(`${i}-review`,n),(e,t)=>{if(!t)return console.error({request:n,response:e});GLSR.Modal.open(`glsr-modal-${i}`,{onOpen:t=>{t.content(e.review,e.attributes),t.dom.content.querySelectorAll('[data-expanded="false"]').forEach(e=>e.dataset.expanded="true"),e.message&&t.footer(`<p style="margin:0;padding:0;">${e.message}</p>`)}})})})(),10)})}();
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;function l(t){var n=this,i=!1;return e(this).one(c.TRANSITION_END,(function(){i=!0})),setTimeout((function(){i||c.triggerTransitionEnd(n)}),t),this}var c={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var n=e(t).css("transition-duration"),i=e(t).css("transition-delay"),o=parseFloat(n),s=parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],s=e[i],r=s&&c.isElement(s)?"element":null===(a=s)||"undefined"==typeof a?""+a:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(r))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+r+'" but expected type "'+o+'".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};c.jQueryDetection(),e.fn.emulateTransitionEnd=l,e.event.special[c.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var h="alert",u=e.fn[h],d=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=c.getSelectorFromElement(t),i=!1;return n&&(i=document.querySelector(n)),i||(i=e(t).closest(".alert")[0]),i},n._triggerCloseEvent=function(t){var n=e.Event("close.bs.alert");return e(t).trigger(n),n},n._removeElement=function(t){var n=this;if(e(t).removeClass("show"),e(t).hasClass("fade")){var i=c.getTransitionDurationFromElement(t);e(t).one(c.TRANSITION_END,(function(e){return n._destroyElement(t,e)})).emulateTransitionEnd(i)}else this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.alert");o||(o=new t(this),i.data("bs.alert",o)),"close"===n&&o[n](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',d._handleDismiss(new d)),e.fn[h]=d._jQueryInterface,e.fn[h].Constructor=d,e.fn[h].noConflict=function(){return e.fn[h]=u,d._jQueryInterface};var f=e.fn.button,g=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,i=e(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var s=i.querySelector(".active");s&&e(s).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),e(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&e(this._element).toggleClass("active"))},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=t.target,i=n;if(e(n).hasClass("btn")||(n=e(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))t.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"LABEL"===i.tagName&&o&&"checkbox"===o.type&&t.preventDefault(),g._jQueryInterface.call(e(n),"toggle")}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn")[0];e(n).toggleClass("focus",/^focus(in)?$/.test(t.type))})),e(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var s=0,r=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;s<r;s++){var a=t[s];"true"===a.getAttribute("aria-pressed")?a.classList.add("active"):a.classList.remove("active")}})),e.fn.button=g._jQueryInterface,e.fn.button.Constructor=g,e.fn.button.noConflict=function(){return e.fn.button=f,g._jQueryInterface};var m="carousel",p=".bs.carousel",_=e.fn[m],v={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},b={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},y={TOUCH:"touch",PEN:"pen"},E=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=t.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(c.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one("slid.bs.carousel",(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?"next":"prev";this._slide(o,this._items[t])}},n.dispose=function(){e(this._element).off(p),e.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=a(a({},v),t),c.typeCheckConfig(m,t,b),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&e(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&y[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&y[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(e(this._element).on("pointerdown.bs.carousel",(function(t){return n(t)})),e(this._element).on("pointerup.bs.carousel",(function(t){return i(t)})),this._element.classList.add("pointer-event")):(e(this._element).on("touchstart.bs.carousel",(function(t){return n(t)})),e(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),e(this._element).on("touchend.bs.carousel",(function(t){return i(t)})))}},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),s=e.Event("slide.bs.carousel",{relatedTarget:t,direction:n,from:o,to:i});return e(this._element).trigger(s),s},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));e(n).removeClass("active");var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass("active")}},n._slide=function(t,n){var i,o,s,r=this,a=this._element.querySelector(".active.carousel-item"),l=this._getItemIndex(a),h=n||a&&this._getItemByDirection(t,a),u=this._getItemIndex(h),d=Boolean(this._interval);if("next"===t?(i="carousel-item-left",o="carousel-item-next",s="left"):(i="carousel-item-right",o="carousel-item-prev",s="right"),h&&e(h).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(h,s).isDefaultPrevented()&&a&&h){this._isSliding=!0,d&&this.pause(),this._setActiveIndicatorElement(h);var f=e.Event("slid.bs.carousel",{relatedTarget:h,direction:s,from:l,to:u});if(e(this._element).hasClass("slide")){e(h).addClass(o),c.reflow(h),e(a).addClass(i),e(h).addClass(i);var g=parseInt(h.getAttribute("data-interval"),10);g?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=g):this._config.interval=this._config.defaultInterval||this._config.interval;var m=c.getTransitionDurationFromElement(a);e(a).one(c.TRANSITION_END,(function(){e(h).removeClass(i+" "+o).addClass("active"),e(a).removeClass("active "+o+" "+i),r._isSliding=!1,setTimeout((function(){return e(r._element).trigger(f)}),0)})).emulateTransitionEnd(m)}else e(a).removeClass("active"),e(h).addClass("active"),this._isSliding=!1,e(this._element).trigger(f);d&&this.cycle()}},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.carousel"),o=a(a({},v),e(this).data());"object"==typeof n&&(o=a(a({},o),n));var s="string"==typeof n?n:o.slide;if(i||(i=new t(this,o),e(this).data("bs.carousel",i)),"number"==typeof n)i.to(n);else if("string"==typeof s){if("undefined"==typeof i[s])throw new TypeError('No method named "'+s+'"');i[s]()}else o.interval&&o.ride&&(i.pause(),i.cycle())}))},t._dataApiClickHandler=function(n){var i=c.getSelectorFromElement(this);if(i){var o=e(i)[0];if(o&&e(o).hasClass("carousel")){var s=a(a({},e(o).data()),e(this).data()),r=this.getAttribute("data-slide-to");r&&(s.interval=!1),t._jQueryInterface.call(e(o),s),r&&e(o).data("bs.carousel").to(r),n.preventDefault()}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return v}}]),t}();e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",E._dataApiClickHandler),e(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=t.length;n<i;n++){var o=e(t[n]);E._jQueryInterface.call(o,o.data())}})),e.fn[m]=E._jQueryInterface,e.fn[m].Constructor=E,e.fn[m].noConflict=function(){return e.fn[m]=_,E._jQueryInterface};var w="collapse",T=e.fn[w],C={toggle:!0,parent:""},S={toggle:"boolean",parent:"(string|element)"},D=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,o=n.length;i<o;i++){var s=n[i],r=c.getSelectorFromElement(s),a=[].slice.call(document.querySelectorAll(r)).filter((function(e){return e===t}));null!==r&&a.length>0&&(this._selector=r,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var n=t.prototype;return n.toggle=function(){e(this._element).hasClass("show")?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!this._isTransitioning&&!e(this._element).hasClass("show")&&(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(n=null),!(n&&(i=e(n).not(this._selector).data("bs.collapse"))&&i._isTransitioning))){var s=e.Event("show.bs.collapse");if(e(this._element).trigger(s),!s.isDefaultPrevented()){n&&(t._jQueryInterface.call(e(n).not(this._selector),"hide"),i||e(n).data("bs.collapse",null));var r=this._getDimension();e(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[r]=0,this._triggerArray.length&&e(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var a="scroll"+(r[0].toUpperCase()+r.slice(1)),l=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,(function(){e(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[r]="",o.setTransitioning(!1),e(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(l),this._element.style[r]=this._element[a]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass("show")){var n=e.Event("hide.bs.collapse");if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",c.reflow(this._element),e(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var s=0;s<o;s++){var r=this._triggerArray[s],a=c.getSelectorFromElement(r);if(null!==a)e([].slice.call(document.querySelectorAll(a))).hasClass("show")||e(r).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[i]="";var l=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,(function(){t.setTransitioning(!1),e(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(l)}}},n.setTransitioning=function(t){this._isTransitioning=t},n.dispose=function(){e.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(t){return(t=a(a({},C),t)).toggle=Boolean(t.toggle),c.typeCheckConfig(w,t,S),t},n._getDimension=function(){return e(this._element).hasClass("width")?"width":"height"},n._getParent=function(){var n,i=this;c.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',s=[].slice.call(n.querySelectorAll(o));return e(s).each((function(e,n){i._addAriaAndCollapsedClass(t._getTargetFromElement(n),[n])})),n},n._addAriaAndCollapsedClass=function(t,n){var i=e(t).hasClass("show");n.length&&e(n).toggleClass("collapsed",!i).attr("aria-expanded",i)},t._getTargetFromElement=function(t){var e=c.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.collapse"),s=a(a(a({},C),i.data()),"object"==typeof n&&n?n:{});if(!o&&s.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(s.toggle=!1),o||(o=new t(this,s),i.data("bs.collapse",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return C}}]),t}();e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=e(this),i=c.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(i));e(o).each((function(){var t=e(this),i=t.data("bs.collapse")?"toggle":n.data();D._jQueryInterface.call(t,i)}))})),e.fn[w]=D._jQueryInterface,e.fn[w].Constructor=D,e.fn[w].noConflict=function(){return e.fn[w]=T,D._jQueryInterface};var k="dropdown",N=e.fn[k],A=new RegExp("38|40|27"),I={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},O={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},j=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var i=t.prototype;return i.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")){var n=e(this._menu).hasClass("show");t._clearMenus(),n||this.show(!0)}},i.show=function(i){if(void 0===i&&(i=!1),!(this._element.disabled||e(this._element).hasClass("disabled")||e(this._menu).hasClass("show"))){var o={relatedTarget:this._element},s=e.Event("show.bs.dropdown",o),r=t._getParentFromElement(this._element);if(e(r).trigger(s),!s.isDefaultPrevented()){if(!this._inNavbar&&i){if("undefined"==typeof n)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var a=this._element;"parent"===this._config.reference?a=r:c.isElement(this._config.reference)&&(a=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&e(r).addClass("position-static"),this._popper=new n(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===e(r).closest(".navbar-nav").length&&e(document.body).children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass("show"),e(r).toggleClass("show").trigger(e.Event("shown.bs.dropdown",o))}}},i.hide=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")&&e(this._menu).hasClass("show")){var n={relatedTarget:this._element},i=e.Event("hide.bs.dropdown",n),o=t._getParentFromElement(this._element);e(o).trigger(i),i.isDefaultPrevented()||(this._popper&&this._popper.destroy(),e(this._menu).toggleClass("show"),e(o).toggleClass("show").trigger(e.Event("hidden.bs.dropdown",n)))}},i.dispose=function(){e.removeData(this._element,"bs.dropdown"),e(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},i.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},i._addEventListeners=function(){var t=this;e(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},i._getConfig=function(t){return t=a(a(a({},this.constructor.Default),e(this._element).data()),t),c.typeCheckConfig(k,t,this.constructor.DefaultType),t},i._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},i._getPlacement=function(){var t=e(this._element.parentNode),n="bottom-start";return t.hasClass("dropup")?n=e(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?n="right-start":t.hasClass("dropleft")?n="left-start":e(this._menu).hasClass("dropdown-menu-right")&&(n="bottom-end"),n},i._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},i._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a(a({},e.offsets),t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},i._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),a(a({},t),this._config.popperConfig)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.dropdown");if(i||(i=new t(this,"object"==typeof n?n:null),e(this).data("bs.dropdown",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},t._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,s=i.length;o<s;o++){var r=t._getParentFromElement(i[o]),a=e(i[o]).data("bs.dropdown"),l={relatedTarget:i[o]};if(n&&"click"===n.type&&(l.clickEvent=n),a){var c=a._menu;if(e(r).hasClass("show")&&!(n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"keyup"===n.type&&9===n.which)&&e.contains(r,n.target))){var h=e.Event("hide.bs.dropdown",l);e(r).trigger(h),h.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),i[o].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),e(c).removeClass("show"),e(r).removeClass("show").trigger(e.Event("hidden.bs.dropdown",l)))}}}},t._getParentFromElement=function(t){var e,n=c.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(n){if(!(/input|textarea/i.test(n.target.tagName)?32===n.which||27!==n.which&&(40!==n.which&&38!==n.which||e(n.target).closest(".dropdown-menu").length):!A.test(n.which))&&!this.disabled&&!e(this).hasClass("disabled")){var i=t._getParentFromElement(this),o=e(i).hasClass("show");if(o||27!==n.which){if(n.preventDefault(),n.stopPropagation(),!o||o&&(27===n.which||32===n.which))return 27===n.which&&e(i.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void e(this).trigger("click");var s=[].slice.call(i.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return e(t).is(":visible")}));if(0!==s.length){var r=s.indexOf(n.target);38===n.which&&r>0&&r--,40===n.which&&r<s.length-1&&r++,r<0&&(r=0),s[r].focus()}}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return I}},{key:"DefaultType",get:function(){return O}}]),t}();e(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',j._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",j._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",j._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),j._jQueryInterface.call(e(this),"toggle")})).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})),e.fn[k]=j._jQueryInterface,e.fn[k].Constructor=j,e.fn[k].noConflict=function(){return e.fn[k]=N,j._jQueryInterface};var P=e.fn.modal,x={backdrop:!0,keyboard:!0,focus:!0,show:!0},L={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},R=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var n=t.prototype;return n.toggle=function(t){return this._isShown?this.hide():this.show(t)},n.show=function(t){var n=this;if(!this._isShown&&!this._isTransitioning){e(this._element).hasClass("fade")&&(this._isTransitioning=!0);var i=e.Event("show.bs.modal",{relatedTarget:t});e(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(t){return n.hide(t)})),e(this._dialog).on("mousedown.dismiss.bs.modal",(function(){e(n._element).one("mouseup.dismiss.bs.modal",(function(t){e(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return n._showElement(t)})))}},n.hide=function(t){var n=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var i=e.Event("hide.bs.modal");if(e(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var o=e(this._element).hasClass("fade");if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),e(document).off("focusin.bs.modal"),e(this._element).removeClass("show"),e(this._element).off("click.dismiss.bs.modal"),e(this._dialog).off("mousedown.dismiss.bs.modal"),o){var s=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,(function(t){return n._hideModal(t)})).emulateTransitionEnd(s)}else this._hideModal()}}},n.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return e(t).off(".bs.modal")})),e(document).off("focusin.bs.modal"),e.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(t){return t=a(a({},x),t),c.typeCheckConfig("modal",t,L),t},n._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){var n=e.Event("hidePrevented.bs.modal");if(e(this._element).trigger(n),n.defaultPrevented)return;this._element.classList.add("modal-static");var i=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,(function(){t._element.classList.remove("modal-static")})).emulateTransitionEnd(i),this._element.focus()}else this.hide()},n._showElement=function(t){var n=this,i=e(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),e(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&c.reflow(this._element),e(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var s=e.Event("shown.bs.modal",{relatedTarget:t}),r=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(s)};if(i){var a=c.getTransitionDurationFromElement(this._dialog);e(this._dialog).one(c.TRANSITION_END,r).emulateTransitionEnd(a)}else r()},n._enforceFocus=function(){var t=this;e(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(n){document!==n.target&&t._element!==n.target&&0===e(t._element).has(n.target).length&&t._element.focus()}))},n._setEscapeEvent=function(){var t=this;this._isShown?e(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||e(this._element).off("keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var t=this;this._isShown?e(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):e(window).off("resize.bs.modal")},n._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop((function(){e(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger("hidden.bs.modal")}))},n._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(t){var n=this,i=e(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),e(this._backdrop).appendTo(document.body),e(this._element).on("click.dismiss.bs.modal",(function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&n._triggerBackdropTransition()})),i&&c.reflow(this._backdrop),e(this._backdrop).addClass("show"),!t)return;if(!i)return void t();var o=c.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(c.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass("show");var s=function(){n._removeBackdrop(),t&&t()};if(e(this._element).hasClass("fade")){var r=c.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(c.TRANSITION_END,s).emulateTransitionEnd(r)}else s()}else t&&t()},n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var n=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),i=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(n,i){var o=i.style.paddingRight,s=e(i).css("padding-right");e(i).data("padding-right",o).css("padding-right",parseFloat(s)+t._scrollbarWidth+"px")})),e(i).each((function(n,i){var o=i.style.marginRight,s=e(i).css("margin-right");e(i).data("margin-right",o).css("margin-right",parseFloat(s)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,s=e(document.body).css("padding-right");e(document.body).data("padding-right",o).css("padding-right",parseFloat(s)+this._scrollbarWidth+"px")}e(document.body).addClass("modal-open")},n._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));e(t).each((function(t,n){var i=e(n).data("padding-right");e(n).removeData("padding-right"),n.style.paddingRight=i||""}));var n=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(t,n){var i=e(n).data("margin-right");"undefined"!=typeof i&&e(n).css("margin-right",i).removeData("margin-right")}));var i=e(document.body).data("padding-right");e(document.body).removeData("padding-right"),document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(n,i){return this.each((function(){var o=e(this).data("bs.modal"),s=a(a(a({},x),e(this).data()),"object"==typeof n&&n?n:{});if(o||(o=new t(this,s),e(this).data("bs.modal",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](i)}else s.show&&o.show(i)}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return x}}]),t}();e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var n,i=this,o=c.getSelectorFromElement(this);o&&(n=document.querySelector(o));var s=e(n).data("bs.modal")?"toggle":a(a({},e(n).data()),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var r=e(n).one("show.bs.modal",(function(t){t.isDefaultPrevented()||r.one("hidden.bs.modal",(function(){e(i).is(":visible")&&i.focus()}))}));R._jQueryInterface.call(e(n),s,this)})),e.fn.modal=R._jQueryInterface,e.fn.modal.Constructor=R,e.fn.modal.noConflict=function(){return e.fn.modal=P,R._jQueryInterface};var q=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],F={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Q=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,B=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function H(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),s=[].slice.call(i.body.querySelectorAll("*")),r=function(t,n){var i=s[t],r=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var a=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[r]||[]);a.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===q.indexOf(n)||Boolean(t.nodeValue.match(Q)||t.nodeValue.match(B));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,s=i.length;o<s;o++)if(n.match(i[o]))return!0;return!1})(t,l)||i.removeAttribute(t.nodeName)}))},a=0,l=s.length;a<l;a++)r(a);return i.body.innerHTML}var U="tooltip",M=e.fn[U],W=new RegExp("(^|\\s)bs-tooltip\\S+","g"),V=["sanitize","whiteList","sanitizeFn"],z={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},K={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},X={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:F,popperConfig:null},Y={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},$=function(){function t(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var i=t.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},i.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var o=c.findShadowRoot(this.element),s=e.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),a=c.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&e(r).addClass("fade");var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var u=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,this._getPopperConfig(h)),e(r).addClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var d=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),"out"===n&&t._leave(null,t)};if(e(this.tip).hasClass("fade")){var f=c.getTransitionDurationFromElement(this.tip);e(this.tip).one(c.TRANSITION_END,d).emulateTransitionEnd(f)}else d()}},i.hide=function(t){var n=this,i=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),s=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(i).removeClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,e(this.tip).hasClass("fade")){var r=c.getTransitionDurationFromElement(i);e(i).one(c.TRANSITION_END,s).emulateTransitionEnd(r)}else s();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},i.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},i.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass("fade show")},i.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=H(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},i.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},i._getPopperConfig=function(t){var e=this;return a(a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),this.config.popperConfig)},i._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a(a({},e.offsets),t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},i._getContainer=function(){return!1===this.config.container?document.body:c.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},i._getAttachment=function(t){return K[t.toUpperCase()]},i._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i="hover"===n?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===n?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},e(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a(a({},this.config),{},{trigger:"manual",selector:""}):this._fixTitle()},i._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},i._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){"show"===n._hoverState&&n.show()}),n.config.delay.show):n.show())},i._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},i._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},i._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==V.indexOf(t)&&delete n[t]})),"number"==typeof(t=a(a(a({},this.constructor.Default),n),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),c.typeCheckConfig(U,t,this.constructor.DefaultType),t.sanitize&&(t.template=H(t.template,t.whiteList,t.sanitizeFn)),t},i._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},i._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(W);null!==n&&n.length&&t.removeClass(n.join(""))},i._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},i._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,o),e(this).data("bs.tooltip",i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return X}},{key:"NAME",get:function(){return U}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Y}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return z}}]),t}();e.fn[U]=$._jQueryInterface,e.fn[U].Constructor=$,e.fn[U].noConflict=function(){return e.fn[U]=M,$._jQueryInterface};var J="popover",G=e.fn[J],Z=new RegExp("(^|\\s)bs-popover\\S+","g"),tt=a(a({},$.Default),{},{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),et=a(a({},$.DefaultType),{},{content:"(string|element|function)"}),nt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},it=function(t){var n,i;function s(){return t.apply(this,arguments)||this}i=t,(n=s).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var r=s.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},r.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},r.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(Z);null!==n&&n.length>0&&t.removeClass(n.join(""))},s._jQueryInterface=function(t){return this.each((function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(s,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return tt}},{key:"NAME",get:function(){return J}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return nt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return et}}]),s}($);e.fn[J]=it._jQueryInterface,e.fn[J].Constructor=it,e.fn[J].noConflict=function(){return e.fn[J]=G,it._jQueryInterface};var ot="scrollspy",st=e.fn[ot],rt={offset:10,method:"auto",target:""},at={offset:"number",method:"string",target:"(string|element)"},lt=function(){function t(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return i._process(t)})),this.refresh(),this._process()}var n=t.prototype;return n.refresh=function(){var t=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var n,s=c.getSelectorFromElement(t);if(s&&(n=document.querySelector(s)),n){var r=n.getBoundingClientRect();if(r.width||r.height)return[e(n)[i]().top+o,s]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=a(a({},rt),"object"==typeof t&&t?t:{})).target&&c.isElement(t.target)){var n=e(t.target).attr("id");n||(n=c.getUID(ot),e(t.target).attr("id",n)),t.target="#"+n}return c.typeCheckConfig(ot,t,at),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},n._activate=function(t){this._activeTarget=t,this._clear();var n=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),i=e([].slice.call(document.querySelectorAll(n.join(","))));i.hasClass("dropdown-item")?(i.closest(".dropdown").find(".dropdown-toggle").addClass("active"),i.addClass("active")):(i.addClass("active"),i.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),i.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),e(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.scrollspy");if(i||(i=new t(this,"object"==typeof n&&n),e(this).data("bs.scrollspy",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"Default",get:function(){return rt}}]),t}();e(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),n=t.length;n--;){var i=e(t[n]);lt._jQueryInterface.call(i,i.data())}})),e.fn[ot]=lt._jQueryInterface,e.fn[ot].Constructor=lt,e.fn[ot].noConflict=function(){return e.fn[ot]=st,lt._jQueryInterface};var ct=e.fn.tab,ht=function(){function t(t){this._element=t}var n=t.prototype;return n.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass("active")||e(this._element).hasClass("disabled"))){var n,i,o=e(this._element).closest(".nav, .list-group")[0],s=c.getSelectorFromElement(this._element);if(o){var r="UL"===o.nodeName||"OL"===o.nodeName?"> li > .active":".active";i=(i=e.makeArray(e(o).find(r)))[i.length-1]}var a=e.Event("hide.bs.tab",{relatedTarget:this._element}),l=e.Event("show.bs.tab",{relatedTarget:i});if(i&&e(i).trigger(a),e(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(n=document.querySelector(s)),this._activate(this._element,o);var h=function(){var n=e.Event("hidden.bs.tab",{relatedTarget:t._element}),o=e.Event("shown.bs.tab",{relatedTarget:i});e(i).trigger(n),e(t._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},n.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(t,n,i){var o=this,s=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?e(n).children(".active"):e(n).find("> li > .active"))[0],r=i&&s&&e(s).hasClass("fade"),a=function(){return o._transitionComplete(t,s,i)};if(s&&r){var l=c.getTransitionDurationFromElement(s);e(s).removeClass("show").one(c.TRANSITION_END,a).emulateTransitionEnd(l)}else a()},n._transitionComplete=function(t,n,i){if(n){e(n).removeClass("active");var o=e(n.parentNode).find("> .dropdown-menu .active")[0];o&&e(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),c.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var s=e(t).closest(".dropdown")[0];if(s){var r=[].slice.call(s.querySelectorAll(".dropdown-toggle"));e(r).addClass("active")}t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.tab");if(o||(o=new t(this),i.data("bs.tab",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}}]),t}();e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),ht._jQueryInterface.call(e(this),"show")})),e.fn.tab=ht._jQueryInterface,e.fn.tab.Constructor=ht,e.fn.tab.noConflict=function(){return e.fn.tab=ct,ht._jQueryInterface};var ut=e.fn.toast,dt={animation:"boolean",autohide:"boolean",delay:"number"},ft={animation:!0,autohide:!0,delay:500},gt=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var n=t.prototype;return n.show=function(){var t=this,n=e.Event("show.bs.toast");if(e(this._element).trigger(n),!n.isDefaultPrevented()){this._config.animation&&this._element.classList.add("fade");var i=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),e(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),c.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var t=e.Event("hide.bs.toast");e(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},n.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains("show")&&this._element.classList.remove("show"),e(this._element).off("click.dismiss.bs.toast"),e.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(t){return t=a(a(a({},ft),e(this._element).data()),"object"==typeof t&&t?t:{}),c.typeCheckConfig("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;e(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},n._close=function(){var t=this,n=function(){t._element.classList.add("hide"),e(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=c.getTransitionDurationFromElement(this._element);e(this._element).one(c.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.toast");if(o||(o=new t(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.0"}},{key:"DefaultType",get:function(){return dt}},{key:"Default",get:function(){return ft}}]),t}();e.fn.toast=gt._jQueryInterface,e.fn.toast.Constructor=gt,e.fn.toast.noConflict=function(){return e.fn.toast=ut,gt._jQueryInterface},t.Alert=d,t.Button=g,t.Carousel=E,t.Collapse=D,t.Dropdown=j,t.Modal=R,t.Popover=it,t.Scrollspy=lt,t.Tab=ht,t.Toast=gt,t.Tooltip=$,t.Util=c,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a<c;case">":return d?a<c:a>c;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?a("<div/>",{class:"owl-video-tn "+j,srcType:c}):a("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,
animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d,e;e=this._core.settings;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(b){b.ui=b.ui||{};b.ui.version="1.12.1";var s,i=0,o=Array.prototype.slice;b.cleanData=(s=b.cleanData,function(t){for(var e,i,a=0;null!=(i=t[a]);a++)try{(e=b._data(i,"events"))&&e.remove&&b(i).triggerHandler("remove")}catch(t){}s(t)}),b.widget=function(t,i,e){var a,s,n,r={},o=t.split(".")[0],l=o+"-"+(t=t.split(".")[1]);return e||(e=i,i=b.Widget),b.isArray(e)&&(e=b.extend.apply(null,[{}].concat(e))),b.expr[":"][l.toLowerCase()]=function(t){return!!b.data(t,l)},b[o]=b[o]||{},a=b[o][t],s=b[o][t]=function(t,e){if(!this._createWidget)return new s(t,e);arguments.length&&this._createWidget(t,e)},b.extend(s,a,{version:e.version,_proto:b.extend({},e),_childConstructors:[]}),(n=new i).options=b.widget.extend({},n.options),b.each(e,function(e,a){function s(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}b.isFunction(a)?r[e]=function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=n,t=a.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=a}),s.prototype=b.widget.extend(n,{widgetEventPrefix:a&&n.widgetEventPrefix||t},r,{constructor:s,namespace:o,widgetName:t,widgetFullName:l}),a?(b.each(a._childConstructors,function(t,e){var i=e.prototype;b.widget(i.namespace+"."+i.widgetName,s,e._proto)}),delete a._childConstructors):i._childConstructors.push(s),b.widget.bridge(t,s),s},b.widget.extend=function(t){for(var e,i,a=o.call(arguments,1),s=0,n=a.length;s<n;s++)for(e in a[s])i=a[s][e],a[s].hasOwnProperty(e)&&void 0!==i&&(b.isPlainObject(i)?t[e]=b.isPlainObject(t[e])?b.widget.extend({},t[e],i):b.widget.extend({},i):t[e]=i);return t},b.widget.bridge=function(n,e){var r=e.prototype.widgetFullName||n;b.fn[n]=function(i){var t="string"==typeof i,a=o.call(arguments,1),s=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=b.data(this,r);return"instance"===i?(s=e,!1):e?b.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,a))!==e&&void 0!==t?(s=t&&t.jquery?s.pushStack(t.get()):t,!1):void 0:b.error("no such method '"+i+"' for "+n+" widget instance"):b.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+i+"'")}):s=void 0:(a.length&&(i=b.widget.extend.apply(null,[i].concat(a))),this.each(function(){var t=b.data(this,r);t?(t.option(i||{}),t._init&&t._init()):b.data(this,r,new e(i,this))})),s}},b.Widget=function(){},b.Widget._childConstructors=[],b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=b(e||this.defaultElement||this)[0],this.element=b(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=b(),this.hoverable=b(),this.focusable=b(),this.classesElementLookup={},e!==this&&(b.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=b(e.style?e.ownerDocument:e.document||e),this.window=b(this.document[0].defaultView||this.document[0].parentWindow)),this.options=b.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:b.noop,_create:b.noop,_init:b.noop,destroy:function(){var i=this;this._destroy(),b.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:b.noop,widget:function(){return this.element},option:function(t,e){var i,a,s,n=t;if(0===arguments.length)return b.widget.extend({},this.options);if("string"==typeof t)if(n={},t=(i=t.split(".")).shift(),i.length){for(a=n[t]=b.widget.extend({},this.options[t]),s=0;s<i.length-1;s++)a[i[s]]=a[i[s]]||{},a=a[i[s]];if(t=i.pop(),1===arguments.length)return void 0===a[t]?null:a[t];a[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];n[t]=e}return this._setOptions(n),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,a;for(e in t)a=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&a&&a.length&&(i=b(a.get()),this._removeClass(a,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(s){var n=[],r=this;function t(t,e){for(var i,a=0;a<t.length;a++)i=r.classesElementLookup[t[a]]||b(),i=s.add?b(b.unique(i.get().concat(s.element.get()))):b(i.not(s.element).get()),r.classesElementLookup[t[a]]=i,n.push(t[a]),e&&s.classes[t[a]]&&n.push(s.classes[t[a]])}return s=b.extend({element:this.element,classes:this.options.classes||{}},s),this._on(s.element,{remove:"_untrackClassesElement"}),s.keys&&t(s.keys.match(/\S+/g)||[],!0),s.extra&&t(s.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(i){var a=this;b.each(a.classesElementLookup,function(t,e){-1!==b.inArray(i.target,e)&&(a.classesElementLookup[t]=b(e.not(i.target).get()))})},_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,a){a="boolean"==typeof a?a:i;var s="string"==typeof t||null===t,t={extra:s?e:i,keys:s?t:e,element:s?this.element:t,add:a};return t.element.toggleClass(this._classes(t),a),this},_on:function(s,n,t){var r,o=this;"boolean"!=typeof s&&(t=n,n=s,s=!1),t?(n=r=b(n),this.bindings=this.bindings.add(n)):(t=n,n=this.element,r=this.widget()),b.each(t,function(t,e){function i(){if(s||!0!==o.options.disabled&&!b(this).hasClass("ui-state-disabled"))return("string"==typeof e?o[e]:e).apply(o,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||b.guid++);var a=t.match(/^([\w:-]*)\s*(.*)$/),t=a[1]+o.eventNamespace,a=a[2];a?r.on(t,a,i):n.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e).off(e),this.bindings=b(this.bindings.not(t).get()),this.focusable=b(this.focusable.not(t).get()),this.hoverable=b(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(b(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(b(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(b(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(b(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var a,s,n=this.options[t];if(i=i||{},(e=b.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],s=e.originalEvent)for(a in s)a in e||(e[a]=s[a]);return this.element.trigger(e,i),!(b.isFunction(n)&&!1===n.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},b.each({show:"fadeIn",hide:"fadeOut"},function(n,r){b.Widget.prototype["_"+n]=function(e,t,i){var a;"string"==typeof t&&(t={effect:t});var s=t?!0!==t&&"number"!=typeof t&&t.effect||r:n;"number"==typeof(t=t||{})&&(t={duration:t}),a=!b.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),a&&b.effects&&b.effects.effect[s]?e[n](t):s!==n&&e[s]?e[s](t.duration,t.easing,i):e.queue(function(t){b(this)[n](),i&&i.call(e[0]),t()})}});var a,w,M,n,r,l,c,d,C;b.widget;function x(t,e,i){return[parseFloat(t[0])*(d.test(t[0])?e/100:1),parseFloat(t[1])*(d.test(t[1])?i/100:1)]}function I(t,e){return parseInt(b.css(t,e),10)||0}w=Math.max,M=Math.abs,n=/left|center|right/,r=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,d=/%$/,C=b.fn.position,b.position={scrollbarWidth:function(){if(void 0!==a)return a;var t,e=b("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),i=e.children()[0];return b("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),a=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?b.position.scrollbarWidth():0,height:e?b.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=b(t||window),i=b.isWindow(e[0]),a=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:a,offset:!i&&!a?b(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},b.fn.position=function(h){if(!h||!h.of)return C.apply(this,arguments);h=b.extend({},h);var u,p,g,f,m,t,_=b(h.of),k=b.position.getWithinInfo(h.within),y=b.position.getScrollInfo(k),v=(h.collision||"flip").split(" "),D={},e=9===(t=(e=_)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:b.isWindow(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()};return _[0].preventDefault&&(h.at="left top"),p=e.width,g=e.height,f=e.offset,m=b.extend({},f),b.each(["my","at"],function(){var t,e,i=(h[this]||"").split(" ");1===i.length&&(i=n.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]),i[0]=n.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),D[this]=[t?t[0]:0,e?e[0]:0],h[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===v.length&&(v[1]=v[0]),"right"===h.at[0]?m.left+=p:"center"===h.at[0]&&(m.left+=p/2),"bottom"===h.at[1]?m.top+=g:"center"===h.at[1]&&(m.top+=g/2),u=x(D.at,p,g),m.left+=u[0],m.top+=u[1],this.each(function(){var i,t,r=b(this),o=r.outerWidth(),l=r.outerHeight(),e=I(this,"marginLeft"),a=I(this,"marginTop"),s=o+e+I(this,"marginRight")+y.width,n=l+a+I(this,"marginBottom")+y.height,c=b.extend({},m),d=x(D.my,r.outerWidth(),r.outerHeight());"right"===h.my[0]?c.left-=o:"center"===h.my[0]&&(c.left-=o/2),"bottom"===h.my[1]?c.top-=l:"center"===h.my[1]&&(c.top-=l/2),c.left+=d[0],c.top+=d[1],i={marginLeft:e,marginTop:a},b.each(["left","top"],function(t,e){b.ui.position[v[t]]&&b.ui.position[v[t]][e](c,{targetWidth:p,targetHeight:g,elemWidth:o,elemHeight:l,collisionPosition:i,collisionWidth:s,collisionHeight:n,offset:[u[0]+d[0],u[1]+d[1]],my:h.my,at:h.at,within:k,elem:r})}),h.using&&(t=function(t){var e=f.left-c.left,i=e+p-o,a=f.top-c.top,s=a+g-l,n={target:{element:_,left:f.left,top:f.top,width:p,height:g},element:{element:r,left:c.left,top:c.top,width:o,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:s<0?"top":0<a?"bottom":"middle"};p<o&&M(e+i)<p&&(n.horizontal="center"),g<l&&M(a+s)<g&&(n.vertical="middle"),w(M(e),M(i))>w(M(a),M(s))?n.important="horizontal":n.important="vertical",h.using.call(this,t,n)}),r.offset(b.extend(c,{using:t}))})},b.ui.position={fit:{left:function(t,e){var i=e.within,a=i.isWindow?i.scrollLeft:i.offset.left,s=i.width,n=t.left-e.collisionPosition.marginLeft,r=a-n,o=n+e.collisionWidth-s-a;e.collisionWidth>s?0<r&&o<=0?(i=t.left+r+e.collisionWidth-s-a,t.left+=r-i):t.left=!(0<o&&r<=0)&&o<r?a+s-e.collisionWidth:a:0<r?t.left+=r:0<o?t.left-=o:t.left=w(t.left-n,t.left)},top:function(t,e){var i=e.within,a=i.isWindow?i.scrollTop:i.offset.top,s=e.within.height,n=t.top-e.collisionPosition.marginTop,r=a-n,o=n+e.collisionHeight-s-a;e.collisionHeight>s?0<r&&o<=0?(i=t.top+r+e.collisionHeight-s-a,t.top+=r-i):t.top=!(0<o&&r<=0)&&o<r?a+s-e.collisionHeight:a:0<r?t.top+=r:0<o?t.top-=o:t.top=w(t.top-n,t.top)}},flip:{left:function(t,e){var i=e.within,a=i.offset.left+i.scrollLeft,s=i.width,n=i.isWindow?i.scrollLeft:i.offset.left,r=t.left-e.collisionPosition.marginLeft,o=r-n,l=r+e.collisionWidth-s-n,c="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,i="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,r=-2*e.offset[0];o<0?((a=t.left+c+i+r+e.collisionWidth-s-a)<0||a<M(o))&&(t.left+=c+i+r):0<l&&(0<(n=t.left-e.collisionPosition.marginLeft+c+i+r-n)||M(n)<l)&&(t.left+=c+i+r)},top:function(t,e){var i=e.within,a=i.offset.top+i.scrollTop,s=i.height,n=i.isWindow?i.scrollTop:i.offset.top,r=t.top-e.collisionPosition.marginTop,o=r-n,l=r+e.collisionHeight-s-n,c="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,i="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,r=-2*e.offset[1];o<0?((a=t.top+c+i+r+e.collisionHeight-s-a)<0||a<M(o))&&(t.top+=c+i+r):0<l&&(0<(n=t.top-e.collisionPosition.marginTop+c+i+r-n)||M(n)<l)&&(t.top+=c+i+r)}},flipfit:{left:function(){b.ui.position.flip.left.apply(this,arguments),b.ui.position.fit.left.apply(this,arguments)},top:function(){b.ui.position.flip.top.apply(this,arguments),b.ui.position.fit.top.apply(this,arguments)}}};var t;b.ui.position,b.extend(b.expr[":"],{data:b.expr.createPseudo?b.expr.createPseudo(function(e){return function(t){return!!b.data(t,e)}}):function(t,e,i){return!!b.data(t,i[3])}}),b.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")}});b.ui.focusable=function(t,e){var i,a,s,n,r=t.nodeName.toLowerCase();return"area"===r?(a=(i=t.parentNode).name,!(!t.href||!a||"map"!==i.nodeName.toLowerCase())&&(0<(a=b("img[usemap='#"+a+"']")).length&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(r)?(s=!t.disabled)&&(n=b(t).closest("fieldset")[0])&&(s=!n.disabled):s="a"===r&&t.href||e,s&&b(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}(b(t)))},b.extend(b.expr[":"],{focusable:function(t){return b.ui.focusable(t,null!=b.attr(t,"tabindex"))}});b.ui.focusable,b.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):b(this[0].form)},b.ui.formResetMixin={_formResetHandler:function(){var e=b(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");b.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(b.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"))}};"1.7"===b.fn.jquery.substring(0,3)&&(b.each(["Width","Height"],function(t,i){var s="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),n={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};function r(t,e,i,a){return b.each(s,function(){e-=parseFloat(b.css(t,"padding"+this))||0,i&&(e-=parseFloat(b.css(t,"border"+this+"Width"))||0),a&&(e-=parseFloat(b.css(t,"margin"+this))||0)}),e}b.fn["inner"+i]=function(t){return void 0===t?n["inner"+i].call(this):this.each(function(){b(this).css(a,r(this,t)+"px")})},b.fn["outer"+i]=function(t,e){return"number"!=typeof t?n["outer"+i].call(this,t):this.each(function(){b(this).css(a,r(this,t,!0,e)+"px")})}}),b.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))});b.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},b.ui.escapeSelector=(e=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(t){return t.replace(e,"\\$1")}),b.fn.labels=function(){var t,e,i;return 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='"+b.ui.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e))},b.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,a=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=b(this);return(!i||"static"!==t.css("position"))&&a.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:b(this[0].ownerDocument||document)},b.extend(b.expr[":"],{tabbable:function(t){var e=b.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&b.ui.focusable(t,i)}}),b.fn.extend({uniqueId:(h=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++h)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&b(this).removeAttr("id")})}});var e,h,u,p=/ui-corner-([a-z]){2,6}/g;b.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var n=this,r=[];b.each(this.options.items,function(a,t){var e,s={};if(t)return"controlgroupLabel"===a?((e=n.element.find(t)).each(function(){var t=b(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),n._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(r=r.concat(e.get()))):void(b.fn[a]&&(s=n["_"+a+"Options"]?n["_"+a+"Options"]("middle"):{classes:{}},n.element.find(t).each(function(){var t=b(this),e=t[a]("instance"),i=b.widget.extend({},s);"button"===a&&t.parent(".ui-spinner").length||((e=e||t[a]()[a]("instance"))&&(i.classes=n._resolveClassesValues(i.classes,e)),t[a](i),i=t[a]("widget"),b.data(i[0],"ui-controlgroup-data",e||t[a]("instance")),r.push(i[0]))})))}),this.childWidgets=b(b.unique(r)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=b(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,a={classes:{}};return a.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],a},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,a){var s={};return b.each(i,function(t){var e=a.options.classes[t]||"",e=b.trim(e.replace(p,""));s[t]=(e+" "+i[t]).replace(/\s+/g," ")}),s},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var s,n=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),s=this.childWidgets,this.options.onlyVisible&&(s=s.filter(":visible")),s.length&&(b.each(["first","last"],function(t,e){var i,a=s[e]().data("ui-controlgroup-data");a&&n["_"+a.widgetName+"Options"]?((i=n["_"+a.widgetName+"Options"](1===s.length?"only":e)).classes=n._resolveClassesValues(i.classes,a),a.element[a.widgetName](i)):n._updateCornerClass(s[e](),e)}),this._callChildMethod("refresh"))}});function g(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},b.extend(this._defaults,this.regional[""]),this.regional.en=b.extend(!0,{},this.regional[""]),this.regional["en-US"]=b.extend(!0,{},this.regional.en),this.dpDiv=f(b("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function f(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){b(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&b(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,m)}function m(){b.datepicker._isDisabledDatepicker((u.inline?u.dpDiv.parent():u.input)[0])||(b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),b(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&b(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&b(this).addClass("ui-datepicker-next-hover"))}function _(t,e){for(var i in b.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}b.extend(b.ui,{datepicker:{version:"1.12.1"}}),b.extend(g.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return _(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,a=t.nodeName.toLowerCase(),s="div"===a||"span"===a;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(b(t),s)).settings=b.extend({},e||{}),"input"===a?this._connectDatepicker(t,i):s&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?f(b("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=b(t);e.append=b([]),e.trigger=b([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),b.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,a=this._get(e,"appendText"),s=this._get(e,"isRTL");e.append&&e.append.remove(),a&&(e.append=b("<span class='"+this._appendClass+"'>"+a+"</span>"),t[s?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(a=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),e.trigger=b(this._get(e,"buttonImageOnly")?b("<img/>").addClass(this._triggerClass).attr({src:i,alt:a,title:a}):b("<button type='button'></button>").addClass(this._triggerClass).html(i?b("<img/>").attr({src:i,alt:a,title:a}):a)),t[s?"before":"after"](e.trigger),e.trigger.on("click",function(){return b.datepicker._datepickerShowing&&b.datepicker._lastInput===t[0]?b.datepicker._hideDatepicker():(b.datepicker._datepickerShowing&&b.datepicker._lastInput!==t[0]&&b.datepicker._hideDatepicker(),b.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,i,a,s,n,r;this._get(t,"autoSize")&&!t.inline&&(n=new Date(2009,11,20),(r=this._get(t,"dateFormat")).match(/[DM]/)&&(e=function(t){for(s=a=i=0;s<t.length;s++)t[s].length>i&&(i=t[s].length,a=s);return a},n.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),t.input.attr("size",this._formatDate(t,n).length))},_inlineDatepicker:function(t,e){var i=b(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),b.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,a,s){var n,r=this._dialogInst;return r||(this.uuid+=1,n="dp"+this.uuid,this._dialogInput=b("<input type='text' id='"+n+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),b("body").append(this._dialogInput),(r=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},b.data(this._dialogInput[0],"datepicker",r)),_(r.settings,a||{}),e=e&&e.constructor===Date?this._formatDate(r,e):e,this._dialogInput.val(e),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(n=document.documentElement.clientWidth,a=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[n/2-100+e,a/2-150+s]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),r.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),b.blockUI&&b.blockUI(this.dpDiv),b.data(this._dialogInput[0],"datepicker",r),this},_destroyDatepicker:function(t){var e,i=b(t),a=b.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),b.removeData(t,"datepicker"),"input"===e?(a.append.remove(),a.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),u===a&&(u=null))},_enableDatepicker:function(e){var t,i=b(e),a=b.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=b.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i=b(e),a=b.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=b.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return b.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var a,s,n,r,o=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?b.extend({},b.datepicker._defaults):o?"all"===e?b.extend({},o.settings):this._get(o,e):null;a=e||{},"string"==typeof e&&((a={})[e]=i),o&&(this._curInst===o&&this._hideDatepicker(),s=this._getDateDatepicker(t,!0),n=this._getMinMaxDate(o,"min"),r=this._getMinMaxDate(o,"max"),_(o.settings,a),null!==n&&void 0!==a.dateFormat&&void 0===a.minDate&&(o.settings.minDate=this._formatDate(o,n)),null!==r&&void 0!==a.dateFormat&&void 0===a.maxDate&&(o.settings.maxDate=this._formatDate(o,r)),"disabled"in a&&(a.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(b(t),o),this._autoSize(o),this._setDate(o,s),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,i,a=b.datepicker._getInst(t.target),s=!0,n=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,b.datepicker._datepickerShowing)switch(t.keyCode){case 9:b.datepicker._hideDatepicker(),s=!1;break;case 13:return(i=b("td."+b.datepicker._dayOverClass+":not(."+b.datepicker._currentClass+")",a.dpDiv))[0]&&b.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,i[0]),(e=b.datepicker._get(a,"onSelect"))?(i=b.datepicker._formatDate(a),e.apply(a.input?a.input[0]:null,[i,a])):b.datepicker._hideDatepicker(),!1;case 27:b.datepicker._hideDatepicker();break;case 33:b.datepicker._adjustDate(t.target,t.ctrlKey?-b.datepicker._get(a,"stepBigMonths"):-b.datepicker._get(a,"stepMonths"),"M");break;case 34:b.datepicker._adjustDate(t.target,t.ctrlKey?+b.datepicker._get(a,"stepBigMonths"):+b.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&b.datepicker._clearDate(t.target),s=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&b.datepicker._gotoToday(t.target),s=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&b.datepicker._adjustDate(t.target,n?1:-1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&b.datepicker._adjustDate(t.target,t.ctrlKey?-b.datepicker._get(a,"stepBigMonths"):-b.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&b.datepicker._adjustDate(t.target,-7,"D"),s=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&b.datepicker._adjustDate(t.target,n?-1:1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&b.datepicker._adjustDate(t.target,t.ctrlKey?+b.datepicker._get(a,"stepBigMonths"):+b.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&b.datepicker._adjustDate(t.target,7,"D"),s=t.ctrlKey||t.metaKey;break;default:s=!1}else 36===t.keyCode&&t.ctrlKey?b.datepicker._showDatepicker(this):s=!1;s&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i=b.datepicker._getInst(t.target);if(b.datepicker._get(i,"constrainInput"))return e=b.datepicker._possibleChars(b.datepicker._get(i,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!e||-1<e.indexOf(i)},_doKeyUp:function(t){var e=b.datepicker._getInst(t.target);if(e.input.val()!==e.lastVal)try{b.datepicker.parseDate(b.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,b.datepicker._getFormatConfig(e))&&(b.datepicker._setDateFromField(e),b.datepicker._updateAlternate(e),b.datepicker._updateDatepicker(e))}catch(t){}return!0},_showDatepicker:function(t){var e,i,a,s;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=b("input",t.parentNode)[0]),b.datepicker._isDisabledDatepicker(t)||b.datepicker._lastInput===t||(s=b.datepicker._getInst(t),b.datepicker._curInst&&b.datepicker._curInst!==s&&(b.datepicker._curInst.dpDiv.stop(!0,!0),s&&b.datepicker._datepickerShowing&&b.datepicker._hideDatepicker(b.datepicker._curInst.input[0])),!1!==(i=(a=b.datepicker._get(s,"beforeShow"))?a.apply(t,[t,s]):{})&&(_(s.settings,i),s.lastVal=null,b.datepicker._lastInput=t,b.datepicker._setDateFromField(s),b.datepicker._inDialog&&(t.value=""),b.datepicker._pos||(b.datepicker._pos=b.datepicker._findPos(t),b.datepicker._pos[1]+=t.offsetHeight),e=!1,b(t).parents().each(function(){return!(e|="fixed"===b(this).css("position"))}),a={left:b.datepicker._pos[0],top:b.datepicker._pos[1]},b.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),b.datepicker._updateDatepicker(s),a=b.datepicker._checkOffset(s,a,e),s.dpDiv.css({position:b.datepicker._inDialog&&b.blockUI?"static":e?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),s.inline||(i=b.datepicker._get(s,"showAnim"),a=b.datepicker._get(s,"duration"),s.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(b(t))+1),b.datepicker._datepickerShowing=!0,b.effects&&b.effects.effect[i]?s.dpDiv.show(i,b.datepicker._get(s,"showOptions"),a):s.dpDiv[i||"show"](i?a:null),b.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),b.datepicker._curInst=s)))},_updateDatepicker:function(t){this.maxRows=4,(u=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),a=i[1],s=t.dpDiv.find("."+this._dayOverClass+" a");0<s.length&&m.apply(s.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<a&&t.dpDiv.addClass("ui-datepicker-multi-"+a).css("width",17*a+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===b.datepicker._curInst&&b.datepicker._datepickerShowing&&b.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),e=t.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,i){var a=t.dpDiv.outerWidth(),s=t.dpDiv.outerHeight(),n=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,o=document.documentElement.clientWidth+(i?0:b(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:b(document).scrollTop());return e.left-=this._get(t,"isRTL")?a-n:0,e.left-=i&&e.left===t.input.offset().left?b(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+r?b(document).scrollTop():0,e.left-=Math.min(e.left,e.left+a>o&&a<o?Math.abs(e.left+a-o):0),e.top-=Math.min(e.top,e.top+s>l&&s<l?Math.abs(s+r):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||b.expr.filters.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=b(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,a=this._curInst;!a||t&&a!==b.data(t,"datepicker")||this._datepickerShowing&&(e=this._get(a,"showAnim"),i=this._get(a,"duration"),t=function(){b.datepicker._tidyDialog(a)},b.effects&&(b.effects.effect[e]||b.effects[e])?a.dpDiv.hide(e,b.datepicker._get(a,"showOptions"),i,t):a.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,t),e||t(),this._datepickerShowing=!1,(t=this._get(a,"onClose"))&&t.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),b.blockUI&&(b.unblockUI(),b("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){var e;b.datepicker._curInst&&(e=b(t.target),t=b.datepicker._getInst(e[0]),(e[0].id===b.datepicker._mainDivId||0!==e.parents("#"+b.datepicker._mainDivId).length||e.hasClass(b.datepicker.markerClassName)||e.closest("."+b.datepicker._triggerClass).length||!b.datepicker._datepickerShowing||b.datepicker._inDialog&&b.blockUI)&&(!e.hasClass(b.datepicker.markerClassName)||b.datepicker._curInst===t)||b.datepicker._hideDatepicker())},_adjustDate:function(t,e,i){var a=b(t),t=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(t,e+("M"===i?this._get(t,"showCurrentAtPos"):0),i),this._updateDatepicker(t))},_gotoToday:function(t){var e=b(t),i=this._getInst(e[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(t=new Date,i.selectedDay=t.getDate(),i.drawMonth=i.selectedMonth=t.getMonth(),i.drawYear=i.selectedYear=t.getFullYear()),this._notifyChange(i),this._adjustDate(e)},_selectMonthYear:function(t,e,i){var a=b(t),t=this._getInst(a[0]);t["selected"+("M"===i?"Month":"Year")]=t["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(t),this._adjustDate(a)},_selectDay:function(t,e,i,a){var s=b(t);b(a).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((s=this._getInst(s[0])).selectedDay=s.currentDay=b("a",a).html(),s.selectedMonth=s.currentMonth=e,s.selectedYear=s.currentYear=i,this._selectDate(t,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(t){t=b(t);this._selectDate(t,"")},_selectDate:function(t,e){var i=b(t),t=this._getInst(i[0]);e=null!=e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(i=this._get(t,"onSelect"))?i.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,a=this._get(t,"altField");a&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),t=this.formatDate(e,i,this._getFormatConfig(t)),b(a).val(t))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e=new Date(t.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(e,s,t){if(null==e||null==s)throw"Invalid arguments";if(""===(s="object"==typeof s?s.toString():s+""))return null;function n(t){return(t=D+1<e.length&&e.charAt(D+1)===t)&&D++,t}function i(t){var e=n(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,e=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}");if(!(e=s.substring(d).match(e)))throw"Missing number at position "+d;return d+=e[0].length,parseInt(e[0],10)}function a(t,e,i){var a=-1,e=b.map(n(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(b.each(e,function(t,e){var i=e[1];if(s.substr(d,i.length).toLowerCase()===i.toLowerCase())return a=e[0],d+=i.length,!1}),-1!==a)return a+1;throw"Unknown name at position "+d}function r(){if(s.charAt(d)!==e.charAt(D))throw"Unexpected literal at position "+d;d++}for(var o,l,c,d=0,h=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,h="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,p=(t?t.dayNames:null)||this._defaults.dayNames,g=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,f=(t?t.monthNames:null)||this._defaults.monthNames,m=-1,_=-1,k=-1,y=-1,v=!1,D=0;D<e.length;D++)if(v)"'"!==e.charAt(D)||n("'")?r():v=!1;else switch(e.charAt(D)){case"d":k=i("d");break;case"D":a("D",u,p);break;case"o":y=i("o");break;case"m":_=i("m");break;case"M":_=a("M",g,f);break;case"y":m=i("y");break;case"@":m=(c=new Date(i("@"))).getFullYear(),_=c.getMonth()+1,k=c.getDate();break;case"!":m=(c=new Date((i("!")-this._ticksTo1970)/1e4)).getFullYear(),_=c.getMonth()+1,k=c.getDate();break;case"'":n("'")?r():v=!0;break;default:r()}if(d<s.length&&(l=s.substr(d),!/^\s+/.test(l)))throw"Extra/unparsed characters found in date: "+l;if(-1===m?m=(new Date).getFullYear():m<100&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(m<=h?0:-100)),-1<y)for(_=1,k=y;;){if(k<=(o=this._getDaysInMonth(m,_-1)))break;_++,k-=o}if((c=this._daylightSavingAdjust(new Date(m,_-1,k))).getFullYear()!==m||c.getMonth()+1!==_||c.getDate()!==k)throw"Invalid date";return c},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";function s(t){return(t=r+1<e.length&&e.charAt(r+1)===t)&&r++,t}function a(t,e,i){var a=""+e;if(s(t))for(;a.length<i;)a="0"+a;return a}function n(t,e,i,a){return(s(t)?a:i)[e]}var r,o=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,l=(i?i.dayNames:null)||this._defaults.dayNames,c=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,d=(i?i.monthNames:null)||this._defaults.monthNames,h="",u=!1;if(t)for(r=0;r<e.length;r++)if(u)"'"!==e.charAt(r)||s("'")?h+=e.charAt(r):u=!1;else switch(e.charAt(r)){case"d":h+=a("d",t.getDate(),2);break;case"D":h+=n("D",t.getDay(),o,l);break;case"o":h+=a("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=a("m",t.getMonth()+1,2);break;case"M":h+=n("M",t.getMonth(),c,d);break;case"y":h+=s("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":h+=t.getTime();break;case"!":h+=1e4*t.getTime()+this._ticksTo1970;break;case"'":s("'")?h+="'":u=!0;break;default:h+=e.charAt(r)}return h},_possibleChars:function(e){function t(t){return(t=s+1<e.length&&e.charAt(s+1)===t)&&s++,t}for(var i="",a=!1,s=0;s<e.length;s++)if(a)"'"!==e.charAt(s)||t("'")?i+=e.charAt(s):a=!1;else switch(e.charAt(s)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":t("'")?i+="'":a=!0;break;default:i+=e.charAt(s)}return i},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),a=t.lastVal=t.input?t.input.val():null,s=this._getDefaultDate(t),n=s,r=this._getFormatConfig(t);try{n=this.parseDate(i,a,r)||s}catch(t){a=e?"":a}t.selectedDay=n.getDate(),t.drawMonth=t.selectedMonth=n.getMonth(),t.drawYear=t.selectedYear=n.getFullYear(),t.currentDay=a?n.getDate():0,t.currentMonth=a?n.getMonth():0,t.currentYear=a?n.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(o,t,e){var i,a,t=null==t||""===t?e:"string"==typeof t?function(t){try{return b.datepicker.parseDate(b.datepicker._get(o,"dateFormat"),t,b.datepicker._getFormatConfig(o))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?b.datepicker._getDate(o):null)||new Date,i=e.getFullYear(),a=e.getMonth(),s=e.getDate(),n=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=n.exec(t);r;){switch(r[2]||"d"){case"d":case"D":s+=parseInt(r[1],10);break;case"w":case"W":s+=7*parseInt(r[1],10);break;case"m":case"M":a+=parseInt(r[1],10),s=Math.min(s,b.datepicker._getDaysInMonth(i,a));break;case"y":case"Y":i+=parseInt(r[1],10),s=Math.min(s,b.datepicker._getDaysInMonth(i,a))}r=n.exec(t)}return new Date(i,a,s)}(t):"number"==typeof t?isNaN(t)?e:(i=t,(a=new Date).setDate(a.getDate()+i),a):new Date(t.getTime());return(t=t&&"Invalid Date"===t.toString()?e:t)&&(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)),this._daylightSavingAdjust(t)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var a=!e,s=t.selectedMonth,n=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=e.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=e.getMonth(),t.drawYear=t.selectedYear=t.currentYear=e.getFullYear(),s===t.selectedMonth&&n===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(a?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){b.datepicker._adjustDate(i,-e,"M")},next:function(){b.datepicker._adjustDate(i,+e,"M")},hide:function(){b.datepicker._hideDatepicker()},today:function(){b.datepicker._gotoToday(i)},selectDay:function(){return b.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return b.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return b.datepicker._selectMonthYear(i,this,"Y"),!1}};b(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,a,s,n,r,o,l,c,d,h,u,p,g,f,m,_,k,y,v,D,b,w,M,C,x,I,N,S,F,T,Y=new Date,A=this._daylightSavingAdjust(new Date(Y.getFullYear(),Y.getMonth(),Y.getDate())),W=this._get(t,"isRTL"),O=this._get(t,"showButtonPanel"),E=this._get(t,"hideIfNoPrevNext"),j=this._get(t,"navigationAsDateFormat"),L=this._getNumberOfMonths(t),H=this._get(t,"showCurrentAtPos"),Y=this._get(t,"stepMonths"),K=1!==L[0]||1!==L[1],P=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),R=this._getMinMaxDate(t,"min"),z=this._getMinMaxDate(t,"max"),U=t.drawMonth-H,B=t.drawYear;if(U<0&&(U+=12,B--),z)for(e=this._daylightSavingAdjust(new Date(z.getFullYear(),z.getMonth()-L[0]*L[1]+1,z.getDate())),e=R&&e<R?R:e;this._daylightSavingAdjust(new Date(B,U,1))>e;)--U<0&&(U=11,B--);for(t.drawMonth=U,t.drawYear=B,H=this._get(t,"prevText"),H=j?this.formatDate(H,this._daylightSavingAdjust(new Date(B,U-Y,1)),this._getFormatConfig(t)):H,i=this._canAdjustMonth(t,-1,B,U)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+H+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"e":"w")+"'>"+H+"</span></a>":E?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+H+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"e":"w")+"'>"+H+"</span></a>",H=this._get(t,"nextText"),H=j?this.formatDate(H,this._daylightSavingAdjust(new Date(B,U+Y,1)),this._getFormatConfig(t)):H,a=this._canAdjustMonth(t,1,B,U)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+H+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"w":"e")+"'>"+H+"</span></a>":E?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+H+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"w":"e")+"'>"+H+"</span></a>",E=this._get(t,"currentText"),H=this._get(t,"gotoCurrent")&&t.currentDay?P:A,E=j?this.formatDate(E,H,this._getFormatConfig(t)):E,j=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",j=O?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(W?j:"")+(this._isInRange(t,H)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+E+"</button>":"")+(W?"":j)+"</div>":"",s=parseInt(this._get(t,"firstDay"),10),s=isNaN(s)?0:s,n=this._get(t,"showWeek"),r=this._get(t,"dayNames"),o=this._get(t,"dayNamesMin"),l=this._get(t,"monthNames"),c=this._get(t,"monthNamesShort"),d=this._get(t,"beforeShowDay"),h=this._get(t,"showOtherMonths"),u=this._get(t,"selectOtherMonths"),p=this._getDefaultDate(t),g="",m=0;m<L[0];m++){for(_="",this.maxRows=4,k=0;k<L[1];k++){if(y=this._daylightSavingAdjust(new Date(B,U,t.selectedDay)),w=" ui-corner-all",v="",K){if(v+="<div class='ui-datepicker-group",1<L[1])switch(k){case 0:v+=" ui-datepicker-group-first",w=" ui-corner-"+(W?"right":"left");break;case L[1]-1:v+=" ui-datepicker-group-last",w=" ui-corner-"+(W?"left":"right");break;default:v+=" ui-datepicker-group-middle",w=""}v+="'>"}for(v+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+w+"'>"+(/all|left/.test(w)&&0===m?W?a:i:"")+(/all|right/.test(w)&&0===m?W?i:a:"")+this._generateMonthYearHeader(t,U,B,R,z,0<m||0<k,l,c)+"</div><table class='ui-datepicker-calendar'><thead><tr>",D=n?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",f=0;f<7;f++)D+="<th scope='col'"+(5<=(f+s+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+r[b=(f+s)%7]+"'>"+o[b]+"</span></th>";for(v+=D+"</tr></thead><tbody>",M=this._getDaysInMonth(B,U),B===t.selectedYear&&U===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,M)),w=(this._getFirstDayOfMonth(B,U)-s+7)%7,M=Math.ceil((w+M)/7),C=K&&this.maxRows>M?this.maxRows:M,this.maxRows=C,x=this._daylightSavingAdjust(new Date(B,U,1-w)),I=0;I<C;I++){for(v+="<tr>",N=n?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(x)+"</td>":"",f=0;f<7;f++)S=d?d.apply(t.input?t.input[0]:null,[x]):[!0,""],T=(F=x.getMonth()!==U)&&!u||!S[0]||R&&x<R||z&&z<x,N+="<td class='"+(5<=(f+s+6)%7?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(x.getTime()===y.getTime()&&U===t.selectedMonth&&t._keyEvent||p.getTime()===x.getTime()&&p.getTime()===y.getTime()?" "+this._dayOverClass:"")+(T?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!h?"":" "+S[1]+(x.getTime()===P.getTime()?" "+this._currentClass:"")+(x.getTime()===A.getTime()?" ui-datepicker-today":""))+"'"+(F&&!h||!S[2]?"":" title='"+S[2].replace(/'/g,"&#39;")+"'")+(T?"":" data-handler='selectDay' data-event='click' data-month='"+x.getMonth()+"' data-year='"+x.getFullYear()+"'")+">"+(F&&!h?"&#xa0;":T?"<span class='ui-state-default'>"+x.getDate()+"</span>":"<a class='ui-state-default"+(x.getTime()===A.getTime()?" ui-state-highlight":"")+(x.getTime()===P.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+x.getDate()+"</a>")+"</td>",x.setDate(x.getDate()+1),x=this._daylightSavingAdjust(x);v+=N+"</tr>"}11<++U&&(U=0,B++),_+=v+="</tbody></table>"+(K?"</div>"+(0<L[0]&&k===L[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}g+=_}return g+=j,t._keyEvent=!1,g},_generateMonthYearHeader:function(t,e,i,a,s,n,r,o){var l,c,d,h,u,p,g,f=this._get(t,"changeMonth"),m=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),k="<div class='ui-datepicker-title'>",y="";if(n||!f)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(l=a&&a.getFullYear()===i,c=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",d=0;d<12;d++)(!l||d>=a.getMonth())&&(!c||d<=s.getMonth())&&(y+="<option value='"+d+"'"+(d===e?" selected='selected'":"")+">"+o[d]+"</option>");y+="</select>"}if(_||(k+=y+(!n&&f&&m?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",n||!m)k+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),p=(r=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(h[0]),g=Math.max(p,r(h[1]||"")),p=a?Math.max(p,a.getFullYear()):p,g=s?Math.min(g,s.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=g;p++)t.yearshtml+="<option value='"+p+"'"+(p===i?" selected='selected'":"")+">"+p+"</option>";t.yearshtml+="</select>",k+=t.yearshtml,t.yearshtml=null}return k+=this._get(t,"yearSuffix"),_&&(k+=(!n&&f&&m?"":"&#xa0;")+y),k+="</div>"},_adjustInstDate:function(t,e,i){var a=t.selectedYear+("Y"===i?e:0),s=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(a,s))+("D"===i?e:0),e=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(a,s,e)));t.selectedDay=e.getDate(),t.drawMonth=t.selectedMonth=e.getMonth(),t.drawYear=t.selectedYear=e.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),e=i&&e<i?i:e;return t&&t<e?t:e},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,a){var s=this._getNumberOfMonths(t),s=this._daylightSavingAdjust(new Date(i,a+(e<0?e:s[0]*s[1]),1));return e<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(t,s)},_isInRange:function(t,e){var i=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),s=null,n=null,r=this._get(t,"yearRange");return r&&(t=r.split(":"),r=(new Date).getFullYear(),s=parseInt(t[0],10),n=parseInt(t[1],10),t[0].match(/[+\-].*/)&&(s+=r),t[1].match(/[+\-].*/)&&(n+=r)),(!i||e.getTime()>=i.getTime())&&(!a||e.getTime()<=a.getTime())&&(!s||e.getFullYear()>=s)&&(!n||e.getFullYear()<=n)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,a){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);e=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(a,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),e,this._getFormatConfig(t))}}),b.fn.datepicker=function(t){if(!this.length)return this;b.datepicker.initialized||(b(document).on("mousedown",b.datepicker._checkExternalClick),b.datepicker.initialized=!0),0===b("#"+b.datepicker._mainDivId).length&&b("body").append(b.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?b.datepicker["_"+t+"Datepicker"].apply(b.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?b.datepicker["_"+t+"Datepicker"].apply(b.datepicker,[this].concat(e)):b.datepicker._attachDatepicker(this,t)})},b.datepicker=new g,b.datepicker.initialized=!1,b.datepicker.uuid=(new Date).getTime(),b.datepicker.version="1.12.1";b.datepicker});
if(typeof $=='undefined'){
var $=jQuery;
}
function normalizeSlideHeights(){
var o=0;
window.innerWidth > 768&&($(".highlight_angebot").each(function (){
var e=$(this).outerHeight();
e > o&&(o=e)
}), $(".highlight_angebot").css("height", o + 20)), o=0, window.innerWidth > 768&&($(".hotel_angebot").each(function (){
var e=$(this).outerHeight();
e > o&&(o=e)
}), $(".hotel_angebot").css("height", o + 20)), o=0, window.innerWidth > 768&&($(".highlight_golfplatz").each(function (){
var e=$(this).outerHeight();
e > o&&(o=e)
}), $(".highlight_golfplatz").css("height", o + 20)), o=0, window.innerWidth > 768&&($(".land_region_highlight").each(function (){
var e=$(this).outerHeight();
e > o&&(o=e)
}), $(".land_region_highlight").css("height", o + 20))
}
function show_marker(o, e){
$(e + "- img[src$='.png?marker" + o + "']").addClass("animate_marker")
}
function not_show_marker(o, e){
$(e + " img[src$='.png?marker" + o + "']").removeClass("animate_marker")
}
function mapbox_show_marker(o, e){
$(e + "-" + o).addClass("animate_marker")
}
function mapbox_dont_show_marker(o, e){
$(e + "-" + o).removeClass("animate_marker")
}
var head=document.getElementsByTagName('head')[0];
var insertBefore=head.insertBefore;
head.insertBefore=function (newElement, referenceElement){
if(newElement.href&&newElement.href.indexOf('https://fonts.googleapis.com/css?family=Roboto')===0){
return;
}
if(newElement.href&&newElement.href.indexOf('https://fonts.googleapis.com/css?family=Google+Sans+Text')===0){
return;
}
insertBefore.call(head, newElement, referenceElement);
};
function check_input(o){
event.preventDefault();
var e=0;
$("#" + o + " input.date").each(function (){
""==$(this).val() ? ($(this).addClass("input_error"), e=1):$(this).removeClass("input_error")
}), 0==$("#" + o + " #destinationcode").val()&&0==$("#" + o + " #golfclubcode").val()&&($("#" + o + " #destinationcode").addClass("input_error"), $("#" + o + " #golfclubcode").addClass("input_error"), e=1), 0==$("#" + o + " #destinationcode").val()&&0==$("#" + o + " #golfclubcode").val()||($("#" + o + " #destinationcode").removeClass("input_error"), $("#" + o + " #golfclubcode").removeClass("input_error")), 0==$("#" + o + " #origin.inactive ").length&&""==$("#" + o + " #origin").val() ? ($("#" + o + " #origin").addClass("input_error"), e=1):$("#" + o + " #origin").removeClass("input_error"), 0==e&&document.forms[o].submit()
}
function update_destinations(subregion, dest_code){
var currentCountryID=$('#countrycode').val();
if(currentCountryID!==''){
$("#destinationcode option[value='']").attr('selected', true);
$('#destinationcode option').each(function (){ if($(this).val()!=''){ $(this).remove(); }})
for (let i=0; i < destinationsArray.length; i++){
if(currentCountryID==destinationsArray[i].countrycode){
if(destinationsArray[i].subregion&&subregion==true){
var o=new Option(destinationsArray[i].destinationname, destinationsArray[i].subregion);
}else{
var o=new Option(destinationsArray[i].destinationname, destinationsArray[i].destinationcode);
}
$(o).html(destinationsArray[i].destinationname);
$('#destinationcode').append(o);
};};
if($('#golfclubcode').length!=0){
$("#golfclubcode option[value='']").attr('selected', true);
$('#golfclubcode option').each(function (){ if($(this).val()!=''){ $(this).remove(); }})
for (let i=0; i < destinationsArray.length; i++){
if(currentCountryID==destinationsArray[i].countrycode){
for (let k=0; k < destinationsArray[i].golfclubs.length; k++){
var o=new Option(destinationsArray[i].golfclubs[k].o_name, destinationsArray[i].golfclubs[k].o_id);
$(o).html(destinationsArray[i].golfclubs[k].o_name);
$('#golfclubcode').append(o);
}}
};};
}else{
$("#destinationcode option[value='']").attr('selected', true);
$('#destinationcode option').each(function (){ if($(this).val()!=0){ $(this).remove(); }})
for (let i=0; i < destinationsArray.length; i++){
if(destinationsArray[i].subregion){
var o=new Option(destinationsArray[i].destinationname, destinationsArray[i].subregion);
}else{
var o=new Option(destinationsArray[i].destinationname, destinationsArray[i].destinationcode);
}
$(o).html(destinationsArray[i].destinationname);
$('#destinationcode').append(o);
};
if($('#golfclubcode').length!=0){
$("#golfclubcode option[value='0']").attr('selected', true);
$('#golfclubcode option').each(function (){ if($(this).val()!=0){ $(this).remove(); }})
for (let i=0; i < destinationsArray.length; i++){
if(dest_code==destinationsArray[i].destinationcode){
for (let k=0; k < destinationsArray[i].golfclubs.length; k++){
var o=new Option(destinationsArray[i].golfclubs[k].o_name, destinationsArray[i].golfclubs[k].o_id);
$(o).html(destinationsArray[i].golfclubs[k].o_name);
$('#golfclubcode').append(o);
}}
};};
};}
function update_hotels_golfclubs(){
var o=$("#destinationcode").val();
if(o.substr(0, 3)==':::'){
var dest_code_array=o.split(':::');
o=dest_code_array[2];
}
if(""!=o){
$("#hotel_code option[value='']").attr("selected", !0), $("#hotel_code option").each(function (){
""!=$(this).val()&&$(this).remove()
});
$("#ticket_code option[value='']").attr("selected", !0), $("#ticket_code option").each(function (){
""!=$(this).val()&&$(this).remove()
});
for (let t=0; t < destinationsArray.length; t++){
if(o==destinationsArray[t].destinationcode){
for (let i=0; i < destinationsArray[t].hotels.length; i++){
var e=new Option(destinationsArray[t].hotels[i].o_name, destinationsArray[t].hotels[i].o_code);
$(e).html(destinationsArray[t].hotels[i].o_name), $("#hotel_code").append(e)
}
for (let i=0; i < destinationsArray[t].golfclubs.length; i++){
var e=new Option(destinationsArray[t].golfclubs[i].o_name, destinationsArray[t].golfclubs[i].o_code);
$(e).html(destinationsArray[t].golfclubs[i].o_name), $("#ticket_code").append(e)
}}
}
$("#hotel_code").removeClass("disabled"), $("#ticket_code").removeClass("disabled"), $("#hotel_code").prop("disabled", !1), $("#ticket_code").prop("disabled", !1)
} else $("#hotel_code option[value='']").attr("selected", !0), $("#ticket_code option[value='']").attr("selected", !0), $("#hotel_code").addClass("disabled"), $("#ticket_code").addClass("disabled"), $("#hotel_code").prop("disabled", "disabled"), $("#ticket_code").prop("disabled", "disabled"), $("#ticket_code option").each(function (){
""!=$(this).val()&&$(this).remove()
}), $("#hotel_code option").each(function (){
""!=$(this).val()&&$(this).remove()
})
}
function disable_hotel_golfclub(){
""!=$("#hotel_code").val() ? ($("#ticket_code option[value='']").attr("selected", !0), $("#ticket_code").prop("disabled", "disabled"), $("#ticket_code").addClass("disabled")):($("#ticket_code").prop("disabled", !1), $("#ticket_code").removeClass("disabled")), ""!=$("#ticket_code").val() ? ($("#hotel_code option[value='']").attr("selected", !0), $("#hotel_code").prop("disabled", "disabled"), $("#hotel_code").addClass("disabled")):($("#hotel_code").prop("disabled", !1), $("#hotel_code").removeClass("disabled"))
}
function update_golfclubs(){
var o=$("#destinationcode").val();
if(o.substr(0, 3)==':::'){
var dest_code_array=o.split(':::');
o=dest_code_array[2];
}
if(0!=o){
$("#golfclubcode option[value='']").attr("selected", !0), $("#golfclubcode option").each(function (){
0!=$(this).val()&&$(this).remove()
});
for (let t=0; t < destinationsArray.length; t++){
if(o==destinationsArray[t].destinationcode){
for (let i=0; i < destinationsArray[t].golfclubs.length; i++){
var e=new Option(destinationsArray[t].golfclubs[i].o_name, destinationsArray[t].golfclubs[i].o_id);
$(e).html(destinationsArray[t].golfclubs[i].o_name), $("#golfclubcode").append(e)
}}
}
$("#golfclubcode").removeClass("disabled"), $("#golfclubcode").prop("disabled", !1);
}else{
/*$("#golfclubcode option[value='']").attr("selected", !0), $("#golfclubcode option").each(function(){
0!=$(this).val()&&$(this).remove()
});
for (let o=0; o < golfclubsArray.length; o++) t=new Option(golfclubsArray[o].objectname, golfclubsArray[o].objectID), $(t).html(golfclubsArray[o].objectname), $("#golfclubcode").append(t);
if(0!=e){
$("#golfclubcode option[value='']").attr("selected", !0), $("#golfclubcode option").each(function(){
0!=$(this).val()&&$(this).remove()
});
for (let o=0; o < golfclubsArray.length; o++) e==golfclubsArray[o].countrycode&&(t=new Option(golfclubsArray[o].objectname, golfclubsArray[o].objectID), $(t).html(golfclubsArray[o].objectname), $("#golfclubcode").append(t))
}*/
$("#golfclubcode option[value='']").attr("selected", !0), $("#golfclubcode").addClass("disabled"), $("#golfclubcode").prop("disabled", "disabled"), $("#golfclubcode option").each(function (){
""!=$(this).val()&&$(this).remove()
})
}}
function fill_golfclub(o, e, t){
$('#golfclubcode option[value="' + e + '"]').length > 0 ? ($('#golfclubcode option[value="' + e + '"]').prop("selected", "selected"), $("#golfclubcode").prop("disabled", !1), $("#golfclubcode").removeClass("disabled"), $("#golfclubcode").removeClass("selected_animation"), setTimeout(function (){
$("#golfclubcode").addClass("selected_animation")
}, 80), $('#destinationcode option[value="' + o + '"]').prop("selected", "selected"), $("#destinationcode").removeClass("selected_animation"), setTimeout(function (){
$("#destinationcode").addClass("selected_animation")
}, 80), $("#destinationcode").removeClass("input_error"), $("#golfclubcode").removeClass("input_error")):($('#countrycode option[value="0"]').prop("selected", "selected"), update_destinations(false, o), $("#golfclubcode").prop("disabled", !1), $("#golfclubcode").removeClass("disabled"), $('#golfclubcode option[value="' + e + '"]').prop("selected", "selected"), $("#golfclubcode").removeClass("selected_animation"), setTimeout(function (){
$("#golfclubcode").addClass("selected_animation")
}, 80), $('#destinationcode option[value="' + o + '"]').prop("selected", "selected"), $("#destinationcode").removeClass("selected_animation"), setTimeout(function (){
$("#destinationcode").addClass("selected_animation")
}, 80), $("#destinationcode").removeClass("input_error"), $("#golfclubcode").removeClass("input_error"))
}
function submit_offers_form(){
document.search_offers_form.submit()
}
function check_room_btn(o){
var e=0;
$("#" + o + " .adults").each(function (){
e +=parseInt($(this).val(), 10)
}), $("#" + o + " .children").each(function (){
e +=parseInt($(this).val(), 10)
}), e >=9&&$("#" + o + " .add_room").addClass("d-none"), e < 9&&$(".room").length < 4&&$("#" + o + " .add_room").removeClass("d-none")
}
function add_room(o){
var e=0,
t="",
n="",
a=$("#" + o + ' .room[id^="room-"]:last'),
l=parseInt(a.attr("id").match(/\d+/g), 10) + 1,
r=l++,
s=0;
$("#" + o + " .adults").each(function (){
s +=parseInt($(this).val(), 10)
}), $("#" + o + " .children").each(function (){
s +=parseInt($(this).val(), 10)
});
var c=9 - s;
for (e=c < 4 ? c:4, i=1; i <=e; i++) t +="<option>" + i + "</option>";
0==e&&(t="<option>0</option>");
var d=9 - s;
for (e=d < 4 ? d:4, i=0; i <=e; i++) n +="<option>" + i + "</option>";
0==e&&(n="<option>0</option>");
var p =
'<div id="room-' + r + '" class="room"><div class="row" role="none"><div class="col-4 room_number" role="none"><button type="button" class="delete-btn" tabindex="0" onclick="delete_room(this,\'' + o + '\')"><i class="fa fa-times delete" aria-hidden="true"></i></button> #' + r + '</div><div class="col-4 select-wrapper" role="none"><label for="adults-' + r + '-' + o + '"></label><select id="adults-' + r + '-' + o + '" class="form-control adults" onchange="refresh_inputs(\''+o+'\');" autocomplete="off">' + t + '</select></div><div class="col-4 select-wrapper" role="none"><label for="children-' + r + '-' + o + '"></label><select id="children-' + r + '-' + o + '" class="form-control children" onchange="open_children_age(this,\'' + o + '\'); refresh_inputs(\'' + o + '\');" autocomplete="off">' + n + '</select></div><div class="container child_age_container d-none" role="none"><div class="col-12 age_note" role="note">*' + alter_hinweis + '</div><div class="row" role="none"><div class="col select-wrapper" role="none"><label for="child-age-' + r + '-1-' + o + '"></label><select id="child-age-' + r + '-1-' + o + '" class="col form-control child_age" autocomplete="off"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option>'+
'<option value="11">11</option><option value="12" selected>12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option></select></div><div class="col select-wrapper" role="none"><label for="child-age-' + r + '-2-' + o + '"></label><select id="child-age-' + r + '-2-' + o + '" class="col form-control child_age" autocomplete="off"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12" selected>12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option></select></div><div class="col select-wrapper" role="none"><label for="child-age-' + r + '-3-' + o + '"></label><select id="child-age-' + r + '-3-' + o + '"class="col form-control child_age" autocomplete="off"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12" selected>12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option></select></div><div class="col select-wrapper" role="none"><label for="child-age-' + r + '-4-' + o + '"></label><select id="child-age-' + r + '-4-' + o + '" class="col form-control child_age" autocomplete="off"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12" selected>12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option></select></div></div></div></div><hr class="trennlinie" role="none" aria-hidden="true"></div>';
a.after(p), s++, 4==r&&$("#" + o + " .add_room").addClass("d-none"), check_room_btn(o), refresh_inputs(o);
}
function delete_room(o, e){
var t=o.closest(".room"),
i=parseInt($(t).attr("id").match(/\d+/g), 10),
n=$("#" + e + ' .room[id^="room-"]:last'),
a=parseInt(n.attr("id").match(/\d+/g), 10);
if(o.closest(".room").remove(), $("#" + e + " .add_room").removeClass("d-none"), a!=i)
for (var l=i + 1; l <=a; l++) $("#" + e + " #room-" + l + " .room_number").html("<button type='button' class='delete-btn' tabindex='0' onclick=\"delete_room(this,'" + e + '\')"><i class="fa fa-times delete" aria-hidden="true"></i></button> #' + (l - 1)), $("#" + e + " #room-" + l).attr("id", "room-" + (l - 1));
refresh_inputs(e);
}
function open_children_age(o, e){
var t=o.closest(".room"),
i=$(t).attr("id"),
n=$(o).val();
$("#" + e + " #" + i + " .child_age_container .select-wrapper").addClass("d-none"), $("#" + e + " #" + i + " .child_age_container").find(".select-wrapper:nth-of-type(-n+" + n + ")").removeClass("d-none"), $(o).val() > 0 ? $("#" + e + " #" + i + " .child_age_container").removeClass("d-none"):$("#" + e + " #" + i + " .child_age_container").addClass("d-none")
}
function refresh_inputs(o){
var e=0;
$("#" + o + " .adults").each(function (){
e +=parseInt($(this).val(), 10)
}), $("#" + o + " .children").each(function (){
e +=parseInt($(this).val(), 10)
});
var t=9 - e;
$("#" + o + " .adults").each(function (){
var e=parseInt($(this).val()),
n=$(this).closest(".room").attr("id"),
a=$("#" + o + " #" + n + " .adults option").length;
if(t < a - e){
var l=a - e - t;
l > 0&&$("#" + o + " #" + n + " .adults option:nth-last-child(-n+" + l + ")").remove()
}
if(t > a - e){
var r=4 - e;
if(t >=r) var s=r;
else s=t;
if(a < s + e)
for (a++, i=1; i <=s; i++)
if($("#" + o + " #" + n + " .adults option").length < 4){
var c=new Option(a++);
$("#" + o + " #" + n + " .adults").append(c)
}}
}), $("#" + o + " .children").each(function (){
var e=parseInt($(this).val()),
n=$(this).closest(".room").attr("id"),
a=$("#" + o + " #" + n + " .children option").length - 1;
if(t < a - e){
var l=a - e - t;
l > 0&&$("#" + o + " #" + n + " .children option:nth-last-child(-n+" + l + ")").remove()
}
if(t > a - e){
var r=4 - e;
if(t >=r) var s=r;
else s=t;
if(a < s + e)
for (a++, i=1; i <=s; i++)
if($("#" + o + " #" + n + " .children option").length < 5){
var c=new Option(a++);
$("#" + o + " #" + n + " .children").append(c)
}}
}), check_room_btn(o)
}
function set_distribution(o){
var e="",
t=0,
i=0,
n=$("#" + o + " .room").length;
0==$("#" + o + " .no-rooms").length&&(e=n > 1 ? n + " " + zimmer_pl + ", ":n + " " + zimmer + ", "), $("#" + o + " .adults").each(function (){
t +=parseInt($(this).val())
}), e +=t > 1 ? t + " " + erwachsene_pl:t + " " + erwachsene, $("#" + o + " .children").each(function (){
i +=parseInt($(this).val())
}), i > 0&&(e +=1==i ? ", " + i + " " + kind:", " + i + " " + kind_pl), $("#" + o + " [id*='distribution-']").val(e);
var a="";
$("#" + o + " .room").each(function (){
var e=$(this).attr("id");
a +=$("#" + o + " #" + e + " .adults:visible").val() + "-", a +=$("#" + o + " #" + e + " .children:visible").val(), $("#" + o + " #" + e + " .children").val() > 0&&(a +="-", $("#" + o + " #" + e + " .child_age_container .child_age:visible").each(function (){
a +=$(this).val() + ","
}), a=a.slice(0, -1)), a +="::"
}), a=a.slice(0, -2), $("#" + o + " [id*='distribution_code']").val(a)
}
function disable_flight(o){
$("#" + o + " #no_flight").is(":checked") ? ($("#" + o + " #origin").prop("readonly", !0), $("#" + o + " #origin").addClass("inactive"), $("#" + o + " .business_ind").addClass("inactive"), $("#" + o + " .business_ind").css("pointer-events", "none")):($("#" + o + " #origin").prop("readonly", !1), $("#" + o + " #origin").removeClass("inactive"), $("#" + o + " .business_ind").removeClass("inactive"), $("#" + o + " .business_ind").css("pointer-events", "all"))
}
jQuery(document).ready(function (o){
o("#toggler-icon").click(function (){
o(this).toggleClass("open")
})
}), jQuery(document).ready(function (o){
o("#polylang_dropdown_switcher").on("click", ".active", function (){
o(this).closest("ul").toggleClass("open")
}), o("#polylang_dropdown_switcher").on("click", "a", function (){
o(this).closest("ul").toggleClass("open")
})
}), jQuery(document).ready(function (o){
o(".dropdown_wrapper").on("click", function (){
o("#dropdown").toggleClass("active"), o(".searchfield_container").attr('aria-expanded', function (i, attr){return attr=='true' ? 'false':'true'}), o(".searchfield_container .fa-chevron-down").toggleClass("active")
}), o(document).mouseup(function (e){
var t=o(".dropdown_wrapper");
t.is(e.target)||0!==t.has(e.target).length||(o(".dropdown_wrapper #dropdown").removeClass("active"), o(".searchfield_container .fa-chevron-down").removeClass("active"))
}), o("#dropdown .country_container").on("click", function (e){
o(this).toggleClass("open"), e.stopPropagation()
})
}), jQuery(document).mouseup(function (o){
var e=$("#polylang_dropdown_switcher li");
e.is(o.target)||0!==e.has(o.target).length||$("#polylang_dropdown_switcher").removeClass("open")
}), jQuery(document).mouseup(function (o){
var e=$("[id*='distribution_container']");
e.is(o.target)||0!==e.has(o.target).length||$("[id*='distribution_container']").removeClass("show")
}), jQuery(document).ready(function (o){
o(window).on("load", normalizeSlideHeights)
});
const uri="/wp-content/themes/golfandmore/europa-airports-multilang.json";
var airportsArray=[],
airportCounter = !1;
function search_airports(o){
0==airportCounter&&($.getJSON(uri, function (o){
var e=[langSlug];
o.sort((o, t)=> e.indexOf(t.ctry) - e.indexOf(o.ctry)), airportsArray=o
}), airportCounter = !0), $("#origin").keyup(function (){
var e=$(o).val(),
t = !1;
if(e.length > 2){
$(".origin_recommendation li").remove();
for (let o=0; o < airportsArray.length; o++)(airportsArray[o].city.toLowerCase().startsWith(e)||airportsArray[o].airport.toLowerCase().startsWith(e)||airportsArray[o].code.toLowerCase().startsWith(e)||(airportsArray[o].city + " (" + airportsArray[o].airport + ", " + airportsArray[o].code + ")").startsWith(e))&&($(".origin_recommendation").append('<li data-airport="' + airportsArray[o].code + '" onmousedown="select_airport(this);"><strong>' + airportsArray[o].city + "</strong> (" + airportsArray[o].airport + ", " + airportsArray[o].code + ")</li>"), t = !0);
""==$(o).val()&&(t = !1), 1==t ? $(".origin_recommendation").addClass("show"):$(".origin_recommendation").removeClass("show")
} else $(".origin_recommendation li").remove()
})
}
function select_airport(o){
var e=$(o).data("airport"),
t=$(o).text();
$("#origin_code").val(e), $("#origin").val(t), $(".origin_recommendation").removeClass("show")
}
function close_recommendation(){
$(".origin_recommendation").removeClass("show")
}
function individualize_travelidea(o){
"anfrage"==o ? ($("#buchen-tab").removeClass("active"), $('a[href="#buchen-tab"]').removeClass("active"), $("#anfrage").addClass("active"), $('a[href="#anfrage"]').addClass("active")):($("#buchen-tab").removeClass("active"), $('a[href="#buchen-tab"]').removeClass("active"), $("#individualisieren").addClass("active"), $('a[href="#individualisieren"]').addClass("active"))
}
jQuery("#origin").on("focusout", function (){
close_recommendation()
});
function createCookie(name, value, days){
var expires='',
date=new Date();
if(days){
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires='; expires=' + date.toGMTString();
}
document.cookie=name + '=' + value + expires + '; path=/; Secure';
}
function readCookie(name){
var nameEQ=name + '=',
allCookies=document.cookie.split(';'),
i,
cookie;
for (i=0; i < allCookies.length; i +=1){
cookie=allCookies[i];
while (cookie.charAt(0)===' '){
cookie=cookie.substring(1, cookie.length);
}
if(cookie.indexOf(nameEQ)===0){
return cookie.substring(nameEQ.length, cookie.length);
}}
return null;
}
var favorites=[];
jQuery(document).ready(function ($){
$('.content, .sharecontainer').on('click', '.add', function (){
if(JSON.parse(readCookie('favID'))!=null){
favorites=JSON.parse(readCookie('favID'));
}
var idea_id=$(this).data('id');
var indiv_hilf=$(this).data('indiv');
if(favorites.map(e=> e.id).indexOf(idea_id)===-1){
if(indiv_hilf!=null){
favorites.push({ id: idea_id, indiv: indiv_hilf });
}else{
favorites.push({ id: idea_id });
}}
var stringified=JSON.stringify(favorites);
createCookie('favID', stringified, 30);
$(this).addClass('remove');
$(this).removeClass('add');
$('#favorites .fav-anzahl').html('(' + favorites.length + ')');
});
$('.content, .sharecontainer').on('click', '.remove', function (){
if(JSON.parse(readCookie('favID'))!=null){
favorites=JSON.parse(readCookie('favID'));
}
var remove_idea_id=Number($(this).data('id'));
$.each(favorites, function (key, wert){
if(favorites[key]&&wert.id){
if(parseInt(remove_idea_id, 10)==wert.id){
favorites.splice(key, 1);
}}
});
var stringified=JSON.stringify(favorites);
createCookie('favID', stringified, 30);
$(this).addClass('add');
$(this).removeClass('remove');
$('#favorites .fav-anzahl').html('(' + favorites.length + ')');
});
if(JSON.parse(readCookie('favID'))!=null){
favorites=JSON.parse(readCookie('favID'));
}
$('.bookmark').each(function (){
var idea_id=$(this).data('id');
if(favorites.map(e=> e.id).indexOf(idea_id)!=-1){
$(this).removeClass('add');
$(this).addClass('remove');
}});
if(favorites.length > 0){
$(".fav-anzahl").text("(" + favorites.length + ")");
}
});
function change_text_show_hide_btn(element){
if($(element).attr('aria-expanded')=='true'){
var a_element=$(element).find('span');
var text=$(element).data('showtext');
a_element.text(text);
}else{
var a_element=$(element).find('span');
var text=$(element).data('hidetext');
a_element.text(text);
}}
jQuery(document).ready(function ($){
$('.navi .menu-item-has-children > a > i').on('click', '', function (e){
e.preventDefault();
$(this).parent().toggleClass('open');
return false;
})
});
/*
function loadTrustpilotWidget(){
if($('script[src*="tp.widget.bootstrap.min.js"]').length===0){
(function(){
var script=document.createElement('script');
script.src='/wp-content/themes/golfandmore/js/tp.widget.bootstrap.min.js';
script.async=true;
document.head.appendChild(script);
})();
}}
jQuery(document).ready(function ($){
if(localStorage.getItem('silktideCookieChoice_other_cookies')=='true'){
$('.hide-trustpilot-widget').removeClass('hide-trustpilot-widget');
setTimeout(function (){loadTrustpilotWidget();}, 100);
}
$('.cli-bar-btn_container a').on('click', function(){
if(localStorage.getItem('silktideCookieChoice_other_cookies')=='true'){
$('.hide-trustpilot-widget').removeClass('hide-trustpilot-widget');
setTimeout(function (){loadTrustpilotWidget();}, 100);
}});
});
*/
function loadTrustpilotWidget(){
const widgetContainers=document.querySelectorAll('.trustpilot-widget');
$('.hide-trustpilot-widget').removeClass('hide-trustpilot-widget');
if(typeof window.Trustpilot!=='undefined'){
widgetContainers.forEach(function(container){
window.Trustpilot.loadFromElement(container);
});
console.log("Trustpilot widgets reloaded via API.");
}else{
var script=document.createElement('script');
script.src='/wp-content/themes/golfandmore/js/tp.widget.bootstrap.min.js';
script.async=true;
script.onload=function(){
if(typeof window.Trustpilot!=='undefined'){
widgetContainers.forEach(function(container){
window.Trustpilot.loadFromElement(container);
});
}};
document.head.appendChild(script);
console.log("Trustpilot script injected.");
}}
jQuery(document).ready(function ($){
if(localStorage.getItem('silktideCookieChoice_other_cookies')==='true'){
loadTrustpilotWidget();
}
$('.accept-all').on('click', function(){
setTimeout(function(){
if(localStorage.getItem('silktideCookieChoice_other_cookies')==='true'){
loadTrustpilotWidget();
}}, 300);
});
});
jQuery(document).ready(function ($){
$('.menu-item-has-children > a').attr('aria-haspopup', 'true');
$('.menu-item-has-children > a').attr('aria-expanded', 'false');
$('div.asl_w .probox .promagnifier, .forminator-pagination, input[id*="forminator-field-checkbox-"]').attr('tabindex', '-1');
$('.cli-privacy-readmore, .cli-plugin-button, .cli_settings_button, .cli-modal-close, .cli-slider, a.fancy-ico, .forminator-checkbox, .forminator-radio, #reviews-pagination .next, #reviews-pagination .prev').attr('tabindex', '0');
function fixTabindex(root){
$(root).find('.forminator-radio, .forminator-checkbox').addBack('.forminator-radio, .forminator-checkbox').attr('tabindex', '0');
$(root).find('.forminator-radio input, .forminator-radio span, .forminator-checkbox input, .forminator-checkbox span').addBack('.forminator-radio input, .forminator-radio span, .forminator-checkbox input, .forminator-checkbox span').attr('tabindex', '-1');
}
fixTabindex(document.body);
const observer=new MutationObserver(function (mutations){
mutations.forEach(function (mutation){
mutation.addedNodes.forEach(function (node){
if(node.nodeType===1){
fixTabindex(node);
}});
});
});
observer.observe(document.body, {
childList: true,
subtree: true
});
setTimeout(()=> {
$('.owl-carousel .owl-item a').attr('tabindex', '-1');
$('.owl-item.active a:not(.notabindex)').attr('tabindex', '0');
$('.owl-dots').attr('aria-hidden', 'true');
$('.owl-dot').attr('tabindex', '-1');
$('.owl-prev').attr('role', '');
$('.owl-next').attr('role', '');
}, 100);
$('.owl-carousel').on('changed.owl.carousel', function(event){
setTimeout(()=> {
$(this).find('a').attr('tabindex', '-1');
$(this).find('.owl-item.active a:not(.notabindex)').attr('tabindex', '0');
}, 100);
});
$(document).on('keyup', '.searchfield_container, .disable-form-label, .forminator-radio, .delete-btn, .submit-distribution, .checkbox, [id*="distribution-"], .owl-prev, .owl-next, [id*="distribution-container-"] .select-input, [id*="distribution-container-"] .add-room, #filter .radiobutton, .forminator-checkbox, .forminator-radio, .delete-btn, .submit-distribution', function (event){
if(event.keyCode===13){
event.preventDefault();
$(this).click();
return false;
}});
$('div.asl_w .probox .promagnifier svg').attr('alt', '');
$('div.asl_w .probox .promagnifier, div.asl_w .probox .promagnifier svg').attr('aria-hidden', 'true');
$('li.menu-item-has-children').focusin(function(){
$(this).children('a:first-child').attr('aria-expanded', 'true');
});
$('li.menu-item-has-children').focusout(function(){
$('li.menu-item-has-children > a').attr('aria-expanded', 'false');
});
});
const closemenu=e => {
const shouldExit=e.keyCode===27;
if(shouldExit){
$('#main-navigation a').removeClass('open');
$('#main-navigation li, #main-navigation ul').removeClass('focused');
}};
document.addEventListener('keydown', closemenu);