nih-gov/ncbiinsights.ncbi.nlm.nih.gov/_static/index.html??-eJyVUdtSwyAQ%2FSEp7Ywd++L4LQQ2cRNYkIWm8evdGG19SDvxDc7hXHYZk7KRClDRydcOibWNjY92YO2Qi+5vgDKEwRSMtOv5adygPAO5mFkXpEnxiAnyVuk1dNYuUoWEBY3Hz7s2AoGEFhUMmQ6yNsxQeDEMQZoH%2FG2PZH118E32HxXypCvKs

498 lines
79 KiB
Text
Raw Permalink Blame History

(()=>{const e=document.querySelectorAll(".coblocks-animate");if("IntersectionObserver"in window){const t=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(e.target.classList.add(e.target.dataset.coblocksAnimation),t.unobserve(e.target))}))}),{threshold:[.15]});e.forEach((e=>{t.observe(e)}))}else e.forEach((e=>{e.classList.remove("coblocks-animate"),delete e.dataset.coblocksAnimation}))})();;
(()=>{var e={2590:function(e){e.exports=function(){"use strict";function e(){return e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},e.apply(this,arguments)}function t(e,t){void 0===t&&(t=[]),Array.isArray(t)||(t=[t]),t.forEach((function(t){return!e.classList.contains(t)&&e.classList.add(t)}))}function n(e,t,n,i){e.addEventListener(t,n,i)}function i(e,t,n){e.removeEventListener(t,n)}function r(e,t,n){return void 0===n&&(n=""),e.setAttribute(t,n),e}function o(e,t,n){return Object.keys(t).forEach((function(n){e.style[n]=t[n]})),n&&getComputedStyle(e),e}var a={direction:"horizontal",touchRatio:1,touchAngle:45,longSwipesRatio:.5,initialSlide:0,loop:!1,freeMode:!1,passiveListeners:!0,resistance:!0,resistanceRatio:.85,speed:300,longSwipesMs:300,spaceBetween:0,slidesPerView:1,centeredSlides:!1,slidePrevClass:"swiper-slide-prev",slideNextClass:"swiper-slide-next",slideActiveClass:"swiper-slide-active",slideClass:"swiper-slide",wrapperClass:"swiper-wrapper",touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchMoveStopPropagation:!1,excludeElements:[],injections:{translate:function(e,t,n,i){o(t.element.$wrapper,{transition:e.isStart?"none":"transform ease "+i+"ms",transform:n.isHorizontal?"translate3d("+e.transforms+"px, 0, 0)":"translate3d(0, "+e.transforms+"px, 0)"})}}};var s="before-init",c="after-init",u="before-slide",l="scroll",f="after-slide",p="before-destroy",d="after-destroy";var m=180/Math.PI;function v(){var t=[];return{getDuration:function(){var e=t[0],n=t[t.length-1];return e?n.time-e.time:0},getOffset:function(){var e=t[0],n=t[t.length-1];return e?{x:n.x-e.x,y:n.y-e.y}:{x:0,y:0}},getLogs:function(){return t},vector:function(){return function(t,n){var i=t[n],r=t[n-1]||i,o={x:i.x-r.x,y:i.y-r.y},a=i.time-r.time,s=o.x/a||0,c=o.y/a||0;return e({},o,{angle:Math.atan2(Math.abs(o.y),Math.abs(o.x))*m,velocityX:s,velocityY:c})}(t,t.length-1)},clear:function(){t=[]},push:function(n){t.push(e({time:Date.now()},n))}}}function h(){return performance?performance.now():Date.now()}var x=requestAnimationFrame||webkitRequestAnimationFrame||setTimeout,g=cancelAnimationFrame||webkitCancelAnimationFrame||clearTimeout;function S(){var e,t,n={run:function(n){e=void 0===e?h():e,t=x((function(){var t=h(),i=t-e;e=t,n(i)}))},stop:function(){e=void 0,g(t)}};return{run:function e(t){n.run((function(n){e(t),t(n)}))},stop:function(){n.stop()}}}function w(e,t){var n=e.tracker,i=t.initStatus;n.clear(),i()}function y(e,t,r,o){var a=e.touchable,s=["INPUT","SELECT","OPTION","TEXTAREA","BUTTON","VIDEO"],c=function(e,t,n,i){var r=i.initLayout,o=i.initStatus,a=i.render,s=i.scrollPixel,c=i.slideTo,u=i.getOffsetSteps,l=S();return{preheat:function(e,t){var i=n.tracker;l.stop(),i.clear(),i.push(e),r(t),o(t),n.isStart=!0,a()},move:function(t){var i=n.tracker,r=e.touchRatio,o=e.touchAngle,c=e.isHorizontal;if(n.isStart&&!n.isScrolling){i.push(t);var u=i.vector(),l=i.getOffset();if(l.x||l.y)if(c&&u.angle<o||!c&&90-u.angle<o||n.isTouching){var f=u[c?"x":"y"]*r;n.isTouching=!0,s(f),a()}else n.isScrolling=!0,i.clear()}},stop:function(){var r=n.index,o=n.tracker,f=t.measure;if(n.isStart)if(n.isStart=!1,e.freeMode){var p=o.vector()[e.isHorizontal?"velocityX":"velocityY"];l.run((function(e){var t=p*e;p*=.98,Math.abs(t)<.01?(l.stop(),w(n,i)):(s(t),a(0))}))}else{var d=o.getDuration(),m=o.getOffset()[e.isHorizontal?"x":"y"],v=Math.ceil(Math.abs(m)/f.boxSize),h=u(m);d>e.longSwipesMs?c(r+h*(m>0?-1:1)):c(m>0?r-v:r+v),w(n,i)}}}}(r,e,t,o),u=c.preheat,l=c.move,f=c.stop;function p(e){var t=a?e.changedTouches[0]:e;return{x:t.pageX,y:t.pageY}}function d(t){for(var n=0;n<r.excludeElements.length;n++)if(r.excludeElements[n].contains(t.target))return;var i,o,c,l,f=e.element.$wrapper,d=r.touchStartPreventDefault&&-1===s.indexOf(t.target.nodeName)||r.touchStartForcePreventDefault;!a&&d&&t.preventDefault(),u(p(t),(i=f,o=r.isHorizontal,c=getComputedStyle(i).transform.replace(/[a-z]|\(|\)|\s/g,"").split(",").map(parseFloat),l=[],16===c.length?l=c.slice(12,14):6===c.length&&(l=c.slice(4,6)),l[o?0:1]||0))}function m(e){r.touchMoveStopPropagation&&e.stopPropagation(),l(p(e)),t.isTouching&&!1!==e.cancelable&&e.preventDefault()}function v(){f()}return{attach:function(){var t=e.element.$el;a?(n(t,"touchstart",d,{passive:r.passiveListeners,capture:!1}),n(t,"touchmove",m),n(t,"touchend",v),n(t,"touchcancel",v)):(n(t,"mousedown",d),n(document,"mousemove",m),n(document,"mouseup",v))},detach:function(){var t=e.element.$el;i(t,"touchstart",d),i(t,"touchmove",m),i(t,"touchend",v),i(t,"touchcancel",v),i(t,"mousedown",d),i(document,"mousemove",m),i(document,"mouseup",v)}}}function b(e,t,n){var i=e.$list,r=t.viewSize,o=t.slideSize,a=t.boxSize,s=function(e){return e.loop?Math.ceil(e.slidesPerView):0}(n),c=s*a,u=-c+(n.centeredSlides?(r-o)/2:0);return{max:u,min:n.spaceBetween+(n.loop?o:r)+u-a*i.length,base:u,expand:s,buffer:c,minIndex:0,maxIndex:i.length-(n.centeredSlides||n.loop?1:Math.ceil(n.slidesPerView))}}function z(e,t){var n={};function i(e){var i=function(e,t){var n=t.$el,i=e.isHorizontal?n.offsetWidth:n.offsetHeight,r=(i-Math.ceil(e.slidesPerView-1)*e.spaceBetween)/e.slidesPerView;return{boxSize:r+e.spaceBetween,viewSize:i,slideSize:r}}(t,e),r=b(e,i,t),o=Boolean("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof DocumentTouch);Object.assign(n,{touchable:o,element:e,measure:i,limitation:r})}return n.update=i,i(e),n}var T="data-shallow-slider",P="data-slider";function E(e,n){function i(i){var r=e.element.$wrapper,o=i.index;r.querySelectorAll("["+P+"]").forEach((function(e){var i,r,a=~~e.getAttribute(P);i=e,void 0===(r=[n.slidePrevClass,n.slideNextClass,n.slideActiveClass])&&(r=[]),Array.isArray(r)||(r=[r]),r.forEach((function(e){return i.classList.contains(e)&&i.classList.remove(e)})),a===o&&t(e,n.slideActiveClass),a===o-1&&t(e,n.slidePrevClass),a===o+1&&t(e,n.slideNextClass)}))}function a(){e.element.$wrapper.querySelectorAll("["+T+"]").forEach((function(t){return e.element.$wrapper.removeChild(t)}))}function s(){e.element.$list.forEach((function(e,t){return r(e,P,t)})),a(),function(){if(n.loop){var t=e.element,i=e.limitation,o=t.$list,a=t.$wrapper,s=i.expand,c=o.slice(-s).map((function(e){return e.cloneNode(!0)})),u=o.slice(0,s).map((function(e){return e.cloneNode(!0)}));c.forEach((function(e,t){a.appendChild(r(u[t],T)),a.insertBefore(r(c[t],T),o[0])}))}}()}function c(){var t,i=e.element,r=e.measure,a=i.$wrapper,s={display:"flex",willChange:"transform",flexDirection:n.isHorizontal?"row":"column"},c=((t={})[n.isHorizontal?"width":"height"]=r.slideSize+"px",t[n.isHorizontal?"margin-right":"margin-bottom"]=n.spaceBetween+"px",t);o(a,s),a.querySelectorAll("["+P+"]").forEach((function(e){return o(e,c)}))}return{init:function(){s(),c()},render:function(t,r,o,a){var s=e.element.$wrapper,c=void 0===r?n.speed:r;n.injections.translate(t,e,n,c),t.isStart||i(t),a&&getComputedStyle(s).transform,o&&setTimeout(o,c)},destroy:function(){var t=e.element,i=t.$list,r=t.$wrapper,o=n.isHorizontal?"margin-right":"margin-bottom";["display","will-change","flex-direction"].forEach((function(e){r.style.removeProperty(e)})),i.forEach((function(e){return e.style.removeProperty(o)})),a()},updateSize:c}}function M(e,t){var n=e-t.max,i=e-t.min;return n>0?n:i<0?i:0}function A(t,n,i,r,o){function a(e){var n=t.measure;return Math.ceil(Math.abs(e)/n.boxSize-i.longSwipesRatio)}function s(e,t,i){r.render(n,e,t,i)}function c(r){var a,s=t.limitation,c=s.min,u=s.max,f=u-c+(i.loop?t.measure.boxSize:0),p=f+1;n.transforms=r,i.loop?(a=(u-r)%p/f,n.progress=a<0?1+a:a>1?a-1:a):(a=(u-r)/f,n.progress=a<0?0:a>1?1:a),o.emit(l,e({},n))}function p(e,r){var l=t.measure,p=t.limitation,d=p.maxIndex-p.minIndex+1,m=i.loop?(e%d+d)%d:e>p.maxIndex?p.maxIndex:e<p.minIndex?p.minIndex:e,v=-m*l.boxSize+p.base;if(0!==a(v-n.transforms)&&i.loop){var h=M(n.transforms,p),x=m-n.index,g=function(e,t,n,i){var r=n.maxIndex,o=(i>0?1:-1)*(n.minIndex-r-1)+t-e;return Math.abs(i)>Math.abs(o)?o:i}(n.index,m,p,x);g===x||h?n.index===m&&c(h>0?p.min-l.boxSize+h:p.max+l.boxSize+h):c(g<0?p.min-l.boxSize:p.max+l.boxSize),s(0,void 0,!0)}o.emit(u,n.index,n,m),n.index=m,c(v),s(r,(function(){o.emit(f,m,n)}))}return{update:function(){p(n.index,0),r.updateSize()},render:s,transform:c,slideTo:p,scrollPixel:function(e){var r=n.transforms,o=t.measure,a=t.limitation,s=Number(e.toExponential().split("e")[1]),u=s<=0?Math.pow(10,-(s-1)):1,l=r;if(i.resistance&&!i.loop&&(e>0&&r>=a.max?e-=Math.pow(e*u,i.resistanceRatio)/u:e<0&&r<=a.min&&(e+=Math.pow(-e*u,i.resistanceRatio)/u)),l+=e,i.loop){var f=n.tracker.vector(),p=i.isHorizontal?f.velocityX:f.velocityY,d=M(r,a);d&&function(e,t,n){return e>0&&t>n.max||e<0&&t<n.min}(p,r,a)&&(l=d>0?a.min-o.boxSize+d:a.max+o.boxSize+d)}c(l)},initStatus:function(e){void 0===e&&(e=0),n.startTransform=e,n.isStart=!1,n.isScrolling=!1,n.isTouching=!1},initLayout:function(e){c(e)},getOffsetSteps:a}}function C(e,t){var n="string"==typeof e?document.body.querySelector(e):e,i=n.querySelector("."+t.wrapperClass),r=[].slice.call(n.getElementsByClassName(t.slideClass));return{$el:n,$wrapper:i,$list:r=r.filter((function(e){return null===e.getAttribute("data-shallow-slider")}))}}var $=function t(n,i){var r,o=function(t){var n=e({},a,t);return e({},n,{isHorizontal:"horizontal"===n.direction})}(i),u=(r={},{on:function(e,t){r[e]?r[e].push(t):r[e]=[t]},off:function(e,t){if(r[e]){var n=r[e].indexOf(t);n>-1&&r[e].splice(n,1)}},emit:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r[e]&&r[e].forEach((function(e){return e.apply(void 0,n)}))},clear:function(){r={}}}),l=z(C(n,o),o),f={tracker:v(),index:0,startTransform:0,isStart:!1,isScrolling:!1,isTouching:!1,transforms:0,progress:0},m=u.on,h=u.off,x=u.emit,g={on:m,off:h,env:l,state:f,options:o};(o.plugins||t.plugins||[]).forEach((function(e){return e(g,o)})),x(s,g);var S=E(l,o),w=A(l,f,o,S,u),b=y(l,f,o,w);var T=w.slideTo;return Object.assign(g,{update:function(){S.destroy(),l.update(C(n,o)),S.init(),w.update()},destroy:function(){x(p,g),b.detach(),S.destroy(),x(d,g),u.clear()},slideTo:T,updateSize:function(){l.update(C(n,o)),w.update()}}),S.init(),b.attach(),T(o.initialSlide,0),x(c,g),g};return $.use=function(e){$.plugins=e},$}()}},t={};!function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}(2590)})();;
(()=>{var e={7152:function(e){e.exports=function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function t(e,t){void 0===t&&(t=[]),Array.isArray(t)||(t=[t]),t.forEach((function(t){return!e.classList.contains(t)&&e.classList.add(t)}))}function n(e,t,n,i){e.addEventListener(t,n,i)}function i(e,t,n){e.removeEventListener(t,n)}function o(e,t,n){return void 0===n&&(n=""),e.setAttribute(t,n),e}function r(e,t,n){return Object.keys(t).forEach((function(n){e.style[n]=t[n]})),n&&getComputedStyle(e),e}var a={direction:"horizontal",touchRatio:1,touchAngle:45,longSwipesRatio:.5,initialSlide:0,loop:!1,freeMode:!1,passiveListeners:!0,resistance:!0,resistanceRatio:.85,speed:300,longSwipesMs:300,spaceBetween:0,slidesPerView:1,centeredSlides:!1,slidePrevClass:"swiper-slide-prev",slideNextClass:"swiper-slide-next",slideActiveClass:"swiper-slide-active",slideClass:"swiper-slide",wrapperClass:"swiper-wrapper",touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchMoveStopPropagation:!1,excludeElements:[],injections:{translate:function(e,t,n,i){r(t.element.$wrapper,{transition:e.isStart?"none":"transform ease "+i+"ms",transform:n.isHorizontal?"translate3d("+e.transforms+"px, 0, 0)":"translate3d(0, "+e.transforms+"px, 0)"})}}},s="before-slide",l="scroll",c="after-slide";var u=180/Math.PI;function d(){var t=[];return{getDuration:function(){var e=t[0],n=t[t.length-1];return e?n.time-e.time:0},getOffset:function(){var e=t[0],n=t[t.length-1];return e?{x:n.x-e.x,y:n.y-e.y}:{x:0,y:0}},getLogs:function(){return t},vector:function(){return i=(n=t).length-1,o=n[i],n=n[i-1]||o,i={x:o.x-n.x,y:o.y-n.y},o=o.time-n.time,n=i.x/o||0,o=i.y/o||0,e({},i,{angle:Math.atan2(Math.abs(i.y),Math.abs(i.x))*u,velocityX:n,velocityY:o});var n,i,o},clear:function(){t=[]},push:function(n){t.push(e({time:Date.now()},n))}}}function p(){return(performance||Date).now()}var f=requestAnimationFrame||webkitRequestAnimationFrame||setTimeout,m=cancelAnimationFrame||webkitCancelAnimationFrame||clearTimeout;function v(){var e=function(){var e,t;return{run:function(n){e=void 0===e?p():e,t=f((function(){var t=p(),i=t-e;e=t,n(i)}))},stop:function(){e=void 0,m(t)}}}();return{run:function t(n){e.run((function(e){t(n),n(e)}))},stop:function(){e.stop()}}}function x(e,t){e=e.tracker,t=t.initStatus,e.clear(),t()}function h(e,t,n,i){var o=i.initLayout,r=i.initStatus,a=i.render,s=i.scrollPixel,l=i.slideTo,c=i.getOffsetSteps,u=v();return{preheat:function(e,t){var i=n.tracker;u.stop(),i.clear(),i.push(e),o(t),r(t),n.isStart=!0,a()},move:function(t){var i,o=n.tracker,r=e.touchRatio,l=e.touchAngle,c=e.isHorizontal;n.isStart&&!n.isScrolling&&(o.push(t),i=o.vector(),((t=o.getOffset()).x||t.y)&&(c&&i.angle<l||!c&&90-i.angle<l||n.isTouching?(r=i[c?"x":"y"]*r,n.isTouching=!0,s(r),a()):(n.isScrolling=!0,o.clear())))},stop:function(){var o,r,d,p=n.index,f=n.tracker,m=t.measure;n.isStart&&(n.isStart=!1,e.freeMode?(o=f.vector()[e.isHorizontal?"velocityX":"velocityY"],u.run((function(e){e*=o,o*=.98,Math.abs(e)<.01?(u.stop(),x(n,i)):(s(e),a(0))}))):(r=f.getDuration(),d=f.getOffset()[e.isHorizontal?"x":"y"],f=Math.ceil(Math.abs(d)/m.boxSize),m=c(d),r>e.longSwipesMs?l(p+m*(0<d?-1:1)):l(0<d?p-f:p+f),x(n,i)))}}}function g(e,t){var n={};return(n.update=function(e){var i,o=function(e,t,n){var i=e.$list,o=t.viewSize,r=t.slideSize,a=t.boxSize,s=-(t=(e=(s=n).loop?Math.ceil(s.slidesPerView):0)*a)+(n.centeredSlides?(o-r)/2:0);return{max:s,min:n.spaceBetween+(n.loop?r:o)+s-a*i.length,base:s,expand:e,buffer:t,minIndex:0,maxIndex:i.length-(n.centeredSlides||n.loop?1:Math.ceil(n.slidesPerView))}}(e,(i=t,r=(o=e).$el,i={boxSize:(r=((o=i.isHorizontal?r.offsetWidth:r.offsetHeight)-Math.ceil(i.slidesPerView-1)*i.spaceBetween)/i.slidesPerView)+i.spaceBetween,viewSize:o,slideSize:r}),t),r=Boolean("ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||window.DocumentTouch&&document instanceof DocumentTouch);Object.assign(n,{touchable:r,element:e,measure:i,limitation:o})})(e),n}var b="data-shallow-slider",y="data-slider";function S(e,n){function i(){e.element.$wrapper.querySelectorAll("["+b+"]").forEach((function(t){return e.element.$wrapper.removeChild(t)}))}function a(){var t=e.element,i=e.measure,o=t.$wrapper,a={display:"flex",willChange:"transform",flexDirection:n.isHorizontal?"row":"column"},s=((t={})[n.isHorizontal?"width":"height"]=i.slideSize+"px",t[n.isHorizontal?"margin-right":"margin-bottom"]=n.spaceBetween+"px",t);r(o,a),o.querySelectorAll("["+y+"]").forEach((function(e){return r(e,s)}))}return{init:function(){(function(){var t,r,a,s,l,c;e.element.$list.forEach((function(e,t){return o(e,y,t)})),i(),n.loop&&(t=e.element,s=e.limitation,r=t.$list,a=t.$wrapper,s=s.expand,l=r.slice(-s).map((function(e){return e.cloneNode(!0)})),c=r.slice(0,s).map((function(e){return e.cloneNode(!0)})),l.forEach((function(e,t){a.appendChild(o(c[t],b)),a.insertBefore(o(l[t],b),r[0])})))})(),a()},render:function(i,o,r,a){var s=e.element.$wrapper;o=void 0===o?n.speed:o,n.injections.translate(i,e,n,o),i.isStart||function(i){var o=e.element.$wrapper,r=i.index;o.querySelectorAll("["+y+"]").forEach((function(e){var i,o,a=~~e.getAttribute(y);i=e,void 0===(o=[n.slidePrevClass,n.slideNextClass,n.slideActiveClass])&&(o=[]),Array.isArray(o)||(o=[o]),o.forEach((function(e){return i.classList.contains(e)&&i.classList.remove(e)})),a===r&&t(e,n.slideActiveClass),a==r-1&&t(e,n.slidePrevClass),a===r+1&&t(e,n.slideNextClass)}))}(i),a&&getComputedStyle(s).transform,r&&setTimeout(r,o)},destroy:function(){var t=e.element,o=t.$list,r=t.$wrapper,a=n.isHorizontal?"margin-right":"margin-bottom";["display","will-change","flex-direction"].forEach((function(e){r.style.removeProperty(e)})),o.forEach((function(e){return e.style.removeProperty(a)})),i()},updateSize:a}}function w(e,t){var n=e-t.max;return t=e-t.min,0<n?n:t<0?t:0}function E(t,n,i,o,r){function a(e){var n=t.measure;return Math.ceil(Math.abs(e)/n.boxSize-i.longSwipesRatio)}function u(e,t,i){o.render(n,e,t,i)}function d(o){var a,s,c=(s=t.limitation).min,u=s.max;c=(s=u-c+(i.loop?t.measure.boxSize:0))+1,n.transforms=o,i.loop?(a=(u-o)%c/s,n.progress=a<0?1+a:1<a?a-1:a):(a=(u-o)/s,n.progress=a<0?0:1<a?1:a),r.emit(l,e({},n))}function p(e,o){var l,p,f,m,v,x=t.measure,h=t.limitation,g=h.maxIndex-h.minIndex+1,b=i.loop?(e%g+g)%g:e>h.maxIndex?h.maxIndex:e<h.minIndex?h.minIndex:e,y=-b*x.boxSize+h.base;0!==a(y-n.transforms)&&i.loop&&(l=w(n.transforms,h),p=b-n.index,f=n.index,m=b,v=p,e=(g=h).maxIndex,f=(0<v?1:-1)*(g.minIndex-e-1)+m-f,(v=Math.abs(v)>Math.abs(f)?f:v)===p||l?n.index===b&&d(0<l?h.min-x.boxSize+l:h.max+x.boxSize+l):d(v<0?h.min-x.boxSize:h.max+x.boxSize),u(0,void 0,!0)),r.emit(s,n.index,n,b),n.index=b,d(y),u(o,(function(){r.emit(c,b,n)}))}return{update:function(){p(n.index,0),o.updateSize()},render:u,transform:d,slideTo:p,scrollPixel:function(e){var o,r=n.transforms,a=t.measure,s=t.limitation,l=(o=Number(e.toExponential().split("e")[1]))<=0?Math.pow(10,-(o-1)):1,c=r;i.resistance&&!i.loop&&(0<e&&r>=s.max?e-=Math.pow(e*l,i.resistanceRatio)/l:e<0&&r<=s.min&&(e+=Math.pow(-e*l,i.resistanceRatio)/l)),c+=e,i.loop&&(o=n.tracker.vector(),l=i.isHorizontal?o.velocityX:o.velocityY,(e=w(r,s))&&(o=r,r=s,0<l&&o>r.max||l<0&&o<r.min)&&(c=0<e?s.min-a.boxSize+e:s.max+a.boxSize+e)),d(c)},initStatus:function(e){void 0===e&&(e=0),n.startTransform=e,n.isStart=!1,n.isScrolling=!1,n.isTouching=!1},initLayout:function(e){d(e)},getOffsetSteps:a}}function z(e,t){var n="string"==typeof e?document.body.querySelector(e):e;return e=n.querySelector("."+t.wrapperClass),t=[].slice.call(n.getElementsByClassName(t.slideClass)),{$el:n,$wrapper:e,$list:t=t.filter((function(e){return null===e.getAttribute("data-shallow-slider")}))}}function L(t,o){var r=(u=e({},a,u=o),e({},u,{isHorizontal:"horizontal"===u.direction})),s=function(){var e={};return{on:function(t,n){e[t]?e[t].push(n):e[t]=[n]},off:function(t,n){!e[t]||-1<(n=e[t].indexOf(n))&&e[t].splice(n,1)},emit:function(t){for(var n=arguments.length,i=new Array(1<n?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];e[t]&&e[t].forEach((function(e){return e.apply(void 0,i)}))},clear:function(){e={}}}}(),l=g(z(t,r),r),c={tracker:d(),index:0,startTransform:0,isStart:!1,isScrolling:!1,isTouching:!1,transforms:0,progress:0},u=(o=s.on,s.off),p=s.emit,f={on:o,off:u,env:l,state:c,options:r};(r.plugins||L.plugins||[]).forEach((function(e){return e(f,r)})),p("before-init",f);var m=S(l,r),v=E(l,c,r,m,s),x=function(e,t,o,r){var a=e.touchable,s=["INPUT","SELECT","OPTION","TEXTAREA","BUTTON","VIDEO"],l=(r=h(o,e,t,r)).preheat,c=r.move,u=r.stop;function d(e){return{x:(e=a?e.changedTouches[0]:e).pageX,y:e.pageY}}function p(t){for(var n=0;n<o.excludeElements.length;n++)if(o.excludeElements[n].contains(t.target))return;var i,r=e.element.$wrapper,c=o.touchStartPreventDefault&&-1===s.indexOf(t.target.nodeName)||o.touchStartForcePreventDefault;!a&&c&&t.preventDefault(),l(d(t),(i=r,c=o.isHorizontal,r=getComputedStyle(i).transform.replace(/[a-z]|\(|\)|\s/g,"").split(",").map(parseFloat),i=[],16===r.length?i=r.slice(12,14):6===r.length&&(i=r.slice(4,6)),i[c?0:1]||0))}function f(e){o.touchMoveStopPropagation&&e.stopPropagation(),c(d(e)),t.isTouching&&!1!==e.cancelable&&e.preventDefault()}function m(){u()}return{attach:function(){var t=e.element.$el;a?(n(t,"touchstart",p,{passive:o.passiveListeners,capture:!1}),n(t,"touchmove",f),n(t,"touchend",m),n(t,"touchcancel",m)):(n(t,"mousedown",p),n(document,"mousemove",f),n(document,"mouseup",m))},detach:function(){var t=e.element.$el;i(t,"touchstart",p),i(t,"touchmove",f),i(t,"touchend",m),i(t,"touchcancel",m),i(t,"mousedown",p),i(document,"mousemove",f),i(document,"mouseup",m)}}}(l,c,r,v);return c=v.slideTo,Object.assign(f,{update:function(){m.destroy(),l.update(z(t,r)),m.init(),v.update()},destroy:function(){p("before-destroy",f),x.detach(),m.destroy(),p("after-destroy",f),s.clear()},slideTo:c,updateSize:function(){l.update(z(t,r)),v.update()}}),m.init(),x.attach(),c(r.initialSlide,0),p("after-init",f),f}return L.use=function(e){L.plugins=e},L}()},3266:function(e){e.exports=function(){"use strict";function e(e,t,n,i){e.addEventListener(t,n,i)}function t(e,t,n){e.removeEventListener(t,n)}return function(n,i){function o(e){c(e.target,"next")}function r(e){c(e.target,"prev")}var a=Boolean(i.navigation),s={nextEl:null,prevEl:null},l=Object.assign({disabledClass:"swiper-button-disabled"},i.navigation),c=function(e,t){u(e)&&!n.options.loop||(e=n.state.index,"next"===t&&n.slideTo(e+1),"prev"===t&&n.slideTo(e-1))},u=function(e){return e.classList.contains(l.disabledClass)};n.on("before-slide",(function(e,t,i){var o,r;n.options.loop||(o=i,i=(r=n.env.limitation).minIndex,r=r.maxIndex,s&&s.prevEl&&s.nextEl&&(s.nextEl.classList.contains(l.disabledClass)&&i<=o&&s.nextEl.classList.remove(l.disabledClass),s.prevEl.classList.contains(l.disabledClass)&&o<=r&&s.prevEl.classList.remove(l.disabledClass),o===i&&s.prevEl.classList.add(l.disabledClass),o===r&&s.nextEl.classList.add(l.disabledClass)))})),n.on("after-init",(function(){var t,i,c;a&&(s.nextEl="string"==typeof l.nextEl?document.body.querySelector(l.nextEl):l.nextEl,s.prevEl="string"==typeof l.prevEl?document.body.querySelector(l.prevEl):l.prevEl,n.options.loop||(t=n.state.index,i=n.env.element.$list,t===(c=n.env.limitation.minIndex)&&s.prevEl&&s.prevEl.classList.add(l.disabledClass),i.length===c&&s.nextEl&&s.nextEl.classList.add(l.disabledClass)),e(s.nextEl,"click",o),e(s.prevEl,"click",r))})),n.on("after-destroy",(function(){s&&s.prevEl&&s.nextEl&&(t(s.nextEl,"click",o),t(s.prevEl,"click",r),delete s.nextEl,delete s.prevEl)}))}}()}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(7152),t=n.n(e),i=n(3266),o=n.n(i);!function(){const e=document.querySelectorAll(".wp-block-coblocks-gallery-carousel");for(let n=0;n<e.length;n++){let i=null,r=0,a=!1;const s=e[n],l=e=>{const t=s.querySelector(`.wp-block-coblocks-gallery-carousel-thumbnail-${r}`);if(t){t.classList.remove("is-active");const n=s.querySelector(`.wp-block-coblocks-gallery-carousel-thumbnail-${e}`);n&&n.classList.add("is-active")}},c=e=>{i?.slideTo(e),l(e),r=e},u=e=>{e!==r&&(l(e),r=e)},d=s.querySelector(".swiper-container");if(d){const e=d.getAttribute("data-swiper");if(e){const n=JSON.parse(e),r=s.querySelector(".nav-button__prev"),l=s.querySelector(".nav-button__next");r&&r.setAttribute("aria-label",coblocksTinyswiper.carouselPrevButtonAriaLabel),l&&l.setAttribute("aria-label",coblocksTinyswiper.carouselNextButtonAriaLabel);const p=s.querySelectorAll("img");for(let e=0;e<p.length;++e)p[e].alt||(p[e].alt=coblocksTinyswiper.sliderImageAriaLabel);const f={centeredSlides:!1,freeMode:!1,longSwipesRatio:.8,loop:!1,passiveListeners:!0,plugins:[],slidesPerView:1};if(!0===n.loop&&(f.loop=n.loop),n.slidesPerView&&(f.slidesPerView=n.slidesPerView),n.navigation&&(f.plugins=[...f.plugins,o()],f.navigation={nextEl:l,prevEl:r}),i=new(t())(d,f),new ResizeObserver((()=>{i.update()})).observe(d),n.thumbnails){const e=s.querySelectorAll(".wp-block-coblocks-gallery-carousel-thumbnail");for(const[t,n]of Object.entries(e))n.addEventListener("click",(()=>c(t)));const t=s.querySelector(".wp-block-coblocks-gallery-carousel-thumbnail-0");t&&t.classList.add("is-active")}if(!n.thumbnails&&n.pageDots){const e=s.querySelectorAll(".wp-block-coblocks-gallery-carousel-page-dot-pagination");for(const[t,n]of Object.entries(e))n.addEventListener("click",(()=>c(t)));const t=s.querySelector(".wp-block-coblocks-gallery-carousel-page-dot--0");t&&t.classList.add("is-active")}if(!0!==n.draggable){const e=s.querySelector(".swiper-wrapper");e?.addEventListener("mousedown",(e=>{e.stopPropagation()}))}!0===n.autoPlay&&n.autoPlaySpeed&&(!0===n.pauseHover&&(d.addEventListener("mouseenter",(()=>{a=!0})),d.addEventListener("mouseleave",(()=>{a=!1}))),setInterval((()=>{!0===n.pauseHover&&!0===a||i?.slideTo(i.state.index+1)}),n.autoPlaySpeed)),i.on("after-slide",u)}}}}()})()})();;
var Common = function () { var abortObjects = [], javaScriptInfoLoggingEnabled = !1, javaScriptTraceLoggingEnabled = !1; return { init: function () { Common.logInfo("Common.init..."), jQuery(document).delegate("ul.wpem-tabs-wrap li.wpem-tab-link", "click", Common.tabChanged), window.addEventListener("keydown", function (o) { 27 === o.keyCode && jQuery(".wpem-modal-close").length > 0 && jQuery(".wpem-modal-close").trigger("click") }), jQuery(".wpem-modal-button").click(function () { jQuery("body").addClass("wpem-modal-open"); var o = jQuery(this).attr("data-modal-id"); jQuery("#" + o).length > 0 && jQuery("#" + o).addClass("wpem-modal-open") }), jQuery(".wpem-modal-overlay").click(function () { jQuery("body").removeClass("wpem-modal-open"), jQuery(".wpem-modal").removeClass("wpem-modal-open") }), jQuery("#submit-organizer-form").submit(function (o) { jQuery("#submit-organizer-form").css("pointer-events", "none") }), jQuery("#submit-venue-form").submit(function (o) { jQuery("#submit-venue-form").css("pointer-events", "none") }), jQuery(".wpem-modal-close").click(function () { jQuery("body").removeClass("wpem-modal-open"), jQuery(".wpem-modal").removeClass("wpem-modal-open") }), jQuery(".wpem-listing-accordion").length > 0 && jQuery(".wpem-listing-accordion").click(function () { this.classList.toggle("active"); var o = this.nextElementSibling; "block" === o.style.display ? o.style.display = "none" : o.style.display = "block" }) }, tabChanged: function (o) { jQuery(this).addClass("active").parents("ul.wpem-tabs-wrap").find("li").not(jQuery(this)).removeClass("active"); var e = jQuery(this).data("tab"); jQuery(this).closest(".wpem-tabs-wrapper").find(".wpem-tab-content .wpem-tab-pane").not("#" + e).removeClass("active"), jQuery(this).closest(".wpem-tabs-wrapper").find(".wpem-tab-content .wpem-tab-pane#" + e).addClass("active") }, jsonToString: function (o) { return void 0 === o ? "" : JSON.stringify(o) }, stringToJson: function (jsonString) { if (Common.logInfo("stringToJson..."), void 0 !== jsonString && 0 !== jsonString.length) return eval("(" + jsonString + ")") }, getCurrentDateTime: function () { var o = new Date, e = o.getMonth() + 1; return o.getFullYear() + "-" + e + "-" + o.getDate() + " " + o.getHours() + ":" + o.getMinutes() + ":" + o.getSeconds() }, setLogValue: function (o) { void 0 !== o && 0 !== o.length && (javaScriptInfoLoggingEnabled = o) }, setTraceValue: function (o) { void 0 !== o && 0 !== o.length && (javaScriptTraceLoggingEnabled = o) }, logInfo: function (o) { javaScriptInfoLoggingEnabled && window.console && console.log(o) }, logTrace: function (o) { javaScriptTraceLoggingEnabled && window.console && console.log(o) }, logForce: function (o) { window.console && console.log(o) }, logError: function (o) { window.console && console.error(o) }, htmlEncode: function (o) { if (void 0 !== o && 0 !== o.length) return escape(o) }, htmlDecode: function (o) { if (void 0 !== o && 0 !== o.length) return unescape(o) }, validateEmail: function (o) { Common.logInfo("Common.validateEmail..."); return /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/.test(o) }, validatePincode: function (o) { Common.logInfo("Common.validatePincode..."); return /^[0-9]+$/.test(o) }, validateName: function (o) { Common.logInfo("Common.validateName..."); return /[A-Za-z \-_.\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/.test(o) }, isURL: function (o) { Common.logInfo("Common.isURL..."); var e = new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"); return o.length < 2083 && e.test(o) }, showToggleContent: function (o) { Common.logInfo("Common.actions.showToggleContent..."), jQuery(this).toggleClass("wpem-active-button"), o.preventDefault() }, hideToggleContent: function (o) { Common.logInfo("Common.actions.hideToggleContent..."), o.preventDefault() } } }; Common = Common(), jQuery(document).ready(function (o) { Common.init() });;
/*! jQuery UI - v1.13.3 - 2024-04-26
* https://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
/*!
* jQuery UI :data 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
/*!
* jQuery UI Disable Selection 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
/*!
* jQuery UI Focusable 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
/*!
* jQuery UI Form Reset Mixin 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
/*!
* jQuery UI Support for jQuery core 1.8.x and newer 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*
*/
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"<22>":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
/*!
* jQuery UI Keycode 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
/*!
* jQuery UI Labels 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
/*!
* jQuery UI Position 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*
* https://api.jqueryui.com/position/
*/
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;e.collisionWidth>n?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;e.collisionHeight>o?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
/*!
* jQuery UI Scroll Parent 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
/*!
* jQuery UI Tabbable 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
/*!
* jQuery UI Unique ID 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
/*!
* jQuery UI Widget 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});;
/*!
* jquery-timepicker v1.11.14 - A jQuery timepicker plugin inspired by Google Calendar. It supports both mouse and keyboard navigation.
* Copyright (c) 2018 Jon Thornton - http://jonthornton.github.com/jquery-timepicker/
* License: MIT
*/
!function(a){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){var b=a[0];return b.offsetWidth>0&&b.offsetHeight>0}function c(b){if(b.minTime&&(b.minTime=t(b.minTime)),b.maxTime&&(b.maxTime=t(b.maxTime)),b.durationTime&&"function"!=typeof b.durationTime&&(b.durationTime=t(b.durationTime)),"now"==b.scrollDefault)b.scrollDefault=function(){return b.roundingFunction(t(new Date),b)};else if(b.scrollDefault&&"function"!=typeof b.scrollDefault){var c=b.scrollDefault;b.scrollDefault=function(){return b.roundingFunction(t(c),b)}}else b.minTime&&(b.scrollDefault=function(){return b.roundingFunction(b.minTime,b)});if("string"===a.type(b.timeFormat)&&b.timeFormat.match(/[gh]/)&&(b._twelveHourTime=!0),b.showOnFocus===!1&&b.showOn.indexOf("focus")!=-1&&b.showOn.splice(b.showOn.indexOf("focus"),1),b.disableTimeRanges.length>0){for(var d in b.disableTimeRanges)b.disableTimeRanges[d]=[t(b.disableTimeRanges[d][0]),t(b.disableTimeRanges[d][1])];b.disableTimeRanges=b.disableTimeRanges.sort(function(a,b){return a[0]-b[0]});for(var d=b.disableTimeRanges.length-1;d>0;d--)b.disableTimeRanges[d][0]<=b.disableTimeRanges[d-1][1]&&(b.disableTimeRanges[d-1]=[Math.min(b.disableTimeRanges[d][0],b.disableTimeRanges[d-1][0]),Math.max(b.disableTimeRanges[d][1],b.disableTimeRanges[d-1][1])],b.disableTimeRanges.splice(d,1))}return b}function d(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");if(d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),c.useSelect){d=a("<select />",{"class":"ui-timepicker-select"}),b.attr("name")&&d.attr("name","ui-timepicker-"+b.attr("name"));var g=d}else{d=a("<ul />",{"class":"ui-timepicker-list"});var g=a("<div />",{"class":"ui-timepicker-wrapper",tabindex:-1});g.css({display:"none",position:"absolute"}).append(d)}if(c.noneOption)if(c.noneOption===!0&&(c.noneOption=c.useSelect?"Time...":"None"),a.isArray(c.noneOption)){for(var i in c.noneOption)if(parseInt(i,10)==i){var k=e(c.noneOption[i],c.useSelect);d.append(k)}}else{var k=e(c.noneOption,c.useSelect);d.append(k)}if(c.className&&g.addClass(c.className),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){"function"==typeof c.step?"function":c.step;g.addClass("ui-timepicker-with-duration"),g.addClass("ui-timepicker-step-"+c.step)}var l=c.minTime;"function"==typeof c.durationTime?l=t(c.durationTime()):null!==c.durationTime&&(l=c.durationTime);var n=null!==c.minTime?c.minTime:0,o=null!==c.maxTime?c.maxTime:n+v-1;o<n&&(o+=v),o===v-1&&"string"===a.type(c.timeFormat)&&c.show2400&&(o=v);var p=c.disableTimeRanges,w=0,x=p.length,z=c.step;"function"!=typeof z&&(z=function(){return c.step});for(var i=n,A=0;i<=o;A++,i+=60*z(A)){var B=i,C=s(B,c);if(c.useSelect){var D=a("<option />",{value:C});D.text(C)}else{var D=a("<li />");D.addClass(B%v<v/2?"ui-timepicker-am":"ui-timepicker-pm"),D.data("time",u(B,c)),D.text(C)}if((null!==c.minTime||null!==c.durationTime)&&c.showDuration){var E=r(i-l,c.step);if(c.useSelect)D.text(D.text()+" ("+E+")");else{var F=a("<span />",{"class":"ui-timepicker-duration"});F.text(" ("+E+")"),D.append(F)}}w<x&&(B>=p[w][1]&&(w+=1),p[w]&&B>=p[w][0]&&B<p[w][1]&&(c.useSelect?D.prop("disabled",!0):D.addClass("ui-timepicker-disabled"))),d.append(D)}if(g.data("timepicker-input",b),b.data("timepicker-list",g),c.useSelect)b.val()&&d.val(f(t(b.val()),c)),d.on("focus",function(){a(this).data("timepicker-input").trigger("showTimepicker")}),d.on("blur",function(){a(this).data("timepicker-input").trigger("hideTimepicker")}),d.on("change",function(){m(b,a(this).val(),"select")}),m(b,d.val(),"initial"),b.hide().after(d);else{var G=c.appendTo;"string"==typeof G?G=a(G):"function"==typeof G&&(G=G(b)),G.append(g),j(b,d),d.on("mousedown click","li",function(c){b.off("focus.timepicker"),b.on("focus.timepicker-ie-hack",function(){b.off("focus.timepicker-ie-hack"),b.on("focus.timepicker",y.show)}),h(b)||b[0].focus(),d.find("li").removeClass("ui-timepicker-selected"),a(this).addClass("ui-timepicker-selected"),q(b)&&(b.trigger("hideTimepicker"),d.on("mouseup.timepicker click.timepicker","li",function(a){d.off("mouseup.timepicker click.timepicker"),g.hide()}))})}}function e(b,c){var d,e,f;return"object"==typeof b?(d=b.label,e=b.className,f=b.value):"string"==typeof b?(d=b,f=""):a.error("Invalid noneOption value"),c?a("<option />",{value:f,"class":e,text:d}):a("<li />",{"class":e,text:d}).data("time",String(f))}function f(a,b){if(a=b.roundingFunction(a,b),null!==a)return s(a,b)}function g(b){if(b.target!=window){var c=a(b.target);c.closest(".ui-timepicker-input").length||c.closest(".ui-timepicker-wrapper").length||(y.hide(),a(document).unbind(".ui-timepicker"),a(window).unbind(".ui-timepicker"))}}function h(a){var b=a.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&b.disableTouchKeyboard}function i(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,d=e.roundingFunction(d,e);return c.find("li").each(function(b,c){var e=a(c);if("number"==typeof e.data("time"))return e.data("time")==d?(f=e,!1):void 0}),f}function j(a,b){b.find("li").removeClass("ui-timepicker-selected");var c=a.data("timepicker-settings"),d=t(l(a),c);if(null!==d){var e=i(a,b,d);if(e){var f=e.offset().top-b.offset().top;(f+e.outerHeight()>b.outerHeight()||f<0)&&b.scrollTop(b.scrollTop()+e.position().top-e.outerHeight()),(c.forceRoundTime||e.data("time")===d)&&e.addClass("ui-timepicker-selected")}}}function k(b,c){if("timepicker"!=c){var d=a(this);if(""===this.value)return void m(d,null,c);if(!d.is(":focus")||b&&"change"==b.type){var e=d.data("timepicker-settings"),f=t(this.value,e);if(null===f)return void d.trigger("timeFormatError");var g=!1;if(null!==e.minTime&&null!==e.maxTime&&(f<e.minTime||f>e.maxTime)&&(g=!0),a.each(e.disableTimeRanges,function(){if(f>=this[0]&&f<this[1])return g=!0,!1}),e.forceRoundTime){var h=e.roundingFunction(f,e);h!=f&&(f=h,c=null)}var i=s(f,e);g?(m(d,i,"error")||b&&"change"==b.type)&&d.trigger("timeRangeError"):m(d,i,c)}}}function l(a){return a.is("input")?a.val():a.data("ui-timepicker-value")}function m(a,b,c){if(a.is("input")){a.val(b);var d=a.data("timepicker-settings");d.useSelect&&"select"!=c&&a.data("timepicker-list")&&a.data("timepicker-list").val(f(t(b),d))}return a.data("ui-timepicker-value")!=b?(a.data("ui-timepicker-value",b),"select"==c?a.trigger("selectTime").trigger("changeTime").trigger("change","timepicker"):["error","initial"].indexOf(c)==-1&&a.trigger("changeTime"),!0):(["error","initial"].indexOf(c)==-1&&a.trigger("selectTime"),!1)}function n(a){switch(a.keyCode){case 13:case 9:return;default:a.preventDefault()}}function o(c){var d=a(this),e=d.data("timepicker-list");if(!e||!b(e)){if(40!=c.keyCode)return!0;y.show.call(d.get(0)),e=d.data("timepicker-list"),h(d)||d.focus()}switch(c.keyCode){case 13:return q(d)&&(k.call(d.get(0),{type:"change"}),y.hide.apply(this)),c.preventDefault(),!1;case 38:var f=e.find(".ui-timepicker-selected");return f.length?f.is(":first-child")||(f.removeClass("ui-timepicker-selected"),f.prev().addClass("ui-timepicker-selected"),f.prev().position().top<f.outerHeight()&&e.scrollTop(e.scrollTop()-f.outerHeight())):(e.find("li").each(function(b,c){if(a(c).position().top>0)return f=a(c),!1}),f.addClass("ui-timepicker-selected")),!1;case 40:return f=e.find(".ui-timepicker-selected"),0===f.length?(e.find("li").each(function(b,c){if(a(c).position().top>0)return f=a(c),!1}),f.addClass("ui-timepicker-selected")):f.is(":last-child")||(f.removeClass("ui-timepicker-selected"),f.next().addClass("ui-timepicker-selected"),f.next().position().top+2*f.outerHeight()>e.outerHeight()&&e.scrollTop(e.scrollTop()+f.outerHeight())),!1;case 27:e.find("li").removeClass("ui-timepicker-selected"),y.hide();break;case 9:y.hide();break;default:return!0}}function p(c){var d=a(this),e=d.data("timepicker-list"),f=d.data("timepicker-settings");if(!e||!b(e)||f.disableTextInput)return!0;if("paste"===c.type||"cut"===c.type)return void setTimeout(function(){f.typeaheadHighlight?j(d,e):e.hide()},0);switch(c.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:f.typeaheadHighlight?j(d,e):e.hide()}}function q(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");return!e.hasClass("ui-timepicker-disabled")&&(e.length&&(d=e.data("time")),null!==d&&("string"!=typeof d&&(d=s(d,b)),m(a,d,"select")),!0)}function r(a,b){a=Math.abs(a);var c,d,e=Math.round(a/60),f=[];return e<60?f=[e,w.mins]:(c=Math.floor(e/60),d=e%60,30==b&&30==d&&(c+=w.decimal+5),f.push(c),f.push(1==c?w.hr:w.hrs),30!=b&&d&&(f.push(d),f.push(w.mins))),f.join(" ")}function s(b,c){if("number"!=typeof b)return null;var d=parseInt(b%60),e=parseInt(b/60%60),f=parseInt(b/3600%24),g=new Date(1970,0,2,f,e,d,0);if(isNaN(g.getTime()))return null;if("function"===a.type(c.timeFormat))return c.timeFormat(g);for(var h,i,j="",k=0;k<c.timeFormat.length;k++)switch(i=c.timeFormat.charAt(k)){case"a":j+=g.getHours()>11?w.pm:w.am;break;case"A":j+=g.getHours()>11?w.PM:w.AM;break;case"g":h=g.getHours()%12,j+=0===h?"12":h;break;case"G":h=g.getHours(),b===v&&(h=c.show2400?24:0),j+=h;break;case"h":h=g.getHours()%12,0!==h&&h<10&&(h="0"+h),j+=0===h?"12":h;break;case"H":h=g.getHours(),b===v&&(h=c.show2400?24:0),j+=h>9?h:"0"+h;break;case"i":var e=g.getMinutes();j+=e>9?e:"0"+e;break;case"s":d=g.getSeconds(),j+=d>9?d:"0"+d;break;case"\\":k++,j+=c.timeFormat.charAt(k);break;default:j+=i}return j}function t(a,b){if(""===a||null===a)return null;if("object"==typeof a)return 3600*a.getHours()+60*a.getMinutes()+a.getSeconds();if("string"!=typeof a)return a;a=a.toLowerCase().replace(/[\s\.]/g,""),"a"!=a.slice(-1)&&"p"!=a.slice(-1)||(a+="m");var c="("+w.am.replace(".","")+"|"+w.pm.replace(".","")+"|"+w.AM.replace(".","")+"|"+w.PM.replace(".","")+")?",d=new RegExp("^"+c+"([0-9]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?"+c+"$"),e=a.match(d);if(!e)return null;var f=parseInt(1*e[2],10),g=e[1]||e[5],h=f,i=1*e[3]||0,j=1*e[4]||0;if(f<=12&&g){var k=g==w.pm||g==w.PM;h=12==f?k?12:0:f+(k?12:0)}else if(b){var l=3600*f+60*i+j;if(l>=v+(b.show2400?1:0)){if(b.wrapHours===!1)return null;h=f%24}}var m=3600*h+60*i+j;if(f<12&&!g&&b&&b._twelveHourTime&&b.scrollDefault){var n=m-b.scrollDefault();n<0&&n>=v/-2&&(m=(m+v/2)%v)}return m}function u(a,b){return a==v&&b.show2400?a:a%v}var v=86400,w={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},x={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:function(a,b){if(null===a)return null;if("number"!=typeof b.step)return a;var c=a%(60*b.step),d=b.minTime||0;return c-=d%(60*b.step),c>=30*b.step?a+=60*b.step-c:a-=c,u(a,b)},scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0},y={init:function(b){return this.each(function(){var e=a(this),f=[];for(var g in x)e.data(g)&&(f[g]=e.data(g));var h=a.extend({},x,b,f);if(h.lang&&(w=a.extend(w,h.lang)),h=c(h),e.data("timepicker-settings",h),e.addClass("ui-timepicker-input"),h.useSelect)d(e);else{if(e.prop("autocomplete","off"),h.showOn)for(var i in h.showOn)e.on(h.showOn[i]+".timepicker",y.show);e.on("change.timepicker",k),e.on("keydown.timepicker",o),e.on("keyup.timepicker",p),h.disableTextInput&&e.on("keydown.timepicker",n),e.on("cut.timepicker",p),e.on("paste.timepicker",p),k.call(e.get(0),null,"initial")}})},show:function(c){var e=a(this),f=e.data("timepicker-settings");if(c&&c.preventDefault(),f.useSelect)return void e.data("timepicker-list").focus();h(e)&&e.blur();var k=e.data("timepicker-list");if(!e.prop("readonly")&&(k&&0!==k.length&&"function"!=typeof f.durationTime||(d(e),k=e.data("timepicker-list")),!b(k))){e.data("ui-timepicker-value",e.val()),j(e,k),y.hide(),k.show();var m={};f.orientation.match(/r/)?m.left=e.offset().left+e.outerWidth()-k.outerWidth()+parseInt(k.css("marginLeft").replace("px",""),10):m.left=e.offset().left+parseInt(k.css("marginLeft").replace("px",""),10);var n;n=f.orientation.match(/t/)?"t":f.orientation.match(/b/)?"b":e.offset().top+e.outerHeight(!0)+k.outerHeight()>a(window).height()+a(window).scrollTop()?"t":"b","t"==n?(k.addClass("ui-timepicker-positioned-top"),m.top=e.offset().top-k.outerHeight()+parseInt(k.css("marginTop").replace("px",""),10)):(k.removeClass("ui-timepicker-positioned-top"),m.top=e.offset().top+e.outerHeight()+parseInt(k.css("marginTop").replace("px",""),10)),k.offset(m);var o=k.find(".ui-timepicker-selected");if(!o.length){var p=t(l(e));null!==p?o=i(e,k,p):f.scrollDefault&&(o=i(e,k,f.scrollDefault()))}if(o.length&&!o.hasClass("ui-timepicker-disabled")||(o=k.find("li:not(.ui-timepicker-disabled):first")),o&&o.length){var q=k.scrollTop()+o.position().top-o.outerHeight();k.scrollTop(q)}else k.scrollTop(0);return f.stopScrollPropagation&&a(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",function(b){b.preventDefault();var c=a(this).scrollTop();a(this).scrollTop(c+b.originalEvent.deltaY)}),a(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",g),a(window).on("resize.ui-timepicker",g),f.closeOnWindowScroll&&a(document).on("scroll.ui-timepicker",g),e.trigger("showTimepicker"),this}},hide:function(c){var d=a(this),e=d.data("timepicker-settings");return e&&e.useSelect&&d.blur(),a(".ui-timepicker-wrapper").each(function(){var c=a(this);if(b(c)){var d=c.data("timepicker-input"),e=d.data("timepicker-settings");e&&e.selectOnBlur&&q(d),c.hide(),d.trigger("hideTimepicker")}}),this},option:function(b,e){return"string"==typeof b&&"undefined"==typeof e?a(this).data("timepicker-settings")[b]:this.each(function(){var f=a(this),g=f.data("timepicker-settings"),h=f.data("timepicker-list");"object"==typeof b?g=a.extend(g,b):"string"==typeof b&&(g[b]=e),g=c(g),f.data("timepicker-settings",g),k.call(f.get(0),{type:"change"},"initial"),h&&(h.remove(),f.data("timepicker-list",!1)),g.useSelect&&d(f)})},getSecondsFromMidnight:function(){return t(l(this))},getTime:function(a){var b=this,c=l(b);if(!c)return null;var d=t(c);if(null===d)return null;a||(a=new Date);var e=new Date(a);return e.setHours(d/3600),e.setMinutes(d%3600/60),e.setSeconds(d%60),e.setMilliseconds(0),e},isVisible:function(){var a=this,c=a.data("timepicker-list");return!(!c||!b(c))},setTime:function(a){var b=this,c=b.data("timepicker-settings");if(c.forceRoundTime)var d=f(t(a),c);else var d=s(t(a),c);return a&&null===d&&c.noneOption&&(d=a),m(b,d,"initial"),k.call(b.get(0),{type:"change"},"initial"),b.data("timepicker-list")&&j(b,b.data("timepicker-list")),this},remove:function(){var a=this;if(a.hasClass("ui-timepicker-input")){var b=a.data("timepicker-settings");return a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),b.useSelect&&a.show(),a.removeData("timepicker-list"),this}}};a.fn.timepicker=function(b){return this.length?y[b]?this.hasClass("ui-timepicker-input")?y[b].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.timepicker"):y.init.apply(this,arguments):this}});
;
/**
* Theme functions file.
*
* Contains handlers for the navigation and other elements.
*/
( function( $ ) {
// Add some nice underlines to the posts navigation
$( '.post-navigation a' ).each( function( i, node ) {
node.innerHTML = '<span>' + node.innerHTML + '</span>';
} );
// Remove empty .entry-headers
$( '.entry-header' ).each( function(i, node ) {
if ( 0 === $( node ).children().length ) {
$( node ).remove();
}
} );
// Remove underline from links with images
$(' .entry-content a img ').each( function( i, node ) {
$( node ).parents( 'a' ).addClass( 'no-underline' );
} );
// Initialize the mobile navigation interface
( function() {
var primaryMenu = $( '#primary-menu' );
// Clone the nav to create the mobile nav
if ( primaryMenu.length ) {
var mobileMenu = primaryMenu.clone()
.attr( 'id', 'mobile-menu' )
.appendTo( '#masthead .site-header-main' )
.wrap( '<nav id="mobile-navigation" class="main-navigation inner" role="navigation">' );
// Using prepend to allow using adjacent sibling selector to target the link
mobileMenu
.find( 'li.menu-item-has-children' )
.prepend( '<button class="dropdown-toggle" aria-expanded="false"></button>' );
// Fix sub-menus for touch devices and better focus for hidden submenu items for accessibility.
if ( 'ontouchstart' in window ) {
primaryMenu.find( '.menu-item-has-children > a' ).on( 'touchstart.franklin', function( e ) {
var li = $( this ).parent( 'li' );
if ( ! li.hasClass( 'focus' ) ) {
e.preventDefault();
li.toggleClass( 'focus' );
li.siblings( '.focus' ).removeClass( 'focus' );
}
} );
}
// Toggle focus class on focus & blur events
primaryMenu.find( 'a' ).on( 'focus.franklin blur.franklin', function() {
$( this ).parents( '.menu-item' ).toggleClass( 'focus' );
} );
}
} )();
// Swap post format link and post tags on tablet size and smaller
( function() {
var win = $( window );
var links = $( '.entry-footer .meta-wrapper .post-format-link:not(:only-child)' ).each( function( i, node ) {
var link = $( node ), tags = link.prev( 'ul.post-tags' );
win.bind( 'resize.franklin', function() {
if ( win.outerWidth() < 768 ) {
if ( link.prev().is( tags ) ) {
link.insertBefore( tags );
}
} else if ( link.next().is( tags ) ) {
link.insertAfter( tags );
}
});
} );
if ( links.length > 0 ) {
win.trigger( 'resize.franklin' );
}
} )();
} )( jQuery );;
/**
* navigation.js
*
* Handles toggling the navigation menu for small screens and enables tab
* support for dropdown menus.
*/
( function() {
var container, mobileContainer, button, buttonLabel, menu, mobileMenu, links, subMenus, expanders;
container = document.getElementById( 'site-navigation' );
if ( ! container ) {
return;
}
mobileContainer = document.getElementById( 'mobile-navigation' );
if ( ! mobileContainer ) {
return;
}
button = container.getElementsByTagName( 'button' )[0];
if ( 'undefined' === typeof button ) {
return;
}
menu = container.getElementsByTagName( 'ul' )[0];
mobileMenu = mobileContainer.getElementsByTagName( 'ul' )[0];
buttonLabel = button.innerHTML;
// Hide menu toggle button if menu is empty and return early.
if ( 'undefined' === typeof menu ) {
button.style.display = 'none';
return;
}
menu.setAttribute( 'aria-expanded', 'false' );
if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
menu.className += ' nav-menu';
}
button.onclick = function() {
if ( -1 !== mobileContainer.className.indexOf( 'toggled' ) ) {
mobileContainer.className = container.className.replace( ' toggled', 'inner' );
button.setAttribute( 'aria-expanded', 'false' );
mobileMenu.setAttribute( 'aria-expanded', 'false' );
button.innerHTML = buttonLabel;
} else {
mobileContainer.className += ' toggled inner';
button.setAttribute( 'aria-expanded', 'true' );
mobileMenu.setAttribute( 'aria-expanded', 'true' );
button.innerHTML = button.getAttribute( 'data-close-label' );
}
};
// Get all the link elements within the menu.
links = menu.getElementsByTagName( 'a' );
subMenus = menu.getElementsByTagName( 'ul' );
expanders = mobileMenu.getElementsByClassName( 'dropdown-toggle' );
// Set menu items with submenus to aria-haspopup="true".
for ( var i = 0, len = subMenus.length; i < len; i++ ) {
subMenus[i].parentNode.setAttribute( 'aria-haspopup', 'true' );
}
// Each time a menu link is focused or blurred, toggle focus.
for ( i = 0, len = links.length; i < len; i++ ) {
links[i].addEventListener( 'focus', toggleFocus, true );
links[i].addEventListener( 'blur', toggleFocus, true );
}
// Setup expander click events
for (i = 0, len = expanders.length; i < len; i++ ) {
expanders[i].onclick = function() {
if ( 'true' === this.getAttribute( 'aria-expanded' ) ) {
this.setAttribute( 'aria-expanded', 'false' );
this.parentNode.setAttribute( 'aria-expanded', 'false' );
} else {
this.setAttribute( 'aria-expanded', 'true' );
this.parentNode.setAttribute( 'aria-expanded', 'true' );
}
}
expanders[i].focus = function() {
var event = document.createEvent( 'HTMLEvents' );
event.initEvent( 'blur', true, false );
this.dispatchEvent(event);
}
}
/**
* Sets or removes .focus class on an element.
*/
function toggleFocus() {
var self = this;
// Move up through the ancestors of the current link until we hit .nav-menu.
while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
// On li elements toggle the class .focus.
if ( 'li' === self.tagName.toLowerCase() ) {
if ( -1 !== self.className.indexOf( 'focus' ) ) {
self.className = self.className.replace( ' focus', '' );
} else {
self.className += ' focus';
}
}
self = self.parentElement;
}
}
} )();
;
( function() {
var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() {
var id = location.hash.substring( 1 ),
element;
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
return;
}
element = document.getElementById( id );
if ( element ) {
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
element.tabIndex = -1;
}
element.focus();
}
}, false );
}
})();
;
/*! This file is auto-generated */
window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode&&"a"!==E.activeElement.tagName.toLowerCase())return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o<i;o++)(n=d[o]).addEventListener("touchstart",a),n.addEventListener("click",a)}}function l(e){var t,n,d=g(b.temporaryFormId);d&&h&&(g(b.parentIdFieldId).value="0",t=d.textContent,d.parentNode.replaceChild(h,d),this.style.display="none",n=(d=(d=g(b.commentReplyTitleId))&&d.firstChild)&&d.nextSibling,d&&d.nodeType===Node.TEXT_NODE&&t&&(n&&"A"===n.nodeName&&n.id!==b.cancelReplyId&&(n.style.display=""),d.textContent=t),e.preventDefault())}function a(e){var t=g(b.commentReplyTitleId),t=t&&t.firstChild.textContent,n=this,d=m(n,"belowelement"),o=m(n,"commentid"),i=m(n,"respondelement"),r=m(n,"postid"),n=m(n,"replyto")||t;d&&o&&i&&r&&!1===v.addComment.moveForm(d,o,i,r,n)&&e.preventDefault()}function o(e){for(var t=e.length;t--;)if(e[t].addedNodes.length)return void d()}function m(e,t){return n?e.dataset[t]:e.getAttribute("data-"+t)}function g(e){return E.getElementById(e)}return r&&"loading"!==E.readyState?t():r&&v.addEventListener("DOMContentLoaded",t,!1),{init:d,moveForm:function(e,t,n,d,o){var i,r,l,a,m,c,s,e=g(e),n=(h=g(n),g(b.parentIdFieldId)),y=g(b.postIdFieldId),p=g(b.commentReplyTitleId),u=(p=p&&p.firstChild)&&p.nextSibling;if(e&&h&&n){void 0===o&&(o=p&&p.textContent),a=h,m=b.temporaryFormId,c=g(m),s=(s=g(b.commentReplyTitleId))?s.firstChild.textContent:"",c||((c=E.createElement("div")).id=m,c.style.display="none",c.textContent=s,a.parentNode.insertBefore(c,a)),d&&y&&(y.value=d),n.value=t,I.style.display="",e.parentNode.insertBefore(h,e.nextSibling),p&&p.nodeType===Node.TEXT_NODE&&(u&&"A"===u.nodeName&&u.id!==b.cancelReplyId&&(u.style.display="none"),p.textContent=o),I.onclick=function(){return!1};try{for(var f=0;f<C.elements.length;f++)if(i=C.elements[f],r=!1,"getComputedStyle"in v?l=v.getComputedStyle(i):E.documentElement.currentStyle&&(l=i.currentStyle),(i.offsetWidth<=0&&i.offsetHeight<=0||"hidden"===l.visibility)&&(r=!0),"hidden"!==i.type&&!i.disabled&&!r){i.focus();break}}catch(e){}return!1}}}}(window);;
(()=>{"use strict";var e={d:(t,d)=>{for(var o in d)e.o(d,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:d[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function d(e){"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())}e.d(t,{default:()=>d}),(window.wp=window.wp||{}).domReady=t.default})();
//# sourceMappingURL=index.min.js.map;
/* global subscriptionData */
document.addEventListener( 'DOMContentLoaded', function () {
const modal = document.getElementsByClassName( 'jetpack-subscription-modal' )[ 0 ];
if ( ! modal ) {
return;
}
const close = document.getElementsByClassName( 'jetpack-subscription-modal__close' )[ 0 ];
let redirectUrl = '';
let hasLoaded = false;
function reloadOnCloseSubscriptionModal( customUrl ) {
const destinationUrl = customUrl ? new URL( customUrl ) : new URL( redirectUrl );
// Prevent redirect to external sites.
if ( destinationUrl.hostname !== window.location.hostname ) {
return;
}
try {
localStorage.setItem(
'jetpack-subscription-modal-on-comment-scroll-to',
destinationUrl.hash
);
} catch {
// Ok if we can't set it.
}
// Add cache-busting parameter
destinationUrl.searchParams.set( '_ctn', Date.now() );
window.location.href = destinationUrl.toString();
}
function JetpackSubscriptionModalOnCommentMessageListener( event ) {
let message = event && event.data;
if ( typeof message === 'string' ) {
try {
message = JSON.parse( message );
} catch {
return;
}
}
const type = message && message.type;
const data = message && message.data;
if ( type !== 'subscriptionModalShow' || typeof data.url === 'undefined' ) {
return;
}
if ( subscriptionData.homeUrl !== event.origin ) {
return;
}
if ( data.email ) {
const emailInput = document.querySelector(
'.jetpack-subscription-modal__modal-content input[type=email]'
);
if ( ! emailInput ) {
reloadOnCloseSubscriptionModal( data.url );
return;
}
const appSource = document.querySelector(
'.jetpack-subscription-modal__modal-content input[name=app_source]'
);
if ( ! appSource ) {
reloadOnCloseSubscriptionModal( data.url );
return;
}
emailInput.value = data.email;
if ( data.is_logged_in ) {
emailInput.setAttribute( 'readonly', 'readonly' );
appSource.value = 'atomic-subscription-modal-li';
}
}
if ( ! hasLoaded ) {
try {
const storedCount = parseInt(
sessionStorage.getItem( 'jetpack-subscription-modal-shown-count' )
);
const showCount = ( isNaN( storedCount ) ? 0 : storedCount ) + 1;
sessionStorage.setItem( 'jetpack-subscription-modal-shown-count', showCount );
if ( showCount > 5 ) {
new Image().src =
document.location.protocol +
'//pixel.wp.com/g.gif?v=wpcom-no-pv&x_jetpack-subscribe-modal-comm=hidden_views_limit&r=' +
Math.random();
reloadOnCloseSubscriptionModal( data.url );
return;
}
} catch {
// Ignore any errors.
}
new Image().src =
document.location.protocol +
'//pixel.wp.com/g.gif?v=wpcom-no-pv&x_jetpack-subscribe-modal-comm=showed&r=' +
Math.random();
modal.classList.toggle( 'open' );
hasLoaded = true;
redirectUrl = data.url;
}
}
window.addEventListener( 'message', JetpackSubscriptionModalOnCommentMessageListener );
if ( close ) {
close.onclick = function ( event ) {
event.preventDefault();
modal.classList.toggle( 'open' );
reloadOnCloseSubscriptionModal();
};
}
window.onclick = function ( event ) {
if ( event.target === modal ) {
modal.style.display = 'none';
reloadOnCloseSubscriptionModal();
}
};
window.addEventListener( 'load', () => {
// Scroll to the last comment.
const subscriptionScroll = localStorage.getItem(
'jetpack-subscription-modal-on-comment-scroll-to'
);
if ( subscriptionScroll ) {
window.location.hash = subscriptionScroll;
localStorage.removeItem( 'jetpack-subscription-modal-on-comment-scroll-to' );
const comment = document.querySelector( subscriptionScroll );
if ( comment ) {
comment.scrollIntoView( { block: 'center', behavior: 'smooth' } );
}
}
} );
} );
;