PageSourceSearch

https://www.bkk-firmus.de/typo3temp/assets/compressed/merged-90c86…8ad3abcfeae5213301547048b2010.1788943968.js

js bkk-firmus.de collected 2026-09-24 09:42:12 UTC 398,832 bytes, 5,880 lines download raw bytes

1
vendor: 20,122 bytes, lines 2-7
2/**
3 * @popperjs/core v2.11.8 - MIT License
4 */
5
6!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function c(){return!/^((?!chrome|android).)*safari/i.test(f())}function p(e,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=e.getBoundingClientRect(),f=1,p=1;o&&r(e)&&(f=e.offsetWidth>0&&s(a.width)/e.offsetWidth||1,p=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var u=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&u?u.offsetLeft:0))/f,h=(a.top+(l&&u?u.offsetTop:0))/p,m=a.width/f,v=a.height/p;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function u(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function h(e){return p(d(e)).left+u(e).scrollLeft}function m(e){return t(e).getComputedStyle(e)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),m=d(n),y=p(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(m))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:u(i)),r(n)?((b=p(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):m&&(b.x=h(m))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=p(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function x(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:x(b(e))}function w(e,n){var r;void 0===n&&(n=[]);var o=x(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(w(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function j(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(e){for(var n=t(e),i=j(e);i&&O(i)&&"static"===m(i).position;)i=j(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===m(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===m(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var D="top",A="bottom",L="right",P="left",M="auto",k=[D,A,L,P],W="start",B="end",H="viewport",T="popper",R=k.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),S=[].concat(k,[M]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function N(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function I(e,r,o){return r===H?N(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,p=0;if(i){a=i.width,s=i.height;var u=c();(u||!u&&"fixed"===n)&&(f=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:f+h(e),y:p}}(e,o)):n(r)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(r,o):N(function(e){var t,n=d(e),r=u(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+h(e),c=-r.scrollTop;return"rtl"===m(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:c}}(d(e)))}function _(e,t,o,s){var f="clippingParents"===t?function(e){var t=w(b(e)),o=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?E(e):e;return n(o)?t.filter((function(e){return n(e)&&C(e,o)&&"body"!==l(e)})):[]}(e):[].concat(t),c=[].concat(f,[o]),p=c[0],u=c.reduce((function(t,n){var r=I(e,n,s);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),I(e,p,s));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function F(e){return e.split("-")[0]}function U(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?F(o):null,a=o?U(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case D:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:f};break;case P:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?z(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case W:t[c]=t[c]-(n[p]/2-r[p]/2);break;case B:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function J(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.strategy,s=void 0===a?e.strategy:a,f=r.boundary,c=void 0===f?"clippingParents":f,u=r.rootBoundary,l=void 0===u?H:u,h=r.elementContext,m=void 0===h?T:h,v=r.altBoundary,y=void 0!==v&&v,g=r.padding,b=void 0===g?0:g,x=Y("number"!=typeof b?b:G(b,k)),w=m===T?"reference":T,O=e.rects.popper,j=e.elements[y?w:m],E=_(n(j)?j:j.contextElement||d(e.elements.popper),c,l,s),P=p(e.elements.reference),M=X({reference:P,element:O,strategy:"absolute",placement:i}),W=N(Object.assign({},O,M)),B=m===T?W:P,R={top:E.top-B.top+x.top,bottom:B.bottom-E.bottom+x.bottom,left:E.left-B.left+x.left,right:B.right-E.right+x.right},S=e.modifiersData.offset;if(m===T&&S){var V=S[i];Object.keys(R).forEach((function(e){var t=[L,A].indexOf(e)>=0?1:-1,n=[D,A].indexOf(e)>=0?"y":"x";R[e]+=V[n]*t}))}return R}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Z(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,a=void 0===i?K:i;return function(e,t,r){void 0===r&&(r=a);var i,s,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],p=!1,u={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},a,f.options,i),f.scrollParents={reference:n(e)?w(e):e.contextElement?w(e.contextElement):[],popper:w(t)};var s,p,d=function(e){var t=q(e);return V.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,f.options.modifiers),p=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(p).map((function(e){return p[e]}))));return f.orderedModifiers=d.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:f,name:t,instance:u,options:r}),a=function(){};c.push(i||a)}})),u.update()},forceUpdate:function(){if(!p){var e=f.elements,t=e.reference,n=e.popper;if(Q(t,n)){f.rects={reference:y(t,E(n),"fixed"===f.options.strategy),popper:g(n)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,c=o.name;"function"==typeof i&&(f=i({state:f,options:s,name:c,instance:u})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(f)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){l(),p=!0}};if(!Q(e,t))return u;function l(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(r).then((function(e){!p&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}var $={passive:!0};var ee={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,r=e.instance,o=e.options,i=o.scroll,a=void 0===i||i,s=o.resize,f=void 0===s||s,c=t(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&p.forEach((function(e){e.addEventListener("scroll",r.update,$)})),f&&c.addEventListener("resize",r.update,$),function(){a&&p.forEach((function(e){e.removeEventListener("scroll",r.update,$)})),f&&c.removeEventListener("resize",r.update,$)}},data:{}};var te={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=X({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var n,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,f=e.offsets,c=e.position,p=e.gpuAcceleration,u=e.adaptive,l=e.roundOffsets,h=e.isFixed,v=f.x,y=void 0===v?0:v,g=f.y,b=void 0===g?0:g,x="function"==typeof l?l({x:y,y:b}):{x:y,y:b};y=x.x,b=x.y;var w=f.hasOwnProperty("x"),O=f.hasOwnProperty("y"),j=P,M=D,k=window;if(u){var W=E(r),H="clientHeight",T="clientWidth";if(W===t(r)&&"static"!==m(W=d(r)).position&&"absolute"===c&&(H="scrollHeight",T="scrollWidth"),W=W,i===D||(i===P||i===L)&&a===B)M=A,b-=(h&&W===k&&k.visualViewport?k.visualViewport.height:W[H])-o.height,b*=p?1:-1;if(i===P||(i===D||i===A)&&a===B)j=L,y-=(h&&W===k&&k.visualViewport?k.visualViewport.width:W[T])-o.width,y*=p?1:-1}var R,S=Object.assign({position:c},u&&ne),V=!0===l?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:s(n*o)/o||0,y:s(r*o)/o||0}}({x:y,y:b},t(r)):{x:y,y:b};return y=V.x,b=V.y,p?Object.assign({},S,((R={})[M]=O?"0":"",R[j]=w?"0":"",R.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",R)):Object.assign({},S,((n={})[M]=O?b+"px":"",n[j]=w?y+"px":"",n.transform="",n))}var oe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:F(t.placement),variation:U(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var ie={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&l(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(o)&&l(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ae={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=S.reduce((function(e,n){return e[n]=function(e,t,n){var r=F(e),o=[P,D].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function fe(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ce={start:"end",end:"start"};function pe(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function ue(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?S:f,p=U(r),u=p?s?R:R.filter((function(e){return U(e)===p})):k,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=J(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[F(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=F(v),g=f||(y===v||!h?[fe(v)]:function(e){if(F(e)===M)return[];var t=fe(e);return[pe(e),t,pe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(F(n)===M?ue(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,O=new Map,j=!0,E=b[0],k=0;k<b.length;k++){var B=b[k],H=F(B),T=U(B)===W,R=[D,A].indexOf(H)>=0,S=R?"width":"height",V=J(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),q=R?T?L:P:T?A:D;x[S]>w[S]&&(q=fe(q));var C=fe(q),N=[];if(i&&N.push(V[H]<=0),s&&N.push(V[q]<=0,V[C]<=0),N.every((function(e){return e}))){E=B,j=!1;break}O.set(B,N)}if(j)for(var I=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},_=h?3:1;_>0;_--){if("break"===I(_))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function de(e,t,n){return i(e,a(t,n))}var he={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,v=n.tetherOffset,y=void 0===v?0:v,b=J(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),x=F(t.placement),w=U(t.placement),O=!w,j=z(x),M="x"===j?"y":"x",k=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(k){if(s){var q,C="y"===j?D:P,N="y"===j?A:L,I="y"===j?"height":"width",_=k[j],X=_+b[C],Y=_-b[N],G=m?-H[I]/2:0,K=w===W?B[I]:H[I],Q=w===W?-H[I]:-B[I],Z=t.elements.arrow,$=m&&Z?g(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[C],ne=ee[N],re=de(0,B[I],$[I]),oe=O?B[I]/2-G-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=O?-B[I]/2+G+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&E(t.elements.arrow),se=ae?"y"===j?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(q=null==S?void 0:S[j])?q:0,ce=_+ie-fe,pe=de(m?a(X,_+oe-fe-se):X,_,m?i(Y,ce):Y);k[j]=pe,V[j]=pe-_}if(c){var ue,le="x"===j?D:P,he="x"===j?A:L,me=k[M],ve="y"===M?"height":"width",ye=me+b[le],ge=me-b[he],be=-1!==[D,P].indexOf(x),xe=null!=(ue=null==S?void 0:S[M])?ue:0,we=be?ye:me-B[ve]-H[ve]-xe+R.altAxis,Oe=be?me+B[ve]+H[ve]-xe-R.altAxis:ge,je=m&&be?function(e,t,n){var r=de(e,t,n);return r>n?n:r}(we,me,Oe):de(m?we:ye,me,m?Oe:ge);k[M]=je,V[M]=je-me}t.modifiersData[r]=V}},requiresIfExists:["offset"]};var me={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=F(n.placement),f=z(s),c=[P,L].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,k))}(o.padding,n),u=g(i),l="y"===f?D:P,d="y"===f?A:L,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],v=E(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,x=p[l],w=y-u[c]-p[d],O=y/2-u[c]/2+b,j=de(x,O,w),M=f;n.modifiersData[r]=((t={})[M]=j,t.centerOffset=j-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&C(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[D,L,A,P].some((function(t){return e[t]>=0}))}var ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=J(t,{elementContext:"reference"}),s=J(t,{altBoundary:!0}),f=ve(a,r),c=ve(s,o,i),p=ye(f),u=ye(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},be=Z({defaultModifiers:[ee,te,oe,ie]}),xe=[ee,te,oe,ie,ae,le,he,me,ge],we=Z({defaultModifiers:xe});e.applyStyles=ie,e.arrow=me,e.computeStyles=oe,e.createPopper=we,e.createPopperLite=be,e.defaultModifiers=xe,e.detectOverflow=J,e.eventListeners=ee,e.flip=le,e.hide=ge,e.offset=ae,e.popperGenerator=Z,e.popperOffsets=te,e.preventOverflow=he,Object.defineProperty(e,"__esModule",{value:!0})}));
7//# sourceMappingURL=popper.min.js.map
vendor: 3,308 bytes, lines 8-14
8
9/*!
10  * Bootstrap v5.3.1 (https://getbootstrap.com/)
11  * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
12  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
13  */
14!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s=new Map,n={set(t,e,i){s.has(t)||s.set(t,new Map);const n=s.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>s.has(t)&&s.get(t).get(e)||null,remove(t,e){if(!s.has(t))return;const i=s.get(t);i.delete(e),0===i.size&&s.delete(t)}},o="transitionend",r=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),a=t=>{t.dispatchEvent(new Event(o))},l=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>l(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(r(t)):null,h=t=>{if(!l(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},d=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),u=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u(t.parentNode):null},_=()=>{},g=t=>{t.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,m=[],p=()=>"rtl"===document.documentElement.dir,b=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of m)t()})),m.push(e)):e()},v=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,y=(t,e,i=!0)=>{if(!i)return void v(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const r=({target:i})=>{i===e&&(n=!0,e.removeEventListener(o,r),v(t))};e.addEventListener(o,r),setTimeout((()=>{n||a(e)}),s)},w=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},A=/[^.]*(?=\..*)\.|.*/,E=/\..*/,C=/::\d+$/,T={};let k=1;
vendor: 7,527 bytes, line 14
14const $={mouseenter:"mouseover",mouseleave:"mouseout"},S=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function L(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function O(t){const e=L(t);return t.uidEvent=e,T[e]=T[e]||{},T[e]}function I(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function D(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=M(t);return S.has(o)||(o=t),[s,n,o]}function N(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=D(e,i,s);if(e in $){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=O(t),c=l[a]||(l[a]={}),h=I(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=L(r,e.replace(A,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return F(n,{delegateTarget:r}),s.oneOff&&j.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return F(s,{delegateTarget:t}),i.oneOff&&j.off(t,s.type,e),e.apply(t,[s])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function P(t,e,i,s,n){const o=I(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function x(t,e,i,s){const n=e[i]||{};for(const[o,r]of Object.entries(n))o.includes(s)&&P(t,e,i,r.callable,r.delegationSelector)}function M(t){return t=t.replace(E,""),$[t]||t}const j={on(t,e,i,s){N(t,e,i,s,!1)},one(t,e,i,s){N(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=D(e,i,s),a=r!==e,l=O(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))x(t,l,i,e.slice(1));for(const[i,s]of Object.entries(c)){const n=i.replace(C,"");a&&!e.includes(n)||P(t,l,r,s.callable,s.delegationSelector)}}else{if(!Object.keys(c).length)return;P(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=f();let n=null,o=!0,r=!0,a=!1;e!==M(e)&&s&&(n=s.Event(e,i),s(t).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());const l=F(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function F(t,e={}){for(const[i,s]of Object.entries(e))try{t[i]=s}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}function z(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function H(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const B={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${H(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${H(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=z(t.dataset[s])}return e},getDataAttribute:(t,e)=>z(t.getAttribute(`data-bs-${H(e)}`))};class q{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=l(e)?B.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...l(e)?B.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[s,n]of Object.entries(e)){const e=t[s],o=l(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".`)}var i}}class W extends q{constructor(t,e){super(),(t=c(t))&&(this._element=t,this._config=this._getConfig(e),n.set(this._element,this.constructor.DATA_KEY,this))}dispose(){n.remove(this._element,this.constructor.DATA_KEY),j.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){y(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return n.get(c(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.1"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const R=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return r(e)},K={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!d(t)&&h(t)))},getSelectorFromElement(t){const e=R(t);return e&&K.findOne(e)?e:null},getElementFromSelector(t){const e=R(t);return e?K.findOne(e):null},getMultipleElementsFromSelector(t){const e=R(t);return e?K.find(e):[]}},V=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;j.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),d(this))return;const n=K.getElementFromSelector(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))},Q=".bs.alert",X=`close${Q}`,Y=`closed${Q}`;class U extends W{static get NAME(){return"alert"}close(){if(j.trigger(this._element,X).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),j.trigger(this._element,Y),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=U.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
14amed "${t}"`);e[t](this)}}))}}V(U,"close"),b(U);const G='[data-bs-toggle="button"]';class J extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=J.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}j.on(document,"click.bs.button.data-api",G,(t=>{t.preventDefault();const e=t.target.closest(G);J.getOrCreateInstance(e).toggle()})),b(J);const Z=".bs.swipe",tt=`touchstart${Z}`,et=`touchmove${Z}`,it=`touchend${Z}`,st=`pointerdown${Z}`,nt=`pointerup${Z}`,ot={endCallback:null,leftCallback:null,rightCallback:null},rt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class at extends q{constructor(t,e){super(),this._element=t,t&&at.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return ot}static get DefaultType(){return rt}static get NAME(){return"swipe"}dispose(){j.off(this._element,Z)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),v(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&v(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(j.on(this._element,st,(t=>this._start(t))),j.on(this._element,nt,(t=>this._end(t))),this._element.classList.add("pointer-event")):(j.on(this._element,tt,(t=>this._start(t))),j.on(this._element,et,(t=>this._move(t))),j.on(this._element,it,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const lt=".bs.carousel",ct=".data-api",ht="next",dt="prev",ut="left",_t="right",gt=`slide${lt}`,ft=`slid${lt}`,mt=`keydown${lt}`,pt=`mouseenter${lt}`,bt=`mouseleave${lt}`,vt=`dragstart${lt}`,yt=`load${lt}${ct}`,wt=`click${lt}${ct}`,At="carousel",Et="active",Ct=".active",Tt=".carousel-item",kt=Ct+Tt,$t={ArrowLeft:_t,ArrowRight:ut},St={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Lt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ot extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=K.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===At&&this.cycle()}static get Default(){return St}static get DefaultType(){return Lt}static get NAME(){return"carousel"}next(){this._slide(ht)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(dt)}pause(){this._isSliding&&a(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?j.one(this._element,ft,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void j.one(this._element,ft,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?ht:dt;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&j.on(this._element,mt,(t=>this._keydown(t))),"hover"===this._config.pause&&(j.on(this._element,pt,(()=>this.pause())),j.on(this._element,bt,(()=>this._maybeEnableCycle()))),this._config.touch&&at.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of K.find(".carousel-item img",this._element))j.on(t,vt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(ut)),rightCallback:()=>this._slide(this._directionToOrder(_t)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new at(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=$t[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=K.findOne(Ct,this._indicatorsElement);e.classList.remove(Et),e.removeAttribute("aria-current");const i=K.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Et),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),s=t===ht,n=e||w(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),r=e=>j.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(gt).defaultPrevented)return;if(!i||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),g(n),i.classList.add(l),n.classList.add(l),this._queueCallback((()=>{n.classList.remove(l,c),n.classList.add(Et),i.classList.remove(Et,c,l),this._isSliding=!1,r(ft)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return K.findOne(kt,this._element)}_getItems(){return K.find(Tt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return p()?t===ut?dt:ht:t===ut?ht:dt}_orderToDirection(t){return p()?t===dt?ut:_t:t===dt?_t:ut}static jQueryInterface(t){return this.each((function(){const e=Ot.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
14amed "${t}"`);e[t]()}}else e.to(t)}))}}j.on(document,wt,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=K.getElementFromSelector(this);if(!e||!e.classList.contains(At))return;t.preventDefault();const i=Ot.getOrCreateInstance(e),s=this.getAttribute("data-bs-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===B.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),j.on(window,yt,(()=>{const t=K.find('[data-bs-ride="carousel"]');for(const e of t)Ot.getOrCreateInstance(e)})),b(Ot);const It=".bs.collapse",Dt=`show${It}`,Nt=`shown${It}`,Pt=`hide${It}`,xt=`hidden${It}`,Mt=`click${It}.data-api`,jt="show",Ft="collapse",zt="collapsing",Ht=`:scope .${Ft} .${Ft}`,Bt='[data-bs-toggle="collapse"]',qt={parent:null,toggle:!0},Wt={parent:"(null|element)",toggle:"boolean"};class Rt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=K.find(Bt);for(const t of i){const e=K.getSelectorFromElement(t),i=K.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return qt}static get DefaultType(){return Wt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Rt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(j.trigger(this._element,Dt).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Ft),this._element.classList.add(zt),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(Ft,jt),this._element.style[e]="",j.trigger(this._element,Nt)}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(j.trigger(this._element,Pt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(zt),this._element.classList.remove(Ft,jt);for(const t of this._triggerArray){const e=K.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(zt),this._element.classList.add(Ft),j.trigger(this._element,xt)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(jt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=c(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Bt);for(const e of t){const t=K.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=K.find(Ht,this._config.parent);return K.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Rt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}j.on(document,Mt,Bt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of K.getMultipleElementsFromSelector(this))Rt.getOrCreateInstance(t,{toggle:!1}).toggle()})),b(Rt);const Kt="dropdown",Vt=".bs.dropdown",Qt=".data-api",Xt="ArrowUp",Yt="ArrowDown",Ut=`hide${Vt}`,Gt=`hidden${Vt}`,Jt=`show${Vt}`,Zt=`shown${Vt}`,te=`click${Vt}${Qt}`,ee=`keydown${Vt}${Qt}`,ie=`keyup${Vt}${Qt}`,se="show",ne='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',oe=`${ne}.${se}`,re=".dropdown-menu",ae=p()?"top-end":"top-start",le=p()?"top-start":"top-end",ce=p()?"bottom-end":"bottom-start",he=p()?"bottom-start":"bottom-end",de=p()?"left-start":"right-start",ue=p()?"right-start":"left-start",_e={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ge={autoClose:"(boolean|string)",boundary:"(string|element)",display:"str
14ing",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class fe extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=K.next(this._element,re)[0]||K.prev(this._element,re)[0]||K.findOne(re,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return _e}static get DefaultType(){return ge}static get NAME(){return Kt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(d(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!j.trigger(this._element,Jt,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))j.on(t,"mouseover",_);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(se),this._element.classList.add(se),j.trigger(this._element,Zt,t)}}hide(){if(d(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!j.trigger(this._element,Ut,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))j.off(t,"mouseover",_);this._popper&&this._popper.destroy(),this._menu.classList.remove(se),this._element.classList.remove(se),this._element.setAttribute("aria-expanded","false"),B.removeDataAttribute(this._menu,"popper"),j.trigger(this._element,Gt,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!l(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Kt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:l(this._config.reference)?t=c(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=i.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(se)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return de;if(t.classList.contains("dropstart"))return ue;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?le:ae:e?he:ce}
vendor: 5,989 bytes, line 14
14_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(B.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...v(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=K.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>h(t)));i.length&&w(i,e,t===Yt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=fe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=K.find(oe);for(const i of e){const e=fe.getInstance(i);if(!e||!1===e._config.autoClose)continue;const s=t.composedPath(),n=s.includes(e._menu);if(s.includes(e._element)||"inside"===e._config.autoClose&&!n||"outside"===e._config.autoClose&&n)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,s=[Xt,Yt].includes(t.key);if(!s&&!i)return;if(e&&!i)return;t.preventDefault();const n=this.matches(ne)?this:K.prev(this,ne)[0]||K.next(this,ne)[0]||K.findOne(ne,t.delegateTarget.parentNode),o=fe.getOrCreateInstance(n);if(s)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),n.focus())}}j.on(document,ee,ne,fe.dataApiKeydownHandler),j.on(document,ee,re,fe.dataApiKeydownHandler),j.on(document,te,fe.clearMenus),j.on(document,ie,fe.clearMenus),j.on(document,te,ne,(function(t){t.preventDefault(),fe.getOrCreateInstance(this).toggle()})),b(fe);const me="backdrop",pe="show",be=`mousedown.bs.${me}`,ve={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ye={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class we extends q{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ve}static get DefaultType(){return ye}static get NAME(){return me}show(t){if(!this._config.isVisible)return void v(t);this._append();const e=this._getElement();this._config.isAnimated&&g(e),e.classList.add(pe),this._emulateAnimation((()=>{v(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(pe),this._emulateAnimation((()=>{this.dispose(),v(t)}))):v(t)}dispose(){this._isAppended&&(j.off(this._element,be),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=c(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),j.on(t,be,(()=>{v(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){y(t,this._getElement(),this._config.isAnimated)}}const Ae=".bs.focustrap",Ee=`focusin${Ae}`,Ce=`keydown.tab${Ae}`,Te="backward",ke={autofocus:!0,trapElement:null},$e={autofocus:"boolean",trapElement:"element"};class Se extends q{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ke}static get DefaultType(){return $e}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),j.off(document,Ae),j.on(document,Ee,(t=>this._handleFocusin(t))),j.on(document,Ce,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,j.off(document,Ae))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=K.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Te?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Te:"forward")}}const Le=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Oe=".sticky-top",Ie="padding-right",De="margin-right";class Ne{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Ie,(e=>e+t)),this._setElementAttributes(Le,Ie,(e=>e+t)),this._setElementAttributes(Oe,De,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ie),this._resetElementAttributes(Le,Ie),this._resetElementAttributes(Oe,De)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&B.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=B.getDataAttribute(t,e);null!==i?(B.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}
14_applyManipulationCallback(t,e){if(l(t))e(t);else for(const i of K.find(t,this._element))e(i)}}const Pe=".bs.modal",xe=`hide${Pe}`,Me=`hidePrevented${Pe}`,je=`hidden${Pe}`,Fe=`show${Pe}`,ze=`shown${Pe}`,He=`resize${Pe}`,Be=`click.dismiss${Pe}`,qe=`mousedown.dismiss${Pe}`,We=`keydown.dismiss${Pe}`,Re=`click${Pe}.data-api`,Ke="modal-open",Ve="show",Qe="modal-static",Xe={backdrop:!0,focus:!0,keyboard:!0},Ye={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ue extends W{constructor(t,e){super(t,e),this._dialog=K.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Ne,this._addEventListeners()}static get Default(){return Xe}static get DefaultType(){return Ye}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||j.trigger(this._element,Fe,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ke),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(j.trigger(this._element,xe).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ve),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){j.off(window,Pe),j.off(this._dialog,Pe),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new we({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Se({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=K.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),g(this._element),this._element.classList.add(Ve),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,j.trigger(this._element,ze,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){j.on(this._element,We,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),j.on(window,He,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),j.on(this._element,qe,(t=>{j.one(this._element,Be,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ke),this._resetAdjustments(),this._scrollBar.reset(),j.trigger(this._element,je)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(j.trigger(this._element,Me).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Qe)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Qe),this._queueCallback((()=>{this._element.classList.remove(Qe),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=p()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=p()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Ue.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method n
14amed "${t}"`);i[t](e)}}))}}j.on(document,Re,'[data-bs-toggle="modal"]',(function(t){const e=K.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),j.one(e,Fe,(t=>{t.defaultPrevented||j.one(e,je,(()=>{h(this)&&this.focus()}))}));const i=K.findOne(".modal.show");i&&Ue.getInstance(i).hide(),Ue.getOrCreateInstance(e).toggle(this)})),V(Ue),b(Ue);const Ge=".bs.offcanvas",Je=".data-api",Ze=`load${Ge}${Je}`,ti="show",ei="showing",ii="hiding",si=".offcanvas.show",ni=`show${Ge}`,oi=`shown${Ge}`,ri=`hide${Ge}`,ai=`hidePrevented${Ge}`,li=`hidden${Ge}`,ci=`resize${Ge}`,hi=`click${Ge}${Je}`,di=`keydown.dismiss${Ge}`,ui={backdrop:!0,keyboard:!0,scroll:!1},_i={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class gi extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return ui}static get DefaultType(){return _i}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||j.trigger(this._element,ni,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Ne).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ei),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(ti),this._element.classList.remove(ei),j.trigger(this._element,oi,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(j.trigger(this._element,ri).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ii),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(ti,ii),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Ne).reset(),j.trigger(this._element,li)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new we({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():j.trigger(this._element,ai)}:null})}_initializeFocusTrap(){return new Se({trapElement:this._element})}_addEventListeners(){j.on(this._element,di,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():j.trigger(this._element,ai))}))}static jQueryInterface(t){return this.each((function(){const e=gi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}j.on(document,hi,'[data-bs-toggle="offcanvas"]',(function(t){const e=K.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this))return;j.one(e,li,(()=>{h(this)&&this.focus()}));const i=K.findOne(si);i&&i!==e&&gi.getInstance(i).hide(),gi.getOrCreateInstance(e).toggle(this)})),j.on(window,Ze,(()=>{for(const t of K.find(si))gi.getOrCreateInstance(t).show()})),j.on(window,ci,(()=>{for(const t of K.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&gi.getOrCreateInstance(t).hide()})),V(gi),b(gi);const fi={"*":["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:[]},mi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),pi=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,bi=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!mi.has(i)||Boolean(pi.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},vi={allowList:fi,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},yi={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},wi={entry:"(string|element|function|null)",selector:"(string|element)"};class Ai extends q{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return vi}static get DefaultType(){return yi}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>
vendor: 4,606 bytes, line 14
14this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},wi)}_setContent(t,e,i){const s=K.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?l(e)?this._putElementInTemplate(c(e),s):this._config.html?s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const t of n){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const s=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[i]||[]);for(const e of s)bi(e,n)||t.removeAttribute(e.nodeName)}return s.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return v(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Ei=new Set(["sanitize","allowList","sanitizeFn"]),Ci="fade",Ti="show",ki=".modal",$i="hide.bs.modal",Si="hover",Li="focus",Oi={AUTO:"auto",TOP:"top",RIGHT:p()?"left":"right",BOTTOM:"bottom",LEFT:p()?"right":"left"},Ii={allowList:fi,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Di={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Ni extends W{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Ii}static get DefaultType(){return Di}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),j.off(this._element.closest(ki),$i,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=j.trigger(this._element,this.constructor.eventName("show")),e=(u(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),j.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(Ti),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))j.on(t,"mouseover",_);this._queueCallback((()=>{j.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}
vendor: 5,408 bytes, line 14
14hide(){if(this._isShown()&&!j.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Ti),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))j.off(t,"mouseover",_);this._activeTrigger.click=!1,this._activeTrigger[Li]=!1,this._activeTrigger[Si]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),j.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Ci,Ti),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Ci),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ai({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ci)}_isShown(){return this.tip&&this.tip.classList.contains(Ti)}_createPopper(t){const e=v(this._config.placement,[this,t,this._element]),s=Oi[e.toUpperCase()];return i.createPopper(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return v(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...v(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)j.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Si?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===Si?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");j.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Li:Si]=!0,e._enter()})),j.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Li:Si]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},j.on(this._element.closest(ki),$i,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=B.getDataAttributes(this._element);for(const t of Object.keys(e))Ei.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:c(t.container),"number"==typeof 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()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=Ni.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method n
14amed "${t}"`);e[t]()}}))}}b(Ni);const Pi={...Ni.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},xi={...Ni.DefaultType,content:"(null|string|element|function)"};class Mi extends Ni{static get Default(){return Pi}static get DefaultType(){return xi}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=Mi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Mi);const ji=".bs.scrollspy",Fi=`activate${ji}`,zi=`click${ji}`,Hi=`load${ji}.data-api`,Bi="active",qi="[href]",Wi=".nav-link",Ri=`${Wi}, .nav-item > ${Wi}, .list-group-item`,Ki={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Vi={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Qi extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ki}static get DefaultType(){return Vi}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=c(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(j.off(this._config.target,zi),j.on(this._config.target,zi,qi,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},s=(this._rootElement||document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=K.find(qi,this._config.target);for(const e of t){if(!e.hash||d(e))continue;const t=K.findOne(decodeURI(e.hash),this._element);h(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Bi),this._activateParents(t),j.trigger(this._element,Fi,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))K.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Bi);else for(const e of K.parents(t,".nav, .list-group"))for(const t of K.prev(e,Ri))t.classList.add(Bi)}_clearActiveClass(t){t.classList.remove(Bi);const e=K.find(`${qi}.${Bi}`,t);for(const t of e)t.classList.remove(Bi)}static jQueryInterface(t){return this.each((function(){const e=Qi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
14amed "${t}"`);e[t]()}}))}}j.on(window,Hi,(()=>{for(const t of K.find('[data-bs-spy="scroll"]'))Qi.getOrCreateInstance(t)})),b(Qi);const Xi=".bs.tab",Yi=`hide${Xi}`,Ui=`hidden${Xi}`,Gi=`show${Xi}`,Ji=`shown${Xi}`,Zi=`click${Xi}`,ts=`keydown${Xi}`,es=`load${Xi}`,is="ArrowLeft",ss="ArrowRight",ns="ArrowUp",os="ArrowDown",rs="Home",as="End",ls="active",cs="fade",hs="show",ds=":not(.dropdown-toggle)",us='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',_s=`.nav-link${ds}, .list-group-item${ds}, [role="tab"]${ds}, ${us}`,gs=`.${ls}[data-bs-toggle="tab"], .${ls}[data-bs-toggle="pill"], .${ls}[data-bs-toggle="list"]`;class fs extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),j.on(this._element,ts,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?j.trigger(e,Yi,{relatedTarget:t}):null;j.trigger(t,Gi,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(ls),this._activate(K.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),j.trigger(t,Ji,{relatedTarget:e})):t.classList.add(hs)}),t,t.classList.contains(cs)))}_deactivate(t,e){t&&(t.classList.remove(ls),t.blur(),this._deactivate(K.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),j.trigger(t,Ui,{relatedTarget:e})):t.classList.remove(hs)}),t,t.classList.contains(cs)))}_keydown(t){if(![is,ss,ns,os,rs,as].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!d(t)));let i;if([rs,as].includes(t.key))i=e[t.key===rs?0:e.length-1];else{const s=[ss,os].includes(t.key);i=w(e,t.target,s,!0)}i&&(i.focus({preventScroll:!0}),fs.getOrCreateInstance(i).show())}_getChildren(){return K.find(_s,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=K.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const s=(t,s)=>{const n=K.findOne(t,i);n&&n.classList.toggle(s,e)};s(".dropdown-toggle",ls),s(".dropdown-menu",hs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(ls)}_getInnerElement(t){return t.matches(_s)?t:K.findOne(_s,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=fs.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}j.on(document,Zi,us,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this)||fs.getOrCreateInstance(this).show()})),j.on(window,es,(()=>{for(const t of K.find(gs))fs.getOrCreateInstance(t)})),b(fs);const ms=".bs.toast",ps=`mouseover${ms}`,bs=`mouseout${ms}`,vs=`focusin${ms}`,ys=`focusout${ms}`,ws=`hide${ms}`,As=`hidden${ms}`,Es=`show${ms}`,Cs=`shown${ms}`,Ts="hide",ks="show",$s="showing",Ss={animation:"boolean",autohide:"boolean",delay:"number"},Ls={animation:!0,autohide:!0,delay:5e3};class Os extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Ls}static get DefaultType(){return Ss}
vendor: 1,295 bytes, line 14
14static get NAME(){return"toast"}show(){j.trigger(this._element,Es).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Ts),g(this._element),this._element.classList.add(ks,$s),this._queueCallback((()=>{this._element.classList.remove($s),j.trigger(this._element,Cs),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(j.trigger(this._element,ws).defaultPrevented||(this._element.classList.add($s),this._queueCallback((()=>{this._element.classList.add(Ts),this._element.classList.remove($s,ks),j.trigger(this._element,As)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ks),super.dispose()}isShown(){return this._element.classList.contains(ks)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}
vendor: 4,612 bytes, lines 14-20
14_setListeners(){j.on(this._element,ps,(t=>this._onInteraction(t,!0))),j.on(this._element,bs,(t=>this._onInteraction(t,!1))),j.on(this._element,vs,(t=>this._onInteraction(t,!0))),j.on(this._element,ys,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Os.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return V(Os),b(Os),{Alert:U,Button:J,Carousel:Ot,Collapse:Rt,Dropdown:fe,Modal:Ue,Offcanvas:gi,Popover:Mi,ScrollSpy:Qi,Tab:fs,Toast:Os,Tooltip:Ni}}));
15//# sourceMappingURL=bootstrap.min.js.map
16/*!
17  * PhotoSwipe Lightbox 5.4.0 - https://photoswipe.com
18  * (c) 2023 Dmytro Semenov
19  */
20!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t="undefined"!=typeof globalThis?globalThis:t||self).PhotoSwipeLightbox=i()}(this,(function(){"use strict";function t(t,i,s){const h=document.createElement(i);return t&&(h.className=t),s&&s.appendChild(h),h}function i(t,i,s){t.style.width="number"==typeof i?`${i}px`:i,t.style.height="number"==typeof s?`${s}px`:s}const s="idle",h="loading",e="loaded",n="error";function o(t,i,s=document){let h=[];if(t instanceof Element)h=[t];else if(t instanceof NodeList||Array.isArray(t))h=Array.from(t);else{const e="string"==typeof t?t:i;e&&(h=Array.from(s.querySelectorAll(e)))}return h}function r(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class l{constructor(t,i){this.type=t,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}}class a{constructor(i,s){if(this.element=t("pswp__img pswp__img--placeholder",i?"img":"div",s),i){const t=this.element;t.decoding="async",t.alt="",t.src=i,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,s){this.element&&("IMG"===this.element.tagName?(i(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(t,i,s){let h=`translate3d(${t}px,${i||0}px,0)`;return void 0!==s&&(h+=` scale3d(${s},${s},1)`),h}(0,0,t/250)):i(this.element,t,s))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class d{constructor(t,i,h){this.instance=i,this.data=t,this.index=h,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=s,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(i,s){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new a(t,this.slide.container)}this.element&&!s||this.instance.dispatch("contentLoad",{content:this,isLazy:i}).defaultPrevented||(this.isImageContent()?(this.element=t("pswp__img","img"),this.displayedImageWidth&&this.loadImage(i)):(this.element=t("pswp__content","div"),this.element.innerHTML=this.data.html||""),s&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var i,s;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const e=this.element;this.updateSrcsetSizes(),this.data.srcset&&(e.srcset=this.data.srcset),e.src=null!==(i=this.data.src)&&void 0!==i?i:"",e.alt=null!==(s=this.data.alt)&&void 0!==s?s:"",this.state=h,e.complete?this.onLoaded():(e.onload=()=>{this.onLoaded()},e.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=e,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==e&&this.state!==n||this.removePlaceholder())}onError(){this.state=n,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,
vendor: 5,009 bytes, line 20
20content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===h,this)}isError(){return this.state===n}isImageContent(){return"image"===this.type}setDisplayedSize(t,s){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,s),!this.instance.dispatch("contentResize",{content:this,width:t,height:s}).defaultPrevented&&(i(this.element,t,s),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=s,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:s,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==n,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||i>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=i+"px",t.dataset.largestUsedSize=String(i))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var i,s;let h=t("pswp__error-msg","div");h.innerText=null!==(i=null===(s=this.instance.options)||void 0===s?void 0:s.errorMsg)&&void 0!==i?i:"",h=this.instance.applyFilters("contentErrorElement",h,this),this.element=t("pswp__content pswp__error-msg-container","div"),this.element.appendChild(h),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===n)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||r())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!r()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==e&&this.state!==n||this.removePlaceholder()))}}function c(t,i,s,h,e){let n=0;if(i.paddingFn)n=i.paddingFn(s,h,e)[t];else if(i.padding)n=i.padding[t];else{const s="padding"+t[0].toUpperCase()+t.slice(1);i[s]&&(n=i[s])}return Number(n)||0}class u{constructor(t,i,s,h){this.pswp=h,this.options=t,this.itemData=i,this.index=s,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,i,s){const h={x:t,y:i};this.elementSize=h,this.panAreaSize=s;const e=s.x/h.x,n=s.y/h.y;this.fit=Math.min(1,e<n?e:n),this.fill=Math.min(1,e>n?e:n),this.vFill=Math.min(1,n),this.initial=this.t(),this.secondary=this.i(),this.max=Math.max(this.initial,this.secondary,this.o()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}l(t){const i=t+"ZoomLevel",s=this.options[i];if(s)return"function"==typeof s?s(this):"fill"===s?this.fill:"fit"===s?this.fit:Number(s)}i(){let t=this.l("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}t(){return this.l("initial")||this.fit}o(){return this.l("max")||Math.max(1,4*this.fit)}}function p(t,i,s){const h=i.createContentFromData(t,s);let e;const{options:n}=i;
vendor: 4,207 bytes, line 20
20if(n){let o;e=new u(n,t,-1),o=i.pswp?i.pswp.viewportSize:function(t,i){if(t.getViewportSizeFn){const s=t.getViewportSizeFn(t,i);if(s)return s}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(n,i);const r=function(t,i,s,h){return{x:i.x-c("left",t,i,s,h)-c("right",t,i,s,h),y:i.y-c("top",t,i,s,h)-c("bottom",t,i,s,h)}}(n,o,t,s);e.update(h.width,h.height,r)}return h.lazyLoad(),e&&h.setDisplayedSize(Math.ceil(h.width*e.initial),Math.ceil(h.height*e.initial)),h}return class extends class extends class{constructor(){this.u={},this.p={},this.pswp=void 0,this.options=void 0}addFilter(t,i,s=100){var h,e,n;this.p[t]||(this.p[t]=[]),null===(h=this.p[t])||void 0===h||h.push({fn:i,priority:s}),null===(e=this.p[t])||void 0===e||e.sort(((t,i)=>t.priority-i.priority)),null===(n=this.pswp)||void 0===n||n.addFilter(t,i,s)}removeFilter(t,i){this.p[t]&&(this.p[t]=this.p[t].filter((t=>t.fn!==i))),this.pswp&&this.pswp.removeFilter(t,i)}applyFilters(t,...i){var s;return null===(s=this.p[t])||void 0===s||s.forEach((t=>{i[0]=t.fn.apply(this,i)})),i[0]}on(t,i){var s,h;this.u[t]||(this.u[t]=[]),null===(s=this.u[t])||void 0===s||s.push(i),null===(h=this.pswp)||void 0===h||h.on(t,i)}off(t,i){var s;this.u[t]&&(this.u[t]=this.u[t].filter((t=>i!==t))),null===(s=this.pswp)||void 0===s||s.off(t,i)}dispatch(t,i){var s;if(this.pswp)return this.pswp.dispatch(t,i);const h=new l(t,i);return null===(s=this.u[t])||void 0===s||s.forEach((t=>{t.call(this,h)})),h}}{getNumItems(){var t;let i=0;const s=null===(t=this.options)||void 0===t?void 0:t.dataSource;s&&"length"in s?i=s.length:s&&"gallery"in s&&(s.items||(s.items=this.v(s.gallery)),s.items&&(i=s.items.length));const h=this.dispatch("numItems",{dataSource:s,numItems:i});return this.applyFilters("numItems",h.numItems,s)}createContentFromData(t,i){return new d(t,this,i)}getItemData(t){var i;const s=null===(i=this.options)||void 0===i?void 0:i.dataSource;let h={};Array.isArray(s)?h=s[t]:s&&"gallery"in s&&(s.items||(s.items=this.v(s.gallery)),h=s.items[t]);let e=h;e instanceof Element&&(e=this.m(e));const n=this.dispatch("itemData",{itemData:e||{},index:t});return this.applyFilters("itemData",n.itemData,t)}v(t){var i,s;return null!==(i=this.options)&&void 0!==i&&i.children||null!==(s=this.options)&&void 0!==s&&s.childSelector?o(this.options.children,this.options.childSelector,t)||[]:[t]}m(t){const i={element:t},s="A"===t.tagName?t:t.querySelector("a");if(s){i.src=s.dataset.pswpSrc||s.href,s.dataset.pswpSrcset&&(i.srcset=s.dataset.pswpSrcset),i.width=s.dataset.pswpWidth?parseInt(s.dataset.pswpWidth,10):0,i.height=s.dataset.pswpHeight?parseInt(s.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,s.dataset.pswpType&&(i.type=s.dataset.pswpType);const e=t.querySelector("img");var h;if(e)i.msrc=e.currentSrc||e.src,i.alt=null!==(h=e.getAttribute("alt"))&&void 0!==h?h:"";(s.dataset.pswpCropped||s.dataset.cropped)&&(i.thumbCropped=!0)}return this.applyFilters("domItemData",i,t,s)}lazyLoadData(t,i){return p(t,this,i)}}{constructor(t){super(),this.options=t||{},this.g=0,this.shouldOpen=!1,this._=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){o(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(t){if(function(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}(t)||window.pswp)return;let i={x:t.clientX,y:t.clientY};i.x||i.y||(i=null);let s=this.getClickedIndex(t);s=this.applyFilters("clickedIndex",s,t,this);const h={gallery:t.currentTarget};s>=0&&(t.preventDefault(),this.loadAndOpen(s,h,i))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const i=t.target,s=o(this.options.children,this.options.childSelector,t.currentTarget).findIndex((t=>t===i||t.contains(i)));return-1!==s?s:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,i,s){return!window.pswp&&(this.options.index=t,this.options.initialPointerPos=s,this.shouldOpen=!0,this.preload(t,i),!0)}preload(t,i){const{options:s}=this;i&&(s.dataSource=i);const h=[],e=typeof s.pswpModule;if("function"==typeof(n=s.pswpModule)&&n.prototype&&n.prototype.goTo)h.push(Prom
vendor: 13,546 bytes, lines 20-26
20ise.resolve(s.pswpModule));else{if("string"===e)throw new Error("pswpModule as string is no longer supported");if("function"!==e)throw new Error("pswpModule is not valid");h.push(s.pswpModule())}var n;"function"==typeof s.openPromise&&h.push(s.openPromise()),!1!==s.preloadFirstSlide&&t>=0&&(this._=function(t,i){const s=i.getItemData(t);if(!i.dispatch("lazyLoadSlide",{index:t,itemData:s}).defaultPrevented)return p(s,i,t)}(t,this));const o=++this.g;Promise.all(h).then((t=>{if(this.shouldOpen){const i=t[0];this.I(i,o)}}))}I(t,i){if(i!==this.g&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const s="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=s,window.pswp=s,Object.keys(this.u).forEach((t=>{var i;null===(i=this.u[t])||void 0===i||i.forEach((i=>{s.on(t,i)}))})),Object.keys(this.p).forEach((t=>{var i;null===(i=this.p[t])||void 0===i||i.forEach((i=>{s.addFilter(t,i.fn,i.priority)}))})),this._&&(s.contentLoader.addToCache(this._),this._=void 0),s.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),s.init()}destroy(){var t;null===(t=this.pswp)||void 0===t||t.destroy(),this.shouldOpen=!1,this.u={},o(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)}))}}}));
21
22/*!
23  * PhotoSwipe 5.4.0 - https://photoswipe.com
24  * (c) 2023 Dmytro Semenov
25  */
26!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t="undefined"!=typeof globalThis?globalThis:t||self).PhotoSwipe=i()}(this,(function(){"use strict";function t(t,i,s){const h=document.createElement(i);return t&&(h.className=t),s&&s.appendChild(h),h}function i(t,i){return t.x=i.x,t.y=i.y,void 0!==i.id&&(t.id=i.id),t}function s(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function h(t,i){const s=Math.abs(t.x-i.x),h=Math.abs(t.y-i.y);return Math.sqrt(s*s+h*h)}function e(t,i){return t.x===i.x&&t.y===i.y}function n(t,i,s){return Math.min(Math.max(t,i),s)}function o(t,i,s){let h=`translate3d(${t}px,${i||0}px,0)`;return void 0!==s&&(h+=` scale3d(${s},${s},1)`),h}function r(t,i,s,h){t.style.transform=o(i,s,h)}function a(t,i,s,h){t.style.transition=i?`${i} ${s}ms ${h||"cubic-bezier(.4,0,.22,1)"}`:"none"}function l(t,i,s){t.style.width="number"==typeof i?`${i}px`:i,t.style.height="number"==typeof s?`${s}px`:s}const c="idle",d="loading",u="loaded",p="error";function m(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}let v=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{v=!0}}))}catch(t){}class f{constructor(){this.t=[]}add(t,i,s,h){this.i(t,i,s,h)}remove(t,i,s,h){this.i(t,i,s,h,!0)}removeAll(){this.t.forEach((t=>{this.i(t.target,t.type,t.listener,t.passive,!0,!0)})),this.t=[]}i(t,i,s,h,e,n){if(!t)return;const o=e?"removeEventListener":"addEventListener";i.split(" ").forEach((i=>{if(i){n||(e?this.t=this.t.filter((h=>h.type!==i||h.listener!==s||h.target!==t)):this.t.push({target:t,type:i,listener:s,passive:h}));const r=!!v&&{passive:h||!1};t[o](i,s,r)}}))}}function w(t,i){if(t.getViewportSizeFn){const s=t.getViewportSizeFn(t,i);if(s)return s}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function g(t,i,s,h,e){let n=0;if(i.paddingFn)n=i.paddingFn(s,h,e)[t];else if(i.padding)n=i.padding[t];else{const s="padding"+t[0].toUpperCase()+t.slice(1);i[s]&&(n=i[s])}return Number(n)||0}function y(t,i,s,h){return{x:i.x-g("left",t,i,s,h)-g("right",t,i,s,h),y:i.y-g("top",t,i,s,h)-g("bottom",t,i,s,h)}}class _{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this.o("x"),this.o("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}o(t){const{pswp:i}=this.slide,s=this.slide["x"===t?"width":"height"]*this.currZoomLevel,h=g("x"===t?"left":"top",i.options,i.viewportSize,this.slide.data,this.slide.index),e=this.slide.panAreaSize[t];this.center[t]=Math.round((e-s)/2)+h,this.max[t]=s>e?Math.round(e-s)+h:this.center[t],this.min[t]=s>e?h:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,i){return n(i,this.max[t],this.min[t])}}class x{constructor(t,i,s,h){this.pswp=h,this.options=t,this.itemData=i,this.index=s,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,i,s){const h={x:t,y:i};this.elementSize=h,this.panAreaSize=s;const e=s.x/h.x,n=s.y/h.y;this.fit=Math.min(1,e<n?e:n),this.fill=Math.min(1,e>n?e:n),this.vFill=Math.min(1,n),this.initial=this.l(),this.secondary=this.u(),this.max=Math.max(this.initial,this.secondary,this.p()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}m(t){const i=t+"ZoomLevel",s=this.options[i];if(s)return"function"==typeof s?s(this):"fill"===s?this.fill:"fit"===s?this.fit:Number(s)}u(){let t=this.m("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}l(){return this.m("initial")||this.fit}p(){return this.m("max")||Math.max(1,4*this.fit)}}class b{constructor(i,s,h){this.data=i,this.index=s,this.pswp=h,this.isActive=s===h.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!h.opener.isOpen,this.zoomLevels=new x(h.options,i,s,h),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:s}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=t("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new _(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const i=this.currentResolution||this.zoomLevels.initial;if(!i)return;const s=Math.round(this.width*i)||this.pswp.viewportSize.x,h=Math.round(this.height*i)||this.pswp.viewportSize.y;(this.sizeChanged(s,h)||t)&&this.content.setDisplayedSize(s,h)}sizeChanged(t,i){return(t!==this.prevDisplayedWidth||i!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=i,!0)}getPlaceholderElement(){var t;return null===(t=this.content.placeholder)||void 0===t?void 0:t.element}zoomTo(t,i,h,e){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:i,transitionDuration:h}),o.animations.stopAllPan();const r=this.currZoomLevel;e||(t=n(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",i,r),this.pan.y=this.calculateZoomToPanOffset("y",i,r),s(this.pan);const a=()=>{this.v(t),this.applyCurrentZoomPan()};h?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:h,easing:o.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,i,s){if(0===this.bounds.max[t]-this.bounds.min[t])return this.bounds.center[t];i||(i=this.pswp.getViewportCenterPoint()),s||(s=this.zoomLevels.initial);const h=this.currZoomLevel/s;return this.bounds.correctPan(t,(this.pan[t]-i[t])*h+i[t])}panTo(t,i){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",i),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this.g(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),i(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}g(t,i,s){s/=this.currentResolution||this.zoomLevels.initial,r(this.container,t,i,s)}calculateSize(){const{pswp:t}=this;i(this.panAreaSize,y(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return o(this.pan.x,this.pan.y,t)}v(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}class S{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&i(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:i,dragAxis:h}=this.gestures,{currSlide:e}=this.pswp;if("y"===h&&this.pswp.options.closeOnVerticalDrag&&e&&e.currZoomLevel<=e.zoomLevels.fit&&!this.gestures.isMultitouch){const s=e.pan.y+(t.y-i.y);if(!this.pswp.dispatch("verticalDrag",{panY:s}).defaultPrevented){this._("y",s,.6);const t=1-Math.abs(this.S(e.pan.y));this.pswp.applyBgOpacity(t),e.applyCurrentZoomPan()}}else{this.M("x")||(this.M("y"),e&&(s(e.pan),e.applyCurrentZoomPan()))}}end(){const{velocity:t}=this.gestures,{mainScroll:i,currSlide:s}=this.pswp;let h=0;if(this.pswp.animations.stopAll(),i.isShifted()){const s=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&s<0||t.x<.1&&s<-.5?(h=1,t.x=Math.min(t.x,0)):(t.x>.5&&s>0||t.x>-.1&&s>.5)&&(h=-1,t.x=Math.max(t.x,0)),i.moveIndexBy(h,!0,t.x)}s&&s.currZoomLevel>s.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this.P("x"),this.P("y"))}P(t){const{velocity:i}=this.gestures,{currSlide:s}=this.pswp;if(!s)return;const{pan:h,bounds:e}=s,o=h[t],r=this.pswp.bgOpacity<1&&"y"===t,a=o+function(t,i){return t*i/(1-i)}(i[t],.995);if(r){const t=this.S(o),i=this.S(a);if(t<0&&i<-.4||t>0&&i>.4)return void this.pswp.close()}const l=e.correctPan(t,a);if(o===l)return;const c=l===a?1:.82,d=this.pswp.bgOpacity,u=l-o;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:o,end:l,velocity:i[t],dampingRatio:c,onUpdate:i=>{if(r&&this.pswp.bgOpacity<1){const t=1-(l-i)/u;this.pswp.applyBgOpacity(n(d+(1-d)*t,0,1))}h[t]=Math.floor(i),s.applyCurrentZoomPan()}})}M(t){const{p1:i,dragAxis:s,prevP1:h,isMultitouch:e}=this.gestures,{currSlide:n,mainScroll:o}=this.pswp,r=i[t]-h[t],a=o.x+r;if(!r||!n)return!1;if("x"===t&&!n.isPannable()&&!e)return o.moveTo(a,!0),!0;const{bounds:l}=n,c=n.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===s&&"x"===t&&!e){const i=o.getCurrSlideX(),s=o.x-i,h=r>0,e=!h;if(c>l.min[t]&&h){if(l.min[t]<=this.startPan[t])return o.moveTo(a,!0),!0;this._(t,c)}else if(c<l.max[t]&&e){if(this.startPan[t]<=l.max[t])return o.moveTo(a,!0),!0;this._(t,c)}else if(0!==s){if(s>0)return o.moveTo(Math.max(a,i),!0),!0;if(s<0)return o.moveTo(Math.min(a,i),!0),!0}else this._(t,c)}else"y"===t&&(o.isShifted()||l.min.y===l.max.y)||this._(t,c);return!1}S(t){var i,s;return(t-(null!==(i=null===(s=this.pswp.currSlide)||void 0===s?void 0:s.bounds.center.y)&&void 0!==i?i:0))/(this.pswp.viewportSize.y/3)}_(t,i,s){const{currSlide:h}=this.pswp;if(!h)return;const{pan:e,bounds:n}=h;if(n.correctPan(t,i)!==i||s){const h=Math.round(i-e[t]);e[t]+=h*(s||.35)}else e[t]=i}}function z(t,i,s){return t.x=(i.x+s.x)/2,t.y=(i.y+s.y)/2,t}class M{constructor(t){this.gestures=t,this.C={x:0,y:0},this.T={x:0,y:0},this.A={x:0,y:0},this.D=!1,this.I=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this.I=t.currZoomLevel,i(this.C,t.pan)),this.gestures.pswp.animations.stopAllPan(),this.D=!1}change(){const{p1:t,startP1:i,p2:s,startP2:e,pswp:n}=this.gestures,{currSlide:o}=n;
vendor: 10,252 bytes, line 26
26if(!o)return;const r=o.zoomLevels.min,a=o.zoomLevels.max;if(!o.isZoomable()||n.mainScroll.isShifted())return;z(this.T,i,e),z(this.A,t,s);let l=1/h(i,e)*h(t,s)*this.I;if(l>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this.D=!0),l<r)if(n.options.pinchToClose&&!this.D&&this.I<=o.zoomLevels.initial){const t=1-(r-l)/(r/1.2);n.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||n.applyBgOpacity(t)}else l=r-.15*(r-l);else l>a&&(l=a+.05*(l-a));o.pan.x=this.L("x",l),o.pan.y=this.L("y",l),o.setZoomLevel(l),o.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:i}=t;(!i||i.currZoomLevel<i.zoomLevels.initial)&&!this.D&&t.options.pinchToClose?t.close():this.correctZoomPan()}L(t,i){const s=i/this.I;return this.A[t]-(this.T[t]-this.C[t])*s}correctZoomPan(t){const{pswp:s}=this.gestures,{currSlide:h}=s;if(null==h||!h.isZoomable())return;0===this.A.x&&(t=!0);const o=h.currZoomLevel;let r,a=!0;o<h.zoomLevels.initial?r=h.zoomLevels.initial:o>h.zoomLevels.max?r=h.zoomLevels.max:(a=!1,r=o);const l=s.bgOpacity,c=s.bgOpacity<1,d=i({x:0,y:0},h.pan);let u=i({x:0,y:0},d);t&&(this.A.x=0,this.A.y=0,this.T.x=0,this.T.y=0,this.I=o,i(this.C,d)),a&&(u={x:this.L("x",r),y:this.L("y",r)}),h.setZoomLevel(r),u={x:h.bounds.correctPan("x",u.x),y:h.bounds.correctPan("y",u.y)},h.setZoomLevel(o);const p=!e(u,d);if(!p&&!a&&!c)return h.v(r),void h.applyCurrentZoomPan();s.animations.stopAllPan(),s.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,p||a){if(p&&(h.pan.x=d.x+(u.x-d.x)*t,h.pan.y=d.y+(u.y-d.y)*t),a){const i=o+(r-o)*t;h.setZoomLevel(i)}h.applyCurrentZoomPan()}c&&s.bgOpacity<1&&s.applyBgOpacity(n(l+(1-l)*t,0,1))},onComplete:()=>{h.v(r),h.applyCurrentZoomPan()}})}}function P(t){return!!t.target.closest(".pswp__container")}class C{constructor(t){this.gestures=t}click(t,i){const s=i.target.classList,h=s.contains("pswp__img"),e=s.contains("pswp__item")||s.contains("pswp__zoom-wrap");h?this.k("imageClick",t,i):e&&this.k("bgClick",t,i)}tap(t,i){P(i)&&this.k("tap",t,i)}doubleTap(t,i){P(i)&&this.k("doubleTap",t,i)}k(t,i,s){var h;const{pswp:e}=this.gestures,{currSlide:n}=e,o=t+"Action",r=e.options[o];if(!e.dispatch(o,{point:i,originalEvent:s}).defaultPrevented)if("function"!=typeof r)switch(r){case"close":case"next":e[r]();break;case"zoom":null==n||n.toggleZoom(i);break;case"zoom-or-close":null!=n&&n.isZoomable()&&n.zoomLevels.secondary!==n.zoomLevels.initial?n.toggleZoom(i):e.options.clickToCloseNonZoomable&&e.close();break;case"toggle-controls":null===(h=this.gestures.pswp.element)||void 0===h||h.classList.toggle("pswp--ui-visible")}else r.call(e,i,s)}}class T{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this.Z={x:0,y:0},this.B={x:0,y:0},this.F=0,this.O=[],this.R="ontouchstart"in window,this.N=!!window.PointerEvent,this.supportsTouch=this.R||this.N&&navigator.maxTouchPoints>1,this.F=0,this.U=0,this.V=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this.G=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new S(this),this.zoomLevels=new M(this),this.tapHandler=new C(this),t.on("bindEvents",(()=>{t.events.add(t.scrollWrap,"click",this.$.bind(this)),this.N?this.q("pointer","down","up","cancel"):this.R?(this.q("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this.q("mouse","down","up")}))}q(t,i,s,h){const{pswp:e}=this,{events:n}=e,o=h?t+h:"";n.add(e.scrollWrap,t+i,this.onPointerDown.bind(this)),n.add(window,t+"move",this.onPointerMove.bind(this)),n.add(window,t+s,this.onPointerUp.bind(this)),o&&n.add(e.scrollWrap,o,this.onPointerUp.bind(this))}onPointerDown(t){const s="mousedown"===t.type||"mouse"===t.pointerType;if(s&&t.button>0)return;const{pswp:h}=this;h.opener.isOpen?h.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(s&&(h.mouseDetected(),this.H(t)),h.animations.stopAll(),this.K(t,"down"),1===this.F&&(this.dragAxis=null,i(this.startP1,this.p1)),this.F>1?(this.W(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){t.preventDefault(),this.F&&(this.K(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this.F||this.isDragging?this.F>1&&!this.isZooming&&(this.j(),this.isZooming=!0,this.X(),this.zoomLevels.start(),this.Y(),this.J()):(this.dragAxis||this.tt(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this.W(),this.X(),this.U=Date.now(),this.V=!1,i(this.B,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this.Y(),this.J()))))}j(){this.isDragging&&(this.isDragging=!1,this.V||this.it(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this.F&&(this.K(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this.F&&(this.Y(),this.isDragging?this.j():this.isZooming||this.isMultitouch||this.st(t)),this.F<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this.F&&(this.dragAxis=null,this.X()))))}J(){(this.isDragging||this.isZooming)&&(this.it(),this.isDragging?e(this.p1,this.prevP1)||this.drag.change():e(this.p1,this.prevP1)&&e(this.p2,this.prevP2)||this.zoomLevels.change(),this.ht(),this.raf=requestAnimationFrame(this.J.bind(this)))}it(t){const s=Date.now(),h=s-this.U;h<50&&!t||(this.velocity.x=this.et("x",h),this.velocity.y=this.et("y",h),this.U=s,i(this.B,this.p1),this.V=!0)}st(t){const{mainScroll:s}=this.pswp;if(s.isShifted())return void s.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const e=this.pswp.options.doubleTapAction?300:0;this.G?(this.W(),h(this.Z,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(i(this.Z,this.startP1),this.G=setTimeout((()=>{this.tapHandler.tap(this.startP1,t),this.W()}),e))}W(){this.G&&(clearTimeout(this.G),this.G=null)}et(t,i){const s=this.p1[t]-this.B[t];return Math.abs(s)>1&&i>5?s/i:0}Y(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}H(t){t.preventDefault()}K(t,s){if(this.N){const h=t,e=this.O.findIndex((t=>t.id===h.pointerId));"up"===s&&e>-1?this.O.splice(e,1):"down"===s&&-1===e?this.O.push(this.nt(h,{x:0,y:0})):e>-1&&this.nt(h,this.O[e]),this.F=this.O.length,this.F>0&&i(this.p1,this.O[0]),this.F>1&&i(this.p2,this.O[1])}else{const i=t;this.F=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this.nt(i.touches[0],this.p1),this.F++,i.touches.length>1&&(this.nt(i.touches[1],this.p2),this.F++)):(this.nt(t,this.p1),"up"===s?this.F=0:this.F++)}}ht(){i(this.prevP1,this.p1),i(this.prevP2,this.p2)}X(){i(this.startP1,this.p1),i(this.startP2,this.p2),this.ht()}tt(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const i=t>0?"x":"y";Math.abs(this.p1[i]-this.startP1[i])>=10&&(this.dragAxis=i)}}}nt(t,i){return i.x=t.pageX-this.pswp.offset.x,i.y=t.pageY-this.pswp.offset.y,"pointerId"in t?i.id=t.pointerId:void 0!==t.identifier&&(i.id=t.identifier),i}$(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}class A{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this.ot=0,this.rt=0,this.lt=-1,this.itemHolders=[]}resize(t){const{pswp:i}=this,s=Math.round(i.viewportSize.x+i.viewportSize.x*i.options.spacing),h=s!==this.slideWidth;h&&(this.slideWidth=s,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach(((i,s)=>{h&&r(i.el,(s+this.lt)*this.slideWidth),t&&i.slide&&i.slide.resize()}))}resetPosition(){this.ot=0,this.rt=0,this.slideWidth=0,this.lt=-1}appendHolders(){this.itemHolders=[];for(let i=0;i<3;i++){const s=t("pswp__item","div",this.pswp.container);s.setAttribute("role","group"),s.setAttribute("aria-roledescription","slide"),s.setAttribute("aria-hidden","true"),s.style.display=1===i?"block":"none",this.itemHolders.push({el:s})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,i,s){const{pswp:h}=this;let e=h.potentialIndex+t;const n=h.getNumItems();if(h.canLoop()){e=h.getLoopedIndex(e);const i=(t+n)%n;t=i<=n/2?i:i-n}else e<0?e=0:e>=n&&(e=n-1),t=e-h.potentialIndex;h.potentialIndex=e,this.ot-=t,h.animations.stopMainScroll();const o=this.getCurrSlideX();if(i){h.animations.startSpring({isMainScroll:!0,start:this.x,end:o,velocity:s||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),h.appendHeavy()}});let t=h.potentialIndex-h.currIndex;if(h.canLoop()){const i=(t+n)%n;t=i<=n/2?i:i-n}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(o),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this.ot}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:i}=this,s=this.rt-this.ot;if(!s)return;this.rt=this.ot,i.currIndex=i.potentialIndex;let h,e=Math.abs(s);e>=3&&(this.lt+=s+(s>0?-3:3),e=3);for(let t=0;t<e;t++)s>0?(h=this.itemHolders.shift(),h&&(this.itemHolders[2]=h,this.lt++,r(h.el,(this.lt+2)*this.slideWidth),i.setContent(h,i.currIndex-e+t+2))):(h=this.itemHolders.pop(),h&&(this.itemHolders.unshift(h),this.lt--,r(h.el,this.lt*this.slideWidth),i.setContent(h,i.currIndex+e-t-2)));Math.abs(this.lt)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),i.animations.stopAllPan(),this.itemHolders.forEach(((t,i)=>{t.slide&&t.slide.setIsActive(1===i)})),i.currSlide=null===(t=this.itemHolders[1])||void 0===t?void 0:t.slide,i.contentLoader.updateLazy(s),i.currSlide&&i.currSlide.applyCurrentZoomPan(),i.dispatch("change")}moveTo(t,i){if(!this.pswp.canLoop()&&i){let i=(this.slideWidth*this.ot-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+.35*s)}this.x=t,this.pswp.container&&r(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:null!=i&&i})}}const D={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},I=(t,i)=>i?t:D[t];class E{constructor(t){this.pswp=t,this.ct=!1,t.on("bindEvents",(()=>{t.options.initialPointerPos||this.dt(),t.events.add(document,"focusin",this.ut.bind(this
vendor: 15,709 bytes, line 26
26)),t.events.add(document,"keydown",this.vt.bind(this))}));const i=document.activeElement;t.on("destroy",(()=>{t.options.returnFocus&&i&&this.ct&&i.focus()}))}dt(){!this.ct&&this.pswp.element&&(this.pswp.element.focus(),this.ct=!0)}vt(t){const{pswp:i}=this;if(i.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(function(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}(t))return;let s,h,e=!1;const n="key"in t;switch(n?t.key:t.keyCode){case I("Escape",n):i.options.escKey&&(s="close");break;case I("z",n):s="toggleZoom";break;case I("ArrowLeft",n):h="x";break;case I("ArrowUp",n):h="y";break;case I("ArrowRight",n):h="x",e=!0;break;case I("ArrowDown",n):e=!0,h="y";break;case I("Tab",n):this.dt()}if(h){t.preventDefault();const{currSlide:n}=i;i.options.arrowKeys&&"x"===h&&i.getNumItems()>1?s=e?"next":"prev":n&&n.currZoomLevel>n.zoomLevels.fit&&(n.pan[h]+=e?-80:80,n.panTo(n.pan.x,n.pan.y))}s&&(t.preventDefault(),i[s]())}ut(t){const{template:i}=this.pswp;i&&document!==t.target&&i!==t.target&&!i.contains(t.target)&&i.focus()}}const L="cubic-bezier(.4,0,.22,1)";class k{constructor(t){var i;this.props=t;const{target:s,onComplete:h,transform:e,onFinish:n=(()=>{}),duration:o=333,easing:r=L}=t;this.onFinish=n;const l=e?"transform":"opacity",c=null!==(i=t[l])&&void 0!==i?i:"";this.ft=s,this.wt=h,this.gt=!1,this.yt=this.yt.bind(this),this._t=setTimeout((()=>{a(s,l,o,r),this._t=setTimeout((()=>{s.addEventListener("transitionend",this.yt,!1),s.addEventListener("transitioncancel",this.yt,!1),this._t=setTimeout((()=>{this.xt()}),o+500),s.style[l]=c}),30)}),0)}yt(t){t.target===this.ft&&this.xt()}xt(){this.gt||(this.gt=!0,this.onFinish(),this.wt&&this.wt())}destroy(){this._t&&clearTimeout(this._t),a(this.ft),this.ft.removeEventListener("transitionend",this.yt,!1),this.ft.removeEventListener("transitioncancel",this.yt,!1),this.gt||this.xt()}}class Z{constructor(t,i,s){this.velocity=1e3*t,this.bt=i||.75,this.St=s||12,this.zt=this.St,this.bt<1&&(this.zt*=Math.sqrt(1-this.bt*this.bt))}easeFrame(t,i){let s,h=0;i/=1e3;const e=Math.E**(-this.bt*this.St*i);if(1===this.bt)s=this.velocity+this.St*t,h=(t+s*i)*e,this.velocity=h*-this.St+s*e;else if(this.bt<1){s=1/this.zt*(this.bt*this.St*t+this.velocity);const n=Math.cos(this.zt*i),o=Math.sin(this.zt*i);h=e*(t*n+s*o),this.velocity=h*-this.St*this.bt+e*(-this.zt*t*o+this.zt*s*n)}return h}}class B{constructor(t){this.props=t,this.Mt=0;const{start:i,end:s,velocity:h,onUpdate:e,onComplete:n,onFinish:o=(()=>{}),dampingRatio:r,naturalFrequency:a}=t;this.onFinish=o;const l=new Z(h,r,a);let c=Date.now(),d=i-s;const u=()=>{this.Mt&&(d=l.easeFrame(d,Date.now()-c),Math.abs(d)<1&&Math.abs(l.velocity)<50?(e(s),n&&n(),this.onFinish()):(c=Date.now(),e(d+s),this.Mt=requestAnimationFrame(u)))};this.Mt=requestAnimationFrame(u)}destroy(){this.Mt>=0&&cancelAnimationFrame(this.Mt),this.Mt=0}}class F{constructor(){this.activeAnimations=[]}startSpring(t){this.Pt(t,!0)}startTransition(t){this.Pt(t)}Pt(t,i){const s=i?new B(t):new k(t);return this.activeAnimations.push(s),s.onFinish=()=>this.stop(s),s}stop(t){t.destroy();const i=this.activeAnimations.indexOf(t);i>-1&&this.activeAnimations.splice(i,1)}stopAll(){this.activeAnimations.forEach((t=>{t.destroy()})),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isPan||(t.destroy(),!1)))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isMainScroll||(t.destroy(),!1)))}isPanRunning(){return this.activeAnimations.some((t=>t.props.isPan))}}class O{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this.Ct.bind(this))}Ct(t){t.preventDefault();const{currSlide:i}=this.pswp;let{deltaX:s,deltaY:h}=t;if(i&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let s=-h;1===t.deltaMode?s*=.05:s*=t.deltaMode?1:.002,s=2**s;const e=i.currZoomLevel*s;i.zoomTo(e,{x:t.clientX,y:t.clientY})}}else i.isPannable()&&(1===t.deltaMode&&(s*=18,h*=18),i.panTo(i.pan.x-s,i.pan.y-h))}}class R{constructor(i,s){var h;const e=s.name||s.className;let n=s.html;if(!1===i.options[e])return;"string"==typeof i.options[e+"SVG"]&&(n=i.options[e+"SVG"]),i.dispatch("uiElementCreate",{data:s});let o="";s.isButton?(o+="pswp__button ",o+=s.className||`pswp__button--${s.name}`):o+=s.className||`pswp__${s.name}`;let r=s.isButton?s.tagName||"button":s.tagName||"div";r=r.toLowerCase();const a=t(o,r);if(s.isButton){"button"===r&&(a.type="button");let{title:t}=s;const{ariaLabel:h}=s;"string"==typeof i.options[e+"Title"]&&(t=i.options[e+"Title"]),t&&(a.title=t);const n=h||t;n&&a.setAttribute("aria-label",n)}a.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const i=t;let s='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return s=s.split("%d").join(i.size||32),i.outlineID&&(s+='<use class="pswp__icn-shadow" xlink:href="#'+i.outlineID+'"/>'),s+=i.inner,s+="</svg>",s}(n),s.onInit&&s.onInit(a,i),s.onClick&&(a.onclick=t=>{"string"==typeof s.onClick?i[s.onClick]():"function"==typeof s.onClick&&s.onClick(t,a,i)});const l=s.appendTo||"bar";let c=i.element;"bar"===l?(i.topBar||(i.topBar=t("pswp__top-bar pswp__hide-on-close","div",i.scrollWrap)),c=i.topBar):(a.classList.add("pswp__hide-on-close"),"wrapper"===l&&(c=i.scrollWrap)),null===(h=c)||void 0===h||h.appendChild(i.applyFilters("uiElement",a,s))}}function N(t,i,s){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),i.on("change",(()=>{i.options.loop||(t.disabled=s?!(i.currIndex<i.getNumItems()-1):!(i.currIndex>0))}))}const U={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:N},V={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,i)=>{N(t,i,!0)}},G={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},$={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},q={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,i)=>{let s,h=null;const e=i=>{var h,e;s!==i&&(s=i,h="active",e=i,t.classList.toggle("pswp__preloader--"+h,e))},n=()=>{var t;if(null===(t=i.currSlide)||void 0===t||!t.content.isLoading())return e(!1),void(h&&(clearTimeout(h),h=null));h||(h=setTimeout((()=>{var t;e(Boolean(null===(t=i.currSlide)||void 0===t?void 0:t.content.isLoading())),h=null}),i.options.preloaderDelay))};i.on("change",n),i.on("loadComplete",(t=>{i.currSlide===t.slide&&n()})),i.ui&&(i.ui.updatePreloaderVisibility=n)}},H={name:"counter",order:5,onInit:(t,i)=>{i.on("change",(()=>{t.innerText=i.currIndex+1+i.options.indexIndicatorSep+i.getNumItems()}))}};function K(t,i){t.classList.toggle("pswp--zoomed-in",i)}class W{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this.Tt=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[G,U,V,$,q,H],t.dispatch("uiRegister"),this.uiElementsData.sort(((t,i)=>(t.order||0)-(i.order||0))),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach((t=>{this.registerElement(t)})),t.on("change",(()=>{var i;null===(i=t.element)||void 0===i||i.classList.toggle("pswp--one-slide",1===t.getNumItems())})),t.on("zoomPanUpdate",(()=>this.At()))}registerElement(t){this.isRegistered?this.items.push(new R(this.pswp,t)):this.uiElementsData.push(t)}At(){const{template:t,currSlide:i,options:s}=this.pswp;if(this.pswp.opener.isClosing||!t||!i)return;let{currZoomLevel:h}=i;if(this.pswp.opener.isOpen||(h=i.zoomLevels.initial),h===this.Tt)return;this.Tt=h;const e=i.zoomLevels.initial-i.zoomLevels.secondary;if(Math.abs(e)<.01||!i.isZoomable())return K(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed");K(t,(h===i.zoomLevels.initial?i.zoomLevels.secondary:i.zoomLevels.initial)<=h),"zoom"!==s.imageClickAction&&"zoom-or-close"!==s.imageClickAction||t.classList.add("pswp--click-to-zoom")}}class j{constructor(t,i){this.type=t,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}}class X{constructor(i,s){if(this.element=t("pswp__img pswp__img--placeholder",i?"img":"div",s),i){const t=this.element;t.decoding="async",t.alt="",t.src=i,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,i){this.element&&("IMG"===this.element.tagName?(l(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=o(0,0,t/250)):l(this.element,t,i))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class Y{constructor(t,i,s){this.instance=i,this.data=t,this.index=s,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=c,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(i,s){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new X(t,this.slide.container)}this.element&&!s||this.instance.dispatch("contentLoad",{content:this,isLazy:i}).defaultPrevented||(this.isImageContent()?(this.element=t("pswp__img","img"),this.displayedImageWidth&&this.loadImage(i)):(this.element=t("pswp__content","div"),this.element.innerHTML=this.data.html||""),s&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var i,s;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const h=this.element;this.updateSrcsetSizes(),this.data.srcset&&(h.srcset=this.data.srcset),h.src=null!==(i=this.data.src)&&void 0!==i?i:"",h.alt=null!==(s=this.data.alt)&&void 0!==s?s:"",this.state=d,h.complete?this.onLoaded():(h.onload=()=>{this.onLoaded()},h.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=u,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==u&&this.state!==p||this.removePlaceholder())}onError(){this.state=p,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===d,this)}isError(){return this.state===p}isImageContent(){return"image"===this.type}setDisplayedSize(t,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,i),!this.instance.dispatch("contentResize",{content:this,width:t,height:i}).defaultPrevented&&(l(this.element,t,i),this.isImageContent()&&!this.isError()))){const s=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=i,s?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==p,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||i>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=i+"px",t.dataset.largestUsedSize=String(i))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var i,s;let h=t("pswp__error-msg","div");h.innerText=null!==(i=null===(s=this.instance.options)||void 0===s?void 0:s.errorMsg)&&void 0!==i?i:"",h=this.instance.applyFilters("contentErrorElement",h,this),this.element=t("pswp__content pswp__error-msg-container","div"),this.element.appendChild(h),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===p)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||m())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!m()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==u&&this.state!==p||this.removePlaceholder()))}}function J(t,i,s){const h=i.createContentFromData(t,s);let e;const{options:n}=i;
vendor: 16,086 bytes, line 26
26if(n){let o;e=new x(n,t,-1),o=i.pswp?i.pswp.viewportSize:w(n,i);const r=y(n,o,t,s);e.update(h.width,h.height,r)}return h.lazyLoad(),e&&h.setDisplayedSize(Math.ceil(h.width*e.initial),Math.ceil(h.height*e.initial)),h}class Q{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this.Dt=[]}updateLazy(t){const{pswp:i}=this;if(i.dispatch("lazyLoad").defaultPrevented)return;const{preload:s}=i.options,h=void 0===t||t>=0;let e;for(e=0;e<=s[1];e++)this.loadSlideByIndex(i.currIndex+(h?e:-e));for(e=1;e<=s[0];e++)this.loadSlideByIndex(i.currIndex+(h?-e:e))}loadSlideByIndex(t){const i=this.pswp.getLoopedIndex(t);let s=this.getContentByIndex(i);s||(s=function(t,i){const s=i.getItemData(t);if(!i.dispatch("lazyLoadSlide",{index:t,itemData:s}).defaultPrevented)return J(s,i,t)}(i,this.pswp),s&&this.addToCache(s))}getContentBySlide(t){let i=this.getContentByIndex(t.index);return i||(i=this.pswp.createContentFromData(t.data,t.index),this.addToCache(i)),i.setSlide(t),i}addToCache(t){if(this.removeByIndex(t.index),this.Dt.push(t),this.Dt.length>this.limit){const t=this.Dt.findIndex((t=>!t.isAttached&&!t.hasSlide));if(-1!==t){this.Dt.splice(t,1)[0].destroy()}}}removeByIndex(t){const i=this.Dt.findIndex((i=>i.index===t));-1!==i&&this.Dt.splice(i,1)}getContentByIndex(t){return this.Dt.find((i=>i.index===t))}destroy(){this.Dt.forEach((t=>t.destroy())),this.Dt=[]}}const tt=.003;class it{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this.It=void 0,this.Et=!1,this.Lt=!1,this.kt=!1,this.Zt=!1,this.Bt=void 0,this.Ft=void 0,this.Ot=void 0,this.Rt=void 0,this.Nt=void 0,this.Ut=this.Ut.bind(this),t.on("firstZoomPan",this.Ut)}open(){this.Ut(),this.Pt()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this.It=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt(),setTimeout((()=>{this.Pt()}),this.Lt?30:0)}Ut(){if(this.pswp.off("firstZoomPan",this.Ut),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this.It=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt()}}Vt(){const{pswp:t}=this,i=this.pswp.currSlide,{options:s}=t;var h,e;("fade"===s.showHideAnimationType?(s.showHideOpacity=!0,this.Nt=void 0):"none"===s.showHideAnimationType?(s.showHideOpacity=!1,this.It=0,this.Nt=void 0):this.isOpening&&t.Gt?this.Nt=t.Gt:this.Nt=this.pswp.getThumbBounds(),this.Bt=null==i?void 0:i.getPlaceholderElement(),t.animations.stopAll(),this.Et=Boolean(this.It&&this.It>50),this.$t=Boolean(this.Nt)&&(null==i?void 0:i.content.usePlaceholder())&&(!this.isClosing||!t.mainScroll.isShifted()),this.$t)?this.kt=null!==(h=s.showHideOpacity)&&void 0!==h&&h:(this.kt=!0,this.isOpening&&i&&(i.zoomAndPanToInitial(),i.applyCurrentZoomPan()));if(this.Zt=!this.kt&&this.pswp.options.bgOpacity>tt,this.Ft=this.kt?t.element:t.bg,!this.Et)return this.It=0,this.$t=!1,this.Zt=!1,this.kt=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(tt)),t.applyBgOpacity(1)));this.$t&&this.Nt&&this.Nt.innerRect?(this.Lt=!0,this.Ot=this.pswp.container,this.Rt=null===(e=this.pswp.currSlide)||void 0===e?void 0:e.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")):this.Lt=!1;this.isOpening?(this.kt?(t.element&&(t.element.style.opacity=String(tt)),t.applyBgOpacity(1)):(this.Zt&&t.bg&&(t.bg.style.opacity=String(tt)),t.element&&(t.element.style.opacity="1")),this.$t&&(this.qt(),this.Bt&&(this.Bt.style.willChange="transform",this.Bt.style.opacity=String(tt)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this.Lt&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}Pt(){this.isOpening&&this.Et&&this.Bt&&"IMG"===this.Bt.tagName?new Promise((t=>{let i=!1,s=!0;var h;(h=this.Bt,"decode"in h?h.decode().catch((()=>{})):h.complete?Promise.resolve(h):new Promise(((t,i)=>{h.onload=()=>t(h),h.onerror=i}))).finally((()=>{i=!0,s||t(!0)})),setTimeout((()=>{s=!1,i&&t(!0)}),50),setTimeout(t,250)})).finally((()=>this.Ht())):this.Ht()}Ht(){var t,i;null===(t=this.pswp.element)||void 0===t||t.style.setProperty("--pswp-transition-duration",this.It+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),null===(i=this.pswp.element)||void 0===i||i.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this.Bt&&(this.Bt.style.opacity="1"),this.Kt()):this.isClosing&&this.Wt(),this.Et||this.jt()}jt(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var i;this.$t&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),null===(i=t.currSlide)||void 0===i||i.applyCurrentZoomPan()}}Kt(){const{pswp:t}=this;this.$t&&(this.Lt&&this.Ot&&this.Rt&&(this.Xt(this.Ot,"transform","translate3d(0,0,0)"),this.Xt(this.Rt,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this.Xt(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this.Zt&&t.bg&&this.Xt(t.bg,"opacity",String(t.options.bgOpacity)),this.kt&&t.element&&this.Xt(t.element,"opacity","1")}Wt(){const{pswp:t}=this;this.$t&&this.qt(!0),this.Zt&&t.bgOpacity>.01&&t.bg&&this.Xt(t.bg,"opacity","0"),this.kt&&t.element&&this.Xt(t.element,"opacity","0")}qt(t){if(!this.Nt)return;const{pswp:s}=this,{innerRect:h}=this.Nt,{currSlide:e,viewportSize:n}=s;if(this.Lt&&h&&this.Ot&&this.Rt){const i=-n.x+(this.Nt.x-h.x)+h.w,s=-n.y+(this.Nt.y-h.y)+h.h,e=n.x-h.w,a=n.y-h.h;t?(this.Xt(this.Ot,"transform",o(i,s)),this.Xt(this.Rt,"transform",o(e,a))):(r(this.Ot,i,s),r(this.Rt,e,a))}e&&(i(e.pan,h||this.Nt),e.currZoomLevel=this.Nt.w/e.width,t?this.Xt(e.container,"transform",e.getCurrentTransform()):e.applyCurrentZoomPan())}Xt(t,i,s){if(!this.It)return void(t.style[i]=s);const{animations:h}=this.pswp,e={duration:this.It,easing:this.pswp.options.easing,onComplete:()=>{h.activeAnimations.length||this.jt()},target:t};e[i]=s,h.startTransition(e)}}const st={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};return class extends class extends class{constructor(){this.Yt={},this.Jt={},this.pswp=void 0,this.options=void 0}addFilter(t,i,s=100){var h,e,n;this.Jt[t]||(this.Jt[t]=[]),null===(h=this.Jt[t])||void 0===h||h.push({fn:i,priority:s}),null===(e=this.Jt[t])||void 0===e||e.sort(((t,i)=>t.priority-i.priority)),null===(n=this.pswp)||void 0===n||n.addFilter(t,i,s)}removeFilter(t,i){this.Jt[t]&&(this.Jt[t]=this.Jt[t].filter((t=>t.fn!==i))),this.pswp&&this.pswp.removeFilter(t,i)}applyFilters(t,...i){var s;return null===(s=this.Jt[t])||void 0===s||s.forEach((t=>{i[0]=t.fn.apply(this,i)})),i[0]}on(t,i){var s,h;this.Yt[t]||(this.Yt[t]=[]),null===(s=this.Yt[t])||void 0===s||s.push(i),null===(h=this.pswp)||void 0===h||h.on(t,i)}off(t,i){var s;this.Yt[t]&&(this.Yt[t]=this.Yt[t].filter((t=>i!==t))),null===(s=this.pswp)||void 0===s||s.off(t,i)}dispatch(t,i){var s;if(this.pswp)return this.pswp.dispatch(t,i);const h=new j(t,i);return null===(s=this.Yt[t])||void 0===s||s.forEach((t=>{t.call(this,h)})),h}}{getNumItems(){var t;let i=0;const s=null===(t=this.options)||void 0===t?void 0:t.dataSource;s&&"length"in s?i=s.length:s&&"gallery"in s&&(s.items||(s.items=this.Qt(s.gallery)),s.items&&(i=s.items.length));const h=this.dispatch("numItems",{dataSource:s,numItems:i});return this.applyFilters("numItems",h.numItems,s)}createContentFromData(t,i){return new Y(t,this,i)}getItemData(t){var i;const s=null===(i=this.options)||void 0===i?void 0:i.dataSource;let h={};Array.isArray(s)?h=s[t]:s&&"gallery"in s&&(s.items||(s.items=this.Qt(s.gallery)),h=s.items[t]);let e=h;e instanceof Element&&(e=this.ti(e));const n=this.dispatch("itemData",{itemData:e||{},index:t});return this.applyFilters("itemData",n.itemData,t)}Qt(t){var i,s;return null!==(i=this.options)&&void 0!==i&&i.children||null!==(s=this.options)&&void 0!==s&&s.childSelector?function(t,i,s=document){let h=[];if(t instanceof Element)h=[t];else if(t instanceof NodeList||Array.isArray(t))h=Array.from(t);else{const e="string"==typeof t?t:i;e&&(h=Array.from(s.querySelectorAll(e)))}return h}(this.options.children,this.options.childSelector,t)||[]:[t]}ti(t){const i={element:t},s="A"===t.tagName?t:t.querySelector("a");if(s){i.src=s.dataset.pswpSrc||s.href,s.dataset.pswpSrcset&&(i.srcset=s.dataset.pswpSrcset),i.width=s.dataset.pswpWidth?parseInt(s.dataset.pswpWidth,10):0,i.height=s.dataset.pswpHeight?parseInt(s.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,s.dataset.pswpType&&(i.type=s.dataset.pswpType);const e=t.querySelector("img");var h;if(e)i.msrc=e.currentSrc||e.src,i.alt=null!==(h=e.getAttribute("alt"))&&void 0!==h?h:"";(s.dataset.pswpCropped||s.dataset.cropped)&&(i.thumbCropped=!0)}return this.applyFilters("domItemData",i,t,s)}lazyLoadData(t,i){return J(t,this,i)}}{constructor(t){super(),this.options=this.ii(t||{}),this.offset={x:0,y:0},this.si={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this.hi={},this.Gt=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new f,this.animations=new F,this.mainScroll=new A(this),this.gestures=new T(this),this.opener=new it(this),this.keyboard=new E(this),this.contentLoader=new Q(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this.ei();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new O(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this.hi=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this.hi,slide:void 0}),this.Gt=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",(()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this.ni.bind(this)),this.events.add(window,"scroll",this.oi.bind(this)),this.dispatch("bindEvents")})),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const i=this.getNumItems();return this.options.loop&&(t>i-1&&(t-=i),t<0&&(t+=i)),n(t,0,i-1)}appendHeavy(){this.mainScroll.itemHolders.forEach((t=>{var i;null===(i=t.slide)||void 0===i||i.appendHeavy()}))}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var i;null===(i=this.currSlide)||void 0===i||i.zoomTo(...t)}toggleZoom(){var t;null===(t=this.currSlide)||void 0===t||t.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this.Yt={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),null===(t=this.element)||void 0===t||t.remove(),this.mainScroll.itemHolders.forEach((t=>{var i;null===(i=t.slide)||void 0===i||i.destroy()})),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach(((i,s)=>{var h,e;let n=(null!==(h=null===(e=this.currSlide)||void 0===e?void 0:e.index)&&void 0!==h?h:0)-1+s;var o;(this.canLoop()&&(n=this.getLoopedIndex(n)),n===t)&&(this.setContent(i,t,!0),1===s&&(this.currSlide=i.slide,null===(o=i.slide)||void 0===o||o.setIsActive(!0)))})),this.dispatch("change")}setContent(t,i,s){if(this.canLoop()&&(i=this.getLoopedIndex(i)),t.slide){if(t.slide.index===i&&!s)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(i<0||i>=this.getNumItems()))return;const h=this.getItemData(i);t.slide=new b(h,i,this),i===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const s=w(this.options,this);!t&&e(s,this.si)||(i(this.si,s),this.dispatch("beforeResize"),i(this.viewportSize,this.si),this.oi(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){var t;this.hasMouse||(this.hasMouse=!0,null===(t=this.element)||void 0===t||t.classList.add("pswp--has_mouse"))}ni(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout((()=>{this.updateSize()}),500)}oi(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,i){this.offset.x=t,this.offset.y=i,this.dispatch("updateScrollOffset")}ei(){this.element=t("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=t("pswp__bg","div",this.element),this.scrollWrap=t("pswp__scroll-wrap","section",this.element),this.container=t("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new W(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,i,s){const h=s.dispatch("thumbBounds",{index:t,itemData:i,instance:s});if(h.thumbBounds)return h.thumbBounds;const{element:e}=i;let n,o;if(e&&!1!==s.options.thumbSelector){const t=s.options.thumbSelector||"img";o=e.matches(t)?e:e.querySelector(t)}return o=s.applyFilters("thumbEl",o,i,t),o&&(n=i.thumbCropped?function(t,i,s){const h=t.getBoundingClientRect(),e=h.width/i,n=h.height/s,o=e>n?e:n,r=(h.width-i*o)/2,a=(h.height-s*o)/2,l={x:h.left+r,y:h.top+a,w:i*o};return l.innerRect={w:h.width,h:h.height,x:r,y:a},l}(o,i.width||i.w||0,i.height||i.h||0):function(t){const i=t.getBoundingClientRect();return{x:i.left,y:i.top,w:i.width}}(o)),s.applyFilters("thumbBounds",n,i,t)}(this.currIndex,this.currSlide?this.currSlide.data:this.hi,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}ii(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...st,...t}}}}));
vendor: 59,593 bytes, lines 27-1140
27
28//
29// Owl Carousel v2.3.4
30// Copyright 2013-2018 David Deutsch
31// Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
32//
33
34// Swipe-Carousel (OwlCarousel)
35//---------------------------------------------------------
36{
37	!function (a, b, c, d) {
38		function e(b, c) {
39			this.settings = null, this.options = a.extend({}, e.Defaults, c), this.$element = a(b), this._handlers
40				= {}, this._plugins = {}, this._supress = {}, this._current = null, this._speed
41				= null, this._coordinates = [], this._breakpoint = null, this._width = null, this._items
42				= [], this._clones = [], this._mergers = [], this._widths = [], this._invalidated = {}, this._pipe
43				= [], this._drag = {
44				time : null, target : null, pointer : null, stage : {start : null, current : null}, direction : null
45			}, this._states = {
46				current : {}, tags : {initializing : ["busy"], animating : ["busy"], dragging : ["interacting"]}
47			}, a.each(["onResize", "onThrottledResize"], a.proxy(function (b, c) {
48				this._handlers[c] = a.proxy(this[c], this)
49			}, this)), a.each(e.Plugins, a.proxy(function (a, b) {
50				this._plugins[a.charAt(0).toLowerCase() + a.slice(1)] = new b(this)
51			}, this)), a.each(e.Workers, a.proxy(function (b, c) {
52				this._pipe.push({filter : c.filter, run : a.proxy(c.run, this)})
53			}, this)), this.setup(), this.initialize()
54		}
55
56		e.Defaults = {
57			items : 3,
58			loop : !1,
59			center : !1,
60			rewind : !1,
61			checkVisibility : !0,
62			mouseDrag : !0,
63			touchDrag : !0,
64			pullDrag : !0,
65			freeDrag : !1,
66			margin : 0,
67			stagePadding : 0,
68			merge : !1,
69			mergeFit : !0,
70			autoWidth : !1,
71			startPosition : 0,
72			rtl : !1,
73			smartSpeed : 250,
74			fluidSpeed : !1,
75			dragEndSpeed : !1,
76			responsive : {},
77			responsiveRefreshRate : 200,
78			responsiveBaseElement : b,
79			fallbackEasing : "swing",
80			slideTransition : "",
81			info : !1,
82			nestedItemSelector : !1,
83			itemElement : "div",
84			stageElement : "div",
85			refreshClass : "owl-refresh",
86			loadedClass : "owl-loaded",
87			loadingClass : "owl-loading",
88			rtlClass : "owl-rtl",
89			responsiveClass : "owl-responsive",
90			dragClass : "owl-drag",
91			itemClass : "owl-item",
92			stageClass : "owl-stage",
93			stageOuterClass : "owl-stage-outer",
94			grabClass : "owl-grab"
95		}, e.Width = {Default : "default", Inner : "inner", Outer : "outer"}, e.Type = {
96			Event : "event", State : "state"
97		}, e.Plugins = {}, e.Workers = [{
98			filter : ["width", "settings"], run : function () {
99				this._width = this.$element.width()
100			}
101		}, {
102			filter : ["width", "items", "settings"], run : function (a) {
103				a.current = this._items && this._items[this.relative(this._current)]
104			}
105		}, {
106			filter : ["items", "settings"], run : function () {
107				this.$stage.children(".cloned").remove()
108			}
109		}, {
110			filter : ["width", "items", "settings"], run : function (a) {
111				var b = this.settings.margin || "", c = !this.settings.autoWidth, d = this.settings.rtl,
112					e = {width : "auto", "margin-left" : d ? b : "", "margin-right" : d ? "" : b};
113				!c && this.$stage.children().css(e), a.css = e
114			}
115		}, {
116			filter : ["width", "items", "settings"], run : function (a) {
117				var b = (this.width() / this.settings.items).toFixed(3) - this.settings.margin, c = null,
118					d = this._items.length, e = !this.settings.autoWidth, f = [];
119				for (a.items = {merge : !1, width : b}; d--;) {
120					c = this._mergers[d], c = this.settings.mergeFit && Math.min(c, this.settings.items)
121					                          || c, a.items.merge = c > 1 || a.items.merge, f[d] = e ? b * c
122					                                                                                 : this._items[d].width();
123				}
124				this._widths = f
125			}
126		}, {
127			filter : ["items", "settings"], run : function () {
128				var b = [], c = this._items, d = this.settings, e = Math.max(2 * d.items, 4),
129					f = 2 * Math.ceil(c.length / 2), g = d.loop && c.length ? d.rewind ? e : Math.max(e, f) : 0, h = "",
130					i = "";
131				for (g /= 2; g > 0;) {
132					b.push(this.normalize(b.length / 2, !0)), h += c[b[b.length - 1]][0].outerHTML, b.push(
133						this.normalize(c.length - 1 - (b.length - 1) / 2, !0)), i = c[b[b.length - 1]][0].outerHTML
134					                                                                + i, g -= 1;
135				}
136				this._clones = b, a(h).addClass("cloned").appendTo(this.$stage), a(i).addClass("cloned").prependTo(
137					this.$stage)
138			}
139		}, {
140			filter : ["width", "items", "settings"], run : function () {
141				for (var a = this.settings.rtl ? 1 : -1, b = this._clones.length + this._items.length, c = -1, d = 0,
142					     e = 0, f = []; ++c < b;) {
143					d = f[c - 1] || 0, e = this._widths[this.relative(c)] + this.settings.margin, f.push(d + e * a);
144				}
145				this._coordinates = f
146			}
147		}, {
148			filter : ["width", "items", "settings"], run : function () {
149				var a = this.settings.stagePadding, b = this._coordinates, c = {
150					width : Math.ceil(Math.abs(b[b.length - 1])) + 2 * a,
151					"padding-left" : a || "",
152					"padding-right" : a || ""
153				};
154				this.$stage.css(c)
155			}
156		}, {
157			filter : ["width", "items", "settings"], run : function (a) {
158				var b = this._coordinates.length, c = !this.settings.autoWidth, d = this.$stage.children();
159				if (c && a.items.merge) {
160					for (; b--;) {
161						a.css.width = this._widths[this.relative(b)], d.eq(b).css(a.css);
162					}
163				}
164				else {
165					c && (a.css.width = a.items.width, d.css(a.css))
166				}
167			}
168		}, {
169			filter : ["items"], run : function () {
170				this._coordinates.length < 1 && this.$stage.removeAttr("style")
171			}
172		}, {
173			filter : ["width", "items", "settings"], run : function (a) {
174				a.current = a.current ? this.$stage.children().index(a.current) : 0, a.current = Math.max(
175					this.minimum(), Math.min(this.maximum(), a.current)), this.reset(a.current)
176			}
177		}, {
178			filter : ["position"], run : function () {
179				this.animate(this.coordinates(this._current))
180			}
181		}, {
182			filter : ["width", "position", "items", "settings"], run : function () {
183				var a, b, c, d, e = this.settings.rtl ? 1 : -1, f = 2 * this.settings.stagePadding,
184					g = this.coordinates(this.current()) + f, h = g + this.width() * e, i = [];
185				for (c = 0, d = this._coordinates.length; c < d; c++) {
186					a = this._coordinates[c - 1] || 0, b = Math.abs(this._coordinates[c]) + f * e, (this.op(a, "<=", g)
187					                                                                                && this.op(a, ">",
188							h) || this.op(b, "<", g) && this.op(b, ">", h)) && i.push(c);
189				}
190				this.$stage.children(".active").removeClass("active"), this.$stage.children(
191					":eq(" + i.join("), :eq(") + ")").addClass("active"), this.$stage.children(".center").removeClass(
192					"center"), this.settings.center && this.$stage.children().eq(this.current()).addClass("center")
193			}
194		}], e.prototype.initializeStage = function () {
195			this.$stage = this.$element.find("." + this.settings.stageClass), this.$stage.length
196			                                                                  || (this.$element.addClass(
197				this.options.loadingClass), this.$stage = a("<" + this.settings.stageElement + ">",
198				{class : this.settings.stageClass}).wrap(
199				a("<div/>", {class : this.settings.stageOuterClass})), this.$element.append(this.$stage.parent()))
200		}, e.prototype.initializeItems = function () {
201			var b = this.$element.find(".owl-item");
202			if (b.length) {
203				return this._items = b.get().map(function (b) {
204					return a(b)
205				}), this._mergers = this._items.map(function () {
206					return 1
207				}), void this.refresh();
208			}
209			this.replace(this.$element.children().not(this.$stage.parent())), this.isVisible() ? this.refresh()
210			                                                                                   : this.invalidate(
211					"width"), this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)
212		}, e.prototype.initialize = function () {
213			if (this.enter("initializing"), this.trigger("initialize"), this.$element.toggleClass(
214				this.settings.rtlClass, this.settings.rtl), this.settings.autoWidth && !this.is("pre-loading")) {
215				var a, b, c;
216				a = this.$element.find("img"), b = this.settings.nestedItemSelector ? "."
217				                                                                      + this.settings.nestedItemSelector
218				                                                                    : d, c = this.$element.children(
219					b).width(), a.length && c <= 0 && this.preloadAutoWidthImages(a)
220			}
221			this.initializeStage(), this.initializeItems(), this.registerEventHandlers(), this.leave(
222				"initializing"), this.trigger("initialized")
223		}, e.prototype.isVisible = function () {
224			return !this.settings.checkVisibility || this.$element.is(":visible")
225		}, e.prototype.setup = function () {
226			var b = this.viewport(), c = this.options.responsive, d = -1, e = null;
227			c ? (a.each(c, function (a) {
228				a <= b && a > d && (d = Number(a))
229			}), e = a.extend({}, this.options, c[d]), "function" == typeof e.stagePadding && (e.stagePadding
230				= e.stagePadding()), delete e.responsive, e.responsiveClass && this.$element.attr("class",
231				this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s", "g"),
232					"$1" + d))) : e = a.extend({}, this.options), this.trigger("change",
233				{property : {name : "settings", value : e}}), this._breakpoint = d, this.settings = e, this.invalidate(
234				"settings"), this.trigger("changed", {property : {name : "settings", value : this.settings}})
235		}, e.prototype.optionsLogic = function () {
236			this.settings.autoWidth && (this.settings.stagePadding = !1, this.settings.merge = !1)
237		}, e.prototype.prepare = function (b) {
238			var c = this.trigger("prepare", {content : b});
239			return c.data || (c.data = a("<" + this.settings.itemElement + "/>").addClass(
240				this.options.itemClass).append(b)), this.trigger("prepared", {content : c.data}), c.data
241		}, e.prototype.update = function () {
242			for (var b = 0, c = this._pipe.length, d = a.proxy(function (a) {
243				return this[a]
244			}, this._invalidated), e = {}; b < c;) {
245				(this._invalidated.all || a.grep(this._pipe[b].filter, d).length > 0) && this._pipe[b].run(e), b++;
246			}
247			this._invalidated = {}, !this.is("valid") && this.enter("valid")
248		}, e.prototype.width = function (a) {
249			switch (a = a || e.Width.Default) {
250				case e.Width.Inner:
251				case e.Width.Outer:
252					return this._width;
253				default:
254					return this._width - 2 * this.settings.stagePadding + this.settings.margin
255			}
256		}, e.prototype.refresh = function () {
257			this.enter("refreshing"), this.trigger(
258				"refresh"), this.setup(), this.optionsLogic(), this.$element.addClass(
259				this.options.refreshClass), this.update(), this.$element.removeClass(
260				this.options.refreshClass), this.leave("refreshing"), this.trigger("refreshed")
261		}, e.prototype.onThrottledResize = function () {
262			b.clearTimeout(this.resizeTimer), this.resizeTimer = b.setTimeout(this._handlers.onResize,
263				this.settings.responsiveRefreshRate)
264		}, e.prototype.onResize = function () {
265			return !!this._items.length && (this._width !== this.$element.width() && (!!this.isVisible() && (this.enter(
266				"resizing"), this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"), !1)
267			                                                             : (this.invalidate(
268					"width"), this.refresh(), this.leave("resizing"), void this.trigger("resized")))))
269		}, e.prototype.registerEventHandlers = function () {
270			a.support.transition && this.$stage.on(a.support.transition.end + ".owl.core",
271				a.proxy(this.onTransitionEnd, this)), !1 !== this.settings.responsive && this.on(b, "resize",
272				this._handlers.onThrottledResize), this.settings.mouseDrag && (this.$element.addClass(
273				this.options.dragClass), this.$stage.on("mousedown.owl.core",
274				a.proxy(this.onDragStart, this)), this.$stage.on("dragstart.owl.core selectstart.owl.core",
275				function () {
276					return !1
277				})), this.settings.touchDrag && (this.$stage.on("touchstart.owl.core",
278				a.proxy(this.onDragStart, this)), this.$stage.on("touchcancel.owl.core", a.proxy(this.onDragEnd, this)))
279		}, e.prototype.onDragStart = function (b) {
280			var d = null;
281			3 !== b.which && (a.support.transform ? (d = this.$stage.css("transform").replace(/.*\(|\)| /g, "").split(
282				","), d = {x : d[16 === d.length ? 12 : 4], y : d[16 === d.length ? 13 : 5]}) : (d
283				= this.$stage.position(), d = {
284				x : this.settings.rtl ? d.left + this.$stage.width() - this.width() + this.settings.margin : d.left,
285				y : d.top
286			}), this.is("animating") && (a.support.transform ? this.animate(d.x) : this.$stage.stop(), this.invalidate(
287				"position")), this.$element.toggleClass(this.options.grabClass, "mousedown" === b.type), this.speed(
288				0), this._drag.time = (new Date).getTime(), this._drag.target = a(b.target), this._drag.stage.start
289				= d, this._drag.stage.current = d, this._drag.pointer = this.pointer(b), a(c).on(
290				"mouseup.owl.core touchend.owl.core", a.proxy(this.onDragEnd, this)), a(c).one(
291				"mousemove.owl.core touchmove.owl.core", a.proxy(function (b) {
292					var d = this.difference(this._drag.pointer, this.pointer(b));
293					a(c).on("mousemove.owl.core touchmove.owl.core", a.proxy(this.onDragMove, this)), Math.abs(d.x)
294					                                                                                  < Math.abs(d.y)
295					                                                                                  && this.is(
296						"valid") || (b.preventDefault(), this.enter("dragging"), this.trigger("drag"))
297				}, this)))
298		}, e.prototype.onDragMove = function (a) {
299			var b = null, c = null, d = null, e = this.difference(this._drag.pointer, this.pointer(a)),
300				f = this.difference(this._drag.stage.start, e);
301			this.is("dragging") && (a.preventDefault(), this.settings.loop ? (b = this.coordinates(this.minimum()), c
302				= this.coordinates(this.maximum() + 1) - b, f.x = ((f.x - b) % c + c) % c + b) : (b = this.settings.rtl
303			                                                                                          ? this.coordinates(
304					this.maximum()) : this.coordinates(this.minimum()), c = this.settings.rtl ? this.coordinates(
305				this.minimum()) : this.coordinates(this.maximum()), d = this.settings.pullDrag ? -1 * e.x / 5 : 0, f.x
306				= Math.max(Math.min(f.x, b + d), c + d)), this._drag.stage.current = f, this.animate(f.x))
307		}, e.prototype.onDragEnd = function (b) {
308			var d = this.difference(this._drag.pointer, this.pointer(b)), e = this._drag.stage.current,
309				f = d.x > 0 ^ this.settings.rtl ? "left" : "right";
310			a(c).off(".owl.core"), this.$element.removeClass(this.options.grabClass), (0 !== d.x && this.is("dragging")
311			                                                                           || !this.is("valid"))
312			                                                                          && (this.speed(
313				this.settings.dragEndSpeed || this.settings.smartSpeed), this.current(
314				this.closest(e.x, 0 !== d.x ? f : this._drag.direction)), this.invalidate(
315				"position"), this.update(), this._drag.direction = f, (Math.abs(d.x) > 3 || (new Date).getTime()
316			                                                           - this._drag.time > 300)
317			                                                                          && this._drag.target.one(
318				"click.owl.core", function () {
319					return !1
320				})), this.is("dragging") && (this.leave("dragging"), this.trigger("dragged"))
321		}, e.prototype.closest = function (b, c) {
322			var e = -1, f = 30, g = this.width(), h = this.coordinates();
323			return this.settings.freeDrag || a.each(h, a.proxy(function (a, i) {
324				return "left" === c && b > i - f && b < i + f ? e = a : "right" === c && b > i - g - f && b < i - g + f
325				                                                        ? e = a + 1 : this.op(b, "<", i) && this.op(b,
326					">", h[a + 1] !== d ? h[a + 1] : i - g) && (e = "left" === c ? a + 1 : a), -1 === e
327			}, this)), this.settings.loop || (this.op(b, ">", h[this.minimum()]) ? e = b = this.minimum() : this.op(b,
328				"<", h[this.maximum()]) && (e = b = this.maximum())), e
329		}, e.prototype.animate = function (b) {
330			var c = this.speed() > 0;
331			this.is("animating") && this.onTransitionEnd(), c && (this.enter("animating"), this.trigger(
332				"translate")), a.support.transform3d && a.support.transition ? this.$stage.css({
333				transform : "translate3d(" + b + "px,0px,0px)",
334				transition : this.speed() / 1e3 + "s" + (this.settings.slideTransition ? " "
335				             + this.settings.slideTransition : "")
336			}) : c ? this.$stage.animate({left : b + "px"}, this.speed(), this.settings.fallbackEasing,
337				a.proxy(this.onTransitionEnd, this)) : this.$stage.css({left : b + "px"})
338		}, e.prototype.is = function (a) {
339			return this._states.current[a] && this._states.current[a] > 0
340		}, e.prototype.current = function (a) {
341			if (a === d) {
342				return this._current;
343			}
344			if (0 === this._items.length) {
345				return d;
346			}
347			if (a = this.normalize(a), this._current !== a) {
348				var b = this.trigger("change", {property : {name : "position", value : a}});
349				b.data !== d && (a = this.normalize(b.data)), this._current = a, this.invalidate(
350					"position"), this.trigger("changed", {property : {name : "position", value : this._current}})
351			}
352			return this._current
353		}, e.prototype.invalidate = function (b) {
354			return "string" === a.type(b) && (this._invalidated[b] = !0, this.is("valid") && this.leave(
355				"valid")), a.map(this._invalidated, function (a, b) {
356				return b
357			})
358		}, e.prototype.reset = function (a) {
359			(a = this.normalize(a)) !== d && (this._speed = 0, this._current = a, this.suppress(
360				["translate", "translated"]), this.animate(this.coordinates(a)), this.release(
361				["translate", "translated"]))
362		}, e.prototype.normalize = function (a, b) {
363			var c = this._items.length, e = b ? 0 : this._clones.length;
364			return !this.isNumeric(a) || c < 1 ? a = d : (a < 0 || a >= c + e) && (a = ((a - e / 2) % c + c) % c + e
365			                                                                           / 2), a
366		}, e.prototype.relative = function (a) {
367			return a -= this._clones.length / 2, this.normalize(a, !0)
368		}, e.prototype.maximum = function (a) {
369			var b, c, d, e = this.settings, f = this._coordinates.length;
370			if (e.loop) {
371				f = this._clones.length / 2 + this._items.length - 1;
372			}
373			else if (e.autoWidth || e.merge) {
374				if (b = this._items.length) {
375					for (c = this._items[--b].width(), d = this.$element.width();
376					     b-- && !((c += this._items[b].width() + this.settings.margin) > d);) {
377						;
378					}
379				}
380				f = b + 1
381			}
382			else {
383				f = e.center ? this._items.length - 1 : this._items.length - e.items;
384			}
385			return a && (f -= this._clones.length / 2), Math.max(f, 0)
386		}, e.prototype.minimum = function (a) {
387			return a ? 0 : this._clones.length / 2
388		}, e.prototype.items = function (a) {
389			return a === d ? this._items.slice() : (a = this.normalize(a, !0), this._items[a])
390		}, e.prototype.mergers = function (a) {
391			return a === d ? this._mergers.slice() : (a = this.normalize(a, !0), this._mergers[a])
392		}, e.prototype.clones = function (b) {
393			var c = this._clones.length / 2, e = c + this._items.length, f = function (a) {
394				return a % 2 == 0 ? e + a / 2 : c - (a + 1) / 2
395			};
396			return b === d ? a.map(this._clones, function (a, b) {
397				return f(b)
398			}) : a.map(this._clones, function (a, c) {
399				return a === b ? f(c) : null
400			})
401		}, e.prototype.speed = function (a) {
402			return a !== d && (this._speed = a), this._speed
403		}, e.prototype.coordinates = function (b) {
404			var c, e = 1, f = b - 1;
405			return b === d ? a.map(this._coordinates, a.proxy(function (a, b) {
406				return this.coordinates(b)
407			}, this)) : (this.settings.center ? (this.settings.rtl && (e = -1, f = b + 1), c = this._coordinates[b], c
408				+= (this.width() - c + (this._coordinates[f] || 0)) / 2 * e) : c = this._coordinates[f] || 0, c
409				= Math.ceil(c))
410		}, e.prototype.duration = function (a, b, c) {
411			return 0 === c ? 0 : Math.min(Math.max(Math.abs(b - a), 1), 6) * Math.abs(c || this.settings.smartSpeed)
412		}, e.prototype.to = function (a, b) {
413			var c = this.current(), d = null, e = a - this.relative(c), f = (e > 0) - (e < 0), g = this._items.length,
414				h = this.minimum(), i = this.maximum();
415			this.settings.loop ? (!this.settings.rewind && Math.abs(e) > g / 2 && (e += -1 * f * g), a = c + e, (d = ((a
416			                                                                                                           - h)
417			                                                                                                         % g
418			                                                                                                         + g)
419			                                                                                                         % g
420			                                                                                                         + h)
421			                                                                                                    !== a
422			                                                                                                    && d - e
423			                                                                                                    <= i
424			                                                                                                    && d - e
425			                                                                                                    > 0
426			                                                                                                    && (c
427				= d - e, a = d, this.reset(c))) : this.settings.rewind ? (i += 1, a = (a % i + i) % i) : a = Math.max(h,
428				Math.min(i, a)), this.speed(this.duration(c, a, b)), this.current(a), this.isVisible() && this.update()
429		}, e.prototype.next = function (a) {
430			a = a || !1, this.to(this.relative(this.current()) + 1, a)
431		}, e.prototype.prev = function (a) {
432			a = a || !1, this.to(this.relative(this.current()) - 1, a)
433		}, e.prototype.onTransitionEnd = function (a) {
434			if (a !== d && (a.stopPropagation(), (a.target || a.srcElement || a.originalTarget) !== this.$stage.get(
435				0))) {
436				return !1;
437			}
438			this.leave("animating"), this.trigger("translated")
439		}, e.prototype.viewport = function () {
440			var d;
441			return this.options.responsiveBaseElement !== b ? d = a(this.options.responsiveBaseElement).width()
442			                                                : b.innerWidth ? d = b.innerWidth : c.documentElement
443			                                                                                    && c.documentElement.clientWidth
444			                                                                                    ? d
445				                                                                                    = c.documentElement.clientWidth
446			                                                                                    : console.warn(
447						"Can not detect viewport width."), d
448		}, e.prototype.replace = function (b) {
449			this.$stage.empty(), this._items = [], b && (b = b instanceof jQuery ? b : a(
450				b)), this.settings.nestedItemSelector && (b = b.find("." + this.settings.nestedItemSelector)), b.filter(
451				function () {
452					return 1 === this.nodeType
453				}).each(a.proxy(function (a, b) {
454				b = this.prepare(b), this.$stage.append(b), this._items.push(b), this._mergers.push(
455					1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)
456			}, this)), this.reset(
457				this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0), this.invalidate("items")
458		}, e.prototype.add = function (b, c) {
459			var e = this.relative(this._current);
460			c = c === d ? this._items.length : this.normalize(c, !0), b = b instanceof jQuery ? b : a(b), this.trigger(
461				"add", {content : b, position : c}), b = this.prepare(b), 0 === this._items.length || c
462			                                                              === this._items.length ? (0
463			                                                                                        === this._items.length
464			                                                                                        && this.$stage.append(
465				b), 0 !== this._items.length && this._items[c - 1].after(b), this._items.push(b), this._mergers.push(
466				1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)) : (this._items[c].before(
467				b), this._items.splice(c, 0, b), this._mergers.splice(c, 0,
468				1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)), this._items[e]
469			                                                                                  && this.reset(
470				this._items[e].index()), this.invalidate("items"), this.trigger("added", {content : b, position : c})
471		}, e.prototype.remove = function (a) {
472			(a = this.normalize(a, !0)) !== d && (this.trigger("remove",
473				{content : this._items[a], position : a}), this._items[a].remove(), this._items.splice(a,
474				1), this._mergers.splice(a, 1), this.invalidate("items"), this.trigger("removed",
475				{content : null, position : a}))
476		}, e.prototype.preloadAutoWidthImages = function (b) {
477			b.each(a.proxy(function (b, c) {
478				this.enter("pre-loading"), c = a(c), a(new Image).one("load", a.proxy(function (a) {
479					c.attr("src", a.target.src), c.css("opacity", 1), this.leave("pre-loading"), !this.is("pre-loading")
480					                                                                             && !this.is(
481						"initializing") && this.refresh()
482				}, this)).attr("src", c.attr("src") || c.attr("data-src") || c.attr("data-src-retina"))
483			}, this))
484		}, e.prototype.destroy = function () {
485			this.$element.off(".owl.core"), this.$stage.off(".owl.core"), a(c).off(".owl.core"), !1
486			                                                                                     !== this.settings.responsive
487			                                                                                     && (b.clearTimeout(
488				this.resizeTimer), this.off(b, "resize", this._handlers.onThrottledResize));
489			for (var d in this._plugins) {
490				this._plugins[d].destroy();
491			}
492			this.$stage.children(
493				".cloned").remove(), this.$stage.unwrap(), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$stage.remove(), this.$element.removeClass(
494				this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(
495				this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(
496				this.options.dragClass).removeClass(this.options.grabClass).attr("class",
497				this.$element.attr("class").replace(new RegExp(this.options.responsiveClass + "-\\S+\\s", "g"),
498					"")).removeData("owl.carousel")
499		}, e.prototype.op = function (a, b, c) {
500			var d = this.settings.rtl;
501			switch (b) {
502				case"<":
503					return d ? a > c : a < c;
504				case">":
505					return d ? a < c : a > c;
506				case">=":
507					return d ? a <= c : a >= c;
508				case"<=":
509					return d ? a >= c : a <= c
510			}
511		}, e.prototype.on = function (a, b, c, d) {
512			a.addEventListener ? a.addEventListener(b, c, d) : a.attachEvent && a.attachEvent("on" + b, c)
513		}, e.prototype.off = function (a, b, c, d) {
514			a.removeEventListener ? a.removeEventListener(b, c, d) : a.detachEvent && a.detachEvent("on" + b, c)
515		}, e.prototype.trigger = function (b, c, d, f, g) {
516			var h = {item : {count : this._items.length, index : this.current()}},
517				i = a.camelCase(a.grep(["on", b, d], function (a) {
518					return a
519				}).join("-").toLowerCase()), j = a.Event([b, "owl", d || "carousel"].join(".").toLowerCase(),
520				a.extend({relatedTarget : this}, h, c));
521			return this._supress[b] || (a.each(this._plugins, function (a, b) {
522				b.onTrigger && b.onTrigger(j)
523			}), this.register({type : e.Type.Event, name : b}), this.$element.trigger(j), this.settings && "function"
524			                                                                              == typeof this.settings[i]
525			                                                                              && this.settings[i].call(this,
526				j)), j
527		}, e.prototype.enter = function (b) {
528			a.each([b].concat(this._states.tags[b] || []), a.proxy(function (a, b) {
529				this._states.current[b] === d && (this._states.current[b] = 0), this._states.current[b]++
530			}, this))
531		}, e.prototype.leave = function (b) {
532			a.each([b].concat(this._states.tags[b] || []), a.proxy(function (a, b) {
533				this._states.current[b]--
534			}, this))
535		}, e.prototype.register = function (b) {
536			if (b.type === e.Type.Event) {
537				if (a.event.special[b.name] || (a.event.special[b.name] = {}), !a.event.special[b.name].owl) {
538					var c = a.event.special[b.name]._default;
539					a.event.special[b.name]._default = function (a) {
540						return !c || !c.apply || a.namespace && -1 !== a.namespace.indexOf("owl") ? a.namespace
541						                                                                            && a.namespace.indexOf(
542								"owl") > -1 : c.apply(this, arguments)
543					}, a.event.special[b.name].owl = !0
544				}
545			}
546			else {
547				b.type === e.Type.State && (this._states.tags[b.name] ? this._states.tags[b.name]
548					= this._states.tags[b.name].concat(b.tags) : this._states.tags[b.name]
549					                            = b.tags, this._states.tags[b.name] = a.grep(this._states.tags[b.name],
550					a.proxy(function (c, d) {
551						return a.inArray(c, this._states.tags[b.name]) === d
552					}, this)))
553			}
554		}, e.prototype.suppress = function (b) {
555			a.each(b, a.proxy(function (a, b) {
556				this._supress[b] = !0
557			}, this))
558		}, e.prototype.release = function (b) {
559			a.each(b, a.proxy(function (a, b) {
560				delete this._supress[b]
561			}, this))
562		}, e.prototype.pointer = function (a) {
563			var c = {x : null, y : null};
564			return a = a.originalEvent || a || b.event, a = a.touches && a.touches.length ? a.touches[0]
565			                                                                              : a.changedTouches
566			                                                                                && a.changedTouches.length
567			                                                                                ? a.changedTouches[0]
568			                                                                                : a, a.pageX ? (c.x
569				= a.pageX, c.y = a.pageY) : (c.x = a.clientX, c.y = a.clientY), c
570		}, e.prototype.isNumeric = function (a) {
571			return !isNaN(parseFloat(a))
572		}, e.prototype.difference = function (a, b) {
573			return {x : a.x - b.x, y : a.y - b.y}
574		}, a.fn.owlCarousel = function (b) {
575			var c = Array.prototype.slice.call(arguments, 1);
576			return this.each(function () {
577				var d = a(this), f = d.data("owl.carousel");
578				f || (f = new e(this, "object" == typeof b && b), d.data("owl.carousel", f), a.each(
579					["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function (b, c) {
580						f.register({type : e.Type.Event, name : c}), f.$element.on(c + ".owl.carousel.core",
581							a.proxy(function (a) {
582								a.namespace && a.relatedTarget !== this && (this.suppress([c]), f[c].apply(this,
583									[].slice.call(arguments, 1)), this.release([c]))
584							}, f))
585					})), "string" == typeof b && "_" !== b.charAt(0) && f[b].apply(f, c)
586			})
587		}, a.fn.owlCarousel.Constructor = e
588	}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) {
589		var e = function (b) {
590			this._core = b, this._interval = null, this._visible = null, this._handlers = {
591				"initialized.owl.carousel" : a.proxy(function (a) {
592					a.namespace && this._core.settings.autoRefresh && this.watch()
593				}, this)
594			}, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers)
595		};
596		e.Defaults = {autoRefresh : !0, autoRefreshInterval : 500}, e.prototype.watch = function () {
597			this._interval || (this._visible = this._core.isVisible(), this._interval = b.setInterval(
598				a.proxy(this.refresh, this), this._core.settings.autoRefreshInterval))
599		}, e.prototype.refresh = function () {
600			this._core.isVisible() !== this._visible && (this._visible
601				= !this._visible, this._core.$element.toggleClass("owl-hidden", !this._visible), this._visible
602			&& this._core.invalidate("width") && this._core.refresh())
603		}, e.prototype.destroy = function () {
604			var a, c;
605			b.clearInterval(this._interval);
606			for (a in this._handlers) {
607				this._core.$element.off(a, this._handlers[a]);
608			}
609			for (c in Object.getOwnPropertyNames(this)) {
610				"function" != typeof this[c] && (this[c] = null)
611			}
612		}, a.fn.owlCarousel.Constructor.Plugins.AutoRefresh = e
613	}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) {
614		var e = function (b) {
615			this._core = b, this._loaded = [], this._handlers = {
616				"initialized.owl.carousel change.owl.carousel resized.owl.carousel" : a.proxy(function (b) {
617					if (b.namespace && this._core.settings && this._core.settings.lazyLoad && (b.property && "position"
618					                                                                           == b.property.name
619					                                                                           || "initialized"
620					                                                                           == b.type)) {
621						var c = this._core.settings, e = c.center && Math.ceil(c.items / 2) || c.items,
622							f = c.center && -1 * e || 0,
623							g = (b.property && b.property.value !== d ? b.property.value : this._core.current()) + f,
624							h = this._core.clones().length, i = a.proxy(function (a, b) {
625								this.load(b)
626							}, this);
627						for (c.lazyLoadEager > 0 && (e += c.lazyLoadEager, c.loop && (g -= c.lazyLoadEager, e++));
628						     f++ < e;) {
629							this.load(h / 2 + this._core.relative(g)), h && a.each(
630								this._core.clones(this._core.relative(g)), i), g++
631						}
632					}
633				}, this)
634			}, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers)
635		};
636		e.Defaults = {lazyLoad : !1, lazyLoadEager : 0}, e.prototype.load = function (c) {
637			var d = this._core.$stage.children().eq(c), e = d && d.find(".owl-lazy");
638			!e || a.inArray(d.get(0), this._loaded) > -1 || (e.each(a.proxy(function (c, d) {
639				var e, f = a(d),
640					g = b.devicePixelRatio > 1 && f.attr("data-src-retina") || f.attr("data-src") || f.attr(
641						"data-srcset");
642				this._core.trigger("load", {element : f, url : g}, "lazy"), f.is("img") ? f.one("load.owl.lazy",
643					a.proxy(function () {
644						f.css("opacity", 1), this._core.trigger("loaded", {element : f, url : g}, "lazy")
645					}, this)).attr("src", g) : f.is("source") ? f.one("load.owl.lazy", a.proxy(function () {
646					this._core.trigger("loaded", {element : f, url : g}, "lazy")
647				}, this)).attr("srcset", g) : (e = new Image, e.onload = a.proxy(function () {
648					f.css({"background-image" : 'url("' + g + '")', opacity : "1"}), this._core.trigger("loaded",
649						{element : f, url : g}, "lazy")
650				}, this), e.src = g)
651			}, this)), this._loaded.push(d.get(0)))
652		}, e.prototype.destroy = function () {
653			var a, b;
654			for (a in this.handlers) {
655				this._core.$element.off(a, this.handlers[a]);
656			}
657			for (b in Object.getOwnPropertyNames(this)) {
658				"function" != typeof this[b] && (this[b] = null)
659			}
660		}, a.fn.owlCarousel.Constructor.Plugins.Lazy = e
661	}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) {
662		var e = function (c) {
663			this._core = c, this._previousHeight = null, this._handlers = {
664				"initialized.owl.carousel refreshed.owl.carousel" : a.proxy(function (a) {
665					a.namespace && this._core.settings.autoHeight && this.update()
666				}, this), "changed.owl.carousel" : a.proxy(function (a) {
667					a.namespace && this._core.settings.autoHeight && "position" === a.property.name && this.update()
668				}, this), "loaded.owl.lazy" : a.proxy(function (a) {
669					a.namespace && this._core.settings.autoHeight && a.element.closest(
670						"." + this._core.settings.itemClass).index() === this._core.current() && this.update()
671				}, this)
672			}, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(
673				this._handlers), this._intervalId = null;
674			var d = this;
675			a(b).on("load", function () {
676				d._core.settings.autoHeight && d.update()
677			}), a(b).resize(function () {
678				d._core.settings.autoHeight && (null != d._intervalId && clearTimeout(d._intervalId), d._intervalId
679					= setTimeout(function () {
680					d.update()
681				}, 250))
682			})
683		};
684		e.Defaults = {autoHeight : !1, autoHeightClass : "owl-height"}, e.prototype.update = function () {
685			var b = this._core._current, c = b + this._core.settings.items, d = this._core.settings.lazyLoad,
686				e = this._core.$stage.children().toArray().slice(b, c), f = [], g = 0;
687			a.each(e, function (b, c) {
688				f.push(a(c).height())
689			}), g = Math.max.apply(null, f), g <= 1 && d && this._previousHeight && (g
690				= this._previousHeight), this._previousHeight = g, this._core.$stage.parent().height(g).addClass(
691				this._core.settings.autoHeightClass)
692		}, e.prototype.destroy = function () {
693			var a, b;
694			for (a in this._handlers) {
695				this._core.$element.off(a, this._handlers[a]);
696			}
697			for (b in Object.getOwnPropertyNames(this)) {
698				"function" != typeof this[b] && (this[b] = null)
699			}
700		}, a.fn.owlCarousel.Constructor.Plugins.AutoHeight = e
701	}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) {
702		var e = function (b) {
703			this._core = b, this._videos = {}, this._playing = null, this._handlers = {
704				"initialized.owl.carousel" : a.proxy(function (a) {
705					a.namespace && this._core.register({type : "state", name : "playing", tags : ["interacting"]})
706				}, this), "resize.owl.carousel" : a.proxy(function (a) {
707					a.namespace && this._core.settings.video && this.isInFullScreen() && a.preventDefault()
708				}, this), "refreshed.owl.carousel" : a.proxy(function (a) {
709					a.namespace && this._core.is("resizing") && this._core.$stage.find(
710						".cloned .owl-video-frame").remove()
711				}, this), "changed.owl.carousel" : a.proxy(function (a) {
712					a.namespace && "position" === a.property.name && this._playing && this.stop()
713				}, this), "prepared.owl.carousel" : a.proxy(function (b) {
714					if (b.namespace) {
715						var c = a(b.content).find(".owl-video");
716						c.length && (c.css("display", "none"), this.fetch(c, a(b.content)))
717					}
718				}, this)
719			}, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(
720				this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon",
721				a.proxy(function (a) {
722					this.play(a)
723				}, this))
724		};
725		e.Defaults = {video : !1, videoHeight : !1, videoWidth : !1}, e.prototype.fetch = function (a, b) {
726			var c = function () {
727					return a.attr("data-vimeo-id") ? "vimeo" : a.attr("data-vzaar-id") ? "vzaar" : "youtube"
728				}(), d = a.attr("data-vimeo-id") || a.attr("data-youtube-id") || a.attr("data-vzaar-id"),
729				e = a.attr("data-width") || this._core.settings.videoWidth,
730				f = a.attr("data-height") || this._core.settings.videoHeight, g = a.attr("href");
731			if (!g) {
732				throw new Error("Missing video URL.");
733			}
734			if (d = g.match(
735				/(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(
736				"youtu") > -1) {
737				c = "youtube";
738			}
739			else if (d[3].indexOf("vimeo") > -1) {
740				c = "vimeo";
741			}
742			else {
743				if (!(d[3].indexOf("vzaar") > -1)) {
744					throw new Error("Video URL not supported.");
745				}
746				c = "vzaar"
747			}
748			d = d[6], this._videos[g] = {type : c, id : d, width : e, height : f}, b.attr("data-video",
749				g), this.thumbnail(a, this._videos[g])
750		}, e.prototype.thumbnail = function (b, c) {
751			var d, e, f, g = c.width && c.height ? "width:" + c.width + "px;height:" + c.height + "px;" : "",
752				h = b.find("img"), i = "src", j = "", k = this._core.settings, l = function (c) {
753					e = '<div class="owl-video-play-icon"></div>', d = k.lazyLoad ? a("<div/>",
754						{class : "owl-video-tn " + j, srcType : c}) : a("<div/>",
755						{class : "owl-video-tn", style : "opacity:1;background-image:url(" + c + ")"}), b.after(d), b.after(
756						e)
757				};
758			if (b.wrap(a("<div/>", {class : "owl-video-wrapper", style : g})), this._core.settings.lazyLoad && (i
759				= "data-src", j = "owl-lazy"), h.length) {
760				return l(h.attr(i)), h.remove(), !1;
761			}
762			"youtube" === c.type ? (f = "//img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)) : "vimeo" === c.type
763			                                                                                       ? a.ajax({
764					type : "GET",
765					url : "//vimeo.com/api/v2/video/" + c.id + ".json",
766					jsonp : "callback",
767					dataType : "jsonp",
768					success : function (a) {
769						f = a[0].thumbnail_large, l(f)
770					}
771				}) : "vzaar" === c.type && a.ajax({
772				type : "GET",
773				url : "//vzaar.com/api/videos/" + c.id + ".json",
774				jsonp : "callback",
775				dataType : "jsonp",
776				success : function (a) {
777					f = a.framegrab_url, l(f)
778				}
779			})
780		}, e.prototype.stop = function () {
781			this._core.trigger("stop", null, "video"), this._playing.find(
782				".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing
783				= null, this._core.leave("playing"), this._core.trigger("stopped", null, "video")
784		}, e.prototype.play = function (b) {
785			var c, d = a(b.target), e = d.closest("." + this._core.settings.itemClass),
786				f = this._videos[e.attr("data-video")], g = f.width || "100%",
787				h = f.height || this._core.$stage.height();
788			this._playing || (this._core.enter("playing"), this._core.trigger("play", null, "video"), e
789				= this._core.items(this._core.relative(e.index())), this._core.reset(e.index()), c = a(
790				'<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'), c.attr(
791				"height", h), c.attr("width", g), "youtube" === f.type ? c.attr("src",
792				"//www.youtube.com/embed/" + f.id + "?autoplay=1&rel=0&v=" + f.id) : "vimeo" === f.type ? c.attr("src",
793				"//player.vimeo.com/video/" + f.id + "?autoplay=1") : "vzaar" === f.type && c.attr("src",
794				"//view.vzaar.com/" + f.id + "/player?autoplay=true"), a(c).wrap(
795				'<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")), this._playing = e.addClass(
796				"owl-video-playing"))
797		}, e.prototype.isInFullScreen = function () {
798			var b = c.fullscreenElement || c.mozFullScreenElement || c.webkitFullscreenElement;
799			return b && a(b).parent().hasClass("owl-video-frame")
800		}, e.prototype.destroy = function () {
801			var a, b;
802			this._core.$element.off("click.owl.video");
803			for (a in this._handlers) {
804				this._core.$element.off(a, this._handlers[a]);
805			}
806			for (b in Object.getOwnPropertyNames(this)) {
807				"function" != typeof this[b] && (this[b] = null)
808			}
809		}, a.fn.owlCarousel.Constructor.Plugins.Video = e
810	}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) {
811		var e = function (b) {
812			this.core = b, this.core.options = a.extend({}, e.Defaults, this.core.options), this.swapping
813				= !0, this.previous = d, this.next = d, this.handlers = {
814				"change.owl.carousel" : a.proxy(function (a) {
815					a.namespace && "position" == a.property.name && (this.previous = this.core.current(), this.next
816						= a.property.value)
817				}, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel" : a.proxy(function (a) {
818					a.namespace && (this.swapping = "translated" == a.type)
819				}, this), "translate.owl.carousel" : a.proxy(function (a) {
820					a.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)
821					&& this.swap()
822				}, this)
823			}, this.core.$element.on(this.handlers)
824		};
825		e.Defaults = {
826			animateOut : !1, animateIn : !1
827		}, e.prototype.swap = function () {
828			if (1 === this.core.settings.items && a.support.animation && a.support.transition) {
829				this.core.speed(0);
830				var b, c = a.proxy(this.clear, this), d = this.core.$stage.children().eq(this.previous),
831					e = this.core.$stage.children().eq(this.next), f = this.core.settings.animateIn,
832					g = this.core.settings.animateOut;
833				this.core.current() !== this.previous && (g && (b = this.core.coordinates(this.previous)
834				                                                    - this.core.coordinates(this.next), d.one(
835					a.support.animation.end, c).css({left : b + "px"}).addClass("animated owl-animated-out").addClass(
836					g)), f && e.one(a.support.animation.end, c).addClass("animated owl-animated-in").addClass(f))
837			}
838		}, e.prototype.clear = function (b) {
839			a(b.target).css({left : ""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(
840				this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd()
841		}, e.prototype.destroy = function () {
842			var a, b;
843			for (a in this.handlers) {
844				this.core.$element.off(a, this.handlers[a]);
845			}
846			for (b in Object.getOwnPropertyNames(this)) {
847				"function" != typeof this[b] && (this[b] = null)
848			}
849		}, a.fn.owlCarousel.Constructor.Plugins.Animate = e
850	}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) {
851		var e = function (b) {
852			this._core = b, this._call = null, this._time = 0, this._timeout = 0, this._paused = !0, this._handlers = {
853				"changed.owl.carousel" : a.proxy(function (a) {
854					a.namespace && "settings" === a.property.name ? this._core.settings.autoplay ? this.play()
855					                                                                             : this.stop()
856					                                              : a.namespace && "position" === a.property.name
857					                                                && this._paused && (this._time = 0)
858				}, this), "initialized.owl.carousel" : a.proxy(function (a) {
859					a.namespace && this._core.settings.autoplay && this.play()
860				}, this), "play.owl.autoplay" : a.proxy(function (a, b, c) {
861					a.namespace && this.play(b, c)
862				}, this), "stop.owl.autoplay" : a.proxy(function (a) {
863					a.namespace && this.stop()
864				}, this), "mouseover.owl.autoplay" : a.proxy(function () {
865					this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause()
866				}, this), "mouseleave.owl.autoplay" : a.proxy(function () {
867					this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.play()
868				}, this), "touchstart.owl.core" : a.proxy(function () {
869					this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause()
870				}, this), "touchend.owl.core" : a.proxy(function () {
871					this._core.settings.autoplayHoverPause && this.play()
872				}, this)
873			}, this._core.$element.on(this._handlers), this._core.options = a.extend({}, e.Defaults, this._core.options)
874		};
875		e.Defaults = {
876			autoplay : !1,
877			autoplayTimeout : 5e3,
878			autoplayHoverPause : !1,
879			autoplaySpeed : !1
880		}, e.prototype._next = function (d) {
881			this._call = b.setTimeout(a.proxy(this._next, this, d),
882				this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()), this._core.is(
883				"interacting") || c.hidden || this._core.next(d || this._core.settings.autoplaySpeed)
884		}, e.prototype.read = function () {
885			return (new Date).getTime() - this._time
886		}, e.prototype.play = function (c, d) {
887			var e;
888			this._core.is("rotating") || this._core.enter("rotating"), c = c || this._core.settings.autoplayTimeout, e
889				= Math.min(this._time % (this._timeout || c), c), this._paused ? (this._time = this.read(), this._paused
890				= !1) : b.clearTimeout(this._call), this._time += this.read() % c - e, this._timeout = c, this._call
891				= b.setTimeout(a.proxy(this._next, this, d), c - e)
892		}, e.prototype.stop = function () {
893			this._core.is("rotating") && (this._time = 0, this._paused = !0, b.clearTimeout(
894				this._call), this._core.leave("rotating"))
895		}, e.prototype.pause = function () {
896			this._core.is("rotating") && !this._paused && (this._time = this.read(), this._paused = !0, b.clearTimeout(
897				this._call))
898		}, e.prototype.destroy = function () {
899			var a, b;
900			this.stop();
901			for (a in this._handlers) {
902				this._core.$element.off(a, this._handlers[a]);
903			}
904			for (b in Object.getOwnPropertyNames(this)) {
905				"function" != typeof this[b] && (this[b] = null)
906			}
907		}, a.fn.owlCarousel.Constructor.Plugins.autoplay = e
908	}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) {
909		"use strict";
910		var e = function (b) {
911			this._core = b, this._initialized = !1, this._pages = [], this._controls = {}, this._templates
912				= [], this.$element = this._core.$element, this._overrides = {
913				next : this._core.next, prev : this._core.prev, to : this._core.to
914			}, this._handlers = {
915				"prepared.owl.carousel" : a.proxy(function (b) {
916					b.namespace && this._core.settings.dotsData && this._templates.push(
917						'<div class="' + this._core.settings.dotClass + '">' + a(b.content).find("[data-dot]").addBack(
918						"[data-dot]").attr("data-dot") + "</div>")
919				}, this), "added.owl.carousel" : a.proxy(function (a) {
920					a.namespace && this._core.settings.dotsData && this._templates.splice(a.position, 0,
921						this._templates.pop())
922				}, this), "remove.owl.carousel" : a.proxy(function (a) {
923					a.namespace && this._core.settings.dotsData && this._templates.splice(a.position, 1)
924				}, this), "changed.owl.carousel" : a.proxy(function (a) {
925					a.namespace && "position" == a.property.name && this.draw()
926				}, this), "initialized.owl.carousel" : a.proxy(function (a) {
927					a.namespace && !this._initialized && (this._core.trigger("initialize", null,
928						"navigation"), this.initialize(), this.update(), this.draw(), this._initialized
929						= !0, this._core.trigger("initialized", null, "navigation"))
930				}, this), "refreshed.owl.carousel" : a.proxy(function (a) {
931					a.namespace && this._initialized && (this._core.trigger("refresh", null,
932						"navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation"))
933				}, this)
934			}, this._core.options = a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers)
935		};
936		e.Defaults = {
937			nav : !1,
938			navText : ['<span aria-label="Previous">&#x2039;</span>', '<span aria-label="Next">&#x203a;</span>'],
939			navSpeed : !1,
940			navElement : 'button type="button" role="presentation"',
941			navContainer : !1,
942			navContainerClass : "owl-nav",
943			navClass : ["owl-prev", "owl-next"],
944			slideBy : 1,
945			dotClass : "owl-dot",
946			dotsClass : "owl-dots",
947			dots : !0,
948			dotsEach : !1,
949			dotsData : !1,
950			dotsSpeed : !1,
951			dotsContainer : !1
952		}, e.prototype.initialize = function () {
953			var b, c = this._core.settings;
954			this._controls.$relative = (c.navContainer ? a(c.navContainer) : a("<div>").addClass(
955				c.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous = a(
956				"<" + c.navElement + ">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(
957				this._controls.$relative).on("click", a.proxy(function (a) {
958				this.prev(c.navSpeed)
959			}, this)), this._controls.$next = a("<" + c.navElement + ">").addClass(c.navClass[1]).html(
960				c.navText[1]).appendTo(this._controls.$relative).on("click", a.proxy(function (a) {
961				this.next(c.navSpeed)
962			}, this)), c.dotsData || (this._templates = [a('<button role="button">').addClass(c.dotClass).append(
963				a("<span>")).prop("outerHTML")]), this._controls.$absolute = (c.dotsContainer ? a(c.dotsContainer) : a(
964				"<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass(
965				"disabled"), this._controls.$absolute.on("click", "button", a.proxy(function (b) {
966				var d = a(b.target).parent().is(this._controls.$absolute) ? a(b.target).index() : a(
967					b.target).parent().index();
968				b.preventDefault(), this.to(d, c.dotsSpeed)
969			}, this));
970			for (b in this._overrides) {
971				this._core[b] = a.proxy(this[b], this)
972			}
973		}, e.prototype.destroy = function () {
974			var a, b, c, d, e;
975			e = this._core.settings;
976			for (a in this._handlers) {
977				this.$element.off(a, this._handlers[a]);
978			}
979			for (b in this._controls) {
980				"$relative" === b && e.navContainer ? this._controls[b].html("") : this._controls[b].remove();
981			}
982			for (d in this.overides) {
983				this._core[d] = this._overrides[d];
984			}
985			for (c in Object.getOwnPropertyNames(this)) {
986				"function" != typeof this[c] && (this[c] = null)
987			}
988		}, e.prototype.update = function () {
989			var a, b, c, d = this._core.clones().length / 2, e = d + this._core.items().length,
990				f = this._core.maximum(!0), g = this._core.settings,
991				h = g.center || g.autoWidth || g.dotsData ? 1 : g.dotsEach || g.items;
992			if ("page" !== g.slideBy && (g.slideBy = Math.min(g.slideBy, g.items)), g.dots || "page" == g.slideBy) {
993				for (this._pages = [], a = d, b = 0, c = 0; a < e; a++) {
994					if (b >= h || 0 === b) {
995						if (this._pages.push({start : Math.min(f, a - d), end : a - d + h - 1}), Math.min(f, a - d)
996						                                                                         === f) {
997							break;
998						}
999						b = 0, ++c
1000					}
1001					b += this._core.mergers(this._core.relative(a))
1002				}
1003			}
1004		}, e.prototype.draw = function () {
1005			var b, c = this._core.settings, d = this._core.items().length <= c.items,
1006				e = this._core.relative(this._core.current()), f = c.loop || c.rewind;
1007			this._controls.$relative.toggleClass("disabled", !c.nav || d), c.nav
1008			                                                               && (this._controls.$previous.toggleClass(
1009				"disabled", !f && e <= this._core.minimum(!0)), this._controls.$next.toggleClass("disabled",
1010			                                                               !f && e >= this._core.maximum(
1011				                                                               !0))), this._controls.$absolute.toggleClass(
1012				"disabled", !c.dots || d), c.dots && (b = this._pages.length
1013			                                              - this._controls.$absolute.children().length, c.dotsData && 0
1014			                               !== b ? this._controls.$absolute.html(this._templates.join("")) : b > 0
1015			                                                                                                 ? this._controls.$absolute.append(
1016					new Array(b + 1).join(this._templates[0])) : b < 0 && this._controls.$absolute.children().slice(
1017				b).remove(), this._controls.$absolute.find(".active").removeClass(
1018				"active"), this._controls.$absolute.children().eq(a.inArray(this.current(), this._pages)).addClass(
1019				"active"))
1020		}, e.prototype.onTrigger = function (b) {
1021			var c = this._core.settings;
1022			b.page = {
1023				index : a.inArray(this.current(), this._pages),
1024				count : this._pages.length,
1025				size : c && (c.center || c.autoWidth || c.dotsData ? 1 : c.dotsEach || c.items)
1026			}
1027		}, e.prototype.current = function () {
1028			var b = this._core.relative(this._core.current());
1029			return a.grep(this._pages, a.proxy(function (a, c) {
1030				return a.start <= b && a.end >= b
1031			}, this)).pop()
1032		}, e.prototype.getPosition = function (b) {
1033			var c, d, e = this._core.settings;
1034			return "page" == e.slideBy ? (c = a.inArray(this.current(), this._pages), d = this._pages.length, b ? ++c
1035			                                                                                                    : --c, c
1036				= this._pages[(c % d + d) % d].start) : (c = this._core.relative(this._core.current()), d
1037				= this._core.items().length, b ? c += e.slideBy : c -= e.slideBy), c
1038		}, e.prototype.next = function (b) {
1039			a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b)
1040		}, e.prototype.prev = function (b) {
1041			a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b)
1042		}, e.prototype.to = function (b, c, d) {
1043			var e;
1044			!d && this._pages.length ? (e = this._pages.length, a.proxy(this._overrides.to, this._core)(
1045				this._pages[(b % e + e) % e].start, c)) : a.proxy(this._overrides.to, this._core)(b, c)
1046		}, a.fn.owlCarousel.Constructor.Plugins.Navigation = e
1047	}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) {
1048		"use strict";
1049		var e = function (c) {
1050			this._core = c, this._hashes = {}, this.$element = this._core.$element, this._handlers = {
1051				"initialized.owl.carousel" : a.proxy(function (c) {
1052					c.namespace && "URLHash" === this._core.settings.startPosition && a(b).trigger(
1053						"hashchange.owl.navigation")
1054				}, this), "prepared.owl.carousel" : a.proxy(function (b) {
1055					if (b.namespace) {
1056						var c = a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");
1057						if (!c) {
1058							return;
1059						}
1060						this._hashes[c] = b.content
1061					}
1062				}, this), "changed.owl.carousel" : a.proxy(function (c) {
1063					if (c.namespace && "position" === c.property.name) {
1064						var d = this._core.items(this._core.relative(this._core.current())),
1065							e = a.map(this._hashes, function (a, b) {
1066								return a === d ? b : null
1067							}).join();
1068						if (!e || b.location.hash.slice(1) === e) {
1069							return;
1070						}
1071						b.location.hash = e
1072					}
1073				}, this)
1074			}, this._core.options = a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers), a(
1075				b).on("hashchange.owl.navigation", a.proxy(function (a) {
1076				var c = b.location.hash.substring(1), e = this._core.$stage.children(),
1077					f = this._hashes[c] && e.index(this._hashes[c]);
1078				f !== d && f !== this._core.current() && this._core.to(this._core.relative(f), !1, !0)
1079			}, this))
1080		};
1081		e.Defaults = {URLhashListener : !1}, e.prototype.destroy = function () {
1082			var c, d;
1083			a(b).off("hashchange.owl.navigation");
1084			for (c in this._handlers) {
1085				this._core.$element.off(c, this._handlers[c]);
1086			}
1087			for (d in Object.getOwnPropertyNames(this)) {
1088				"function" != typeof this[d] && (this[d] = null)
1089			}
1090		}, a.fn.owlCarousel.Constructor.Plugins.Hash = e
1091	}(window.Zepto || window.jQuery, window, document), function (a, b, c, d) {
1092		function e(b, c) {
1093			var e = !1, f = b.charAt(0).toUpperCase() + b.slice(1);
1094			return a.each((b + " " + h.join(f + " ") + f).split(" "), function (a, b) {
1095				if (g[b] !== d) {
1096					return e = !c || b, !1
1097				}
1098			}), e
1099		}
1100
1101		function f(a) {
1102			return e(a, !0)
1103		}
1104
1105		var g = a("<support>").get(0).style, h = "Webkit Moz O ms".split(" "), i = {
1106			transition : {
1107				end : {
1108					WebkitTransition : "webkitTransitionEnd",
1109					MozTransition : "transitionend",
1110					OTransition : "oTransitionEnd",
1111					transition : "transitionend"
1112				}
1113			}, animation : {
1114				end : {
1115					WebkitAnimation : "webkitAnimationEnd",
1116					MozAnimation : "animationend",
1117					OAnimation : "oAnimationEnd",
1118					animation : "animationend"
1119				}
1120			}
1121		}, j = {
1122			csstransforms : function () {
1123				return !!e("transform")
1124			}, csstransforms3d : function () {
1125				return !!e("perspective")
1126			}, csstransitions : function () {
1127				return !!e("transition")
1128			}, cssanimations : function () {
1129				return !!e("animation")
1130			}
1131		};
1132		j.csstransitions() && (a.support.transition = new String(f("transition")), a.support.transition.end
1133			= i.transition.end[a.support.transition]), j.cssanimations() && (a.support.animation = new String(
1134			f("animation")), a.support.animation.end = i.animation.end[a.support.animation]), j.csstransforms()
1135		                                                                                      && (a.support.transform
1136			= new String(f("transform")), a.support.transform3d = j.csstransforms3d())
1137	}(window.Zepto || window.jQuery, window, document);
1138
1139}
1140
vendor: 27,198 bytes, lines 1141-1224
1141/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
1142 * https://jqueryvalidation.org/
1143 * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
1144!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
1145
1146/*global jQuery */
1147/*!
1148* FitText.js 1.2
1149*
1150* Copyright 2011, Dave Rupert http://daverupert.com
1151* Released under the WTFPL license
1152* http://sam.zoy.org/wtfpl/
1153*
1154* Date: Thu May 05 14:23:00 2011 -0600
1155*/
1156
1157(function( $ ){
1158
1159  $.fn.fitText = function( kompressor, options ) {
1160
1161    // Setup options
1162    var compressor = kompressor || 1,
1163        settings = $.extend({
1164          'minFontSize' : Number.NEGATIVE_INFINITY,
1165          'maxFontSize' : Number.POSITIVE_INFINITY
1166        }, options);
1167
1168    return this.each(function(){
1169
1170      // Store the object
1171      var $this = $(this);
1172
1173      // Resizer() resizes items based on the object width divided by the compressor * 10
1174      var resizer = function () {
1175        $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
1176      };
1177
1178      // Call once to set.
1179      resizer();
1180
1181      // Call on resize. Opera debounces their resize by default.
1182      $(window).on('resize.fittext orientationchange.fittext', resizer);
1183
1184    });
1185
1186  };
1187
1188})( jQuery );
1189
1190/*!
1191 * @fileOverview TouchSwipe - jQuery Plugin
1192 * @version 1.6.18
1193 *
1194 * @author Matt Bryson http://www.github.com/mattbryson
1195 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
1196 * @see http://labs.rampinteractive.co.uk/touchSwipe/
1197 * @see http://plugins.jquery.com/project/touchSwipe
1198 * @license
1199 * Copyright (c) 2010-2015 Matt Bryson
1200 * Dual licensed under the MIT or GPL Version 2 licenses.
1201 *
1202 */
1203
1204/*
1205 *
1206 * Changelog
1207 * $Date: 2010-12-12 (Wed, 12 Dec 2010) $
1208 * $version: 1.0.0
1209 * $version: 1.0.1 - removed multibyte comments
1210 *
1211 * $Date: 2011-21-02 (Mon, 21 Feb 2011) $
1212 * $version: 1.1.0 	- added allowPageScroll property to allow swiping and scrolling of page
1213 *					- changed handler signatures so one handler can be used for multiple events
1214 * $Date: 2011-23-02 (Wed, 23 Feb 2011) $
1215 * $version: 1.2.0 	- added click handler. This is fired if the user simply clicks and does not swipe. The event object and click target are passed to handler.
1216 *					- If you use the http://code.google.com/p/jquery-ui-for-ipad-and-iphone/ plugin, you can also assign jQuery mouse events to children of a touchSwipe object.
1217 * $version: 1.2.1 	- removed console log!
1218 *
1219 * $version: 1.2.2 	- Fixed bug where scope was not preserved in callback methods.
1220 *
1221 * $Date: 2011-28-04 (Thurs, 28 April 2011) $
1222 * $version: 1.2.4 	- Changed licence terms to be MIT or GPL inline with jQuery. Added check for support of touch events to stop non compatible browsers erroring.
1223 *
1224 * $Date: 2011-27-09 (Tues, 27 September 2011) $
1225 * $version: 1.2.5 	- Added support for testing swipes with mouse on desktop browser (thanks to https://github.com/joelhy)
1226 *
1227 * $Date: 2012-14-05 (Mon, 14 May 2012) $
1228 * $version: 1.2.6 	- Added timeThreshold between start and end touch, so user can ignore slow swipes (thanks to Mark Chase). Default is null, all swipes are detected
1229 *
1230 * $Date: 2012-05-06 (Tues, 05 June 2012) $
1231 * $version: 1.2.7 	- Changed time threshold to have null default for backwards compatibility. Added duration param passed back in events, and refactored how time is handled.
1232 *
1233 * $Date: 2012-05-06 (Tues, 05 June 2012) $
1234 * $version: 1.2.8 	- Added the possibility to return a value like null or false in the trigger callback. In that way we can control when the touch start/move should take effect or not (simply by returning in some cases return null; or return false;) This effects the ontouchstart/ontouchmove event.
1235 *
1236 * $Date: 2012-06-06 (Wed, 06 June 2012) $
1237 * $version: 1.3.0 	- Refactored whole plugin to allow for methods to be executed, as well as exposed defaults for user override. Added 'enable', 'disable', and 'destroy' methods
1238 *
1239 * $Date: 2012-05-06 (Fri, 05 June 2012) $
1240 * $version: 1.3.1 	- Bug fixes  - bind() with false as last argument is no longer supported in jQuery 1.6, also, if you just click, the duration is now returned correctly.
1241 *
1242 * $Date: 2012-29-07 (Sun, 29 July 2012) $
1243 * $version: 1.3.2	- Added fallbackToMouseEvents option to NOT capture mouse events on non touch devices.
1244 * 			- Added "all" fingers value to the fingers property, so any combination of fingers triggers the swipe, allowing event handlers to check the finger count
1245 *
1246 * $Date: 2012-09-08 (Thurs, 9 Aug 2012) $
1247 * $version: 1.3.3	- Code tidy prep for minefied version
1248 *
1249 * $Date: 2012-04-10 (wed, 4 Oct 2012) $
1250 * $version: 1.4.0	- Added pinch support, pinchIn and pinchOut
1251 *
1252 * $Date: 2012-11-10 (Thurs, 11 Oct 2012) $
1253 * $version: 1.5.0	- Added excludedElements, a jquery selector that specifies child elements that do NOT trigger swipes. By default, this is .noSwipe
1254 *
1255 * $Date: 2012-22-10 (Mon, 22 Oct 2012) $
1256 * $version: 1.5.1	- Fixed bug with jQuery 1.8 and trailing comma in excludedElements
1257 *					- Fixed bug with IE and eventPreventDefault()
1258 * $Date: 2013-01-12 (Fri, 12 Jan 2013) $
1259 * $version: 1.6.0	- Fixed bugs with pinching, mainly when both pinch and swipe enabled, as well as adding time threshold for multifinger gestures, so releasing one finger beofre the other doesnt trigger as single finger gesture.
1260 *					- made the demo site all static local HTML pages so they can be run locally by a developer
1261 *					- added jsDoc comments and added documentation for the plugin
1262 *					- code tidy
1263 *					- added triggerOnTouchLeave property that will end the event when the user swipes off the element.
1264 * $Date: 2013-03-23 (Sat, 23 Mar 2013) $
1265 * $version: 1.6.1	- Added support for ie8 touch events
1266 * $version: 1.6.2	- Added support for events binding with on / off / bind in jQ for all callback names.
1267 *                   - Deprecated the 'click' handler in favour of tap.
1268 *                   - added cancelThreshold property
1269 *                   - added option method to update init options at runtime
1270 * $version 1.6.3    - added doubletap, longtap events and longTapThreshold, doubleTapThreshold property
1271 *
1272 * $Date: 2013-04-04 (Thurs, 04 April 2013) $
1273 * $version 1.6.4    - Fixed bug with cancelThreshold introduced in 1.6.3, where swipe status no longer fired start event, and stopped once swiping back.
1274 *
1275 * $Date: 2013-08-24 (Sat, 24 Aug 2013) $
1276 * $version 1.6.5    - Merged a few pull requests fixing various bugs, added AMD support.
1277 *
1278 * $Date: 2014-06-04 (Wed, 04 June 2014) $
1279 * $version 1.6.6 	- Merge of pull requests.
1280 *    				- IE10 touch support
1281 *    				- Only prevent default event handling on valid swipe
1282 *    				- Separate license/changelog comment
1283 *    				- Detect if the swipe is valid at the end of the touch event.
1284 *    				- Pass fingerdata to event handlers.
1285 *    				- Add 'hold' gesture
1286 *    				- Be more tolerant about the tap distance
1287 *    				- Typos and minor fixes
1288 *
1289 * $Date: 2015-22-01 (Thurs, 22 Jan 2015) $
1290 * $version 1.6.7    - Added patch from https://github.com/mattbryson/TouchSwipe-Jquery-Plugin/issues/206 to fix memory leak
1291 *
1292 * $Date: 2015-2-2 (Mon, 2 Feb 2015) $
1293 * $version 1.6.8    - Added preventDefaultEvents option to proxy events regardless.
1294 *					- Fixed issue with swipe and pinch not triggering at the same time
1295 *
1296 * $Date: 2015-9-6 (Tues, 9 June 2015) $
1297 * $version 1.6.9    - Added PR from jdalton/hybrid to fix pointer events
1298 *					- Added scrolling demo
1299 *					- Added version property to plugin
1300 *
1301 * $Date: 2015-1-10 (Wed, 1 October 2015) $
1302 * $version 1.6.10    - Added PR from beatspace to fix tap events
1303 * $version 1.6.11    - Added PRs from indri-indri ( Doc tidyup), kkirsche ( Bower tidy up ), UziTech (preventDefaultEvents fixes )
1304 *					 - Allowed setting multiple options via .swipe("options", options_hash) and more simply .swipe(options_hash) or exisitng instances
1305 * $version 1.6.12    - Fixed bug with multi finger releases above 2 not triggering events
1306 *
1307 * $Date: 2015-12-18 (Fri, 18 December 2015) $
1308 * $version 1.6.13    - Added PRs
1309 *                    - Fixed #267 allowPageScroll not working correctly
1310 * $version 1.6.14    - Fixed #220 / #248 doubletap not firing with swipes, #223 commonJS compatible
1311 * $version 1.6.15    - More bug fixes
1312 *
1313 * $Date: 2016-04-29 (Fri, 29 April 2016) $
1314 * $version 1.6.16    - Swipes with 0 distance now allow default events to trigger.  So tapping any form elements or A tags will allow default interaction, but swiping will trigger a swipe.
1315                        Removed the a, input, select etc from the excluded Children list as the 0 distance tap solves that issue.
1316* $Date: 2016-05-19  (Fri, 29 April 2016) $
1317* $version 1.6.17     - Fixed context issue when calling instance methods via $("selector").swipe("method");
1318* $version 1.6.18     - now honors fallbackToMouseEvents=false for MS Pointer events when a Mouse is used.
1319
1320 */
1321
1322/**
1323 * See (http://jquery.com/).
1324 * @name $
1325 * @class
1326 * See the jQuery Library  (http://jquery.com/) for full details.  This just
1327 * documents the function and classes that are added to jQuery by this plug-in.
1328 */
1329
1330/**
1331 * See (http://jquery.com/)
1332 * @name fn
1333 * @class
1334 * See the jQuery Library  (http://jquery.com/) for full details.  This just
1335 * documents the function and classes that are added to jQuery by this plug-in.
1336 * @memberOf $
1337 */
1338
1339
1340(function(factory) {
1341  if (typeof define === 'function' && define.amd && define.amd.jQuery) {
1342    // AMD. Register as anonymous module.
1343    define(['jquery'], factory);
1344  } else if (typeof module !== 'undefined' && module.exports) {
1345    // CommonJS Module
1346    factory(require("jquery"));
1347  } else {
1348    // Browser globals.
1349    factory(jQuery);
1350  }
1351}(function($) {
1352  "use strict";
1353
1354  //Constants
1355  var VERSION = "1.6.18",
1356    LEFT = "left",
1357    RIGHT = "right",
1358    UP = "up",
1359    DOWN = "down",
1360    IN = "in",
1361    OUT = "out",
1362
1363    NONE = "none",
1364    AUTO = "auto",
1365
1366    SWIPE = "swipe",
1367    PINCH = "pinch",
1368    TAP = "tap",
1369    DOUBLE_TAP = "doubletap",
1370    LONG_TAP = "longtap",
1371    HOLD = "hold",
1372
1373    HORIZONTAL = "horizontal",
1374    VERTICAL = "vertical",
1375
1376    ALL_FINGERS = "all",
1377
1378    DOUBLE_TAP_THRESHOLD = 10,
1379
1380    PHASE_START = "start",
1381    PHASE_MOVE = "move",
1382    PHASE_END = "end",
1383    PHASE_CANCEL = "cancel",
1384
1385    SUPPORTS_TOUCH = 'ontouchstart' in window,
1386
1387    SUPPORTS_POINTER_IE10 = window.navigator.msPointerEnabled && !window.navigator.pointerEnabled && !SUPPORTS_TOUCH,
1388
1389    SUPPORTS_POINTER = (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) && !SUPPORTS_TOUCH,
1390
1391    PLUGIN_NS = 'TouchSwipe';
1392
1393
1394
1395  /**
1396  * The default configuration, and available options to configure touch swipe with.
1397  * You can set the default values by updating any of the properties prior to instantiation.
1398  * @name $.fn.swipe.defaults
1399  * @namespace
1400  * @property {int} [fingers=1] The number of fingers to detect in a swipe. Any swipes that do not meet this requirement will NOT trigger swipe handlers.
1401  * @property {int} [threshold=75] The number of pixels that the user must move their finger by before it is considered a swipe.
1402  * @property {int} [cancelThreshold=null] The number of pixels that the user must move their finger back from the original swipe direction to cancel the gesture.
1403  * @property {int} [pinchThreshold=20] The number of pixels that the user must pinch their finger by before it is considered a pinch.
1404  * @property {int} [maxTimeThreshold=null] Time, in milliseconds, between touchStart and touchEnd must NOT exceed in order to be considered a swipe.
1405  * @property {int} [fingerReleaseThreshold=250] Time in milliseconds between releasing multiple fingers.  If 2 fingers are down, and are released one after the other, if they are within this threshold, it counts as a simultaneous release.
1406  * @property {int} [longTapThreshold=500] Time in milliseconds between tap and release for a long tap
1407  * @property {int} [doubleTapThreshold=200] Time in milliseconds between 2 taps to count as a double tap
1408  * @property {function} [swipe=null] A handler to catch all swipes. See {@link $.fn.swipe#event:swipe}
1409  * @property {function} [swipeLeft=null] A handler that is triggered for "left" swipes. See {@link $.fn.swipe#event:swipeLeft}
1410  * @property {function} [swipeRight=null] A handler that is triggered for "right" swipes. See {@link $.fn.swipe#event:swipeRight}
1411  * @property {function} [swipeUp=null] A handler that is triggered for "up" swipes. See {@link $.fn.swipe#event:swipeUp}
1412  * @property {function} [swipeDown=null] A handler that is triggered for "down" swipes. See {@link $.fn.swipe#event:swipeDown}
1413  * @property {function} [swipeStatus=null] A handler triggered for every phase of the swipe. See {@link $.fn.swipe#event:swipeStatus}
1414  * @property {function} [pinchIn=null] A handler triggered for pinch in events. See {@link $.fn.swipe#event:pinchIn}
1415  * @property {function} [pinchOut=null] A handler triggered for pinch out events. See {@link $.fn.swipe#event:pinchOut}
1416  * @property {function} [pinchStatus=null] A handler triggered for every phase of a pinch. See {@link $.fn.swipe#event:pinchStatus}
1417  * @property {function} [tap=null] A handler triggered when a user just taps on the item, rather than swipes it. If they do not move, tap is triggered, if they do move, it is not.
1418  * @property {function} [doubleTap=null] A handler triggered when a user double taps on the item. The delay between taps can be set with the doubleTapThreshold property. See {@link $.fn.swipe.defaults#doubleTapThreshold}
1419  * @property {function} [longTap=null] A handler triggered when a user long taps on the item. The delay between start and end can be set with the longTapThreshold property. See {@link $.fn.swipe.defaults#longTapThreshold}
1420  * @property (function) [hold=null] A handler triggered when a user reaches longTapThreshold on the item. See {@link $.fn.swipe.defaults#longTapThreshold}
1421  * @property {boolean} [triggerOnTouchEnd=true] If true, the swipe events are triggered when the touch end event is received (user releases finger).  If false, it will be triggered on reaching the threshold, and then cancel the touch event automatically.
1422  * @property {boolean} [triggerOnTouchLeave=false] If true, then when the user leaves the swipe object, the swipe will end and trigger appropriate handlers.
1423  * @property {string|undefined} [allowPageScroll='auto'] How the browser handles page scrolls when the user is swiping on a touchSwipe object. See {@link $.fn.swipe.pageScroll}.  <br/><br/>
1424  									<code>"auto"</code> : all undefined swipes will cause the page to scroll in that direction. <br/>
1425  									<code>"none"</code> : the page will not scroll when user swipes. <br/>
1426  									<code>"horizontal"</code> : will force page to scroll on horizontal swipes. <br/>
1427  									<code>"vertical"</code> : will force page to scroll on vertical swipes. <br/>
1428  * @property {boolean} [fallbackToMouseEvents=true] If true mouse events are used when run on a non touch device, false will stop swipes being triggered by mouse events on non tocuh devices.
1429  * @property {string} [excludedElements=".noSwipe"] A jquery selector that specifies child elements that do NOT trigger swipes. By default this excludes elements with the class .noSwipe .
1430  * @property {boolean} [preventDefaultEvents=true] by default default events are cancelled, so the page doesn't move.  You can dis
vendor: 10,110 bytes, lines 1430-1698
1430sable this so both native events fire as well as your handlers.
1431
1432  */
1433  var defaults = {
1434    fingers: 1,
1435    threshold: 75,
1436    cancelThreshold: null,
1437    pinchThreshold: 20,
1438    maxTimeThreshold: null,
1439    fingerReleaseThreshold: 250,
1440    longTapThreshold: 500,
1441    doubleTapThreshold: 200,
1442    swipe: null,
1443    swipeLeft: null,
1444    swipeRight: null,
1445    swipeUp: null,
1446    swipeDown: null,
1447    swipeStatus: null,
1448    pinchIn: null,
1449    pinchOut: null,
1450    pinchStatus: null,
1451    click: null, //Deprecated since 1.6.2
1452    tap: null,
1453    doubleTap: null,
1454    longTap: null,
1455    hold: null,
1456    triggerOnTouchEnd: true,
1457    triggerOnTouchLeave: false,
1458    allowPageScroll: "auto",
1459    fallbackToMouseEvents: true,
1460    excludedElements: ".noSwipe",
1461    preventDefaultEvents: true
1462  };
1463
1464
1465
1466  /**
1467   * Applies TouchSwipe behaviour to one or more jQuery objects.
1468   * The TouchSwipe plugin can be instantiated via this method, or methods within
1469   * TouchSwipe can be executed via this method as per jQuery plugin architecture.
1470   * An existing plugin can have its options changed simply by re calling .swipe(options)
1471   * @see TouchSwipe
1472   * @class
1473   * @param {Mixed} method If the current DOMNode is a TouchSwipe object, and <code>method</code> is a TouchSwipe method, then
1474   * the <code>method</code> is executed, and any following arguments are passed to the TouchSwipe method.
1475   * If <code>method</code> is an object, then the TouchSwipe class is instantiated on the current DOMNode, passing the
1476   * configuration properties defined in the object. See TouchSwipe
1477   *
1478   */
1479  $.fn.swipe = function(method) {
1480    var $this = $(this),
1481      plugin = $this.data(PLUGIN_NS);
1482
1483    //Check if we are already instantiated and trying to execute a method
1484    if (plugin && typeof method === 'string') {
1485      if (plugin[method]) {
1486        return plugin[method].apply(plugin, Array.prototype.slice.call(arguments, 1));
1487      } else {
1488        $.error('Method ' + method + ' does not exist on jQuery.swipe');
1489      }
1490    }
1491
1492    //Else update existing plugin with new options hash
1493    else if (plugin && typeof method === 'object') {
1494      plugin['option'].apply(plugin, arguments);
1495    }
1496
1497    //Else not instantiated and trying to pass init object (or nothing)
1498    else if (!plugin && (typeof method === 'object' || !method)) {
1499      return init.apply(this, arguments);
1500    }
1501
1502    return $this;
1503  };
1504
1505  /**
1506   * The version of the plugin
1507   * @readonly
1508   */
1509  $.fn.swipe.version = VERSION;
1510
1511
1512
1513  //Expose our defaults so a user could override the plugin defaults
1514  $.fn.swipe.defaults = defaults;
1515
1516  /**
1517   * The phases that a touch event goes through.  The <code>phase</code> is passed to the event handlers.
1518   * These properties are read only, attempting to change them will not alter the values passed to the event handlers.
1519   * @namespace
1520   * @readonly
1521   * @property {string} PHASE_START Constant indicating the start phase of the touch event. Value is <code>"start"</code>.
1522   * @property {string} PHASE_MOVE Constant indicating the move phase of the touch event. Value is <code>"move"</code>.
1523   * @property {string} PHASE_END Constant indicating the end phase of the touch event. Value is <code>"end"</code>.
1524   * @property {string} PHASE_CANCEL Constant indicating the cancel phase of the touch event. Value is <code>"cancel"</code>.
1525   */
1526  $.fn.swipe.phases = {
1527    PHASE_START: PHASE_START,
1528    PHASE_MOVE: PHASE_MOVE,
1529    PHASE_END: PHASE_END,
1530    PHASE_CANCEL: PHASE_CANCEL
1531  };
1532
1533  /**
1534   * The direction constants that are passed to the event handlers.
1535   * These properties are read only, attempting to change them will not alter the values passed to the event handlers.
1536   * @namespace
1537   * @readonly
1538   * @property {string} LEFT Constant indicating the left direction. Value is <code>"left"</code>.
1539   * @property {string} RIGHT Constant indicating the right direction. Value is <code>"right"</code>.
1540   * @property {string} UP Constant indicating the up direction. Value is <code>"up"</code>.
1541   * @property {string} DOWN Constant indicating the down direction. Value is <code>"cancel"</code>.
1542   * @property {string} IN Constant indicating the in direction. Value is <code>"in"</code>.
1543   * @property {string} OUT Constant indicating the out direction. Value is <code>"out"</code>.
1544   */
1545  $.fn.swipe.directions = {
1546    LEFT: LEFT,
1547    RIGHT: RIGHT,
1548    UP: UP,
1549    DOWN: DOWN,
1550    IN: IN,
1551    OUT: OUT
1552  };
1553
1554  /**
1555   * The page scroll constants that can be used to set the value of <code>allowPageScroll</code> option
1556   * These properties are read only
1557   * @namespace
1558   * @readonly
1559   * @see $.fn.swipe.defaults#allowPageScroll
1560   * @property {string} NONE Constant indicating no page scrolling is allowed. Value is <code>"none"</code>.
1561   * @property {string} HORIZONTAL Constant indicating horizontal page scrolling is allowed. Value is <code>"horizontal"</code>.
1562   * @property {string} VERTICAL Constant indicating vertical page scrolling is allowed. Value is <code>"vertical"</code>.
1563   * @property {string} AUTO Constant indicating either horizontal or vertical will be allowed, depending on the swipe handlers registered. Value is <code>"auto"</code>.
1564   */
1565  $.fn.swipe.pageScroll = {
1566    NONE: NONE,
1567    HORIZONTAL: HORIZONTAL,
1568    VERTICAL: VERTICAL,
1569    AUTO: AUTO
1570  };
1571
1572  /**
1573   * Constants representing the number of fingers used in a swipe.  These are used to set both the value of <code>fingers</code> in the
1574   * options object, as well as the value of the <code>fingers</code> event property.
1575   * These properties are read only, attempting to change them will not alter the values passed to the event handlers.
1576   * @namespace
1577   * @readonly
1578   * @see $.fn.swipe.defaults#fingers
1579   * @property {string} ONE Constant indicating 1 finger is to be detected / was detected. Value is <code>1</code>.
1580   * @property {string} TWO Constant indicating 2 fingers are to be detected / were detected. Value is <code>2</code>.
1581   * @property {string} THREE Constant indicating 3 finger are to be detected / were detected. Value is <code>3</code>.
1582   * @property {string} FOUR Constant indicating 4 finger are to be detected / were detected. Not all devices support this. Value is <code>4</code>.
1583   * @property {string} FIVE Constant indicating 5 finger are to be detected / were detected. Not all devices support this. Value is <code>5</code>.
1584   * @property {string} ALL Constant indicating any combination of finger are to be detected.  Value is <code>"all"</code>.
1585   */
1586  $.fn.swipe.fingers = {
1587    ONE: 1,
1588    TWO: 2,
1589    THREE: 3,
1590    FOUR: 4,
1591    FIVE: 5,
1592    ALL: ALL_FINGERS
1593  };
1594
1595  /**
1596   * Initialise the plugin for each DOM element matched
1597   * This creates a new instance of the main TouchSwipe class for each DOM element, and then
1598   * saves a reference to that instance in the elements data property.
1599   * @internal
1600   */
1601  function init(options) {
1602    //Prep and extend the options
1603    if (options && (options.allowPageScroll === undefined && (options.swipe !== undefined || options.swipeStatus !== undefined))) {
1604      options.allowPageScroll = NONE;
1605    }
1606
1607    //Check for deprecated options
1608    //Ensure that any old click handlers are assigned to the new tap, unless we have a tap
1609    if (options.click !== undefined && options.tap === undefined) {
1610      options.tap = options.click;
1611    }
1612
1613    if (!options) {
1614      options = {};
1615    }
1616
1617    //pass empty object so we dont modify the defaults
1618    options = $.extend({}, $.fn.swipe.defaults, options);
1619
1620    //For each element instantiate the plugin
1621    return this.each(function() {
1622      var $this = $(this);
1623
1624      //Check we havent already initialised the plugin
1625      var plugin = $this.data(PLUGIN_NS);
1626
1627      if (!plugin) {
1628        plugin = new TouchSwipe(this, options);
1629        $this.data(PLUGIN_NS, plugin);
1630      }
1631    });
1632  }
1633
1634  /**
1635   * Main TouchSwipe Plugin Class.
1636   * Do not use this to construct your TouchSwipe object, use the jQuery plugin method $.fn.swipe(); {@link $.fn.swipe}
1637   * @private
1638   * @name TouchSwipe
1639   * @param {DOMNode} element The HTML DOM object to apply to plugin to
1640   * @param {Object} options The options to configure the plugin with.  @link {$.fn.swipe.defaults}
1641   * @see $.fh.swipe.defaults
1642   * @see $.fh.swipe
1643   * @class
1644   */
1645  function TouchSwipe(element, options) {
1646
1647    //take a local/instacne level copy of the options - should make it this.options really...
1648    var options = $.extend({}, options);
1649
1650    var useTouchEvents = (SUPPORTS_TOUCH || SUPPORTS_POINTER || !options.fallbackToMouseEvents),
1651      START_EV = useTouchEvents ? (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerDown' : 'pointerdown') : 'touchstart') : 'mousedown',
1652      MOVE_EV = useTouchEvents ? (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerMove' : 'pointermove') : 'touchmove') : 'mousemove',
1653      END_EV = useTouchEvents ? (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerUp' : 'pointerup') : 'touchend') : 'mouseup',
1654      LEAVE_EV = useTouchEvents ? (SUPPORTS_POINTER ? 'mouseleave' : null) : 'mouseleave', //we manually detect leave on touch devices, so null event here
1655      CANCEL_EV = (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerCancel' : 'pointercancel') : 'touchcancel');
1656
1657
1658
1659    //touch properties
1660    var distance = 0,
1661      direction = null,
1662      currentDirection = null,
1663      duration = 0,
1664      startTouchesDistance = 0,
1665      endTouchesDistance = 0,
1666      pinchZoom = 1,
1667      pinchDistance = 0,
1668      pinchDirection = 0,
1669      maximumsMap = null;
1670
1671
1672
1673    //jQuery wrapped element for this instance
1674    var $element = $(element);
1675
1676    //Current phase of th touch cycle
1677    var phase = "start";
1678
1679    // the current number of fingers being used.
1680    var fingerCount = 0;
1681
1682    //track mouse points / delta
1683    var fingerData = {};
1684
1685    //track times
1686    var startTime = 0,
1687      endTime = 0,
1688      previousTouchEndTime = 0,
1689      fingerCountAtRelease = 0,
1690      doubleTapStartTime = 0;
1691
1692    //Timeouts
1693    var singleTapTimeout = null,
1694      holdTimeout = null;
1695
1696    // Add gestures to all swipable areas if supported
1697    try {
1698      $element.
vendor: 15,271 bytes, lines 1698-2129
1698bind(START_EV, touchStart);
1699      $element.bind(CANCEL_EV, touchCancel);
1700    } catch (e) {
1701      $.error('events not supported ' + START_EV + ',' + CANCEL_EV + ' on jQuery.swipe');
1702    }
1703
1704    //
1705    //Public methods
1706    //
1707
1708    /**
1709     * re-enables the swipe plugin with the previous configuration
1710     * @function
1711     * @name $.fn.swipe#enable
1712     * @return {DOMNode} The Dom element that was registered with TouchSwipe
1713     * @example $("#element").swipe("enable");
1714     */
1715    this.enable = function() {
1716      //Incase we are already enabled, clean up...
1717      this.disable();
1718      $element.bind(START_EV, touchStart);
1719      $element.bind(CANCEL_EV, touchCancel);
1720      return $element;
1721    };
1722
1723    /**
1724     * disables the swipe plugin
1725     * @function
1726     * @name $.fn.swipe#disable
1727     * @return {DOMNode} The Dom element that is now registered with TouchSwipe
1728     * @example $("#element").swipe("disable");
1729     */
1730    this.disable = function() {
1731      removeListeners();
1732      return $element;
1733    };
1734
1735    /**
1736     * Destroy the swipe plugin completely. To use any swipe methods, you must re initialise the plugin.
1737     * @function
1738     * @name $.fn.swipe#destroy
1739     * @example $("#element").swipe("destroy");
1740     */
1741    this.destroy = function() {
1742      removeListeners();
1743      $element.data(PLUGIN_NS, null);
1744      $element = null;
1745    };
1746
1747
1748    /**
1749     * Allows run time updating of the swipe configuration options.
1750     * @function
1751     * @name $.fn.swipe#option
1752     * @param {String} property The option property to get or set, or a has of multiple options to set
1753     * @param {Object} [value] The value to set the property to
1754     * @return {Object} If only a property name is passed, then that property value is returned. If nothing is passed the current options hash is returned.
1755     * @example $("#element").swipe("option", "threshold"); // return the threshold
1756     * @example $("#element").swipe("option", "threshold", 100); // set the threshold after init
1757     * @example $("#element").swipe("option", {threshold:100, fingers:3} ); // set multiple properties after init
1758     * @example $("#element").swipe({threshold:100, fingers:3} ); // set multiple properties after init - the "option" method is optional!
1759     * @example $("#element").swipe("option"); // Return the current options hash
1760     * @see $.fn.swipe.defaults
1761     *
1762     */
1763    this.option = function(property, value) {
1764
1765      if (typeof property === 'object') {
1766        options = $.extend(options, property);
1767      } else if (options[property] !== undefined) {
1768        if (value === undefined) {
1769          return options[property];
1770        } else {
1771          options[property] = value;
1772        }
1773      } else if (!property) {
1774        return options;
1775      } else {
1776        $.error('Option ' + property + ' does not exist on jQuery.swipe.options');
1777      }
1778
1779      return null;
1780    }
1781
1782
1783
1784    //
1785    // Private methods
1786    //
1787
1788    //
1789    // EVENTS
1790    //
1791    /**
1792     * Event handler for a touch start event.
1793     * Stops the default click event from triggering and stores where we touched
1794     * @inner
1795     * @param {object} jqEvent The normalised jQuery event object.
1796     */
1797    function touchStart(jqEvent) {
1798
1799      //If we already in a touch event (a finger already in use) then ignore subsequent ones..
1800      if (getTouchInProgress()) {
1801        return;
1802      }
1803
1804      //Check if this element matches any in the excluded elements selectors,  or its parent is excluded, if so, DON'T swipe
1805      if ($(jqEvent.target).closest(options.excludedElements, $element).length > 0) {
1806        return;
1807      }
1808
1809      //As we use Jquery bind for events, we need to target the original event object
1810      //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one.
1811      var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent;
1812
1813
1814      //If we have a pointer event, whoes type is 'mouse' and we have said NO mouse events, then dont do anything.
1815      if(event.pointerType && event.pointerType=="mouse" && options.fallbackToMouseEvents==false) {
1816        return;
1817      };
1818
1819      var ret,
1820        touches = event.touches,
1821        evt = touches ? touches[0] : event;
1822
1823      phase = PHASE_START;
1824
1825      //If we support touches, get the finger count
1826      if (touches) {
1827        // get the total number of fingers touching the screen
1828        fingerCount = touches.length;
1829      }
1830      //Else this is the desktop, so stop the browser from dragging content
1831      else if (options.preventDefaultEvents !== false) {
1832        jqEvent.preventDefault(); //call this on jq event so we are cross browser
1833      }
1834
1835      //clear vars..
1836      distance = 0;
1837      direction = null;
1838      currentDirection=null;
1839      pinchDirection = null;
1840      duration = 0;
1841      startTouchesDistance = 0;
1842      endTouchesDistance = 0;
1843      pinchZoom = 1;
1844      pinchDistance = 0;
1845      maximumsMap = createMaximumsData();
1846      cancelMultiFingerRelease();
1847
1848      //Create the default finger data
1849      createFingerData(0, evt);
1850
1851      // check the number of fingers is what we are looking for, or we are capturing pinches
1852      if (!touches || (fingerCount === options.fingers || options.fingers === ALL_FINGERS) || hasPinches()) {
1853        // get the coordinates of the touch
1854        startTime = getTimeStamp();
1855
1856        if (fingerCount == 2) {
1857          //Keep track of the initial pinch distance, so we can calculate the diff later
1858          //Store second finger data as start
1859          createFingerData(1, touches[1]);
1860          startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start);
1861        }
1862
1863        if (options.swipeStatus || options.pinchStatus) {
1864          ret = triggerHandler(event, phase);
1865        }
1866      } else {
1867        //A touch with more or less than the fingers we are looking for, so cancel
1868        ret = false;
1869      }
1870
1871      //If we have a return value from the users handler, then return and cancel
1872      if (ret === false) {
1873        phase = PHASE_CANCEL;
1874        triggerHandler(event, phase);
1875        return ret;
1876      } else {
1877        if (options.hold) {
1878          holdTimeout = setTimeout($.proxy(function() {
1879            //Trigger the event
1880            $element.trigger('hold', [event.target]);
1881            //Fire the callback
1882            if (options.hold) {
1883              ret = options.hold.call($element, event, event.target);
1884            }
1885          }, this), options.longTapThreshold);
1886        }
1887
1888        setTouchInProgress(true);
1889      }
1890
1891      return null;
1892    };
1893
1894
1895
1896    /**
1897     * Event handler for a touch move event.
1898     * If we change fingers during move, then cancel the event
1899     * @inner
1900     * @param {object} jqEvent The normalised jQuery event object.
1901     */
1902    function touchMove(jqEvent) {
1903
1904      //As we use Jquery bind for events, we need to target the original event object
1905      //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one.
1906      var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent;
1907
1908      //If we are ending, cancelling, or within the threshold of 2 fingers being released, don't track anything..
1909      if (phase === PHASE_END || phase === PHASE_CANCEL || inMultiFingerRelease())
1910        return;
1911
1912      var ret,
1913        touches = event.touches,
1914        evt = touches ? touches[0] : event;
1915
1916
1917      //Update the  finger data
1918      var currentFinger = updateFingerData(evt);
1919      endTime = getTimeStamp();
1920
1921      if (touches) {
1922        fingerCount = touches.length;
1923      }
1924
1925      if (options.hold) {
1926        clearTimeout(holdTimeout);
1927      }
1928
1929      phase = PHASE_MOVE;
1930
1931      //If we have 2 fingers get Touches distance as well
1932      if (fingerCount == 2) {
1933
1934        //Keep track of the initial pinch distance, so we can calculate the diff later
1935        //We do this here as well as the start event, in case they start with 1 finger, and the press 2 fingers
1936        if (startTouchesDistance == 0) {
1937          //Create second finger if this is the first time...
1938          createFingerData(1, touches[1]);
1939
1940          startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start);
1941        } else {
1942          //Else just update the second finger
1943          updateFingerData(touches[1]);
1944
1945          endTouchesDistance = calculateTouchesDistance(fingerData[0].end, fingerData[1].end);
1946          pinchDirection = calculatePinchDirection(fingerData[0].end, fingerData[1].end);
1947        }
1948
1949        pinchZoom = calculatePinchZoom(startTouchesDistance, endTouchesDistance);
1950        pinchDistance = Math.abs(startTouchesDistance - endTouchesDistance);
1951      }
1952
1953      if ((fingerCount === options.fingers || options.fingers === ALL_FINGERS) || !touches || hasPinches()) {
1954
1955        //The overall direction of the swipe. From start to now.
1956        direction = calculateDirection(currentFinger.start, currentFinger.end);
1957
1958        //The immediate direction of the swipe, direction between the last movement and this one.
1959        currentDirection = calculateDirection(currentFinger.last, currentFinger.end);
1960
1961        //Check if we need to prevent default event (page scroll / pinch zoom) or not
1962        validateDefaultEvent(jqEvent, currentDirection);
1963
1964        //Distance and duration are all off the main finger
1965        distance = calculateDistance(currentFinger.start, currentFinger.end);
1966        duration = calculateDuration();
1967
1968        //Cache the maximum distance we made in this direction
1969        setMaxDistance(direction, distance);
1970
1971        //Trigger status handler
1972        ret = triggerHandler(event, phase);
1973
1974
1975        //If we trigger end events when threshold are met, or trigger events when touch leaves element
1976        if (!options.triggerOnTouchEnd || options.triggerOnTouchLeave) {
1977
1978          var inBounds = true;
1979
1980          //If checking if we leave the element, run the bounds check (we can use touchleave as its not supported on webkit)
1981          if (options.triggerOnTouchLeave) {
1982            var bounds = getbounds(this);
1983            inBounds = isInBounds(currentFinger.end, bounds);
1984          }
1985
1986          //Trigger end handles as we swipe if thresholds met or if we have left the element if the user has asked to check these..
1987          if (!options.triggerOnTouchEnd && inBounds) {
1988            phase = getNextPhase(PHASE_MOVE);
1989          }
1990          //We end if out of bounds here, so set current phase to END, and check if its modified
1991          else if (options.triggerOnTouchLeave && !inBounds) {
1992            phase = getNextPhase(PHASE_END);
1993          }
1994
1995          if (phase == PHASE_CANCEL || phase == PHASE_END) {
1996            triggerHandler(event, phase);
1997          }
1998        }
1999      } else {
2000        phase = PHASE_CANCEL;
2001        triggerHandler(event, phase);
2002      }
2003
2004      if (ret === false) {
2005        phase = PHASE_CANCEL;
2006        triggerHandler(event, phase);
2007      }
2008    }
2009
2010
2011
2012
2013    /**
2014     * Event handler for a touch end event.
2015     * Calculate the direction and trigger events
2016     * @inner
2017     * @param {object} jqEvent The normalised jQuery event object.
2018     */
2019    function touchEnd(jqEvent) {
2020      //As we use Jquery bind for events, we need to target the original event object
2021      //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one.
2022      var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent,
2023        touches = event.touches;
2024
2025      //If we are still in a touch with the device wait a fraction and see if the other finger comes up
2026      //if it does within the threshold, then we treat it as a multi release, not a single release and end the touch / swipe
2027      if (touches) {
2028        if (touches.length && !inMultiFingerRelease()) {
2029          startMultiFingerRelease(event);
2030          return true;
2031        } else if (touches.length && inMultiFingerRelease()) {
2032          return true;
2033        }
2034      }
2035
2036      //If a previous finger has been released, check how long ago, if within the threshold, then assume it was a multifinger release.
2037      //This is used to allow 2 fingers to release fractionally after each other, whilst maintaining the event as containing 2 fingers, not 1
2038      if (inMultiFingerRelease()) {
2039        fingerCount = fingerCountAtRelease;
2040      }
2041
2042      //Set end of swipe
2043      endTime = getTimeStamp();
2044
2045      //Get duration incase move was never fired
2046      duration = calculateDuration();
2047
2048      //If we trigger handlers at end of swipe OR, we trigger during, but they didnt trigger and we are still in the move phase
2049      if (didSwipeBackToCancel() || !validateSwipeDistance()) {
2050        phase = PHASE_CANCEL;
2051        triggerHandler(event, phase);
2052      } else if (options.triggerOnTouchEnd || (options.triggerOnTouchEnd === false && phase === PHASE_MOVE)) {
2053        //call this on jq event so we are cross browser
2054        if (options.preventDefaultEvents !== false) {
2055          jqEvent.preventDefault();
2056        }
2057        phase = PHASE_END;
2058        triggerHandler(event, phase);
2059      }
2060      //Special cases - A tap should always fire on touch end regardless,
2061      //So here we manually trigger the tap end handler by itself
2062      //We dont run trigger handler as it will re-trigger events that may have fired already
2063      else if (!options.triggerOnTouchEnd && hasTap()) {
2064        //Trigger the pinch events...
2065        phase = PHASE_END;
2066        triggerHandlerForGesture(event, phase, TAP);
2067      } else if (phase === PHASE_MOVE) {
2068        phase = PHASE_CANCEL;
2069        triggerHandler(event, phase);
2070      }
2071
2072      setTouchInProgress(false);
2073
2074      return null;
2075    }
2076
2077
2078
2079    /**
2080     * Event handler for a touch cancel event.
2081     * Clears current vars
2082     * @inner
2083     */
2084    function touchCancel() {
2085      // reset the variables back to default values
2086      fingerCount = 0;
2087      endTime = 0;
2088      startTime = 0;
2089      startTouchesDistance = 0;
2090      endTouchesDistance = 0;
2091      pinchZoom = 1;
2092
2093      //If we were in progress of tracking a possible multi touch end, then re set it.
2094      cancelMultiFingerRelease();
2095
2096      setTouchInProgress(false);
2097    }
2098
2099
2100    /**
2101     * Event handler for a touch leave event.
2102     * This is only triggered on desktops, in touch we work this out manually
2103     * as the touchleave event is not supported in webkit
2104     * @inner
2105     */
2106    function touchLeave(jqEvent) {
2107      //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one.
2108      var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent;
2109
2110      //If we have the trigger on leave property set....
2111      if (options.triggerOnTouchLeave) {
2112        phase = getNextPhase(PHASE_END);
2113        triggerHandler(event, phase);
2114      }
2115    }
2116
2117    /**
2118     * Removes all listeners that were associated with the plugin
2119     * @inner
2120     */
2121    function removeListeners() {
2122      $element.unbind(START_EV, touchStart);
2123      $element.unbind(CANCEL_EV, touchCancel);
2124      $element.unbind(MOVE_EV, touchMove);
2125      $element.unbind(END_EV, touchEnd);
2126
2127      //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit
2128      if (LEAVE_EV) {
2129        $element.unbind
vendor: 20,844 bytes, lines 2129-2789
2129(LEAVE_EV, touchLeave);
2130      }
2131
2132      setTouchInProgress(false);
2133    }
2134
2135
2136    /**
2137     * Checks if the time and distance thresholds have been met, and if so then the appropriate handlers are fired.
2138     */
2139    function getNextPhase(currentPhase) {
2140
2141      var nextPhase = currentPhase;
2142
2143      // Ensure we have valid swipe (under time and over distance  and check if we are out of bound...)
2144      var validTime = validateSwipeTime();
2145      var validDistance = validateSwipeDistance();
2146      var didCancel = didSwipeBackToCancel();
2147
2148      //If we have exceeded our time, then cancel
2149      if (!validTime || didCancel) {
2150        nextPhase = PHASE_CANCEL;
2151      }
2152      //Else if we are moving, and have reached distance then end
2153      else if (validDistance && currentPhase == PHASE_MOVE && (!options.triggerOnTouchEnd || options.triggerOnTouchLeave)) {
2154        nextPhase = PHASE_END;
2155      }
2156      //Else if we have ended by leaving and didn't reach distance, then cancel
2157      else if (!validDistance && currentPhase == PHASE_END && options.triggerOnTouchLeave) {
2158        nextPhase = PHASE_CANCEL;
2159      }
2160
2161      return nextPhase;
2162    }
2163
2164
2165    /**
2166     * Trigger the relevant event handler
2167     * The handlers are passed the original event, the element that was swiped, and in the case of the catch all handler, the direction that was swiped, "left", "right", "up", or "down"
2168     * @param {object} event the original event object
2169     * @param {string} phase the phase of the swipe (start, end cancel etc) {@link $.fn.swipe.phases}
2170     * @inner
2171     */
2172    function triggerHandler(event, phase) {
2173
2174
2175
2176      var ret,
2177        touches = event.touches;
2178
2179      // SWIPE GESTURES
2180      if (didSwipe() || hasSwipes()) {
2181          ret = triggerHandlerForGesture(event, phase, SWIPE);
2182      }
2183
2184      // PINCH GESTURES (if the above didn't cancel)
2185      if ((didPinch() || hasPinches()) && ret !== false) {
2186          ret = triggerHandlerForGesture(event, phase, PINCH);
2187      }
2188
2189      // CLICK / TAP (if the above didn't cancel)
2190      if (didDoubleTap() && ret !== false) {
2191        //Trigger the tap events...
2192        ret = triggerHandlerForGesture(event, phase, DOUBLE_TAP);
2193      }
2194
2195      // CLICK / TAP (if the above didn't cancel)
2196      else if (didLongTap() && ret !== false) {
2197        //Trigger the tap events...
2198        ret = triggerHandlerForGesture(event, phase, LONG_TAP);
2199      }
2200
2201      // CLICK / TAP (if the above didn't cancel)
2202      else if (didTap() && ret !== false) {
2203        //Trigger the tap event..
2204        ret = triggerHandlerForGesture(event, phase, TAP);
2205      }
2206
2207
2208
2209      // If we are cancelling the gesture, then manually trigger the reset handler
2210      if (phase === PHASE_CANCEL) {
2211
2212        touchCancel(event);
2213      }
2214
2215
2216
2217
2218      // If we are ending the gesture, then manually trigger the reset handler IF all fingers are off
2219      if (phase === PHASE_END) {
2220        //If we support touch, then check that all fingers are off before we cancel
2221        if (touches) {
2222          if (!touches.length) {
2223            touchCancel(event);
2224          }
2225        } else {
2226          touchCancel(event);
2227        }
2228      }
2229
2230      return ret;
2231    }
2232
2233
2234
2235    /**
2236     * Trigger the relevant event handler
2237     * The handlers are passed the original event, the element that was swiped, and in the case of the catch all handler, the direction that was swiped, "left", "right", "up", or "down"
2238     * @param {object} event the original event object
2239     * @param {string} phase the phase of the swipe (start, end cancel etc) {@link $.fn.swipe.phases}
2240     * @param {string} gesture the gesture to trigger a handler for : PINCH or SWIPE {@link $.fn.swipe.gestures}
2241     * @return Boolean False, to indicate that the event should stop propagation, or void.
2242     * @inner
2243     */
2244    function triggerHandlerForGesture(event, phase, gesture) {
2245
2246      var ret;
2247
2248      //SWIPES....
2249      if (gesture == SWIPE) {
2250        //Trigger status every time..
2251        $element.trigger('swipeStatus', [phase, direction || null, distance || 0, duration || 0, fingerCount, fingerData, currentDirection]);
2252
2253        if (options.swipeStatus) {
2254          ret = options.swipeStatus.call($element, event, phase, direction || null, distance || 0, duration || 0, fingerCount, fingerData, currentDirection);
2255          //If the status cancels, then dont run the subsequent event handlers..
2256          if (ret === false) return false;
2257        }
2258
2259        if (phase == PHASE_END && validateSwipe()) {
2260
2261          //Cancel any taps that were in progress...
2262          clearTimeout(singleTapTimeout);
2263          clearTimeout(holdTimeout);
2264
2265          $element.trigger('swipe', [direction, distance, duration, fingerCount, fingerData, currentDirection]);
2266
2267          if (options.swipe) {
2268            ret = options.swipe.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection);
2269            //If the status cancels, then dont run the subsequent event handlers..
2270            if (ret === false) return false;
2271          }
2272
2273          //trigger direction specific event handlers
2274          switch (direction) {
2275            case LEFT:
2276              $element.trigger('swipeLeft', [direction, distance, duration, fingerCount, fingerData, currentDirection]);
2277
2278              if (options.swipeLeft) {
2279                ret = options.swipeLeft.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection);
2280              }
2281              break;
2282
2283            case RIGHT:
2284              $element.trigger('swipeRight', [direction, distance, duration, fingerCount, fingerData, currentDirection]);
2285
2286              if (options.swipeRight) {
2287                ret = options.swipeRight.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection);
2288              }
2289              break;
2290
2291            case UP:
2292              $element.trigger('swipeUp', [direction, distance, duration, fingerCount, fingerData, currentDirection]);
2293
2294              if (options.swipeUp) {
2295                ret = options.swipeUp.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection);
2296              }
2297              break;
2298
2299            case DOWN:
2300              $element.trigger('swipeDown', [direction, distance, duration, fingerCount, fingerData, currentDirection]);
2301
2302              if (options.swipeDown) {
2303                ret = options.swipeDown.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection);
2304              }
2305              break;
2306          }
2307        }
2308      }
2309
2310
2311      //PINCHES....
2312      if (gesture == PINCH) {
2313        $element.trigger('pinchStatus', [phase, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]);
2314
2315        if (options.pinchStatus) {
2316          ret = options.pinchStatus.call($element, event, phase, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData);
2317          //If the status cancels, then dont run the subsequent event handlers..
2318          if (ret === false) return false;
2319        }
2320
2321        if (phase == PHASE_END && validatePinch()) {
2322
2323          switch (pinchDirection) {
2324            case IN:
2325              $element.trigger('pinchIn', [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]);
2326
2327              if (options.pinchIn) {
2328                ret = options.pinchIn.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData);
2329              }
2330              break;
2331
2332            case OUT:
2333              $element.trigger('pinchOut', [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]);
2334
2335              if (options.pinchOut) {
2336                ret = options.pinchOut.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData);
2337              }
2338              break;
2339          }
2340        }
2341      }
2342
2343      if (gesture == TAP) {
2344        if (phase === PHASE_CANCEL || phase === PHASE_END) {
2345
2346          clearTimeout(singleTapTimeout);
2347          clearTimeout(holdTimeout);
2348
2349          //If we are also looking for doubelTaps, wait incase this is one...
2350          if (hasDoubleTap() && !inDoubleTap()) {
2351            doubleTapStartTime = getTimeStamp();
2352
2353            //Now wait for the double tap timeout, and trigger this single tap
2354            //if its not cancelled by a double tap
2355            singleTapTimeout = setTimeout($.proxy(function() {
2356              doubleTapStartTime = null;
2357              $element.trigger('tap', [event.target]);
2358
2359              if (options.tap) {
2360                ret = options.tap.call($element, event, event.target);
2361              }
2362            }, this), options.doubleTapThreshold);
2363
2364          } else {
2365            doubleTapStartTime = null;
2366            $element.trigger('tap', [event.target]);
2367            if (options.tap) {
2368              ret = options.tap.call($element, event, event.target);
2369            }
2370          }
2371        }
2372      } else if (gesture == DOUBLE_TAP) {
2373        if (phase === PHASE_CANCEL || phase === PHASE_END) {
2374          clearTimeout(singleTapTimeout);
2375          clearTimeout(holdTimeout);
2376          doubleTapStartTime = null;
2377          $element.trigger('doubletap', [event.target]);
2378
2379          if (options.doubleTap) {
2380            ret = options.doubleTap.call($element, event, event.target);
2381          }
2382        }
2383      } else if (gesture == LONG_TAP) {
2384        if (phase === PHASE_CANCEL || phase === PHASE_END) {
2385          clearTimeout(singleTapTimeout);
2386          doubleTapStartTime = null;
2387
2388          $element.trigger('longtap', [event.target]);
2389          if (options.longTap) {
2390            ret = options.longTap.call($element, event, event.target);
2391          }
2392        }
2393      }
2394
2395      return ret;
2396    }
2397
2398
2399    //
2400    // GESTURE VALIDATION
2401    //
2402
2403    /**
2404     * Checks the user has swipe far enough
2405     * @return Boolean if <code>threshold</code> has been set, return true if the threshold was met, else false.
2406     * If no threshold was set, then we return true.
2407     * @inner
2408     */
2409    function validateSwipeDistance() {
2410      var valid = true;
2411      //If we made it past the min swipe distance..
2412      if (options.threshold !== null) {
2413        valid = distance >= options.threshold;
2414      }
2415
2416      return valid;
2417    }
2418
2419    /**
2420     * Checks the user has swiped back to cancel.
2421     * @return Boolean if <code>cancelThreshold</code> has been set, return true if the cancelThreshold was met, else false.
2422     * If no cancelThreshold was set, then we return true.
2423     * @inner
2424     */
2425    function didSwipeBackToCancel() {
2426      var cancelled = false;
2427      if (options.cancelThreshold !== null && direction !== null) {
2428        cancelled = (getMaxDistance(direction) - distance) >= options.cancelThreshold;
2429      }
2430
2431      return cancelled;
2432    }
2433
2434    /**
2435     * Checks the user has pinched far enough
2436     * @return Boolean if <code>pinchThreshold</code> has been set, return true if the threshold was met, else false.
2437     * If no threshold was set, then we return true.
2438     * @inner
2439     */
2440    function validatePinchDistance() {
2441      if (options.pinchThreshold !== null) {
2442        return pinchDistance >= options.pinchThreshold;
2443      }
2444      return true;
2445    }
2446
2447    /**
2448     * Checks that the time taken to swipe meets the minimum / maximum requirements
2449     * @return Boolean
2450     * @inner
2451     */
2452    function validateSwipeTime() {
2453      var result;
2454      //If no time set, then return true
2455      if (options.maxTimeThreshold) {
2456        if (duration >= options.maxTimeThreshold) {
2457          result = false;
2458        } else {
2459          result = true;
2460        }
2461      } else {
2462        result = true;
2463      }
2464
2465      return result;
2466    }
2467
2468
2469    /**
2470     * Checks direction of the swipe and the value allowPageScroll to see if we should allow or prevent the default behaviour from occurring.
2471     * This will essentially allow page scrolling or not when the user is swiping on a touchSwipe object.
2472     * @param {object} jqEvent The normalised jQuery representation of the event object.
2473     * @param {string} direction The direction of the event. See {@link $.fn.swipe.directions}
2474     * @see $.fn.swipe.directions
2475     * @inner
2476     */
2477    function validateDefaultEvent(jqEvent, direction) {
2478
2479      //If the option is set, allways allow the event to bubble up (let user handle weirdness)
2480      if (options.preventDefaultEvents === false) {
2481        return;
2482      }
2483
2484      if (options.allowPageScroll === NONE) {
2485        jqEvent.preventDefault();
2486      } else {
2487        var auto = options.allowPageScroll === AUTO;
2488
2489        switch (direction) {
2490          case LEFT:
2491            if ((options.swipeLeft && auto) || (!auto && options.allowPageScroll != HORIZONTAL)) {
2492              jqEvent.preventDefault();
2493            }
2494            break;
2495
2496          case RIGHT:
2497            if ((options.swipeRight && auto) || (!auto && options.allowPageScroll != HORIZONTAL)) {
2498              jqEvent.preventDefault();
2499            }
2500            break;
2501
2502          case UP:
2503            if ((options.swipeUp && auto) || (!auto && options.allowPageScroll != VERTICAL)) {
2504              jqEvent.preventDefault();
2505            }
2506            break;
2507
2508          case DOWN:
2509            if ((options.swipeDown && auto) || (!auto && options.allowPageScroll != VERTICAL)) {
2510              jqEvent.preventDefault();
2511            }
2512            break;
2513
2514          case NONE:
2515
2516            break;
2517        }
2518      }
2519    }
2520
2521
2522    // PINCHES
2523    /**
2524     * Returns true of the current pinch meets the thresholds
2525     * @return Boolean
2526     * @inner
2527     */
2528    function validatePinch() {
2529      var hasCorrectFingerCount = validateFingers();
2530      var hasEndPoint = validateEndPoint();
2531      var hasCorrectDistance = validatePinchDistance();
2532      return hasCorrectFingerCount && hasEndPoint && hasCorrectDistance;
2533
2534    }
2535
2536    /**
2537     * Returns true if any Pinch events have been registered
2538     * @return Boolean
2539     * @inner
2540     */
2541    function hasPinches() {
2542      //Enure we dont return 0 or null for false values
2543      return !!(options.pinchStatus || options.pinchIn || options.pinchOut);
2544    }
2545
2546    /**
2547     * Returns true if we are detecting pinches, and have one
2548     * @return Boolean
2549     * @inner
2550     */
2551    function didPinch() {
2552      //Enure we dont return 0 or null for false values
2553      return !!(validatePinch() && hasPinches());
2554    }
2555
2556
2557
2558
2559    // SWIPES
2560    /**
2561     * Returns true if the current swipe meets the thresholds
2562     * @return Boolean
2563     * @inner
2564     */
2565    function validateSwipe() {
2566      //Check validity of swipe
2567      var hasValidTime = validateSwipeTime();
2568      var hasValidDistance = validateSwipeDistance();
2569      var hasCorrectFingerCount = validateFingers();
2570      var hasEndPoint = validateEndPoint();
2571      var didCancel = didSwipeBackToCancel();
2572
2573      // if the user swiped more than the minimum length, perform the appropriate action
2574      // hasValidDistance is null when no distance is set
2575      var valid = !didCancel && hasEndPoint && hasCorrectFingerCount && hasValidDistance && hasValidTime;
2576
2577      return valid;
2578    }
2579
2580    /**
2581     * Returns true if any Swipe events have been registered
2582     * @return Boolean
2583     * @inner
2584     */
2585    function hasSwipes() {
2586      //Enure we dont return 0 or null for false values
2587      return !!(options.swipe || options.swipeStatus || options.swipeLeft || options.swipeRight || options.swipeUp || options.swipeDown);
2588    }
2589
2590
2591    /**
2592     * Returns true if we are detecting swipes and have one
2593     * @return Boolean
2594     * @inner
2595     */
2596    function didSwipe() {
2597      //Enure we dont return 0 or null for false values
2598      return !!(validateSwipe() && hasSwipes());
2599    }
2600
2601    /**
2602     * Returns true if we have matched the number of fingers we are looking for
2603     * @return Boolean
2604     * @inner
2605     */
2606    function validateFingers() {
2607      //The number of fingers we want were matched, or on desktop we ignore
2608      return ((fingerCount === options.fingers || options.fingers === ALL_FINGERS) || !SUPPORTS_TOUCH);
2609    }
2610
2611    /**
2612     * Returns true if we have an end point for the swipe
2613     * @return Boolean
2614     * @inner
2615     */
2616    function validateEndPoint() {
2617      //We have an end value for the finger
2618      return fingerData[0].end.x !== 0;
2619    }
2620
2621    // TAP / CLICK
2622    /**
2623     * Returns true if a click / tap events have been registered
2624     * @return Boolean
2625     * @inner
2626     */
2627    function hasTap() {
2628      //Enure we dont return 0 or null for false values
2629      return !!(options.tap);
2630    }
2631
2632    /**
2633     * Returns true if a double tap events have been registered
2634     * @return Boolean
2635     * @inner
2636     */
2637    function hasDoubleTap() {
2638      //Enure we dont return 0 or null for false values
2639      return !!(options.doubleTap);
2640    }
2641
2642    /**
2643     * Returns true if any long tap events have been registered
2644     * @return Boolean
2645     * @inner
2646     */
2647    function hasLongTap() {
2648      //Enure we dont return 0 or null for false values
2649      return !!(options.longTap);
2650    }
2651
2652    /**
2653     * Returns true if we could be in the process of a double tap (one tap has occurred, we are listening for double taps, and the threshold hasn't past.
2654     * @return Boolean
2655     * @inner
2656     */
2657    function validateDoubleTap() {
2658      if (doubleTapStartTime == null) {
2659        return false;
2660      }
2661      var now = getTimeStamp();
2662      return (hasDoubleTap() && ((now - doubleTapStartTime) <= options.doubleTapThreshold));
2663    }
2664
2665    /**
2666     * Returns true if we could be in the process of a double tap (one tap has occurred, we are listening for double taps, and the threshold hasn't past.
2667     * @return Boolean
2668     * @inner
2669     */
2670    function inDoubleTap() {
2671      return validateDoubleTap();
2672    }
2673
2674
2675    /**
2676     * Returns true if we have a valid tap
2677     * @return Boolean
2678     * @inner
2679     */
2680    function validateTap() {
2681      return ((fingerCount === 1 || !SUPPORTS_TOUCH) && (isNaN(distance) || distance < options.threshold));
2682    }
2683
2684    /**
2685     * Returns true if we have a valid long tap
2686     * @return Boolean
2687     * @inner
2688     */
2689    function validateLongTap() {
2690      //slight threshold on moving finger
2691      return ((duration > options.longTapThreshold) && (distance < DOUBLE_TAP_THRESHOLD));
2692    }
2693
2694    /**
2695     * Returns true if we are detecting taps and have one
2696     * @return Boolean
2697     * @inner
2698     */
2699    function didTap() {
2700      //Enure we dont return 0 or null for false values
2701      return !!(validateTap() && hasTap());
2702    }
2703
2704
2705    /**
2706     * Returns true if we are detecting double taps and have one
2707     * @return Boolean
2708     * @inner
2709     */
2710    function didDoubleTap() {
2711      //Enure we dont return 0 or null for false values
2712      return !!(validateDoubleTap() && hasDoubleTap());
2713    }
2714
2715    /**
2716     * Returns true if we are detecting long taps and have one
2717     * @return Boolean
2718     * @inner
2719     */
2720    function didLongTap() {
2721      //Enure we dont return 0 or null for false values
2722      return !!(validateLongTap() && hasLongTap());
2723    }
2724
2725
2726
2727
2728    // MULTI FINGER TOUCH
2729    /**
2730     * Starts tracking the time between 2 finger releases, and keeps track of how many fingers we initially had up
2731     * @inner
2732     */
2733    function startMultiFingerRelease(event) {
2734      previousTouchEndTime = getTimeStamp();
2735      fingerCountAtRelease = event.touches.length + 1;
2736    }
2737
2738    /**
2739     * Cancels the tracking of time between 2 finger releases, and resets counters
2740     * @inner
2741     */
2742    function cancelMultiFingerRelease() {
2743      previousTouchEndTime = 0;
2744      fingerCountAtRelease = 0;
2745    }
2746
2747    /**
2748     * Checks if we are in the threshold between 2 fingers being released
2749     * @return Boolean
2750     * @inner
2751     */
2752    function inMultiFingerRelease() {
2753
2754      var withinThreshold = false;
2755
2756      if (previousTouchEndTime) {
2757        var diff = getTimeStamp() - previousTouchEndTime
2758        if (diff <= options.fingerReleaseThreshold) {
2759          withinThreshold = true;
2760        }
2761      }
2762
2763      return withinThreshold;
2764    }
2765
2766
2767    /**
2768     * gets a data flag to indicate that a touch is in progress
2769     * @return Boolean
2770     * @inner
2771     */
2772    function getTouchInProgress() {
2773      //strict equality to ensure only true and false are returned
2774      return !!($element.data(PLUGIN_NS + '_intouch') === true);
2775    }
2776
2777    /**
2778     * Sets a data flag to indicate that a touch is in progress
2779     * @param {boolean} val The value to set the property to
2780     * @inner
2781     */
2782    function setTouchInProgress(val) {
2783
2784      //If destroy is called in an event handler, we have no el, and we have already cleaned up, so return.
2785      if(!$element) { return; }
2786
2787      //Add or remove event listeners depending on touch status
2788      if (val === true) {
2789        $element.
2789bind(MOVE_EV, touchMove);
2790        $element.bind(END_EV, touchEnd);
2791
2792        //we only have leave events on desktop, we manually calcuate leave on touch as its not supported in webkit
2793        if (LEAVE_EV) {
2794          $element.bind(LEAVE_EV, touchLeave);
2795        }
2796      } else {
2797
2798        $element.unbind(MOVE_EV, touchMove, false);
2799        $element.unbind(END_EV, touchEnd, false);
2800
2801        //we only have leave events on desktop, we manually calcuate leave on touch as its not supported in webkit
2802        if (LEAVE_EV) {
2803          $element.unbind
vendor: 17,430 bytes, lines 2803-3298
2803(LEAVE_EV, touchLeave, false);
2804        }
2805      }
2806
2807
2808      //strict equality to ensure only true and false can update the value
2809      $element.data(PLUGIN_NS + '_intouch', val === true);
2810    }
2811
2812
2813    /**
2814     * Creates the finger data for the touch/finger in the event object.
2815     * @param {int} id The id to store the finger data under (usually the order the fingers were pressed)
2816     * @param {object} evt The event object containing finger data
2817     * @return finger data object
2818     * @inner
2819     */
2820    function createFingerData(id, evt) {
2821      var f = {
2822        start: {
2823          x: 0,
2824          y: 0
2825        },
2826        last: {
2827          x: 0,
2828          y: 0
2829        },
2830        end: {
2831          x: 0,
2832          y: 0
2833        }
2834      };
2835      f.start.x = f.last.x = f.end.x = evt.pageX || evt.clientX;
2836      f.start.y = f.last.y = f.end.y = evt.pageY || evt.clientY;
2837      fingerData[id] = f;
2838      return f;
2839    }
2840
2841    /**
2842     * Updates the finger data for a particular event object
2843     * @param {object} evt The event object containing the touch/finger data to upadte
2844     * @return a finger data object.
2845     * @inner
2846     */
2847    function updateFingerData(evt) {
2848      var id = evt.identifier !== undefined ? evt.identifier : 0;
2849      var f = getFingerData(id);
2850
2851      if (f === null) {
2852        f = createFingerData(id, evt);
2853      }
2854
2855      f.last.x = f.end.x;
2856      f.last.y = f.end.y;
2857
2858      f.end.x = evt.pageX || evt.clientX;
2859      f.end.y = evt.pageY || evt.clientY;
2860
2861      return f;
2862    }
2863
2864    /**
2865     * Returns a finger data object by its event ID.
2866     * Each touch event has an identifier property, which is used
2867     * to track repeat touches
2868     * @param {int} id The unique id of the finger in the sequence of touch events.
2869     * @return a finger data object.
2870     * @inner
2871     */
2872    function getFingerData(id) {
2873      return fingerData[id] || null;
2874    }
2875
2876
2877    /**
2878     * Sets the maximum distance swiped in the given direction.
2879     * If the new value is lower than the current value, the max value is not changed.
2880     * @param {string}  direction The direction of the swipe
2881     * @param {int}  distance The distance of the swipe
2882     * @inner
2883     */
2884    function setMaxDistance(direction, distance) {
2885      if(direction==NONE) return;
2886      distance = Math.max(distance, getMaxDistance(direction));
2887      maximumsMap[direction].distance = distance;
2888    }
2889
2890    /**
2891     * gets the maximum distance swiped in the given direction.
2892     * @param {string}  direction The direction of the swipe
2893     * @return int  The distance of the swipe
2894     * @inner
2895     */
2896    function getMaxDistance(direction) {
2897      if (maximumsMap[direction]) return maximumsMap[direction].distance;
2898      return undefined;
2899    }
2900
2901    /**
2902     * Creats a map of directions to maximum swiped values.
2903     * @return Object A dictionary of maximum values, indexed by direction.
2904     * @inner
2905     */
2906    function createMaximumsData() {
2907      var maxData = {};
2908      maxData[LEFT] = createMaximumVO(LEFT);
2909      maxData[RIGHT] = createMaximumVO(RIGHT);
2910      maxData[UP] = createMaximumVO(UP);
2911      maxData[DOWN] = createMaximumVO(DOWN);
2912
2913      return maxData;
2914    }
2915
2916    /**
2917     * Creates a map maximum swiped values for a given swipe direction
2918     * @param {string} The direction that these values will be associated with
2919     * @return Object Maximum values
2920     * @inner
2921     */
2922    function createMaximumVO(dir) {
2923      return {
2924        direction: dir,
2925        distance: 0
2926      }
2927    }
2928
2929
2930    //
2931    // MATHS / UTILS
2932    //
2933
2934    /**
2935     * Calculate the duration of the swipe
2936     * @return int
2937     * @inner
2938     */
2939    function calculateDuration() {
2940      return endTime - startTime;
2941    }
2942
2943    /**
2944     * Calculate the distance between 2 touches (pinch)
2945     * @param {point} startPoint A point object containing x and y co-ordinates
2946     * @param {point} endPoint A point object containing x and y co-ordinates
2947     * @return int;
2948     * @inner
2949     */
2950    function calculateTouchesDistance(startPoint, endPoint) {
2951      var diffX = Math.abs(startPoint.x - endPoint.x);
2952      var diffY = Math.abs(startPoint.y - endPoint.y);
2953
2954      return Math.round(Math.sqrt(diffX * diffX + diffY * diffY));
2955    }
2956
2957    /**
2958     * Calculate the zoom factor between the start and end distances
2959     * @param {int} startDistance Distance (between 2 fingers) the user started pinching at
2960     * @param {int} endDistance Distance (between 2 fingers) the user ended pinching at
2961     * @return float The zoom value from 0 to 1.
2962     * @inner
2963     */
2964    function calculatePinchZoom(startDistance, endDistance) {
2965      var percent = (endDistance / startDistance) * 1;
2966      return percent.toFixed(2);
2967    }
2968
2969
2970    /**
2971     * Returns the pinch direction, either IN or OUT for the given points
2972     * @return string Either {@link $.fn.swipe.directions.IN} or {@link $.fn.swipe.directions.OUT}
2973     * @see $.fn.swipe.directions
2974     * @inner
2975     */
2976    function calculatePinchDirection() {
2977      if (pinchZoom < 1) {
2978        return OUT;
2979      } else {
2980        return IN;
2981      }
2982    }
2983
2984
2985    /**
2986     * Calculate the length / distance of the swipe
2987     * @param {point} startPoint A point object containing x and y co-ordinates
2988     * @param {point} endPoint A point object containing x and y co-ordinates
2989     * @return int
2990     * @inner
2991     */
2992    function calculateDistance(startPoint, endPoint) {
2993      return Math.round(Math.sqrt(Math.pow(endPoint.x - startPoint.x, 2) + Math.pow(endPoint.y - startPoint.y, 2)));
2994    }
2995
2996    /**
2997     * Calculate the angle of the swipe
2998     * @param {point} startPoint A point object containing x and y co-ordinates
2999     * @param {point} endPoint A point object containing x and y co-ordinates
3000     * @return int
3001     * @inner
3002     */
3003    function calculateAngle(startPoint, endPoint) {
3004      var x = startPoint.x - endPoint.x;
3005      var y = endPoint.y - startPoint.y;
3006      var r = Math.atan2(y, x); //radians
3007      var angle = Math.round(r * 180 / Math.PI); //degrees
3008
3009      //ensure value is positive
3010      if (angle < 0) {
3011        angle = 360 - Math.abs(angle);
3012      }
3013
3014      return angle;
3015    }
3016
3017    /**
3018     * Calculate the direction of the swipe
3019     * This will also call calculateAngle to get the latest angle of swipe
3020     * @param {point} startPoint A point object containing x and y co-ordinates
3021     * @param {point} endPoint A point object containing x and y co-ordinates
3022     * @return string Either {@link $.fn.swipe.directions.LEFT} / {@link $.fn.swipe.directions.RIGHT} / {@link $.fn.swipe.directions.DOWN} / {@link $.fn.swipe.directions.UP}
3023     * @see $.fn.swipe.directions
3024     * @inner
3025     */
3026    function calculateDirection(startPoint, endPoint) {
3027
3028      if( comparePoints(startPoint, endPoint) ) {
3029        return NONE;
3030      }
3031
3032      var angle = calculateAngle(startPoint, endPoint);
3033
3034      if ((angle <= 45) && (angle >= 0)) {
3035        return LEFT;
3036      } else if ((angle <= 360) && (angle >= 315)) {
3037        return LEFT;
3038      } else if ((angle >= 135) && (angle <= 225)) {
3039        return RIGHT;
3040      } else if ((angle > 45) && (angle < 135)) {
3041        return DOWN;
3042      } else {
3043        return UP;
3044      }
3045    }
3046
3047
3048    /**
3049     * Returns a MS time stamp of the current time
3050     * @return int
3051     * @inner
3052     */
3053    function getTimeStamp() {
3054      var now = new Date();
3055      return now.getTime();
3056    }
3057
3058
3059
3060    /**
3061     * Returns a bounds object with left, right, top and bottom properties for the element specified.
3062     * @param {DomNode} The DOM node to get the bounds for.
3063     */
3064    function getbounds(el) {
3065      el = $(el);
3066      var offset = el.offset();
3067
3068      var bounds = {
3069        left: offset.left,
3070        right: offset.left + el.outerWidth(),
3071        top: offset.top,
3072        bottom: offset.top + el.outerHeight()
3073      }
3074
3075      return bounds;
3076    }
3077
3078
3079    /**
3080     * Checks if the point object is in the bounds object.
3081     * @param {object} point A point object.
3082     * @param {int} point.x The x value of the point.
3083     * @param {int} point.y The x value of the point.
3084     * @param {object} bounds The bounds object to test
3085     * @param {int} bounds.left The leftmost value
3086     * @param {int} bounds.right The righttmost value
3087     * @param {int} bounds.top The topmost value
3088     * @param {int} bounds.bottom The bottommost value
3089     */
3090    function isInBounds(point, bounds) {
3091      return (point.x > bounds.left && point.x < bounds.right && point.y > bounds.top && point.y < bounds.bottom);
3092    };
3093
3094    /**
3095     * Checks if the two points are equal
3096     * @param {object} point A point object.
3097     * @param {object} point B point object.
3098     * @return true of the points match
3099     */
3100    function comparePoints(pointA, pointB) {
3101      return (pointA.x == pointB.x && pointA.y == pointB.y);
3102    }
3103
3104
3105  }
3106
3107
3108
3109
3110  /**
3111   * A catch all handler that is triggered for all swipe directions.
3112   * @name $.fn.swipe#swipe
3113   * @event
3114   * @default null
3115   * @param {EventObject} event The original event object
3116   * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions}
3117   * @param {int} distance The distance the user swiped
3118   * @param {int} duration The duration of the swipe in milliseconds
3119   * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers}
3120   * @param {object} fingerData The coordinates of fingers in event
3121   * @param {string} currentDirection The current direction the user is swiping.
3122   */
3123
3124
3125
3126
3127  /**
3128   * A handler that is triggered for "left" swipes.
3129   * @name $.fn.swipe#swipeLeft
3130   * @event
3131   * @default null
3132   * @param {EventObject} event The original event object
3133   * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions}
3134   * @param {int} distance The distance the user swiped
3135   * @param {int} duration The duration of the swipe in milliseconds
3136   * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers}
3137   * @param {object} fingerData The coordinates of fingers in event
3138   * @param {string} currentDirection The current direction the user is swiping.
3139   */
3140
3141  /**
3142   * A handler that is triggered for "right" swipes.
3143   * @name $.fn.swipe#swipeRight
3144   * @event
3145   * @default null
3146   * @param {EventObject} event The original event object
3147   * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions}
3148   * @param {int} distance The distance the user swiped
3149   * @param {int} duration The duration of the swipe in milliseconds
3150   * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers}
3151   * @param {object} fingerData The coordinates of fingers in event
3152   * @param {string} currentDirection The current direction the user is swiping.
3153   */
3154
3155  /**
3156   * A handler that is triggered for "up" swipes.
3157   * @name $.fn.swipe#swipeUp
3158   * @event
3159   * @default null
3160   * @param {EventObject} event The original event object
3161   * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions}
3162   * @param {int} distance The distance the user swiped
3163   * @param {int} duration The duration of the swipe in milliseconds
3164   * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers}
3165   * @param {object} fingerData The coordinates of fingers in event
3166   * @param {string} currentDirection The current direction the user is swiping.
3167   */
3168
3169  /**
3170   * A handler that is triggered for "down" swipes.
3171   * @name $.fn.swipe#swipeDown
3172   * @event
3173   * @default null
3174   * @param {EventObject} event The original event object
3175   * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions}
3176   * @param {int} distance The distance the user swiped
3177   * @param {int} duration The duration of the swipe in milliseconds
3178   * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers}
3179   * @param {object} fingerData The coordinates of fingers in event
3180   * @param {string} currentDirection The current direction the user is swiping.
3181   */
3182
3183  /**
3184   * A handler triggered for every phase of the swipe. This handler is constantly fired for the duration of the pinch.
3185   * This is triggered regardless of swipe thresholds.
3186   * @name $.fn.swipe#swipeStatus
3187   * @event
3188   * @default null
3189   * @param {EventObject} event The original event object
3190   * @param {string} phase The phase of the swipe event. See {@link $.fn.swipe.phases}
3191   * @param {string} direction The direction the user swiped in. This is null if the user has yet to move. See {@link $.fn.swipe.directions}
3192   * @param {int} distance The distance the user swiped. This is 0 if the user has yet to move.
3193   * @param {int} duration The duration of the swipe in milliseconds
3194   * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers}
3195   * @param {object} fingerData The coordinates of fingers in event
3196   * @param {string} currentDirection The current direction the user is swiping.
3197   */
3198
3199  /**
3200   * A handler triggered for pinch in events.
3201   * @name $.fn.swipe#pinchIn
3202   * @event
3203   * @default null
3204   * @param {EventObject} event The original event object
3205   * @param {int} direction The direction the user pinched in. See {@link $.fn.swipe.directions}
3206   * @param {int} distance The distance the user pinched
3207   * @param {int} duration The duration of the swipe in milliseconds
3208   * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers}
3209   * @param {int} zoom The zoom/scale level the user pinched too, 0-1.
3210   * @param {object} fingerData The coordinates of fingers in event
3211   */
3212
3213  /**
3214   * A handler triggered for pinch out events.
3215   * @name $.fn.swipe#pinchOut
3216   * @event
3217   * @default null
3218   * @param {EventObject} event The original event object
3219   * @param {int} direction The direction the user pinched in. See {@link $.fn.swipe.directions}
3220   * @param {int} distance The distance the user pinched
3221   * @param {int} duration The duration of the swipe in milliseconds
3222   * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers}
3223   * @param {int} zoom The zoom/scale level the user pinched too, 0-1.
3224   * @param {object} fingerData The coordinates of fingers in event
3225   */
3226
3227  /**
3228   * A handler triggered for all pinch events. This handler is constantly fired for the duration of the pinch. This is triggered regardless of thresholds.
3229   * @name $.fn.swipe#pinchStatus
3230   * @event
3231   * @default null
3232   * @param {EventObject} event The original event object
3233   * @param {int} direction The direction the user pinched in. See {@link $.fn.swipe.directions}
3234   * @param {int} distance The distance the user pinched
3235   * @param {int} duration The duration of the swipe in milliseconds
3236   * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers}
3237   * @param {int} zoom The zoom/scale level the user pinched too, 0-1.
3238   * @param {object} fingerData The coordinates of fingers in event
3239   */
3240
3241  /**
3242   * A click handler triggered when a user simply clicks, rather than swipes on an element.
3243   * This is deprecated since version 1.6.2, any assignment to click will be assigned to the tap handler.
3244   * You cannot use <code>on</code> to bind to this event as the default jQ <code>click</code> event will be triggered.
3245   * Use the <code>tap</code> event instead.
3246   * @name $.fn.swipe#click
3247   * @event
3248   * @deprecated since version 1.6.2, please use {@link $.fn.swipe#tap} instead
3249   * @default null
3250   * @param {EventObject} event The original event object
3251   * @param {DomObject} target The element clicked on.
3252   */
3253
3254  /**
3255   * A click / tap handler triggered when a user simply clicks or taps, rather than swipes on an element.
3256   * @name $.fn.swipe#tap
3257   * @event
3258   * @default null
3259   * @param {EventObject} event The original event object
3260   * @param {DomObject} target The element clicked on.
3261   */
3262
3263  /**
3264   * A double tap handler triggered when a user double clicks or taps on an element.
3265   * You can set the time delay for a double tap with the {@link $.fn.swipe.defaults#doubleTapThreshold} property.
3266   * Note: If you set both <code>doubleTap</code> and <code>tap</code> handlers, the <code>tap</code> event will be delayed by the <code>doubleTapThreshold</code>
3267   * as the script needs to check if its a double tap.
3268   * @name $.fn.swipe#doubleTap
3269   * @see  $.fn.swipe.defaults#doubleTapThreshold
3270   * @event
3271   * @default null
3272   * @param {EventObject} event The original event object
3273   * @param {DomObject} target The element clicked on.
3274   */
3275
3276  /**
3277   * A long tap handler triggered once a tap has been release if the tap was longer than the longTapThreshold.
3278   * You can set the time delay for a long tap with the {@link $.fn.swipe.defaults#longTapThreshold} property.
3279   * @name $.fn.swipe#longTap
3280   * @see  $.fn.swipe.defaults#longTapThreshold
3281   * @event
3282   * @default null
3283   * @param {EventObject} event The original event object
3284   * @param {DomObject} target The element clicked on.
3285   */
3286
3287  /**
3288   * A hold tap handler triggered as soon as the longTapThreshold is reached
3289   * You can set the time delay for a long tap with the {@link $.fn.swipe.defaults#longTapThreshold} property.
3290   * @name $.fn.swipe#hold
3291   * @see  $.fn.swipe.defaults#longTapThreshold
3292   * @event
3293   * @default null
3294   * @param {EventObject} event The original event object
3295   * @param {DomObject} target The element clicked on.
3296   */
3297
3298}));
3299
3300// Trenner zum Einfügen eines Semikolons für Extensions
3301;
3302// Globalen Namespace definieren:
3303var Gw = Gw || {};
3304
3305/**
3306 *
3307 *d
3308 * @returns {{addValidation: addValidation}}
3309 * @constructor
3310 */
3311Gw.FrontendTranslation = function () {
3312
3313  jQuery.validator.addMethod("data-kvnumber", function(value, element) {
3314    if (this.optional(element)) return true;
3315    if (/^[a-z]/i.test(value)) {
3316      if (!/^[0-9]+$/.test(value.slice(1))) return false;
3317
3318      let m = value.match(/^([A-Z]{1})([\d]{8})([\d]{1})$/);
3319      if (m) {
3320        let cardNo = ('0' + (m[1].charCodeAt(0)-64)).slice(-2) + m[2];
3321        let sum = 0;
3322        for (let i = 0; i < 10; i++) {
3323          let d = cardNo[i];
3324          if (i % 2 == 1) d *= 2;
3325          if (d > 9) d -= 9;
3326          sum += parseInt(d);
3327        }
3328        return sum % 10 == m[3];
3329      }
3330      return false;
3331    } else {
3332      return /^[0-9]+$/.test(value) && Number.parseInt(value.slice(0,2)) < 19;
3333    }
3334  });
3335
3336  jQuery.validator.addMethod("data-rvnumber", function(value, element) {
3337    if (this.optional(element)) return true;
3338    if (!/^[0-9]{8}[A-Z][0-9]{3}$/i.test(value)) return false;
3339    const checkNumber = Number(value[11]);
3340    const letterValue = String(value.charCodeAt(8) - 64).padStart(2, '0');
3341    const numberWithoutCheck = value.slice(0, 8) + letterValue + value.slice(9, 11);
3342    const multiplicators = [2, 1, 2, 5, 7, 1, 2, 1, 2, 1, 2, 1];
3343    let sum = 0;
3344    for (let i = 0; i < numberWithoutCheck.length; i++) {
3345      let num = Number(numberWithoutCheck[i]) * multiplicators[i];
3346      if (num > 9) {
3347        num = Math.floor(num / 10) + (num % 10);
3348      }
3349      sum += num;
3350    }
3351    return sum % 10 === checkNumber;
3352  });
3353
3354  jQuery.validator.addMethod("data-birthname", function(value, element) {
3355    if (this.optional(element)) return true;
3356    const firstname = element.dataset.firstname ?? '';
3357    return !value.includes(firstname);
3358  });
3359
3360  jQuery.validator.addMethod("data-friendlycaptcha", function(value, element) {
3361    return !value.startsWith('.');
3362  });
3363
3364  jQuery.validator.addMethod("data-companynumber", function(value, element) {
3365    if (this.optional(element)) return true;
3366    if (value === '20156168') return false;
3367    return true;
3368  });
3369
3370  let defaultMessageKeys = [
3371    'required',
3372    'remote',
3373    'email',
3374    'url',
3375    'date',
3376    'dateISO',
3377    'number',
3378    'digits',
3379    'equalTo',
3380    'accept',
3381    'data-kvnumber',
3382    'data-rvnumber',
3383    'data-birthname',
3384    'data-friendlycaptcha',
3385    'data-companynumber'
3386  ];
3387  let defaultFormattedMessageKeys = [
3388    'maxlength',
3389    'minlength',
3390    'rangelength',
3391    'range',
3392    'max',
3393    'min'
3394  ];
3395
3396  function createDefaultMessages (translations)
3397  {
3398    let messages = {};
3399    const defaultTranslation = translations['default']['default'];
3400    defaultMessageKeys.forEach(function (messageKey) {
3401      if (!translations[messageKey] || !translations[messageKey]['default']) {
3402        messages[messageKey] = defaultTranslation;
3403        return;
3404      }
3405      messages[messageKey] = translations[messageKey]['default'];
3406    });
3407    defaultFormattedMessageKeys.forEach(function (messageKey) {
3408      if (!translations[messageKey] || !translations[messageKey]['default']) {
3409        messages[messageKey] = defaultTranslation;
3410        return;
3411      }
3412      messages[messageKey] = jQuery.validator.format(translations[messageKey]['default'].replace('%s', '{0}'));
3413    });
3414    return messages;
3415  }
3416
3417  function setDefaultMessages (messages)
3418  {
3419    $.validator.messages = messages;
3420  }
3421
3422  function createElementSpecificMessages (translations, formName)
3423  {
3424    let messages = {};
3425    for (let validatorKey in translations) {
3426      if (!translations.hasOwnProperty(validatorKey)) {
3427        continue;
3428      }
3429      let validatorTranslations = translations[validatorKey];
3430      for (let elementKey in validatorTranslations) {
3431        if (elementKey === 'default') {
3432          continue;
3433        }
3434        if (!validatorTranslations.hasOwnProperty(elementKey)) {
3435          continue;
3436        }
3437        let translationString = validatorTranslations[elementKey];
3438        let formElementName = formName + '[' + elementKey + ']';
3439        if (!messages[formElementName]) {
3440          messages[formElementName] = {[validatorKey]: translationString};
3441        } else {
3442          messages[formElementName] = {...messages[formElementName], [validatorKey]: translationString};
3443        }
3444      }
3445    }
3446    return messages;
3447  }
3448
3449
3450  return {
3451    addValidation: function (form, translations, options)
3452    {
3453      setDefaultMessages(createDefaultMessages(translations));
3454      const formName = 'tx_form_formframework[' + form.id + ']';
3455      const specifcMessages = createElementSpecificMessages(translations, formName);
3456      const rules = {};
3457      $(form).find('[data-kvnumber]').each(function (index, element) {
3458        rules[element.name] = {'data-kvnumber': true};
3459      });
3460      $(form).find('[name="frc-captcha-response"]').each(function (index, element) {
3461        rules[element.name] = {'data-friendlycaptcha': true};
3462      });
3463      return $(form).validate({
3464        rules: rules,
3465        ignore: ':hidden:not([name="frc-captcha-response"])',
3466        messages: specifcMessages,
3467        errorPlacement: function ($error, $element) {
3468          // Ausgabe für Checkboxen
3469          if ($element.hasClass('c-form__checkbox')) {
3470            $element.parents('.form-check').parent().append($error);
3471            $error.addClass('c-form__label');
3472            return;
3473          }
3474          // Ausgabe für Felder mit floating Labels
3475          if ($element.parent('.c-form__group').hasClass('form-floating')) {
3476            $element.parent('.c-form__group').append($error);
3477            $error.addClass('c-form__label');
3478            return;
3479          }
3480          // Ausgabe für Radio
3481          if ($element.hasClass('c-form__radio')) {
3482            $element.parents('.form-check').parent().append($error);
3483            $error.addClass('c-form__label');
3484            return;
3485          }
3486          // Ausgabe für Friendly Captcha
3487          if ($element.attr('name') === 'frc-captcha-response') {
3488            $element.parent().parent().append($error);
3489            $error.addClass('c-form__label');
3490            return;
3491          }
3492          // Standardsausgabe
3493          $error.insertAfter($element);
3494          $error.addClass('c-form__label');
3495        },
3496        ...options
3497      });
3498    }
3499  };
3500}();
3501
3502/**
3503 * Initialisierung und Anpassung von JS-Komponenten
3504 *
3505 */
3506
3507jQuery(document).ready(function ($) {
3508
3509  // --------------------------------------------
3510  // -- GW Contentelements Logik ----------------------
3511  // --------------------------------------------
3512
3513  // Modale Fenster auch auf link setzten, die auf den HashTag verlinken
3514  $('.modal-dialog').each(function () {
3515    var id = $(this).parent().attr("id");
3516    var tags = $("a[href$='#" + id + "']");
3517    tags.data('modal-id', id);
3518    tags.on('click', function (e) {
3519      $('.modal', $('#' + $(this).data('modal-id'))).modal('show');
3520      e.preventDefault();
3521    });
3522  });
3523
3524  // Play/Pause Button für Carousel
3525  $('.c-carousel .js-carousel-stop').on('click', function (e) {
3526    // Aktuelles Button Icon = Pause? => Pause
3527    if ($('.bi-pause-circle-fill', this).length) {
3528      $(this).closest('.carousel').carousel('pause');
3529      $('span', this)
3530        .removeClass('bi-pause-circle-fill')
3531        .addClass('bi-play-circle-fill');
3532    } else {
3533      // Sonst wieder abspielen
3534      $(this).closest('.carousel').carousel('cycle');
3535      $('span', this)
3536        .addClass('bi-pause-circle-fill')
3537        .removeClass('bi-play-circle-fill');
3538    }
3539
3540    e.preventDefault();
3541  });
3542
3543  // Tooltip
3544  $('.link-tooltip').tooltip({'placement': 'top', 'trigger': 'hover'});
3545
3546  // Popovers
3547  $('.link-popover').popover({'placement': 'top', 'trigger': 'hover'});
3548
3549  // Akkordeon: C-Panels dekorieren
3550  // ----------------------------------------------
3551  $('.c-panel__collapse.in').each(function () {
3552    $(this).parent().find('.c-panel__icon').addClass('icon-close');
3553    $(this).parent().find('.c-panel__icon').removeClass('icon-open');
3554  });
3555  // Auf- / Zuklappen
3556  $('.c-panel__collapse').on('show.bs.collapse', function () {
3557    $(this).parent().find('.c-panel__icon').addClass('icon-close');
3558    $(this).parent().find('.c-panel__icon').removeClass('icon-open');
3559  });
3560  $('.c-panel__collapse').on('hide.bs.collapse', function () {
3561    $(this).parent().find('.c-panel__icon').removeClass('icon-close');
3562    $(this).parent().find('.c-panel__icon').addClass('icon-open');
3563  });
3564
3565});
3566
3567// Globalen Namespace definieren:
3568var Gw = Gw || {};
3569
3570/**
3571 * Klasse zum Verwalten von Cookies
3572 *
3573 * @returns {{getItem: getItem, setItem: setItem, removeItem: removeItem, hasItem: hasItem, topHost}}
3574 * @constructor
3575 */
3576Gw.Cookies = function () {
3577  var object = {
3578
3579    /**
3580     * Liefert den Wert eines Cookies oder null falls nicht vorhanden
3581     *
3582     * @param sKey Cookie-Name
3583     * @returns {string|null}
3584     */
3585    getItem: function (sKey) {
3586      return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null;
3587    },
3588
3589    /**
3590     * Setzt ein Cookie
3591     *
3592     * @param sKey Cookie-Name
3593     * @param sValue Cookie-Wert
3594     * @param vEnd [Optional] Lebensdauer
3595     *    Number: Sekunden, bis das Cookie abläuft, oder Infinity, wenn es nie abläuft
3596     *    String: Eigene Zeichenkette für expires
3597     *    Date: Datum, wenn das Cookie abläuft
3598     *    else: Session Cookie
3599     * @param sPath [Optional] Pfad, für den das Cookie gesetzt ist
3600     * @param sDomain [Optional] Domain, für die das Cookie gesetzt ist
3601     * @param bSecure [Optional] Nur über sichere Verbindung übertragen?
3602     *
3603     * @returns {boolean} True, wenn es sich um einen gültigen sKey handelt
3604     */
3605    setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) {
3606      if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) {
3607        return false;
3608      }
3609      var sExpires = "";
3610      if (vEnd) {
3611        switch (vEnd.constructor) {
3612          case Number:
3613            sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd;
3614            break;
3615          case String:
3616            sExpires = "; expires=" + vEnd;
3617            break;
3618          case Date:
3619            sExpires = "; expires=" + vEnd.toUTCString();
3620            break;
3621        }
3622      }
3623      document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : "");
3624      return true;
3625    },
3626
3627    /**
3628     * Löscht ein Cookie
3629     *
3630     * @param sKey Cookie-Name
3631     * @param sPath [Optional] Pfad
3632     * @param sDomain [Optional] Domain
3633     *
3634     * @returns {boolean} true falls das Cookie vorhanden war und gelöscht wurde, sonst false
3635     */
3636    removeItem: function (sKey, sPath, sDomain) {
3637      if (!sKey || !this.hasItem(sKey)) {
3638        return false;
3639      }
3640      document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "");
3641      return true;
3642    },
3643
3644    /**
3645     * Prüft, ob ein Cookie vorhanden ist
3646     *
3647     * @param sKey Cookie-Name
3648     * @returns {boolean}
3649     */
3650    hasItem: function (sKey) {
3651      return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie);
3652    }
3653
3654  };
3655
3656  object.topHost = document.location.hostname.replace(/.*?([^\.]+\.[a-z0-9-]+)$/, "$1");
3657
3658  return object;
3659}();
3660
3661(function (document, history, location, $) {
3662  var HISTORY_SUPPORT = !!(history && history.pushState);
3663
3664  var pageHeaderHeight = $(".page-header").height();
3665  var anchorScrolls = {
3666    OFFSET_HEIGHT_PX: pageHeaderHeight,
3667    validAnchorPatterns: [
3668      /^#c[0-9]+$/
3669    ],
3670
3671    /**
3672     * Events intialisieren und ggf, zu dem gegebenen Hash scrollen
3673     */
3674    init: function () {
3675      this.scrollToCurrent();
3676      $(window).on('hashchange', $.proxy(this, 'scrollToCurrent'));
3677      $('body').on('click', 'a', $.proxy(this, 'delegateAnchors'));
3678    },
3679
3680    /**
3681     * Gibt das Offset zurück
3682     */
3683    getFixedOffset: function () {
3684      var offset = Gw.pageOffset ? parseInt(Gw.pageOffset()) : 0;
3685      return offset + this.OFFSET_HEIGHT_PX;
3686    },
3687
3688    /**
3689     * Gibt true zurück, wenn der übergebene Hash ein gültiges Format besitzt.
3690     *
3691     * @param hash
3692     * @returns {boolean}
3693     */
3694    isValidHashForAnchor: function (hash) {
3695      var patterns = this.validAnchorPatterns;
3696      if (Gw.getValidAnchorPatterns) {
3697        patterns = patterns.concat(Gw.getValidAnchorPatterns());
3698      }
3699      for (var it in patterns) {
3700        if (patterns[it].test(hash)) {
3701          return true;
3702        }
3703      }
3704      return patterns.length === 0;
3705    },
3706
3707    /**
3708     * Gibt true zurück, wenn die übergebene URL, eine URL für die aktuelle Seite (+ggf. Hash) ist
3709     * @param href URL
3710     * @returns {boolean}
3711     */
3712    isAnchorForCurrentUrl: function (href) {
3713      var url = href.replace(/(#.+?)$/, '');
3714      if (url.length > 0 && location.href.indexOf(url) === -1) {
3715        return false;
3716      }
3717      return href.indexOf('#') !== -1;
3718    },
3719
3720    /**
3721     * Wenn href ein Anker für die aktuelle Seite ist, zu diesem scrollen.
3722     *
3723     * @param  {String} href
3724     * @param pushToHistory Eintrag in die History?
3725     * @return {Boolean} - Was the href an anchor.
3726     */
3727    scrollIfAnchor: function (href, pushToHistory) {
3728      var $match, anchorOffset;
3729
3730      if (!href || !this.isAnchorForCurrentUrl(href)) {
3731        return false;
3732      }
3733
3734      var hash = href.substr(href.indexOf('#'));
3735      if (!this.isValidHashForAnchor(hash)) {
3736        return false;
3737      }
3738
3739      $match = $(hash);
3740      if ($match.length) {
3741        // fix für navbar, die den content verschiebt
3742        var $nav = $('.c-navbar').css('position', 'fixed');
3743        anchorOffset = $match.offset().top - this.getFixedOffset();
3744        $nav.css('position', '');
3745        $('html, body').animate({scrollTop: anchorOffset});
3746
3747        // Add the state to history as-per normal anchor links
3748        if (HISTORY_SUPPORT && pushToHistory) {
3749          history.pushState({}, document.title, href);
3750        }
3751      }
3752
3753      return !!$match.length;
3754    },
3755
3756    /**
3757     * Zum aktuellen Anker scrollen.
3758     */
3759    scrollToCurrent: function () {
3760      return this.scrollIfAnchor(window.location.hash, false);
3761    },
3762
3763    /**
3764     * Event Handler für die Anker.
3765     */
3766    delegateAnchors: function (e) {
3767      var elem = e.currentTarget;
3768
3769      if (
3770        elem.nodeName === 'A' &&
3771        this.scrollIfAnchor(elem.getAttribute('href'), true)
3772      ) {
3773        e.preventDefault();
3774      }
3775    }
3776  };
3777
3778  $(document).ready($.proxy(anchorScrolls, 'init'));
3779})(window.document, window.history, window.location, jQuery);
3780
3781/**
3782 * Hilfsdatei für Übersetzungen
3783 *
3784 * Per HTML können Elemente in der Form:
3785 *  <div data-gwtranslate-key="key" data-gwtranslate-value="value"></div>
3786 * definiert werden.
3787 *
3788 * Später kann dann mithilfe von
3789 *  Gw.Translate.get('key')
3790 * darauf zugegriffen werden.
3791 *
3792 */
3793
3794// Globalen Namespace definieren:
3795var Gw = Gw || {};
3796
3797jQuery(function ($) {
3798  /**
3799   * Übsetzungsobjekt zum Zugriff über Javascript
3800   * @type {Translate}
3801   */
3802  Gw.Translate = (function () {
3803    var data = {};
3804
3805    // Konstruktor => Übersetzungen aus HTML importieren
3806    $('[data-gwtranslate-key][data-gwtranslate-value]').each(function () {
3807      var translation = $(this);
3808      var key = translation.attr('data-gwtranslate-key');
3809      data[key] = translation.attr('data-gwtranslate-value');
3810      translation.remove();
3811    });
3812
3813    // Getter und Setter zurückliefern
3814    return {
3815      set: function (key, value) {
3816        data[key] = value;
3817      }, get: function (key) {
3818        return data[key];
3819      }
3820    };
3821  })();
3822});
3823
3824
3825// Globalen Namespace definieren:
3826var Gw = Gw || {};
3827
3828/**
3829 * Klasse zum Abarbeiten von verschiedenen Viewports
3830 *
3831 * Utility-Klasse, die das Abfragen des Client Viewports übernimmt.
3832 *
3833 * @type {{hasChanged, equalsXs, equalsSm, equalsMd, equalsLg, minXs, minSm, minMd, minLg, maxXs, maxSm, maxMd, maxLg}}
3834 */
3835Gw.Viewport = (function () {
3836  /**
3837   * Konstanten-Objekt, dass verschiedene Viewportgrößen zurückgibt.
3838   *
3839   * @type {{get}}
3840   */
3841  var sizes = (function () {
3842    /**
3843     * Eigentliche Viewport, denen ein Integer aufsteigender Reihenfolge zugewiesen wird
3844     *
3845     * Jeder Viewport hat einen Namen zum Zugriff (bspw. xs), dem eine eindeutige Zahl gewiesen wird. Diese
3846     * Zahl repräsentiert die Größe des Bildschirm, der kleinste Viewport hat also die kleinste Zahl.
3847     *
3848     * @type {{xss: number, xs: number, sm: number, md number, lg: number, xl: number, xxl: number, xxxl: number}}
3849     */
3850    var viewportOrderList = {
3851      'xxs': 0,
3852      'xs': 1,
3853      'sm': 2,
3854      'md': 3,
3855      'lg': 4,
3856      'xl': 5,
3857      'xxl': 6,
3858      'xxxl': 7,
3859    };
3860
3861    return {
3862      /**
3863       * Getter Methode zum Zugriff auf die privaten Viewport-Größen.
3864       *
3865       * @param value String Identifiert des Viewports (z.b. xs)
3866       * @returns number
3867       */
3868      getComparableValue: function (value) {
3869        return viewportOrderList[value];
3870      }
3871    };
3872  })();
3873
3874
3875  /**
3876   * Aktueller Viewport des Users
3877   *
3878   * Der Viewport wird inital auf "" gestellt und mithilfe von refreshViewport aktualisiert.
3879   * @type {string}
3880   */
3881  var windowViewport = "";
3882
3883  /**
3884   * Aktualisiert den Viewport
3885   *
3886   * Der Viewport wird aus dem body:before Tag ausgelesen. Die Logik für den eigentlichen
3887   * Viewport kommt daher direkt aus dem Less, es ist keien Abfrage der Bildschirmgröße nötig.
3888   *
3889   */
3890  var refreshViewport = function () {
3891    if (!document.body) {
3892      // Mobile first
3893      return sizes.getComparableValue('xxs');
3894    }
3895    var computedStyle = window.getComputedStyle(document.body, ':before');
3896    windowViewport = computedStyle.getPropertyValue('content').replace(/\"/g, '');
3897  };
3898
3899  /**
3900   * Funktion zum Überprüfen, ob sich der Viewport geändert hat.
3901   * @returns {boolean}
3902   */
3903  var hasChanged = function () {
3904    var lastViewport = windowViewport;
3905    refreshViewport();
3906    return lastViewport !== windowViewport;
3907  };
3908
3909  // Viewport initalisieren
3910  refreshViewport();
3911
3912  return {
3913    /**
3914     * true, falls sich der Viewport seit dem letzten Test geändert hat
3915     *
3916     * @returns {boolean}
3917     */
3918    hasChanged: function () {
3919      return hasChanged();
3920    },
3921
3922    /**
3923     * Überprüft, ob der Viewport des Users genau 'xxs' (Smartphone) entspricht
3924     *
3925     * @returns {boolean} wahr, falls der Viewport xxs ist
3926     */
3927    isXxs: function () {
3928      return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('xxs');
3929    },
3930
3931    /**
3932     * Überprüft, ob der Viewport des Users genau 'xs' (Smartphone) entspricht
3933     *
3934     * @returns {boolean} wahr, falls der Viewport xs ist
3935     */
3936    isXs: function () {
3937      return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('xs');
3938    },
3939
3940    /**
3941     * Überprüft, ob der Viewport des Users genau 'sm' (Tablet) entspricht
3942     *
3943     * @returns {boolean} wahr, falls der Viewport sm ist
3944     */
3945    isSm: function () {
3946      return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('sm');
3947    },
3948
3949    /**
3950     * Überprüft, ob der Viewport des Users genau 'md' (Desktop) entspricht
3951     *
3952     * @returns {boolean} wahr, falls der Viewport md ist
3953     */
3954    isMd: function () {
3955      return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('md');
3956    },
3957
3958    /**
3959     * Überprüft, ob der Viewport des Users genau 'lg' (Large Desktop) entspricht
3960     *
3961     * @returns {boolean} wahr, falls der Viewport lg ist
3962     */
3963    isLg: function () {
3964      return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('lg');
3965    },
3966
3967    /**
3968     * Überprüft, ob der Viewport des Users genau 'xl' (UHD Desktop) entspricht
3969     *
3970     * @returns {boolean} wahr, falls der Viewport xl ist
3971     */
3972    isXl: function () {
3973      return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('xl');
3974    },
3975
3976    /**
3977     * Überprüft, ob der Viewport des Users genau 'xxl' entspricht
3978     *
3979     * @returns {boolean} wahr, falls der Viewport xxl ist
3980     */
3981    isXxl: function () {
3982      return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('xxl');
3983    },
3984
3985    /**
3986     * Überprüft, ob der Viewport des Users genau 'xxxl' entspricht
3987     *
3988     * @returns {boolean} wahr, falls der Viewport xxxl ist
3989     */
3990    isXxxl: function () {
3991      return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('xxxl');
3992    },
3993
3994    /**
3995     * Überprüft, ob der Viewport des Users 'xs' (Smartphone) oder einem größen Viewport entspricht
3996     *
3997     * @returns {boolean} wahr, falls der mindestens Viewport sm entspricht
3998     */
3999    isXsUp: function () {
4000      return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('xs');
4001    },
4002
4003    /**
4004     * Überprüft, ob der Viewport des Users 'sm' (Tablet) oder einem größen Viewport entspricht
4005     *
4006     * @returns {boolean} wahr, falls der mindestens Viewport sm entspricht
4007     */
4008    isSmUp: function () {
4009      return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('sm');
4010    },
4011
4012    /**
4013     * Überprüft, ob der Viewport des Users 'md' (Desktop) oder einem größen Viewport entspricht
4014     *
4015     * @returns {boolean} wahr, falls der mindestens Viewport md entspricht
4016     */
4017    isMdUp: function () {
4018      return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('md');
4019    },
4020
4021    /**
4022     * Überprüft, ob der Viewport des Users 'lg' (Desktop Large) oder einem größen Viewport entspricht
4023     *
4024     * @returns {boolean} wahr, falls der mindestens Viewport lg entspricht
4025     */
4026    isLgUp: function () {
4027      return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('lg');
4028    },
4029
4030    /**
4031     * Überprüft, ob der Viewport des Users 'xl' (UHD Desktop) oder einem größen Viewport entspricht
4032     *
4033     * @returns {boolean} wahr, falls der mindestens Viewport xl entspricht
4034     */
4035    isXlUp: function () {
4036      return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('xl');
4037    },
4038
4039    /**
4040     * Überprüft, ob der Viewport des Users 'xxl' oder einem größen Viewport entspricht
4041     *
4042     * @returns {boolean} wahr, falls der mindestens Viewport xxl entspricht
4043     */
4044    isXxlUp: function () {
4045      return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('xxl');
4046    },
4047
4048    /**
4049     * Überprüft, ob der Viewport des Users 'xxxl' oder einem größen Viewport entspricht
4050     *
4051     * @returns {boolean} wahr, falls der mindestens Viewport xxxl entspricht
4052     */
4053    isXxxlUp: function () {
4054      return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('xxxl');
4055    },
4056
4057    /**
4058     * Überprüft, ob der Viewport des Users 'xs' (Smartphone) entpsricht
4059     *
4060     * @returns {boolean} wahr, falls der maximal Viewport xs entspricht
4061     */
4062    isXsDown: function () {
4063      return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('xs');
4064    },
4065
4066    /**
4067     * Überprüft, ob der Viewport des Users 'sm' (Tablet) oder einem kleineren Viewport entspricht
4068     *
4069     * @returns {boolean} wahr, falls der maximal Viewport sm entspricht
4070     */
4071    isSmDown: function () {
4072      return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('sm');
4073    },
4074
4075    /**
4076     * Überprüft, ob der Viewport des Users 'md' (Desktop) oder einem kleineren Viewport entspricht
4077     *
4078     * @returns {boolean} wahr, falls der maximal Viewport md entspricht
4079     */
4080    isMdDown: function () {
4081      return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('md');
4082    },
4083
4084    /**
4085     * Überprüft, ob der Viewport des Users 'lg' (Desktop Large) oder einem kleineren Viewport entspricht
4086     *
4087     * @returns {boolean} wahr, falls der maximal Viewport md entspricht
4088     */
4089    isLgDown: function () {
4090      return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('lg');
4091    },
4092
4093    /**
4094     * Überprüft, ob der Viewport des Users 'xl' (UHD Desktop) oder einem kleineren Viewport entspricht
4095     *
4096     * @returns {boolean} wahr, falls der maximal Viewport xl entspricht
4097     */
4098    isXlDown: function () {
4099      return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('xl');
4100    },
4101
4102    /**
4103     * Überprüft, ob der Viewport des Users 'xxl' oder einem kleineren Viewport entspricht
4104     *
4105     * @returns {boolean} wahr, falls der maximal Viewport xxl entspricht
4106     */
4107    isXxlDown: function () {
4108      return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('xxl');
4109    },
4110
4111    /**
4112     * Überprüft, ob der Viewport des Users 'xxl' oder einem kleineren Viewport entspricht
4113     *
4114     * @returns {boolean} wahr, falls der maximal Viewport xxxl entspricht
4115     */
4116    isXxxlDown: function () {
4117      return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('xxxl');
4118    },
4119
4120    /**
4121     * Gibt den Viewport zurück.
4122     *
4123     * @notice Bitte nur dann nutzen, wenn alle anderen Methoden nicht ausreichen!
4124     * @returns {string} Identifier des aktuellen Viewports
4125     */
4126    get: function () {
4127      return windowViewport;
4128    }
4129  };
4130}());
4131
4132
4133/**
4134 * Resize Event abfangen, um ggf. eigenes Event zum Anpassen des Viewports zu senden.
4135 *
4136 * gw_viewportChanged wird gesendet, sobald sich der Viewport geändert hat. Somit kann an andere Stelle auf
4137 * dieses Event gehört werden, um ein einheitliches Handling von Änderungen am Viewport zu ändern
4138 *
4139 * Beispiel:
4140 * $(window).on('gw_viewportChanged', function () {
4141 *	 if(Gw.Viewport.isSm()) {
4142 *  	console.log("Viewport = SM");
4143 *   } else if(Gw.Viewport.minSm()) {
4144 *      console.log("Viewport >= SM");
4145 *   }
4146 * });
4147 *
4148 * @todo ggf. Hinzufügen wenn Gerät gedreht wird etc.
4149 */
4150jQuery(window).on('resize orientationchange', function () {
4151  if (Gw.Viewport.hasChanged()) {
4152    jQuery(window).trigger('gw_viewportChanged');
4153  }
4154});
4155
4156// Event nach dem Laden der Seite abfeuern, allerdings erst nachdem alle .ready(...) Events abgearbeitet wurden
4157// Jquery(window).on('load', ...) wird also nach .ready() abgefeuert
4158jQuery(window).on('load', function () {
4159  jQuery(window).triggerHandler('gw_viewportChanged');
4160});
4161
4162// ----------------------------------------------
4163// Prüfen ob Element in Viewport sichtbar ist
4164$.fn.isInViewport = function () {
4165  var elementTop = $(this).offset().top;
4166  var elementBottom = elementTop + $(this).outerHeight();
4167
4168  var viewportTop = $(window).scrollTop();
4169  var viewportBottom = viewportTop + $(window).height();
4170
4171  return elementBottom > viewportTop && elementTop < viewportBottom;
4172};
4173
4174// Globalen Namespace definieren:
4175var Gw = Gw || {};
4176
4177// Funktionen zur Client-Erkennung:
4178Gw.Client = {};
4179
4180// Bequemlichkeitsmethode zur Erkennung von Smartphones.
4181// noch um Windows Phone + Bada ergänzen
4182Gw.Client.isMobile = function () {
4183  var ua = navigator.userAgent;
4184  var client = {
4185    iphone: ua.match(/(iPhone|iPod|iPad)/),
4186    blackberry: ua.match(/BlackBerry/),
4187    android: ua.match(/Android/)
4188  };
4189
4190  var isMobileClient = (client.iphone || client.blackberry || client.android);
4191  return isMobileClient;
4192};
4193
4194
4195// Bequemlichkeitsmethoden zur Browsererkennung.
4196Gw.Client.isIE = function () {
4197  var ua = navigator.userAgent;
4198  return ua.match(/MSIE/);
4199};
4200
4201Gw.Client.isSafari = function () {
4202  var ua = navigator.userAgent;
4203  return ua.match(/Safari/);
4204};
4205
4206Gw.Client.isFirefox = function () {
4207  var ua = navigator.userAgent;
4208  return ua.match(/Firefox/);
4209};
4210
4211Gw.Client.isOpera = function () {
4212  var ua = navigator.userAgent;
4213  return ua.match(/Opera/);
4214};
4215
4216Gw.Client.isChrome = function () {
4217  var ua = navigator.userAgent;
4218  return ua.match(/Chrome/);
4219};
4220
4221Gw.Client.isEdge = function () {
4222  var ua = navigator.userAgent;
4223  return ua.match(/Edge/);
4224};
4225
4226Gw.Client.isIPad = function () {
4227  var ua = navigator.userAgent;
4228  return ua.match(/iPad/);
4229};
4230
4231Gw.Client.isIPhone = function () {
4232  var ua = navigator.userAgent;
4233  return ua.match(/iPhone/);
4234};
4235
4236Gw.Client.isIPod = function () {
4237  var ua = navigator.userAgent;
4238  return ua.match(/iPod/);
4239};
4240
4241Gw.Client.isBlackBerry = function () {
4242  var ua = navigator.userAgent;
4243  return ua.match(/BlackBerry/);
4244};
4245
4246Gw.Client.isAndroid = function () {
4247  var ua = navigator.userAgent;
4248  return ua.match(/Android/);
4249};
4250
4251// Bequemlichkeitsmethode für die IE Version.
4252Gw.Client.isIE6 = function () {
4253  return parseFloat(navigator.appVersion.split("MSIE")[1]) <= 6;
4254};
4255
4256Gw.Client.isIE7 = function () {
4257  return parseFloat(navigator.appVersion.split("MSIE")[1]) == 7;
4258};
4259
4260Gw.Client.isIE8 = function () {
4261  return parseFloat(navigator.appVersion.split("MSIE")[1]) == 8;
4262};
4263
4264Gw.Client.isIE9 = function () {
4265  return parseFloat(navigator.appVersion.split("MSIE")[1]) == 9;
4266};
4267
4268Gw.Client.isIE10 = function () {
4269  return parseFloat(navigator.appVersion.split("MSIE")[1]) == 10;
4270};
4271
4272Gw.Client.isIE11 = function () {
4273  return parseFloat(navigator.appVersion.split("MSIE")[1]) == 11;
4274};
4275
4276Gw.Client.isIE12 = function () {
4277  return parseFloat(navigator.appVersion.split("MSIE")[1]) == 12;
4278};
4279
4280Gw.Client.ieVersion = function () {
4281  return parseFloat(navigator.appVersion.split("MSIE")[1]);
4282};
4283
4284jQuery(document).ready(function ($) {
4285
4286  // Konstanten / Variablen festlegen
4287  // ---------------------------------------------
4288  const page = $('.js-page');
4289  const pageBaseClass = 'page';
4290  const pageHeader = $('.js-page-header');
4291  const pageHeaderBaseClass = 'page-header';
4292  const navbar = $('.js-navbar');
4293  const navbarToggle = $('.js-navbar-toggle');
4294  const navbarBaseClass = 'page-header__nav';
4295  const megadropdown = $('.js-megadropdown');
4296  const megadropdownBaseClass = '.c-nav-megadropdown';
4297  const burgerBtn = navbarToggle;
4298  const burgerBaseClass = 'c-burger';
4299  const enableFixedHeader = true;
4300  let pageHeight = page.height();
4301  let pageHeaderHeight = pageHeader.height();
4302
4303  // Variablen aktualisieren
4304  window.addEventListener("resize", function(event) {
4305    pageHeight = page.height();
4306    pageHeaderHeight = pageHeader.height();
4307  });
4308
4309  // Link in Containern auslesen
4310  // ----------------------------------------------
4311  const linkedAllCaller = $('.js-linked-all');
4312  Gw.findAndOpenLink = function (element) {
4313    var $a = $(element).find('a');
4314    if ($a.attr('target')) {
4315      window.open($a[0].href, $a.attr('target'));
4316    } else {
4317      location.href = $a[0].href;
4318    }
4319    return false;
4320  };
4321
4322  linkedAllCaller.on('click', function () {
4323    Gw.findAndOpenLink(this);
4324  });
4325
4326  //  Header: Fixed Header relative setzen, falls Extbase-Debugger aktiv
4327  // ----------------------------------------------
4328  Gw.setHeaderPositionRelative = function () {
4329    if($('body div').hasClass('extbase-debugger')) {
4330      pageHeader.css('position', 'relative');
4331    }
4332  };
4333
4334  $(window).on('load', function (e) {
4335    if (enableFixedHeader) {
4336      Gw.setHeaderPositionRelative();
4337    }
4338  });
4339
4340  //  Header: Höhe in CSS-Variable schreiben
4341  // ----------------------------------------------
4342  Gw.setHeaderHeight = function () {
4343    $(":root").css('--gw-page-header-height', pageHeader.height() + 'px');
4344  };
4345
4346  Gw.setHeaderHeight();
4347  window.addEventListener("resize", Gw.setHeaderHeight);
4348
4349  // Header: Prepend Bereich bei Scrolling verbergen
4350  // ----------------------------------------------
4351  const pageHeaderPrepend = $('.js-page-header-prepend');
4352  Gw.hidePrependHeader = function () {
4353    if (document.documentElement.scrollTop > pageHeaderHeight) {
4354      pageHeaderPrepend.slideUp(250, Gw.setHeaderHeight);
4355      pageHeader.addClass(pageHeaderBaseClass + '--is-overscrolled');
4356    } else {
4357      pageHeaderPrepend.slideDown(250, Gw.setHeaderHeight);
4358      pageHeader.removeClass(pageHeaderBaseClass + '--is-overscrolled');
4359    }
4360  };
4361
4362  $(window).scroll(function () {
4363    if (enableFixedHeader && !page.hasClass(pageBaseClass + '--megadropdown-is-active')) {
4364      Gw.hidePrependHeader();
4365    }
4366  });
4367
4368
4369  // Header: Skiplinks Scrolling verbergen
4370  // ----------------------------------------------
4371  const pageSkiplinks = $('.js-page-skiplinks');
4372  Gw.hideSkiplinks = function () {
4373    if (document.documentElement.scrollTop > 0) {
4374      pageSkiplinks.slideUp(250, Gw.setHeaderHeight);
4375      pageHeader.css('top', '0');
4376    } else {
4377      pageSkiplinks.slideDown(250, Gw.setHeaderHeight);
4378      pageHeader.css('top', 'unset');
4379    }
4380  };
4381
4382  $(window).scroll(function () {
4383    if (enableFixedHeader) {
4384      Gw.hideSkiplinks();
4385    }
4386  });
4387
4388
4389  // Anchor Links: Seitenübergreifend mit Offset versehen
4390  // ----------------------------------------------
4391  Gw.setAnchorLinkOffset = function () {
4392    var pageHeaderOffset = pageHeaderHeight * 1.25; // Multiplikator
4393
4394    if (window.location.hash) {
4395      var target = $(window.location.hash);
4396      if (target.length) {
4397        // Delay, damit alles sauber gerendert ist und nicht sofort scrollt
4398        setTimeout(function () {
4399          var scrollToPosition = target.offset().top - pageHeaderOffset;
4400          $('html, body').animate({ scrollTop: scrollToPosition }, 400);
4401        }, 100);
4402      }
4403    }
4404  };
4405
4406  Gw.setAnchorLinkOffset();
4407
4408  // Header: ScrollOffsetY Hide/Show
4409  // ----------------------------------------------
4410  const pageHeightOffsetBreakpoint = pageHeight;
4411  let headerOffsetLastScrollTop = 0;
4412  let headerOffsetSrollOverBreakpoint = false;
4413  let enableHeaderOffsetAnimation = false;
4414  if (pageHeader.hasClass('js-page-header--animate-offset')){
4415    enableHeaderOffsetAnimation = true;
4416  }
4417  Gw.animateHeaderOffset = function () {
4418    // Nach 20% der PageHeight Funktion durchführen [Reduziert versehentliches Scrollen]
4419    if ($(window).scrollTop() > pageHeightOffsetBreakpoint * 0.2 && headerOffsetSrollOverBreakpoint === false) {
4420      const headerOffset = $(window).scrollTop();
4421      if (headerOffset > headerOffsetLastScrollTop) {
4422        pageHeader.addClass(pageHeaderBaseClass + '--animate-offset-hide').removeClass(pageHeaderBaseClass + '--animate-offset-show');
4423      } else {
4424        pageHeader.addClass(pageHeaderBaseClass + '--animate-offset-show').removeClass(pageHeaderBaseClass + '--animate-offset-hide');
4425      }
4426      headerOffsetLastScrollTop = headerOffset;
4427      headerOffsetSrollOverBreakpoint = true;
4428    } else {
4429      headerOffsetSrollOverBreakpoint = false;
4430    }
4431  };
4432
4433  $(window).scroll(function () {
4434    if (enableFixedHeader && enableHeaderOffsetAnimation) {
4435      Gw.animateHeaderOffset();
4436    }
4437  });
4438
4439  // Header: Scroll Progress Indikator
4440  // ----------------------------------------------
4441  // headerScrollProgressPixels = Anzahl der px vom oberen Ende der Seite
4442  // headerScrollProgressPageHeight = Seitenhöhe - ersichtliche Seitenhöhe
4443  // headerScrollProgress = 100 * headerScrollProgressPixels / headerScrollProgressPageHeight
4444  Gw.animateHeaderScrollProgress = function () {
4445    const pageHeaderScrollProgress = $('.js-page-header-scroll-progress');
4446    let headerScrollProgressPixels = $(document).scrollTop();
4447    let headerScrollProgressWindowHeight = $(window).height();
4448
4449    // pageHeight wird hier immer aktuell berechnet
4450    let pageHeight = $(document).height();
4451    let headerScrollProgressPageHeight = pageHeight - headerScrollProgressWindowHeight;
4452    // Schutz vor Division durch 0
4453    if (headerScrollProgressPageHeight <= 0) {
4454      headerScrollProgressPageHeight = 1;
4455    }
4456
4457    let headerScrollProgress = 100 * headerScrollProgressPixels / headerScrollProgressPageHeight;
4458    pageHeaderScrollProgress.css('width', headerScrollProgress + '%');
4459  };
4460
4461  $(window).on('load', function () {
4462    // Initiale Berechnung direkt nach Laden aller Ressourcen
4463    if (enableFixedHeader) {
4464      Gw.animateHeaderScrollProgress();
4465    }
4466  });
4467
4468  $(window).scroll(function () {
4469    if (enableFixedHeader) {
4470      Gw.animateHeaderScrollProgress();
4471    }
4472  });
4473
4474  // Menu: Megadropdown steuern
4475  // ---------------------------------------------
4476
4477  // Status dekorieren
4478  Gw.toggleMegaMenu = function(isNavOpen) {
4479    if (!isNavOpen && page.hasClass(pageBaseClass + '--megadropdown-is-active')) {
4480      page.removeClass(pageBaseClass + '--megadropdown-is-active');
4481    }
4482    if (Gw.Viewport.isSmDown()) return;
4483    if (isNavOpen && !page.hasClass(pageBaseClass + '--megadropdown-is-active')) {
4484      page.addClass(pageBaseClass + '--megadropdown-is-active');
4485    }
4486  };
4487
4488  // Menu-Ebenen schließen
4489  Gw.closeMegaMenu = function(level) {
4490    const $openCollapseContent = megadropdown.find(`.collapse[data-gw-level="${level}"]`);
4491    $openCollapseContent.collapse('hide');
4492  };
4493
4494  // Event Listener wenn Megadropdown öffnet/ schließt
4495  $('.collapse[data-gw-level="1"]').each((index, collapse) => {
4496    const $collapse = $(collapse);
4497    $collapse.on('shown.bs.collapse', () => {
4498      Gw.toggleMegaMenu(true);
4499    });
4500    $collapse.on('hide.bs.collapse', () => {
4501      Gw.toggleMegaMenu(false);
4502    });
4503  });
4504
4505  // Bei Klick außerhalb, Menüs schließen
4506  $(document).on('click', function(event) {
4507    const isClickInMenu = event.target.closest("#c-id--menu-megadropdown");
4508    const isOpen = $('[data-bs-parent="#c-id--menu-megadropdown"]').hasClass('show');
4509    if (!isClickInMenu && isOpen) {
4510      Gw.closeMegaMenu(1);
4511    }
4512  });
4513
4514  // Bei Viewport Änderung, Menü schließen und Submenüpunkte öffnen/schließen je nach Viewport
4515  $(window).on('gw_viewportChanged', function () {
4516    Gw.closeMegaMenu(1);
4517    if (Gw.Viewport.isSmDown()) {
4518      Gw.closeMegaMenu(3);
4519    }
4520  });
4521
4522  // Menu: Burger-Buttons dekorieren
4523  // ----------------------------------------------
4524  Gw.toggleBurger = function () {
4525    burgerBtn.parent().toggleClass(burgerBaseClass + '--is-active');
4526    burgerBtn.toggleClass(burgerBaseClass + '__btn--is-active');
4527    burgerBtn.attr('aria-expanded', function (i, attr) {
4528      return attr == 'true' ? 'false' : 'true';
4529    });
4530  };
4531
4532  // Menu: Navbar öffnen/schließen
4533  // ----------------------------------------------
4534  Gw.toggleNavbar = function () {
4535    if (navbar.hasClass(navbarBaseClass + '--is-active')) {
4536      navbar.removeClass(navbarBaseClass + '--is-active');
4537      page.removeClass(pageBaseClass + '--navbar-is-active');
4538      navbarToggle.trigger('focus');
4539      const navbarTransitionDurationInMs = Number.parseFloat(navbar.css('transition-duration')) * 1000;
4540      setTimeout(() => {
4541        if (navbar.hasClass(navbarBaseClass + '--is-active')) {
4542          return;
4543        }
4544        navbar.css('display', 'none');
4545      }, navbarTransitionDurationInMs);
4546    } else {
4547      navbar.css('display', 'block');
4548      setTimeout(() => {
4549        navbar.addClass(navbarBaseClass + '--is-active');
4550        page.addClass(pageBaseClass + '--navbar-is-active');
4551        navbar.find('button').first().focus();
4552        $(this).trigger('gw-navbar-open');
4553        openCurrentItem();
4554      }, 10);
4555    }
4556  };
4557
4558  // Menu: Öffnen/schließen initiieren
4559  // ----------------------------------------------
4560
4561  // Burger Button
4562  navbarToggle.on('click', function () {
4563    Gw.toggleNavbar();
4564    Gw.toggleBurger();
4565    Gw.setHeaderHeight();
4566  });
4567
4568  // Skip-Navigation
4569  const navbarToggleAnchor = $('.js-anchor-navbar');
4570  navbarToggleAnchor.on('click', function(e) {
4571    e.preventDefault();
4572    Gw.toggleNavbar();
4573    Gw.toggleBurger();
4574  });
4575
4576  // Tastatursteuerung
4577  $(document).on('keyup', function (event) {
4578    if (event.key === "Escape") {
4579      const navbarIsOpen = navbar.hasClass(navbarBaseClass + '--is-active');
4580      const megaMenuIsOpen = $('[data-bs-parent="#c-id--menu-megadropdown"]').hasClass('show');
4581      if (navbarIsOpen) {
4582        Gw.toggleNavbar();
4583        Gw.toggleBurger();
4584      }
4585      if (megaMenuIsOpen) {
4586        Gw.closeMegaMenu(1);
4587      }
4588    }
4589  });
4590  $('.js-navbar .js-megadropdown-stage').on('focusout', function(event) {
4591    const navHorizontalShow = $('.js-navbar .js-megadropdown-stage.show');
4592    if (!$.contains($(event.currentTarget).parents('.js-megadropdown')[0], event.relatedTarget)) {
4593      navHorizontalShow.collapse('hide');
4594      navHorizontalShow.prev().find('.js-megadropdown__collapse').trigger('focus');
4595    }
4596  });
4597
4598  // Menu: Collapse-Toggle dekorieren / ausklappen
4599  // ----------------------------------------------
4600  const navCollapse = $('.js-nav-collapse');
4601  const navCollapseBaseClass = 'c-nav-collapse';
4602
4603  // Collapse Icons dekorieren
4604  navCollapse.on('hide.bs.collapse', function (e) {
4605    const togglebtn = $(e.target).prev().find('.js-nav-collapse-btn');
4606    $(togglebtn).removeClass(navCollapseBaseClass + '__collapse--active');
4607  });
4608  navCollapse.on('show.bs.collapse', function (e) {
4609    const togglebtn = $(e.target).prev().find('.js-nav-collapse-btn');
4610    $(togglebtn).addClass(navCollapseBaseClass + '__collapse--active');
4611  });
4612
4613  // Search-Box: Fokus-Klasse dekorieren
4614  // ----------------------------------------------
4615  const seachBoxBaseClass = 'c-search-box';
4616  const seachBoxInputField = $('.js-search-box-input');
4617  seachBoxInputField.on('focus', function () {
4618    $(this).parent(seachBoxBaseClass).addClass(seachBoxBaseClass + '--is-focused');
4619  });
4620  seachBoxInputField.on('blur', function () {
4621    $(this).parent(seachBoxBaseClass).removeClass(seachBoxBaseClass + '--is-focused');
4622  });
4623
4624
4625  // Collapse: Inhalte auf kleinen Viewports ein-/ausklappen
4626  // ----------------------------------------------
4627  // Icon dekorieren
4628  const collapseLink = $('.js-collapse__link');
4629  collapseLink.click(function () {
4630    $(this).find('.c-collapse__icon').toggleClass(function () {
4631      return $(this).is('.bi-dash, .bi-plus')
4632             ? 'bi-plus bi-dash' : 'bi-dash';
4633    });
4634  });
4635
4636  // Bootstrap-Collapse initialisieren
4637  // nur für Viewport xs
4638  if (!Gw.Viewport || Gw.Viewport.isSmDown()) {
4639    // Footer: Sitemap
4640    $('.js-collapse-target--sitemap').addClass('collapse');
4641  }
4642
4643  // nur für Viewport sm down
4644  if (!Gw.Viewport || Gw.Viewport.isSmDown()) {
4645    // Nav: Vertical
4646    $('.js-collapse-target--nav-vertical').addClass('collapse');
4647  }
4648
4649  // Formulare: File Upload Dateinamen anzeigen
4650  // ----------------------------------------------
4651  $('.js-custom-file-input').on('change', function () {
4652    let $label = $(this).next('.js-custom-file-label');
4653    file = $(this).prop('files')[0] || null;
4654    if (!file) {
4655      return;
4656    }
4657    $label.text(file.name);
4658  });
4659
4660  // Content: Klassen für Fade-In-Animation setzen
4661// ----------------------------------------------
4662  function addAnimationClass() {
4663
4664    const $menuContentLayout = $('.c-menu--layout-animated');
4665
4666    if ($menuContentLayout) {
4667      $menuContentLayout.find('.js-content-slide-in-trigger').addClass('u-animation-slide-in');
4668    }
4669  }
4670  addAnimationClass();
4671
4672  // Content: Closed Captions für Videos generieren
4673  const trackElements = $('.js-closed-caption-tracks');
4674  trackElements.each(function() {
4675    $(this).siblings('video').append($(this));
4676  });
4677
4678  // BTIV: Farbe berechnen
4679  // ----------------------------------------------
4680  function hexToRgb(hex) {
4681    let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
4682    return result ? {
4683      r: parseInt(result[1], 16),
4684      g: parseInt(result[2], 16),
4685      b: parseInt(result[3], 16)
4686    } : null;
4687  }
4688  // Wahrgenommene Luminanz nach WCAG berechnen und weiß oder schwarz zurückgeben
4689  // threshold = Kontrastschwelle, 3 (großer Text AA), 4.5 (kleiner Text AA, großer Text AAA), 7 (kleiner Text AAA)
4690  // favorWhite = bevorzuge Weiß als Textfarbe, falls Kontrast ausreichend
4691  function calcColorLuminance(color, threshold = 4.5, favorWhite = true) {
4692    // Luminanz der Farbe berechnen
4693    Object.keys(color).forEach(function(key) {
4694      color[key] /= 255;
4695      if (color[key] <= 0.04045) {
4696        color[key] /= 12.92;
4697      } else {
4698        color[key] = ((color[key] + 0.055) / 1.055) ** 2.4;
4699      }
4700    });
4701    let luminance = 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b;
4702    // Kontrastverhältnis berechnen und Weiß oder Schwarz ausgeben
4703    let contrastRatio;
4704    if (favorWhite) {
4705      contrastRatio = 1.05 / (luminance + 0.05);
4706      if (contrastRatio > threshold) {
4707        return '#ffffff';
4708      } else {
4709        return '#000000';
4710      }
4711    } else {
4712      contrastRatio = (luminance + 0.05) / 0.05;
4713      if (contrastRatio > threshold) {
4714        return '#000000';
4715      } else {
4716        return '#ffffff';
4717      }
4718    }
4719  }
4720  function setContrastColor(element) {
4721    if (element && element.data('gwBgcolor')) {
4722      let threshold = 4.5;
4723      if (element.data('gwColorthreshold')) {
4724        threshold = element.data('gwColorthreshold');
4725      }
4726      let hexColor = hexToRgb(element.data('gwBgcolor'));
4727      if (calcColorLuminance(hexColor, threshold) === '#000000') {
4728        element.addClass('js-color-luminance--black');
4729      } else if (calcColorLuminance(hexColor, threshold) === '#ffffff') {
4730        element.addClass('js-color-luminance--white');
4731      }
4732    }
4733  }
4734  $('.js-color-luminance').each(function() {
4735    setContrastColor($(this));
4736  });
4737
4738  // Menü-Highlighting
4739  // ----------------------------------------------
4740
4741  $('[data-gw-menu]').find('li,a').each(function () {
4742    const $self = $(this);
4743    const subpageAttr = $self.attr('data-gw-menu-subpages');
4744    const linktypeAttr = $self.attr('data-gw-linktype');
4745    if (linktypeAttr === 'external') {
4746      return;
4747    }
4748    if (subpageAttr) {
4749      const subpageList = subpageAttr.split(',');
4750      for (const slug of subpageList) {
4751        if (slug && location.pathname.startsWith(slug)) {
4752          highlightMenuItem($self, 'active');
4753        }
4754      }
4755    }
4756
4757    const hrefAttr = $self.attr('href');
4758    if (hrefAttr && hrefAttr.endsWith(location.pathname)) {
4759      highlightMenuItem($self, 'active');
4760      highlightMenuItem($self, 'current');
4761    }
4762  });
4763
4764  function highlightMenuItem($item, modifier) {
4765    $item.addClass($item[0].classList[0] + '--is-' + modifier);
4766  }
4767
4768  // Aktuelle Position mobil ausklappen
4769  function openCurrentItem() {
4770    const currentItemParentStage = $(megadropdownBaseClass + '__link--is-current').parents('.collapse');
4771    currentItemParentStage.each(function(index) {
4772      // Verhindere, dass innere Buttons den Zustand nicht korrekt wechseln
4773      setTimeout(() => {
4774        $(this).collapse('show');
4775      }, index * 400);
4776    });
4777  }
4778});
4779
4780jQuery(document).ready(function ($) {
4781
4782  const body = $('body');
4783  const contrastToggle = $('.js-contrast-toggle');
4784  // 1. Status aus dem Cookie lesen
4785  let contrast = Gw.Cookies.getItem('contrast') === 'yes';
4786
4787  // 2. Initialisierung: Den visuellen State des Toggles setzen
4788  if (contrast) {
4789    contrastToggle.prop('checked', true);
4790    body.addClass(Gw.contrastClass).removeClass(Gw.noContrastClass);
4791  } else {
4792    contrastToggle.prop('checked', false);
4793  }
4794
4795  // 3. Click Event
4796  contrastToggle.on('change', function () {
4797    contrast = $(this).prop('checked');
4798
4799    body.toggleClass(Gw.contrastClass, contrast);
4800    body.toggleClass(Gw.noContrastClass, !contrast);
4801
4802    Gw.Cookies.setItem('contrast', contrast ? 'yes' : 'no', Infinity, '/', Gw.Cookies.topHost);
4803  });
4804
4805});
4806
4807
4808const imageUploadLinkList = document.querySelectorAll('a[href^="https://bkk-firmus2.sps-prien.de"]');
4809imageUploadLinkList.forEach(imageUploadLink => {
4810  imageUploadLink.addEventListener('click', event => {
4811    const answer = confirm ("Hinweis: Wenn Sie diesem Link folgen, verlassen Sie die Webseite der BKK firmus und gelangen zu einer externen Seite.");
4812    if (!answer) {
4813      event.preventDefault();
4814    }
4815  });
4816});
4817
4818jQuery(document).ready(function ($) {
4819  // Selektoren
4820  const radioSelector = '.js-request-contact-selection';
4821  const mailSection = $('.js-request-contact-mail');
4822  const phoneSection = $('.js-request-contact-phone');
4823
4824  // Standardzustand: Nur Mail zeigen, Phone ausblenden
4825  phoneSection.closest('.c-form__group').hide();
4826  phoneSection.val('').prop('required', false);
4827
4828  // Klick auf Radio-Buttons
4829  $(radioSelector).on('change', function () {
4830    const selectedValue = $(this).val(); // 'Email' oder 'Telefon' -> YAML-Values
4831
4832    // Reset beider Felder
4833    mailSection.val('').prop('required', false);
4834    phoneSection.val('').prop('required', false);
4835
4836    // Beide ausblenden
4837    mailSection.closest('.c-form__group').hide();
4838    phoneSection.closest('.c-form__group').hide();
4839
4840    // Nur das gewünschte Feld einblenden
4841    if (selectedValue === 'Telefon') {
4842      phoneSection.closest('.c-form__group').show();
4843      phoneSection.prop('required', true);
4844    } else {
4845      mailSection.closest('.c-form__group').show();
4846      mailSection.prop('required', true);
4847    }
4848  });
4849});
4850
4851jQuery(document).ready(function ($) {
4852  // Content:
4853  // Generische js-content Klassen für Fade-In und Slide-In Animationen
4854  // ----------------------------------------------
4855  // Verwendung: In Templates mit "js-content-animation"-Klasse und Modifier.
4856  // Info: Innere Divs werden automatisch animiert
4857  //
4858  // Modifier:
4859  // js-content-animation--fade-in
4860  // js-content-animation--slide-in
4861  const contentAnimation = $('.js-content-animation');
4862  const contentAnimationFadeInInnerDivs = $('.js-content-animation--fade-in > div');
4863  const contentAnimationSlideInInnerDivs = $('.js-content-animation--slide-in > div');
4864
4865  Gw.contentAnimation = function () {
4866    contentAnimation.each(function () {
4867      if ($(this).hasClass('js-content-animation--fade-in')) {
4868        contentAnimationFadeInInnerDivs.addClass('u-animation-fade-in');
4869      }
4870      if ($(this).hasClass('js-content-animation--slide-in')) {
4871        contentAnimationSlideInInnerDivs.addClass('u-animation-sli
4871de-in');
4872      }
4873    });
4874  };
4875
4876  // Entscheidet, ob Animation wiederholt wird, wenn wieder in Viewport
4877  const repeatContentAnimation = false;
4878
4879  // Fade-In Trigger Klasse setzen, wenn in Viewport
4880  Gw.setFadeInAnimation = function () {
4881    $('.u-animation-fade-in').each(function () {
4882      if ($(this).isInViewport()) {
4883        $(this).addClass('u-animation-fade-in--trigger');
4884      } else if(repeatContentAnimation === true) {
4885        $(this).removeClass('u-animation-fade-in--trigger');
4886      }
4887    });
4888  };
4889
4890  // Slide-In Trigger Klasse setzen, wenn in Viewport
4891  Gw.setSlideInAnimation = function () {
4892    $('.u-animation-slide-in').each(function () {
4893      if ($(this).isInViewport()) {
4894        $(this).addClass('u-animation-slide-in--trigger');
4895      } else if(repeatContentAnimation === true) {
4896        $(this).removeClass('u-animation-slide-in--trigger');
4897      }
4898    });
4899  };
4900
4901  $(window).on('load resize scroll', function (e) {
4902    Gw.contentAnimation();
4903    Gw.setFadeInAnimation();
4904    Gw.setSlideInAnimation();
4905  });
4906});
4907
4908jQuery(document).ready(function ($) {
4909  // Generische Klick-Box-Komponente
4910  // ----------------------------------------------
4911  const clickBox = $('.js-click-box');
4912
4913  // Links in Klickbox auslesen und Areas dekorieren
4914  clickBox.each(function () {
4915    let clickBoxTarget = $(this).find('.js-click-box__target');
4916    // Wenn kein Link angegeben verwende ersten Button-Link
4917    if (clickBoxTarget.length === 0) {
4918      clickBoxTarget = $(this).find('.c-btn').first();
4919      // Wenn kein Button verwende Link
4920      if (clickBoxTarget.length === 0) {
4921        clickBoxTarget = $(this).find('.c-link').find('a').first();
4922      }
4923      // Wenn kein Button verwende Link in Text
4924      if (clickBoxTarget.length === 0) {
4925        clickBoxTarget = $(this).find('.c-card__text').find('a').first();
4926      }
4927    }
4928
4929    $(this).addClass('js-click-box--usable');
4930    $(this).find('.js-click-box__area').each(function () {
4931      $(this).attr('data-click-box-target', clickBoxTarget.attr('target'));
4932      $(this).attr('data-click-box-href', clickBoxTarget.attr('href'));
4933      $(this).addClass('js-click-box__area--usable');
4934    });
4935
4936    // Wenn gesamte Card verlinked ist
4937    if ($(this).find('.js-click-box__area').length === 0) {
4938      if ($(this).hasClass('js-click-box__area')) {
4939        $(this).attr('data-click-box-target', clickBoxTarget.attr('target'));
4940        $(this).attr('data-click-box-href', clickBoxTarget.attr('href'));
4941        $(this).addClass('js-click-box__area--usable');
4942      }
4943    }
4944  });
4945
4946  // Areas klickbar machen
4947  $('.js-click-box__area--usable').click(function () {
4948    if ($(this).attr('data-click-box-href')) {
4949      if ($(this).attr('data-click-box-target')) {
4950        window.open($(this).attr('data-click-box-href'), $(this).attr('data-click-box-target'));
4951      } else {
4952        location.href = $(this).attr('data-click-box-href');
4953      }
4954    }
4955    return false;
4956  });
4957
4958  // Areas focus dekorieren
4959  $('.js-click-box__area').hover(function () {
4960    $(this).addClass('js-click-box__area--hover');
4961  }, function () {
4962    $(this).removeClass('js-click-box__area--hover');
4963  });
4964});
4965
4966/*!
4967 * cookiebot-banner-control.js
4968 *
4969 * Zweck:
4970 * - Cookiebot-Banner auf bestimmten URLs automatisch ausblenden
4971 * - Banner per Button/Link manuell öffnen
4972 *
4973 */
4974
4975(function () {
4976  "use strict";
4977
4978  function shouldSuppressBanner() {
4979    return $('body').is('[data-gw-subtree="meta"]');
4980  }
4981
4982  function hasCookiebot() {
4983    return typeof window.Cookiebot !== "undefined" && window.Cookiebot !== null;
4984  }
4985
4986  /**
4987   * Öffnet das passende Cookiebot-UI:
4988   * - ohne bisherige Antwort: show()
4989   * - mit bestehender Antwort: renew()
4990   */
4991  function openCookiebotBanner() {
4992    if (!hasCookiebot()) return;
4993
4994    if (window.Cookiebot.hasResponse) {
4995      window.Cookiebot.renew();
4996    } else {
4997      window.Cookiebot.show();
4998    }
4999  }
5000
5001  /**
5002   * Macht die Funktion global verfügbar, z. B. für onclick
5003   * onclick="openCookieSettings()"
5004   */
5005  window.openCookieSettings = openCookiebotBanner;
5006
5007  /**
5008   * Delegiertes Event:
5009   * Alle Elemente mit [data-cookiebot-open] öffnen das Banner
5010   */
5011  document.addEventListener("click", function (event) {
5012    var trigger = event.target.closest("[data-change-button]");
5013    if (!trigger) return;
5014
5015    window.gwOverrideCookiebotAutohide = true;
5016
5017    event.preventDefault();
5018    openCookiebotBanner();
5019  });
5020
5021  /**
5022   * Automatisches Banner auf bestimmten Seiten unterdrücken.
5023   * Cookiebot dokumentiert dafür u. a.:
5024   * - Cookiebot.hide()
5025   * - Event "CookiebotOnDialogDisplay"
5026   */
5027  window.addEventListener("CookiebotOnDialogDisplay", function () {
5028    if (!shouldSuppressBanner() || !hasCookiebot() || window.gwOverrideCookiebotAutohide) return;
5029    window.Cookiebot.hide();
5030  });
5031
5032  window.addEventListener("popstate", function () {
5033    window.dispatchEvent(new Event("cookiebot-route-change"));
5034  });
5035
5036  window.addEventListener("cookiebot-route-change", function () {
5037    if (!shouldSuppressBanner() || !hasCookiebot()) return;
5038
5039    // Falls Banner nach Route-Wechsel sichtbar wird, ausblenden
5040    try {
5041      window.Cookiebot.hide();
5042    } catch (e) {
5043      // absichtlich leer
5044    }
5045  });
5046})();
5047
5048jQuery(document).ready(function ($) {
5049// Formulare: Frontend Validierung hinzufügen
5050  // ----------------------------------------------
5051  $('.js-validate-form').each(function (index, form) {
5052    $(form).find('input, textarea')
5053      .each(function () {
5054        const $element = $(this);
5055        const $label = $element.siblings('.c-form__label');
5056        if (!$element.hasClass('c-form__input') && !$element.hasClass('c-form__textarea')) {
5057          return;
5058        }
5059        if ($element.val().length) {
5060          $label.addClass('js-validate--filled');
5061        }
5062      })
5063      .focusin((event) => {
5064        const $target = $(event.currentTarget);
5065        const $label = $target.siblings('.c-form__label');
5066        $label.addClass('js-validate--focused');
5067      })
5068      .focusout((event) => {
5069        const $target = $(event.currentTarget);
5070        const $label = $target.siblings('.c-form__label');
5071        $label.removeClass('js-validate--focused');
5072        if ($target.val().length) {
5073          $label.addClass('js-validate--filled');
5074        } else if ($label.hasClass('js-validate--filled')) {
5075          $label.removeClass('js-validate--filled');
5076
5077        }
5078      });
5079    const translations = $(form).find('.js-frontend-validation-translations').data('translations');
5080    const $validator = Gw.FrontendTranslation.addValidation(form, translations, {errorClass: 'js-validate--error'});
5081    $(form).find('button[type="reset"]').on('click', function () {
5082      $validator.resetForm();
5083      $(form).find('.js-validate--filled').each(function () {
5084        $(this).removeClass('js-validate--filled');
5085      });
5086    });
5087  });
5088});
5089
5090// Touchswipe: Carousel per Swipe zugänglich machen
5091// --------------------------------------------
5092jQuery(document).ready(function ($) {
5093  $(".carousel").swipe({
5094    swipeLeft: function () {
5095      $(this).carousel('next');
5096    },
5097    swipeRight: function () {
5098      $(this).carousel('prev');
5099    },
5100    threshold: 50
5101  });
5102});
5103
5104// Bootstrap: Initialisieren
5105// --------------------------------------------
5106jQuery(document).ready(function ($) {
5107  // Tooltips initialisieren
5108  const tooltipTriggerList = $('[data-bs-toggle="tooltip"]');
5109  const tooltipList = tooltipTriggerList.map(function() {
5110    return new bootstrap.Tooltip($(this));
5111  });
5112
5113  // Popover initialisieren
5114  const popoverTriggerList = $('[data-bs-toggle="popover"]');
5115  const popoverList = popoverTriggerList.map(function() {
5116    return new bootstrap.Popover($(this));
5117  });
5118});
5119
5120// OwlCarousel Initialisieren
5121// ----------------------------------------------
5122jQuery(document).ready(function ($) {
5123
5124  const sliderClass = '.js-slider';
5125
5126  const sliderTypeViewportMapping = {
5127    'default': {
5128      // Folienanzahl pro Screen
5129      'xs': 1,
5130      'sm': 1,
5131      'md': 1,
5132      'lg': 1,
5133      'xl': 1,
5134      // Abstand zwischen Folien
5135      'margin': 5,
5136      // SlideBy Anzahl
5137      'slideBy': 1,
5138    },
5139    66: {
5140      // Folienanzahl pro Screen
5141      'xs': 1,
5142      'sm': 2,
5143      'md': 2,
5144      'lg': 2,
5145      'xl': 2,
5146      // Abstand zwischen Folien
5147      'margin': 5,
5148      // SlideBy Anzahl
5149      'slideBy': 1,
5150    },
5151    444: {
5152      // Folienanzahl pro Screen
5153      'xs': 1,
5154      'sm': 3,
5155      'md': 3,
5156      'lg': 3,
5157      'xl': 4,
5158      // Abstand zwischen Folien
5159      'margin': 10,
5160      // SlideBy Anzahl
5161      'slideBy': 1,
5162    },
5163    3333: {
5164      // Folienanzahl pro Screen
5165      'xs': 1,
5166      'sm': 3,
5167      'md': 3,
5168      'lg': 4,
5169      'xl': 4,
5170      // Abstand zwischen Folien
5171      'margin': 5,
5172      // SlideBy Anzahl
5173      'slideBy': 1,
5174    },
5175    222222: {
5176      // Folienanzahl pro Screen
5177      'xs': 1,
5178      'sm': 3,
5179      'md': 3,
5180      'lg': 5,
5181      'xl': 5,
5182      // Abstand zwischen Folien
5183      'margin': 5,
5184      // SlideBy Anzahl
5185      'slideBy': 1,
5186    }
5187  };
5188
5189  $(sliderClass).each(function (index, sliderElement) {
5190    const $sliderElement = $(sliderElement);
5191
5192    const sliderType = $sliderElement.data('slider-type');
5193
5194    const owlCarouselItemsXs = sliderTypeViewportMapping[sliderType].xs;
5195    const owlCarouselItemsSm = sliderTypeViewportMapping[sliderType].sm;
5196    const owlCarouselItemsMd = sliderTypeViewportMapping[sliderType].md;
5197    const owlCarouselItemsLg = sliderTypeViewportMapping[sliderType].lg;
5198    const owlCarouselItemsXl = sliderTypeViewportMapping[sliderType].xl;
5199
5200    const owlCarouselItemsXsMargin = sliderTypeViewportMapping[sliderType].margin;
5201    const owlCarouselItemsSmMargin = sliderTypeViewportMapping[sliderType].margin;
5202    const owlCarouselItemsMdMargin = sliderTypeViewportMapping[sliderType].margin;
5203    const owlCarouselItemsLgMargin = sliderTypeViewportMapping[sliderType].margin;
5204    const owlCarouselItemsXlMargin = sliderTypeViewportMapping[sliderType].margin;
5205
5206    const owlCarouselItemsXsSlideBy = sliderTypeViewportMapping[sliderType].slideBy;
5207    const owlCarouselItemsSmSlideBy = sliderTypeViewportMapping[sliderType].slideBy;
5208    const owlCarouselItemsMdSlideBy = sliderTypeViewportMapping[sliderType].slideBy;
5209    const owlCarouselItemsLgSlideBy = sliderTypeViewportMapping[sliderType].slideBy;
5210    const owlCarouselItemsXlSlideBy = sliderTypeViewportMapping[sliderType].slideBy;
5211
5212    $sliderElement.on('initialized.owl.carousel', function() {
5213    $('.owl-item').attr('inert', '');
5214    $('.owl-item.active').removeAttr('inert');
5215    });
5216
5217    $sliderElement.owlCarousel({
5218      center: $sliderElement.data('slider-center') === 1,
5219      rewind: $sliderElement.data('slider-behaviour') === 'rewind',
5220      loop: $sliderElement.data('slider-behaviour') === 'loop',
5221      autoplay: $sliderElement.data('slider-autoplay') === 1,
5222      nav: true, // Regelt auch Ausgabe der Dots über Fluid-Template
5223      navContainer: $sliderElement.siblings().children('.js-slider-nav'), // Rendert Nav an bestimmter Template Position
5224      dots: true, // Wird über dei Ausgabe Nav über Fluid-Template geregelt
5225      dotsContainer: $sliderElement.siblings().children('.js-slider-dots'), // Rendert Dots an bestimmter Template Position
5226      autoplayTimeout: $sliderElement.data('slider-timeout-duration'),
5227      autoplayHoverPause: false,
5228      smartSpeed: 350,
5229      mouseDrag: true,
5230      touchDrag: true,
5231      responsive: {
5232        //Responsive Anpassungen für Viewports
5233        0: {
5234          items: owlCarouselItemsXs, slideBy: owlCarouselItemsXsSlideBy, margin: owlCarouselItemsXsMargin,
5235        }, 480: {
5236          items: owlCarouselItemsXs, slideBy: owlCarouselItemsXsSlideBy, margin: owlCarouselItemsXsMargin,
5237        }, 768: {
5238          items: owlCarouselItemsSm, slideBy: owlCarouselItemsSmSlideBy, margin: owlCarouselItemsSmMargin,
5239        }, 1024: {
5240          items: owlCarouselItemsMd, slideBy: owlCarouselItemsMdSlideBy, margin: owlCarouselItemsMdMargin,
5241        }, 1440: {
5242          items: owlCarouselItemsLg, slideBy: owlCarouselItemsLgSlideBy, margin: owlCarouselItemsLgMargin,
5243        }, 1920: {
5244          items: owlCarouselItemsLg, slideBy: owlCarouselItemsLgSlideBy, margin: owlCarouselItemsLgMargin,
5245        }, 2560: {
5246          items: owlCarouselItemsXl, slideBy: owlCarouselItemsXlSlideBy, margin: owlCarouselItemsXlMargin,
5247        }
5248      }
5249    });
5250    $sliderElement.on('translated.owl.carousel', function() {
5251      $('.owl-item').attr('inert', '');
5252      $('.owl-item.active').removeAttr('inert');
5253    });
5254  });
5255
5256  //
5257  // Custom Navigationselmente & Optimierung der Barrierefreiheit (siehe auch Fluid Template)
5258  // ----------------------------------------------
5259  const sliderWrapperList = $('.js-slider-wrapper');
5260  sliderWrapperList.each(function () {
5261    const $sliderWrapper = $(this);
5262
5263    const sliderDotsClass = '.owl-dots';
5264    const sliderDotClass = '.owl-dot';
5265    const sliderDotsDataAttr = $sliderWrapper.find(sliderDotsClass).data('slider-slide-tl');
5266    const sliderDotsLength= $sliderWrapper.find(sliderDotClass).length;
5267    const sliderDotsTranslation = $sliderWrapper.find(sliderDotsClass).data('gw-dot-translation');
5268    // Aria-Label Seite x von y für Owl-Dots setzen
5269    $(this).find(sliderDotClass).each(function(index) {
5270      let sliderPageTranslation = sliderDotsTranslation.replace('_index', index + 1);
5271      sliderPageTranslation = sliderPageTranslation.replace('_total', sliderDotsLength);
5272      $(this).attr('aria-label', sliderPageTranslation);
5273    });
5274    // Owl-Dots Button Type ergänzen und Role entfernen
5275    $(this).find(sliderDotClass).each(function() {
5276      $(this).prop('type', 'button');
5277      $(this).removeAttr('role', 'button');
5278    });
5279
5280    const sliderNextClass = '.js-slider-next';
5281    const sliderPrevClass = '.js-slider-prev';
5282    // Vor und Zurücknavigation
5283    $(this).find(sliderNextClass).click(function() {
5284      $sliderWrapper.find(sliderClass).trigger('next.owl.carousel');
5285    });
5286    $(this).find(sliderPrevClass).click(function() {
5287      $sliderWrapper.find(sliderClass).trigger('prev.owl.carousel');
5288    });
5289
5290    const sliderPauseBtnClass = '.js-slider-pause';
5291    const sliderPauseBtnCssClassActive = 'c-slider__control--pause--active';
5292    const sliderPauseBtnLabelClass = '.js-slider-pause-label';
5293    const sliderPausePlayIconClass = '.js-slider-pause-play-icon';
5294    const sliderPauseIconClass = 'bi-pause-fill';
5295    const sliderPlayIconClass = 'bi-play-fill';
5296    // Play/Pause Button
5297    $(this).find(sliderPauseBtnClass).data('clicks', true);
5298    $(this).find(sliderPauseBtnClass).click(function () {
5299      const autoplayIsPlaying = $(this).data('clicks');
5300      if (autoplayIsPlaying) {
5301        $(this).addClass(sliderPauseBtnCssClassActive);
5302        $sliderWrapper.find(sliderClass).trigger('stop.owl.autoplay');
5303        $(this).children(sliderPausePlayIconClass).addClass(sliderPlayIconClass).removeClass(sliderPauseIconClass);
5304        $(this).children(sliderPauseBtnLabelClass).attr('data-slider-autoplay-paused', 1);
5305      } else {
5306        $(this).removeClass(sliderPauseBtnCssClassActive);
5307        $sliderWrapper.find(sliderClass).trigger('play.owl.autoplay');
5308        $(this).children(sliderPausePlayIconClass).removeClass(sliderPlayIconClass).addClass(sliderPauseIconClass);
5309        $(this).children(sliderPauseBtnLabelClass).attr('data-slider-autoplay-paused', 0);
5310      }
5311      $(this).data('clicks', !autoplayIsPlaying);
5312    });
5313  });
5314});
5315
5316// PhotoSwipe Galerie Initialisieren
5317// ----------------------------------------------
5318
5319jQuery(document).ready(function ($) {
5320  // Setup
5321  // =====
5322
5323  const PHOTOSWIPE_GALLERY_SELECTOR = '.js-gallery';
5324  const PHOTOSWIPE_CHILDREN_SELECTOR = '.js-lightbox';
5325  const PHOTOSWIPE_CONTAINER_CLASSNAME = 'pswp__custom-container';
5326  const PHOTOSWIPE_CONTENT_CLASSNAME = 'pswp__custom-container__content';
5327
5328  document.querySelectorAll(PHOTOSWIPE_CHILDREN_SELECTOR).forEach($lightboxLink => {
5329    if ($lightboxLink.getAttribute('data-gw-crop') === '1') {
5330      const $img = $lightboxLink.querySelector('img');
5331      const width = $img.getAttribute('width');
5332      const height = $img.getAttribute('height');
5333      $lightboxLink.setAttribute('data-pswp-width', width);
5334      $lightboxLink.setAttribute('data-pswp-height', height);
5335    }
5336  });
5337
5338  const lightbox = new PhotoSwipeLightbox({
5339    // may select multiple "galleries"
5340    gallery: PHOTOSWIPE_GALLERY_SELECTOR,
5341    // Elements within gallery (slides)
5342    children: PHOTOSWIPE_CHILDREN_SELECTOR,
5343    // setup PhotoSwipe Core dynamic import
5344    pswpModule: PhotoSwipe,
5345    // Ein- und Ausblende-Animationen: zoom, fade, none
5346    showHideAnimationType: 'fade',
5347
5348    // Übersetzungen
5349    closeTitle: Gw.Translate.get('lightboxClose'), //'Close the dialog',
5350    zoomTitle: Gw.Translate.get('lightboxZoom'), //'Zoom the photo',
5351    arrowPrevTitle: Gw.Translate.get('lightboxPrevious'), //'Go to the previous photo',
5352    arrowNextTitle: Gw.Translate.get('lightboxNext'), //'Go to the next photo',
5353    errorMsg: Gw.Translate.get('lightboxError'), //'The photo cannot be loaded',
5354    indexIndicatorSep: Gw.Translate.get('lightboxIndicator'), //' of ',
5355  });
5356
5357  // verhindere gleichzeitiges Anzeigen von gecropptem und Originalbild
5358  lightbox.addFilter('placeholderSrc', (placeholderSrc, content) => {});
5359
5360  // Eigene Slide-Inhalte
5361  // ====================
5362
5363  // Inhaltstyp "html" (für beliebiges HTML, inkl. iframes)
5364
5365  document.querySelectorAll('[data-pswp-type="html"]').forEach((e) => {
5366    if (e.children.length !== 2) {
5367      console.error('Fehler in Galerie: Eine HTML-Slide muss genau 2 Kindelemente besitzen -> Thumbnail und Inhalt', e);
5368      return;
5369    }
5370
5371    const actualContent = e.children[1];
5372    e.dataset.html = actualContent.outerHTML;
5373    e.removeChild(actualContent);
5374  });
5375
5376  lightbox.on('contentLoad', (e) => {
5377    const {content} = e;
5378    if (content.type === 'html') {
5379      e.preventDefault();
5380
5381      content.element = document.createElement('div');
5382      content.element.classList.add(PHOTOSWIPE_CONTAINER_CLASSNAME, PHOTOSWIPE_CONTAINER_CLASSNAME + '--html');
5383
5384      content.element.innerHTML = content.data.element.dataset.html;
5385      if (content.element.children.length !== 1) {
5386        content.element.innerHTML = '<p style="color:red">Fehler in Slide, siehe Logs in Browserkonsole</p>';
5387      }
5388      content.element.children[0].classList.add(PHOTOSWIPE_CONTENT_CLASSNAME, PHOTOSWIPE_CONTENT_CLASSNAME + '--html');
5389
5390      // Falls bekannte Video-Iframes vorhanden, Events ergänzen
5391      function pauseVideoFrame(iframe) {
5392        if (!iframe.contentWindow) {
5393          return;
5394        }
5395        if (iframe.src.includes('vimeo')) {
5396          iframe.contentWindow.postMessage('{"method":"pause"}', '*');
5397        }
5398        if (iframe.src.includes('youtube')) {
5399          iframe.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
5400        }
5401      }
5402
5403      const iframeList = content.element.getElementsByTagName("iframe");
5404      for (const iframe of iframeList) {
5405        if (!iframe.hasAttribute('src') && iframe.hasAttribute('data-src') && gw_isFunctionalAccepted()) {
5406          iframe.setAttribute('src', iframe.getAttribute('data-src'));
5407        }
5408        iframe.setAttribute('allow', 'autoplay');
5409        lightbox.on('change', () => pauseVideoFrame(iframe));
5410        lightbox.on('close', () => pauseVideoFrame(iframe));
5411      }
5412    }
5413  });
5414
5415  // Inhaltstyp "video" (für Videos aus Dateiliste)
5416
5417  // "data-url"-Attribut für Videos initialisieren
5418  lightbox.addFilter('itemData', (itemData, index) => {
5419    const url = itemData.element.href;
5420    if (url) {
5421      itemData.url = url;
5422    }
5423    return itemData;
5424  });
5425
5426  // Inhaltselement initialisieren
5427  lightbox.on('contentLoad', (e) => {
5428    const {content} = e;
5429    if (content.type === 'video') {
5430      e.preventDefault();
5431
5432      content.element = document.createElement('div');
5433      content.element.classList.add(PHOTOSWIPE_CONTAINER_CLASSNAME, PHOTOSWIPE_CONTAINER_CLASSNAME + '--video');
5434
5435      const video = document.createElement('video');
5436      video.classList.add(PHOTOSWIPE_CONTENT_CLASSNAME, PHOTOSWIPE_CONTENT_CLASSNAME + '--video');
5437      video.src = content.data.url;
5438
5439      const playButton = document.createElement('button');
5440      playButton.classList.add(PHOTOSWIPE_CONTAINER_CLASSNAME + '__playbutton', 'bi', 'bi-play-circle-fill');
5441
5442      // Video-Events
5443      playButton.addEventListener('click', () => {
5444        if (video.paused) {
5445          video.play();
5446        } else {
5447          video.pause();
5448        }
5449      });
5450      video.addEventListener('play', () => playButton.style.opacity = '0');
5451      video.addEventListener('pause', () => playButton.style.opacity = '1');
5452
5453      lightbox.on('change', () => video.pause());
5454      lightbox.on('close', () => video.pause());
5455
5456      content.element.appendChild(video);
5457      content.element.appendChild(playButton);
5458    }
5459  });
5460
5461  lightbox.init();
5462});
5463
5464// GW Tabindex
5465// --------------------------------------------
5466jQuery(document).ready(function ($) {
5467    $(document).on('keydown', '[data-gw-tabindex-prev],[data-gw-tabindex-next]', function(event) {
5468        if (event.key !== "Tab") {
5469            return;
5470        }
5471        const prevTabElement = $(event.target).data('gw-tabindex-prev');
5472        const nextTabElement = $(event.target).data('gw-tabindex-next');
5473        if (prevTabElement && event.shiftKey === true) {
5474            event.preventDefault();
5475            $(`[data-gw-tabindex-target="${prevTabElement}"]`).focus();
5476        }
5477        if (nextTabElement && event.shiftKey === false) {
5478            event.preventDefault();
5479            $(`[data-gw-tabindex-target="${nextTabElement}"]`).focus();
5480        }
5481    });
5482});
5483
5484jQuery(document).ready(function ($) {
5485  const $input = $('[data-application-broker]');
5486  if ($input.length === 0) {
5487    return;
5488  }
5489  const brokerParamName = 'makler_id';
5490  const kwkParamName = 'kwk_id';
5491  const urlParams = new URLSearchParams(location.search);
5492  if (urlParams.has(brokerParamName)) {
5493    $input.val(brokerParamName + '-' + urlParams.get(brokerParamName));
5494  }
5495  if (urlParams.has(kwkParamName)) {
5496    $input.val(kwkParamName + '-' + urlParams.get(kwkParamName));
5497  }
5498});
5499
5500// Attribut kann gesetzt werden um ein anderes
5501// Select-Elemente zurückzusetzen
5502// --------------------------------------------
5503jQuery(document).ready(function ($) {
5504  $('[data-gwformvariants--reset-on-change]').on('change', function () {
5505    const formId = $(this).parents('form').prop('id');
5506    const formFieldIdentifier = $(this).attr('data-gwformvariants--reset-on-change');
5507    const $formField = $('#' + formId + '-' + formFieldIdentifier);
5508    $formField.each((index, element) => {
5509      $(element).val('');
5510    });
5511  });
5512});
5513
5514// Attribut kann gesetzt werden um das
5515// Formular abzuschicken (hilfreich für Form-
5516// Varianten)
5517// --------------------------------------------
5518jQuery(document).ready(function ($) {
5519  $('[data-gwformvariants--submit-on-change]').on('change', function () {
5520    $(this).parents('form').find('[required]').each((index, element) => {
5521      $(element).prop('required', false);
5522    });
5523    $(this).parents('form').find('button.c-form__btn--next[type="submit"]').click();
5524  });
5525});
5526
5527// Attribut kann gesetzt werden um das
5528// Formular abzuschicken (hilfreich für Form-
5529// Varianten)
5530// --------------------------------------------
5531jQuery(document).ready(function ($) {
5532  $('[data-gwformvariants--reload-on-change]').on('change', function () {
5533    $(this).parents('form').find('[required]').each((index, element) => {
5534      $(element).prop('required', false);
5535    });
5536    const $nextButton = $(this).parents('form').find('button.c-form__btn--next[type="submit"]');
5537    const nextPage = $nextButton.val();
5538    $nextButton.val(nextPage - 1);
5539    $nextButton.click();
5540  });
5541});
5542
5543// Attribut kann gesetzt werden um ein anderes
5544// Select-Elemente zurückzusetzen
5545// --------------------------------------------
5546jQuery(document).ready(function ($) {
5547  $('[data-gwform-textarea-counter]').each((index, element) => {
5548    const $textArea = $(element);
5549    const $counterElement = '<span data-gwform-textarea-counter--element><span data-gwform-textarea-counter--count>' + $textArea.val().length + '</span>/' + $textArea.attr('maxlength') + '</span>';
5550    $textArea.after($counterElement);
5551  });
5552
5553  $('[data-gwform-textarea-counter]').on('input', function (event) {
5554    const $textArea = $(event.target);
5555    const $counterElement = $textArea.parent().find('[data-gwform-textarea-counter--element]');
5556    const $countElement = $counterElement.find('[data-gwform-textarea-counter--count]');
5557    $countElement.html(event.target.value.length);
5558  });
5559});
5560
5561jQuery(document).ready(function ($) {
5562
5563  const $richSnippetScriptTag = document.createElement('script');
5564  $richSnippetScriptTag.src = 'https://www.provenexpert.com/widget/richsnippet.js?u=1RKZhOwok8Tpl8TpiAaZ4DGB0HQZ1ZaZ&v=2';
5565  $richSnippetScriptTag.dataset.cookieconsent = 'marketing';
5566  $richSnippetScriptTag.type = 'text/plain';
5567
5568  $richSnippetScriptTag.async = true;
5569
5570  if (
5571    navigator.userAgent.match(/googlebot/i)
5572    || navigator.userAgent.match(/storebot-google/i)
5573    || navigator.userAgent.match(/google-inspectiontool/i)
5574  ) {
5575    $richSnippetScriptTag.type = 'text/javascript';
5576    delete $richSnippetScriptTag.dataset.cookieconsent;
5577  }
5578
5579  document.body.append($richSnippetScriptTag);
5580});
5581
5582jQuery(document).ready(function($) {
5583    /**
5584     * @type {jQuery|HTMLElement|*}
5585     */
5586    const $categoryFilterCheckboxList = $('.js-news-filter-list--categories .js-news-filter-item input[type="checkbox"]');
5587    /**
5588     * @type {jQuery|HTMLElement|*}
5589     */
5590    const $tagFilterCheckboxList = $('.js-news-filter-list--tags .js-news-filter-item input[type="checkbox"]');
5591    /**
5592     * @type {jQuery|HTMLElement|*}
5593     */
5594    const $organizerFilterCheckboxList = $('.js-news-filter-list--organizer .js-news-filter-item input[type="checkbox"]');
5595    /**
5596     * @type {jQuery|HTMLElement|*}
5597     */
5598    const $locationFilterCheckboxList = $('.js-news-filter-list--location .js-news-filter-item input[type="checkbox"]');
5599    /**
5600     * @type {jQuery|HTMLElement|*}
5601     */
5602    const $resetButton = $('.js-news-action-filter-reset');
5603    /**
5604     * @type {jQuery|HTMLElement|*}
5605     */
5606    const $toolbarTitle = $('.js-news-toolbar-title');
5607    /**
5608     * @type {jQuery|HTMLElement|*}
5609     */
5610    const $newsItemElementList = $('.js-news-list__item');
5611    /**
5612     * @type {jQuery|HTMLElement|*}
5613     */
5614    const $showGridButton = $('.js-news-action-show-grid');
5615    /**
5616     * @type {jQuery|HTMLElement|*}
5617     */
5618    const $showListButton = $('.js-news-action-show-list');
5619    /**
5620     * @type {jQuery|HTMLElement|*}
5621     */
5622    const $newsContainer = $('.js-news-list');
5623    /**
5624     * @type {jQuery|HTMLElement|*}
5625     */
5626    const $newsArticleList = $('.js-news-article');
5627
5628    /**
5629     * @type {NewsItem[]}
5630     */
5631    const newsItemList = [];
5632
5633    /**
5634     * @param {Number} uid
5635     * @param {Number[]} categoryUidList
5636     * @param {Number[]} tagUidList
5637     * @param {Number[]} organizerUidList
5638     * @param {Number[]} locationUidList
5639     * @constructor
5640     */
5641    const NewsItem = function (uid, categoryUidList, tagUidList, organizerUidList, locationUidList) {
5642        const self = this;
5643        self.uid = uid;
5644        self.categoryUidList = categoryUidList;
5645        self.tagUidList = tagUidList;
5646        self.organizerUidList = organizerUidList;
5647        self.locationUidList = locationUidList;
5648
5649        /**
5650         * @param {Number} categoryUid
5651         * @returns {boolean}
5652         */
5653        self.hasCategoryUid = function (categoryUid) {
5654            return self.categoryUidList.indexOf(categoryUid) !== -1;
5655        };
5656
5657        /**
5658         * @param {Number} tagUid
5659         * @returns {boolean}
5660         */
5661        self.hasTagUid = function (tagUid) {
5662            return self.tagUidList.indexOf(tagUid) !== -1;
5663        };
5664
5665        /**
5666         * @param {Number} organizerUid
5667         * @returns {boolean}
5668         */
5669        self.hasOrganizerUid = function (organizerUid) {
5670            return self.organizerUidList.indexOf(organizerUid) !== -1;
5671        };
5672
5673        /**
5674         * @param {Number} locationUid
5675         * @returns {boolean}
5676         */
5677        self.hasLocationUid = function (locationUid) {
5678            return self.locationUidList.indexOf(locationUid) !== -1;
5679        };
5680
5681        return self;
5682    };
5683
5684    const initialize = function () {
5685        const categoryUidListAll = [];
5686        const tagUidListAll = [];
5687        const organizerUidListAll = [];
5688        const locationUidListAll = [];
5689        $newsItemElementList.each(function (_, e) {
5690            /**
5691             * @type {jQuery|HTMLElement|*}
5692             */
5693            const $element = $(e);
5694            const uid = Number($element.data('uid'));
5695            const categoryUidList = $element.attr('data-categories').split(',').map(function (c) {
5696                return Number(c);
5697            });
5698            const tagUidList = $element.attr('data-tags').split(',').map(function (t) {
5699                return Number(t);
5700            });
5701            const organizerUidList = [Number($element.attr('data-organizer'))];
5702            const locationUidList = [Number($element.attr('data-location'))];
5703
5704            newsItemList.push(new NewsItem(uid, categoryUidList, tagUidList, organizerUidList, locationUidList));
5705            categoryUidListAll.push(...categoryUidList);
5706            tagUidListAll.push(...tagUidList);
5707            organizerUidListAll.push(...organizerUidList);
5708            locationUidListAll.push(...locationUidList);
5709        });
5710
5711        hideFilterCheckboxes($categoryFilterCheckboxList, categoryUidListAll);
5712        hideFilterCheckboxes($tagFilterCheckboxList, tagUidListAll);
5713        hideFilterCheckboxes($organizerFilterCheckboxList, organizerUidListAll);
5714        hideFilterCheckboxes($locationFilterCheckboxList, locationUidListAll);
5715
5716        $categoryFilterCheckboxList.change(function (event) {
5717            toggleFilterCheckbox($(event.target));
5718        });
5719        $tagFilterCheckboxList.change(function (event) {
5720            toggleFilterCheckbox($(event.target));
5721        });
5722        $organizerFilterCheckboxList.change(function (event) {
5723          toggleFilterCheckbox($(event.target));
5724        });
5725        $locationFilterCheckboxList.change(function (event) {
5726          toggleFilterCheckbox($(event.target));
5727        });
5728        $resetButton.click(reset);
5729
5730        $showGridButton.click(function () {
5731            return toggleLayout('grid');
5732        });
5733        $showListButton.click(function () {
5734            return toggleLayout('list');
5735        });
5736        toggleLayout('grid');
5737    };
5738
5739    /**
5740     * @param {jQuery|HTMLElement|*} filterCheckboxList
5741     * @param {jQuery|HTMLElement|*} filterUidListAll
5742     */
5743    const hideFilterCheckboxes = function(filterCheckboxList, filterUidListAll) {
5744        filterCheckboxList.parents('li').hide();
5745        filterCheckboxList.each(function () {
5746            if (filterUidListAll.includes($(this).data('uid'))) {
5747              $(this).parents('li').show();
5748            }
5749        });
5750    };
5751
5752    /**
5753     * @param {jQuery|HTMLElement|*} $filterCheckbox
5754     */
5755    const toggleFilterCheckbox = function ($filterCheckbox) {
5756        const active = !$filterCheckbox.hasClass('active');
5757        $filterCheckbox.toggleClass('active', active);
5758        updateView();
5759    };
5760
5761    const reset = function () {
5762        const removeActiveClass = function (_, e) {
5763            $(e).removeClass('active');
5764        };
5765        $categoryFilterCheckboxList.each(removeActiveClass);
5766        $tagFilterCheckboxList.each(removeActiveClass);
5767
5768        updateView();
5769    };
5770
5771    const updateView = function () {
5772        const $activeCategoryList = $categoryFilterCheckboxList.filter('.active');
5773        const $activeTagList = $tagFilterCheckboxList.filter('.active');
5774        const $activeOrganizerList = $organizerFilterCheckboxList.filter('.active');
5775        const $activeLocationList = $locationFilterCheckboxList.filter('.active');
5776
5777        if ($activeCategoryList.length === 0 && $activeTagList.length === 0 && $activeOrganizerList.length === 0 && $activeLocationList.length === 0) {
5778            $newsItemElementList.show();
5779            $toolbarTitle.removeClass('active');
5780            return;
5781        }
5782
5783        $toolbarTitle.addClass('active');
5784
5785        /**
5786         * @type {NewsItem[]}
5787         */
5788        const newsItemSelection = [];
5789
5790        newsItemList.forEach(function (newsItem) {
5791            let isSelected = false;
5792            const activeFilterLists = [$activeCategoryList, $activeTagList, $activeOrganizerList, $activeLocationList];
5793            const hasFilterFunction = [newsItem.hasCategoryUid, newsItem.hasTagUid, newsItem.hasOrganizerUid, newsItem.hasLocationUid];
5794            /**
5795             * @param {Object} newsItem
5796             * @param {Array} activeFilterList
5797             * @param {function} hasFilter
5798             */
5799            const selectItems = function(newsItem, activeFilterList, hasFilter) {
5800                if (activeFilterList.length === 0) {
5801                  return true;
5802                }
5803                let isSelectedItem = false;
5804                activeFilterList.each(function() {
5805                  let filterUid = $(this).data('uid');
5806                  if (hasFilter(filterUid)) {
5807                    isSelectedItem = true;
5808                  }
5809                });
5810                return isSelectedItem;
5811            };
5812            /**
5813             * @param {Array} activeFilterLists
5814             * @param {Array} hasFilterFunction
5815             */
5816            const selectFilterItems = function(activeFilterLists, hasFilterFunction) {
5817                let isSelectedFilterItem = true;
5818                for (let i = 0; i < activeFilterLists.length; i++) {
5819                    if (!selectItems(newsItem, activeFilterLists[i], hasFilterFunction[i])) {
5820                      return false;
5821                    } else if (activeFilterLists[i + 1]) {
5822                      isSelectedFilterItem = selectItems(newsItem, activeFilterLists[i + 1], hasFilterFunction[i + 1]);
5823                    }
5824                }
5825                return isSelectedFilterItem;
5826            };
5827            isSelected = selectFilterItems(activeFilterLists, hasFilterFunction);
5828
5829            if (isSelected) {
5830              newsItemSelection.push(newsItem);
5831            }
5832        });
5833
5834        $newsItemElementList.hide();
5835        newsItemSelection.forEach(function (item) {
5836            const $newsItemElement = $newsContainer.find('[data-uid=' + item.uid + ']');
5837            $newsItemElement.show();
5838        });
5839    };
5840
5841    /**
5842     * @param {("grid"|"list")} layout
5843     */
5844    const toggleLayout = function (layout) {
5845        $newsContainer
5846            .removeClass('gwnews-list--type-grid')
5847            .removeClass('gwnews-list--type-list')
5848        ;
5849        $newsArticleList
5850            .removeClass('gwnews-preview--type-grid')
5851            .removeClass('gwnews-preview--type-list')
5852        ;
5853        $showGridButton.removeClass('active');
5854        $showListButton.removeClass('active');
5855
5856        $newsContainer.addClass('gwnews-list--type-' + layout);
5857        $newsArticleList.addClass('gwnews-preview--type-' + layout);
5858
5859        if (layout === 'grid') {
5860            $showGridButton.addClass('active');
5861            $newsArticleList.each(function (_, e) {
5862                const $article = $(e);
5863                const $articleLink = $article.find('.js-news-detail-link');
5864                const href = $articleLink.attr('href');
5865                $article.click(function () {
5866                    location.href = href;
5867                });
5868            });
5869        }
5870        if (layout === 'list') {
5871            $showListButton.addClass('active');
5872            $newsArticleList.each(function (_, e) {
5873                const $article = $(e);
5874                $article.off('click');
5875            });
5876        }
5877    };
5878
5879    initialize();
5880});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.