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
8
vendor: 11,807 bytes, lines 9-13
9/*! picturefill - v3.0.2 - 2016-02-12 10 * https://scottjehl.github.io/picturefill/ 11 * Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT 12 */ 13!function(a){var b=navigator.userAgent;a.HTMLPictureElement&&/ecko/.test(b)&&b.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var b,c=document.createElement("source"),d=function(a){var b,d,e=a.parentNode;"PICTURE"===e.nodeName.toUpperCase()?(b=c.cloneNode(),e.insertBefore(b,e.firstElementChild),setTimeout(function(){e.removeChild(b)})):(!a._pfLastSize||a.offsetWidth>a._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a<b.length;a++)d(b[a])},f=function(){clearTimeout(b),b=setTimeout(e,99)},g=a.matchMedia&&matchMedia("(orientation: landscape)"),h=function(){f(),g&&g.addListener&&g.addListener(f)};return c.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?h():document.addEventListener("DOMContentLoaded",h),f}())}(window),function(a,b,c){"use strict";function d(a){return" "===a||" "===a||"\n"===a||"\f"===a||"\r"===a}function e(b,c){var d=new a.Image;return d.onerror=function(){A[b]=!1,ba()},d.onload=function(){A[b]=1===d.width,ba()},d.src=c,"pending"}function f(){M=!1,P=a.devicePixelRatio,N={},O={},s.DPR=P||1,Q.width=Math.max(a.innerWidth||0,z.clientWidth),Q.height=Math.max(a.innerHeight||0,z.clientHeight),Q.vw=Q.width/100,Q.vh=Q.height/100,r=[Q.height,Q.width,P].join("-"),Q.em=s.getEmValue(),Q.rem=Q.em}function g(a,b,c,d){var e,f,g,h;return"saveData"===B.algorithm?a>2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c<e.length;c++)if(a===s.makeUrl(e[c].url)){d=e[c];break}return d}function l(a,b){var c,d,e,f,g=a.getElementsByTagName("source");for(c=0,d=g.length;d>c;c++)e=g[c],e[s.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function m(a,b){function c(b){var c,d=b.exec(a.substring(m));return d?(c=d[0],m+=c.length,c):void 0}function e(){var a,c,d,e,f,i,j,k,l,m=!1,o={};for(e=0;e<h.length;e++)f=h[e],i=f[f.length-1],j=f.substring(0,f.length-1),k=parseInt(j,10),l=parseFloat(j),X.test(j)&&"w"===i?((a||c)&&(m=!0),0===k?m=!0:a=k):Y.test(j)&&"x"===i?((a||c||d)&&(m=!0),0>l?m=!0:c=l):X.test(j)&&"h"===i?((d||c)&&(m=!0),0===k?m=!0:d=k):m=!0;m||(o.url=g,a&&(o.w=a),c&&(o.d=c),d&&(o.h=d),d||c||a||(o.d=1),1===o.d&&(b.has1x=!0),o.set=b,n.push(o))}function f(){for(c(T),i="",j="in descriptor";;){if(k=a.charAt(m),"in descriptor"===j)if(d(k))i&&(h.push(i),i="",j="after descriptor");else{if(","===k)return m+=1,i&&h.push(i),void e();if("("===k)i+=k,j="in parens";else{if(""===k)return i&&h.push(i),void e();i+=k}}else if("in parens"===j)if(")"===k)i+=k,j="in descriptor";else{if(""===k)return h.push(i),void e();i+=k}else if("after descriptor"===j)if(d(k));else{if(""===k)return void e();j="in descriptor",m-=1}m+=1}}for(var g,h,i,j,k,l=a.length,m=0,n=[];;){if(c(U),m>=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return k.test(a)&&parseFloat(a)>=0?!0:l.test(a)?!0:"0"===a||"-0"===a||"+0"===a?!0:!1}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;g>e;e++)if(h=f[e],i=h[h.length-1],c(i)){if(j=i,h.pop(),0===h.length)return j;if(h=h.join(" "),s.matchesMedia(h))return j}return"100vw"}b.createElement("picture");var o,p,q,r,s={},t=!1,u=function(){},v=b.createElement("img"),w=v.getAttribute,x=v.setAttribute,y=v.removeAttribute,z=b.documentElement,A={},B={algorithm:""},C="data-pfsrc",D=C+"set",E=navigator.userAgent,F=/rident/.test(E)||/ecko/.test(E)&&E.match(/rv\:(\d+)/)&&RegExp.$1>35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,"in":96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(f){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;e>d;d++)s.fillImg(c[d],f);s.teardownRun(f)}}};o=a.console&&console.warn?function(a){console.warn(a)}:u,G in v||(G="src"),A["image/jpeg"]=!0,A["image/gif"]=!0,A["image/png"]=!0,A["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),s.ns=("pf"+(new Date).getTime()).substr(0,9),s.supSrcset="srcset"in v,s.supSizes="sizes"in v,s.supPicture=!!a.HTMLPictureElement,s.supSrcset&&s.supPicture&&!s.supSizes&&!function(a){v.srcset="data:,a",a.src="data:,a",s.supSrcset=v.complete===a.complete,s.supPicture=s.supSrcset&&s.supPicture}(b.createElement("img")),s.supSrcset&&!s.supSizes?!function(){var a="data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",c="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d=b.createElement("img"),e=function(){var a=d.width;2===a&&(s.supSizes=!0),q=s.supSrcset&&!s.supSizes,t=!0,setTimeout(ba)};d.onload=e,d.onerror=e,d.setAttribute("sizes","9px"),d.srcset=c+" 1w,"+a+" 9w",d.src=c}():t=!0,s.selShort="picture>img,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return a?_(a):!0},s.calcLength=function(a){var b=_(a,!0)||!1;return 0>b&&(b=!1),b},s.supportsType=function(a){return a?A[a]:!0},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;d>c;c++)aa(b[c],a.sizes)}return b},s.setRes.res=aa,s.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,h,k,l,m,n,o=b[s.ns],p=s.DPR;if(k=o.curSrc||b[G],l=o.curCan||j(b,k,a[0].set),l&&l.set===a[0].set&&(n=F&&!b.complete&&l.res-.1>p,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;f>d;d++)if(c=a[d],c.res>=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b<f.length&&!e;b++)if(c=f[b],c.srcset&&s.matchesMedia(c.media)&&(d=s.supportsType(c.type))){"pending"===d&&(c=d),e=c;break}return e},s.parseSets=function(a,b,d){var e,f,g,h,i=b&&"PICTURE"===b.nodeName.toUpperCase(),j=a[s.ns];(j.src===c||d.src)&&(j.src=w.call(a,"src"),j.src?x.call(a,C,j.src):y.call(a,C)),(j.srcset===c||d.srcset||!s.supSrcset||a.srcset)&&(e=w.call(a,"srcset"),j.srcset=e,h=!0),j.sets=[],i&&(j.pic=!0,l(b,j.sets)),j.srcset?(f={srcset:j.srcset,sizes:w.call(a,"sizes")},j.sets.push(f),g=(q||j.src)&&H.test(j.srcset||""),g||!j.src||k(j.src,f)||f.has1x||(f.srcset+=", "+j.src,f.cands.push({url:j.src,d:1,set:f}))):j.src&&j.sets.push({srcset:j.src,sizes:null}),j.curCan=null,j.curSrc=c,j.supported=!(i||f&&!s.supSrcset||g&&!s.supSizes),h&&s.supSrcset&&!j.supported&&(e?(x.call(a,D,e),a.srcset=""):y.call(a,D)),j.supported&&!j.srcset&&(!j.src&&a.src||a.src!==s.makeUrl(j.src))&&(null===j.src?a.removeAttribute("src"):a.src=j.src),j.parsed=!0},s.fillImg=function(a,b){var c,d=b.reselect||b.reevaluate;a[s.ns]||(a[s.ns]={}),c=a[s.ns],(d||c.evaled!==r)&&((!c.parsed||b.reevaluate)&&s.parseSets(a,a.parentNode,b),c.supported?c.evaled=r:h(a))},s.setupRun=function(){(!S||M||P!==a.devicePixelRatio)&&f()},s.supPicture?(ba=u,s.fillImg=u):!function(){var c,d=a.attachEvent?/d$|^c/:/d$|^c|^i/,e=function(){var a=b.readyState||"";f=setTimeout(e,"loading"===a?200:999),b.body&&(s.fillImgs(),c=c||d.test(a),c&&clearTimeout(f))},f=setTimeout(e,b.body?9:99),g=function(a,b){var c,d,e=function(){var f=new Date-d;b>f?c=setTimeout(e,b-f):(c=null,a())};return function(){d=new Date,c||(c=setTimeout(e,b))}},h=z.clientHeight,i=function(){M=Math.max(a.innerWidth||0,z.clientWidth)!==Q.width||z.clientHeight!==h,h=z.clientHeight,M&&s.fillImgs()};Z(a,"resize",g(i,99)),Z(b,"readystatechange",e)}(),s.picturefill=ba,s.fillImgs=ba,s.teardownRun=u,ba._=s,a.picturefillCFG={pf:s,push:function(a){var b=a.shift();"function"==typeof s[b]?s[b].apply(s,a):(B[b]=a[0],S&&s.fillImgs({reselect:!0}))}};for(;J&&J.length;)a.picturefillCFG.push(J.shift());a.picturefill=ba,"object"==typeof module&&"object"==typeof module.exports?module.exports=ba:"function"==typeof define&&define.amd&&define("picturefill",function(){return ba}),s.supPicture||(A["image/webp"]=e("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);
vendor: 2,696 bytes, lines 13-19
13 14/*! 15 * Bootstrap v5.3.3 (https://getbootstrap.com/) 16 * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 17 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 18 */ 19!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)=>
vendor: 1,511 bytes, line 19
19{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;const $={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);
vendor: 6,668 bytes, line 19
19return 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.3"}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 e?e.split(",").map((t=>r(t))).join(","):null},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
19amed "${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
19amed "${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
19ing",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: 10,248 bytes, line 19
19_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)}))}_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
19amed "${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:[],dd:[],div:[],dl:[],dt:[],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 19
19this._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 19
19hide(){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
19amed "${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
19amed "${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=".dropdown-toggle",us=`:not(${ds})`,_s='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',gs=`.nav-link${us}, .list-group-item${us}, [role="tab"]${us}, ${_s}`,fs=`.${ls}[data-bs-toggle="tab"], .${ls}[data-bs-toggle="pill"], .${ls}[data-bs-toggle="list"]`;class ms 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}),ms.getOrCreateInstance(i).show())}_getChildren(){return K.find(gs,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(ds,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(gs)?t:K.findOne(gs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=ms.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,_s,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this)||ms.getOrCreateInstance(this).show()})),j.on(window,es,(()=>{for(const t of K.find(fs))ms.getOrCreateInstance(t)})),b(ms);const ps=".bs.toast",bs=`mouseover${ps}`,vs=`mouseout${ps}`,ys=`focusin${ps}`,ws=`focusout${ps}`,As=`hide${ps}`,Es=`hidden${ps}`,Cs=`show${ps}`,Ts=`shown${ps}`,ks="hide",$s="show",Ss="showing",Ls={animation:"boolean",autohide:"boolean",delay:"number"},Os={animation:!0,autohide:!0,delay:5e3};class Is extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Os}static get DefaultType(){return Ls}static get NAME(){return"toast"}show(){j.trigger(this._element,Cs).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(ks),g(this._element),this._element.classList.add($s,Ss),this._queueCallback((()=>{this._element.classList.remove(Ss),j.trigger(this._element,Ts),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(j.trigger(this._element,As).defaultPrevented||(this._element.classList.add(Ss),this._queueCallback((()=>{this._element.classList.add(ks),this._element.classList.remove(Ss,$s),j.trigger(this._element,Es)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove($s),super.dispose()}isShown(){return this._element.classList.contains($s)}_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()}_setListeners(){j.on(this._element,bs,(t=>this._onInteraction(t,!0))),j.on(this._element,vs,(t=>this._onInteraction(t,!1))),j.on(this._element,ys,(t=>this._onInteraction(t,!0))),j.on(this._element,ws,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Is.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method n
19amed "${t}"`);e[t](this)}}))}}return V(Is),b(Is),{Alert:U,Button:J,Carousel:Ot,Collapse:Rt,Dropdown:fe,Modal:Ue,Offcanvas:gi,Popover:Mi,ScrollSpy:Qi,Tab:ms,Toast:Is,Tooltip:Ni}})); 20//# sourceMappingURL=bootstrap.min.js.map 21/*! 22 * PhotoSwipe Lightbox 5.4.0 - https://photoswipe.com 23 * (c) 2023 Dmytro Semenov 24 */ 25!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 25
25content: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 25
25if(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 25-31
25ise.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)}))}}})); 26 27/*! 28 * PhotoSwipe 5.4.0 - https://photoswipe.com 29 * (c) 2023 Dmytro Semenov 30 */ 31!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 31
31if(!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 31
31)),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 31
31if(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 32-1145
32 33// 34// Owl Carousel v2.3.4 35// Copyright 2013-2018 David Deutsch 36// Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 37// 38 39// Swipe-Carousel (OwlCarousel) 40//--------------------------------------------------------- 41{ 42 !function (a, b, c, d) { 43 function e(b, c) { 44 this.settings = null, this.options = a.extend({}, e.Defaults, c), this.$element = a(b), this._handlers 45 = {}, this._plugins = {}, this._supress = {}, this._current = null, this._speed 46 = null, this._coordinates = [], this._breakpoint = null, this._width = null, this._items 47 = [], this._clones = [], this._mergers = [], this._widths = [], this._invalidated = {}, this._pipe 48 = [], this._drag = { 49 time : null, target : null, pointer : null, stage : {start : null, current : null}, direction : null 50 }, this._states = { 51 current : {}, tags : {initializing : ["busy"], animating : ["busy"], dragging : ["interacting"]} 52 }, a.each(["onResize", "onThrottledResize"], a.proxy(function (b, c) { 53 this._handlers[c] = a.proxy(this[c], this) 54 }, this)), a.each(e.Plugins, a.proxy(function (a, b) { 55 this._plugins[a.charAt(0).toLowerCase() + a.slice(1)] = new b(this) 56 }, this)), a.each(e.Workers, a.proxy(function (b, c) { 57 this._pipe.push({filter : c.filter, run : a.proxy(c.run, this)}) 58 }, this)), this.setup(), this.initialize() 59 } 60 61 e.Defaults = { 62 items : 3, 63 loop : !1, 64 center : !1, 65 rewind : !1, 66 checkVisibility : !0, 67 mouseDrag : !0, 68 touchDrag : !0, 69 pullDrag : !0, 70 freeDrag : !1, 71 margin : 0, 72 stagePadding : 0, 73 merge : !1, 74 mergeFit : !0, 75 autoWidth : !1, 76 startPosition : 0, 77 rtl : !1, 78 smartSpeed : 250, 79 fluidSpeed : !1, 80 dragEndSpeed : !1, 81 responsive : {}, 82 responsiveRefreshRate : 200, 83 responsiveBaseElement : b, 84 fallbackEasing : "swing", 85 slideTransition : "", 86 info : !1, 87 nestedItemSelector : !1, 88 itemElement : "div", 89 stageElement : "div", 90 refreshClass : "owl-refresh", 91 loadedClass : "owl-loaded", 92 loadingClass : "owl-loading", 93 rtlClass : "owl-rtl", 94 responsiveClass : "owl-responsive", 95 dragClass : "owl-drag", 96 itemClass : "owl-item", 97 stageClass : "owl-stage", 98 stageOuterClass : "owl-stage-outer", 99 grabClass : "owl-grab" 100 }, e.Width = {Default : "default", Inner : "inner", Outer : "outer"}, e.Type = { 101 Event : "event", State : "state" 102 }, e.Plugins = {}, e.Workers = [{ 103 filter : ["width", "settings"], run : function () { 104 this._width = this.$element.width() 105 } 106 }, { 107 filter : ["width", "items", "settings"], run : function (a) { 108 a.current = this._items && this._items[this.relative(this._current)] 109 } 110 }, { 111 filter : ["items", "settings"], run : function () { 112 this.$stage.children(".cloned").remove() 113 } 114 }, { 115 filter : ["width", "items", "settings"], run : function (a) { 116 var b = this.settings.margin || "", c = !this.settings.autoWidth, d = this.settings.rtl, 117 e = {width : "auto", "margin-left" : d ? b : "", "margin-right" : d ? "" : b}; 118 !c && this.$stage.children().css(e), a.css = e 119 } 120 }, { 121 filter : ["width", "items", "settings"], run : function (a) { 122 var b = (this.width() / this.settings.items).toFixed(3) - this.settings.margin, c = null, 123 d = this._items.length, e = !this.settings.autoWidth, f = []; 124 for (a.items = {merge : !1, width : b}; d--;) { 125 c = this._mergers[d], c = this.settings.mergeFit && Math.min(c, this.settings.items) 126 || c, a.items.merge = c > 1 || a.items.merge, f[d] = e ? b * c 127 : this._items[d].width(); 128 } 129 this._widths = f 130 } 131 }, { 132 filter : ["items", "settings"], run : function () { 133 var b = [], c = this._items, d = this.settings, e = Math.max(2 * d.items, 4), 134 f = 2 * Math.ceil(c.length / 2), g = d.loop && c.length ? d.rewind ? e : Math.max(e, f) : 0, h = "", 135 i = ""; 136 for (g /= 2; g > 0;) { 137 b.push(this.normalize(b.length / 2, !0)), h += c[b[b.length - 1]][0].outerHTML, b.push( 138 this.normalize(c.length - 1 - (b.length - 1) / 2, !0)), i = c[b[b.length - 1]][0].outerHTML 139 + i, g -= 1; 140 } 141 this._clones = b, a(h).addClass("cloned").appendTo(this.$stage), a(i).addClass("cloned").prependTo( 142 this.$stage) 143 } 144 }, { 145 filter : ["width", "items", "settings"], run : function () { 146 for (var a = this.settings.rtl ? 1 : -1, b = this._clones.length + this._items.length, c = -1, d = 0, 147 e = 0, f = []; ++c < b;) { 148 d = f[c - 1] || 0, e = this._widths[this.relative(c)] + this.settings.margin, f.push(d + e * a); 149 } 150 this._coordinates = f 151 } 152 }, { 153 filter : ["width", "items", "settings"], run : function () { 154 var a = this.settings.stagePadding, b = this._coordinates, c = { 155 width : Math.ceil(Math.abs(b[b.length - 1])) + 2 * a, 156 "padding-left" : a || "", 157 "padding-right" : a || "" 158 }; 159 this.$stage.css(c) 160 } 161 }, { 162 filter : ["width", "items", "settings"], run : function (a) { 163 var b = this._coordinates.length, c = !this.settings.autoWidth, d = this.$stage.children(); 164 if (c && a.items.merge) { 165 for (; b--;) { 166 a.css.width = this._widths[this.relative(b)], d.eq(b).css(a.css); 167 } 168 } 169 else { 170 c && (a.css.width = a.items.width, d.css(a.css)) 171 } 172 } 173 }, { 174 filter : ["items"], run : function () { 175 this._coordinates.length < 1 && this.$stage.removeAttr("style") 176 } 177 }, { 178 filter : ["width", "items", "settings"], run : function (a) { 179 a.current = a.current ? this.$stage.children().index(a.current) : 0, a.current = Math.max( 180 this.minimum(), Math.min(this.maximum(), a.current)), this.reset(a.current) 181 } 182 }, { 183 filter : ["position"], run : function () { 184 this.animate(this.coordinates(this._current)) 185 } 186 }, { 187 filter : ["width", "position", "items", "settings"], run : function () { 188 var a, b, c, d, e = this.settings.rtl ? 1 : -1, f = 2 * this.settings.stagePadding, 189 g = this.coordinates(this.current()) + f, h = g + this.width() * e, i = []; 190 for (c = 0, d = this._coordinates.length; c < d; c++) { 191 a = this._coordinates[c - 1] || 0, b = Math.abs(this._coordinates[c]) + f * e, (this.op(a, "<=", g) 192 && this.op(a, ">", 193 h) || this.op(b, "<", g) && this.op(b, ">", h)) && i.push(c); 194 } 195 this.$stage.children(".active").removeClass("active"), this.$stage.children( 196 ":eq(" + i.join("), :eq(") + ")").addClass("active"), this.$stage.children(".center").removeClass( 197 "center"), this.settings.center && this.$stage.children().eq(this.current()).addClass("center") 198 } 199 }], e.prototype.initializeStage = function () { 200 this.$stage = this.$element.find("." + this.settings.stageClass), this.$stage.length 201 || (this.$element.addClass( 202 this.options.loadingClass), this.$stage = a("<" + this.settings.stageElement + ">", 203 {class : this.settings.stageClass}).wrap( 204 a("<div/>", {class : this.settings.stageOuterClass})), this.$element.append(this.$stage.parent())) 205 }, e.prototype.initializeItems = function () { 206 var b = this.$element.find(".owl-item"); 207 if (b.length) { 208 return this._items = b.get().map(function (b) { 209 return a(b) 210 }), this._mergers = this._items.map(function () { 211 return 1 212 }), void this.refresh(); 213 } 214 this.replace(this.$element.children().not(this.$stage.parent())), this.isVisible() ? this.refresh() 215 : this.invalidate( 216 "width"), this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass) 217 }, e.prototype.initialize = function () { 218 if (this.enter("initializing"), this.trigger("initialize"), this.$element.toggleClass( 219 this.settings.rtlClass, this.settings.rtl), this.settings.autoWidth && !this.is("pre-loading")) { 220 var a, b, c; 221 a = this.$element.find("img"), b = this.settings.nestedItemSelector ? "." 222 + this.settings.nestedItemSelector 223 : d, c = this.$element.children( 224 b).width(), a.length && c <= 0 && this.preloadAutoWidthImages(a) 225 } 226 this.initializeStage(), this.initializeItems(), this.registerEventHandlers(), this.leave( 227 "initializing"), this.trigger("initialized") 228 }, e.prototype.isVisible = function () { 229 return !this.settings.checkVisibility || this.$element.is(":visible") 230 }, e.prototype.setup = function () { 231 var b = this.viewport(), c = this.options.responsive, d = -1, e = null; 232 c ? (a.each(c, function (a) { 233 a <= b && a > d && (d = Number(a)) 234 }), e = a.extend({}, this.options, c[d]), "function" == typeof e.stagePadding && (e.stagePadding 235 = e.stagePadding()), delete e.responsive, e.responsiveClass && this.$element.attr("class", 236 this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s", "g"), 237 "$1" + d))) : e = a.extend({}, this.options), this.trigger("change", 238 {property : {name : "settings", value : e}}), this._breakpoint = d, this.settings = e, this.invalidate( 239 "settings"), this.trigger("changed", {property : {name : "settings", value : this.settings}}) 240 }, e.prototype.optionsLogic = function () { 241 this.settings.autoWidth && (this.settings.stagePadding = !1, this.settings.merge = !1) 242 }, e.prototype.prepare = function (b) { 243 var c = this.trigger("prepare", {content : b}); 244 return c.data || (c.data = a("<" + this.settings.itemElement + "/>").addClass( 245 this.options.itemClass).append(b)), this.trigger("prepared", {content : c.data}), c.data 246 }, e.prototype.update = function () { 247 for (var b = 0, c = this._pipe.length, d = a.proxy(function (a) { 248 return this[a] 249 }, this._invalidated), e = {}; b < c;) { 250 (this._invalidated.all || a.grep(this._pipe[b].filter, d).length > 0) && this._pipe[b].run(e), b++; 251 } 252 this._invalidated = {}, !this.is("valid") && this.enter("valid") 253 }, e.prototype.width = function (a) { 254 switch (a = a || e.Width.Default) { 255 case e.Width.Inner: 256 case e.Width.Outer: 257 return this._width; 258 default: 259 return this._width - 2 * this.settings.stagePadding + this.settings.margin 260 } 261 }, e.prototype.refresh = function () { 262 this.enter("refreshing"), this.trigger( 263 "refresh"), this.setup(), this.optionsLogic(), this.$element.addClass( 264 this.options.refreshClass), this.update(), this.$element.removeClass( 265 this.options.refreshClass), this.leave("refreshing"), this.trigger("refreshed") 266 }, e.prototype.onThrottledResize = function () { 267 b.clearTimeout(this.resizeTimer), this.resizeTimer = b.setTimeout(this._handlers.onResize, 268 this.settings.responsiveRefreshRate) 269 }, e.prototype.onResize = function () { 270 return !!this._items.length && (this._width !== this.$element.width() && (!!this.isVisible() && (this.enter( 271 "resizing"), this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"), !1) 272 : (this.invalidate( 273 "width"), this.refresh(), this.leave("resizing"), void this.trigger("resized"))))) 274 }, e.prototype.registerEventHandlers = function () { 275 a.support.transition && this.$stage.on(a.support.transition.end + ".owl.core", 276 a.proxy(this.onTransitionEnd, this)), !1 !== this.settings.responsive && this.on(b, "resize", 277 this._handlers.onThrottledResize), this.settings.mouseDrag && (this.$element.addClass( 278 this.options.dragClass), this.$stage.on("mousedown.owl.core", 279 a.proxy(this.onDragStart, this)), this.$stage.on("dragstart.owl.core selectstart.owl.core", 280 function () { 281 return !1 282 })), this.settings.touchDrag && (this.$stage.on("touchstart.owl.core", 283 a.proxy(this.onDragStart, this)), this.$stage.on("touchcancel.owl.core", a.proxy(this.onDragEnd, this))) 284 }, e.prototype.onDragStart = function (b) { 285 var d = null; 286 3 !== b.which && (a.support.transform ? (d = this.$stage.css("transform").replace(/.*\(|\)| /g, "").split( 287 ","), d = {x : d[16 === d.length ? 12 : 4], y : d[16 === d.length ? 13 : 5]}) : (d 288 = this.$stage.position(), d = { 289 x : this.settings.rtl ? d.left + this.$stage.width() - this.width() + this.settings.margin : d.left, 290 y : d.top 291 }), this.is("animating") && (a.support.transform ? this.animate(d.x) : this.$stage.stop(), this.invalidate( 292 "position")), this.$element.toggleClass(this.options.grabClass, "mousedown" === b.type), this.speed( 293 0), this._drag.time = (new Date).getTime(), this._drag.target = a(b.target), this._drag.stage.start 294 = d, this._drag.stage.current = d, this._drag.pointer = this.pointer(b), a(c).on( 295 "mouseup.owl.core touchend.owl.core", a.proxy(this.onDragEnd, this)), a(c).one( 296 "mousemove.owl.core touchmove.owl.core", a.proxy(function (b) { 297 var d = this.difference(this._drag.pointer, this.pointer(b)); 298 a(c).on("mousemove.owl.core touchmove.owl.core", a.proxy(this.onDragMove, this)), Math.abs(d.x) 299 < Math.abs(d.y) 300 && this.is( 301 "valid") || (b.preventDefault(), this.enter("dragging"), this.trigger("drag")) 302 }, this))) 303 }, e.prototype.onDragMove = function (a) { 304 var b = null, c = null, d = null, e = this.difference(this._drag.pointer, this.pointer(a)), 305 f = this.difference(this._drag.stage.start, e); 306 this.is("dragging") && (a.preventDefault(), this.settings.loop ? (b = this.coordinates(this.minimum()), c 307 = this.coordinates(this.maximum() + 1) - b, f.x = ((f.x - b) % c + c) % c + b) : (b = this.settings.rtl 308 ? this.coordinates( 309 this.maximum()) : this.coordinates(this.minimum()), c = this.settings.rtl ? this.coordinates( 310 this.minimum()) : this.coordinates(this.maximum()), d = this.settings.pullDrag ? -1 * e.x / 5 : 0, f.x 311 = Math.max(Math.min(f.x, b + d), c + d)), this._drag.stage.current = f, this.animate(f.x)) 312 }, e.prototype.onDragEnd = function (b) { 313 var d = this.difference(this._drag.pointer, this.pointer(b)), e = this._drag.stage.current, 314 f = d.x > 0 ^ this.settings.rtl ? "left" : "right"; 315 a(c).off(".owl.core"), this.$element.removeClass(this.options.grabClass), (0 !== d.x && this.is("dragging") 316 || !this.is("valid")) 317 && (this.speed( 318 this.settings.dragEndSpeed || this.settings.smartSpeed), this.current( 319 this.closest(e.x, 0 !== d.x ? f : this._drag.direction)), this.invalidate( 320 "position"), this.update(), this._drag.direction = f, (Math.abs(d.x) > 3 || (new Date).getTime() 321 - this._drag.time > 300) 322 && this._drag.target.one( 323 "click.owl.core", function () { 324 return !1 325 })), this.is("dragging") && (this.leave("dragging"), this.trigger("dragged")) 326 }, e.prototype.closest = function (b, c) { 327 var e = -1, f = 30, g = this.width(), h = this.coordinates(); 328 return this.settings.freeDrag || a.each(h, a.proxy(function (a, i) { 329 return "left" === c && b > i - f && b < i + f ? e = a : "right" === c && b > i - g - f && b < i - g + f 330 ? e = a + 1 : this.op(b, "<", i) && this.op(b, 331 ">", h[a + 1] !== d ? h[a + 1] : i - g) && (e = "left" === c ? a + 1 : a), -1 === e 332 }, this)), this.settings.loop || (this.op(b, ">", h[this.minimum()]) ? e = b = this.minimum() : this.op(b, 333 "<", h[this.maximum()]) && (e = b = this.maximum())), e 334 }, e.prototype.animate = function (b) { 335 var c = this.speed() > 0; 336 this.is("animating") && this.onTransitionEnd(), c && (this.enter("animating"), this.trigger( 337 "translate")), a.support.transform3d && a.support.transition ? this.$stage.css({ 338 transform : "translate3d(" + b + "px,0px,0px)", 339 transition : this.speed() / 1e3 + "s" + (this.settings.slideTransition ? " " 340 + this.settings.slideTransition : "") 341 }) : c ? this.$stage.animate({left : b + "px"}, this.speed(), this.settings.fallbackEasing, 342 a.proxy(this.onTransitionEnd, this)) : this.$stage.css({left : b + "px"}) 343 }, e.prototype.is = function (a) { 344 return this._states.current[a] && this._states.current[a] > 0 345 }, e.prototype.current = function (a) { 346 if (a === d) { 347 return this._current; 348 } 349 if (0 === this._items.length) { 350 return d; 351 } 352 if (a = this.normalize(a), this._current !== a) { 353 var b = this.trigger("change", {property : {name : "position", value : a}}); 354 b.data !== d && (a = this.normalize(b.data)), this._current = a, this.invalidate( 355 "position"), this.trigger("changed", {property : {name : "position", value : this._current}}) 356 } 357 return this._current 358 }, e.prototype.invalidate = function (b) { 359 return "string" === a.type(b) && (this._invalidated[b] = !0, this.is("valid") && this.leave( 360 "valid")), a.map(this._invalidated, function (a, b) { 361 return b 362 }) 363 }, e.prototype.reset = function (a) { 364 (a = this.normalize(a)) !== d && (this._speed = 0, this._current = a, this.suppress( 365 ["translate", "translated"]), this.animate(this.coordinates(a)), this.release( 366 ["translate", "translated"])) 367 }, e.prototype.normalize = function (a, b) { 368 var c = this._items.length, e = b ? 0 : this._clones.length; 369 return !this.isNumeric(a) || c < 1 ? a = d : (a < 0 || a >= c + e) && (a = ((a - e / 2) % c + c) % c + e 370 / 2), a 371 }, e.prototype.relative = function (a) { 372 return a -= this._clones.length / 2, this.normalize(a, !0) 373 }, e.prototype.maximum = function (a) { 374 var b, c, d, e = this.settings, f = this._coordinates.length; 375 if (e.loop) { 376 f = this._clones.length / 2 + this._items.length - 1; 377 } 378 else if (e.autoWidth || e.merge) { 379 if (b = this._items.length) { 380 for (c = this._items[--b].width(), d = this.$element.width(); 381 b-- && !((c += this._items[b].width() + this.settings.margin) > d);) { 382 ; 383 } 384 } 385 f = b + 1 386 } 387 else { 388 f = e.center ? this._items.length - 1 : this._items.length - e.items; 389 } 390 return a && (f -= this._clones.length / 2), Math.max(f, 0) 391 }, e.prototype.minimum = function (a) { 392 return a ? 0 : this._clones.length / 2 393 }, e.prototype.items = function (a) { 394 return a === d ? this._items.slice() : (a = this.normalize(a, !0), this._items[a]) 395 }, e.prototype.mergers = function (a) { 396 return a === d ? this._mergers.slice() : (a = this.normalize(a, !0), this._mergers[a]) 397 }, e.prototype.clones = function (b) { 398 var c = this._clones.length / 2, e = c + this._items.length, f = function (a) { 399 return a % 2 == 0 ? e + a / 2 : c - (a + 1) / 2 400 }; 401 return b === d ? a.map(this._clones, function (a, b) { 402 return f(b) 403 }) : a.map(this._clones, function (a, c) { 404 return a === b ? f(c) : null 405 }) 406 }, e.prototype.speed = function (a) { 407 return a !== d && (this._speed = a), this._speed 408 }, e.prototype.coordinates = function (b) { 409 var c, e = 1, f = b - 1; 410 return b === d ? a.map(this._coordinates, a.proxy(function (a, b) { 411 return this.coordinates(b) 412 }, this)) : (this.settings.center ? (this.settings.rtl && (e = -1, f = b + 1), c = this._coordinates[b], c 413 += (this.width() - c + (this._coordinates[f] || 0)) / 2 * e) : c = this._coordinates[f] || 0, c 414 = Math.ceil(c)) 415 }, e.prototype.duration = function (a, b, c) { 416 return 0 === c ? 0 : Math.min(Math.max(Math.abs(b - a), 1), 6) * Math.abs(c || this.settings.smartSpeed) 417 }, e.prototype.to = function (a, b) { 418 var c = this.current(), d = null, e = a - this.relative(c), f = (e > 0) - (e < 0), g = this._items.length, 419 h = this.minimum(), i = this.maximum(); 420 this.settings.loop ? (!this.settings.rewind && Math.abs(e) > g / 2 && (e += -1 * f * g), a = c + e, (d = ((a 421 - h) 422 % g 423 + g) 424 % g 425 + h) 426 !== a 427 && d - e 428 <= i 429 && d - e 430 > 0 431 && (c 432 = d - e, a = d, this.reset(c))) : this.settings.rewind ? (i += 1, a = (a % i + i) % i) : a = Math.max(h, 433 Math.min(i, a)), this.speed(this.duration(c, a, b)), this.current(a), this.isVisible() && this.update() 434 }, e.prototype.next = function (a) { 435 a = a || !1, this.to(this.relative(this.current()) + 1, a) 436 }, e.prototype.prev = function (a) { 437 a = a || !1, this.to(this.relative(this.current()) - 1, a) 438 }, e.prototype.onTransitionEnd = function (a) { 439 if (a !== d && (a.stopPropagation(), (a.target || a.srcElement || a.originalTarget) !== this.$stage.get( 440 0))) { 441 return !1; 442 } 443 this.leave("animating"), this.trigger("translated") 444 }, e.prototype.viewport = function () { 445 var d; 446 return this.options.responsiveBaseElement !== b ? d = a(this.options.responsiveBaseElement).width() 447 : b.innerWidth ? d = b.innerWidth : c.documentElement 448 && c.documentElement.clientWidth 449 ? d 450 = c.documentElement.clientWidth 451 : console.warn( 452 "Can not detect viewport width."), d 453 }, e.prototype.replace = function (b) { 454 this.$stage.empty(), this._items = [], b && (b = b instanceof jQuery ? b : a( 455 b)), this.settings.nestedItemSelector && (b = b.find("." + this.settings.nestedItemSelector)), b.filter( 456 function () { 457 return 1 === this.nodeType 458 }).each(a.proxy(function (a, b) { 459 b = this.prepare(b), this.$stage.append(b), this._items.push(b), this._mergers.push( 460 1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1) 461 }, this)), this.reset( 462 this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0), this.invalidate("items") 463 }, e.prototype.add = function (b, c) { 464 var e = this.relative(this._current); 465 c = c === d ? this._items.length : this.normalize(c, !0), b = b instanceof jQuery ? b : a(b), this.trigger( 466 "add", {content : b, position : c}), b = this.prepare(b), 0 === this._items.length || c 467 === this._items.length ? (0 468 === this._items.length 469 && this.$stage.append( 470 b), 0 !== this._items.length && this._items[c - 1].after(b), this._items.push(b), this._mergers.push( 471 1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)) : (this._items[c].before( 472 b), this._items.splice(c, 0, b), this._mergers.splice(c, 0, 473 1 * b.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)), this._items[e] 474 && this.reset( 475 this._items[e].index()), this.invalidate("items"), this.trigger("added", {content : b, position : c}) 476 }, e.prototype.remove = function (a) { 477 (a = this.normalize(a, !0)) !== d && (this.trigger("remove", 478 {content : this._items[a], position : a}), this._items[a].remove(), this._items.splice(a, 479 1), this._mergers.splice(a, 1), this.invalidate("items"), this.trigger("removed", 480 {content : null, position : a})) 481 }, e.prototype.preloadAutoWidthImages = function (b) { 482 b.each(a.proxy(function (b, c) { 483 this.enter("pre-loading"), c = a(c), a(new Image).one("load", a.proxy(function (a) { 484 c.attr("src", a.target.src), c.css("opacity", 1), this.leave("pre-loading"), !this.is("pre-loading") 485 && !this.is( 486 "initializing") && this.refresh() 487 }, this)).attr("src", c.attr("src") || c.attr("data-src") || c.attr("data-src-retina")) 488 }, this)) 489 }, e.prototype.destroy = function () { 490 this.$element.off(".owl.core"), this.$stage.off(".owl.core"), a(c).off(".owl.core"), !1 491 !== this.settings.responsive 492 && (b.clearTimeout( 493 this.resizeTimer), this.off(b, "resize", this._handlers.onThrottledResize)); 494 for (var d in this._plugins) { 495 this._plugins[d].destroy(); 496 } 497 this.$stage.children( 498 ".cloned").remove(), this.$stage.unwrap(), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$stage.remove(), this.$element.removeClass( 499 this.options.refreshClass).removeClass(this.options.loadingClass).removeClass( 500 this.options.loadedClass).removeClass(this.options.rtlClass).removeClass( 501 this.options.dragClass).removeClass(this.options.grabClass).attr("class", 502 this.$element.attr("class").replace(new RegExp(this.options.responsiveClass + "-\\S+\\s", "g"), 503 "")).removeData("owl.carousel") 504 }, e.prototype.op = function (a, b, c) { 505 var d = this.settings.rtl; 506 switch (b) { 507 case"<": 508 return d ? a > c : a < c; 509 case">": 510 return d ? a < c : a > c; 511 case">=": 512 return d ? a <= c : a >= c; 513 case"<=": 514 return d ? a >= c : a <= c 515 } 516 }, e.prototype.on = function (a, b, c, d) { 517 a.addEventListener ? a.addEventListener(b, c, d) : a.attachEvent && a.attachEvent("on" + b, c) 518 }, e.prototype.off = function (a, b, c, d) { 519 a.removeEventListener ? a.removeEventListener(b, c, d) : a.detachEvent && a.detachEvent("on" + b, c) 520 }, e.prototype.trigger = function (b, c, d, f, g) { 521 var h = {item : {count : this._items.length, index : this.current()}}, 522 i = a.camelCase(a.grep(["on", b, d], function (a) { 523 return a 524 }).join("-").toLowerCase()), j = a.Event([b, "owl", d || "carousel"].join(".").toLowerCase(), 525 a.extend({relatedTarget : this}, h, c)); 526 return this._supress[b] || (a.each(this._plugins, function (a, b) { 527 b.onTrigger && b.onTrigger(j) 528 }), this.register({type : e.Type.Event, name : b}), this.$element.trigger(j), this.settings && "function" 529 == typeof this.settings[i] 530 && this.settings[i].call(this, 531 j)), j 532 }, e.prototype.enter = function (b) { 533 a.each([b].concat(this._states.tags[b] || []), a.proxy(function (a, b) { 534 this._states.current[b] === d && (this._states.current[b] = 0), this._states.current[b]++ 535 }, this)) 536 }, e.prototype.leave = function (b) { 537 a.each([b].concat(this._states.tags[b] || []), a.proxy(function (a, b) { 538 this._states.current[b]-- 539 }, this)) 540 }, e.prototype.register = function (b) { 541 if (b.type === e.Type.Event) { 542 if (a.event.special[b.name] || (a.event.special[b.name] = {}), !a.event.special[b.name].owl) { 543 var c = a.event.special[b.name]._default; 544 a.event.special[b.name]._default = function (a) { 545 return !c || !c.apply || a.namespace && -1 !== a.namespace.indexOf("owl") ? a.namespace 546 && a.namespace.indexOf( 547 "owl") > -1 : c.apply(this, arguments) 548 }, a.event.special[b.name].owl = !0 549 } 550 } 551 else { 552 b.type === e.Type.State && (this._states.tags[b.name] ? this._states.tags[b.name] 553 = this._states.tags[b.name].concat(b.tags) : this._states.tags[b.name] 554 = b.tags, this._states.tags[b.name] = a.grep(this._states.tags[b.name], 555 a.proxy(function (c, d) { 556 return a.inArray(c, this._states.tags[b.name]) === d 557 }, this))) 558 } 559 }, e.prototype.suppress = function (b) { 560 a.each(b, a.proxy(function (a, b) { 561 this._supress[b] = !0 562 }, this)) 563 }, e.prototype.release = function (b) { 564 a.each(b, a.proxy(function (a, b) { 565 delete this._supress[b] 566 }, this)) 567 }, e.prototype.pointer = function (a) { 568 var c = {x : null, y : null}; 569 return a = a.originalEvent || a || b.event, a = a.touches && a.touches.length ? a.touches[0] 570 : a.changedTouches 571 && a.changedTouches.length 572 ? a.changedTouches[0] 573 : a, a.pageX ? (c.x 574 = a.pageX, c.y = a.pageY) : (c.x = a.clientX, c.y = a.clientY), c 575 }, e.prototype.isNumeric = function (a) { 576 return !isNaN(parseFloat(a)) 577 }, e.prototype.difference = function (a, b) { 578 return {x : a.x - b.x, y : a.y - b.y} 579 }, a.fn.owlCarousel = function (b) { 580 var c = Array.prototype.slice.call(arguments, 1); 581 return this.each(function () { 582 var d = a(this), f = d.data("owl.carousel"); 583 f || (f = new e(this, "object" == typeof b && b), d.data("owl.carousel", f), a.each( 584 ["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function (b, c) { 585 f.register({type : e.Type.Event, name : c}), f.$element.on(c + ".owl.carousel.core", 586 a.proxy(function (a) { 587 a.namespace && a.relatedTarget !== this && (this.suppress([c]), f[c].apply(this, 588 [].slice.call(arguments, 1)), this.release([c])) 589 }, f)) 590 })), "string" == typeof b && "_" !== b.charAt(0) && f[b].apply(f, c) 591 }) 592 }, a.fn.owlCarousel.Constructor = e 593 }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 594 var e = function (b) { 595 this._core = b, this._interval = null, this._visible = null, this._handlers = { 596 "initialized.owl.carousel" : a.proxy(function (a) { 597 a.namespace && this._core.settings.autoRefresh && this.watch() 598 }, this) 599 }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers) 600 }; 601 e.Defaults = {autoRefresh : !0, autoRefreshInterval : 500}, e.prototype.watch = function () { 602 this._interval || (this._visible = this._core.isVisible(), this._interval = b.setInterval( 603 a.proxy(this.refresh, this), this._core.settings.autoRefreshInterval)) 604 }, e.prototype.refresh = function () { 605 this._core.isVisible() !== this._visible && (this._visible 606 = !this._visible, this._core.$element.toggleClass("owl-hidden", !this._visible), this._visible 607 && this._core.invalidate("width") && this._core.refresh()) 608 }, e.prototype.destroy = function () { 609 var a, c; 610 b.clearInterval(this._interval); 611 for (a in this._handlers) { 612 this._core.$element.off(a, this._handlers[a]); 613 } 614 for (c in Object.getOwnPropertyNames(this)) { 615 "function" != typeof this[c] && (this[c] = null) 616 } 617 }, a.fn.owlCarousel.Constructor.Plugins.AutoRefresh = e 618 }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 619 var e = function (b) { 620 this._core = b, this._loaded = [], this._handlers = { 621 "initialized.owl.carousel change.owl.carousel resized.owl.carousel" : a.proxy(function (b) { 622 if (b.namespace && this._core.settings && this._core.settings.lazyLoad && (b.property && "position" 623 == b.property.name 624 || "initialized" 625 == b.type)) { 626 var c = this._core.settings, e = c.center && Math.ceil(c.items / 2) || c.items, 627 f = c.center && -1 * e || 0, 628 g = (b.property && b.property.value !== d ? b.property.value : this._core.current()) + f, 629 h = this._core.clones().length, i = a.proxy(function (a, b) { 630 this.load(b) 631 }, this); 632 for (c.lazyLoadEager > 0 && (e += c.lazyLoadEager, c.loop && (g -= c.lazyLoadEager, e++)); 633 f++ < e;) { 634 this.load(h / 2 + this._core.relative(g)), h && a.each( 635 this._core.clones(this._core.relative(g)), i), g++ 636 } 637 } 638 }, this) 639 }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on(this._handlers) 640 }; 641 e.Defaults = {lazyLoad : !1, lazyLoadEager : 0}, e.prototype.load = function (c) { 642 var d = this._core.$stage.children().eq(c), e = d && d.find(".owl-lazy"); 643 !e || a.inArray(d.get(0), this._loaded) > -1 || (e.each(a.proxy(function (c, d) { 644 var e, f = a(d), 645 g = b.devicePixelRatio > 1 && f.attr("data-src-retina") || f.attr("data-src") || f.attr( 646 "data-srcset"); 647 this._core.trigger("load", {element : f, url : g}, "lazy"), f.is("img") ? f.one("load.owl.lazy", 648 a.proxy(function () { 649 f.css("opacity", 1), this._core.trigger("loaded", {element : f, url : g}, "lazy") 650 }, this)).attr("src", g) : f.is("source") ? f.one("load.owl.lazy", a.proxy(function () { 651 this._core.trigger("loaded", {element : f, url : g}, "lazy") 652 }, this)).attr("srcset", g) : (e = new Image, e.onload = a.proxy(function () { 653 f.css({"background-image" : 'url("' + g + '")', opacity : "1"}), this._core.trigger("loaded", 654 {element : f, url : g}, "lazy") 655 }, this), e.src = g) 656 }, this)), this._loaded.push(d.get(0))) 657 }, e.prototype.destroy = function () { 658 var a, b; 659 for (a in this.handlers) { 660 this._core.$element.off(a, this.handlers[a]); 661 } 662 for (b in Object.getOwnPropertyNames(this)) { 663 "function" != typeof this[b] && (this[b] = null) 664 } 665 }, a.fn.owlCarousel.Constructor.Plugins.Lazy = e 666 }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 667 var e = function (c) { 668 this._core = c, this._previousHeight = null, this._handlers = { 669 "initialized.owl.carousel refreshed.owl.carousel" : a.proxy(function (a) { 670 a.namespace && this._core.settings.autoHeight && this.update() 671 }, this), "changed.owl.carousel" : a.proxy(function (a) { 672 a.namespace && this._core.settings.autoHeight && "position" === a.property.name && this.update() 673 }, this), "loaded.owl.lazy" : a.proxy(function (a) { 674 a.namespace && this._core.settings.autoHeight && a.element.closest( 675 "." + this._core.settings.itemClass).index() === this._core.current() && this.update() 676 }, this) 677 }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on( 678 this._handlers), this._intervalId = null; 679 var d = this; 680 a(b).on("load", function () { 681 d._core.settings.autoHeight && d.update() 682 }), a(b).resize(function () { 683 d._core.settings.autoHeight && (null != d._intervalId && clearTimeout(d._intervalId), d._intervalId 684 = setTimeout(function () { 685 d.update() 686 }, 250)) 687 }) 688 }; 689 e.Defaults = {autoHeight : !1, autoHeightClass : "owl-height"}, e.prototype.update = function () { 690 var b = this._core._current, c = b + this._core.settings.items, d = this._core.settings.lazyLoad, 691 e = this._core.$stage.children().toArray().slice(b, c), f = [], g = 0; 692 a.each(e, function (b, c) { 693 f.push(a(c).height()) 694 }), g = Math.max.apply(null, f), g <= 1 && d && this._previousHeight && (g 695 = this._previousHeight), this._previousHeight = g, this._core.$stage.parent().height(g).addClass( 696 this._core.settings.autoHeightClass) 697 }, e.prototype.destroy = function () { 698 var a, b; 699 for (a in this._handlers) { 700 this._core.$element.off(a, this._handlers[a]); 701 } 702 for (b in Object.getOwnPropertyNames(this)) { 703 "function" != typeof this[b] && (this[b] = null) 704 } 705 }, a.fn.owlCarousel.Constructor.Plugins.AutoHeight = e 706 }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 707 var e = function (b) { 708 this._core = b, this._videos = {}, this._playing = null, this._handlers = { 709 "initialized.owl.carousel" : a.proxy(function (a) { 710 a.namespace && this._core.register({type : "state", name : "playing", tags : ["interacting"]}) 711 }, this), "resize.owl.carousel" : a.proxy(function (a) { 712 a.namespace && this._core.settings.video && this.isInFullScreen() && a.preventDefault() 713 }, this), "refreshed.owl.carousel" : a.proxy(function (a) { 714 a.namespace && this._core.is("resizing") && this._core.$stage.find( 715 ".cloned .owl-video-frame").remove() 716 }, this), "changed.owl.carousel" : a.proxy(function (a) { 717 a.namespace && "position" === a.property.name && this._playing && this.stop() 718 }, this), "prepared.owl.carousel" : a.proxy(function (b) { 719 if (b.namespace) { 720 var c = a(b.content).find(".owl-video"); 721 c.length && (c.css("display", "none"), this.fetch(c, a(b.content))) 722 } 723 }, this) 724 }, this._core.options = a.extend({}, e.Defaults, this._core.options), this._core.$element.on( 725 this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", 726 a.proxy(function (a) { 727 this.play(a) 728 }, this)) 729 }; 730 e.Defaults = {video : !1, videoHeight : !1, videoWidth : !1}, e.prototype.fetch = function (a, b) { 731 var c = function () { 732 return a.attr("data-vimeo-id") ? "vimeo" : a.attr("data-vzaar-id") ? "vzaar" : "youtube" 733 }(), d = a.attr("data-vimeo-id") || a.attr("data-youtube-id") || a.attr("data-vzaar-id"), 734 e = a.attr("data-width") || this._core.settings.videoWidth, 735 f = a.attr("data-height") || this._core.settings.videoHeight, g = a.attr("href"); 736 if (!g) { 737 throw new Error("Missing video URL."); 738 } 739 if (d = g.match( 740 /(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( 741 "youtu") > -1) { 742 c = "youtube"; 743 } 744 else if (d[3].indexOf("vimeo") > -1) { 745 c = "vimeo"; 746 } 747 else { 748 if (!(d[3].indexOf("vzaar") > -1)) { 749 throw new Error("Video URL not supported."); 750 } 751 c = "vzaar" 752 } 753 d = d[6], this._videos[g] = {type : c, id : d, width : e, height : f}, b.attr("data-video", 754 g), this.thumbnail(a, this._videos[g]) 755 }, e.prototype.thumbnail = function (b, c) { 756 var d, e, f, g = c.width && c.height ? "width:" + c.width + "px;height:" + c.height + "px;" : "", 757 h = b.find("img"), i = "src", j = "", k = this._core.settings, l = function (c) { 758 e = '<div class="owl-video-play-icon"></div>', d = k.lazyLoad ? a("<div/>", 759 {class : "owl-video-tn " + j, srcType : c}) : a("<div/>", 760 {class : "owl-video-tn", style : "opacity:1;background-image:url(" + c + ")"}), b.after(d), b.after( 761 e) 762 }; 763 if (b.wrap(a("<div/>", {class : "owl-video-wrapper", style : g})), this._core.settings.lazyLoad && (i 764 = "data-src", j = "owl-lazy"), h.length) { 765 return l(h.attr(i)), h.remove(), !1; 766 } 767 "youtube" === c.type ? (f = "//img.youtube.com/vi/" + c.id + "/hqdefault.jpg", l(f)) : "vimeo" === c.type 768 ? a.ajax({ 769 type : "GET", 770 url : "//vimeo.com/api/v2/video/" + c.id + ".json", 771 jsonp : "callback", 772 dataType : "jsonp", 773 success : function (a) { 774 f = a[0].thumbnail_large, l(f) 775 } 776 }) : "vzaar" === c.type && a.ajax({ 777 type : "GET", 778 url : "//vzaar.com/api/videos/" + c.id + ".json", 779 jsonp : "callback", 780 dataType : "jsonp", 781 success : function (a) { 782 f = a.framegrab_url, l(f) 783 } 784 }) 785 }, e.prototype.stop = function () { 786 this._core.trigger("stop", null, "video"), this._playing.find( 787 ".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing 788 = null, this._core.leave("playing"), this._core.trigger("stopped", null, "video") 789 }, e.prototype.play = function (b) { 790 var c, d = a(b.target), e = d.closest("." + this._core.settings.itemClass), 791 f = this._videos[e.attr("data-video")], g = f.width || "100%", 792 h = f.height || this._core.$stage.height(); 793 this._playing || (this._core.enter("playing"), this._core.trigger("play", null, "video"), e 794 = this._core.items(this._core.relative(e.index())), this._core.reset(e.index()), c = a( 795 '<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'), c.attr( 796 "height", h), c.attr("width", g), "youtube" === f.type ? c.attr("src", 797 "//www.youtube.com/embed/" + f.id + "?autoplay=1&rel=0&v=" + f.id) : "vimeo" === f.type ? c.attr("src", 798 "//player.vimeo.com/video/" + f.id + "?autoplay=1") : "vzaar" === f.type && c.attr("src", 799 "//view.vzaar.com/" + f.id + "/player?autoplay=true"), a(c).wrap( 800 '<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")), this._playing = e.addClass( 801 "owl-video-playing")) 802 }, e.prototype.isInFullScreen = function () { 803 var b = c.fullscreenElement || c.mozFullScreenElement || c.webkitFullscreenElement; 804 return b && a(b).parent().hasClass("owl-video-frame") 805 }, e.prototype.destroy = function () { 806 var a, b; 807 this._core.$element.off("click.owl.video"); 808 for (a in this._handlers) { 809 this._core.$element.off(a, this._handlers[a]); 810 } 811 for (b in Object.getOwnPropertyNames(this)) { 812 "function" != typeof this[b] && (this[b] = null) 813 } 814 }, a.fn.owlCarousel.Constructor.Plugins.Video = e 815 }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 816 var e = function (b) { 817 this.core = b, this.core.options = a.extend({}, e.Defaults, this.core.options), this.swapping 818 = !0, this.previous = d, this.next = d, this.handlers = { 819 "change.owl.carousel" : a.proxy(function (a) { 820 a.namespace && "position" == a.property.name && (this.previous = this.core.current(), this.next 821 = a.property.value) 822 }, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel" : a.proxy(function (a) { 823 a.namespace && (this.swapping = "translated" == a.type) 824 }, this), "translate.owl.carousel" : a.proxy(function (a) { 825 a.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn) 826 && this.swap() 827 }, this) 828 }, this.core.$element.on(this.handlers) 829 }; 830 e.Defaults = { 831 animateOut : !1, animateIn : !1 832 }, e.prototype.swap = function () { 833 if (1 === this.core.settings.items && a.support.animation && a.support.transition) { 834 this.core.speed(0); 835 var b, c = a.proxy(this.clear, this), d = this.core.$stage.children().eq(this.previous), 836 e = this.core.$stage.children().eq(this.next), f = this.core.settings.animateIn, 837 g = this.core.settings.animateOut; 838 this.core.current() !== this.previous && (g && (b = this.core.coordinates(this.previous) 839 - this.core.coordinates(this.next), d.one( 840 a.support.animation.end, c).css({left : b + "px"}).addClass("animated owl-animated-out").addClass( 841 g)), f && e.one(a.support.animation.end, c).addClass("animated owl-animated-in").addClass(f)) 842 } 843 }, e.prototype.clear = function (b) { 844 a(b.target).css({left : ""}).removeClass("animated owl-animated-out owl-animated-in").removeClass( 845 this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd() 846 }, e.prototype.destroy = function () { 847 var a, b; 848 for (a in this.handlers) { 849 this.core.$element.off(a, this.handlers[a]); 850 } 851 for (b in Object.getOwnPropertyNames(this)) { 852 "function" != typeof this[b] && (this[b] = null) 853 } 854 }, a.fn.owlCarousel.Constructor.Plugins.Animate = e 855 }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 856 var e = function (b) { 857 this._core = b, this._call = null, this._time = 0, this._timeout = 0, this._paused = !0, this._handlers = { 858 "changed.owl.carousel" : a.proxy(function (a) { 859 a.namespace && "settings" === a.property.name ? this._core.settings.autoplay ? this.play() 860 : this.stop() 861 : a.namespace && "position" === a.property.name 862 && this._paused && (this._time = 0) 863 }, this), "initialized.owl.carousel" : a.proxy(function (a) { 864 a.namespace && this._core.settings.autoplay && this.play() 865 }, this), "play.owl.autoplay" : a.proxy(function (a, b, c) { 866 a.namespace && this.play(b, c) 867 }, this), "stop.owl.autoplay" : a.proxy(function (a) { 868 a.namespace && this.stop() 869 }, this), "mouseover.owl.autoplay" : a.proxy(function () { 870 this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() 871 }, this), "mouseleave.owl.autoplay" : a.proxy(function () { 872 this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.play() 873 }, this), "touchstart.owl.core" : a.proxy(function () { 874 this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() 875 }, this), "touchend.owl.core" : a.proxy(function () { 876 this._core.settings.autoplayHoverPause && this.play() 877 }, this) 878 }, this._core.$element.on(this._handlers), this._core.options = a.extend({}, e.Defaults, this._core.options) 879 }; 880 e.Defaults = { 881 autoplay : !1, 882 autoplayTimeout : 5e3, 883 autoplayHoverPause : !1, 884 autoplaySpeed : !1 885 }, e.prototype._next = function (d) { 886 this._call = b.setTimeout(a.proxy(this._next, this, d), 887 this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()), this._core.is( 888 "interacting") || c.hidden || this._core.next(d || this._core.settings.autoplaySpeed) 889 }, e.prototype.read = function () { 890 return (new Date).getTime() - this._time 891 }, e.prototype.play = function (c, d) { 892 var e; 893 this._core.is("rotating") || this._core.enter("rotating"), c = c || this._core.settings.autoplayTimeout, e 894 = Math.min(this._time % (this._timeout || c), c), this._paused ? (this._time = this.read(), this._paused 895 = !1) : b.clearTimeout(this._call), this._time += this.read() % c - e, this._timeout = c, this._call 896 = b.setTimeout(a.proxy(this._next, this, d), c - e) 897 }, e.prototype.stop = function () { 898 this._core.is("rotating") && (this._time = 0, this._paused = !0, b.clearTimeout( 899 this._call), this._core.leave("rotating")) 900 }, e.prototype.pause = function () { 901 this._core.is("rotating") && !this._paused && (this._time = this.read(), this._paused = !0, b.clearTimeout( 902 this._call)) 903 }, e.prototype.destroy = function () { 904 var a, b; 905 this.stop(); 906 for (a in this._handlers) { 907 this._core.$element.off(a, this._handlers[a]); 908 } 909 for (b in Object.getOwnPropertyNames(this)) { 910 "function" != typeof this[b] && (this[b] = null) 911 } 912 }, a.fn.owlCarousel.Constructor.Plugins.autoplay = e 913 }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 914 "use strict"; 915 var e = function (b) { 916 this._core = b, this._initialized = !1, this._pages = [], this._controls = {}, this._templates 917 = [], this.$element = this._core.$element, this._overrides = { 918 next : this._core.next, prev : this._core.prev, to : this._core.to 919 }, this._handlers = { 920 "prepared.owl.carousel" : a.proxy(function (b) { 921 b.namespace && this._core.settings.dotsData && this._templates.push( 922 '<div class="' + this._core.settings.dotClass + '">' + a(b.content).find("[data-dot]").addBack( 923 "[data-dot]").attr("data-dot") + "</div>") 924 }, this), "added.owl.carousel" : a.proxy(function (a) { 925 a.namespace && this._core.settings.dotsData && this._templates.splice(a.position, 0, 926 this._templates.pop()) 927 }, this), "remove.owl.carousel" : a.proxy(function (a) { 928 a.namespace && this._core.settings.dotsData && this._templates.splice(a.position, 1) 929 }, this), "changed.owl.carousel" : a.proxy(function (a) { 930 a.namespace && "position" == a.property.name && this.draw() 931 }, this), "initialized.owl.carousel" : a.proxy(function (a) { 932 a.namespace && !this._initialized && (this._core.trigger("initialize", null, 933 "navigation"), this.initialize(), this.update(), this.draw(), this._initialized 934 = !0, this._core.trigger("initialized", null, "navigation")) 935 }, this), "refreshed.owl.carousel" : a.proxy(function (a) { 936 a.namespace && this._initialized && (this._core.trigger("refresh", null, 937 "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation")) 938 }, this) 939 }, this._core.options = a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers) 940 }; 941 e.Defaults = { 942 nav : !1, 943 navText : ['<span aria-label="Previous">‹</span>', '<span aria-label="Next">›</span>'], 944 navSpeed : !1, 945 navElement : 'button type="button" role="presentation"', 946 navContainer : !1, 947 navContainerClass : "owl-nav", 948 navClass : ["owl-prev", "owl-next"], 949 slideBy : 1, 950 dotClass : "owl-dot", 951 dotsClass : "owl-dots", 952 dots : !0, 953 dotsEach : !1, 954 dotsData : !1, 955 dotsSpeed : !1, 956 dotsContainer : !1 957 }, e.prototype.initialize = function () { 958 var b, c = this._core.settings; 959 this._controls.$relative = (c.navContainer ? a(c.navContainer) : a("<div>").addClass( 960 c.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous = a( 961 "<" + c.navElement + ">").addClass(c.navClass[0]).html(c.navText[0]).prependTo( 962 this._controls.$relative).on("click", a.proxy(function (a) { 963 this.prev(c.navSpeed) 964 }, this)), this._controls.$next = a("<" + c.navElement + ">").addClass(c.navClass[1]).html( 965 c.navText[1]).appendTo(this._controls.$relative).on("click", a.proxy(function (a) { 966 this.next(c.navSpeed) 967 }, this)), c.dotsData || (this._templates = [a('<button role="button">').addClass(c.dotClass).append( 968 a("<span>")).prop("outerHTML")]), this._controls.$absolute = (c.dotsContainer ? a(c.dotsContainer) : a( 969 "<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass( 970 "disabled"), this._controls.$absolute.on("click", "button", a.proxy(function (b) { 971 var d = a(b.target).parent().is(this._controls.$absolute) ? a(b.target).index() : a( 972 b.target).parent().index(); 973 b.preventDefault(), this.to(d, c.dotsSpeed) 974 }, this)); 975 for (b in this._overrides) { 976 this._core[b] = a.proxy(this[b], this) 977 } 978 }, e.prototype.destroy = function () { 979 var a, b, c, d, e; 980 e = this._core.settings; 981 for (a in this._handlers) { 982 this.$element.off(a, this._handlers[a]); 983 } 984 for (b in this._controls) { 985 "$relative" === b && e.navContainer ? this._controls[b].html("") : this._controls[b].remove(); 986 } 987 for (d in this.overides) { 988 this._core[d] = this._overrides[d]; 989 } 990 for (c in Object.getOwnPropertyNames(this)) { 991 "function" != typeof this[c] && (this[c] = null) 992 } 993 }, e.prototype.update = function () { 994 var a, b, c, d = this._core.clones().length / 2, e = d + this._core.items().length, 995 f = this._core.maximum(!0), g = this._core.settings, 996 h = g.center || g.autoWidth || g.dotsData ? 1 : g.dotsEach || g.items; 997 if ("page" !== g.slideBy && (g.slideBy = Math.min(g.slideBy, g.items)), g.dots || "page" == g.slideBy) { 998 for (this._pages = [], a = d, b = 0, c = 0; a < e; a++) { 999 if (b >= h || 0 === b) { 1000 if (this._pages.push({start : Math.min(f, a - d), end : a - d + h - 1}), Math.min(f, a - d) 1001 === f) { 1002 break; 1003 } 1004 b = 0, ++c 1005 } 1006 b += this._core.mergers(this._core.relative(a)) 1007 } 1008 } 1009 }, e.prototype.draw = function () { 1010 var b, c = this._core.settings, d = this._core.items().length <= c.items, 1011 e = this._core.relative(this._core.current()), f = c.loop || c.rewind; 1012 this._controls.$relative.toggleClass("disabled", !c.nav || d), c.nav 1013 && (this._controls.$previous.toggleClass( 1014 "disabled", !f && e <= this._core.minimum(!0)), this._controls.$next.toggleClass("disabled", 1015 !f && e >= this._core.maximum( 1016 !0))), this._controls.$absolute.toggleClass( 1017 "disabled", !c.dots || d), c.dots && (b = this._pages.length 1018 - this._controls.$absolute.children().length, c.dotsData && 0 1019 !== b ? this._controls.$absolute.html(this._templates.join("")) : b > 0 1020 ? this._controls.$absolute.append( 1021 new Array(b + 1).join(this._templates[0])) : b < 0 && this._controls.$absolute.children().slice( 1022 b).remove(), this._controls.$absolute.find(".active").removeClass( 1023 "active"), this._controls.$absolute.children().eq(a.inArray(this.current(), this._pages)).addClass( 1024 "active")) 1025 }, e.prototype.onTrigger = function (b) { 1026 var c = this._core.settings; 1027 b.page = { 1028 index : a.inArray(this.current(), this._pages), 1029 count : this._pages.length, 1030 size : c && (c.center || c.autoWidth || c.dotsData ? 1 : c.dotsEach || c.items) 1031 } 1032 }, e.prototype.current = function () { 1033 var b = this._core.relative(this._core.current()); 1034 return a.grep(this._pages, a.proxy(function (a, c) { 1035 return a.start <= b && a.end >= b 1036 }, this)).pop() 1037 }, e.prototype.getPosition = function (b) { 1038 var c, d, e = this._core.settings; 1039 return "page" == e.slideBy ? (c = a.inArray(this.current(), this._pages), d = this._pages.length, b ? ++c 1040 : --c, c 1041 = this._pages[(c % d + d) % d].start) : (c = this._core.relative(this._core.current()), d 1042 = this._core.items().length, b ? c += e.slideBy : c -= e.slideBy), c 1043 }, e.prototype.next = function (b) { 1044 a.proxy(this._overrides.to, this._core)(this.getPosition(!0), b) 1045 }, e.prototype.prev = function (b) { 1046 a.proxy(this._overrides.to, this._core)(this.getPosition(!1), b) 1047 }, e.prototype.to = function (b, c, d) { 1048 var e; 1049 !d && this._pages.length ? (e = this._pages.length, a.proxy(this._overrides.to, this._core)( 1050 this._pages[(b % e + e) % e].start, c)) : a.proxy(this._overrides.to, this._core)(b, c) 1051 }, a.fn.owlCarousel.Constructor.Plugins.Navigation = e 1052 }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 1053 "use strict"; 1054 var e = function (c) { 1055 this._core = c, this._hashes = {}, this.$element = this._core.$element, this._handlers = { 1056 "initialized.owl.carousel" : a.proxy(function (c) { 1057 c.namespace && "URLHash" === this._core.settings.startPosition && a(b).trigger( 1058 "hashchange.owl.navigation") 1059 }, this), "prepared.owl.carousel" : a.proxy(function (b) { 1060 if (b.namespace) { 1061 var c = a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"); 1062 if (!c) { 1063 return; 1064 } 1065 this._hashes[c] = b.content 1066 } 1067 }, this), "changed.owl.carousel" : a.proxy(function (c) { 1068 if (c.namespace && "position" === c.property.name) { 1069 var d = this._core.items(this._core.relative(this._core.current())), 1070 e = a.map(this._hashes, function (a, b) { 1071 return a === d ? b : null 1072 }).join(); 1073 if (!e || b.location.hash.slice(1) === e) { 1074 return; 1075 } 1076 b.location.hash = e 1077 } 1078 }, this) 1079 }, this._core.options = a.extend({}, e.Defaults, this._core.options), this.$element.on(this._handlers), a( 1080 b).on("hashchange.owl.navigation", a.proxy(function (a) { 1081 var c = b.location.hash.substring(1), e = this._core.$stage.children(), 1082 f = this._hashes[c] && e.index(this._hashes[c]); 1083 f !== d && f !== this._core.current() && this._core.to(this._core.relative(f), !1, !0) 1084 }, this)) 1085 }; 1086 e.Defaults = {URLhashListener : !1}, e.prototype.destroy = function () { 1087 var c, d; 1088 a(b).off("hashchange.owl.navigation"); 1089 for (c in this._handlers) { 1090 this._core.$element.off(c, this._handlers[c]); 1091 } 1092 for (d in Object.getOwnPropertyNames(this)) { 1093 "function" != typeof this[d] && (this[d] = null) 1094 } 1095 }, a.fn.owlCarousel.Constructor.Plugins.Hash = e 1096 }(window.Zepto || window.jQuery, window, document), function (a, b, c, d) { 1097 function e(b, c) { 1098 var e = !1, f = b.charAt(0).toUpperCase() + b.slice(1); 1099 return a.each((b + " " + h.join(f + " ") + f).split(" "), function (a, b) { 1100 if (g[b] !== d) { 1101 return e = !c || b, !1 1102 } 1103 }), e 1104 } 1105 1106 function f(a) { 1107 return e(a, !0) 1108 } 1109 1110 var g = a("<support>").get(0).style, h = "Webkit Moz O ms".split(" "), i = { 1111 transition : { 1112 end : { 1113 WebkitTransition : "webkitTransitionEnd", 1114 MozTransition : "transitionend", 1115 OTransition : "oTransitionEnd", 1116 transition : "transitionend" 1117 } 1118 }, animation : { 1119 end : { 1120 WebkitAnimation : "webkitAnimationEnd", 1121 MozAnimation : "animationend", 1122 OAnimation : "oAnimationEnd", 1123 animation : "animationend" 1124 } 1125 } 1126 }, j = { 1127 csstransforms : function () { 1128 return !!e("transform") 1129 }, csstransforms3d : function () { 1130 return !!e("perspective") 1131 }, csstransitions : function () { 1132 return !!e("transition") 1133 }, cssanimations : function () { 1134 return !!e("animation") 1135 } 1136 }; 1137 j.csstransitions() && (a.support.transition = new String(f("transition")), a.support.transition.end 1138 = i.transition.end[a.support.transition]), j.cssanimations() && (a.support.animation = new String( 1139 f("animation")), a.support.animation.end = i.animation.end[a.support.animation]), j.csstransforms() 1140 && (a.support.transform 1141 = new String(f("transform")), a.support.transform3d = j.csstransforms3d()) 1142 }(window.Zepto || window.jQuery, window, document); 1143 1144} 1145
vendor: 14,673 bytes, lines 1146-1149
1146/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022 1147 * https://jqueryvalidation.org/ 1148 * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */ 1149!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.n
1149ame],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);
vendor: 4,097 bytes, line 1149
1149return!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.val
1149idator.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}); 1150 1151/*global jQuery */ 1152/*! 1153* FitText.js 1.2 1154* 1155* Copyright 2011, Dave Rupert http://daverupert.com 1156* Released under the WTFPL license 1157* http://sam.zoy.org/wtfpl/ 1158* 1159* Date: Thu May 05 14:23:00 2011 -0600 1160*/ 1161 1162(function( $ ){ 1163 1164 $.fn.fitText = function( kompressor, options ) { 1165 1166 // Setup options 1167 var compressor = kompressor || 1, 1168 settings = $.extend({ 1169 'minFontSize' : Number.NEGATIVE_INFINITY, 1170 'maxFontSize' : Number.POSITIVE_INFINITY 1171 }, options); 1172 1173 return this.each(function(){ 1174 1175 // Store the object 1176 var $this = $(this); 1177 1178 // Resizer() resizes items based on the object width divided by the compressor * 10 1179 var resizer = function () { 1180 $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize))); 1181 }; 1182 1183 // Call once to set. 1184 resizer(); 1185 1186 // Call on resize. Opera debounces their resize by default. 1187 $(window).on('resize.fittext orientationchange.fittext', resizer); 1188 1189 }); 1190 1191 }; 1192 1193})( jQuery ); 1194 1195/* 1196* MultiSlider | MIT License 1197* 1198* Copyright (c) 2017 Trevor Blackman 1199* http://www.multislider.info 1200* 1201*/ 1202 1203(function($){ 1204 1205 // ==== BEGINS PLUGGIN ==== 1206 $.fn.multislider = function(data, callback){ 1207 1208 // ==== CACHE DOM ==== 1209 var $multislider = $(this); 1210 var $msContent = $multislider.find('.MS-content'); 1211 var $msRight = $multislider.find('button.MS-right'); 1212 var $msLeft = $multislider.find('button.MS-left'); 1213 var $imgFirst = $msContent.find('.item:first'); 1214 1215 // === DETERMINE ACTION ==== 1216 // string = method | object or nothing is to initialize 1217 if(typeof data === 'string'){ 1218 getStringArgs(data); 1219 return $multislider; 1220 } else if (typeof data === 'object' || typeof data ==='undefined'){ 1221 init(); 1222 } 1223 1224 // ==== PLUGGIN VARIABLES ==== 1225 var $imgLast, 1226 totalWidth, 1227 numberVisibleSlides, 1228 animateDistance, 1229 animateSlideRight, 1230 animateSlideLeft, 1231 defaults, 1232 settings, 1233 animateDuration, 1234 autoSlideInterval; 1235 1236 // = INITIALIZE =
1237 function init(){ 1238 minifyContent(); // minify html 1239 createSettings(); // merge defaults and user provided options 1240 saveData(); // add data object to DOM el with reference to animation functions, allows for methods to reference at any time 1241 selectAnimations(); // choose default animation 1242 } 1243 1244 1245 // ==== EVENT HANDLERS ==== 1246 $msRight.on('click', animateSlideLeft); 1247 $msLeft.on('click', animateSlideRight); 1248 $multislider.on('click','.MS-right, .MS-left', resetInterval); 1249 $(window).on('resize', findItemWidth); 1250 1251 1252 // ==== FUNCTIONS (for days...) ==== 1253 // ================================= 1254 1255 function pauseAbove(){ 1256 if (window.innerWidth > settings.pauseAbove){ $multislider.addClass('ms-PAUSE'); } 1257 $(window).on('resize',function(){ 1258 if (window.innerWidth > settings.pauseAbove){ 1259 $multislider.addClass('ms-PAUSE'); 1260 } else { 1261 $multislider.removeClass('ms-PAUSE'); 1262 } 1263 }); 1264 } 1265 1266 function pauseBelow(){ 1267 if (window.innerWidth < settings.pauseBelow){ $multislider.addClass('ms-PAUSE'); } 1268 $(window).on('resize',function(){ 1269 if (window.innerWidth < settings.pauseBelow){ 1270 $multislider.addClass('ms-PAUSE'); 1271 } else { 1272 $multislider.removeClass('ms-PAUSE'); 1273 } 1274 }); 1275 } 1276 1277 // used if method is called after initialization 1278 function getStringArgs(str){ 1279 if (typeof $multislider.data(str) !== 'undefined'){ 1280 $multislider.data(str)(); 1281 } else { 1282 console.error("Multislider currently only accepts the following methods: next, prev, pause, play"); 1283 } 1284 } 1285 1286 // saves data object to DOM element 1287 function saveData(){ 1288 $multislider.data({ 1289 "pause":function(){ $multislider.addClass('ms-PAUSE'); }, 1290 "unPause":function(){ $multislider.removeClass('ms-PAUSE'); }, 1291 "continuous":function(){ $multislider.removeClass('ms-PAUSE'); continuousLeft(); }, 1292 "next":function(){ overRidePause(singleLeft); }, 1293 "nextAll":function(){ overRidePause(allLeft); }, 1294 "prev":function(){ overRidePause(singleRight); }, 1295 "prevAll":function(){ overRidePause(allRight); }, 1296 "settings":settings 1297 }); 1298 } 1299 1300 // used when calling 'next', 'prev' methods 1301 function overRidePause(animation){ 1302 if ($multislider.hasClass('ms-PAUSE')){ 1303 $multislider.removeClass('ms-PAUSE'); 1304 animation(); 1305 $multislider.addClass('ms-PAUSE'); 1306 } else { 1307 animation(); 1308 } 1309 resetInterval(); 1310 } 1311 1312 // CRITICAL for items to be perfectly side-by-side without floating them 1313 function minifyContent(){ 1314 $msContent.contents().filter(function(){ 1315 return (this.nodeType == 3 && !/\S/.test(this.nodeValue)); 1316 }).remove(); 1317 } 1318 1319 // updated options with defaults, measure slide widths for animation calculations, carry out setting implementations 1320 function createSettings() { 1321 defaults = settings || { 1322 continuous: false, // endless scrolling with no pauses 1323 slideAll: false, // slide all visible slides, or just one at a time 1324 // autoSlide: true, // DEPRECATED 1325 interval: 2000, // time bewteen slide animation, 0 or 'false' prevents auto-sliding 1326 duration: 500, // duration of slide animation 1327 hoverPause: true, // pause slideshow on hover 1328 pauseAbove: null, // pause above specified screen width 1329 pauseBelow: null // pause below specified screen width 1330 }; 1331 1332 settings = $.extend({},defaults,data); 1333 1334 findItemWidth(); 1335 animateDuration = settings.duration; 1336 1337 if (settings.hoverPause){pauseHover();} 1338 // autoSlide is being depricated | Feb 2 2017 1339 if (settings.continuous !== true && settings.interval !== 0 && settings.interval !== false && settings.autoSlide !== false){autoSlide();} 1340 if (settings.pauseAbove !== null && typeof settings.pauseAbove === 'number'){ pauseAbove(); } 1341 if (settings.pauseBelow !== null && typeof settings.pauseBelow === 'number'){ pauseBelow(); } 1342 } 1343 1344 // determine between single and multi-slide animations 1345 function selectAnimations () { 1346 if (settings.continuous){ 1347 settings.autoSlide = false;
1348 continuousLeft(); 1349 } else if (settings.slideAll){ 1350 animateSlideRight = $multislider.data('prevAll'); 1351 animateSlideLeft = $multislider.data('nextAll'); 1352 } else { 1353 animateSlideRight = $multislider.data('prev'); 1354 animateSlideLeft = $multislider.data('next'); 1355 } 1356 } 1357 1358 // measure slide width, for animation calculations 1359 function findItemWidth(){ 1360 reTargetSlides(); 1361 animateDistance = $imgFirst.width(); 1362 var left = parseInt($msContent.find('.item:first').css('padding-left')); 1363 var right = parseInt($msContent.find('.item:first').css('padding-right')); 1364 if (left !== 0){animateDistance += left;} 1365 if (right !== 0){animateDistance += right;} 1366 } 1367 1368 // recursive auto-slide loop 1369 function autoSlide() { 1370 autoSlideInterval = setInterval(function(){ 1371 if (!$multislider.hasClass('ms-PAUSE')){ 1372 animateSlideLeft(); 1373 } 1374 }, settings.interval); 1375 } 1376 1377 function resetInterval() { 1378 if (settings.interval !== 0 && settings.interval !== false && settings.continuous !== true){ 1379 clearInterval(autoSlideInterval); 1380 autoSlide(); 1381 } 1382 } 1383 1384 // target first and last visible slides before each new animation 1385 function reTargetSlides(){ 1386 $imgFirst = $msContent.find('.item:first'); 1387 $imgLast = $msContent.find('.item:last'); 1388 } 1389 1390 // prevent animation firing if multislider is currently animating 1391 // all animations pass through this function, which emits events, and adds/removes animating class 1392 function isItAnimating(callback){ 1393 if(!$multislider.hasClass('ms-animating') && 1394 !$multislider.hasClass('ms-HOVER') && 1395 !$multislider.hasClass('ms-PAUSE')){ 1396 $multislider.trigger('ms.before.animate'); // event! 1397 $multislider.addClass('ms-animating'); 1398 callback(); //callback is animation 1399 } 1400 } 1401 1402 // update multislider at the end of each animation 1403 function doneAnimating() { 1404 if($multislider.hasClass('ms-animating')){ 1405 $multislider.removeClass('ms-animating'); 1406 $multislider.trigger('ms.after.animate'); // event! 1407 } 1408 } 1409 1410 // logic for pausing and restarting the multislider on hover 1411 function pauseHover() { 1412 // continuous scroll pause slightly different 1413 if(settings.continuous){ 1414 $msContent.on('mouseover',function(){ 1415 doneAnimating(); 1416 $msContent.children('.item:first').stop(); 1417 }); 1418 $msContent.on('mouseout',function(){ 1419 continuousLeft(); 1420 }); 1421 } else { 1422 // regular animation pausing 1423 $msContent.on('mouseover',function(){ 1424 $multislider.addClass('ms-HOVER'); 1425 }); 1426 $msContent.on('mouseout',function(){ 1427 $multislider.removeClass('ms-HOVER'); 1428 }); 1429 } 1430 } 1431 1432 // calculate remaining animation, if stopped mid-animation and resuming 1433 function midAnimateResume(){ 1434 animateDuration = settings.duration; 1435 var currentMargin = parseFloat($msContent.find('.item:first').css("margin-left")); 1436 var percentageRemaining = 1-(currentMargin/-(animateDistance-1)); 1437 animateDuration = percentageRemaining*animateDuration; 1438 } 1439 1440 // determine how many slides need to be moved over, if slideAll is true 1441 function calcNumSlidesToMove(){ 1442 totalWidth = $msContent.width(); // total width of .MS-content containing all visible slides 1443 numberVisibleSlides = Math.floor(totalWidth/animateDistance); // number of (visible) slides needed to be moved in each animation 1444 } 1445 1446 1447 // ==== ANIMATION FUNCTIONS ==== 1448 // ============================= 1449 function continuousLeft () { 1450 isItAnimating(function(){ 1451 reTargetSlides(); 1452 midAnimateResume(); 1453 $imgFirst.animate( 1454 {marginLeft: -(animateDistance+1)}, 1455 { 1456 duration: animateDuration, 1457 easing: "linear", 1458 complete: function(){ 1459 $imgFirst.insertAfter($imgLast).removeAttr("style"); 1460 doneAnimating(); 1461 continuousLeft (); 1462 } 1463 } 1464 ); 1465 }); 1466 } 1467 1468 function allLeft(){ 1469 isItAnimating(function(){ 1470 reTargetSlides(); 1471 calcNumSlidesToMove(); 1472 1473 var $clonedItemSet = $msContent.children('.item').clone(); 1474 var filteredClones = $clonedItemSet.splice(0, numberVisibleSlides); 1475 1476 $msContent.append(filteredClones); 1477 1478 $imgFirst.animate( 1479 {marginLeft: -totalWidth}, { 1480 duration: animateDuration, 1481 easing: "swing", 1482 complete: function(){ 1483 $($msContent.children('.item').splice(0,numberVisibleSlides)).remove(); 1484 doneAnimating(); 1485 } 1486 } 1487 ); 1488 }); 1489 } 1490 1491 function allRight() { 1492 isItAnimating(function(){ 1493 reTargetSlides(); 1494 calcNumSlidesToMove(); 1495 1496 var numberTotalSlides = $msContent.children('.item').length; 1497 var $clonedItemSet = $msContent.children('.item').clone(); 1498 var filteredClones = $clonedItemSet.splice(numberTotalSlides-numberVisibleSlides,numberTotalSlides); 1499 1500 $($(filteredClones)[0]).css('margin-left',-totalWidth); // give clone array negative margin before preppending
1501 $msContent.prepend(filteredClones); 1502 1503 reTargetSlides(); 1504 1505 $imgFirst.animate( 1506 { 1507 marginLeft: 0 1508 }, { 1509 duration: animateDuration, 1510 easing: "swing", 1511 complete: function(){ 1512 numberTotalSlides = $msContent.find('.item').length; 1513 $($msContent.find('.item').splice(numberTotalSlides-numberVisibleSlides,numberTotalSlides)).remove(); 1514 $imgFirst.removeAttr('style'); 1515 doneAnimating(); 1516 } 1517 } 1518 ); 1519 }); 1520 } 1521 1522 function singleLeft(){ 1523 isItAnimating(function(){ 1524 reTargetSlides(); 1525 $imgFirst.animate( 1526 { 1527 marginLeft: -animateDistance 1528 }, { 1529 duration: animateDuration, 1530 easing: "swing", 1531 complete: function(){ 1532 $imgFirst.detach().removeAttr('style').appendTo($msContent); 1533 doneAnimating(); 1534 } 1535 } 1536 ); 1537 }); 1538 } 1539 1540 function singleRight(){ 1541 isItAnimating(function(){ 1542 reTargetSlides(); 1543 $imgLast.css('margin-left',-animateDistance).prependTo($msContent); 1544 $imgLast.animate( 1545 { 1546 marginLeft: 0 1547 }, { 1548 duration: animateDuration, 1549 easing: "swing", 1550 complete: function(){ 1551 $imgLast.removeAttr("style"); 1552 doneAnimating(); 1553 } 1554 } 1555 ); 1556 }); 1557 } 1558 return $multislider; 1559 } 1560})(jQuery); 1561/*! 1562 * @fileOverview TouchSwipe - jQuery Plugin 1563 * @version 1.6.18 1564 * 1565 * @author Matt Bryson http://www.github.com/mattbryson 1566 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin 1567 * @see http://labs.rampinteractive.co.uk/touchSwipe/ 1568 * @see http://plugins.jquery.com/project/touchSwipe 1569 * @license 1570 * Copyright (c) 2010-2015 Matt Bryson 1571 * Dual licensed under the MIT or GPL Version 2 licenses. 1572 * 1573 */ 1574 1575/* 1576 * 1577 * Changelog 1578 * $Date: 2010-12-12 (Wed, 12 Dec 2010) $ 1579 * $version: 1.0.0 1580 * $version: 1.0.1 - removed multibyte comments 1581 * 1582 * $Date: 2011-21-02 (Mon, 21 Feb 2011) $ 1583 * $version: 1.1.0 - added allowPageScroll property to allow swiping and scrolling of page 1584 * - changed handler signatures so one handler can be used for multiple events 1585 * $Date: 2011-23-02 (Wed, 23 Feb 2011) $ 1586 * $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. 1587 * - 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. 1588 * $version: 1.2.1 - removed console log! 1589 * 1590 * $version: 1.2.2 - Fixed bug where scope was not preserved in callback methods. 1591 * 1592 * $Date: 2011-28-04 (Thurs, 28 April 2011) $ 1593 * $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. 1594 * 1595 * $Date: 2011-27-09 (Tues, 27 September 2011) $
1596 * $version: 1.2.5 - Added support for testing swipes with mouse on desktop browser (thanks to https://github.com/joelhy) 1597 * 1598 * $Date: 2012-14-05 (Mon, 14 May 2012) $ 1599 * $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 1600 * 1601 * $Date: 2012-05-06 (Tues, 05 June 2012) $ 1602 * $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. 1603 * 1604 * $Date: 2012-05-06 (Tues, 05 June 2012) $ 1605 * $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. 1606 * 1607 * $Date: 2012-06-06 (Wed, 06 June 2012) $ 1608 * $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 1609 * 1610 * $Date: 2012-05-06 (Fri, 05 June 2012) $ 1611 * $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. 1612 * 1613 * $Date: 2012-29-07 (Sun, 29 July 2012) $ 1614 * $version: 1.3.2 - Added fallbackToMouseEvents option to NOT capture mouse events on non touch devices. 1615 * - Added "all" fingers value to the fingers property, so any combination of fingers triggers the swipe, allowing event handlers to check the finger count 1616 * 1617 * $Date: 2012-09-08 (Thurs, 9 Aug 2012) $ 1618 * $version: 1.3.3 - Code tidy prep for minefied version 1619 * 1620 * $Date: 2012-04-10 (wed, 4 Oct 2012) $ 1621 * $version: 1.4.0 - Added pinch support, pinchIn and pinchOut 1622 * 1623 * $Date: 2012-11-10 (Thurs, 11 Oct 2012) $ 1624 * $version: 1.5.0 - Added excludedElements, a jquery selector that specifies child elements that do NOT trigger swipes. By default, this is .noSwipe 1625 * 1626 * $Date: 2012-22-10 (Mon, 22 Oct 2012) $ 1627 * $version: 1.5.1 - Fixed bug with jQuery 1.8 and trailing comma in excludedElements 1628 * - Fixed bug with IE and eventPreventDefault() 1629 * $Date: 2013-01-12 (Fri, 12 Jan 2013) $ 1630 * $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. 1631 * - made the demo site all static local HTML pages so they can be run locally by a developer 1632 * - added jsDoc comments and added documentation for the plugin 1633 * - code tidy 1634 * - added triggerOnTouchLeave property that will end the event when the user swipes off the element. 1635 * $Date: 2013-03-23 (Sat, 23 Mar 2013) $
1636 * $version: 1.6.1 - Added support for ie8 touch events 1637 * $version: 1.6.2 - Added support for events binding with on / off / bind in jQ for all callback names. 1638 * - Deprecated the 'click' handler in favour of tap. 1639 * - added cancelThreshold property 1640 * - added option method to update init options at runtime 1641 * $version 1.6.3 - added doubletap, longtap events and longTapThreshold, doubleTapThreshold property 1642 * 1643 * $Date: 2013-04-04 (Thurs, 04 April 2013) $ 1644 * $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. 1645 * 1646 * $Date: 2013-08-24 (Sat, 24 Aug 2013) $ 1647 * $version 1.6.5 - Merged a few pull requests fixing various bugs, added AMD support. 1648 * 1649 * $Date: 2014-06-04 (Wed, 04 June 2014) $ 1650 * $version 1.6.6 - Merge of pull requests. 1651 * - IE10 touch support 1652 * - Only prevent default event handling on valid swipe 1653 * - Separate license/changelog comment 1654 * - Detect if the swipe is valid at the end of the touch event. 1655 * - Pass fingerdata to event handlers. 1656 * - Add 'hold' gesture 1657 * - Be more tolerant about the tap distance 1658 * - Typos and minor fixes 1659 * 1660 * $Date: 2015-22-01 (Thurs, 22 Jan 2015) $ 1661 * $version 1.6.7 - Added patch from https://github.com/mattbryson/TouchSwipe-Jquery-Plugin/issues/206 to fix memory leak 1662 * 1663 * $Date: 2015-2-2 (Mon, 2 Feb 2015) $ 1664 * $version 1.6.8 - Added preventDefaultEvents option to proxy events regardless. 1665 * - Fixed issue with swipe and pinch not triggering at the same time 1666 * 1667 * $Date: 2015-9-6 (Tues, 9 June 2015) $ 1668 * $version 1.6.9 - Added PR from jdalton/hybrid to fix pointer events 1669 * - Added scrolling demo 1670 * - Added version property to plugin 1671 * 1672 * $Date: 2015-1-10 (Wed, 1 October 2015) $ 1673 * $version 1.6.10 - Added PR from beatspace to fix tap events 1674 * $version 1.6.11 - Added PRs from indri-indri ( Doc tidyup), kkirsche ( Bower tidy up ), UziTech (preventDefaultEvents fixes ) 1675 * - Allowed setting multiple options via .swipe("options", options_hash) and more simply .swipe(options_hash) or exisitng instances 1676 * $version 1.6.12 - Fixed bug with multi finger releases above 2 not triggering events 1677 * 1678 * $Date: 2015-12-18 (Fri, 18 December 2015) $ 1679 * $version 1.6.13 - Added PRs 1680 * - Fixed #267 allowPageScroll not working correctly 1681 * $version 1.6.14 - Fixed #220 / #248 doubletap not firing with swipes, #223 commonJS compatible 1682 * $version 1.6.15 - More bug fixes 1683 * 1684 * $Date: 2016-04-29 (Fri, 29 April 2016) $ 1685 * $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. 1686 Removed the a, input, select etc from the excluded Children list as the 0 distance tap solves that issue. 1687* $Date: 2016-05-19 (Fri, 29 April 2016) $ 1688* $version 1.6.17 - Fixed context issue when calling instance methods via $("selector").swipe("method"); 1689* $version 1.6.18 - now honors fallbackToMouseEvents=false for MS Pointer events when a Mouse is used. 1690 1691 */ 1692 1693/** 1694 * See (http://jquery.com/). 1695 * @name $ 1696 * @class 1697 * See the jQuery Library (http://jquery.com/) for full details. This just 1698 * documents the function and classes that are added to jQuery by this plug-in. 1699 */ 1700 1701/** 1702 * See (http://jquery.com/) 1703 * @name fn 1704 * @class 1705 * See the jQuery Library (http://jquery.com/) for full details. This just 1706 * documents the function and classes that are added to jQuery by this plug-in. 1707 * @memberOf $ 1708 */ 1709 1710 1711(function(factory) { 1712 if (typeof define === 'function' && define.amd && define.amd.jQuery) { 1713 // AMD. Register as anonymous module. 1714 define(['jquery'], factory); 1715 } else if (typeof module !== 'undefined' && module.exports) { 1716 // CommonJS Module 1717 factory(require("jquery")); 1718 } else { 1719 // Browser globals. 1720 factory(jQuery); 1721 } 1722}(function($) { 1723 "use strict"; 1724 1725 //Constants 1726 var VERSION = "1.6.18", 1727 LEFT = "left", 1728 RIGHT = "right", 1729 UP = "up", 1730 DOWN = "down", 1731 IN = "in", 1732 OUT = "out", 1733 1734 NONE = "none", 1735 AUTO = "auto", 1736 1737 SWIPE = "swipe", 1738 PINCH = "pinch", 1739 TAP = "tap", 1740 DOUBLE_TAP = "doubletap", 1741 LONG_TAP = "longtap", 1742 HOLD = "hold", 1743 1744 HORIZONTAL = "horizontal", 1745 VERTICAL = "vertical", 1746 1747 ALL_FINGERS = "all", 1748 1749 DOUBLE_TAP_THRESHOLD = 10, 1750 1751 PHASE_START = "start", 1752 PHASE_MOVE = "move", 1753 PHASE_END = "end", 1754 PHASE_CANCEL = "cancel", 1755 1756 SUPPORTS_TOUCH = 'ontouchstart' in window, 1757 1758 SUPPORTS_POINTER_IE10 = window.navigator.msPointerEnabled && !window.navigator.pointerEnabled && !SUPPORTS_TOUCH, 1759 1760 SUPPORTS_POINTER = (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) && !SUPPORTS_TOUCH, 1761 1762 PLUGIN_NS = 'TouchSwipe'; 1763 1764 1765 1766 /** 1767 * The default configuration, and available options to configure touch swipe with. 1768 * You can set the default values by updating any of the properties prior to instantiation. 1769 * @name $.fn.swipe.defaults 1770 * @namespace 1771 * @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. 1772 * @property {int} [threshold=75] The number of pixels that the user must move their finger by before it is considered a swipe. 1773 * @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. 1774 * @property {int} [pinchThreshold=20] The number of pixels that the user must pinch their finger by before it is considered a pinch. 1775 * @property {int} [maxTimeThreshold=null] Time, in milliseconds, between touchStart and touchEnd must NOT exceed in order to be considered a swipe. 1776 * @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. 1777 * @property {int} [longTapThreshold=500] Time in milliseconds between tap and release for a long tap 1778 * @property {int} [doubleTapThreshold=200] Time in milliseconds between 2 taps to count as a double tap 1779 * @property {function} [swipe=null] A handler to catch all swipes. See {@link $.fn.swipe#event:swipe} 1780 * @property {function} [swipeLeft=null] A handler that is triggered for "left" swipes. See {@link $.fn.swipe#event:swipeLeft} 1781 * @property {function} [swipeRight=null] A handler that is triggered for "right" swipes. See {@link $.fn.swipe#event:swipeRight} 1782 * @property {function} [swipeUp=null] A handler that is triggered for "up" swipes. See {@link $.fn.swipe#event:swipeUp} 1783 * @property {function} [swipeDown=null] A handler that is triggered for "down" swipes. See {@link $.fn.swipe#event:swipeDown} 1784 * @property {function} [swipeStatus=null] A handler triggered for every phase of the swipe. See {@link $.fn.swipe#event:swipeStatus} 1785 * @property {function} [pinchIn=null] A handler triggered for pinch in events. See {@link $.fn.swipe#event:pinchIn} 1786 * @property {function} [pinchOut=null] A handler triggered for pinch out events. See {@link $.fn.swipe#event:pinchOut} 1787 * @property {function} [pinchStatus=null] A handler triggered for every phase of a pinch. See {@link $.fn.swipe#event:pinchStatus} 1788 * @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. 1789 * @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} 1790 * @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} 1791 * @property (function) [hold=null] A handler triggered when a user reaches longTapThreshold on the item. See {@link $.fn.swipe.defaults#longTapThreshold} 1792 * @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. 1793 * @property {boolean} [triggerOnTouchLeave=false] If true, then when the user leaves the swipe object, the swipe will end and trigger appropriate handlers. 1794 * @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/> 1795 <code>"auto"</code> : all undefined swipes will cause the page to scroll in that direction. <br/> 1796 <code>"none"</code> : the page will not scroll when user swipes. <br/> 1797 <code>"horizontal"</code> : will force page to scroll on horizontal swipes. <br/> 1798 <code>"vertical"</code> : will force page to scroll on vertical swipes. <br/> 1799 * @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. 1800 * @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 . 1801 * @property {boolean} [preventDefaultEvents=true] by default default events are cancelled, so the page doesn't move. You can dis
vendor: 10,110 bytes, lines 1801-2069
1801sable this so both native events fire as well as your handlers. 1802 1803 */ 1804 var defaults = { 1805 fingers: 1, 1806 threshold: 75, 1807 cancelThreshold: null, 1808 pinchThreshold: 20, 1809 maxTimeThreshold: null, 1810 fingerReleaseThreshold: 250, 1811 longTapThreshold: 500, 1812 doubleTapThreshold: 200, 1813 swipe: null, 1814 swipeLeft: null, 1815 swipeRight: null, 1816 swipeUp: null, 1817 swipeDown: null, 1818 swipeStatus: null, 1819 pinchIn: null, 1820 pinchOut: null, 1821 pinchStatus: null, 1822 click: null, //Deprecated since 1.6.2 1823 tap: null, 1824 doubleTap: null, 1825 longTap: null, 1826 hold: null, 1827 triggerOnTouchEnd: true, 1828 triggerOnTouchLeave: false, 1829 allowPageScroll: "auto", 1830 fallbackToMouseEvents: true, 1831 excludedElements: ".noSwipe", 1832 preventDefaultEvents: true 1833 }; 1834 1835 1836 1837 /** 1838 * Applies TouchSwipe behaviour to one or more jQuery objects. 1839 * The TouchSwipe plugin can be instantiated via this method, or methods within 1840 * TouchSwipe can be executed via this method as per jQuery plugin architecture. 1841 * An existing plugin can have its options changed simply by re calling .swipe(options) 1842 * @see TouchSwipe 1843 * @class 1844 * @param {Mixed} method If the current DOMNode is a TouchSwipe object, and <code>method</code> is a TouchSwipe method, then 1845 * the <code>method</code> is executed, and any following arguments are passed to the TouchSwipe method. 1846 * If <code>method</code> is an object, then the TouchSwipe class is instantiated on the current DOMNode, passing the 1847 * configuration properties defined in the object. See TouchSwipe 1848 * 1849 */ 1850 $.fn.swipe = function(method) { 1851 var $this = $(this), 1852 plugin = $this.data(PLUGIN_NS); 1853 1854 //Check if we are already instantiated and trying to execute a method 1855 if (plugin && typeof method === 'string') { 1856 if (plugin[method]) { 1857 return plugin[method].apply(plugin, Array.prototype.slice.call(arguments, 1)); 1858 } else { 1859 $.error('Method ' + method + ' does not exist on jQuery.swipe'); 1860 } 1861 } 1862 1863 //Else update existing plugin with new options hash 1864 else if (plugin && typeof method === 'object') { 1865 plugin['option'].apply(plugin, arguments); 1866 } 1867 1868 //Else not instantiated and trying to pass init object (or nothing) 1869 else if (!plugin && (typeof method === 'object' || !method)) { 1870 return init.apply(this, arguments); 1871 } 1872 1873 return $this; 1874 }; 1875 1876 /** 1877 * The version of the plugin 1878 * @readonly 1879 */ 1880 $.fn.swipe.version = VERSION; 1881 1882 1883 1884 //Expose our defaults so a user could override the plugin defaults 1885 $.fn.swipe.defaults = defaults; 1886 1887 /** 1888 * The phases that a touch event goes through. The <code>phase</code> is passed to the event handlers. 1889 * These properties are read only, attempting to change them will not alter the values passed to the event handlers. 1890 * @namespace 1891 * @readonly 1892 * @property {string} PHASE_START Constant indicating the start phase of the touch event. Value is <code>"start"</code>. 1893 * @property {string} PHASE_MOVE Constant indicating the move phase of the touch event. Value is <code>"move"</code>. 1894 * @property {string} PHASE_END Constant indicating the end phase of the touch event. Value is <code>"end"</code>. 1895 * @property {string} PHASE_CANCEL Constant indicating the cancel phase of the touch event. Value is <code>"cancel"</code>. 1896 */ 1897 $.fn.swipe.phases = { 1898 PHASE_START: PHASE_START, 1899 PHASE_MOVE: PHASE_MOVE, 1900 PHASE_END: PHASE_END, 1901 PHASE_CANCEL: PHASE_CANCEL 1902 }; 1903 1904 /** 1905 * The direction constants that are passed to the event handlers. 1906 * These properties are read only, attempting to change them will not alter the values passed to the event handlers. 1907 * @namespace 1908 * @readonly 1909 * @property {string} LEFT Constant indicating the left direction. Value is <code>"left"</code>. 1910 * @property {string} RIGHT Constant indicating the right direction. Value is <code>"right"</code>. 1911 * @property {string} UP Constant indicating the up direction. Value is <code>"up"</code>. 1912 * @property {string} DOWN Constant indicating the down direction. Value is <code>"cancel"</code>. 1913 * @property {string} IN Constant indicating the in direction. Value is <code>"in"</code>. 1914 * @property {string} OUT Constant indicating the out direction. Value is <code>"out"</code>. 1915 */ 1916 $.fn.swipe.directions = { 1917 LEFT: LEFT, 1918 RIGHT: RIGHT, 1919 UP: UP, 1920 DOWN: DOWN, 1921 IN: IN, 1922 OUT: OUT 1923 }; 1924 1925 /** 1926 * The page scroll constants that can be used to set the value of <code>allowPageScroll</code> option 1927 * These properties are read only 1928 * @namespace 1929 * @readonly 1930 * @see $.fn.swipe.defaults#allowPageScroll 1931 * @property {string} NONE Constant indicating no page scrolling is allowed. Value is <code>"none"</code>. 1932 * @property {string} HORIZONTAL Constant indicating horizontal page scrolling is allowed. Value is <code>"horizontal"</code>. 1933 * @property {string} VERTICAL Constant indicating vertical page scrolling is allowed. Value is <code>"vertical"</code>. 1934 * @property {string} AUTO Constant indicating either horizontal or vertical will be allowed, depending on the swipe handlers registered. Value is <code>"auto"</code>. 1935 */ 1936 $.fn.swipe.pageScroll = { 1937 NONE: NONE, 1938 HORIZONTAL: HORIZONTAL, 1939 VERTICAL: VERTICAL, 1940 AUTO: AUTO 1941 }; 1942 1943 /** 1944 * Constants representing the number of fingers used in a swipe. These are used to set both the value of <code>fingers</code> in the 1945 * options object, as well as the value of the <code>fingers</code> event property. 1946 * These properties are read only, attempting to change them will not alter the values passed to the event handlers. 1947 * @namespace 1948 * @readonly 1949 * @see $.fn.swipe.defaults#fingers 1950 * @property {string} ONE Constant indicating 1 finger is to be detected / was detected. Value is <code>1</code>. 1951 * @property {string} TWO Constant indicating 2 fingers are to be detected / were detected. Value is <code>2</code>. 1952 * @property {string} THREE Constant indicating 3 finger are to be detected / were detected. Value is <code>3</code>. 1953 * @property {string} FOUR Constant indicating 4 finger are to be detected / were detected. Not all devices support this. Value is <code>4</code>. 1954 * @property {string} FIVE Constant indicating 5 finger are to be detected / were detected. Not all devices support this. Value is <code>5</code>. 1955 * @property {string} ALL Constant indicating any combination of finger are to be detected. Value is <code>"all"</code>. 1956 */ 1957 $.fn.swipe.fingers = { 1958 ONE: 1, 1959 TWO: 2, 1960 THREE: 3, 1961 FOUR: 4, 1962 FIVE: 5, 1963 ALL: ALL_FINGERS 1964 }; 1965 1966 /** 1967 * Initialise the plugin for each DOM element matched 1968 * This creates a new instance of the main TouchSwipe class for each DOM element, and then 1969 * saves a reference to that instance in the elements data property. 1970 * @internal 1971 */ 1972 function init(options) { 1973 //Prep and extend the options 1974 if (options && (options.allowPageScroll === undefined && (options.swipe !== undefined || options.swipeStatus !== undefined))) { 1975 options.allowPageScroll = NONE; 1976 } 1977 1978 //Check for deprecated options 1979 //Ensure that any old click handlers are assigned to the new tap, unless we have a tap 1980 if (options.click !== undefined && options.tap === undefined) { 1981 options.tap = options.click; 1982 } 1983 1984 if (!options) { 1985 options = {}; 1986 } 1987 1988 //pass empty object so we dont modify the defaults 1989 options = $.extend({}, $.fn.swipe.defaults, options); 1990 1991 //For each element instantiate the plugin 1992 return this.each(function() { 1993 var $this = $(this); 1994 1995 //Check we havent already initialised the plugin 1996 var plugin = $this.data(PLUGIN_NS); 1997 1998 if (!plugin) { 1999 plugin = new TouchSwipe(this, options); 2000 $this.data(PLUGIN_NS, plugin); 2001 } 2002 }); 2003 } 2004 2005 /** 2006 * Main TouchSwipe Plugin Class. 2007 * Do not use this to construct your TouchSwipe object, use the jQuery plugin method $.fn.swipe(); {@link $.fn.swipe} 2008 * @private 2009 * @name TouchSwipe 2010 * @param {DOMNode} element The HTML DOM object to apply to plugin to 2011 * @param {Object} options The options to configure the plugin with. @link {$.fn.swipe.defaults} 2012 * @see $.fh.swipe.defaults 2013 * @see $.fh.swipe 2014 * @class 2015 */ 2016 function TouchSwipe(element, options) { 2017 2018 //take a local/instacne level copy of the options - should make it this.options really... 2019 var options = $.extend({}, options); 2020 2021 var useTouchEvents = (SUPPORTS_TOUCH || SUPPORTS_POINTER || !options.fallbackToMouseEvents), 2022 START_EV = useTouchEvents ? (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerDown' : 'pointerdown') : 'touchstart') : 'mousedown', 2023 MOVE_EV = useTouchEvents ? (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerMove' : 'pointermove') : 'touchmove') : 'mousemove', 2024 END_EV = useTouchEvents ? (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerUp' : 'pointerup') : 'touchend') : 'mouseup', 2025 LEAVE_EV = useTouchEvents ? (SUPPORTS_POINTER ? 'mouseleave' : null) : 'mouseleave', //we manually detect leave on touch devices, so null event here 2026 CANCEL_EV = (SUPPORTS_POINTER ? (SUPPORTS_POINTER_IE10 ? 'MSPointerCancel' : 'pointercancel') : 'touchcancel'); 2027 2028 2029 2030 //touch properties 2031 var distance = 0, 2032 direction = null, 2033 currentDirection = null, 2034 duration = 0, 2035 startTouchesDistance = 0, 2036 endTouchesDistance = 0, 2037 pinchZoom = 1, 2038 pinchDistance = 0, 2039 pinchDirection = 0, 2040 maximumsMap = null; 2041 2042 2043 2044 //jQuery wrapped element for this instance 2045 var $element = $(element); 2046 2047 //Current phase of th touch cycle 2048 var phase = "start"; 2049 2050 // the current number of fingers being used. 2051 var fingerCount = 0; 2052 2053 //track mouse points / delta 2054 var fingerData = {}; 2055 2056 //track times 2057 var startTime = 0, 2058 endTime = 0, 2059 previousTouchEndTime = 0, 2060 fingerCountAtRelease = 0, 2061 doubleTapStartTime = 0; 2062 2063 //Timeouts 2064 var singleTapTimeout = null, 2065 holdTimeout = null; 2066 2067 // Add gestures to all swipable areas if supported 2068 try { 2069 $element.
vendor: 15,271 bytes, lines 2069-2500
2069bind(START_EV, touchStart); 2070 $element.bind(CANCEL_EV, touchCancel); 2071 } catch (e) { 2072 $.error('events not supported ' + START_EV + ',' + CANCEL_EV + ' on jQuery.swipe'); 2073 } 2074 2075 // 2076 //Public methods 2077 // 2078 2079 /** 2080 * re-enables the swipe plugin with the previous configuration 2081 * @function 2082 * @name $.fn.swipe#enable 2083 * @return {DOMNode} The Dom element that was registered with TouchSwipe 2084 * @example $("#element").swipe("enable"); 2085 */ 2086 this.enable = function() { 2087 //Incase we are already enabled, clean up... 2088 this.disable(); 2089 $element.bind(START_EV, touchStart); 2090 $element.bind(CANCEL_EV, touchCancel); 2091 return $element; 2092 }; 2093 2094 /** 2095 * disables the swipe plugin 2096 * @function 2097 * @name $.fn.swipe#disable 2098 * @return {DOMNode} The Dom element that is now registered with TouchSwipe 2099 * @example $("#element").swipe("disable"); 2100 */ 2101 this.disable = function() { 2102 removeListeners(); 2103 return $element; 2104 }; 2105 2106 /** 2107 * Destroy the swipe plugin completely. To use any swipe methods, you must re initialise the plugin. 2108 * @function 2109 * @name $.fn.swipe#destroy 2110 * @example $("#element").swipe("destroy"); 2111 */ 2112 this.destroy = function() { 2113 removeListeners(); 2114 $element.data(PLUGIN_NS, null); 2115 $element = null; 2116 }; 2117 2118 2119 /** 2120 * Allows run time updating of the swipe configuration options. 2121 * @function 2122 * @name $.fn.swipe#option 2123 * @param {String} property The option property to get or set, or a has of multiple options to set 2124 * @param {Object} [value] The value to set the property to 2125 * @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. 2126 * @example $("#element").swipe("option", "threshold"); // return the threshold 2127 * @example $("#element").swipe("option", "threshold", 100); // set the threshold after init 2128 * @example $("#element").swipe("option", {threshold:100, fingers:3} ); // set multiple properties after init 2129 * @example $("#element").swipe({threshold:100, fingers:3} ); // set multiple properties after init - the "option" method is optional! 2130 * @example $("#element").swipe("option"); // Return the current options hash 2131 * @see $.fn.swipe.defaults 2132 * 2133 */ 2134 this.option = function(property, value) { 2135 2136 if (typeof property === 'object') { 2137 options = $.extend(options, property); 2138 } else if (options[property] !== undefined) { 2139 if (value === undefined) { 2140 return options[property]; 2141 } else { 2142 options[property] = value; 2143 } 2144 } else if (!property) { 2145 return options; 2146 } else { 2147 $.error('Option ' + property + ' does not exist on jQuery.swipe.options'); 2148 } 2149 2150 return null; 2151 } 2152 2153 2154 2155 // 2156 // Private methods 2157 // 2158 2159 // 2160 // EVENTS 2161 // 2162 /** 2163 * Event handler for a touch start event. 2164 * Stops the default click event from triggering and stores where we touched 2165 * @inner 2166 * @param {object} jqEvent The normalised jQuery event object. 2167 */ 2168 function touchStart(jqEvent) { 2169 2170 //If we already in a touch event (a finger already in use) then ignore subsequent ones.. 2171 if (getTouchInProgress()) { 2172 return; 2173 } 2174 2175 //Check if this element matches any in the excluded elements selectors, or its parent is excluded, if so, DON'T swipe 2176 if ($(jqEvent.target).closest(options.excludedElements, $element).length > 0) { 2177 return; 2178 } 2179 2180 //As we use Jquery bind for events, we need to target the original event object 2181 //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one. 2182 var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent; 2183 2184 2185 //If we have a pointer event, whoes type is 'mouse' and we have said NO mouse events, then dont do anything. 2186 if(event.pointerType && event.pointerType=="mouse" && options.fallbackToMouseEvents==false) { 2187 return; 2188 }; 2189 2190 var ret, 2191 touches = event.touches, 2192 evt = touches ? touches[0] : event; 2193 2194 phase = PHASE_START; 2195 2196 //If we support touches, get the finger count 2197 if (touches) { 2198 // get the total number of fingers touching the screen 2199 fingerCount = touches.length; 2200 } 2201 //Else this is the desktop, so stop the browser from dragging content 2202 else if (options.preventDefaultEvents !== false) { 2203 jqEvent.preventDefault(); //call this on jq event so we are cross browser 2204 } 2205 2206 //clear vars.. 2207 distance = 0; 2208 direction = null; 2209 currentDirection=null; 2210 pinchDirection = null; 2211 duration = 0; 2212 startTouchesDistance = 0; 2213 endTouchesDistance = 0; 2214 pinchZoom = 1; 2215 pinchDistance = 0; 2216 maximumsMap = createMaximumsData(); 2217 cancelMultiFingerRelease(); 2218 2219 //Create the default finger data 2220 createFingerData(0, evt); 2221 2222 // check the number of fingers is what we are looking for, or we are capturing pinches 2223 if (!touches || (fingerCount === options.fingers || options.fingers === ALL_FINGERS) || hasPinches()) { 2224 // get the coordinates of the touch 2225 startTime = getTimeStamp(); 2226 2227 if (fingerCount == 2) { 2228 //Keep track of the initial pinch distance, so we can calculate the diff later 2229 //Store second finger data as start 2230 createFingerData(1, touches[1]); 2231 startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start); 2232 } 2233 2234 if (options.swipeStatus || options.pinchStatus) { 2235 ret = triggerHandler(event, phase); 2236 } 2237 } else { 2238 //A touch with more or less than the fingers we are looking for, so cancel 2239 ret = false; 2240 } 2241 2242 //If we have a return value from the users handler, then return and cancel 2243 if (ret === false) { 2244 phase = PHASE_CANCEL; 2245 triggerHandler(event, phase); 2246 return ret; 2247 } else { 2248 if (options.hold) { 2249 holdTimeout = setTimeout($.proxy(function() { 2250 //Trigger the event 2251 $element.trigger('hold', [event.target]); 2252 //Fire the callback 2253 if (options.hold) { 2254 ret = options.hold.call($element, event, event.target); 2255 } 2256 }, this), options.longTapThreshold); 2257 } 2258 2259 setTouchInProgress(true); 2260 } 2261 2262 return null; 2263 }; 2264 2265 2266 2267 /** 2268 * Event handler for a touch move event. 2269 * If we change fingers during move, then cancel the event 2270 * @inner 2271 * @param {object} jqEvent The normalised jQuery event object. 2272 */ 2273 function touchMove(jqEvent) { 2274 2275 //As we use Jquery bind for events, we need to target the original event object 2276 //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one. 2277 var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent; 2278 2279 //If we are ending, cancelling, or within the threshold of 2 fingers being released, don't track anything.. 2280 if (phase === PHASE_END || phase === PHASE_CANCEL || inMultiFingerRelease()) 2281 return; 2282 2283 var ret, 2284 touches = event.touches, 2285 evt = touches ? touches[0] : event; 2286 2287 2288 //Update the finger data 2289 var currentFinger = updateFingerData(evt); 2290 endTime = getTimeStamp(); 2291 2292 if (touches) { 2293 fingerCount = touches.length; 2294 } 2295 2296 if (options.hold) { 2297 clearTimeout(holdTimeout); 2298 } 2299 2300 phase = PHASE_MOVE; 2301 2302 //If we have 2 fingers get Touches distance as well 2303 if (fingerCount == 2) { 2304 2305 //Keep track of the initial pinch distance, so we can calculate the diff later 2306 //We do this here as well as the start event, in case they start with 1 finger, and the press 2 fingers 2307 if (startTouchesDistance == 0) { 2308 //Create second finger if this is the first time... 2309 createFingerData(1, touches[1]); 2310 2311 startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start); 2312 } else { 2313 //Else just update the second finger 2314 updateFingerData(touches[1]); 2315 2316 endTouchesDistance = calculateTouchesDistance(fingerData[0].end, fingerData[1].end); 2317 pinchDirection = calculatePinchDirection(fingerData[0].end, fingerData[1].end); 2318 } 2319 2320 pinchZoom = calculatePinchZoom(startTouchesDistance, endTouchesDistance); 2321 pinchDistance = Math.abs(startTouchesDistance - endTouchesDistance); 2322 } 2323 2324 if ((fingerCount === options.fingers || options.fingers === ALL_FINGERS) || !touches || hasPinches()) { 2325 2326 //The overall direction of the swipe. From start to now. 2327 direction = calculateDirection(currentFinger.start, currentFinger.end); 2328 2329 //The immediate direction of the swipe, direction between the last movement and this one. 2330 currentDirection = calculateDirection(currentFinger.last, currentFinger.end); 2331 2332 //Check if we need to prevent default event (page scroll / pinch zoom) or not 2333 validateDefaultEvent(jqEvent, currentDirection); 2334 2335 //Distance and duration are all off the main finger 2336 distance = calculateDistance(currentFinger.start, currentFinger.end); 2337 duration = calculateDuration(); 2338 2339 //Cache the maximum distance we made in this direction 2340 setMaxDistance(direction, distance); 2341 2342 //Trigger status handler 2343 ret = triggerHandler(event, phase); 2344 2345 2346 //If we trigger end events when threshold are met, or trigger events when touch leaves element 2347 if (!options.triggerOnTouchEnd || options.triggerOnTouchLeave) { 2348 2349 var inBounds = true; 2350 2351 //If checking if we leave the element, run the bounds check (we can use touchleave as its not supported on webkit) 2352 if (options.triggerOnTouchLeave) { 2353 var bounds = getbounds(this); 2354 inBounds = isInBounds(currentFinger.end, bounds); 2355 } 2356 2357 //Trigger end handles as we swipe if thresholds met or if we have left the element if the user has asked to check these.. 2358 if (!options.triggerOnTouchEnd && inBounds) { 2359 phase = getNextPhase(PHASE_MOVE); 2360 } 2361 //We end if out of bounds here, so set current phase to END, and check if its modified 2362 else if (options.triggerOnTouchLeave && !inBounds) { 2363 phase = getNextPhase(PHASE_END); 2364 } 2365 2366 if (phase == PHASE_CANCEL || phase == PHASE_END) { 2367 triggerHandler(event, phase); 2368 } 2369 } 2370 } else { 2371 phase = PHASE_CANCEL; 2372 triggerHandler(event, phase); 2373 } 2374 2375 if (ret === false) { 2376 phase = PHASE_CANCEL; 2377 triggerHandler(event, phase); 2378 } 2379 } 2380 2381 2382 2383 2384 /** 2385 * Event handler for a touch end event. 2386 * Calculate the direction and trigger events 2387 * @inner 2388 * @param {object} jqEvent The normalised jQuery event object. 2389 */ 2390 function touchEnd(jqEvent) { 2391 //As we use Jquery bind for events, we need to target the original event object 2392 //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one. 2393 var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent, 2394 touches = event.touches; 2395 2396 //If we are still in a touch with the device wait a fraction and see if the other finger comes up 2397 //if it does within the threshold, then we treat it as a multi release, not a single release and end the touch / swipe 2398 if (touches) { 2399 if (touches.length && !inMultiFingerRelease()) { 2400 startMultiFingerRelease(event); 2401 return true; 2402 } else if (touches.length && inMultiFingerRelease()) { 2403 return true; 2404 } 2405 } 2406 2407 //If a previous finger has been released, check how long ago, if within the threshold, then assume it was a multifinger release. 2408 //This is used to allow 2 fingers to release fractionally after each other, whilst maintaining the event as containing 2 fingers, not 1 2409 if (inMultiFingerRelease()) { 2410 fingerCount = fingerCountAtRelease; 2411 } 2412 2413 //Set end of swipe 2414 endTime = getTimeStamp(); 2415 2416 //Get duration incase move was never fired 2417 duration = calculateDuration(); 2418 2419 //If we trigger handlers at end of swipe OR, we trigger during, but they didnt trigger and we are still in the move phase 2420 if (didSwipeBackToCancel() || !validateSwipeDistance()) { 2421 phase = PHASE_CANCEL; 2422 triggerHandler(event, phase); 2423 } else if (options.triggerOnTouchEnd || (options.triggerOnTouchEnd === false && phase === PHASE_MOVE)) { 2424 //call this on jq event so we are cross browser 2425 if (options.preventDefaultEvents !== false) { 2426 jqEvent.preventDefault(); 2427 } 2428 phase = PHASE_END; 2429 triggerHandler(event, phase); 2430 } 2431 //Special cases - A tap should always fire on touch end regardless, 2432 //So here we manually trigger the tap end handler by itself 2433 //We dont run trigger handler as it will re-trigger events that may have fired already 2434 else if (!options.triggerOnTouchEnd && hasTap()) { 2435 //Trigger the pinch events... 2436 phase = PHASE_END; 2437 triggerHandlerForGesture(event, phase, TAP); 2438 } else if (phase === PHASE_MOVE) { 2439 phase = PHASE_CANCEL; 2440 triggerHandler(event, phase); 2441 } 2442 2443 setTouchInProgress(false); 2444 2445 return null; 2446 } 2447 2448 2449 2450 /** 2451 * Event handler for a touch cancel event. 2452 * Clears current vars 2453 * @inner 2454 */ 2455 function touchCancel() { 2456 // reset the variables back to default values 2457 fingerCount = 0; 2458 endTime = 0; 2459 startTime = 0; 2460 startTouchesDistance = 0; 2461 endTouchesDistance = 0; 2462 pinchZoom = 1; 2463 2464 //If we were in progress of tracking a possible multi touch end, then re set it. 2465 cancelMultiFingerRelease(); 2466 2467 setTouchInProgress(false); 2468 } 2469 2470 2471 /** 2472 * Event handler for a touch leave event. 2473 * This is only triggered on desktops, in touch we work this out manually 2474 * as the touchleave event is not supported in webkit 2475 * @inner 2476 */ 2477 function touchLeave(jqEvent) { 2478 //If these events are being programmatically triggered, we don't have an original event object, so use the Jq one. 2479 var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent; 2480 2481 //If we have the trigger on leave property set.... 2482 if (options.triggerOnTouchLeave) { 2483 phase = getNextPhase(PHASE_END); 2484 triggerHandler(event, phase); 2485 } 2486 } 2487 2488 /** 2489 * Removes all listeners that were associated with the plugin 2490 * @inner 2491 */ 2492 function removeListeners() { 2493 $element.unbind(START_EV, touchStart); 2494 $element.unbind(CANCEL_EV, touchCancel); 2495 $element.unbind(MOVE_EV, touchMove); 2496 $element.unbind(END_EV, touchEnd); 2497 2498 //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit 2499 if (LEAVE_EV) { 2500 $element.unbind
vendor: 20,844 bytes, lines 2500-3160
2500(LEAVE_EV, touchLeave); 2501 } 2502 2503 setTouchInProgress(false); 2504 } 2505 2506 2507 /** 2508 * Checks if the time and distance thresholds have been met, and if so then the appropriate handlers are fired. 2509 */ 2510 function getNextPhase(currentPhase) { 2511 2512 var nextPhase = currentPhase; 2513 2514 // Ensure we have valid swipe (under time and over distance and check if we are out of bound...) 2515 var validTime = validateSwipeTime(); 2516 var validDistance = validateSwipeDistance(); 2517 var didCancel = didSwipeBackToCancel(); 2518 2519 //If we have exceeded our time, then cancel 2520 if (!validTime || didCancel) { 2521 nextPhase = PHASE_CANCEL; 2522 } 2523 //Else if we are moving, and have reached distance then end 2524 else if (validDistance && currentPhase == PHASE_MOVE && (!options.triggerOnTouchEnd || options.triggerOnTouchLeave)) { 2525 nextPhase = PHASE_END; 2526 } 2527 //Else if we have ended by leaving and didn't reach distance, then cancel 2528 else if (!validDistance && currentPhase == PHASE_END && options.triggerOnTouchLeave) { 2529 nextPhase = PHASE_CANCEL; 2530 } 2531 2532 return nextPhase; 2533 } 2534 2535 2536 /** 2537 * Trigger the relevant event handler 2538 * 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" 2539 * @param {object} event the original event object 2540 * @param {string} phase the phase of the swipe (start, end cancel etc) {@link $.fn.swipe.phases} 2541 * @inner 2542 */ 2543 function triggerHandler(event, phase) { 2544 2545 2546 2547 var ret, 2548 touches = event.touches; 2549 2550 // SWIPE GESTURES 2551 if (didSwipe() || hasSwipes()) { 2552 ret = triggerHandlerForGesture(event, phase, SWIPE); 2553 } 2554 2555 // PINCH GESTURES (if the above didn't cancel) 2556 if ((didPinch() || hasPinches()) && ret !== false) { 2557 ret = triggerHandlerForGesture(event, phase, PINCH); 2558 } 2559 2560 // CLICK / TAP (if the above didn't cancel) 2561 if (didDoubleTap() && ret !== false) { 2562 //Trigger the tap events... 2563 ret = triggerHandlerForGesture(event, phase, DOUBLE_TAP); 2564 } 2565 2566 // CLICK / TAP (if the above didn't cancel) 2567 else if (didLongTap() && ret !== false) { 2568 //Trigger the tap events... 2569 ret = triggerHandlerForGesture(event, phase, LONG_TAP); 2570 } 2571 2572 // CLICK / TAP (if the above didn't cancel) 2573 else if (didTap() && ret !== false) { 2574 //Trigger the tap event.. 2575 ret = triggerHandlerForGesture(event, phase, TAP); 2576 } 2577 2578 2579 2580 // If we are cancelling the gesture, then manually trigger the reset handler 2581 if (phase === PHASE_CANCEL) { 2582 2583 touchCancel(event); 2584 } 2585 2586 2587 2588 2589 // If we are ending the gesture, then manually trigger the reset handler IF all fingers are off 2590 if (phase === PHASE_END) { 2591 //If we support touch, then check that all fingers are off before we cancel 2592 if (touches) { 2593 if (!touches.length) { 2594 touchCancel(event); 2595 } 2596 } else { 2597 touchCancel(event); 2598 } 2599 } 2600 2601 return ret; 2602 } 2603 2604 2605 2606 /** 2607 * Trigger the relevant event handler 2608 * 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" 2609 * @param {object} event the original event object 2610 * @param {string} phase the phase of the swipe (start, end cancel etc) {@link $.fn.swipe.phases} 2611 * @param {string} gesture the gesture to trigger a handler for : PINCH or SWIPE {@link $.fn.swipe.gestures} 2612 * @return Boolean False, to indicate that the event should stop propagation, or void. 2613 * @inner 2614 */ 2615 function triggerHandlerForGesture(event, phase, gesture) { 2616 2617 var ret; 2618 2619 //SWIPES.... 2620 if (gesture == SWIPE) { 2621 //Trigger status every time.. 2622 $element.trigger('swipeStatus', [phase, direction || null, distance || 0, duration || 0, fingerCount, fingerData, currentDirection]); 2623 2624 if (options.swipeStatus) { 2625 ret = options.swipeStatus.call($element, event, phase, direction || null, distance || 0, duration || 0, fingerCount, fingerData, currentDirection); 2626 //If the status cancels, then dont run the subsequent event handlers.. 2627 if (ret === false) return false; 2628 } 2629 2630 if (phase == PHASE_END && validateSwipe()) { 2631 2632 //Cancel any taps that were in progress... 2633 clearTimeout(singleTapTimeout); 2634 clearTimeout(holdTimeout); 2635 2636 $element.trigger('swipe', [direction, distance, duration, fingerCount, fingerData, currentDirection]); 2637 2638 if (options.swipe) { 2639 ret = options.swipe.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection); 2640 //If the status cancels, then dont run the subsequent event handlers.. 2641 if (ret === false) return false; 2642 } 2643 2644 //trigger direction specific event handlers 2645 switch (direction) { 2646 case LEFT: 2647 $element.trigger('swipeLeft', [direction, distance, duration, fingerCount, fingerData, currentDirection]); 2648 2649 if (options.swipeLeft) { 2650 ret = options.swipeLeft.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection); 2651 } 2652 break; 2653 2654 case RIGHT: 2655 $element.trigger('swipeRight', [direction, distance, duration, fingerCount, fingerData, currentDirection]); 2656 2657 if (options.swipeRight) { 2658 ret = options.swipeRight.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection); 2659 } 2660 break; 2661 2662 case UP: 2663 $element.trigger('swipeUp', [direction, distance, duration, fingerCount, fingerData, currentDirection]); 2664 2665 if (options.swipeUp) { 2666 ret = options.swipeUp.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection); 2667 } 2668 break; 2669 2670 case DOWN: 2671 $element.trigger('swipeDown', [direction, distance, duration, fingerCount, fingerData, currentDirection]); 2672 2673 if (options.swipeDown) { 2674 ret = options.swipeDown.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection); 2675 } 2676 break; 2677 } 2678 } 2679 } 2680 2681 2682 //PINCHES.... 2683 if (gesture == PINCH) { 2684 $element.trigger('pinchStatus', [phase, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]); 2685 2686 if (options.pinchStatus) { 2687 ret = options.pinchStatus.call($element, event, phase, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData); 2688 //If the status cancels, then dont run the subsequent event handlers.. 2689 if (ret === false) return false; 2690 } 2691 2692 if (phase == PHASE_END && validatePinch()) { 2693 2694 switch (pinchDirection) { 2695 case IN: 2696 $element.trigger('pinchIn', [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]); 2697 2698 if (options.pinchIn) { 2699 ret = options.pinchIn.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData); 2700 } 2701 break; 2702 2703 case OUT: 2704 $element.trigger('pinchOut', [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]); 2705 2706 if (options.pinchOut) { 2707 ret = options.pinchOut.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData); 2708 } 2709 break; 2710 } 2711 } 2712 } 2713 2714 if (gesture == TAP) { 2715 if (phase === PHASE_CANCEL || phase === PHASE_END) { 2716 2717 clearTimeout(singleTapTimeout); 2718 clearTimeout(holdTimeout); 2719 2720 //If we are also looking for doubelTaps, wait incase this is one... 2721 if (hasDoubleTap() && !inDoubleTap()) { 2722 doubleTapStartTime = getTimeStamp(); 2723 2724 //Now wait for the double tap timeout, and trigger this single tap 2725 //if its not cancelled by a double tap 2726 singleTapTimeout = setTimeout($.proxy(function() { 2727 doubleTapStartTime = null; 2728 $element.trigger('tap', [event.target]); 2729 2730 if (options.tap) { 2731 ret = options.tap.call($element, event, event.target); 2732 } 2733 }, this), options.doubleTapThreshold); 2734 2735 } else { 2736 doubleTapStartTime = null; 2737 $element.trigger('tap', [event.target]); 2738 if (options.tap) { 2739 ret = options.tap.call($element, event, event.target); 2740 } 2741 } 2742 } 2743 } else if (gesture == DOUBLE_TAP) { 2744 if (phase === PHASE_CANCEL || phase === PHASE_END) { 2745 clearTimeout(singleTapTimeout); 2746 clearTimeout(holdTimeout); 2747 doubleTapStartTime = null; 2748 $element.trigger('doubletap', [event.target]); 2749 2750 if (options.doubleTap) { 2751 ret = options.doubleTap.call($element, event, event.target); 2752 } 2753 } 2754 } else if (gesture == LONG_TAP) { 2755 if (phase === PHASE_CANCEL || phase === PHASE_END) { 2756 clearTimeout(singleTapTimeout); 2757 doubleTapStartTime = null; 2758 2759 $element.trigger('longtap', [event.target]); 2760 if (options.longTap) { 2761 ret = options.longTap.call($element, event, event.target); 2762 } 2763 } 2764 } 2765 2766 return ret; 2767 } 2768 2769 2770 // 2771 // GESTURE VALIDATION 2772 // 2773 2774 /** 2775 * Checks the user has swipe far enough 2776 * @return Boolean if <code>threshold</code> has been set, return true if the threshold was met, else false. 2777 * If no threshold was set, then we return true. 2778 * @inner 2779 */ 2780 function validateSwipeDistance() { 2781 var valid = true; 2782 //If we made it past the min swipe distance.. 2783 if (options.threshold !== null) { 2784 valid = distance >= options.threshold; 2785 } 2786 2787 return valid; 2788 } 2789 2790 /** 2791 * Checks the user has swiped back to cancel. 2792 * @return Boolean if <code>cancelThreshold</code> has been set, return true if the cancelThreshold was met, else false. 2793 * If no cancelThreshold was set, then we return true. 2794 * @inner 2795 */ 2796 function didSwipeBackToCancel() { 2797 var cancelled = false; 2798 if (options.cancelThreshold !== null && direction !== null) { 2799 cancelled = (getMaxDistance(direction) - distance) >= options.cancelThreshold; 2800 } 2801 2802 return cancelled; 2803 } 2804 2805 /** 2806 * Checks the user has pinched far enough 2807 * @return Boolean if <code>pinchThreshold</code> has been set, return true if the threshold was met, else false. 2808 * If no threshold was set, then we return true. 2809 * @inner 2810 */ 2811 function validatePinchDistance() { 2812 if (options.pinchThreshold !== null) { 2813 return pinchDistance >= options.pinchThreshold; 2814 } 2815 return true; 2816 } 2817 2818 /** 2819 * Checks that the time taken to swipe meets the minimum / maximum requirements 2820 * @return Boolean 2821 * @inner 2822 */ 2823 function validateSwipeTime() { 2824 var result; 2825 //If no time set, then return true 2826 if (options.maxTimeThreshold) { 2827 if (duration >= options.maxTimeThreshold) { 2828 result = false; 2829 } else { 2830 result = true; 2831 } 2832 } else { 2833 result = true; 2834 } 2835 2836 return result; 2837 } 2838 2839 2840 /** 2841 * Checks direction of the swipe and the value allowPageScroll to see if we should allow or prevent the default behaviour from occurring. 2842 * This will essentially allow page scrolling or not when the user is swiping on a touchSwipe object. 2843 * @param {object} jqEvent The normalised jQuery representation of the event object. 2844 * @param {string} direction The direction of the event. See {@link $.fn.swipe.directions} 2845 * @see $.fn.swipe.directions 2846 * @inner 2847 */ 2848 function validateDefaultEvent(jqEvent, direction) { 2849 2850 //If the option is set, allways allow the event to bubble up (let user handle weirdness) 2851 if (options.preventDefaultEvents === false) { 2852 return; 2853 } 2854 2855 if (options.allowPageScroll === NONE) { 2856 jqEvent.preventDefault(); 2857 } else { 2858 var auto = options.allowPageScroll === AUTO; 2859 2860 switch (direction) { 2861 case LEFT: 2862 if ((options.swipeLeft && auto) || (!auto && options.allowPageScroll != HORIZONTAL)) { 2863 jqEvent.preventDefault(); 2864 } 2865 break; 2866 2867 case RIGHT: 2868 if ((options.swipeRight && auto) || (!auto && options.allowPageScroll != HORIZONTAL)) { 2869 jqEvent.preventDefault(); 2870 } 2871 break; 2872 2873 case UP: 2874 if ((options.swipeUp && auto) || (!auto && options.allowPageScroll != VERTICAL)) { 2875 jqEvent.preventDefault(); 2876 } 2877 break; 2878 2879 case DOWN: 2880 if ((options.swipeDown && auto) || (!auto && options.allowPageScroll != VERTICAL)) { 2881 jqEvent.preventDefault(); 2882 } 2883 break; 2884 2885 case NONE: 2886 2887 break; 2888 } 2889 } 2890 } 2891 2892 2893 // PINCHES 2894 /** 2895 * Returns true of the current pinch meets the thresholds 2896 * @return Boolean 2897 * @inner 2898 */ 2899 function validatePinch() { 2900 var hasCorrectFingerCount = validateFingers(); 2901 var hasEndPoint = validateEndPoint(); 2902 var hasCorrectDistance = validatePinchDistance(); 2903 return hasCorrectFingerCount && hasEndPoint && hasCorrectDistance; 2904 2905 } 2906 2907 /** 2908 * Returns true if any Pinch events have been registered 2909 * @return Boolean 2910 * @inner 2911 */ 2912 function hasPinches() { 2913 //Enure we dont return 0 or null for false values 2914 return !!(options.pinchStatus || options.pinchIn || options.pinchOut); 2915 } 2916 2917 /** 2918 * Returns true if we are detecting pinches, and have one 2919 * @return Boolean 2920 * @inner 2921 */ 2922 function didPinch() { 2923 //Enure we dont return 0 or null for false values 2924 return !!(validatePinch() && hasPinches()); 2925 } 2926 2927 2928 2929 2930 // SWIPES 2931 /** 2932 * Returns true if the current swipe meets the thresholds 2933 * @return Boolean 2934 * @inner 2935 */ 2936 function validateSwipe() { 2937 //Check validity of swipe 2938 var hasValidTime = validateSwipeTime(); 2939 var hasValidDistance = validateSwipeDistance(); 2940 var hasCorrectFingerCount = validateFingers(); 2941 var hasEndPoint = validateEndPoint(); 2942 var didCancel = didSwipeBackToCancel(); 2943 2944 // if the user swiped more than the minimum length, perform the appropriate action 2945 // hasValidDistance is null when no distance is set 2946 var valid = !didCancel && hasEndPoint && hasCorrectFingerCount && hasValidDistance && hasValidTime; 2947 2948 return valid; 2949 } 2950 2951 /** 2952 * Returns true if any Swipe events have been registered 2953 * @return Boolean 2954 * @inner 2955 */ 2956 function hasSwipes() { 2957 //Enure we dont return 0 or null for false values 2958 return !!(options.swipe || options.swipeStatus || options.swipeLeft || options.swipeRight || options.swipeUp || options.swipeDown); 2959 } 2960 2961 2962 /** 2963 * Returns true if we are detecting swipes and have one 2964 * @return Boolean 2965 * @inner 2966 */ 2967 function didSwipe() { 2968 //Enure we dont return 0 or null for false values 2969 return !!(validateSwipe() && hasSwipes()); 2970 } 2971 2972 /** 2973 * Returns true if we have matched the number of fingers we are looking for 2974 * @return Boolean 2975 * @inner 2976 */ 2977 function validateFingers() { 2978 //The number of fingers we want were matched, or on desktop we ignore 2979 return ((fingerCount === options.fingers || options.fingers === ALL_FINGERS) || !SUPPORTS_TOUCH); 2980 } 2981 2982 /** 2983 * Returns true if we have an end point for the swipe 2984 * @return Boolean 2985 * @inner 2986 */ 2987 function validateEndPoint() { 2988 //We have an end value for the finger 2989 return fingerData[0].end.x !== 0; 2990 } 2991 2992 // TAP / CLICK 2993 /** 2994 * Returns true if a click / tap events have been registered 2995 * @return Boolean 2996 * @inner 2997 */ 2998 function hasTap() { 2999 //Enure we dont return 0 or null for false values 3000 return !!(options.tap); 3001 } 3002 3003 /** 3004 * Returns true if a double tap events have been registered 3005 * @return Boolean 3006 * @inner 3007 */ 3008 function hasDoubleTap() { 3009 //Enure we dont return 0 or null for false values 3010 return !!(options.doubleTap); 3011 } 3012 3013 /** 3014 * Returns true if any long tap events have been registered 3015 * @return Boolean 3016 * @inner 3017 */ 3018 function hasLongTap() { 3019 //Enure we dont return 0 or null for false values 3020 return !!(options.longTap); 3021 } 3022 3023 /** 3024 * 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. 3025 * @return Boolean 3026 * @inner 3027 */ 3028 function validateDoubleTap() { 3029 if (doubleTapStartTime == null) { 3030 return false; 3031 } 3032 var now = getTimeStamp(); 3033 return (hasDoubleTap() && ((now - doubleTapStartTime) <= options.doubleTapThreshold)); 3034 } 3035 3036 /** 3037 * 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. 3038 * @return Boolean 3039 * @inner 3040 */ 3041 function inDoubleTap() { 3042 return validateDoubleTap(); 3043 } 3044 3045 3046 /** 3047 * Returns true if we have a valid tap 3048 * @return Boolean 3049 * @inner 3050 */ 3051 function validateTap() { 3052 return ((fingerCount === 1 || !SUPPORTS_TOUCH) && (isNaN(distance) || distance < options.threshold)); 3053 } 3054 3055 /** 3056 * Returns true if we have a valid long tap 3057 * @return Boolean 3058 * @inner 3059 */ 3060 function validateLongTap() { 3061 //slight threshold on moving finger 3062 return ((duration > options.longTapThreshold) && (distance < DOUBLE_TAP_THRESHOLD)); 3063 } 3064 3065 /** 3066 * Returns true if we are detecting taps and have one 3067 * @return Boolean 3068 * @inner 3069 */ 3070 function didTap() { 3071 //Enure we dont return 0 or null for false values 3072 return !!(validateTap() && hasTap()); 3073 } 3074 3075 3076 /** 3077 * Returns true if we are detecting double taps and have one 3078 * @return Boolean 3079 * @inner 3080 */ 3081 function didDoubleTap() { 3082 //Enure we dont return 0 or null for false values 3083 return !!(validateDoubleTap() && hasDoubleTap()); 3084 } 3085 3086 /** 3087 * Returns true if we are detecting long taps and have one 3088 * @return Boolean 3089 * @inner 3090 */ 3091 function didLongTap() { 3092 //Enure we dont return 0 or null for false values 3093 return !!(validateLongTap() && hasLongTap()); 3094 } 3095 3096 3097 3098 3099 // MULTI FINGER TOUCH 3100 /** 3101 * Starts tracking the time between 2 finger releases, and keeps track of how many fingers we initially had up 3102 * @inner 3103 */ 3104 function startMultiFingerRelease(event) { 3105 previousTouchEndTime = getTimeStamp(); 3106 fingerCountAtRelease = event.touches.length + 1; 3107 } 3108 3109 /** 3110 * Cancels the tracking of time between 2 finger releases, and resets counters 3111 * @inner 3112 */ 3113 function cancelMultiFingerRelease() { 3114 previousTouchEndTime = 0; 3115 fingerCountAtRelease = 0; 3116 } 3117 3118 /** 3119 * Checks if we are in the threshold between 2 fingers being released 3120 * @return Boolean 3121 * @inner 3122 */ 3123 function inMultiFingerRelease() { 3124 3125 var withinThreshold = false; 3126 3127 if (previousTouchEndTime) { 3128 var diff = getTimeStamp() - previousTouchEndTime 3129 if (diff <= options.fingerReleaseThreshold) { 3130 withinThreshold = true; 3131 } 3132 } 3133 3134 return withinThreshold; 3135 } 3136 3137 3138 /** 3139 * gets a data flag to indicate that a touch is in progress 3140 * @return Boolean 3141 * @inner 3142 */ 3143 function getTouchInProgress() { 3144 //strict equality to ensure only true and false are returned 3145 return !!($element.data(PLUGIN_NS + '_intouch') === true); 3146 } 3147 3148 /** 3149 * Sets a data flag to indicate that a touch is in progress 3150 * @param {boolean} val The value to set the property to 3151 * @inner 3152 */ 3153 function setTouchInProgress(val) { 3154 3155 //If destroy is called in an event handler, we have no el, and we have already cleaned up, so return. 3156 if(!$element) { return; } 3157 3158 //Add or remove event listeners depending on touch status 3159 if (val === true) { 3160 $element.
3160bind(MOVE_EV, touchMove); 3161 $element.bind(END_EV, touchEnd); 3162 3163 //we only have leave events on desktop, we manually calcuate leave on touch as its not supported in webkit 3164 if (LEAVE_EV) { 3165 $element.bind(LEAVE_EV, touchLeave); 3166 } 3167 } else { 3168 3169 $element.unbind(MOVE_EV, touchMove, false); 3170 $element.unbind(END_EV, touchEnd, false); 3171 3172 //we only have leave events on desktop, we manually calcuate leave on touch as its not supported in webkit 3173 if (LEAVE_EV) { 3174 $element.unbind
vendor: 17,430 bytes, lines 3174-3669
3174(LEAVE_EV, touchLeave, false); 3175 } 3176 } 3177 3178 3179 //strict equality to ensure only true and false can update the value 3180 $element.data(PLUGIN_NS + '_intouch', val === true); 3181 } 3182 3183 3184 /** 3185 * Creates the finger data for the touch/finger in the event object. 3186 * @param {int} id The id to store the finger data under (usually the order the fingers were pressed) 3187 * @param {object} evt The event object containing finger data 3188 * @return finger data object 3189 * @inner 3190 */ 3191 function createFingerData(id, evt) { 3192 var f = { 3193 start: { 3194 x: 0, 3195 y: 0 3196 }, 3197 last: { 3198 x: 0, 3199 y: 0 3200 }, 3201 end: { 3202 x: 0, 3203 y: 0 3204 } 3205 }; 3206 f.start.x = f.last.x = f.end.x = evt.pageX || evt.clientX; 3207 f.start.y = f.last.y = f.end.y = evt.pageY || evt.clientY; 3208 fingerData[id] = f; 3209 return f; 3210 } 3211 3212 /** 3213 * Updates the finger data for a particular event object 3214 * @param {object} evt The event object containing the touch/finger data to upadte 3215 * @return a finger data object. 3216 * @inner 3217 */ 3218 function updateFingerData(evt) { 3219 var id = evt.identifier !== undefined ? evt.identifier : 0; 3220 var f = getFingerData(id); 3221 3222 if (f === null) { 3223 f = createFingerData(id, evt); 3224 } 3225 3226 f.last.x = f.end.x; 3227 f.last.y = f.end.y; 3228 3229 f.end.x = evt.pageX || evt.clientX; 3230 f.end.y = evt.pageY || evt.clientY; 3231 3232 return f; 3233 } 3234 3235 /** 3236 * Returns a finger data object by its event ID. 3237 * Each touch event has an identifier property, which is used 3238 * to track repeat touches 3239 * @param {int} id The unique id of the finger in the sequence of touch events. 3240 * @return a finger data object. 3241 * @inner 3242 */ 3243 function getFingerData(id) { 3244 return fingerData[id] || null; 3245 } 3246 3247 3248 /** 3249 * Sets the maximum distance swiped in the given direction. 3250 * If the new value is lower than the current value, the max value is not changed. 3251 * @param {string} direction The direction of the swipe 3252 * @param {int} distance The distance of the swipe 3253 * @inner 3254 */ 3255 function setMaxDistance(direction, distance) { 3256 if(direction==NONE) return; 3257 distance = Math.max(distance, getMaxDistance(direction)); 3258 maximumsMap[direction].distance = distance; 3259 } 3260 3261 /** 3262 * gets the maximum distance swiped in the given direction. 3263 * @param {string} direction The direction of the swipe 3264 * @return int The distance of the swipe 3265 * @inner 3266 */ 3267 function getMaxDistance(direction) { 3268 if (maximumsMap[direction]) return maximumsMap[direction].distance; 3269 return undefined; 3270 } 3271 3272 /** 3273 * Creats a map of directions to maximum swiped values. 3274 * @return Object A dictionary of maximum values, indexed by direction. 3275 * @inner 3276 */ 3277 function createMaximumsData() { 3278 var maxData = {}; 3279 maxData[LEFT] = createMaximumVO(LEFT); 3280 maxData[RIGHT] = createMaximumVO(RIGHT); 3281 maxData[UP] = createMaximumVO(UP); 3282 maxData[DOWN] = createMaximumVO(DOWN); 3283 3284 return maxData; 3285 } 3286 3287 /** 3288 * Creates a map maximum swiped values for a given swipe direction 3289 * @param {string} The direction that these values will be associated with 3290 * @return Object Maximum values 3291 * @inner 3292 */ 3293 function createMaximumVO(dir) { 3294 return { 3295 direction: dir, 3296 distance: 0 3297 } 3298 } 3299 3300 3301 // 3302 // MATHS / UTILS 3303 // 3304 3305 /** 3306 * Calculate the duration of the swipe 3307 * @return int 3308 * @inner 3309 */ 3310 function calculateDuration() { 3311 return endTime - startTime; 3312 } 3313 3314 /** 3315 * Calculate the distance between 2 touches (pinch) 3316 * @param {point} startPoint A point object containing x and y co-ordinates 3317 * @param {point} endPoint A point object containing x and y co-ordinates 3318 * @return int; 3319 * @inner 3320 */ 3321 function calculateTouchesDistance(startPoint, endPoint) { 3322 var diffX = Math.abs(startPoint.x - endPoint.x); 3323 var diffY = Math.abs(startPoint.y - endPoint.y); 3324 3325 return Math.round(Math.sqrt(diffX * diffX + diffY * diffY)); 3326 } 3327 3328 /** 3329 * Calculate the zoom factor between the start and end distances 3330 * @param {int} startDistance Distance (between 2 fingers) the user started pinching at 3331 * @param {int} endDistance Distance (between 2 fingers) the user ended pinching at 3332 * @return float The zoom value from 0 to 1. 3333 * @inner 3334 */ 3335 function calculatePinchZoom(startDistance, endDistance) { 3336 var percent = (endDistance / startDistance) * 1; 3337 return percent.toFixed(2); 3338 } 3339 3340 3341 /** 3342 * Returns the pinch direction, either IN or OUT for the given points 3343 * @return string Either {@link $.fn.swipe.directions.IN} or {@link $.fn.swipe.directions.OUT} 3344 * @see $.fn.swipe.directions 3345 * @inner 3346 */ 3347 function calculatePinchDirection() { 3348 if (pinchZoom < 1) { 3349 return OUT; 3350 } else { 3351 return IN; 3352 } 3353 } 3354 3355 3356 /** 3357 * Calculate the length / distance of the swipe 3358 * @param {point} startPoint A point object containing x and y co-ordinates 3359 * @param {point} endPoint A point object containing x and y co-ordinates 3360 * @return int 3361 * @inner 3362 */ 3363 function calculateDistance(startPoint, endPoint) { 3364 return Math.round(Math.sqrt(Math.pow(endPoint.x - startPoint.x, 2) + Math.pow(endPoint.y - startPoint.y, 2))); 3365 } 3366 3367 /** 3368 * Calculate the angle of the swipe 3369 * @param {point} startPoint A point object containing x and y co-ordinates 3370 * @param {point} endPoint A point object containing x and y co-ordinates 3371 * @return int 3372 * @inner 3373 */ 3374 function calculateAngle(startPoint, endPoint) { 3375 var x = startPoint.x - endPoint.x; 3376 var y = endPoint.y - startPoint.y; 3377 var r = Math.atan2(y, x); //radians 3378 var angle = Math.round(r * 180 / Math.PI); //degrees 3379 3380 //ensure value is positive 3381 if (angle < 0) { 3382 angle = 360 - Math.abs(angle); 3383 } 3384 3385 return angle; 3386 } 3387 3388 /** 3389 * Calculate the direction of the swipe 3390 * This will also call calculateAngle to get the latest angle of swipe 3391 * @param {point} startPoint A point object containing x and y co-ordinates 3392 * @param {point} endPoint A point object containing x and y co-ordinates 3393 * @return string Either {@link $.fn.swipe.directions.LEFT} / {@link $.fn.swipe.directions.RIGHT} / {@link $.fn.swipe.directions.DOWN} / {@link $.fn.swipe.directions.UP} 3394 * @see $.fn.swipe.directions 3395 * @inner 3396 */ 3397 function calculateDirection(startPoint, endPoint) { 3398 3399 if( comparePoints(startPoint, endPoint) ) { 3400 return NONE; 3401 } 3402 3403 var angle = calculateAngle(startPoint, endPoint); 3404 3405 if ((angle <= 45) && (angle >= 0)) { 3406 return LEFT; 3407 } else if ((angle <= 360) && (angle >= 315)) { 3408 return LEFT; 3409 } else if ((angle >= 135) && (angle <= 225)) { 3410 return RIGHT; 3411 } else if ((angle > 45) && (angle < 135)) { 3412 return DOWN; 3413 } else { 3414 return UP; 3415 } 3416 } 3417 3418 3419 /** 3420 * Returns a MS time stamp of the current time 3421 * @return int 3422 * @inner 3423 */ 3424 function getTimeStamp() { 3425 var now = new Date(); 3426 return now.getTime(); 3427 } 3428 3429 3430 3431 /** 3432 * Returns a bounds object with left, right, top and bottom properties for the element specified. 3433 * @param {DomNode} The DOM node to get the bounds for. 3434 */ 3435 function getbounds(el) { 3436 el = $(el); 3437 var offset = el.offset(); 3438 3439 var bounds = { 3440 left: offset.left, 3441 right: offset.left + el.outerWidth(), 3442 top: offset.top, 3443 bottom: offset.top + el.outerHeight() 3444 } 3445 3446 return bounds; 3447 } 3448 3449 3450 /** 3451 * Checks if the point object is in the bounds object. 3452 * @param {object} point A point object. 3453 * @param {int} point.x The x value of the point. 3454 * @param {int} point.y The x value of the point. 3455 * @param {object} bounds The bounds object to test 3456 * @param {int} bounds.left The leftmost value 3457 * @param {int} bounds.right The righttmost value 3458 * @param {int} bounds.top The topmost value 3459 * @param {int} bounds.bottom The bottommost value 3460 */ 3461 function isInBounds(point, bounds) { 3462 return (point.x > bounds.left && point.x < bounds.right && point.y > bounds.top && point.y < bounds.bottom); 3463 }; 3464 3465 /** 3466 * Checks if the two points are equal 3467 * @param {object} point A point object. 3468 * @param {object} point B point object. 3469 * @return true of the points match 3470 */ 3471 function comparePoints(pointA, pointB) { 3472 return (pointA.x == pointB.x && pointA.y == pointB.y); 3473 } 3474 3475 3476 } 3477 3478 3479 3480 3481 /** 3482 * A catch all handler that is triggered for all swipe directions. 3483 * @name $.fn.swipe#swipe 3484 * @event 3485 * @default null 3486 * @param {EventObject} event The original event object 3487 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 3488 * @param {int} distance The distance the user swiped 3489 * @param {int} duration The duration of the swipe in milliseconds 3490 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 3491 * @param {object} fingerData The coordinates of fingers in event 3492 * @param {string} currentDirection The current direction the user is swiping. 3493 */ 3494 3495 3496 3497 3498 /** 3499 * A handler that is triggered for "left" swipes. 3500 * @name $.fn.swipe#swipeLeft 3501 * @event 3502 * @default null 3503 * @param {EventObject} event The original event object 3504 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 3505 * @param {int} distance The distance the user swiped 3506 * @param {int} duration The duration of the swipe in milliseconds 3507 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 3508 * @param {object} fingerData The coordinates of fingers in event 3509 * @param {string} currentDirection The current direction the user is swiping. 3510 */ 3511 3512 /** 3513 * A handler that is triggered for "right" swipes. 3514 * @name $.fn.swipe#swipeRight 3515 * @event 3516 * @default null 3517 * @param {EventObject} event The original event object 3518 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 3519 * @param {int} distance The distance the user swiped 3520 * @param {int} duration The duration of the swipe in milliseconds 3521 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 3522 * @param {object} fingerData The coordinates of fingers in event 3523 * @param {string} currentDirection The current direction the user is swiping. 3524 */ 3525 3526 /** 3527 * A handler that is triggered for "up" swipes. 3528 * @name $.fn.swipe#swipeUp 3529 * @event 3530 * @default null 3531 * @param {EventObject} event The original event object 3532 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 3533 * @param {int} distance The distance the user swiped 3534 * @param {int} duration The duration of the swipe in milliseconds 3535 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 3536 * @param {object} fingerData The coordinates of fingers in event 3537 * @param {string} currentDirection The current direction the user is swiping. 3538 */ 3539 3540 /** 3541 * A handler that is triggered for "down" swipes. 3542 * @name $.fn.swipe#swipeDown 3543 * @event 3544 * @default null 3545 * @param {EventObject} event The original event object 3546 * @param {int} direction The direction the user swiped in. See {@link $.fn.swipe.directions} 3547 * @param {int} distance The distance the user swiped 3548 * @param {int} duration The duration of the swipe in milliseconds 3549 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 3550 * @param {object} fingerData The coordinates of fingers in event 3551 * @param {string} currentDirection The current direction the user is swiping. 3552 */ 3553 3554 /** 3555 * A handler triggered for every phase of the swipe. This handler is constantly fired for the duration of the pinch. 3556 * This is triggered regardless of swipe thresholds. 3557 * @name $.fn.swipe#swipeStatus 3558 * @event 3559 * @default null 3560 * @param {EventObject} event The original event object 3561 * @param {string} phase The phase of the swipe event. See {@link $.fn.swipe.phases} 3562 * @param {string} direction The direction the user swiped in. This is null if the user has yet to move. See {@link $.fn.swipe.directions} 3563 * @param {int} distance The distance the user swiped. This is 0 if the user has yet to move. 3564 * @param {int} duration The duration of the swipe in milliseconds 3565 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 3566 * @param {object} fingerData The coordinates of fingers in event 3567 * @param {string} currentDirection The current direction the user is swiping. 3568 */ 3569 3570 /** 3571 * A handler triggered for pinch in events. 3572 * @name $.fn.swipe#pinchIn 3573 * @event 3574 * @default null 3575 * @param {EventObject} event The original event object 3576 * @param {int} direction The direction the user pinched in. See {@link $.fn.swipe.directions} 3577 * @param {int} distance The distance the user pinched 3578 * @param {int} duration The duration of the swipe in milliseconds 3579 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 3580 * @param {int} zoom The zoom/scale level the user pinched too, 0-1. 3581 * @param {object} fingerData The coordinates of fingers in event 3582 */ 3583 3584 /** 3585 * A handler triggered for pinch out events. 3586 * @name $.fn.swipe#pinchOut 3587 * @event 3588 * @default null 3589 * @param {EventObject} event The original event object 3590 * @param {int} direction The direction the user pinched in. See {@link $.fn.swipe.directions} 3591 * @param {int} distance The distance the user pinched 3592 * @param {int} duration The duration of the swipe in milliseconds 3593 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 3594 * @param {int} zoom The zoom/scale level the user pinched too, 0-1. 3595 * @param {object} fingerData The coordinates of fingers in event 3596 */ 3597 3598 /** 3599 * A handler triggered for all pinch events. This handler is constantly fired for the duration of the pinch. This is triggered regardless of thresholds. 3600 * @name $.fn.swipe#pinchStatus 3601 * @event 3602 * @default null 3603 * @param {EventObject} event The original event object 3604 * @param {int} direction The direction the user pinched in. See {@link $.fn.swipe.directions} 3605 * @param {int} distance The distance the user pinched 3606 * @param {int} duration The duration of the swipe in milliseconds 3607 * @param {int} fingerCount The number of fingers used. See {@link $.fn.swipe.fingers} 3608 * @param {int} zoom The zoom/scale level the user pinched too, 0-1. 3609 * @param {object} fingerData The coordinates of fingers in event 3610 */ 3611 3612 /** 3613 * A click handler triggered when a user simply clicks, rather than swipes on an element. 3614 * This is deprecated since version 1.6.2, any assignment to click will be assigned to the tap handler. 3615 * You cannot use <code>on</code> to bind to this event as the default jQ <code>click</code> event will be triggered. 3616 * Use the <code>tap</code> event instead. 3617 * @name $.fn.swipe#click 3618 * @event 3619 * @deprecated since version 1.6.2, please use {@link $.fn.swipe#tap} instead 3620 * @default null 3621 * @param {EventObject} event The original event object 3622 * @param {DomObject} target The element clicked on. 3623 */ 3624 3625 /** 3626 * A click / tap handler triggered when a user simply clicks or taps, rather than swipes on an element. 3627 * @name $.fn.swipe#tap 3628 * @event 3629 * @default null 3630 * @param {EventObject} event The original event object 3631 * @param {DomObject} target The element clicked on. 3632 */ 3633 3634 /** 3635 * A double tap handler triggered when a user double clicks or taps on an element. 3636 * You can set the time delay for a double tap with the {@link $.fn.swipe.defaults#doubleTapThreshold} property. 3637 * 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> 3638 * as the script needs to check if its a double tap. 3639 * @name $.fn.swipe#doubleTap 3640 * @see $.fn.swipe.defaults#doubleTapThreshold 3641 * @event 3642 * @default null 3643 * @param {EventObject} event The original event object 3644 * @param {DomObject} target The element clicked on. 3645 */ 3646 3647 /** 3648 * A long tap handler triggered once a tap has been release if the tap was longer than the longTapThreshold. 3649 * You can set the time delay for a long tap with the {@link $.fn.swipe.defaults#longTapThreshold} property. 3650 * @name $.fn.swipe#longTap 3651 * @see $.fn.swipe.defaults#longTapThreshold 3652 * @event 3653 * @default null 3654 * @param {EventObject} event The original event object 3655 * @param {DomObject} target The element clicked on. 3656 */ 3657 3658 /** 3659 * A hold tap handler triggered as soon as the longTapThreshold is reached 3660 * You can set the time delay for a long tap with the {@link $.fn.swipe.defaults#longTapThreshold} property. 3661 * @name $.fn.swipe#hold 3662 * @see $.fn.swipe.defaults#longTapThreshold 3663 * @event 3664 * @default null 3665 * @param {EventObject} event The original event object 3666 * @param {DomObject} target The element clicked on. 3667 */ 3668 3669}));
3670 3671// Trenner zum Einfügen eines Semikolons für Extensions 3672; 3673/*! modernizr 3.5.0 (Custom Build) | MIT * 3674 * https://modernizr.com/download/?-cssremunit-csstransitions-flexbox-formvalidation-localstorage-mediaqueries-picture-placeholder-srcset-touchevents-mq-setclasses-testallprops-testprop-cssclassprefix:mod_ !*/ 3675!function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,s,a;
3675for(var l in S)if(S.hasOwnProperty(l)){if(e=[],t=S[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(o=r(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)s=e[i],a=s.split("."),1===a.length?Modernizr[a[0]]=o:(!Modernizr[a[0]]||Modernizr[a[0]]instanceof Boolean||(Modernizr[a[0]]=new Boolean(Modernizr[a[0]])),Modernizr[a[0]][a[1]]=o),C.push((o?"":"no-")+a.join("-"))}}function i(e){var t=b.className,n=Modernizr._config.classPrefix||"";if(x&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),x?b.className.baseVal=t:b.className=t)}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):x?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function a(){var e=t.body;return e||(e=s(x?"svg":"body"),e.fake=!0),e}function l(e,n,r,o){var i,l,u,f,d="modernizr",c=s("div"),p=a();if(parseInt(r,10))for(;r--;)u=s("div"),u.id=o?o[r]:d+(r+1),c.appendChild(u);return i=s("style"),i.type="text/css",i.id="s"+d,(p.fake?p:c).appendChild(i),p.appendChild(c),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),c.id=d,p.fake&&(p.style.background="",p.style.overflow="hidden",f=b.style.overflow,b.style.overflow="hidden",b.appendChild(p)),l=n(c,e),p.fake?(p.parentNode.removeChild(p),b.style.overflow=f,b.offsetHeight):c.parentNode.removeChild(c),!!l}function u(e,t){return!!~(""+e).indexOf(t)}function f(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function d(e,t){return function(){return e.apply(t,arguments)}}function c(e,t,n){var o;for(var i in e)if(e[i]in t)return n===!1?e[i]:(o=t[e[i]],r(o,"function")?d(o,n||t):o);return!1}function p(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function m(t,n,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,t,n);var i=e.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(i){var s=i.error?"error":"log";i[s].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!n&&t.currentStyle&&t.currentStyle[r];return o}function v(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(p(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+p(t[o])+":"+r+")");return i=i.join(" or "),l("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==m(e,null,"position")})}return n}function h(e,t,o,i){function a(){d&&(delete j.style,delete j.modElem)}if(i=r(i,"undefined")?!1:i,!r(o,"undefined")){var l=v(e,o);if(!r(l,"undefined"))return l}for(var d,c,p,m,h,g=["modernizr","tspan","samp"];!j.style&&g.length;)d=!0,j.modElem=s(g.shift()),j.style=j.modElem.style;for(p=e.length,c=0;p>c;c++)if(m=e[c],h=j.style[m],u(m,"-")&&(m=f(m)),j.style[m]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?m:!0;try{j.style[m]=o}catch(y){}if(j.style[m]!=h)return a(),"pfx"==t?m:!0}return a(),!1}function g(e,t,n,o,i){var s=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+P.join(s+" ")+s).split(" ");return r(t,"string")||r(t,"undefined")?h(a,t,o,i):(a=(e+" "+N.join(s+" ")+s).split(" "),c(a,t,n))}function y(e,t,r){return g(e,n,n,t,r)}var C=[],S=[],T={_version:"3.5.0",_config:{classPrefix:"mod_",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){S.push({name:e,fn:t,options:n})},addAsyncTest:function(e){S.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=T,Modernizr=new Modernizr,Modernizr.addTest("picture","HTMLPictureElement"in e),Modernizr.addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}});var b=t.documentElement,x="svg"===b.nodeName.toLowerCase(),w=T._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];T._prefixes=w,Modernizr.addTest("cssremunit",function(){var e=s("a").style;try{e.fontSize="3rem"}catch(t){}return/rem/.test(e.fontSize)}),Modernizr.addTest("placeholder","placeholder"in s("input")&&"placeholder"in s("textarea")),Modernizr.addTest("srcset","srcset"in s("img"));var _=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return l("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();T.mq=_,Modernizr.addTest("mediaqueries",_("only all"));var z=T.testStyles=l;Modernizr.addTest("touchevents",function(){var n;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)n=!0;else{var r=["@media (",w.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");z(r,function(e){n=9===e.offsetTop})}return n}),Modernizr.addTest("formvalidation",function(){var t=s("form");if(!("checkValidity"in t&&"addEventListener"in t))return!1;if("reportValidity"in t)return!0;var n,r=!1;return Modernizr.formvalidationapi=!0,t.addEventListener("submit",function(t){(!e.opera||e.operamini)&&t.preventDefault(),t.stopPropagation()},!1),t.innerHTML='<input name="modTest" required="required" /><button></button>',z("#modernizr form{position:absolute;top:-99999em}",function(e){e.appendChild(t),n=t.getElementsByTagName("input")[0],n.addEventListener("invalid",function(e){r=!0,e.preventDefault(),e.stopPropagation()},!1),Modernizr.formvalidationmessage=!!n.validationMessage,t.getElementsByTagName("button")[0].click()}),r});var E="Moz O ms Webkit",P=T._config.usePrefixes?E.split(" "):[];T._cssomPrefixes=P;var N=T._config.usePrefixes?E.toLowerCase().split(" "):[];T._domPrefixes=N;var L={elem:s("modernizr")};Modernizr._q.push(function(){delete L.elem});var j={style:L.elem.style};Modernizr._q.unshift(function(){delete j.style});T.testProp=function(e,t,r){return h([e],n,t,r)};T.testAllProps=g,T.testAllProps=y,Modernizr.addTest("flexbox",y("flexBasis","1px",!0)),Modernizr.addTest("csstransitions",y("transition","all",!0)),o(),i(C),delete T.addTest,delete T.addAsyncTest;for(var k=0;k<Modernizr._q.length;k++)Modernizr._q[k]();e.Modernizr=Modernizr}(window,document); 3676// Globalen Namespace definieren: 3677var Gw = Gw || {}; 3678 3679/** 3680 * 3681 *d 3682 * @returns {{addValidation: addValidation}} 3683 * @constructor 3684 */ 3685Gw.FrontendTranslation = function () { 3686 3687 let defaultMessageKeys = [ 3688 'required', 3689 'remote', 3690 'email', 3691 'url', 3692 'date', 3693 'dateISO', 3694 'number', 3695 'digits', 3696 'equalTo', 3697 'accept' 3698 ]; 3699 let defaultFormattedMessageKeys = [ 3700 'maxlength', 3701 'minlength', 3702 'rangelength', 3703 'range', 3704 'max', 3705 'min' 3706 ]; 3707 3708 function createDefaultMessages (translations) 3709 { 3710 let messages = {}; 3711 const defaultTranslation = translations['default']['default']; 3712 defaultMessageKeys.forEach(function (messageKey) { 3713 if (!translations[messageKey] || !translations[messageKey]['default']) { 3714 messages[messageKey] = defaultTranslation; 3715 return; 3716 } 3717 messages[messageKey] = translations[messageKey]['default']; 3718 }); 3719 defaultFormattedMessageKeys.forEach(function (messageKey) { 3720 if (!translations[messageKey] || !translations[messageKey]['default']) { 3721 messages[messageKey] = defaultTranslation; 3722 return; 3723 } 3724 messages[messageKey] = jQuery.validator.format(translations[messageKey]['default'].replace('%s', '{0}')); 3725 }); 3726 return messages; 3727 } 3728 3729 function setDefaultMessages (messages) 3730 { 3731 $.validator.messages = messages; 3732 } 3733 3734 function createElementSpecificMessages (translations, formName) 3735 { 3736 let messages = {}; 3737 for (let validatorKey in translations) { 3738 if (!translations.hasOwnProperty(validatorKey)) { 3739 continue; 3740 } 3741 let validatorTranslations = translations[validatorKey];
3742 for (let elementKey in validatorTranslations) { 3743 if (elementKey === 'default') { 3744 continue; 3745 } 3746 if (!validatorTranslations.hasOwnProperty(elementKey)) { 3747 continue; 3748 } 3749 let translationString = validatorTranslations[elementKey]; 3750 let formElementName = formName + '[' + elementKey + ']'; 3751 if (!messages[formElementName]) { 3752 messages[formElementName] = {[validatorKey]: translationString}; 3753 } else { 3754 messages[formElementName] = {...messages[formElementName], [validatorKey]: translationString}; 3755 } 3756 } 3757 } 3758 return messages; 3759 } 3760 3761 3762 return { 3763 addValidation: function (form, translations, options) 3764 { 3765 setDefaultMessages(createDefaultMessages(translations)); 3766 const formName = 'tx_form_formframework[' + form.id + ']'; 3767 const specifcMessages = createElementSpecificMessages(translations, formName); 3768 return $(form).validate({ 3769 messages: specifcMessages, 3770 errorPlacement: function ($error, $element) { 3771 // if ($element.hasClass('c-form__checkbox--privacy')) { 3772 // $(form).find('.js-frontend-validation--error-container').append($error) 3773 // return; 3774 // } 3775 if ($element.hasClass('c-form__checkbox')) { 3776 $element.parents('.custom-control').parent().append($error); 3777 return; 3778 } 3779 $error.insertAfter($element); 3780 }, 3781 ...options 3782 }); 3783 } 3784 }; 3785}(); 3786 3787//Filter 3788$(document).ready(function () { 3789 var $collectionItems = $('.collection-item-container-wrapper'); 3790 3791 // Da die Ãffnungszeiten auf dem Server in CET gespeichert werden, muss ggf. das vom Browser gelieferte Datum 3792 // angepasst werden 3793 var _currentDate = new Date(); 3794 var _berlinOffset = -60; 3795 var _currentOffset = _currentDate.getTimezoneOffset(); 3796 var _berlinTime = new Date(_currentDate.getTime() + (_currentOffset - _berlinOffset) * 60000); 3797 var _weekdays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']; 3798 var _weekday = _weekdays[_berlinTime.getDay()]; 3799 var _time = _currentDate.getHours() * 60 + _currentDate.getMinutes(); 3800 var _getTime = function (time) { 3801 var d = time.split(':'); 3802 return parseInt(d[0]) * 60 + parseInt(d[1]); 3803 }; 3804 3805 // Allen aktuell geöffneten Elementen das now Attribut hinzufügen 3806 $collectionItems.each(function () { 3807 var open = false; 3808 var $item = $(this); 3809 $('.current-date .item', this).each(function () { 3810 var $this = $(this); 3811 if ($this.data('day') == _weekday && _time >= _getTime($this.data('start')) && _time <= _getTime($this.data('end'))) { 3812 open = true; 3813 } 3814 }); 3815 if (open) { 3816 $item.addClass('now'); 3817 } 3818 }); 3819 3820 $('.collection-filter input:checkbox').on('change', function () { 3821 var $checked = $('.collection-filter input:checked'); 3822 if ($checked.length) { 3823 $collectionItems.hide(); 3824 $checked.each(function () { 3825 $('.collection-item-container-wrapper.' + $(this).attr('value')).show(); 3826 }); 3827 } else { 3828 $collectionItems.show(); 3829 } 3830 }); 3831}); 3832 3833// Resetbutton 3834$(document).ready(function () { 3835 $('.collection-filter-button').find('button').on('click', function () { 3836 $('.collection-item-container-wrapper').show(); 3837 $('.collection-filter').find('input:checkbox').prop("checked", false); 3838 }); 3839}); 3840 3841//Alphabetische Sortierung 3842var $container = $('.collection-item-container-wrapper'); 3843$(document).ready(function () { 3844 var alphabeticallyOrderedDivs = $container.sort(function (a, b) { 3845 var a = $(a).find('h4').text(); 3846 a = a.toLowerCase(); 3847 a = a.replace(/ä/g, "a"); 3848 a = a.replace(/ö/g, "o"); 3849 a = a.replace(/ü/g, "u"); 3850 a = a.replace(/Ã/g, "s"); 3851 3852 var b = $(b).find('h4').text(); 3853 b = b.toLowerCase(); 3854 b = b.replace(/ä/g, "a"); 3855 b = b.replace(/ö/g, "o"); 3856 b = b.replace(/ü/g, "u"); 3857 b = b.replace(/Ã/g, "s"); 3858 3859 return(a==b)?0:(a>b)?1:-1; 3860 3861 }); 3862 $('.collection-container').html(alphabeticallyOrderedDivs); 3863 3864}); 3865 3866/** 3867 * Initialisierung und Anpassung von JS-Komponenten 3868 * 3869 */ 3870 3871jQuery(document).ready(function ($) { 3872 3873 // -------------------------------------------- 3874 // -- GW Contentelements Logik ---------------------- 3875 // -------------------------------------------- 3876 3877 // Modale Fenster auch auf link setzten, die auf den HashTag verlinken 3878 $('.c-modal-window').each(function () { 3879 var id = $(this).parent().attr("id"); 3880 var tags = $("a[href$='#" + id + "']"); 3881 tags.data('modal-id', id); 3882 tags.on('click', function (e) { 3883 $('.modal', $('#' + $(this).data('modal-id'))).modal('show'); 3884 e.preventDefault(); 3885 }); 3886 }); 3887 3888 $('.c-alert a').addClass('c-alert__link'); 3889 3890 // Play/Pause Button für Carousel
3891 $('.c-carousel .js-carousel-stop').on('click', function (e) { 3892 // Aktuelles Button Icon = Pause? => Pause 3893 if ($('.glyphicon-regular-pause', this).length) { 3894 $(this).closest('.carousel').carousel('pause'); 3895 $('span', this) 3896 .removeClass('glyphicon-regular-pause') 3897 .addClass('glyphicon-regular-play'); 3898 } else { 3899 // Sonst wieder abspielen 3900 $(this).closest('.carousel').carousel('cycle'); 3901 $('span', this) 3902 .addClass('glyphicon-regular-pause') 3903 .removeClass('glyphicon-regular-play'); 3904 } 3905 3906 e.preventDefault(); 3907 }); 3908 3909 // Multislider: Initialisierung 3910 // ------------------------------------------------ 3911 // http://www.multislider.info 3912 3913 $('.c-multislider').each(function (index) { 3914 $(this).multislider({ 3915 continuous: false, 3916 interval: 10000, 3917 slideAll: false, 3918 duration: 500, 3919 hoverPause: true, 3920 pauseAbove: null, 3921 pauseBelow: null 3922 }); 3923 }); 3924 3925 // Tooltip 3926 $('.link-tooltip').tooltip({'placement': 'top', 'trigger': 'hover'}); 3927 3928 // Popovers 3929 $('.link-popover').popover({'placement': 'top', 'trigger': 'hover'}); 3930 3931 // Akkordeon: C-Panels dekorieren 3932 // ---------------------------------------------- 3933 $('.c-panel__collapse.in').each(function () { 3934 $(this).parent().find('.c-panel__icon').addClass('icon-close'); 3935 $(this).parent().find('.c-panel__icon').removeClass('icon-open'); 3936 }); 3937 // Auf- / Zuklappen 3938 $('.c-panel__collapse').on('shown.bs.collapse', function () { 3939 $(this).parent().find('.c-panel__icon').addClass('icon-close'); 3940 $(this).parent().find('.c-panel__icon').removeClass('icon-open'); 3941 }); 3942 $('.c-panel__collapse').on('hidden.bs.collapse', function () { 3943 $(this).parent().find('.c-panel__icon').removeClass('icon-close'); 3944 $(this).parent().find('.c-panel__icon').addClass('icon-open'); 3945 }); 3946 3947}); 3948 3949// Globalen Namespace definieren: 3950var Gw = Gw || {}; 3951 3952/** 3953 * Klasse zum Verwalten von Cookies 3954 * 3955 * @returns {{getItem: getItem, setItem: setItem, removeItem: removeItem, hasItem: hasItem, topHost}} 3956 * @constructor 3957 */ 3958Gw.Cookies = function () { 3959 var object = { 3960 3961 /** 3962 * Liefert den Wert eines Cookies oder null falls nicht vorhanden 3963 * 3964 * @param sKey Cookie-Name 3965 * @returns {string|null} 3966 */ 3967 getItem: function (sKey) { 3968 return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-.+*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null; 3969 }, 3970 3971 /** 3972 * Setzt ein Cookie 3973 * 3974 * @param sKey Cookie-Name 3975 * @param sValue Cookie-Wert 3976 * @param vEnd [Optional] Lebensdauer 3977 * Number: Sekunden, bis das Cookie abläuft, oder Infinity, wenn es nie abläuft 3978 * String: Eigene Zeichenkette für expires 3979 * Date: Datum, wenn das Cookie abläuft 3980 * else: Session Cookie 3981 * @param sPath [Optional] Pfad, für den das Cookie gesetzt ist 3982 * @param sDomain [Optional] Domain, für die das Cookie gesetzt ist 3983 * @param bSecure [Optional] Nur über sichere Verbindung übertragen? 3984 * 3985 * @returns {boolean} True, wenn es sich um einen gültigen sKey handelt 3986 */ 3987 setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) { 3988 if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { 3989 return false; 3990 } 3991 var sExpires = ""; 3992 if (vEnd) { 3993 switch (vEnd.constructor) { 3994 case Number: 3995 sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd; 3996 break; 3997 case String: 3998 sExpires = "; expires=" + vEnd; 3999 break; 4000 case Date: 4001 sExpires = "; expires=" + vEnd.toUTCString(); 4002 break; 4003 } 4004 } 4005 document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : ""); 4006 return true; 4007 }, 4008 4009 /** 4010 * Löscht ein Cookie 4011 * 4012 * @param sKey Cookie-Name 4013 * @param sPath [Optional] Pfad 4014 * @param sDomain [Optional] Domain 4015 * 4016 * @returns {boolean} true falls das Cookie vorhanden war und gelöscht wurde, sonst false 4017 */ 4018 removeItem: function (sKey, sPath, sDomain) { 4019 if (!sKey || !this.hasItem(sKey)) { 4020 return false;
4021 } 4022 document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : ""); 4023 return true; 4024 }, 4025 4026 /** 4027 * Prüft, ob ein Cookie vorhanden ist 4028 * 4029 * @param sKey Cookie-Name 4030 * @returns {boolean} 4031 */ 4032 hasItem: function (sKey) { 4033 return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-.+*]/g, "\\$&") + "\\s*\\=")).test(document.cookie); 4034 } 4035 4036 }; 4037 4038 object.topHost = document.location.hostname.replace(/.*?([^\.]+\.[a-z0-9-]+)$/, "$1"); 4039 4040 return object; 4041}(); 4042 4043(function (document, history, location, $) { 4044 var HISTORY_SUPPORT = !!(history && history.pushState); 4045 4046 var anchorScrolls = { 4047 OFFSET_HEIGHT_PX: 50, 4048 validAnchorPatterns: [ 4049 /^#c[0-9]+$/ 4050 ], 4051 4052 /** 4053 * Events intialisieren und ggf, zu dem gegebenen Hash scrollen 4054 */ 4055 init: function () { 4056 this.scrollToCurrent(); 4057 $(window).on('hashchange', $.proxy(this, 'scrollToCurrent')); 4058 $('body').on('click', 'a', $.proxy(this, 'delegateAnchors')); 4059 }, 4060 4061 /** 4062 * Gibt das Offset zurück 4063 */ 4064 getFixedOffset: function () { 4065 var offset = Gw.pageOffset ? parseInt(Gw.pageOffset()) : 0; 4066 return offset + this.OFFSET_HEIGHT_PX; 4067 }, 4068 4069 /** 4070 * Gibt true zurück, wenn der übergebene Hash ein gültiges Format besitzt. 4071 * 4072 * @param hash 4073 * @returns {boolean} 4074 */ 4075 isValidHashForAnchor: function (hash) { 4076 var patterns = this.validAnchorPatterns; 4077 if (Gw.getValidAnchorPatterns) { 4078 patterns = patterns.concat(Gw.getValidAnchorPatterns()); 4079 } 4080 for (var it in patterns) { 4081 if (patterns[it].test(hash)) { 4082 return true; 4083 } 4084 } 4085 return patterns.length === 0; 4086 }, 4087 4088 /** 4089 * Gibt true zurück, wenn die übergebene URL, eine URL für die aktuelle Seite (+ggf. Hash) ist 4090 * @param href URL 4091 * @returns {boolean} 4092 */ 4093 isAnchorForCurrentUrl: function (href) { 4094 var url = href.replace(/(#.+?)$/, ''); 4095 if (url.length > 0 && location.href.indexOf(url) === -1) { 4096 return false; 4097 } 4098 return href.indexOf('#') !== -1; 4099 }, 4100 4101 /** 4102 * Wenn href ein Anker für die aktuelle Seite ist, zu diesem scrollen. 4103 * 4104 * @param {String} href 4105 * @param pushToHistory Eintrag in die History? 4106 * @return {Boolean} - Was the href an anchor. 4107 */ 4108 scrollIfAnchor: function (href, pushToHistory) { 4109 var $match, anchorOffset; 4110 4111 if (!href || !this.isAnchorForCurrentUrl(href)) { 4112 return false; 4113 } 4114 4115 var hash = href.substr(href.indexOf('#')); 4116 if (!this.isValidHashForAnchor(hash)) { 4117 return false; 4118 } 4119 4120 $match = $(hash); 4121 if ($match.length) { 4122 // fix für navbar, die den content verschiebt 4123 var $nav = $('.c-navbar').css('position', 'fixed'); 4124 anchorOffset = $match.offset().top - this.getFixedOffset(); 4125 $nav.css('position', ''); 4126 $('html, body').animate({scrollTop: anchorOffset}); 4127 4128 // Add the state to history as-per normal anchor links 4129 if (HISTORY_SUPPORT && pushToHistory) { 4130 history.pushState({}, document.title, href); 4131 } 4132 } 4133 4134 return !!$match.length; 4135 }, 4136 4137 /** 4138 * Zum aktuellen Anker scrollen. 4139 */ 4140 scrollToCurrent: function () { 4141 return this.scrollIfAnchor(window.location.hash, false); 4142 }, 4143 4144 /** 4145 * Event Handler für die Anker. 4146 */ 4147 delegateAnchors: function (e) { 4148 var elem = e.currentTarget; 4149 4150 if ( 4151 elem.nodeName === 'A' && 4152 this.scrollIfAnchor(elem.getAttribute('href'), true) 4153 ) { 4154 e.preventDefault(); 4155 } 4156 } 4157 }; 4158 4159 $(document).ready($.proxy(anchorScrolls, 'init')); 4160})(window.document, window.history, window.location, jQuery); 4161 4162/** 4163 * Hilfsdatei für Ãbersetzungen 4164 * 4165 * Per HTML können Elemente in der Form: 4166 * <div data-gwtranslate-key="key" data-gwtranslate-value="value"></div> 4167 * definiert werden. 4168 * 4169 * Später kann dann mithilfe von 4170 * Gw.Translate.get('key') 4171 * darauf zugegriffen werden. 4172 * 4173 */ 4174 4175// Globalen Namespace definieren: 4176var Gw = Gw || {}; 4177 4178jQuery(function ($) { 4179 /** 4180 * Ãbsetzungsobjekt zum Zugriff über Javascript 4181 * @type {Translate} 4182 */ 4183 Gw.Translate = (function () { 4184 var data = {}; 4185 4186 // Konstruktor => Ãbersetzungen aus HTML importieren 4187 $('[data-gwtranslate-key][data-gwtranslate-value]').each(function () { 4188 var translation = $(this); 4189 var key = translation.attr('data-gwtranslate-key'); 4190 data[key] = translation.attr('data-gwtranslate-value'); 4191 translation.remove(); 4192 }); 4193 4194 // Getter und Setter zurückliefern 4195 return { 4196 set: function (key, value) { 4197 data[key] = value; 4198 }, get: function (key) { 4199 return data[key]; 4200 } 4201 }; 4202 })(); 4203}); 4204 4205 4206// Globalen Namespace definieren: 4207var Gw = Gw || {}; 4208 4209/** 4210 * Klasse zum Abarbeiten von verschiedenen Viewports 4211 * 4212 * Utility-Klasse, die das Abfragen des Client Viewports übernimmt. 4213 * 4214 * @type {{hasChanged, equalsXs, equalsSm, equalsMd, equalsLg, minXs, minSm, minMd, minLg, maxXs, maxSm, maxMd, maxLg}} 4215 */ 4216Gw.Viewport = (function () { 4217 /**
4218 * Konstanten-Objekt, dass verschiedene ViewportgröÃen zurückgibt. 4219 * 4220 * @type {{get}} 4221 */ 4222 var sizes = (function () { 4223 /** 4224 * Eigentliche Viewport, denen ein Integer aufsteigender Reihenfolge zugewiesen wird 4225 * 4226 * Jeder Viewport hat einen Namen zum Zugriff (bspw. xs), dem eine eindeutige Zahl gewiesen wird. Diese 4227 * Zahl repräsentiert die GröÃe des Bildschirm, der kleinste Viewport hat also die kleinste Zahl. 4228 * 4229 * @type {{xss: number, xs: number, sm: number, md number, lg: number}} 4230 */ 4231 var viewportOrderList = { 4232 'xxs': 0, 4233 'xs': 1, 4234 'sm': 2, 4235 'md': 3, 4236 'lg': 4, 4237 'xl': 5 4238 }; 4239 4240 return { 4241 /** 4242 * Getter Methode zum Zugriff auf die privaten Viewport-GröÃen. 4243 * 4244 * @param value String Identifiert des Viewports (z.b. xs) 4245 * @returns number 4246 */ 4247 getComparableValue: function (value) { 4248 return viewportOrderList[value]; 4249 } 4250 }; 4251 })(); 4252 4253 4254 /** 4255 * Aktueller Viewport des Users 4256 * 4257 * Der Viewport wird inital auf "" gestellt und mithilfe von refreshViewport aktualisiert. 4258 * @type {string} 4259 */ 4260 var windowViewport = ""; 4261 4262 /** 4263 * Aktualisiert den Viewport 4264 * 4265 * Der Viewport wird aus dem body:before Tag ausgelesen. Die Logik für den eigentlichen 4266 * Viewport kommt daher direkt aus dem Less, es ist keien Abfrage der BildschirmgröÃe nötig. 4267 * 4268 */ 4269 var refreshViewport = function () { 4270 if (!document.body) { 4271 // Mobile first 4272 return sizes.getComparableValue('xxs'); 4273 } 4274 var computedStyle = window.getComputedStyle(document.body, ':before'); 4275 windowViewport = computedStyle.getPropertyValue('content').replace(/\"/g, ''); 4276 }; 4277 4278 /** 4279 * Funktion zum Ãberprüfen, ob sich der Viewport geändert hat. 4280 * @returns {boolean} 4281 */ 4282 var hasChanged = function () { 4283 var lastViewport = windowViewport; 4284 refreshViewport(); 4285 return lastViewport !== windowViewport; 4286 }; 4287 4288 // Viewport initalisieren 4289 refreshViewport(); 4290 4291 return { 4292 /** 4293 * true, falls sich der Viewport seit dem letzten Test geändert hat 4294 * 4295 * @returns {boolean} 4296 */ 4297 hasChanged: function () { 4298 return hasChanged(); 4299 }, 4300 4301 /** 4302 * Ãberprüft, ob der Viewport des Users genau 'xxs' (Smartphone) entspricht 4303 * 4304 * @returns {boolean} wahr, falls der Viewport xxs ist 4305 */ 4306 isXxs: function () { 4307 return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('xxs'); 4308 }, 4309 4310 /** 4311 * Ãberprüft, ob der Viewport des Users genau 'xs' (Smartphone) entspricht 4312 * 4313 * @returns {boolean} wahr, falls der Viewport xs ist 4314 */ 4315 isXs: function () { 4316 return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('xs'); 4317 }, 4318 4319 /** 4320 * Ãberprüft, ob der Viewport des Users genau 'sm' (Tablet) entspricht 4321 * 4322 * @returns {boolean} wahr, falls der Viewport sm ist 4323 */ 4324 isSm: function () { 4325 return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('sm'); 4326 }, 4327 4328 /** 4329 * Ãberprüft, ob der Viewport des Users genau 'md' (Desktop) entspricht 4330 * 4331 * @returns {boolean} wahr, falls der Viewport md ist 4332 */ 4333 isMd: function () { 4334 return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('md'); 4335 }, 4336 4337 /** 4338 * Ãberprüft, ob der Viewport des Users genau 'lg' (Large Desktop) entspricht 4339 * 4340 * @returns {boolean} wahr, falls der Viewport lg ist 4341 */ 4342 isLg: function () { 4343 return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('lg'); 4344 }, 4345 4346 /** 4347 * Ãberprüft, ob der Viewport des Users genau 'xl' (UHD Desktop) entspricht 4348 * 4349 * @returns {boolean} wahr, falls der Viewport xl ist 4350 */ 4351 isXl: function () { 4352 return sizes.getComparableValue(windowViewport) === sizes.getComparableValue('xl'); 4353 }, 4354 4355 /** 4356 * Ãberprüft, ob der Viewport des Users 'xs' (Smartphone) oder einem gröÃen Viewport entspricht 4357 * 4358 * @returns {boolean} wahr, falls der mindestens Viewport sm entspricht 4359 */ 4360 isXsUp: function () { 4361 return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('xs'); 4362 }, 4363 4364 /** 4365 * Ãberprüft, ob der Viewport des Users 'sm' (Tablet) oder einem gröÃen Viewport entspricht 4366 * 4367 * @returns {boolean} wahr, falls der mindestens Viewport sm entspricht 4368 */ 4369 isSmUp: function () { 4370 return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('sm'); 4371 }, 4372 4373 /** 4374 * Ãberprüft, ob der Viewport des Users 'md' (Desktop) oder einem gröÃen Viewport entspricht 4375 * 4376 * @returns {boolean} wahr, falls der mindestens Viewport md entspricht 4377 */ 4378 isMdUp: function () { 4379 return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('md'); 4380 }, 4381 4382 /**
4383 * Ãberprüft, ob der Viewport des Users 'lg' (Desktop Large) oder einem gröÃen Viewport entspricht 4384 * 4385 * @returns {boolean} wahr, falls der mindestens Viewport md entspricht 4386 */ 4387 isLgUp: function () { 4388 return sizes.getComparableValue(windowViewport) >= sizes.getComparableValue('lg'); 4389 }, 4390 4391 /** 4392 * Ãberprüft, ob der Viewport des Users 'xs' (Smartphone) entpsricht 4393 * 4394 * @returns {boolean} wahr, falls der maximal Viewport xs entspricht 4395 */ 4396 isXsDown: function () { 4397 return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('xs'); 4398 }, 4399 4400 /** 4401 * Ãberprüft, ob der Viewport des Users 'sm' (Tablet) oder einem kleineren Viewport entspricht 4402 * 4403 * @returns {boolean} wahr, falls der maximal Viewport sm entspricht 4404 */ 4405 isSmDown: function () { 4406 return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('sm'); 4407 }, 4408 4409 /** 4410 * Ãberprüft, ob der Viewport des Users 'md' (Desktop) oder einem kleineren Viewport entspricht 4411 * 4412 * @returns {boolean} wahr, falls der maximal Viewport md entspricht 4413 */ 4414 isMdDown: function () { 4415 return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('md'); 4416 }, 4417 4418 /** 4419 * Ãberprüft, ob der Viewport des Users 'lg' (Desktop Large) oder einem kleineren Viewport entspricht 4420 * 4421 * @returns {boolean} wahr, falls der maximal Viewport md entspricht 4422 */ 4423 isLgDown: function () { 4424 return sizes.getComparableValue(windowViewport) <= sizes.getComparableValue('lg'); 4425 }, 4426 4427 /** 4428 * Gibt den Viewport zurück. 4429 * 4430 * @notice Bitte nur dann nutzen, wenn alle anderen Methoden nicht ausreichen! 4431 * @returns {string} Identifier des aktuellen Viewports 4432 */ 4433 get: function () { 4434 return windowViewport; 4435 } 4436 }; 4437}()); 4438 4439 4440/** 4441 * Resize Event abfangen, um ggf. eigenes Event zum Anpassen des Viewports zu senden. 4442 * 4443 * gw_viewportChanged wird gesendet, sobald sich der Viewport geändert hat. Somit kann an andere Stelle auf 4444 * dieses Event gehört werden, um ein einheitliches Handling von Ãnderungen am Viewport zu ändern 4445 * 4446 * Beispiel: 4447 * $(window).on('gw_viewportChanged', function () { 4448 * if(Gw.Viewport.isSm()) { 4449 * console.log("Viewport = SM"); 4450 * } else if(Gw.Viewport.minSm()) { 4451 * console.log("Viewport >= SM"); 4452 * } 4453 * }); 4454 * 4455 * @todo ggf. Hinzufügen wenn Gerät gedreht wird etc. 4456 */ 4457jQuery(window).on('resize orientationchange', function () { 4458 if (Gw.Viewport.hasChanged()) { 4459 jQuery(window).trigger('gw_viewportChanged'); 4460 } 4461}); 4462 4463// Event nach dem Laden der Seite abfeuern, allerdings erst nachdem alle .ready(...) Events abgearbeitet wurden 4464// Jquery(window).on('load', ...) wird also nach .ready() abgefeuert 4465jQuery(window).on('load', function () { 4466 jQuery(window).triggerHandler('gw_viewportChanged'); 4467}); 4468 4469// Globalen Namespace definieren: 4470var Gw = Gw || {}; 4471 4472// Funktionen zur Client-Erkennung: 4473Gw.Client = {}; 4474 4475// Bequemlichkeitsmethode zur Erkennung von Smartphones. 4476// noch um Windows Phone + Bada ergänzen 4477Gw.Client.isMobile = function () { 4478 var ua = navigator.userAgent; 4479 var client = { 4480 iphone: ua.match(/(iPhone|iPod|iPad)/), 4481 blackberry: ua.match(/BlackBerry/), 4482 android: ua.match(/Android/) 4483 }; 4484 4485 var isMobileClient = (client.iphone || client.blackberry || client.android); 4486 return isMobileClient; 4487}; 4488 4489 4490// Bequemlichkeitsmethoden zur Browsererkennung. 4491Gw.Client.isIE = function () { 4492 var ua = navigator.userAgent; 4493 return ua.match(/MSIE/); 4494}; 4495 4496Gw.Client.isSafari = function () { 4497 var ua = navigator.userAgent; 4498 return ua.match(/Safari/); 4499}; 4500 4501Gw.Client.isFirefox = function () { 4502 var ua = navigator.userAgent; 4503 return ua.match(/Firefox/); 4504}; 4505 4506Gw.Client.isOpera = function () { 4507 var ua = navigator.userAgent; 4508 return ua.match(/Opera/); 4509}; 4510 4511Gw.Client.isChrome = function () { 4512 var ua = navigator.userAgent; 4513 return ua.match(/Chrome/); 4514}; 4515 4516Gw.Client.isEdge = function () { 4517 var ua = navigator.userAgent; 4518 return ua.match(/Edge/); 4519}; 4520 4521Gw.Client.isIPad = function () { 4522 var ua = navigator.userAgent; 4523 return ua.match(/iPad/); 4524}; 4525 4526Gw.Client.isIPhone = function () { 4527 var ua = navigator.userAgent; 4528 return ua.match(/iPhone/); 4529}; 4530 4531Gw.Client.isIPod = function () { 4532 var ua = navigator.userAgent; 4533 return ua.match(/iPod/); 4534}; 4535 4536Gw.Client.isBlackBerry = function () { 4537 var ua = navigator.userAgent; 4538 return ua.match(/BlackBerry/); 4539}; 4540 4541Gw.Client.isAndroid = function () { 4542 var ua = navigator.userAgent; 4543 return ua.match(/Android/); 4544}; 4545 4546// Bequemlichkeitsmethode für die IE Version. 4547Gw.Client.isIE6 = function () { 4548 return parseFloat(navigator.appVersion.split("MSIE")[1]) <= 6; 4549}; 4550 4551Gw.Client.isIE7 = function () { 4552 return parseFloat(navigator.appVersion.split("MSIE")[1]) == 7; 4553}; 4554 4555Gw.Client.isIE8 = function () { 4556 return parseFloat(navigator.appVersion.split("MSIE")[1]) == 8; 4557}; 4558 4559Gw.Client.isIE9 = function () { 4560 return parseFloat(navigator.appVersion.split("MSIE")[1]) == 9; 4561}; 4562 4563Gw.Client.isIE10 = function () { 4564 return parseFloat(navigator.appVersion.split("MSIE")[1]) == 10; 4565}; 4566 4567Gw.Client.isIE11 = function () { 4568 return parseFloat(navigator.appVersion.split("MSIE")[1]) == 11; 4569}; 4570 4571Gw.Client.isIE12 = function () { 4572 return parseFloat(navigator.appVersion.split("MSIE")[1]) == 12; 4573}; 4574 4575Gw.Client.ieVersion = function () { 4576 return parseFloat(navigator.appVersion.split("MSIE")[1]); 4577}; 4578 4579/*! iFrame Resizer (iframeSizer.min.js ) - v4.3.2 - 2021-04-26 4580 * Desc: Force cross domain iframes to size to content. 4581 * Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame. 4582 * Copyright: (c) 2021 David J. Bradshaw - [email protected] 4583 * License: MIT 4584 */ 4585 4586!function(u){var f,l,a,x,M,I,k,r,m,F,t,g,z;function h(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function O(e,n,t){e.addEventListener(n,t,!1)}function R(e,n,t){e.removeEventListener(n,t,!1)}function o(e){return M+"["+(e="Host page: "+(n=e),e=window.top!==window.self?window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+n:"Nested host page: "+n:e)+"]";var n}function i(e){return F[e]?F[e].log:l}function T(e,n){s("log",e,n,i(e))}function E(e,n){s("info",e,n,i(e))}function N(e,n){s("warn",e,n,!0)}function s(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](o(n),t)}function e(n){function t(){i("Height"),i("Width"),L(function(){A(y),H(v),l("onResized",y)},y,"init")}function e(){var e=b.substr(I).split(":"),n=e[1]?parseInt(e[1],10):0,t=F[e[0]]&&F[e[0]].iframe,i=getComputedStyle(t);return{iframe:t,id:e[0],height:n+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.paddingTop?parseInt(e.paddingTop,10):0,e=e.paddingBottom?parseInt(e.paddingBottom,10):0;return n+e}(i)+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.borderTopWidth?parseInt(e.borderTopWidth,10):0,e=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return n+e}(i),width:e[2],type:e[3]}}function i(e){var n=Number(F[v]["max"+e]),t=Number(F[v]["min"+e]),i=e.toLowerCase(),e=Number(y[i]);T(v,"Checking "+i+" is in range "+t+"-"+n),e<t&&(e=t,T(v,"Set "+i+" to min value")),n<e&&(e=n,T(v,"Set "+i+" to max value")),y[i]=""+e}function o(){function e(){return i.constructor===Array?function(){var e=0,n=!1;for(T(v,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(e=F[v]&&F[v].remoteHost,T(v,"Checking connection is from: "+e),t===e);var e}var t=n.origin,i=F[v]&&F[v].checkOrigin;if(i&&""+t!="null"&&!e())throw new Error("Unexpected message received from: "+t+" for "+y.iframe.id+". Message was: "+n.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return 1}function a(e){return b.substr(b.indexOf(":")+x+e)}function s(t,i){var e,n,o;e=function(){var e,n;B("Send Page Info","pageInfo:"+(e=document.body.getBoundingClientRect(),n=y.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-e.top,10),offsetLeft:parseInt(n.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),t,i)},n=32,z[o=i]||(z[o]=setTimeout(function(){z[o]=null,e()},n))}function r(e){e=e.getBoundingClientRect();return S(v),{x:Math.floor(Number(e.left)+Number(k.x)),y:Math.floor(Number(e.top)+Number(k.y))}}function d(e){var n=e?r(y.iframe):{x:0,y:0},t={x:Number(y.width)+n.x,y:Number(y.height)+n.y};T(v,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):N(v,"Unable to scroll to requested position, window.parentIFrame not found"):(k=t,c(),T(v,"--"))}function c(){!1!==l("onScroll",k)?H(v):j()}function u(e){var n,t=e.split("#")[1]||"",e=decodeURIComponent(t),i=document.getElementById(e)||document.getElementsByName(e)[0];i?(n=r(i),T(v,"Moving to in page link (#"+t+") at x: "+n.x+" y: "+n.y),k={x:n.x,y:n.y},c(),T(v,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(t):T(v,"In page link #"+t+" not found and window.parentIFrame not found"):T(v,"In page link #"+t+" not found")}function f(e){var n,t={};t=0===Number(y.width)&&0===Number(y.height)?{x:(n=a(9).split(":"))[1],y:n[0]}:{x:y.width,y:y.height},l(e,{iframe:y.iframe,screenX:Number(t.x),screenY:Number(t.y),type:y.type})}function l(e,n){return W(v,e,n)}function m(){switch(F[v]&&F[v].firstRun&&F[v]&&(F[v].firstRun=!1),y.type){case"close"
4586:C(y.iframe);break;case"message":n=a(6),T(v,"onMessage passed: {iframe: "+y.iframe.id+", message: "+n+"}"),l("onMessage",{iframe:y.iframe,message:JSON.parse(n)}),T(v,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":F[v].autoResize=JSON.parse(a(9));break;case"scrollTo":d(!1);break;case"scrollToOffset":d(!0);break;case"pageInfo":s(F[v]&&F[v].iframe,v),r=v,e("Add ",O),F[r]&&(F[r].stopPageInfo=o);break;case"pageInfoStop":F[v]&&F[v].stopPageInfo&&(F[v].stopPageInfo(),delete F[v].stopPageInfo);break;case"inPageLink":u(a(9));break;case"reset":P(y);break;case"init":t(),l("onInit",y.iframe);break;default:0===Number(y.width)&&0===Number(y.height)?N("Unsupported message received ("+y.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):t()}function e(n,t){function i(){F[r]?s(F[r].iframe,r):o()}["scroll","resize"].forEach(function(e){T(r,n+e+" listener for sendPageInfo"),t(window,e,i)})}function o(){e("Remove ",R)}var r,n}var g,h,p,w,b=n.data,y={},v=null;"[iFrameResizerChild]Ready"===b?function(){for(var e in F)B("iFrame requested init",q(e),F[e].iframe,e)}():M===(""+b).substr(0,I)&&b.substr(I).split(":")[0]in F?(y=e(),v=y.id,F[v]&&(F[v].loaded=!0),(w=y.type in{true:1,false:1,undefined:1})&&T(v,"Ignoring init message from meta parent page"),!w&&(p=!0,F[h=v]||(p=!1,N(y.type+" No settings for "+h+". Message was: "+b)),p)&&(T(v,"Received: "+b),g=!0,null===y.iframe&&(N(v,"IFrame ("+y.id+") not found"),g=!1),g&&o()&&m())):E(v,"Ignored: "+b)}function W(e,n,t){var i=null,o=null;if(F[e]){if("function"!=typeof(i=F[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function p(e){e=e.id;delete F[e]}function C(e){var n=e.id;if(!1!==W(n,"onClose",n)){T(n,"Removing iFrame: "+n);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){N(e)}W(n,"onClosed",n),T(n,"--"),p(e)}else T(n,"Close iframe cancelled by onClose event")}function S(e){null===k&&T(e,"Get page position: "+(k={x:window.pageXOffset!==u?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==u?window.pageYOffset:document.documentElement.scrollTop}).x+","+k.y)}function H(e){null!==k&&(window.scrollTo(k.x,k.y),T(e,"Set page position: "+k.x+","+k.y),j())}function j(){k=null}function P(e){T(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),S(e.id),L(function(){A(e),B("reset","reset",e.iframe,e.id)},e,"reset")}function A(o){function t(e){function n(){Object.keys(F).forEach(function(e){function n(e){return"0px"===(F[t]&&F[t].iframe.style[e])}var t;F[t=e]&&null!==F[t].iframe.offsetParent&&(n("height")||n("width"))&&B("Visibility change","resize",F[t].iframe,t)})}function t(e){T("window","Mutation observed: "+e[0].target+" "+e[0].type),c(n,16)}var i;a||"0"!==o[e]||(a=!0,T(r,"Hidden iFrame detected, creating visibility listener"),(i=h())&&function(){var e=document.querySelector("body");new i(t).observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})}())}function e(e){var n;n=e,o.id?(o.iframe.style[n]=o[n]+"px",T(o.id,"IFrame ("+r+") "+n+" set to "+o[n]+"px")):T("undefined","messageData id not set"),t(e)}var r=o.iframe.id;F[r]&&(F[r].sizeHeight&&e("height"),F[r].sizeWidth&&e("width"))}function L(e,n,t){t!==n.type&&r&&!window.jasmine?(T(n.id,"Requesting animation frame"),r(e)):e()}function B(n,t,i,o,e){function r(){var e;i&&"contentWindow"in i&&null!==i.contentWindow?(e=F[o]&&F[o].targetOrigin,T(o,"["+n+"] Sending msg to iframe["+o+"] ("+t+") targetOrigin: "+e),i.contentWindow.postMessage(M+t,e)):N(o,"["+n+"] IFrame("+o+") not found")}function a(){e&&F[o]&&F[o].warningTimeout&&(F[o].msgTimeout=setTimeout(function(){!F[o]||F[o].loaded||s||(s=!0,N(o,"IFrame has not responded within "+F[o].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))},F[o].warningTimeout))}var s=!1;
4586o=o||i.id,F[o]&&(r(),a())}function q(e){return e+":"+F[e].bodyMarginV1+":"+F[e].sizeWidth+":"+F[e].log+":"+F[e].interval+":"+F[e].enablePublicMethods+":"+F[e].autoResize+":"+F[e].bodyMargin+":"+F[e].heightCalculationMethod+":"+F[e].bodyBackground+":"+F[e].bodyPadding+":"+F[e].tolerance+":"+F[e].inPageLinks+":"+F[e].resizeFrom+":"+F[e].widthCalculationMethod+":"+F[e].mouseEvents}function d(i,e){function n(t){var e,n=h();n&&(e=n,i.parentNode&&new e(function(e){e.forEach(function(e){Array.prototype.slice.call(e.removedNodes).forEach(function(e){e===i&&C(i)})})}).observe(i.parentNode,{childList:!0})),O(i,"load",function(){var e,n;B("iFrame.onload",t,i,u,!0),e=F[s]&&F[s].firstRun,n=F[s]&&F[s].heightCalculationMethod in m,!e&&n&&P({iframe:i,height:0,width:0,type:"init"})}),B("init",t,i,u,!0)}function t(e){var n=e.split("Callback");2===n.length&&(this[n="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1)]=this[e],delete this[e],N(s,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version."))}function o(e){e=e||{},F[s]={firstRun:!0,iframe:i,remoteHost:i.src&&i.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(t,e),function(e){for(var n in g)Object.prototype.hasOwnProperty.call(g,n)&&(F[s][n]=(Object.prototype.hasOwnProperty.call(e,n)?e:g)[n])}(e),F[s]&&(F[s].targetOrigin=!0===F[s].checkOrigin?""===(e=F[s].remoteHost)||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e:"*")}var r,a,s=(""===(r=i.id)&&(i.id=(a=e&&e.id||g.id+f++,null!==document.getElementById(a)&&(a+=f++),r=a),l=(e||{}).log,T(r,"Added missing iframe ID: "+r+" ("+i.src+")")),r);function d(e){var n=F[s][e];1/0!==n&&0!==n&&(i.style[e]="number"==typeof n?n+"px":n,T(s,"Set "+e+" = "+i.style[e]))}function c(e){if(F[s]["min"+e]>F[s]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}s in F&&"iFrameResizer"in i?N(s,"Ignored iFrame, already setup."):(o(e),function(){switch(T(s,"IFrame scrolling "+(F[s]&&F[s].scrolling?"enabled":"disabled")+" for "+s),i.style.overflow=!1===(F[s]&&F[s].scrolling)?"hidden":"auto",F[s]&&F[s].scrolling){case"omit":break;case!0:i.scrolling="yes";break;case!1:i.scrolling="no";break;default:i.scrolling=F[s]?F[s].scrolling:"no"}}(),c("Height"),c("Width"),d("maxHeight"),d("minHeight"),d("maxWidth"),d("minWidth"),"number"!=typeof(F[s]&&F[s].bodyMargin)&&"0"!==(F[s]&&F[s].bodyMargin)||(F[s].bodyMarginV1=F[s].bodyMargin,F[s].bodyMargin=F[s].bodyMargin+"px"),n(q(s)),F[s]&&(F[s].iframe.iFrameResizer={close:C.bind(null,F[s].iframe),removeListeners:p.bind(null,F[s].iframe),resize:B.bind(null,"Window resize","resize",F[s].iframe),moveToAnchor:function(e){B("Move to anchor","moveToAnchor:"+e,F[s].iframe,s)},sendMessage:function(e){B("Send Message","message:"+(e=JSON.stringify(e)),F[s].iframe,s)}}))}function c(e,n){null===t&&(t=setTimeout(function(){t=null,e()},n))}function n(){"hidden"!==document.visibilityState&&(T("document","Trigger event: Visiblity change"),c(function(){w("Tab Visable","resize")},16))}function w(t,i){Object.keys(F).forEach(function(e){var n;F[n=e]&&"parent"===F[n].resizeFrom&&F[n].autoResize&&!F[n].firstRun&&B(t,i,F[e].iframe,e)})}function b(){O(window,"message",e),O(window,"resize",function(){var e;T("window","Trigger event: "+(e="resize")),c(function(){w("Window "+e,"resize")},16)}),O(document,"visibilitychange",n),O(document,"-webkit-visibilitychange",n)}function y(){function i(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),d(n,e),o.push(n))}var o;return function(){for(var e=["moz","webkit","o","ms"],n=0;n<e.length&&!r;n+=1)r=window[e[n]+"RequestAnimationFrame"];r?r=r.bind(window):T("setup","RequestAnimationFrame not supported")}(),b(),function(e,n){var t;switch(o=[],(t=e)&&t.enablePublicMethods&&N("enablePublicMethods option has been removed, public methods are now always available in the iFrame"),typeof n){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(n||"iframe"),i.bind(u,e));break;case"object":i(e,n);break;default:throw new TypeError("Unexpected data type ("+typeof n+")")}return o}}function v(e){e.fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(t){return this.filter("iframe").each(function(e,n){d(n,t)}).end()}):E("","Unable to bind to jQuery, it is not fully loaded.")}"undefined"!=typeof window&&(x="message".length,I=(M="[iFrameSizer]").length,r=window.requestAnimationFrame,g={autoResize:!(t=k=null),bodyBackgroun
4586d:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!(a=l=!1),inPageLinks:!(F={}),enablePublicMethods:!(f=0),heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!(m={max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){N("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},z={},window.jQuery&&v(window.jQuery),"function"==typeof define&&define.amd?define([],y):"object"==typeof module&&"object"==typeof module.exports&&(module.exports=y()),window.iFrameResize=window.iFrameResize||y())}(); 4587//# sourceMappingURL=iframeResizer.map 4588jQuery(document).ready(function ($) { 4589 // Spinner für iframes mit iframe-spinner klasse erzeugen 4590 $('iframe.iframe-spinner').each(function () { 4591 var $e = $('<div class="iframe-spinner" />'); 4592 $(this).before($e); 4593 $(this).on('load', function () { 4594 $e.remove(); 4595 }); 4596 }); 4597 // Iframe-Höhe anpassen: 4598 $('iframe.resize').iFrameResize({ 4599 autoResize : true, heightCalculationMethod : 'documentElementScroll', checkOrigin : false 4600 }); 4601 4602 // Nachrichtenabarbeitung von Magento: 4603 $(window).on('message', function (e) { 4604 var data = typeof e.data == 'undefined' ? e.originalEvent.data : e.data; 4605 if (typeof data == 'undefined') { 4606 return false; 4607 } 4608 // FALL: Produkt wurde zum Warenkorb hinzugefügt 4609 else if (data === 'addedToCart' && $('.cart-iframe').length !== 0) { 4610 // Iframe neuladen: 4611 $('.cart-iframe').attr('src', function (i, val) { 4612 return val; 4613 }); 4614 } 4615 }); 4616 4617 // Shop-Anbindung 4618 // ---------------------------------------------- 4619 4620 // Warenkorbanzahl über jsonp Ajax Aufruf aktuallisieren 4621 var updateCartCount = function (data) { 4622 var count = (data !== null && data !== 'null' && data != 0) ? data : ''; 4623 $('.cart-count').text(count); 4624 if (window.sessionStorage) { 4625 window.sessionStorage.setItem('gw-cart-count', count); 4626 } 4627 }; 4628 if (window.sessionStorage) { 4629 var count = window.sessionStorage.getItem('gw-cart-count'); 4630 if (count !== null) { 4631 updateCartCount(count); 4632 } 4633 } 4634 4635 $.ajax({ 4636 url: Gw.shopUrl + "gwrequest/cart/count", 4637 crossDomain: true, 4638 dataType: 'jsonp' 4639 }).done(function(data) { 4640 var count = data.count; 4641 updateCartCount(count); 4642 }); 4643 4644 // aktualisieren, wenn eine gw-cart-count nachricht empfangen wird 4645 $(window).on("message", function(e) { 4646 var data = e.originalEvent.data ? e.originalEvent.data.split(':') : false; 4647 if (data && data[0] == 'gw-cart-count') { 4648 if (data[1].length > 0) { 4649 updateCartCount(data[1]); 4650 } 4651 } 4652 }); 4653 4654}); 4655 4656/** 4657 * Poll 4658 * 4659 * Thomas Deuling <[email protected]> 4660 * 2017-01-14 - Muenster/Germany 4661 */ 4662var PollJQuery = { 4663 4664 /** 4665 * Initialize poll 4666 */ 4667 initialize: function() { 4668 // Deactivate form submit button on first click 4669 var saveButton = jQuery('.poll-button .poll-save'); 4670 if(saveButton.length>0) { 4671 saveButton.click(function() { 4672 jQuery(this).attr('disabled', 'disabled'); 4673 jQuery('<input />') 4674 .attr('type', 'hidden') 4675 .attr('name', jQuery(this).attr('name')) 4676 .attr('value', jQuery(this).attr('value')) 4677 .appendTo(jQuery(this).closest('form')); 4678 jQuery(this).closest('form').submit(); 4679 return false; 4680 }); 4681 } 4682 // Deactivate form submit button on first click 4683 var finishButton = jQuery('.poll-button .poll-finish'); 4684 if(finishButton.length>0) { 4685 finishButton.click(function() { 4686 jQuery(this).attr('disabled', 'disabled'); 4687 jQuery('<input />') 4688 .attr('type', 'hidden') 4689 .attr('name', jQuery(this).attr('name')) 4690 .attr('value', jQuery(this).attr('value')) 4691 .appendTo(jQuery(this).closest('form')); 4692 jQuery(this).closest('form').submit(); 4693 return false; 4694 }); 4695 } 4696 // Radiobuttons with user answers 4697 var radiobuttonWithUserAnswer = jQuery('.poll-radiobutton-user-answer input'); 4698 if(radiobuttonWithUserAnswer.length>0) { 4699 jQuery.each(radiobuttonWithUserAnswer, function() { 4700 var userInput = jQuery(this); 4701 var pollAnswer = userInput.closest('.poll-answer'); 4702 var pollQuestionAnswer = userInput.closest('.poll-question-answers'); 4703 var radiobutton = jQuery('input[type=\'radio\']', pollAnswer); 4704 var radiobuttons = jQuery('input[type=\'radio\']', pollQuestionAnswer); 4705 if(!radiobutton.is(':checked')) { 4706 userInput.attr('disabled', 'disabled'); 4707 } 4708 // Deactivate and clear user field on radiobutton 4709 radiobuttons.change(function() { 4710 var thisPollAnswer = jQuery(this).closest('.poll-answer'); 4711 var allPollAnswer = jQuery('.poll-answer', jQuery(this).closest('.poll-question-answers')); 4712 jQuery.each(allPollAnswer, function() { 4713 var currentPollAnswer = jQuery(this); 4714 if(currentPollAnswer.attr('id') === thisPollAnswer.attr('id')) { 4715 jQuery('.poll-radiobutton-user-answer input', currentPollAnswer).removeAttr('disabled'); 4716 } 4717 else { 4718 var userAnswer = jQuery('.poll-radiobutton-user-answer input', currentPollAnswer); 4719 if(userAnswer.length>0) { 4720 userAnswer.attr('disabled', 'disabled').val(''); 4721 } 4722 } 4723 }); 4724 }); 4725 }); 4726 } 4727 // Checkbox with user answers 4728 var checkboxWithUserAnswer = jQuery('.poll-checkbox-user-answer input'); 4729 if(checkboxWithUserAnswer.length>0) { 4730 jQuery.each(checkboxWithUserAnswer, function() { 4731 var userInput = jQuery(this); 4732 var pollAnswer = userInput.closest('.poll-answer'); 4733 var checkbox = jQuery('input[type=\'checkbox\']', pollAnswer); 4734 if(!checkbox.is(':checked')) { 4735 userInput.attr('disabled', 'disabled'); 4736 } 4737 checkbox.change(function() { 4738 if(jQuery(this).is(':checked')) { 4739 jQuery('.poll-checkbox-user-answer input', pollAnswer).removeAttr('disabled'); 4740 } 4741 else { 4742 jQuery('.poll-checkbox-user-answer input', pollAnswer) 4743 .attr('disabled', 'disabled') 4744 .val(''); 4745 } 4746 }); 4747 }); 4748 } 4749 // Multiple choice min/max answers validation 4750 jQuery.each(jQuery('.poll-question.multiple'), function() { 4751 var question = jQuery(this); 4752 var min = parseInt(question.attr('data-answers-min') || '0', 10); 4753 var max = parseInt(question.attr('data-answers-max') || '0', 10); 4754 if(min<=0 && max<=0) { 4755 return; 4756 } 4757 jQuery('.poll-question-answers input[type=\'checkbox\']', question).change(function() { 4758 PollJQuery.validateMultipleQuestion(question); 4759 }); 4760 }); 4761 // Initialize poll tab next/previous 4762 jQuery('.tab-navigation .btn').click(function(event) { 4763 event.preventDefault(); 4764 var button = jQuery(this); 4765 var tabNavigation = button.closest('.tab-navigation'); 4766 var pollContainer = tabNavigation.closest('.tx-poll').parent(); 4767 var parent = button.parent(); 4768 button.removeClass('hide'); 4769 if (parent.hasClass('previous')) { 4770 button.addClass('hide'); 4771 tabNavigation.find('.active').parent().prev().find('.btn').click(); 4772 } 4773 if (parent.hasClass('next')) { 4774 button.addClass('hide'); 4775 tabNavigation.find('.active').parent().next().find('.btn').click(); 4776 } 4777 var next = parent.next(); 4778 var previous = parent.prev(); 4779 if (next) { 4780 if (next.hasClass('next')) { 4781 next.find('.btn').addClass('hide'); 4782 } 4783 if (next.hasClass('nav-item')) { 4784 tabNavigation.find('.next .btn').removeClass('hide'); 4785 } 4786 } 4787 if (previous) { 4788 if (previous.hasClass('previous')) { 4789 previous.find('.btn').addClass('hide'); 4790 } 4791 if (previous.hasClass('nav-item')) { 4792 tabNavigation.find('.previous .btn').removeClass('hide'); 4793 } 4794 } 4795 window.scrollTo(pollContainer.offset().left, pollContainer.offset().top - 150); 4796 }); 4797 }, 4798 4799 /** 4800 * Validates the selected answers of a multiple choice question 4801 * against the configured min/max range and shows/hides a 4802 * Bootstrap message at the same place as the server-side error. 4803 */ 4804 validateMultipleQuestion: function(question) { 4805 var min = parseInt(question.attr('data-answers-min') || '0', 10); 4806 var max = parseInt(question.attr('data-answers-max') || '0', 10); 4807 var checkedCount = jQuery('.poll-question-answers input[type=\'checkbox\']:checked', question).length; 4808 var message = ''; 4809 if(checkedCount>0 && min>0 && checkedCount<min) { 4810 message = question.attr('data-message-min'); 4811 } 4812 else if(max>0 && checkedCount>max) { 4813 message = question.attr('data-message-max'); 4814 } 4815 // Remove a previously added message 4816 jQuery('.poll-js-validation-message', question).remove(); 4817 // Add the message at the same place as the server-side error message 4818 if(message) { 4819 // Remove a server-side validation message to avoid two messages at once 4820 jQuery('.alert.alert-danger', question).not('.poll-js-validation-message').remove(); 4821 jQuery('<div />') 4822 .addClass('alert alert-danger poll-js-validation-message') 4823 .html(message) 4824 .insertBefore(jQuery('.poll-question-answers', question)); 4825 } 4826 } 4827}; 4828jQuery(document).ready(function () { 4829 PollJQuery.initialize(); 4830}); 4831 4832var PollTabs = { 4833 4834 scrollOffset: 50, 4835 4836 initialize: function () { 4837 jQuery.each(jQuery('div[data-poll-tabs]'), function () { 4838 var wrapper = jQuery(this); 4839 var poll = wrapper.attr('data-poll-tabs'); 4840 var pollTab = parseInt(wrapper.attr('data-poll-tab'), 10); 4841 var navigation = jQuery('ul[data-poll-tab-navigation=\'' + poll + '\']'); 4842 jQuery.each(jQuery('a.btn', navigation), function () { 4843 var button = jQuery(this); 4844 if (button.attr('data-poll-tab') === 'previous') { 4845 button.on('click', function () { 4846 PollTabs.previous(poll); 4847 event.preventDefault(); 4848 return false;
4849 }); 4850 } else if (button.attr('data-poll-tab') === 'next') { 4851 button.on('click', function () { 4852 PollTabs.next(poll); 4853 event.preventDefault(); 4854 return false; 4855 }); 4856 } else { 4857 button.on('click', function () { 4858 PollTabs.page(poll, parseInt(button.attr('data-poll-tab'), 10)); 4859 event.preventDefault(); 4860 return false; 4861 }); 4862 } 4863 }); 4864 PollTabs.page(poll, pollTab, false); 4865 }); 4866 }, 4867 4868 previous: function (poll) { 4869 var pollTabNoActive = jQuery('div[data-poll-tabs=\'' + poll + '\']').attr('data-poll-tab'); 4870 pollTabNoActive = parseInt(pollTabNoActive, 10) - 1; 4871 PollTabs.page(poll, pollTabNoActive); 4872 }, 4873 4874 next: function (poll) { 4875 var pollTabNoActive = jQuery('div[data-poll-tabs=\'' + poll + '\']').attr('data-poll-tab'); 4876 pollTabNoActive = parseInt(pollTabNoActive, 10) + 1; 4877 PollTabs.page(poll, pollTabNoActive); 4878 }, 4879 4880 page: function (poll, no, scrollToTabs = true) { 4881 var navigation = jQuery('ul[data-poll-tab-navigation=\'' + poll + '\']'); 4882 if (navigation.length !== 1) { 4883 console.error('invalid ul[data-poll-tab-navigation=\'' + poll + '\']') 4884 } 4885 var tabsWrapper = jQuery('div[data-poll-tabs=\'' + poll + '\']'); 4886 if (tabsWrapper.length !== 1) { 4887 console.error('invalid div[data-poll-tabs=\'' + poll + '\']') 4888 } 4889 var tabs = jQuery('div[data-poll-tab]', tabsWrapper); 4890 if (tabs.length === 0) { 4891 console.error('invalid div[data-poll-tabs=\'' + poll + '\'] in div[data-poll-tab]') 4892 } 4893 // 4894 // Validate tab number 4895 if (no < 1) { 4896 no = 1; 4897 } else if (no > tabs.length) { 4898 no = tabs.length; 4899 } 4900 // 4901 // Tabs 4902 jQuery('div[data-poll-tab]', tabsWrapper).hide(); 4903 jQuery('div[data-poll-tab=\'' + no + '\']', tabsWrapper).show(); 4904 // 4905 // Navigation 4906 jQuery('a.btn', navigation).removeClass('active'); 4907 jQuery('a.btn[data-poll-tab=\'' + no + '\']', navigation).addClass('active'); 4908 if (no > 1) { 4909 jQuery('a.btn[data-poll-tab=\'previous\']', navigation).removeClass('disabled'); 4910 } else { 4911 jQuery('a.btn[data-poll-tab=\'previous\']', navigation).addClass('disabled'); 4912 } 4913 if (no < tabs.length) { 4914 jQuery('a.btn[data-poll-tab=\'next\']', navigation).removeClass('disabled'); 4915 } else { 4916 jQuery('a.btn[data-poll-tab=\'next\']', navigation).addClass('disabled'); 4917 } 4918 // 4919 // Set current tab number 4920 tabsWrapper.attr('data-poll-tab', no); 4921 // 4922 // Scroll to tab start 4923 if (scrollToTabs) { 4924 PollTabs.scrollTo('div[data-poll-tabs=\'' + poll + '\']'); 4925 } 4926 }, 4927 4928 scrollTo: function (selector) { 4929 let element = jQuery(selector); 4930 jQuery('html, body').animate({ 4931 scrollTop: element.offset().top - PollTabs.scrollOffset 4932 }, 500); 4933 } 4934 4935}; 4936jQuery(document).ready(function () { 4937 PollTabs.initialize(); 4938}); 4939 4940jQuery(document).ready(function ($) { 4941 4942 // Link in Containern auslesen 4943 // ---------------------------------------------- 4944 Gw.findAndOpenLink = function (element) { 4945 var $a = $(element).find('a'); 4946 if ($a.attr('target')) { 4947 window.open($a[0].href, $a.attr('target')); 4948 } else { 4949 location.href = $a[0].href; 4950 } 4951 return false; 4952 }; 4953 4954 $('.c-card--linked-all').on('click', function () { 4955 Gw.findAndOpenLink(this); 4956 }); 4957 $('.c-tile--linked-all').on('click', function () { 4958 Gw.findAndOpenLink(this); 4959 }); 4960 4961 // Generische Klick-Box-Komponente 4962 // ---------------------------------------------- 4963 4964 // Links in Klickbox auslesen und Areas dekorieren 4965 $('.js-click-box').each(function () {
4966 let clickBoxTarget = $(this).find('.js-click-box__target'); 4967 //Wenn kein Link angegeben verwende ersten Button-Link 4968 if (clickBoxTarget.length === 0) { 4969 clickBoxTarget = $(this).find('.c-btn').first(); 4970 //Wenn kein Button verwende Link 4971 if (clickBoxTarget.length === 0) { 4972 clickBoxTarget = $(this).find('.c-link').find('a').first(); 4973 } 4974 //Wenn kein Button verwende Link in Text 4975 if (clickBoxTarget.length === 0) { 4976 clickBoxTarget = $(this).find('.c-card__text').find('a').first(); 4977 } 4978 } 4979 4980 $(this).addClass('js-click-box--usable'); 4981 $(this).find('.js-click-box__area').each(function () { 4982 $(this).attr('data-click-box-target', clickBoxTarget.attr('target')); 4983 $(this).attr('data-click-box-href', clickBoxTarget.attr('href')); 4984 $(this).addClass('js-click-box__area--usable'); 4985 }); 4986 4987 //Wenn gesamte Card verlinked ist 4988 if ($(this).find('.js-click-box__area').length === 0) { 4989 if ($(this).hasClass('js-click-box__area')) { 4990 $(this).attr('data-click-box-target', clickBoxTarget.attr('target')); 4991 $(this).attr('data-click-box-href', clickBoxTarget.attr('href')); 4992 $(this).addClass('js-click-box__area--usable'); 4993 } 4994 } 4995 }); 4996 4997 // Areas klickbar machen 4998 $('.js-click-box__area--usable').click(function () { 4999 if ($(this).attr('data-click-box-href')) { 5000 if ($(this).attr('data-click-box-target')) { 5001 window.open($(this).attr('data-click-box-href'), $(this).attr('data-click-box-target')); 5002 } else { 5003 location.href = $(this).attr('data-click-box-href'); 5004 } 5005 } 5006 return false; 5007 }); 5008 5009 // Areas focus dekorieren 5010 $('.js-click-box__area').hover(function () { 5011 $(this).addClass('js-click-box__area--hover'); 5012 }, function () { 5013 $(this).removeClass('js-click-box__area--hover'); 5014 }); 5015 5016 // Menu: Navbar öffnen/schlieÃen 5017 // ---------------------------------------------- 5018 const navbar = $('.js-navbar'); 5019 const navbarToggle = $('.js-navbar-toggle'); 5020 const navbarBaseClass = 'page-navbar'; 5021 const page = $('.js-page'); 5022 const pageBaseClass = 'page'; 5023 const burgerBtn = navbarToggle; 5024 const burgerBaseClass = 'c-burger'; 5025 5026 Gw.toggleBurger = function () { 5027 burgerBtn.parent().toggleClass(burgerBaseClass + '--is-active'); 5028 burgerBtn.toggleClass(burgerBaseClass + '__btn--is-active'); 5029 burgerBtn.attr('aria-expanded', function (i, attr) { 5030 return attr === 'true' ? 'false' : 'true'; 5031 }); 5032 }; 5033 5034 Gw.toggleNavbar = function () { 5035 if (navbar.hasClass(navbarBaseClass + '--is-active')) { 5036 navbar.removeClass(navbarBaseClass + '--is-active'); 5037 page.removeClass(pageBaseClass + '--navbar-is-active'); 5038 const navbarTransitionDurationInMs = Number.parseFloat(navbar.css('transition-duration')) * 1000; 5039 setTimeout(() => { 5040 if (navbar.hasClass(navbarBaseClass + '--is-active')) { 5041 return; 5042 } 5043 navbar.css('display', 'none'); 5044 }, navbarTransitionDurationInMs); 5045 } else { 5046 navbar.css('display', 'block'); 5047 setTimeout(() => { 5048 navbar.addClass(navbarBaseClass + '--is-active'); 5049 page.addClass(pageBaseClass + '--navbar-is-active'); 5050 navbar.find('a').first().focus(); 5051 $(this).trigger('gw-navbar-open'); 5052 }, 10); 5053 } 5054 }; 5055 5056 // Burger Button 5057 navbarToggle.on('click', function () { 5058 Gw.toggleNavbar(); 5059 Gw.toggleBurger(); 5060 }); 5061 5062 // Tastatursteuerung 5063 $(document).on('keyup', function (event) { 5064 if (event.key === "Escape") { 5065 const navBarIsOpen = navbar.hasClass(navbarBaseClass + '--is-active'); 5066 if (navBarIsOpen) { 5067 Gw.toggleNavbar(); 5068 Gw.toggleBurger(); 5069 } 5070 const navHorizontalShow = $('.js-nav-horizontal .js-nav-collapse.show'); 5071 navHorizontalShow.collapse('hide'); 5072 navHorizontalShow.prev().find('.js-nav-collapse-btn').trigger('focus'); 5073 } 5074 }); 5075 $('.js-nav-horizontal .js-nav-collapse').on('focusout', function(event) { 5076 const navHorizontalShow = $('.js-nav-horizontal .js-nav-collapse.show'); 5077 if (!$.contains(event.currentTarget, event.relatedTarget)) { 5078 navHorizontalShow.collapse('hide'); 5079 navHorizontalShow.prev().find('.js-nav-collapse-btn').trigger('focus'); 5080 } 5081 }); 5082 $('.js-nav-horizontal .js-nav-collapse-btn').on('focusout', function(event) { 5083 const navHorizontalShow = $('.js-nav-horizontal .js-nav-collapse.show'); 5084 if ($(event.relatedTarget)[0] === $(event.currentTarget).prev()[0]) { 5085 navHorizontalShow.collapse('hide'); 5086 } 5087 }); 5088 5089 // Scrolling Fixed Header 5090 // ---------------------------------------------- 5091
5092 // Breakpoint / Schwellwerte 5093 var scrollBreakpoint = 107; 5094 var scrolledOverscrollBreakpoint = false; 5095 var scrollBarDelta = 0; 5096 if (!Gw.Viewport || Gw.Viewport.isSmUp()) { 5097 var scrollBreakpoint = 112; 5098 var scrollBarDelta = 0; 5099 } 5100 if (!Gw.Viewport || Gw.Viewport.isLgUp()) { 5101 var scrollBreakpoint = 122; 5102 var scrollBarDelta = 0; 5103 } 5104 5105 // Klasse für Fixed-Header setzen/entfernen 5106 $(window).on('scroll', function () { 5107 if (document.documentElement.scrollTop > scrollBreakpoint + scrollBarDelta) { 5108 if (!scrolledOverscrollBreakpoint) { 5109 $(".page").addClass('page--header-fixed'); 5110 $(".page-header").addClass('page-header--fixed'); 5111 scrolledOverscrollBreakpoint = true; 5112 // Margin abhänig von Header Höhe setzen, um Sprung zu vermeiden 5113 addMarginTop(); 5114 } 5115 } 5116 else { 5117 if (document.documentElement.scrollTop < scrollBreakpoint) { 5118 $(".page").removeClass('page--header-fixed'); 5119 $(".page-header").removeClass('page-header--fixed'); 5120 scrolledOverscrollBreakpoint = false; 5121 // Margin wieder entfernen 5122 removeMarginTop(); 5123 } 5124 } 5125 }); 5126 5127 $(document).on('gw-navbar-open', function () { 5128 removeMarginTop(); 5129 }); 5130 5131 function removeMarginTop() { 5132 $(".page").css('margin-top', 0); 5133 } 5134 5135 function addMarginTop() { 5136 var pageHeaderHeight = 2 * $(".page-header").height() - $('.page-header__prepend').height(); 5137 $(".page").css('margin-top', pageHeaderHeight + 'px'); 5138 } 5139 5140 // Search-Box: Fokus-Klasse dekorieren 5141 // ---------------------------------------------- 5142 $('.c-search-box__textfield').on('focus', function () { 5143 $(this).parent('.c-search-box').addClass('c-search-box--is-focused'); 5144 }); 5145 $('.c-search-box__textfield').on('blur', function () { 5146 $(this).parent('.c-search-box').removeClass('c-search-box--is-focused'); 5147 }); 5148 5149 // Search-Dialog: Fokus auf input setzen 5150 // ---------------------------------------------- 5151 const searchDialog = $('.page-search-dialog'); 5152 searchDialog.on('shown.bs.modal', function () { 5153 $(this).find('.js-search-box-input').first().trigger('focus'); 5154 }); 5155 5156 5157 // Collapse: Inhalte auf kleinen Viewports ein-/ausklappen 5158 // ---------------------------------------------- 5159 5160 // Collapse Icons dekorieren 5161 const navCollapse = $('.js-menu-main .js-nav-collapse'); 5162 const navCollapseBaseClass = 'c-nav'; 5163 navCollapse.on('hide.bs.collapse', function (e) { 5164 const togglebtn = $(e.target).prev().find('.js-nav-collapse-btn'); 5165 $(togglebtn).removeClass(navCollapseBaseClass + '__collapse--active'); 5166 }); 5167 navCollapse.on('show.bs.collapse', function (e) { 5168 const togglebtn = $(e.target).prev().find('.js-nav-collapse-btn'); 5169 $(togglebtn).addClass(navCollapseBaseClass + '__collapse--active'); 5170 }); 5171 5172 // Bootstrap-Collapse initialisieren 5173 // nur für Viewport xs 5174 if (!Gw.Viewport || Gw.Viewport.isSmDown()) { 5175 // Footer: Sitemap 5176 $('.js-collapse-target--sitemap').addClass('collapse'); 5177 } 5178 5179 // nur für Viewport sm down 5180 if (!Gw.Viewport || Gw.Viewport.isSmDown()) { 5181 // Nav: Vertical 5182 $('.js-collapse-target--nav-vertical').addClass('collapse'); 5183 } 5184 5185 // Bootstrap Carousel initialisieren 5186 const carouselTriggerList = $('.c-carousel'); 5187 const carouselList = carouselTriggerList.map(function() { 5188 return new bootstrap.Carousel($(this)); 5189 }); 5190 5191 5192 // News / Eventnews: Filter ein-/ausklappen 5193 // ---------------------------------------------- 5194 5195 // nur für Viewport xs 5196 if (!Gw.Viewport || Gw.Viewport.isXsDown()) { 5197 // Bootstrap-Collapse initialisieren 5198 $('.js-news-collapse--target').addClass('collapse'); 5199 5200 // Icon dekorieren 5201 $('.js-news-collapse').on('click', function () { 5202 $('.c-news-collapse__icon').toggleClass(function () { 5203 return $(this).is('.sl-icon-default-subtract, .sl-icon-default-add') 5204 ? 'sl-icon-default-add sl-icon-default-subtract' : 'sl-icon-default-subtract'; 5205 }); 5206 }); 5207 5208 } 5209 5210 // Smooth Scroolling 5211 // ---------------------------------------------- 5212 // Page Offset für gw.achor setzen und Patterns erweitern 5213 Gw.pageOffset = function () { 5214 return Gw.Viewport.isSmUp() ? '300' : '100'; 5215 }; 5216 Gw.getValidAnchorPatterns = function () { 5217 return [/^#c-id--scroll/]; 5218 }; 5219 5220 // Scroll Top Button einblenden 5221 // ---------------------------------------------- 5222 var breakpointScrolltop = 300; 5223 var scrolledOverBreakpointScrolltop = false;
5224 $(window).on('scroll', function () { 5225 if (document.body.scrollTop > scrolledOverBreakpointScrolltop || document.documentElement.scrollTop > breakpointScrolltop) { 5226 if (!scrolledOverBreakpointScrolltop) { 5227 $(".c-scroll-top").fadeIn(200); 5228 scrolledOverBreakpointScrolltop = true; 5229 } 5230 } else { 5231 if (scrolledOverBreakpointScrolltop) { 5232 $(".c-scroll-top").fadeOut(200); 5233 scrolledOverBreakpointScrolltop = false; 5234 } 5235 } 5236 }); 5237 5238 // Content: Klassen für Fade-In-Animation setzen 5239 // ---------------------------------------------- 5240 if ($('.c-card-columns').hasClass('js-content-fade-in')) { 5241 $('.c-card-columns').find('.default').addClass('u-animation-fade-in'); 5242 } 5243 if ($('.c-timeline-container').hasClass('js-content-fade-in')) { 5244 $('.c-timeline-container').find('.default').addClass('u-animation-fade-in'); 5245 } 5246 5247 // Content: Klassen für Slide-In-Animation setzen 5248 // ---------------------------------------------- 5249 if ($('.c-card-columns').hasClass('js-content-slide-in')) { 5250 $('.c-card-columns').find('.default').addClass('u-animation-slide-in'); 5251 } 5252 if ($('.c-timeline-container').hasClass('js-slide-fade-in')) { 5253 $('.c-timeline-container').find('.default').addClass('u-animation-slide-in'); 5254 } 5255 if ($('.c-grid').hasClass('js-animate-slide-in-left')) { 5256 $('.js-animate-slide-in-left').children('.c-grid__col--count-1').find('.default').addClass('u-animation-slide-in'); 5257 } 5258 if ($('.c-grid').hasClass('js-animate-slide-in-right')) { 5259 $('.js-animate-slide-in-right').children('.c-grid__col--count-2').find('.default').addClass('u-animation-slide-in'); 5260 } 5261 5262 // Prüfen ob Element in Viewport sichtbar ist 5263 $.fn.isInViewport = function () { 5264 var elementTop = $(this).offset().top; 5265 var elementBottom = elementTop + $(this).outerHeight(); 5266 5267 var viewportTop = $(window).scrollTop(); 5268 var viewportBottom = viewportTop + $(window).height(); 5269 5270 return elementBottom > viewportTop && elementTop < viewportBottom; 5271 }; 5272 5273 // Klasse setzen um Content via CSS-Animation auslösen 5274 Gw.setFadeAndSlideAnimation = function () { 5275 // Fade-In 5276 $('.u-animation-fade-in').each(function () { 5277 if ($(this).isInViewport()) { 5278 $(this).addClass('u-animation-fade-in--start'); 5279 } 5280 }); 5281 // Slide-In 5282 $('.u-animation-slide-in').each(function () { 5283 if ($(this).isInViewport()) { 5284 $(this).addClass('u-animation-slide-in--start'); 5285 } 5286 }); 5287 }; 5288 5289 $(window).on('load resize scroll', function (e) { 5290 Gw.setFadeAndSlideAnimation(); 5291 }); 5292 5293 5294 // Form File Upload Dateinamen anzeigen 5295 $('.js-custom-file-input').on('change', function () { 5296 let $label = $(this).next('.js-custom-file-label'); 5297 file = $(this).prop('files')[0] || null; 5298 if (!file) { 5299 return; 5300 } 5301 $label.text(file.name); 5302 }); 5303 5304 // Formulare: Frontend Validierung hinzufügen 5305 $('.js-validate-form').each(function (index, form) { 5306 $(form).find('input, textarea') 5307 .each(function () { 5308 const $element = $(this); 5309 const $label = $element.siblings('.c-form__label'); 5310 if (!$element.hasClass('c-form__input') && !$element.hasClass('c-form__textarea')) { 5311 return; 5312 } 5313 if ($element.val().length) { 5314 $label.addClass('c-input-filled'); 5315 } 5316 }) 5317 .focusin((event) => { 5318 const $target = $(event.currentTarget); 5319 const $label = $target.siblings('.c-form__label'); 5320 $label.addClass('c-input-focused'); 5321 }) 5322 .focusout((event) => { 5323 const $target = $(event.currentTarget); 5324 const $label = $target.siblings('.c-form__label'); 5325 $label.removeClass('c-input-focused'); 5326 if ($target.val().length) { 5327 $label.addClass('c-input-filled'); 5328 } else if ($label.hasClass('c-input-filled')) { 5329 $label.removeClass('c-input-filled'); 5330 5331 } 5332 }); 5333 const translations = $(form).find('.js-frontend-validation-translations').data('translations'); 5334 const $validator = Gw.FrontendTranslation.addValidation(form, translations, {errorClass: 'c-error'}); 5335 $(form).find('button[type="reset"]').on('click', function () { 5336 $validator.resetForm(); 5337 $(form).find('.c-input-filled').each(function () { 5338 $(this).removeClass('c-input-filled'); 5339 }); 5340 }); 5341 $(form).find('button[type="submit"]').on('click', function (event) { 5342 event.preventDefault(); 5343 let isFormValid = $(form).valid(); 5344 if (isFormValid) { 5345 if ($(form).find('.g-recaptcha').length > 0 && grecaptcha) { 5346 grecaptcha.execute(); 5347 } else { 5348 $(form).submit(); 5349 } 5350 } 5351 }); 5352 }); 5353 5354 // Stoerer Scroll Animation 5355 const $stoerer = $('.js-stoerer'); 5356 const $stoererOffset = 100; 5357 $(window).on('scroll', function () { 5358 if (document.documentElement.scrollTop > $stoererOffset) { 5359 $stoerer.addClass('js-stoerer--active'); 5360 } else { 5361 $stoerer.removeClass('js-stoerer--active'); 5362 } 5363 }); 5364}); 5365 5366jQuery(document).ready(function ($) { 5367 // -------------------------------------------- 5368 // -- Vendor Klassen integrieren -------------- 5369 // -------------------------------------------- 5370 5371 // Touchswipe: Carousel per Swipe zugänglich machen 5372 // -------------------------------------------- 5373 $(".carousel").swipe({ 5374 swipeLeft: function () { 5375 $(this).carousel('next'); 5376 }, 5377 swipeRight: function () { 5378 $(this).carousel('prev'); 5379 }, 5380 threshold: 50 5381 }); 5382 5383 // Bootstrap: Initialisieren 5384 // -------------------------------------------- 5385 5386 // Tooltips initialisieren 5387 const tooltipTriggerList = $('[data-bs-toggle="tooltip"]'); 5388 const tooltipList = tooltipTriggerList.map(function() { 5389 return new bootstrap.Tooltip($(this)); 5390 }); 5391 // BITV: Tooltip bei Escape schlieÃen 5392 tooltipTriggerList.on('keyup', function(event) { 5393 if (event.key === "Escape") { 5394 event.stopPropagation(); 5395 bootstrap.Tooltip.getInstance($(this)).hide(); 5396 } 5397 }); 5398 5399 // Popover initialisieren 5400 const popoverTriggerList = $('[data-bs-toggle="popover"]'); 5401 const popoverList = popoverTriggerList.map(function() { 5402 return new bootstrap.Popover($(this)); 5403 }); 5404 5405 // -------------------------------------------- 5406 // -- Lib Klassen integrieren ----------------- 5407 // -------------------------------------------- 5408}); 5409 5410// OwlCarousel Initialisieren 5411// ---------------------------------------------- 5412jQuery(document).ready(function ($) { 5413
5414 const sliderClass = '.js-slider'; 5415 5416 const sliderTypeViewportMapping = { 5417 'default': { 5418 // Folienanzahl pro Screen 5419 'xs': 1, 5420 'sm': 1, 5421 'md': 1, 5422 'lg': 1, 5423 'xl': 1, 5424 // Abstand zwischen Folien 5425 'margin': 5, 5426 // SlideBy Anzahl 5427 'slideBy': 1, 5428 }, 5429 66: { 5430 // Folienanzahl pro Screen 5431 'xs': 1, 5432 'sm': 2, 5433 'md': 2, 5434 'lg': 2, 5435 'xl': 2, 5436 // Abstand zwischen Folien 5437 'margin': 5, 5438 // SlideBy Anzahl 5439 'slideBy': 1, 5440 }, 5441 444: { 5442 // Folienanzahl pro Screen 5443 'xs': 1, 5444 'sm': 3, 5445 'md': 3, 5446 'lg': 3, 5447 'xl': 3, 5448 // Abstand zwischen Folien 5449 'margin': 5, 5450 // SlideBy Anzahl 5451 'slideBy': 1, 5452 }, 5453 3333: { 5454 // Folienanzahl pro Screen 5455 'xs': 1, 5456 'sm': 3, 5457 'md': 3, 5458 'lg': 4, 5459 'xl': 4, 5460 // Abstand zwischen Folien 5461 'margin': 5, 5462 // SlideBy Anzahl 5463 'slideBy': 1, 5464 }, 5465 222222: { 5466 // Folienanzahl pro Screen 5467 'xs': 1, 5468 'sm': 3, 5469 'md': 3, 5470 'lg': 5, 5471 'xl': 5, 5472 // Abstand zwischen Folien 5473 'margin': 5, 5474 // SlideBy Anzahl 5475 'slideBy': 1, 5476 } 5477 }; 5478 5479 $(sliderClass).each(function (index, sliderElement) { 5480 const $sliderElement = $(sliderElement); 5481 5482 const sliderType = $sliderElement.data('slider-type'); 5483 5484 const owlCarouselItemsXs = sliderTypeViewportMapping[sliderType].xs; 5485 const owlCarouselItemsSm = sliderTypeViewportMapping[sliderType].sm; 5486 const owlCarouselItemsMd = sliderTypeViewportMapping[sliderType].md; 5487 const owlCarouselItemsLg = sliderTypeViewportMapping[sliderType].lg; 5488 const owlCarouselItemsXl = sliderTypeViewportMapping[sliderType].xl; 5489 5490 const owlCarouselItemsXsMargin = sliderTypeViewportMapping[sliderType].margin; 5491 const owlCarouselItemsSmMargin = sliderTypeViewportMapping[sliderType].margin; 5492 const owlCarouselItemsMdMargin = sliderTypeViewportMapping[sliderType].margin; 5493 const owlCarouselItemsLgMargin = sliderTypeViewportMapping[sliderType].margin; 5494 const owlCarouselItemsXlMargin = sliderTypeViewportMapping[sliderType].margin; 5495 5496 const owlCarouselItemsXsSlideBy = sliderTypeViewportMapping[sliderType].slideBy; 5497 const owlCarouselItemsSmSlideBy = sliderTypeViewportMapping[sliderType].slideBy; 5498 const owlCarouselItemsMdSlideBy = sliderTypeViewportMapping[sliderType].slideBy; 5499 const owlCarouselItemsLgSlideBy = sliderTypeViewportMapping[sliderType].slideBy; 5500 const owlCarouselItemsXlSlideBy = sliderTypeViewportMapping[sliderType].slideBy; 5501 5502 $sliderElement.owlCarousel({ 5503 center: $sliderElement.data('slider-center') === 1, 5504 rewind: $sliderElement.data('slider-behaviour') === 'rewind', 5505 loop: $sliderElement.data('slider-behaviour') === 'loop', 5506 autoplay: $sliderElement.data('slider-autoplay') === 1, 5507 nav: true, // Regelt auch Ausgabe der Dots über Fluid-Template 5508 navContainer: $sliderElement.siblings().children('.js-slider-nav'), // Rendert Nav an bestimmter Template Position 5509 dots: true, // Wird über dei Ausgabe Nav über Fluid-Template geregelt 5510 dotsContainer: $sliderElement.siblings().children('.js-slider-dots'), // Rendert Dots an bestimmter Template Position 5511 autoplayTimeout: $sliderElement.data('slider-timeout-duration'), 5512 autoplayHoverPause: false, 5513 smartSpeed: 350, 5514 mouseDrag: true, 5515 touchDrag: true, 5516 responsive: { 5517 //Responsive Anpassungen für Viewports 5518 0: { 5519 items: owlCarouselItemsXs, slideBy: owlCarouselItemsXsSlideBy, margin: owlCarouselItemsXsMargin, 5520 }, 480: { 5521 items: owlCarouselItemsXs, slideBy: owlCarouselItemsXsSlideBy, margin: owlCarouselItemsXsMargin, 5522 }, 768: { 5523 items: owlCarouselItemsSm, slideBy: owlCarouselItemsSmSlideBy, margin: owlCarouselItemsSmMargin, 5524 }, 1024: { 5525 items: owlCarouselItemsMd, slideBy: owlCarouselItemsMdSlideBy, margin: owlCarouselItemsMdMargin, 5526 }, 1440: { 5527 items: owlCarouselItemsLg, slideBy: owlCarouselItemsLgSlideBy, margin: owlCarouselItemsLgMargin, 5528 }, 1920: { 5529 items: owlCarouselItemsLg, slideBy: owlCarouselItemsLgSlideBy, margin: owlCarouselItemsLgMargin, 5530 }, 2560: { 5531 items: owlCarouselItemsXl, slideBy: owlCarouselItemsXlSlideBy, margin: owlCarouselItemsXlMargin, 5532 } 5533 } 5534 }); 5535 }); 5536 5537 // 5538 // Custom Navigationselmente & Optimierung der Barrierefreiheit (siehe auch Fluid Template) 5539 // ---------------------------------------------- 5540 const sliderWrapperList = $('.js-slider-wrapper'); 5541 sliderWrapperList.each(function () { 5542 const $sliderWrapper = $(this); 5543 5544 const sliderDotsClass = '.owl-dots'; 5545 const sliderDotClass = '.owl-dot'; 5546 const sliderDotsDataAttr = $sliderWrapper.find(sliderDotsClass).data('slider-slide-tl'); 5547 const sliderDotsLength= $sliderWrapper.find(sliderDotClass).length; 5548 // Aria-Label Seite x von y für Owl-Dots setzen 5549 $(this).find(sliderDotClass).each(function(index) { 5550 $(this).attr('aria-label', sliderDotsDataAttr + ' ' + (++index) + '/' + sliderDotsLength); 5551 }); 5552 // Title Seite x von y für Owl-Dots setzen 5553 $(this).find(sliderDotClass).each(function(index) { 5554 $(this).prop('title', sliderDotsDataAttr + ' ' + (++index) + '/' + sliderDotsLength); 5555 }); 5556 // Owl-Dots Button Type ergänzen und Role entfernen 5557 $(this).find(sliderDotClass).each(function() { 5558 $(this).prop('type', 'button'); 5559 $(this).removeAttr('role', 'button'); 5560 }); 5561
5562 const sliderNextClass = '.js-slider-next'; 5563 const sliderPrevClass = '.js-slider-prev'; 5564 // Vor und Zurücknavigation 5565 $(this).find(sliderNextClass).click(function() { 5566 $sliderWrapper.find(sliderClass).trigger('next.owl.carousel'); 5567 }); 5568 $(this).find(sliderPrevClass).click(function() { 5569 $sliderWrapper.find(sliderClass).trigger('prev.owl.carousel'); 5570 }); 5571 5572 const sliderPauseBtnClass = '.js-slider-pause'; 5573 const sliderPauseBtnCssClassActive = 'c-slider__control--pause--active'; 5574 const sliderPauseBtnLabelClass = '.js-slider-pause-label'; 5575 const sliderPauseIconClass = 'glyphicon-regular-pause'; 5576 const sliderPlayIconClass = 'glyphicon-regular-play'; 5577 // Play/Pause Button 5578 $(this).find(sliderPauseBtnClass).data('clicks', true); 5579 $(this).find(sliderPauseBtnClass).click(function () { 5580 const autoplayIsPlaying = $(this).data('clicks'); 5581 if (autoplayIsPlaying) { 5582 $(this).addClass(sliderPauseBtnCssClassActive); 5583 $sliderWrapper.find(sliderClass).trigger('stop.owl.autoplay'); 5584 $(this).children(sliderPauseBtnClass + ' > span').addClass(sliderPlayIconClass).removeClass(sliderPauseIconClass); 5585 $(this).children(sliderPauseBtnLabelClass).attr('data-slider-autoplay-paused', 1); 5586 } else { 5587 $(this).removeClass(sliderPauseBtnCssClassActive); 5588 $sliderWrapper.find(sliderClass).trigger('play.owl.autoplay'); 5589 $(this).children(sliderPauseBtnClass + ' > span').removeClass(sliderPlayIconClass).addClass(sliderPauseIconClass); 5590 $(this).children(sliderPauseBtnLabelClass).attr('data-slider-autoplay-paused', 0); 5591 } 5592 $(this).data('clicks', !autoplayIsPlaying); 5593 }); 5594 }); 5595}); 5596 5597// PhotoSwipe Galerie Initialisieren 5598// ---------------------------------------------- 5599 5600jQuery(document).ready(function ($) { 5601 // Setup 5602 // ===== 5603 5604 const PHOTOSWIPE_GALLERY_SELECTOR = '.js-gallery'; 5605 const PHOTOSWIPE_CHILDREN_SELECTOR = '.js-lightbox'; 5606 const PHOTOSWIPE_CONTAINER_CLASSNAME = 'pswp__custom-container'; 5607 const PHOTOSWIPE_CONTENT_CLASSNAME = 'pswp__custom-container__content'; 5608 5609 document.querySelectorAll(PHOTOSWIPE_CHILDREN_SELECTOR).forEach($lightboxLink => { 5610 if ($lightboxLink.getAttribute('data-gw-crop') === '1') { 5611 const $img = $lightboxLink.querySelector('img'); 5612 const width = $img.getAttribute('width'); 5613 const height = $img.getAttribute('height'); 5614 $lightboxLink.setAttribute('data-pswp-width', width); 5615 $lightboxLink.setAttribute('data-pswp-height', height); 5616 } 5617 }); 5618 5619 const lightbox = new PhotoSwipeLightbox({ 5620 // may select multiple "galleries" 5621 gallery: PHOTOSWIPE_GALLERY_SELECTOR, 5622 // Elements within gallery (slides) 5623 children: PHOTOSWIPE_CHILDREN_SELECTOR, 5624 // setup PhotoSwipe Core dynamic import 5625 pswpModule: PhotoSwipe, 5626 // Ein- und Ausblende-Animationen: zoom, fade, none 5627 showHideAnimationType: 'fade', 5628 5629 // Ãbersetzungen 5630 closeTitle: Gw.Translate.get('lightboxClose'), //'Close the dialog', 5631 zoomTitle: Gw.Translate.get('lightboxZoom'), //'Zoom the photo', 5632 arrowPrevTitle: Gw.Translate.get('lightboxPrevious'), //'Go to the previous photo', 5633 arrowNextTitle: Gw.Translate.get('lightboxNext'), //'Go to the next photo', 5634 errorMsg: Gw.Translate.get('lightboxError'), //'The photo cannot be loaded', 5635 indexIndicatorSep: Gw.Translate.get('lightboxIndicator'), //' of ' 5636 }); 5637 5638 // verhindere gleichzeitiges Anzeigen von gecropptem und Originalbild 5639 lightbox.addFilter('placeholderSrc', (placeholderSrc, content) => {}); 5640 5641 // Eigene Slide-Inhalte 5642 // ==================== 5643 5644 // Inhaltstyp "html" (für beliebiges HTML, inkl. iframes) 5645 5646 document.querySelectorAll('[data-pswp-type="html"]').forEach((e) => { 5647 if (e.children.length !== 2) { 5648 console.error('Fehler in Galerie: Eine HTML-Slide muss genau 2 Kindelemente besitzen -> Thumbnail und Inhalt', e); 5649 return; 5650 } 5651 5652 const actualContent = e.children[1]; 5653 e.dataset.html = actualContent.outerHTML; 5654 e.removeChild(actualContent); 5655 }); 5656 5657 lightbox.on('contentLoad', (e) => { 5658 const {content} = e; 5659 if (content.type === 'html') { 5660 e.preventDefault(); 5661 5662 content.element = document.createElement('div'); 5663 content.element.classList.add(PHOTOSWIPE_CONTAINER_CLASSNAME, PHOTOSWIPE_CONTAINER_CLASSNAME + '--html'); 5664 5665 content.element.innerHTML = content.data.element.dataset.html; 5666 if (content.element.children.length !== 1) { 5667 content.element.innerHTML = '<p style="color:red">Fehler in Slide, siehe Logs in Browserkonsole</p>'; 5668 } 5669 content.element.children[0].classList.add(PHOTOSWIPE_CONTENT_CLASSNAME, PHOTOSWIPE_CONTENT_CLASSNAME + '--html'); 5670 5671 // Falls bekannte Video-Iframes vorhanden, Events ergänzen 5672 function pauseVideoFrame(iframe) { 5673 if (!iframe.contentWindow) { 5674 return; 5675 } 5676 if (iframe.src.includes('vimeo')) { 5677 iframe.contentWindow.postMessage('{"method":"pause"}', '*'); 5678 } 5679 if (iframe.src.includes('youtube')) { 5680 iframe.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*'); 5681 } 5682 } 5683 5684 const iframeList = content.element.getElementsByTagName("iframe"); 5685 for (const iframe of iframeList) { 5686 if (!iframe.hasAttribute('src') && iframe.hasAttribute('data-src') && gw_isFunctionalAccepted()) { 5687 iframe.setAttribute('src', iframe.getAttribute('data-src')); 5688 } 5689 iframe.setAttribute('allow', 'autoplay'); 5690 lightbox.on('change', () => pauseVideoFrame(iframe)); 5691 lightbox.on('close', () => pauseVideoFrame(iframe)); 5692 } 5693 } 5694 }); 5695 5696 // Inhaltstyp "video" (für Videos aus Dateiliste) 5697 5698 // "data-url"-Attribut für Videos initialisieren 5699 lightbox.addFilter('itemData', (itemData, index) => { 5700 const url = itemData.element.href; 5701 if (url) { 5702 itemData.url = url; 5703 } 5704 return itemData; 5705 }); 5706 5707 // Inhaltselement initialisieren 5708 lightbox.on('contentLoad', (e) => { 5709 const {content} = e; 5710 if (content.type === 'video') { 5711 e.preventDefault(); 5712 5713 content.element = document.createElement('div'); 5714 content.element.classList.add(PHOTOSWIPE_CONTAINER_CLASSNAME, PHOTOSWIPE_CONTAINER_CLASSNAME + '--video'); 5715 5716 const video = document.createElement('video'); 5717 video.classList.add(PHOTOSWIPE_CONTENT_CLASSNAME, PHOTOSWIPE_CONTENT_CLASSNAME + '--video'); 5718 video.src = content.data.url; 5719 5720 const playButton = document.createElement('button'); 5721 playButton.classList.add(PHOTOSWIPE_CONTAINER_CLASSNAME + '__playbutton', 'sl-icon-default', 'sl-icon-default-play'); 5722 5723 // Video-Events 5724 playButton.addEventListener('click', () => { 5725 if (video.paused) { 5726 video.play(); 5727 } else { 5728 video.pause(); 5729 } 5730 }); 5731 video.addEventListener('play', () => playButton.style.opacity = '0'); 5732 video.addEventListener('pause', () => playButton.style.opacity = '1'); 5733 5734 lightbox.on('change', () => video.pause()); 5735 lightbox.on('close', () => video.pause()); 5736 5737 content.element.appendChild(video); 5738 content.element.appendChild(playButton); 5739 } 5740 }); 5741 5742 lightbox.init(); 5743}); 5744 5745// GW Tabindex 5746// -------------------------------------------- 5747jQuery(document).ready(function ($) { 5748 $(document).on('keydown', '[data-gw-tabindex-prev],[data-gw-tabindex-next]', function(event) { 5749 if (event.key !== "Tab") { 5750 return; 5751 } 5752 const prevTabElement = $(event.target).data('gw-tabindex-prev'); 5753 const nextTabElement = $(event.target).data('gw-tabindex-next'); 5754 if (prevTabElement && event.shiftKey === true) { 5755 event.preventDefault(); 5756 $(`[data-gw-tabindex-target="${prevTabElement}"]`).focus(); 5757 } 5758 if (nextTabElement && event.shiftKey === false) { 5759 event.preventDefault(); 5760 $(`[data-gw-tabindex-target="${nextTabElement}"]`).focus(); 5761 } 5762 }); 5763}); 5764 5765jQuery(document).ready(function ($) { 5766 gw_toggleCookieNotice(false); 5767 gw_toggleFunctionalContent(); 5768}); 5769 5770function gw_toggleCookieNotice(force) { 5771 const showButton = jQuery('.js-gwcookie-notice-show'); 5772 const cookieNotice = $('.js-cookie-notice'); 5773 const cookieContainer = $('.js-cookie-container');
5774 const cookieSettings = $('.js-cookie-settings'); 5775 showButton.one('click', function (e) { 5776 e.preventDefault(); 5777 gw_emptyCookieNoticeValueList(); 5778 gw_toggleCookieNotice(true); 5779 }); 5780 if (gw_hasCookieNoticeValueList() && !force) { // cookie schon akzeptiert 5781 cookieNotice.removeClass('c-cookie-notice--is-active'); 5782 cookieNotice.attr('aria-modal', 'false'); 5783 showButton.show(); 5784 } else { //cookie noch nicht akzeptiert 5785 showButton.hide(); 5786 cookieNotice.addClass('c-cookie-notice--is-active'); 5787 cookieNotice.attr('aria-modal', 'true'); 5788 cookieContainer.addClass('c-cookie-notice__container--is-active'); 5789 cookieContainer.find('button').first().trigger('focus'); 5790 5791 $('.js-gwcookie-notice-accept').on('click', function (e) { 5792 e.preventDefault(); 5793 gw_pushCookieNoticeValue(); 5794 if (typeof gw_cookieNoticeCookieValueTracking !== "undefined") { 5795 gw_pushCookieNoticeValue(gw_cookieNoticeCookieValueTracking); 5796 } 5797 if (typeof gw_cookieNoticeCookieValueFunctional !== "undefined") { 5798 gw_pushCookieNoticeValue(gw_cookieNoticeCookieValueFunctional); 5799 } 5800 5801 cookieNotice.removeClass('c-cookie-notice--is-active'); 5802 cookieNotice.attr('aria-modal', 'false'); 5803 cookieContainer.removeClass('c-cookie-notice__container--is-active'); 5804 5805 showButton.show(); 5806 location.reload(); 5807 }); 5808 5809 $('.js-gwcookie-notice-settings').on('click', function (e) { 5810 e.preventDefault(); 5811 cookieContainer.removeClass('c-cookie-notice__container--is-active'); 5812 cookieSettings.addClass('c-cookie-settings--is-active'); 5813 cookieSettings.find('button').first().trigger('focus'); 5814 }); 5815 $('.js-gwcookie-notice-save-settings').on('click', function (e) { 5816 e.preventDefault(); 5817 gw_pushCookieNoticeValue(); 5818 if ($('.js-gwcookie-notice-settings-option[data-settings-option="tracking"]').prop('checked') === true) { 5819 gw_pushCookieNoticeValue(gw_cookieNoticeCookieValueTracking); 5820 } 5821 if ($('.js-gwcookie-notice-settings-option[data-settings-option="functional"]').prop('checked') === true) { 5822 gw_pushCookieNoticeValue(gw_cookieNoticeCookieValueFunctional); 5823 } 5824 5825 cookieNotice.removeClass('c-cookie-notice--is-active'); 5826 cookieNotice.attr('aria-modal', 'false'); 5827 cookieContainer.removeClass('c-cookie-notice__container--is-active'); 5828 5829 showButton.show(); 5830 location.reload(); 5831 }); 5832 $('.js-gwcookie-notice-deny-all').on('click', function (e) { 5833 e.preventDefault(); 5834 gw_pushCookieNoticeValue(); 5835 5836 cookieNotice.removeClass('c-cookie-notice--is-active'); 5837 cookieNotice.attr('aria-modal', 'false'); 5838 cookieContainer.removeClass('c-cookie-notice__container--is-active'); 5839 5840 showButton.show(); 5841 location.reload(); 5842 }); 5843 5844 } 5845 5846} 5847 5848function gw_toggleFunctionalContent() { 5849 const iframeList = $('iframe[data-src]'); 5850 if (!gw_isFunctionalAccepted()) { 5851 iframeList.each(function () { 5852 const iframeElement = $(this); 5853 iframeElement.addClass('d-none'); 5854 const $cookieConsent = $('.js-cookie-consent--hidden') 5855 .clone() 5856 .appendTo(iframeElement.parent()) 5857 .removeClass('js-cookie-consent--hidden') 5858 .show() 5859 ; 5860 if (iframeElement.parent().hasClass('embed-responsive-16by9')) { 5861 $cookieConsent.addClass('c-cookie-consent--embed-responsive-16by9'); 5862 } 5863 }); 5864 const iframeMoreInfoButton = $('.js-cookie-consent--toggle'); 5865 iframeMoreInfoButton.click(function (event) { 5866 event.preventDefault(); 5867 gw_emptyCookieNoticeValueList(); 5868 gw_toggleCookieNotice(true); 5869 }); 5870 gw_functionalCookieConsentEventListener(); 5871 return; 5872 } 5873 iframeList.each(function () { 5874 const iframeElement = $(this); 5875 iframeElement.attr('src', iframeElement.attr('data-src')); 5876 }); 5877} 5878 5879function gw_functionalCookieConsentEventListener() { 5880 $('.js-cookie--marker-trigger').on('click', function () { 5881 gw_pushCookieNoticeValue(gw_cookieNoticeCookieValueFunctional); 5882 location.reload(); 5883 }); 5884} 5885 5886function gw_isInCookieNoticeValueList(value) { 5887 const cookieNoticeValueList = gw_getCookieNoticeValueList(); 5888 return cookieNoticeValueList.indexOf(value) !== -1; 5889} 5890 5891function gw_pushCookieNoticeValue(value) { 5892 const cookieNoticeValueList = gw_getCookieNoticeValueList(); 5893 if (value) { 5894 cookieNoticeValueList.push(value); 5895 } 5896 gw_setCookieNoticeValueList(cookieNoticeValueList); 5897} 5898 5899function gw_setCookieNoticeValueList(cookieNoticeValueList) { 5900 if (!Array.isArray(cookieNoticeValueList)) { 5901 throw new Error('GW Cookie Notice: Array erwartet, "' + typeof cookieNoticeValueList + '" übergeben'); 5902 } 5903 Gw.Cookies.setItem('gw-cookie-notice', JSON.stringify(cookieNoticeValueList), Infinity, '/', '.' + Gw.Cookies.topHost); 5904} 5905 5906function gw_getCookieNoticeValueList() { 5907 const savedValue = Gw.Cookies.getItem('gw-cookie-notice'); 5908 if (savedValue === null || savedValue === '1') { 5909 return [gw_cookieNoticeCookieValueDefault]; 5910 } 5911 const cookieNoticeValueList = JSON.parse(savedValue); 5912 if (!Array.isArray(cookieNoticeValueList)) { 5913 return [gw_cookieNoticeCookieValueDefault]; 5914 } 5915 return cookieNoticeValueList; 5916} 5917 5918function gw_hasCookieNoticeValueList() { 5919 return Gw.Cookies.hasItem('gw-cookie-notice'); 5920} 5921 5922function gw_emptyCookieNoticeValueList() { 5923 Gw.Cookies.removeItem('gw-cookie-notice', '/', '.' + Gw.Cookies.topHost); 5924} 5925 5926function gw_isTrackingAccepted() { 5927 return gw_isInCookieNoticeValueList('tracking'); 5928} 5929 5930function gw_isFunctionalAccepted() { 5931 return gw_isInCookieNoticeValueList('functional'); 5932}
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.