vendor: 11,336 bytes, lines 1-3
1 2/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ 3!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g.apply([],a)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,k="sizzle"+1*new Date,m=n.document,S=0,r=0,p=ue(),x=ue(),N=ue(),A=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",$=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",F=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}
vendor: 5,415 bytes, line 3
3),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[S,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[S,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[k]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[k]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}
vendor: 12,847 bytes, line 3
3),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[S,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===S&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[k]&&(v=Ce(v)),y&&!y[k]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[k]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=N[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[k]?i.push(a):o.push(a);(a=N(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=S+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument===C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(S=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(S=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=k.split("").sort(D).join("")===k,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;var T=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=k.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&N.test(e)?k(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!N.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return"undefined"!=typeof e.contentDocument?e.contentDocument:(A(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),H.test(r)&&n.reverse()),this.pushStack(n)}});var R=/[^\x20\t\r\n\f]+/g;function M(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},k.each(e.match(R)||[],function(e,t){n[t]=!0}),n):k.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){k.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return k.each(arguments,function(e,t){var n;while(-1<(n=k.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<k.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self
3-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,M,s),l(u,o,I,s)):(u++,t.call(e,l(u,o,M,s),l(u,o,I,s),l(u,o,M,o.notifyWith))):(a!==M&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),C.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:M,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:M)),o[2][3].add(l(0,e,m(n)?n:I))}).promise()},promise:function(e){return null!=e?k.extend(e,a):a}},s={};return k.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=k.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(W(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)W(i[t],a(t),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&$.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){C.setTimeout(function(){throw e})};var F=k.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),k.ready()}k.fn.ready=function(e){return F.then(e)["catch"](function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||F.resolveWith(E,[k])}}),k.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var _=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,U=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(U,X)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(R)||[]).length;while(n--)delete r[t[n]]}(void 0===t||k.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Y,J=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:K.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(
vendor: 4,196 bytes, line 3
3o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){J.set(this,n)}):_(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=J.get(o,n))?t:void 0!==(t=ee(o,n))?t:void 0;this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=k.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Q.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],ie=E.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},ae={composed:!0};ie.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var se=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")},ue=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};function le(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=e.nodeType&&(k.cssNumber[t]||"px"!==l&&+u)&&ne.exec(k.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ce={};function fe(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Q.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&se(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ce[s])||(o=a.body.appendChild(a.createElement(s)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ce[s]=u)))):"none"!==n&&(l[c]="none",Q.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){se(this)?k(this).show():k(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var me,xe,be=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;
vendor: 7,737 bytes, line 3
3d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(be.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;k.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=oe(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}me=E.createDocumentFragment().appendChild(E.createElement("div")),(xe=E.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),me.appendChild(xe),y.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){a=k.event.handlers.call(this,s,l),t=0;while((i=a[t++])&&!s.isPropagationStopped()){s.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!s.isImmediatePropagationStopped())s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&De(t,"click",ke),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Q.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Te.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ce.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},function(e,t){k.event.special[e]={setup:function(){return De(this,e,Ne),!1},trigger:function(){return De(this,e),!0},delegateType:t}}
vendor: 4,896 bytes, line 3
3),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Se),this.each(function(){k.event.remove(this,e,n,t)})}});var je=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/<script|<style|<link/i,Le=/checked\s*(?:[^=]|=\s*.checked.)/i,He=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=k.extend({},s),J.set(t,u))}}function Ie(n,r,i,o){r=g.apply([],r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Le.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Ie(t,r,i,o)});if(f&&(t=(e=we(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=k.map(ve(e,"script"),Pe)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),s&&k.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,Re),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Q.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&!u.noModule&&k._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):b(u.textContent.replace(He,""),u,l))}return n}function We(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ve(r)),r.parentNode&&(n&&oe(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(je,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Me(o[r],a[r]);else Me(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return _(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!qe.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Ie(this,arguments,function(e){var t=this.parentNode;
vendor: 7,529 bytes, line 3
3k.inArray(this,n)<0&&(k.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var $e=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Be=new RegExp(re.join("|"),"i");function _e(e,t,n){var r,i,o,a,s=e.style;return(n=n||Fe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||oe(e)||(a=k.style(e,t)),!y.pixelBoxStyles()&&$e.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){s.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(s).appendChild(u);var e=C.getComputedStyle(u);n="1%"!==e.top,a=12===t(e.marginLeft),u.style.right="60%",o=36===t(e.right),r=36===t(e.width),u.style.position="absolute",i=12===t(u.offsetWidth/3),ie.removeChild(s),u=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s=E.createElement("div"),u=E.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===u.style.backgroundClip,k.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),i}}))}();var Ue=["Webkit","Moz","ms"],Xe=E.createElement("div").style,Ve={};function Ge(e){var t=k.cssProps[e]||Ve[e];return t||(e in Xe?e:Ve[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Ue.length;while(n--)if((e=Ue[n]+t)in Xe)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Qe=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:"0",fontWeight:"400"};function Ze(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function et(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=k.css(e,n+re[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+re[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+re[a]+"Width",!0,i))):(u+=k.css(e,"padding"+re[a],!0,i),"padding"!==n?u+=k.css(e,"border"+re[a]+"Width",!0,i):s+=k.css(e,"border"+re[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function tt(e,t,n){var r=Fe(e),i=(!y.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,a=_e(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if($e.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+et(e,t,n||(i?"border":"content"),o,r,a)+"px"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=_e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Qe.test(t),l=e.style;if(u||(t=Ge(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Qe.test(t)||(t=Ge(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=_e(e,t,r)),"normal"===i&&t in Ke&&(i=Ke[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,u){k.cssHooks[u]={get:function(e,t,n){if(t)return!Ye.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,u,n):ue(e,Je,function(){return tt(e,u,n)})},set:function(e,t,n){var r,i=Fe(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===k.css(e,"boxSizing",!1,i),s=n?et(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-et(e,u,"border",!1,i)-.5)),s&&(r=ne.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=k.css(e,u)),Ze(0,t,s)}}}),k.cssHooks.marginLeft=ze(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(_e(e,"marginLeft"))||e.getBoundingClientRect().left-ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+re[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=Ze)}),k.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),((k.Tween=nt).prototype={constructor:nt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}}).init.prototype=nt.prototype,(nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=nt.prototype.init,k.fx.step={};var rt,it,ot,at,st=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function lt(){it&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(lt):C.setTimeout(lt,k.fx.interval),k.fx.tick())}function ct(){return C.setTimeout(function(){rt=void 0}),rt=Date.now()}function ft(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;
vendor: 4,566 bytes, line 3
3return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function dt(o,e,t){var n,a,r=0,i=dt.prefilters.length,s=k.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=rt||ct(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:rt||ct(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=dt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,pt,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(R);for(var n,r=0,i=e.length;r<i;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&se(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],st.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=k.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&fe([e],!0),p.done(function(){for(r in g||fe([e]),Q.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=pt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(se).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=k.isEmptyObject(t),o=k.speed(e,n,r),a=function(){var e=dt(this,k.extend({},t),o);(i||Q.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Q.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&ut.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1)
vendor: 4,467 bytes, line 3
3);!e&&o||k.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Q.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(ft(r,!0),e,t,n)}}),k.each({slideDown:ft("show"),slideUp:ft("hide"),slideToggle:ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(rt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),rt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){it||(it=!0,lt())},k.fx.stop=function(){it=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ot=E.createElement("input"),at=E.createElement("select").appendChild(E.createElement("option")),ot.type="checkbox",y.checkOn=""!==ot.value,y.optSelected=at.selected,(ot=E.createElement("input")).value="t",ot.type="radio",y.radioValue="t"===ot.value;var ht,gt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return _(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(R);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var a=gt[t]||k.find.attr;gt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=gt[o],gt[o]=r,r=null!=a(e,t,n)?o:null,gt[o]=i),r}});var vt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function mt(e){return(e.match(R)||[]).join(" ")}function xt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(R)||[]}k.fn.extend({prop:function(e,t){return _(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):vt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).addClass(t.call(this,e,xt(this)))});if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&" "+mt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).removeClass(t.call(this,e,xt(this)))});if(!arguments.length)return this.attr("class","");
vendor: 6,487 bytes, line 3
3if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&" "+mt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,xt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=k(this),r=bt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=xt(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+mt(xt(n))+" ").indexOf(t))return!0;return!1}});var wt=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(wt,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:mt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=k(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=k.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},y.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var Tt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(d+k.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[k.expando]?e:new k.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),c=k.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,Tt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Q.get(o,"events")||{})[e.type]&&Q.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&G(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!G(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),k.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Ct),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Ct),k.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),y.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){k.event.simulate(r,e.target,k.event.fix(e))};k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Q.access(e,r);t||e.addEventListener(n,i,!0),Q.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Q.access(e,r)-1;t?Q.access(e,r,t):(e.removeEventListener(n,i,!0),Q.remove(e,r))}}});var Et=C.location,kt=Date.now(),St=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Nt=/\[\]$/,At=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function qt(n,e,r,i){var t;if(Array.isArray(e))k.each(e,function(e,t){r||Nt.test(n)?i(n,t):qt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)qt(n+"["+t+"]",e[t],r,i)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){i(this.name,this.value)});else for(n in e)qt(n,e[n],t,i);return r.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&jt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(At,"\r\n")}}):{name:t.name,value:n.replace(At,"\r\n")}}).get()}});var Lt=/%20/g,Ht=/#.*$/,Ot=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:GET|HEAD)$/,Mt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Ft=E.createElement("a");function Bt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(R)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function _t(t,i,o,a){var s={},u=t===Wt;function l(e){var r;return s[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}
vendor: 15,883 bytes, lines 3-30
3function zt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Ft.href=Et.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,k.ajaxSettings),t):zt(k.ajaxSettings,e)},ajaxPrefilter:Bt(It),ajaxTransport:Bt(Wt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?k(y):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Pt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace(Mt,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(R)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Ft.protocol+"//"+Ft.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),_t(It,v,t,T),h)return T;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Rt.test(v.type),f=v.url.replace(Ht,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Lt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(St.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Ot,"$1"),o=(St.test(f)?"&":"?")+"_="+kt+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&T.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&T.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+$t+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=_t(Wt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--k.active||k.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e,t){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Xt=k.ajaxSettings.xhr();y.cors=!!Xt&&"withCredentials"in Xt,y.ajax=Xt=!!Xt,k.ajaxTransport(function(i){var o,a;if(y.cors||Xt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Ut[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=k("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=mt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=A,k.isFunction=m,k.isWindow=x,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var Qt=C.jQuery,Jt=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=Jt),e&&C.jQuery===k&&(C.jQuery=Qt),k},e||(C.jQuery=C.$=k),k}); 4 5/*! 6 Modaal - accessible modals - v0.4.4 7 by Humaan, for all humans. 8 http://humaan.com 9 */ 10/** 11 Modaal jQuery Plugin : Accessible Modals 12 13 ==== General Options === 14 type (string) : ajax, inline, image, iframe, confirm. Defaults to 'inline' 15 content_source (stribg) : Accepts a string value for your target element, such as '#my-content'. This allows for when trigger element is 16 an `<a href="#">` link. Not to be confused with the already existing `source` event. 17 animation (string) : Fade, expand, down, up. Defaults to 'fade' 18 after_callback_delay (integer) : Specify a delay value for the after open callbacks. This is necessary because with the bundled animations 19 have a set duration in the bundled CSS. Specify a delay of the same amount as the animation duration in so 20 more accurately fire the after open/close callbacks. Defaults 350, does not apply if animation is 'none', 21 after open callbacks are dispatched immediately 22 23 is_locked (boolean) : Set this to true to disable closing the modal via keypress or clicking the background. Beware that if 24 type != 'confirm' there will be no interface to dismiss the modal if is_locked = true, you'd have to 25 programmatically arrange to dismiss the modal. Confirm modals are always locked regardless of this option 26 Defaults to false 27 28 hide_close (boolean) : Set this to true to hide the close modal button. Key press and overlay click will still close the modal. 29 This method is best used when you want to put a custom close button inside the modal container space. 30
31 background (string) : Background overlay style. Defaults to '#000' 32 overlay_opacity (float) : Background overlay transparency. Defaults to 0.8 33 overlay_close (boolean) : Set this to false if you want to disable click to close on overlay background. 34 35 accessible_title (string) : Accessible title. Default 'Dialog Window' 36 start_open (boolean) : Set this to true to launch the Modaal window immediately on page open 37 fullscreen (boolean) : Set this to true to make the modaal fill the entire screen, false will default to own width/height attributes. 38 custom_class (string) : Fill in this string with a custom class that will be applied to the outer most modal wrapper. 39 40 width (integer) : Desired width of the modal. Required for iframe type. Defaults to undefined //TODO 41 height (integer) : Desired height of the modal. Required for iframe type. Defaults to undefined //TODO 42 43 background_scroll (boolean) : Set this to true to enable the page to scroll behind the open modal. 44 45 should_open (boolean|function) : Boolean or closure that returns a boolean to determine whether to open the modal or not. 46 47 close_text : String for close button text. Available for localisation and alternative languages to be used. 48 close_aria_label : String for close button aria-label attribute (value that screen readers will read out). Available for localisation and alternative languages to be used. 49 50 === Events === 51 before_open (function) : Callback function executed before modal is opened 52 after_open (function) : Callback function executed after modal is opened 53 before_close (function) : Callback function executed before modal is closed 54 after_close (function) : Callback function executed after modal is closed 55 source (function(element, src)) : Callback function executed on the default source, it is intended to transform the 56 source (href in an AJAX modal or iframe). The function passes in the triggering element 57 as well as the default source depending of the modal type. The default output of the 58 function is an untransformed default source. 59 60 61 === Confirm Options & Events === 62 confirm_button_text (string) : Text on the confirm button. Defaults to 'Confirm' 63 confirm_cancel_button_text (string) : Text on the confirm modal cancel button. Defaults to 'Cancel' 64 confirm_title (string) : Title for confirm modal. Default 'Confirm Title' 65 confirm_content (string) : HTML content for confirm message 66 confirm_callback (function) : Callback function for when the confirm button is pressed as opposed to cancel 67 confirm_cancel_callback (function) : Callback function for when the cancel button is pressed 68 69 70 === Gallery Options & Events === 71 gallery_active_class (string) : Active class applied to the currently active image or image slide in a gallery 'gallery_active_item' 72 outer_controls (boolean) : Set to true to put the next/prev controls outside the Modaal wrapper, at the edges of the browser window. 73 before_image_change (function) : Callback function executed before the image slide changes in a gallery modal. Default function( current_item, incoming_item ) 74 after_image_change (function) : Callback function executed after the image slide changes in a gallery modal. Default function ( current_item ) 75 76 77 === AJAX Options & Events === 78 loading_content (string) : HTML content for loading message. Default 'Loading …' 79 loading_class (string) : Class name to be applied while content is loaded via AJAX. Default 'is_loading' 80 ajax_error_class (string) : Class name to be applied when content has failed to load. Default is 'modaal-error' 81 ajax_success (function) : Callback for when AJAX content is loaded in 82 83 84 === SOCIAL CONTENT === 85 instagram_id (string) : Unique photo ID for an Instagram photo. 86 87*/ 88( function( $ ) { 89 90 var modaal_loading_spinner = '<div class="modaal-loading-spinner"><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div><div><div></div></div></div>' 91 92 var Modaal = { 93 init : function(options, elem) { 94 var self = this; 95 96 self.dom = $('body'); 97 98 self.$elem = $(elem); 99 self.options = $.extend({}, $.fn.modaal.options, self.$elem.data(), options); 100 self.xhr = null; 101 102 // set up the scope 103 self.scope = { 104 is_open: false, 105 id: 'modaal_' + ( new Date().getTime() ) + ( Math.random().toString(16).substring(2) ), 106 source: self.options.content_source ? self.options.content_source : self.$elem.attr('href') 107 }; 108 109 // add scope attribute to trigger element 110 self.$elem.attr('data-modaal-scope', self.scope.id); 111 112 // private options 113 self.private_options = { 114 active_class: 'is_active' 115 }; 116 117 self.lastFocus = null; 118 119 // if is_locked 120 if ( self.options.is_locked || self.options.type == 'confirm' || self.options.hide_close ) { 121 self.scope.close_btn = ''; 122 } else { 123 self.scope.close_btn = '<button type="button" class="modaal-close" id="modaal-close" aria-label="' + self.options.close_aria_label + '"><span>' + self.options.close_text + '</span></button>'; 124 } 125 126 // reset animation_speed 127 if (self.options.animation === 'none' ){ 128 self.options.animation_speed = 0; 129 self.options.after_callback_delay = 0; 130 } 131 132 // On click to open modal
133 $(elem).on('click.Modaal', function(e) { 134 e.preventDefault(); 135 self.create_modaal(self, e); 136 }); 137 138 // Define next/prev buttons 139 if (self.options.outer_controls === true) { 140 var mod_class = 'outer'; 141 } else { 142 var mod_class = 'inner'; 143 } 144 self.scope.prev_btn = '<button type="button" class="modaal-gallery-control modaal-gallery-prev modaal-gallery-prev-' + mod_class + '" id="modaal-gallery-prev" aria-label="Voriges Bild (linke Pfeiltaste benutzen)"><span>Voriges Bild</span></button>'; 145 self.scope.next_btn = '<button type="button" class="modaal-gallery-control modaal-gallery-next modaal-gallery-next-' + mod_class + '" id="modaal-gallery-next" aria-label="Nächstes Bild (rechte Pfeiltaste benutzen)"><span>Nächstes Bild
vendor: 40,305 bytes, lines 145-1394
145</span></button>'; 146 147 // Check for start_open 148 if (self.options.start_open === true ){ 149 self.create_modaal( self ); 150 } 151 }, 152 153 // Initial create to determine which content type it requires 154 // ---------------------------------------------------------------- 155 create_modaal : function(self, e) { 156 var self = this; 157 var source; 158 159 // Save last active state before modal 160 self.lastFocus = self.$elem; 161 162 if ( self.options.should_open === false || ( typeof self.options.should_open === 'function' && self.options.should_open() === false ) ) { 163 return; 164 } 165 166 // CB: before_open 167 self.options.before_open.call(self, e); 168 169 switch (self.options.type) { 170 case 'inline': 171 self.create_basic(); 172 break; 173 174 case 'ajax': 175 source = self.options.source( self.$elem, self.scope.source ); 176 self.fetch_ajax( source ); 177 break; 178 179 case 'confirm': 180 self.options.is_locked = true; 181 self.create_confirm(); 182 break; 183 184 case 'image': 185 self.create_image(); 186 break; 187 188 case 'iframe': 189 source = self.options.source( self.$elem, self.scope.source ); 190 self.create_iframe( source ); 191 break; 192 193 case 'video': 194 self.create_video(self.scope.source); 195 break; 196 197 case 'instagram': 198 self.create_instagram(); 199 break; 200 } 201 202 // call events to be watched (click, tab, keyup, keydown etc.) 203 self.watch_events(); 204 }, 205 206 // Watching Modal 207 // ---------------------------------------------------------------- 208 watch_events : function() { 209 var self = this; 210 211 self.dom.off('click.Modaal keyup.Modaal keydown.Modaal'); 212 213 // Body keydown 214 self.dom.on('keydown.Modaal', function(e) { 215 var key = e.keyCode; 216 var target = e.target; 217 218 // look for tab change and reset focus to modal window 219 // done in keydown so the check fires repeatedly when you hold the tab key down 220 if (key == 9 && self.scope.is_open) { 221 if (!$.contains(document.getElementById(self.scope.id), target) ) { 222 $('#' + self.scope.id).find('*[tabindex="0"]').focus(); 223 } 224 } 225 }); 226 227 // Body keyup 228 self.dom.on('keyup.Modaal', function(e) { 229 var key = e.keyCode; 230 var target = e.target; 231 232 if ( (e.shiftKey && e.keyCode == 9) && self.scope.is_open) { 233 // Watch for shift + tab key press. if open shift focus to close button. 234 if (!$.contains(document.getElementById(self.scope.id), target) ) { 235 $('#' + self.scope.id).find('.modaal-close').focus(); 236 } 237 } 238 239 if ( !self.options.is_locked ){ 240 // On escape key press close modal 241 if (key == 27 && self.scope.is_open ) { 242 if ( $(document.activeElement).is('input:not(:checkbox):not(:radio)') ) { 243 return false; 244 } 245 246 self.modaal_close(); 247 return; 248 } 249 } 250 251 // is gallery open and images length is > 1 252 if ( self.options.type == 'image' ) { 253 // arrow left for back 254 if (key == 37 && self.scope.is_open && (!$('#' + self.scope.id + ' .modaal-gallery-prev').hasClass('is_hidden')) ) { 255 self.gallery_update('prev'); 256 } 257 // arrow right for next 258 if (key == 39 && self.scope.is_open && (!$('#' + self.scope.id + ' .modaal-gallery-next').hasClass('is_hidden')) ) { 259 self.gallery_update('next'); 260 } 261 return; 262 } 263 }); 264 265 // Body click/touch 266 self.dom.on('click.Modaal', function(e) { 267 var trigger = $(e.target); 268 269 // General Controls: If it's not locked allow greedy close 270 if ( !self.options.is_locked ){ 271 if ( (self.options.overlay_close && trigger.is('.modaal-inner-wrapper')) || trigger.is('.modaal-close') || trigger.closest('.modaal-close').length ) { 272 self.modaal_close(); 273 return; 274 } 275 } 276 277 //Confirm Controls 278 if ( trigger.is('.modaal-confirm-btn' ) ){ 279 // if 'OK' button is clicked, run confirm_callback() 280 if ( trigger.is('.modaal-ok') ) { 281 self.options.confirm_callback.call(self, self.lastFocus); 282 } 283 284 if ( trigger.is('.modaal-cancel') ) { 285 self.options.confirm_cancel_callback.call(self, self.lastFocus); 286 } 287 self.modaal_close(); 288 return; 289 } 290 291 // Gallery Controls 292 if ( trigger.is( '.modaal-gallery-control' ) ){ 293 // it not active, don't do nuthin! 294 if ( trigger.hasClass('is_hidden') ) { 295 return; 296 } 297 298 // trigger previous 299 if ( trigger.is('.modaal-gallery-prev') ) { 300 self.gallery_update('prev'); 301 } 302 // trigger next 303 if ( trigger.is('.modaal-gallery-next') ) { 304 self.gallery_update('next'); 305 } 306 return; 307 } 308 }); 309 }, 310 311 // Append markup into DOM 312 build_modal : function(content) { 313 var self = this; 314 315 // if is instagram 316 var igClass = ''; 317 if ( self.options.type == 'instagram' ) { 318 igClass = ' modaal-instagram'; 319 } 320 321 var wrap_class = (self.options.type == 'video') ? 'modaal-video-wrap' : 'modaal-content'; 322 323 /* 324 modaal-start_none : fully hidden via display:none; 325 modaal-start_fade : hidden via opacity:0 326 modaal-start_slidedown : ... 327 328 */ 329 var animation_class; 330 switch ( self.options.animation ) { 331 case 'fade' : 332 animation_class = ' modaal-start_fade'; 333 break; 334 case 'slide-down' : 335 animation_class = ' modaal-start_slidedown'; 336 break; 337 default : 338 animation_class = ' modaal-start_none' 339 } 340 341 // fullscreen check 342 var fullscreen_class = ''; 343 if ( self.options.fullscreen ) { 344 fullscreen_class = ' modaal-fullscreen'; 345 } 346 347 // custom class check 348 if ( self.options.custom_class !== '' || typeof(self.options.custom_class) !== 'undefined' ) { 349 self.options.custom_class = ' ' + self.options.custom_class; 350 } 351 352 // if width and heights exists and is typeof number 353 var dimensionsStyle = ''; 354 if ( self.options.width && self.options.height && typeof self.options.width == 'number' && typeof self.options.height == 'number' ) { 355 // if width and height exist, and they are both numbers 356 dimensionsStyle = ' style="max-width:' + self.options.width + 'px;height:' + self.options.height + 'px;overflow:auto;"'; 357 } else if ( self.options.width && typeof self.options.width == 'number' ) { 358 // if only width 359 dimensionsStyle = ' style="max-width:' + self.options.width + 'px;"'; 360 } else if ( self.options.height && typeof self.options.height == 'number' ) { 361 // if only height 362 dimensionsStyle = ' style="height:' + self.options.height + 'px;overflow:auto;"'; 363 } 364 365 // Reset dimensions style (width and height) for certain types 366 if ( self.options.type == 'image' || self.options.type == 'video' || self.options.type == 'instagram' || self.options.fullscreen ) { 367 dimensionsStyle = ''; 368 } 369 370 // if is touch 371 // this is a bug fix for iOS to allow regular click events on div elements. 372 var touchTrigger = ''; 373 if ( self.is_touch() ) { 374 touchTrigger = ' style="cursor:pointer;"' 375 } 376 377 var build_markup = '<div class="modaal-wrapper modaal-' + self.options.type + animation_class + igClass + fullscreen_class + self.options.custom_class + '" id="' + self.scope.id + '"><div class="modaal-outer-wrapper"><div class="modaal-inner-wrapper"' + touchTrigger + '>'; 378 379 // hide if video 380 if (self.options.type != 'video') { 381 build_markup += '<div class="modaal-container"' + dimensionsStyle + '>'; 382 } 383 384 // add the guts of the content 385 build_markup += '<div class="' + wrap_class + ' modaal-focus" aria-hidden="false" aria-label="' + self.options.accessible_title + ' - ' + self.options.close_aria_label + '" role="dialog">'; 386 387 // If it's inline type, we want to clone content instead of dropping it straight in 388 if (self.options.type == 'inline') { 389 build_markup += '<div class="modaal-content-container" role="document"></div>'; 390 } else { 391 // Drop in the content if it's not inline 392 build_markup += content; 393 } 394 395 // close wrap_class 396 build_markup += '</div>' + self.scope.close_btn; 397 398 // hide if video 399 if (self.options.type != 'video') { 400 build_markup += '</div>'; 401 } 402 403 // close off modaal-inner-wrapper 404 build_markup += '</div>'; 405 406 // If type is image AND outer_controls is true: add gallery next and previous controls. 407 if (self.options.type == 'image' && self.options.outer_controls === true) { 408 build_markup += self.scope.prev_btn + self.scope.next_btn; 409 } 410 411 // close off modaal-wrapper 412 build_markup += '</div></div>'; 413 414 // append ajax modal markup to dom 415 if ($('#' + self.scope.id + '_overlay').length < 1) { 416 self.dom.append(build_markup); 417 } 418 419 // if inline, clone content into space 420 if (self.options.type == 'inline') { 421 content.appendTo('#' + self.scope.id + ' .modaal-content-container'); 422 } 423 424 // Trigger overlay show (which triggers modal show) 425 self.modaal_overlay('show'); 426 }, 427 428 // Create Basic Inline Modal 429 // ---------------------------------------------------------------- 430 create_basic : function() { 431 var self = this; 432 var target = $(self.scope.source); 433 var content = ''; 434 435 if (target.length) { 436 content = target.contents().detach(); 437 target.empty(); 438 } else { 439 content = 'Content could not be loaded. Please check the source and try again.'; 440 } 441 442 // now push content into markup 443 self.build_modal(content); 444 }, 445 446 // Create Instagram Modal 447 // ---------------------------------------------------------------- 448 create_instagram : function() { 449 var self = this; 450 var id = self.options.instagram_id; 451 var content = ''; 452 453 var error_msg = 'Instagram photo couldn\'t be loaded, please check the embed code and try again.'; 454 455 self.build_modal('<div class="modaal-content-container' + ( self.options.loading_class != '' ? ' ' + self.options.loading_class : '' ) + '">' + self.options.loading_content + '</div>' ); 456 457 // ID exists, is not empty null or undefined. 458 if ( id != '' && id !== null && id !== undefined ) { 459 // set up oembed url 460 var ig_url = 'https://api.instagram.com/oembed?url=http://instagr.am/p/' + id + '/'; 461 462 $.ajax({ 463 url: ig_url, 464 dataType: "jsonp", 465 cache: false, 466 success: function (data) { 467 468 // Create temp dom element from which we'll clone into the modaal instance. This is required to bypass the unusual small thumb issue instagram oembed was serving up 469 self.dom.append('<div id="temp-ig" style="width:0;height:0;overflow:hidden;">' + data.html + '</div>'); 470 471 // Check if it has loaded once before. 472 // This is to stop the Embeds.process from throwing and error the first time it's being loaded. 473 // private_options are individual to a modaal_scope so will not work across multiple scopes when checking if true, only that one item. 474 if ( self.dom.attr('data-igloaded') ) { 475 window.instgrm.Embeds.process(); 476 } else { 477 // first time it's loaded, let's set a new private option to use next time it's opened. 478 self.dom.attr('data-igloaded', 'true'); 479 } 480 481 // now set location for new content 482 // timeout is required as well to bypass the unusual small thumb issue instagram oembed was serving up 483 var target = '#' + self.scope.id + ' .modaal-content-container'; 484 if ( $(target).length > 0) { 485 setTimeout(function() { 486 $('#temp-ig').contents().clone().appendTo( target ); 487 $('#temp-ig').remove(); 488 }, 1000); 489 } 490 491 }, 492 error: function() { 493 content = error_msg; 494 495 // now set location for new content 496 var target = $('#' + self.scope.id + ' .modaal-content-container'); 497 if ( target.length > 0) { 498 target.removeClass( self.options.loading_class ).addClass( self.options.ajax_error_class ); 499 target.html(content); 500 } 501 } 502 }); 503 504 } else { 505 content = error_msg; 506 } 507 508 return false; 509 }, 510 511 // Fetch Ajax Data 512 // ---------------------------------------------------------------- 513 fetch_ajax : function(url) { 514 var self = this; 515 var content = ''; 516 517 // If no accessible title, set it to 'Dialog Window' 518 if ( self.options.accessible_title == null ) { 519 self.options.accessible_title = 'Dialog Window' 520 } 521 522 if ( self.xhr !== null ){ 523 self.xhr.abort(); 524 self.xhr = null; 525 } 526 527 self.build_modal('<div class="modaal-content-container' + ( self.options.loading_class != '' ? ' ' + self.options.loading_class : '' ) + '">' + self.options.loading_content + '</div>' ); 528 529 self.xhr = $.ajax(url, { 530 success: function(data) { 531 // content fetch is successful so push it into markup 532 var target = $('#' + self.scope.id).find('.modaal-content-container'); 533 if ( target.length > 0){ 534 target.removeClass( self.options.loading_class ); 535 target.html( data ); 536 537 self.options.ajax_success.call(self, target); 538 } 539 }, 540 error: function( xhr ) { 541 // There were some errors so return an error message 542 if ( xhr.statusText == 'abort' ){ 543 return; 544 } 545 546 var target = $('#' + self.scope.id + ' .modaal-content-container'); 547 if ( target.length > 0){ 548 target.removeClass( self.options.loading_class ).addClass( self.options.ajax_error_class ); 549 target.html( 'Content could not be loaded. Please check the source and try again.' ); 550 } 551 } 552 }); 553 }, 554 555 // Create Confirm Modal 556 // ---------------------------------------------------------------- 557 create_confirm : function() { 558 var self = this; 559 var content; 560 561 content = '<div class="modaal-content-container">' + 562 '<h1 id="modaal-title">' + self.options.confirm_title + '</h1>' + 563 '<div class="modaal-confirm-content">' + self.options.confirm_content + '</div>' + 564 '<div class="modaal-confirm-wrap">' + 565 '<button type="button" class="modaal-confirm-btn modaal-ok" aria-label="Confirm">' + self.options.confirm_button_text + '</button>' + 566 '<button type="button" class="modaal-confirm-btn modaal-cancel" aria-label="Cancel">' + self.options.confirm_cancel_button_text + '</button>' + 567 '</div>' + 568 '</div>' + 569 '</div>'; 570 571 // now push content into markup 572 self.build_modal(content); 573 }, 574 575 // Create Image/Gallery Modal 576 // ---------------------------------------------------------------- 577 create_image : function() { 578 var self = this; 579 var content; 580 581 var modaal_image_markup = ''; 582 var gallery_total; 583 584 // If has group attribute 585 if ( self.$elem.is('[data-group]') || self.$elem.is('[rel]') ) { 586 587 // find gallery groups 588 var use_group = self.$elem.is('[data-group]'); 589 var gallery_group = use_group ? self.$elem.attr('data-group') : self.$elem.attr('rel'); 590 var gallery_group_items = use_group ? $('[data-group="' + gallery_group + '"]') : $('[rel="' + gallery_group + '"]'); 591 592 // remove any previous active attribute to any in the group 593 gallery_group_items.removeAttr('data-gallery-active', 'is_active'); 594 // add active attribute to the item clicked 595 self.$elem.attr('data-gallery-active', 'is_active'); 596 597 // how many in the grouping are there (-1 to connect with each function starting with 0) 598 gallery_total = gallery_group_items.length - 1; 599 600 // prepare array for gallery data 601 var gallery = []; 602 603 // start preparing markup 604 modaal_image_markup = '<div class="modaal-gallery-item-wrap">'; 605 606 // loop each grouping item and push it into our gallery array 607 gallery_group_items.each(function(i, item) { 608 // setup default content 609 var img_src = ''; 610 var img_alt = ''; 611 var img_description = ''; 612 var img_active = false; 613 var img_src_error = false; 614 615 var data_modaal_desc = item.getAttribute('data-modaal-desc'); 616 var data_item_active = item.getAttribute('data-gallery-active'); 617 618 // if item has inline custom source, use that instead of href. Fall back to href if available. 619 if ( $(item).attr('data-modaal-content-source') ) { 620 img_src = $(item).attr('data-modaal-content-source'); 621 } else if ( $(item).attr('href') ) { 622 img_src = $(item).attr('href'); 623 } else if ( $(item).attr('src') ) { 624 img_src = $(item).attr('src'); 625 } else { 626 img_src = 'trigger requires href or data-modaal-content-source attribute'; 627 img_src_error = true; 628 } 629 630 // Does it have a modaal description 631 if ( data_modaal_desc != '' && data_modaal_desc !== null && data_modaal_desc !== undefined ) { 632 img_alt = data_modaal_desc; 633 img_description = '<div class="modaal-gallery-label"><span class="modaal-accessible-hide">Image ' + (i+1) + ' - </span>' + data_modaal_desc.replace(/</g, "<").replace(/>/g, ">") + '</div>' 634 } else { 635 img_description = '<div class="modaal-gallery-label"><span class="modaal-accessible-hide">Image ' + (i+1) + '</span></div>'; 636 } 637 638 // is it the active item 639 if ( data_item_active ) { 640 img_active = true 641 } 642 643 // set new object for values we want 644 var gallery_item = { 645 'url': img_src, 646 'alt': img_alt, 647 'rawdesc': data_modaal_desc, 648 'desc': img_description, 649 'active': img_active, 650 'src_error': img_src_error 651 }; 652 653 // push object into gallery array 654 gallery.push( gallery_item ); 655 }); 656 657 // now loop through all items in the gallery and build up the markup 658 for (var i = 0; i < gallery.length; i++) { 659 // Set default active class, then check if array item active is true and update string for class 660 var is_active = ''; 661 var aria_label = gallery[i].rawdesc ? 'Image: ' + gallery[i].rawdesc : 'Image ' + i + ' no description'; 662 663 if ( gallery[i].active ) { 664 is_active = ' ' + self.private_options.active_class; 665 } 666 667 // if gallery item has source error, output message rather than undefined image 668 var image_output = gallery[i].src_error ? gallery[i].url : '<img src="' + gallery[i].url + '" alt=" " style="width:100%">'; 669 670 // for each item build up the markup 671 modaal_image_markup += '<div class="modaal-gallery-item gallery-item-' + i + is_active + '" aria-label="' + aria_label + '">' + 672 image_output + gallery[i].desc + 673 '</div>'; 674 } 675 676 // Close off the markup for the gallery 677 modaal_image_markup += '</div>'; 678 679 // Add next and previous buttons if outside 680 if (self.options.outer_controls != true) { 681 modaal_image_markup += self.scope.prev_btn + self.scope.next_btn; 682 } 683 } else { 684 // This is only a single gallery item so let's grab the necessary values 685 686 // define the source, check if content_source option exists, and use that or fall back to href. 687 var this_img_src; 688 var img_src_error = false; 689 if ( self.$elem.attr('data-modaal-content-source') ) { 690 this_img_src = self.$elem.attr('data-modaal-content-source'); 691 } else if ( self.$elem.attr('href') ) { 692 this_img_src = self.$elem.attr('href'); 693 } else if ( self.$elem.attr('src') ) { 694 this_img_src = self.$elem.attr('src'); 695 } else { 696 this_img_src = 'trigger requires href or data-modaal-content-source attribute'; 697 img_src_error = true; 698 } 699 700 var this_img_alt_txt = ''; 701 var this_img_alt = ''; 702 var aria_label = ''; 703 704 if ( self.$elem.attr('data-modaal-desc') ) { 705 aria_label = self.$elem.attr('data-modaal-desc'); 706 this_img_alt_txt = self.$elem.attr('data-modaal-desc'); 707 this_img_alt = '<div class="modaal-gallery-label"><span class="modaal-accessible-hide">Image - </span>' + this_img_alt_txt.replace(/</g, "<").replace(/>/g, ">") + '</div>'; 708 } else { 709 aria_label = "Image with no description"; 710 } 711 712 // if image item has source error, output message rather than undefined image 713 var image_output = img_src_error ? this_img_src : '<img src="' + this_img_src + '" alt=" " style="width:100%">'; 714 715 // build up the html 716 modaal_image_markup = '<div class="modaal-gallery-item is_active" aria-label="' + aria_label + '">' + 717 image_output + this_img_alt + 718 '</div>'; 719 } 720 721 // Update content variable 722 content = modaal_image_markup; 723 724 // now push content into markup 725 self.build_modal(content); 726 727 // setup next & prev buttons 728 if ( $('.modaal-gallery-item.is_active').is('.gallery-item-0') ) { 729 $('.modaal-gallery-prev').hide(); 730 } 731 if ( $('.modaal-gallery-item.is_active').is('.gallery-item-' + gallery_total) ) { 732 $('.modaal-gallery-next').hide(); 733 } 734 }, 735 736 // Gallery Change Image 737 // ---------------------------------------------------------------- 738 gallery_update : function(direction) { 739 var self = this; 740 var this_gallery = $('#' + self.scope.id); 741 var this_gallery_item = this_gallery.find('.modaal-gallery-item'); 742 var this_gallery_total = this_gallery_item.length - 1; 743 744 // if single item, don't proceed 745 if ( this_gallery_total == 0 ) { 746 return false; 747 } 748 749 var prev_btn = this_gallery.find('.modaal-gallery-prev'), 750 next_btn = this_gallery.find('.modaal-gallery-next'); 751 752 var duration = 250; 753 754 var new_img_w = 0, 755 new_img_h = 0; 756 757 // CB: Before image change 758 var current_item = this_gallery.find( '.modaal-gallery-item.' + self.private_options.active_class ), 759 incoming_item = ( direction == 'next' ? current_item.next( '.modaal-gallery-item' ) : current_item.prev( '.modaal-gallery-item' ) ); 760 self.options.before_image_change.call(self, current_item, incoming_item); 761 762 // stop change if at start of end 763 if ( direction == 'prev' && this_gallery.find('.gallery-item-0').hasClass('is_active') ) { 764 return false; 765 } else if ( direction == 'next' && this_gallery.find('.gallery-item-' + this_gallery_total).hasClass('is_active') ) { 766 return false; 767 } 768 769 770 // lock dimensions 771 current_item.stop().animate({ 772 opacity: 0 773 }, duration, function(){ 774 // Move to appropriate image 775 incoming_item.addClass('is_next').css({ 776 'position': 'absolute', 777 'display': 'block', 778 'opacity': 0 779 }); 780 781 // Collect doc width 782 var doc_width = $(document).width(); 783 var width_threshold = doc_width > 1140 ? 280 : 50; 784 785 // start toggle to 'is_next' 786 new_img_w = this_gallery.find('.modaal-gallery-item.is_next').width(); 787 new_img_h = this_gallery.find('.modaal-gallery-item.is_next').height(); 788 789 var new_natural_w = this_gallery.find('.modaal-gallery-item.is_next img').prop('naturalWidth'); 790 var new_natural_h = this_gallery.find('.modaal-gallery-item.is_next img').prop('naturalHeight'); 791 792 // if new image is wider than doc width 793 if ( new_natural_w > (doc_width - width_threshold) ) { 794 // set new width just below doc width 795 new_img_w = doc_width - width_threshold; 796 797 // Set temp widths so we can calulate the correct height; 798 this_gallery.find('.modaal-gallery-item.is_next').css({ 'width': new_img_w }); 799 this_gallery.find('.modaal-gallery-item.is_next img').css({ 'width': new_img_w }); 800 801 // Set new height variable 802 new_img_h = this_gallery.find('.modaal-gallery-item.is_next').find('img').height(); 803 } else { 804 // new img is not wider than screen, so let's set the new dimensions 805 new_img_w = new_natural_w; 806 new_img_h = new_natural_h; 807 } 808 809 // resize gallery region 810 this_gallery.find('.modaal-gallery-item-wrap').stop().animate({ 811 'width': new_img_w, 812 'height': new_img_h 813 }, duration, function() { 814 // hide old active image 815 current_item.removeClass(self.private_options.active_class + ' ' + self.options.gallery_active_class).removeAttr('style'); 816 current_item.find('img').removeAttr('style'); 817 818 // show new image 819 incoming_item.addClass(self.private_options.active_class + ' ' + self.options.gallery_active_class).removeClass('is_next').css('position',''); 820 821 // animate in new image (now has the normal is_active class 822 incoming_item.stop().animate({ 823 opacity: 1 824 }, duration, function(){ 825 $(this).removeAttr('style').css({ 826 'width': '100%' 827 }); 828 $(this).find('img').css('width', '100%'); 829 830 // remove dimension lock 831 this_gallery.find('.modaal-gallery-item-wrap').removeAttr('style'); 832 833 // CB: After image change 834 self.options.after_image_change.call( self, incoming_item ); 835 }); 836 837 // Focus on the new gallery item 838 this_gallery.find('.modaal-gallery-item').removeAttr('tabindex'); 839 this_gallery.find('.modaal-gallery-item.' + self.private_options.active_class + '').attr('tabindex', '0').focus(); 840 841 // hide/show next/prev 842 if ( this_gallery.find('.modaal-gallery-item.' + self.private_options.active_class).is('.gallery-item-0') ) { 843 prev_btn.stop().animate({ 844 opacity: 0 845 }, 150, function(){ 846 $(this).hide(); 847 }); 848 } else { 849 prev_btn.stop().css({ 850 'display': 'block', 851 'opacity': prev_btn.css('opacity') 852 }).animate({ 853 opacity: 1 854 }, 150); 855 } 856 if ( this_gallery.find('.modaal-gallery-item.' + self.private_options.active_class).is('.gallery-item-' + this_gallery_total) ) { 857 next_btn.stop().animate({ 858 opacity: 0 859 }, 150, function(){ 860 $(this).hide(); 861 }); 862 } else { 863 next_btn.stop().css({ 864 'display': 'block', 865 'opacity': prev_btn.css('opacity') 866 }).animate({ 867 opacity: 1 868 }, 150); 869 } 870 }); 871 }); 872 }, 873 874 // Create Video Modal 875 // ---------------------------------------------------------------- 876 create_video : function(url) { 877 var self = this; 878 var content; 879 880 // video markup 881 content = '<iframe src="' + url + '" class="modaal-video-frame" frameborder="0" allowfullscreen></iframe>'; 882 883 // now push content into markup 884 self.build_modal('<div class="modaal-video-container">' + content + '</div>'); 885 }, 886 887 // Create iFrame Modal 888 // ---------------------------------------------------------------- 889 create_iframe : function(url) { 890 var self = this; 891 var content; 892 893 if ( self.options.width !== null || self.options.width !== undefined || self.options.height !== null || self.options.height !== undefined ) { 894 // video markup 895 content = '<iframe src="' + url + '" class="modaal-iframe-elem" frameborder="0" allowfullscreen></iframe>'; 896 } else { 897 content = '<div class="modaal-content-container">Please specify a width and height for your iframe</div>'; 898 } 899 900 // now push content into markup 901 self.build_modal(content); 902 }, 903 904 // Open Modaal 905 // ---------------------------------------------------------------- 906 modaal_open : function() { 907 var self = this; 908 var modal_wrapper = $( '#' + self.scope.id ); 909 var animation_type = self.options.animation; 910 911 if (animation_type === 'none' ){ 912 modal_wrapper.removeClass('modaal-start_none'); 913 self.options.after_open.call(self, modal_wrapper); 914 } 915 916 // Open with fade 917 if (animation_type === 'fade') { 918 modal_wrapper.removeClass('modaal-start_fade'); 919 } 920 921 // Open with slide down 922 if (animation_type === 'slide-down') { 923 modal_wrapper.removeClass('modaal-start_slide_down'); 924 } 925 926 var focusTarget = modal_wrapper; 927 928 // Switch focusTarget tabindex (switch from other modal if exists) 929 $('.modaal-wrapper *[tabindex=0]').removeAttr('tabindex'); 930 931 if ( self.options.type == 'image' ) { 932 focusTarget = $('#' + self.scope.id).find('.modaal-gallery-item.' + self.private_options.active_class); 933 934 } else if ( modal_wrapper.find('.modaal-iframe-elem').length ) { 935 focusTarget = modal_wrapper.find('.modaal-iframe-elem'); 936 937 } else if ( modal_wrapper.find('.modaal-video-wrap').length ) { 938 focusTarget = modal_wrapper.find('.modaal-video-wrap'); 939 940 } else { 941 focusTarget = modal_wrapper.find('.modaal-focus'); 942 943 } 944 945 // now set the focus 946 focusTarget.attr('tabindex', '0').focus(); 947 948 // Run after_open 949 if (animation_type !== 'none') { 950 // CB: after_open 951 setTimeout(function() { 952 self.options.after_open.call(self, modal_wrapper) 953 }, self.options.after_callback_delay); 954 } 955 }, 956 957 // Close Modal 958 // ---------------------------------------------------------------- 959 modaal_close : function() { 960 var self = this; 961 var modal_wrapper = $( '#' + self.scope.id ); 962 963 // CB: before_close 964 self.options.before_close.call(self, modal_wrapper); 965 966 if (self.xhr !== null){ 967 self.xhr.abort(); 968 self.xhr = null; 969 } 970 971 // Now we close the modal 972 if (self.options.animation === 'none' ){ 973 modal_wrapper.addClass('modaal-start_none'); 974 } 975 976 // Close with fade 977 if (self.options.animation === 'fade') { 978 modal_wrapper.addClass('modaal-start_fade'); 979 } 980 981 // Close with slide up (using initial slide down) 982 if (self.options.animation === 'slide-down') { 983 modal_wrapper.addClass('modaal-start_slide_down'); 984 } 985 986 // CB: after_close and remove 987 setTimeout(function() { 988 // clone inline content back to origin place 989 if (self.options.type == 'inline') { 990 $('#' + self.scope.id + ' .modaal-content-container').contents().detach().appendTo( self.scope.source ) 991 } 992 // remove markup from dom 993 modal_wrapper.remove(); 994 // CB: after_close 995 self.options.after_close.call(self); 996 // scope is now closed 997 self.scope.is_open = false; 998 999 }, self.options.after_callback_delay); 1000 1001 // Call overlay hide 1002 self.modaal_overlay('hide'); 1003 1004 // Roll back to last focus state before modal open. If was closed programmatically, this might not be set 1005 if (self.lastFocus != null) { 1006 self.lastFocus.focus(); 1007 } 1008 }, 1009 1010 // Overlay control (accepts action for show or hide) 1011 // ---------------------------------------------------------------- 1012 modaal_overlay : function(action) { 1013 var self = this; 1014 1015 if (action == 'show') { 1016 // Modal is open so update scope 1017 self.scope.is_open = true; 1018 1019 // set body to overflow hidden if background_scroll is false 1020 if (! self.options.background_scroll) { 1021 self.dom.addClass('modaal-noscroll'); 1022 } 1023 1024 // append modaal overlay 1025 if ($('#' + self.scope.id + '_overlay').length < 1) { 1026 self.dom.append('<div class="modaal-overlay" id="' + self.scope.id + '_overlay"></div>'); 1027 } 1028 1029 // now show 1030 $('#' + self.scope.id + '_overlay').css('background', self.options.background).stop().animate({ 1031 opacity: self.options.overlay_opacity 1032 }, self.options.animation_speed, function(){ 1033 // now open the modal 1034 self.modaal_open(); 1035 }); 1036 1037 } else if (action == 'hide') { 1038 1039 // now hide the overlay 1040 $('#' + self.scope.id + '_overlay').stop().animate({ 1041 opacity: 0 1042 }, self.options.animation_speed, function(){ 1043 // remove overlay from dom 1044 $(this).remove(); 1045 1046 // remove body overflow lock 1047 self.dom.removeClass('modaal-noscroll'); 1048 }); 1049 } 1050 }, 1051 1052 // Check if is touch 1053 // ---------------------------------------------------------------- 1054 is_touch : function() { 1055 return 'ontouchstart' in window || navigator.maxTouchPoints; 1056 } 1057 }; 1058 1059 // Define default object to store 1060 var modaal_existing_selectors = []; 1061 1062 // Declare the modaal jQuery method 1063 // ------------------------------------------------------------ 1064 $.fn.modaal = function(options) { 1065 return this.each(function (i) { 1066 var existing_modaal = $(this).data('modaal'); 1067 1068 if ( existing_modaal ){ 1069 // Checking for string value, used for methods 1070 if (typeof(options) == 'string'){ 1071 switch (options) { 1072 case 'open': 1073 // create the modal 1074 existing_modaal.create_modaal(existing_modaal); 1075 break; 1076 case 'close': 1077 existing_modaal.modaal_close(); 1078 break; 1079 } 1080 } 1081 } else { 1082 // Not a string, so let's setup the modal ready to use 1083 var modaal = Object.create(Modaal); 1084 modaal.init(options, this); 1085 $.data(this, "modaal", modaal); 1086 1087 // push this select into existing selectors array which is referenced during modaal_dom_observer 1088 modaal_existing_selectors.push({ 1089 'element': $(this).attr('class'), 1090 'options': options 1091 }); 1092 } 1093 }); 1094 }; 1095 1096 // Default options 1097 // ------------------------------------------------------------ 1098 $.fn.modaal.options = { 1099 1100 //General 1101 type: 'inline', 1102 content_source: null, 1103 animation: 'fade', 1104 animation_speed: 300, 1105 after_callback_delay: 350, 1106 is_locked: false, 1107 hide_close: false, 1108 background: '#000', 1109 overlay_opacity: '0.8', 1110 overlay_close: true, 1111 accessible_title: 'Dialog Window', 1112 start_open: false, 1113 fullscreen: false, 1114 custom_class: '', 1115 background_scroll: false, 1116 should_open: true, 1117 close_text: 'Close', 1118 close_aria_label: 'Close (Press escape to close)', 1119 width: null, 1120 height: null, 1121 1122 //Events 1123 before_open: function(){}, 1124 after_open: function(){}, 1125 before_close: function(){}, 1126 after_close: function(){}, 1127 source: function( element, src ){ 1128 return src; 1129 }, 1130 1131 //Confirm Modal 1132 confirm_button_text: 'Confirm', // text on confirm button 1133 confirm_cancel_button_text: 'Cancel', 1134 confirm_title: 'Confirm Title', // title for confirm modal 1135 confirm_content: '<p>This is the default confirm dialog content. Replace me through the options</p>', // html for confirm message 1136 confirm_callback: function() {}, 1137 confirm_cancel_callback: function() {}, 1138 1139 1140 //Gallery Modal 1141 gallery_active_class: 'gallery_active_item', 1142 outer_controls: false, 1143 before_image_change: function( current_item, incoming_item ) {}, 1144 after_image_change: function( current_item ) {}, 1145 1146 //Ajax Modal 1147 loading_content: modaal_loading_spinner, 1148 loading_class: 'is_loading', 1149 ajax_error_class: 'modaal-error', 1150 ajax_success: function(){}, 1151 1152 //Instagram 1153 instagram_id: null 1154 }; 1155 1156 // Check and Set Inline Options 1157 // ------------------------------------------------------------ 1158 function modaal_inline_options(self) { 1159 1160 // new empty options 1161 var options = {}; 1162 var inline_options = false; 1163 1164 // option: type 1165 if ( self.attr('data-modaal-type') ) { 1166 inline_options = true; 1167 options.type = self.attr('data-modaal-type'); 1168 } 1169 1170 // option: type 1171 if ( self.attr('data-modaal-content-source') ) { 1172 inline_options = true; 1173 options.content_source = self.attr('data-modaal-content-source'); 1174 } 1175 1176 // option: animation 1177 if ( self.attr('data-modaal-animation') ) { 1178 inline_options = true; 1179 options.animation = self.attr('data-modaal-animation'); 1180 } 1181 1182 // option: animation_speed 1183 if ( self.attr('data-modaal-animation-speed') ) { 1184 inline_options = true; 1185 options.animation_speed = self.attr('data-modaal-animation-speed'); 1186 } 1187 1188 // option: after_callback_delay 1189 if ( self.attr('data-modaal-after-callback-delay') ) { 1190 inline_options = true; 1191 options.after_callback_delay = self.attr('data-modaal-after-callback-delay'); 1192 } 1193 1194 // option: is_locked 1195 if ( self.attr('data-modaal-is-locked') ) { 1196 inline_options = true; 1197 options.is_locked = (self.attr('data-modaal-is-locked') === 'true' ? true : false); 1198 } 1199 1200 // option: hide_close 1201 if ( self.attr('data-modaal-hide-close') ) { 1202 inline_options = true; 1203 options.hide_close = (self.attr('data-modaal-hide-close') === 'true' ? true : false); 1204 } 1205 1206 // option: background 1207 if ( self.attr('data-modaal-background') ) { 1208 inline_options = true; 1209 options.background = self.attr('data-modaal-background'); 1210 } 1211 1212 // option: overlay_opacity 1213 if ( self.attr('data-modaal-overlay-opacity') ) { 1214 inline_options = true; 1215 options.overlay_opacity = self.attr('data-modaal-overlay-opacity'); 1216 } 1217 1218 // option: overlay_close 1219 if ( self.attr('data-modaal-overlay-close') ) { 1220 inline_options = true; 1221 options.overlay_close = (self.attr('data-modaal-overlay-close') === 'false' ? false : true); 1222 } 1223 1224 // option: accessible_title 1225 if ( self.attr('data-modaal-accessible-title') ) { 1226 inline_options = true; 1227 options.accessible_title = self.attr('data-modaal-accessible-title'); 1228 } 1229 1230 // option: start_open 1231 if ( self.attr('data-modaal-start-open') ) { 1232 inline_options = true; 1233 options.start_open = (self.attr('data-modaal-start-open') === 'true' ? true : false); 1234 } 1235 1236 // option: fullscreen 1237 if ( self.attr('data-modaal-fullscreen') ) { 1238 inline_options = true; 1239 options.fullscreen = (self.attr('data-modaal-fullscreen') === 'true' ? true : false); 1240 } 1241 1242 // option: custom_class 1243 if ( self.attr('data-modaal-custom-class') ) { 1244 inline_options = true; 1245 options.custom_class = self.attr('data-modaal-custom-class'); 1246 } 1247 1248 // option: close_text 1249 if ( self.attr('data-modaal-close-text') ) { 1250 inline_options = true; 1251 options.close_text = self.attr('data-modaal-close-text'); 1252 } 1253 1254 // option: close_aria_label 1255 if ( self.attr('data-modaal-close-aria-label') ) { 1256 inline_options = true; 1257 options.close_aria_label = self.attr('data-modaal-close-aria-label'); 1258 } 1259 1260 // option: background_scroll 1261 if ( self.attr('data-modaal-background-scroll') ) { 1262 inline_options = true; 1263 options.background_scroll = (self.attr('data-modaal-background-scroll') === 'true' ? true : false); 1264 } 1265 1266 // option: width 1267 if ( self.attr('data-modaal-width') ) { 1268 inline_options = true; 1269 options.width = parseInt( self.attr('data-modaal-width') ); 1270 } 1271 1272 // option: height 1273 if ( self.attr('data-modaal-height') ) { 1274 inline_options = true; 1275 options.height = parseInt( self.attr('data-modaal-height') ); 1276 } 1277 1278 // option: confirm_button_text 1279 if ( self.attr('data-modaal-confirm-button-text') ) { 1280 inline_options = true; 1281 options.confirm_button_text = self.attr('data-modaal-confirm-button-text'); 1282 } 1283 1284 // option: confirm_cancel_button_text 1285 if ( self.attr('data-modaal-confirm-cancel-button-text') ) { 1286 inline_options = true; 1287 options.confirm_cancel_button_text = self.attr('data-modaal-confirm-cancel-button-text'); 1288 } 1289 1290 // option: confirm_title 1291 if ( self.attr('data-modaal-confirm-title') ) { 1292 inline_options = true; 1293 options.confirm_title = self.attr('data-modaal-confirm-title'); 1294 } 1295 1296 // option: confirm_content 1297 if ( self.attr('data-modaal-confirm-content') ) { 1298 inline_options = true; 1299 options.confirm_content = self.attr('data-modaal-confirm-content'); 1300 } 1301 1302 // option: gallery_active_class 1303 if ( self.attr('data-modaal-gallery-active-class') ) { 1304 inline_options = true; 1305 options.gallery_active_class = self.attr('data-modaal-gallery-active-class'); 1306 } 1307 1308 // option: loading_content 1309 if ( self.attr('data-modaal-loading-content') ) { 1310 inline_options = true; 1311 options.loading_content = self.attr('data-modaal-loading-content'); 1312 } 1313 1314 // option: loading_class 1315 if ( self.attr('data-modaal-loading-class') ) { 1316 inline_options = true; 1317 options.loading_class = self.attr('data-modaal-loading-class'); 1318 } 1319 1320 // option: ajax_error_class 1321 if ( self.attr('data-modaal-ajax-error-class') ) { 1322 inline_options = true; 1323 options.ajax_error_class = self.attr('data-modaal-ajax-error-class'); 1324 } 1325 1326 // option: start_open 1327 if ( self.attr('data-modaal-instagram-id') ) { 1328 inline_options = true; 1329 options.instagram_id = self.attr('data-modaal-instagram-id'); 1330 } 1331 1332 // now set it up for the trigger, but only if inline_options is true 1333 if ( inline_options ) { 1334 self.modaal(options); 1335 } 1336 }; 1337 1338 // On body load (or now, if already loaded), init any modaals defined inline 1339 // Ensure this is done after $.fn.modaal and default options are declared 1340 // ---------------------------------------------------------------- 1341 $(function(){ 1342 1343 var single_modaal = $('.modaal'); 1344 1345 // Check for existing modaal elements 1346 if ( single_modaal.length ) { 1347 single_modaal.each(function() { 1348 var self = $(this); 1349 modaal_inline_options(self); 1350 }); 1351 } 1352 1353 // Obvserve DOM mutations for newly added triggers 1354 var modaal_dom_observer = new MutationObserver(function(mutations) { 1355 mutations.forEach(function(mutation) { 1356 if (mutation.addedNodes && mutation.addedNodes.length > 0) { 1357 // element added to DOM 1358 var findElement = [].some.call(mutation.addedNodes, function(el) { 1359 var elm = $(el); 1360 if ( elm.is('a') || elm.is('button') ) { 1361 1362 if ( elm.hasClass('modaal') ) { 1363 // is inline Modaal, initialise options 1364 modaal_inline_options(elm); 1365 } else { 1366 // is not inline modaal. Check for existing selector 1367 modaal_existing_selectors.forEach(function(modaalSelector) { 1368 if ( modaalSelector.element == elm.attr('class') ) { 1369 $(elm).modaal( modaalSelector.options ); 1370 return false; 1371 } 1372 }); 1373 } 1374 1375 } 1376 }); 1377 } 1378 }); 1379 }); 1380 var observer_config = { 1381 subtree: true, 1382 attributes: true, 1383 childList: true, 1384 characterData: true 1385 }; 1386 1387 // pass in the target node, as well as the observer options 1388 setTimeout(function() { 1389 modaal_dom_observer.observe(document.body, observer_config); 1390 }, 500); 1391 1392 }); 1393 1394} ( jQuery, window, document ) );
vendor: 504 bytes, lines 1394-1398
1394 1395/* 1396 Copyright (C) Federico Zivolo 2019 1397 Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). 1398 */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return t?n[t]:n}
vendor: 3,236 bytes, line 1398
1398function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}function i(e){return e&&e.referenceNode?e.referenceNode:e}function r(e){return 11===e?re:10===e?pe:re||pe}function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent||null;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TH','TD','TABLE'].indexOf(n.nodeName)&&'static'===t(n,'position')?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if(e!==l&&t!==l||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',n=e.nodeName;if('BODY'===n||'HTML'===n){var i=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||i;return r[o]}return e[o]}function f(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=l(t,'top'),i=l(t,'left'),r=o?-1:1;return e.top+=n*r,e.bottom+=n*r,e.left+=i*r,e.right+=i*r,e}function m(e,t){var o='x'===t?'Left':'Top',n='Left'==o?'Right':'Bottom';return parseFloat(e['border'+o+'Width'],10)+parseFloat(e['border'+n+'Width'],10)}function h(e,t,o,n){return ee(t['offset'+e],t['scroll'+e],o['client'+e],o['offset'+e],o['scroll'+e],r(10)?parseInt(o['offset'+e])+parseInt(n['margin'+('Height'===e?'Top':'Left')])+parseInt(n['margin'+('Height'===e?'Bottom':'Right')]):0)}function c(e){var t=e.body,o=e.documentElement,n=r(10)&&getComputedStyle(o);return{height:h('Height',t,o,n),width:h('Width',t,o,n)}}function g(e){return le({},e,{right:e.left+e.width,bottom:e.top+e.height})}function u(e){var o={};try{if(r(10)){o=e.getBoundingClientRect();var n=l(e,'top'),i=l(e,'left');o.top+=n,o.left+=i,o.bottom+=n,o.right+=i}else o=e.getBoundingClientRect()}catch(t){}var p={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},s='HTML'===e.nodeName?c(e.ownerDocument):{},d=s.width||e.clientWidth||p.width,a=s.height||e.clientHeight||p.height,f=e.offsetWidth-d,h=e.offsetHeight-a;if(f||h){var u=t(e);f-=m(u,'x'),h-=m(u,'y'),p.width-=f,p.height-=h}return g(p)}function b(e,o){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],p=r(10),s='HTML'===o.nodeName,d=u(e),a=u(o),l=n(e),m=t(o),h=parseFloat(m.borderTopWidth,10),c=parseFloat(m.borderLeftWidth,10);i&&s&&(a.top=ee(a.top,0),a.left=ee(a.left,0));var b=g({top:d.top-a.top-h,left:d.left-a.left-c,width:d.width,height:d.height});if(b.marginTop=0,b.marginLeft=0,!p&&s){var w=parseFloat(m.marginTop,10),y=parseFloat(m.marginLeft,10
vendor: 13,566 bytes, line 1398
1398);b.top-=h-w,b.bottom-=h-w,b.left-=c-y,b.right-=c-y,b.marginTop=w,b.marginLeft=y}return(p&&!i?o.contains(l):o===l&&'BODY'!==l.nodeName)&&(b=f(b,o)),b}function w(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=e.ownerDocument.documentElement,n=b(e,o),i=ee(o.clientWidth,window.innerWidth||0),r=ee(o.clientHeight,window.innerHeight||0),p=t?0:l(o),s=t?0:l(o,'left'),d={top:p-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:r};return g(d)}function y(e){var n=e.nodeName;if('BODY'===n||'HTML'===n)return!1;if('fixed'===t(e,'position'))return!0;var i=o(e);return!!i&&y(i)}function E(e){if(!e||!e.parentElement||r())return document.documentElement;for(var o=e.parentElement;o&&'none'===t(o,'transform');)o=o.parentElement;return o||document.documentElement}function v(e,t,r,p){var s=4<arguments.length&&void 0!==arguments[4]&&arguments[4],d={top:0,left:0},l=s?E(e):a(e,i(t));if('viewport'===p)d=w(l,s);else{var f;'scrollParent'===p?(f=n(o(t)),'BODY'===f.nodeName&&(f=e.ownerDocument.documentElement)):'window'===p?f=e.ownerDocument.documentElement:f=p;var m=b(f,l,s);if('HTML'===f.nodeName&&!y(l)){var h=c(e.ownerDocument),g=h.height,u=h.width;d.top+=m.top-m.marginTop,d.bottom=g+m.top,d.left+=m.left-m.marginLeft,d.right=u+m.left}else d=m}r=r||0;var v='number'==typeof r;return d.left+=v?r:r.left||0,d.top+=v?r:r.top||0,d.right-=v?r:r.right||0,d.bottom-=v?r:r.bottom||0,d}function x(e){var t=e.width,o=e.height;return t*o}function O(e,t,o,n,i){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var p=v(o,n,r,i),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return le({key:e},s[e],{area:x(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,n=e.height;return t>=o.clientWidth&&n>=o.clientHeight}),l=0<a.length?a[0].key:d[0].key,f=e.split('-')[1];return l+(f?'-'+f:'')}function L(e,t,o){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,r=n?E(t):a(t,i(o));return b(o,r,n)}function S(e){var t=e.ownerDocument.defaultView,o=t.getComputedStyle(e),n=parseFloat(o.marginTop||0)+parseFloat(o.marginBottom||0),i=parseFloat(o.marginLeft||0)+parseFloat(o.marginRight||0),r={width:e.offsetWidth+i,height:e.offsetHeight+n};return r}function T(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function C(e,t,o){o=o.split('-')[0];var n=S(e),i={width:n.width,height:n.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width',a=r?'width':'height';return i[p]=t[p]+t[d]/2-n[d]/2,i[s]=o===s?t[s]-n[a]:t[T(s)],i}function D(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function N(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var n=D(e,function(e){return e[t]===o});return e.indexOf(n)}function P(t,o,n){var i=void 0===n?t:t.slice(0,N(t,'name',n));return i.forEach(function(t){t['function']&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var n=t['function']||t.fn;t.enabled&&e(n)&&(o.offsets.popper=g(o.offsets.popper),o.offsets.reference=g(o.offsets.reference),o=n(o,t))}),o}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=O(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=C(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?'fixed':'absolute',e=P(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some(function(e){var o=e.name,n=e.enabled;return n&&o===t})}function B(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof document.body.style[r])return r}return null}function H(){return this.state.isDestroyed=!0,W(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.position='',this.popper.style.top='',this.popper.style.left='',this.popper.style.right='',this.popper.style.bottom='',this.popper.style.willChange='',this.popper.style[B('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function A(e){var t=e.ownerDocument;return t?t.defaultView:window}function M(e,t,o,i){var r='BODY'===e.nodeName,p=r?e.ownerDocument.defaultView:e;p.addEventListener(t,o,{passive:!0}),r||M(n(p.parentNode),t,o,i),i.push(p)}function F(e,t,o,i){o.updateBound=i,A(e).addEventListener('resize',o.updateBound,{passive:!0});var r=n(e);return M(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function I(){this.state.eventsEnabled||(this.state=F(this.reference,this.options,this.state,this.scheduleUpdate))}function R(e,t){return A(e).removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function U(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=R(this.reference,this.state))}function Y(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function V(e,t){Object.keys(t).forEach(function(o){var n='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&Y(t[o])&&(n='px'),e.style[o]=t[o]+n})}function j(e,t){Object.keys(t).forEach(function(o){var n=t[o];!1===n?e.removeAttribute(o):e.setAttribute(o,t[o])})}function q(e,t){var o=e.offsets,n=o.popper,i=o.reference,r=$,p=function(e){return e},s=r(i.width),d=r(n.width),a=-1!==['left','right'].indexOf(e.placement),l=-1!==e.placement.indexOf('-'),f=t?a||l||s%2==d%2?r:Z:p,m=t?r:p;return{left:f(1==s%2&&1==d%2&&!l&&t?n.left-1:n.left),top:m(n.top),bottom:m(n.bottom),right:f(n.right)}}function K(e,t,o){var n=D(e,function(e){var o=e.name;return o===t}),i=!!n&&e.some(function(e){return e.name===o&&e.enabled&&e.order<n.order});if(!i){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return i}function z(e){return'end'===e?'start':'start'===e?'end':e}function G(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=he.indexOf(e),n=he.slice(o+1).concat(he.slice(0,o));return t?n.reverse():n}function _(e,t,o,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+i[1],p=i[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p){case'%p':s=o;break;case'%':case'%r':default:s=n;}var d=g(s);return d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?ee(document.documentElement.clientHeight,window.innerHeight||0):ee(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return r}function X(e,t,o,n){var i=[0,0],r=-1!==['right','left'].indexOf(n),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(D(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,n){var i=(1===n?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return _(e,i,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,n){Y(o)&&(i[t]+=o*('-'===e[n-1]?-1:1))})}),i}function J(e,t){var o,n=t.offset,i=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=i.split('-')[0];return o=Y(+n)?[+n,0]:X(n,p,s,d),'left'===d?(p.top+=o[0],p.left-=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e}var Q=Math.min,Z=Math.floor,$=Math.round,ee=Math.max,te='undefined'!=typeof window&&'undefined'!=typeof document&&'undefined'!=typeof navigator,oe=function(){for(var e=['Edge','Trident','Firefox'],t=0;t<e.length;t+=1)if(te&&0<=navigator.userAgent.indexOf(e[t]))return 1;return 0}(),ne=te&&window.Promise,ie=ne?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},oe))}},re=te&&!!(window.MSInputMethodContext&&document.documentMode),pe=te&&/MSIE 10/.test(navigator.userAgent),se=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},de=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),ae=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},le=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var n in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},fe=te&&/Firefox/i.test(navigator.userAgent),me=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],he=me.slice(3),ce={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},ge=function(){function t(o,n){var i=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};se(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=ie(this.update.bind(this)),this.options=le({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o&&o.jquery?o[0]:o,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(le({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){i.options.modifiers[e]=le({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return le({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return de(t,[{key:'update',value:function(){return k.call(this)}},{key:'destroy',value:function(){return H.call(this)}},{key:'enableEventListeners',value:function(){return I.call(this)}},{key:'disableEventListeners',value:function(){return U.call(this)}}]),t}();return ge.Utils=('undefined'==typeof window?global:window).PopperUtils,ge.placements=me,ge.Defaults={placement:'bottom',positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],n=t.split('-')[1];if(n){var i=e.offsets,r=i.reference,p=i.popper,s=-1!==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',l={start:ae({},d,r[d]),end:ae({},d,r[d]+r[a]-p[a])};e.offsets.popper=le({},p,l[n])}return e}},offset:{order:200,enabled:!0,fn:J,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||p(e.instance.popper);e.instance.reference===o&&(o=p(o));var n=B('transform'),i=e.instance.popper.style,r=i.top,s=i.left,d=i[n];i.top='',i.left='',i[n]='';var a=v(e.instance.popper,e.instance.reference,t.padding,o,e.positionFixed);i.top=r,i.left=s,i[n]=d,t.boundaries=a;var l=t.priority,f=e.offsets.popper,m={primary:function(e){var o=f[e];return f[e]<a[e]&&!t.escapeWithReference&&(o=ee(f[e],a[e])),ae({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=f[o];return f[e]>a[e]&&!t.escapeWithReference&&(n=Q(f[o],a[e]-('right'===e?f.width:f.height))),ae({},o,n)}};return l.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';f=le({},f,m[t](e))}),e.offsets.popper=f,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split('-')[0],r=Z,p=-1!==['top','bottom'].indexOf(i),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]<r(n[d])&&(e.offsets.popper[d]=r(n[d])-o[a]),o[d]>r(n[s])&&(e.offsets.popper[d]=r(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var n;if(!K(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',c=a?'bottom':'right',u=S(i)[l];d[c]-u<s[m]&&(e.offsets.popper[m]-=s[m]-(d[c]-u)),d[m]+u>s[c]&&(e.offsets.popper[m]+=d[m]+u-s[c]),e.offsets.popper=g(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f]
vendor: 2,544 bytes, line 1398
1398,10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=ee(Q(s[l]-u,v),0),e.arrowElement=i,e.offsets.arrow=(n={},ae(n,m,$(v)),ae(n,h,''),n),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split('-')[0],i=T(n),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case ce.FLIP:p=[n,i];break;case ce.CLOCKWISE:p=G(n);break;case ce.COUNTERCLOCKWISE:p=G(n,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(n!==s||p.length===d+1)return e;n=e.placement.split('-')[0],i=T(n);var a=e.offsets.popper,l=e.offsets.reference,f=Z,m='left'===n&&f(a.right)>f(l.left)||'right'===n&&f(a.left)<f(l.right)||'top'===n&&f(a.bottom)>f(l.top)||'bottom'===n&&f(a.top)<f(l.bottom),h=f(a.left)<f(o.left),c=f(a.right)>f(o.right),g=f(a.top)<f(o.top),u=f(a.bottom)>f(o.bottom),b='left'===n&&h||'right'===n&&c||'top'===n&&g||'bottom'===n&&u,w=-1!==['top','bottom'].indexOf(n),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u),E=!!t.flipVariationsByContent&&(w&&'start'===r&&c||w&&'end'===r&&h||!w&&'start'===r&&u||!w&&'end'===r&&g),v=y||E;(m||b||v)&&(e.flipped=!0,(m||b)&&(n=p[d+1]),v&&(r=z(r)),e.placement=n+(r?'-'+r:''),e.offsets.popper=le({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement)),e=P(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport',flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],n=e.offsets,i=n.popper,r=n.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return i[p?'left':'top']=r[o]-(s?i[p?'width':'height']:0),e.placement=T(t),e.offsets.popper=g(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!K(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=D(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,n=t.y,i=e.offsets.popper,r=D(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;
1398void 0!==r&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,d,a=void 0===r?t.gpuAcceleration:r,l=p(e.instance.popper),f=u(l),m={position:i.position},h=q(e,2>window.devicePixelRatio||!fe),c='bottom'===o?'top':'bottom',g='right'===n?'left':'right',b=B('transform');if(d='bottom'==c?'HTML'===l.nodeName?-l.clientHeight+h.bottom:-f.height+h.bottom:h.top,s='right'==g?'HTML'===l.nodeName?-l.clientWidth+h.right:-f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[g]=0,m.willChange='transform';else{var w='bottom'==c?-1:1,y='right'==g?-1:1;m[c]=d*w,m[g]=s*y,m.willChange=c+', '+g}var E={"x-placement":e.placement};return e.attributes=le({},E,e.attributes),e.styles=le({},m,e.styles),e.arrowStyles=le({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return V(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&V(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,n,i){var r=L(i,t,e,o.positionFixed),p=O(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),V(t,{position:o.positionFixed?'fixed':'absolute'}),o},gpuAcceleration:void 0}}},ge}); 1399 1400 1401/*! 1402 * Bootstrap v4.1.0 (https://getbootstrap.com/) 1403 * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 1404 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1405 */ 1406 (function (global, factory) { 1407 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) : 1408 typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) : 1409 (factory((global.bootstrap = {}),global.jQuery,global.Popper)); 1410 }(this, (function (exports,$,Popper) { 'use strict'; 1411 1412 $ = $ && $.hasOwnProperty('default') ? $['default'] : $; 1413 Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; 1414 1415 function _defineProperties(target, props) { 1416 for (var i = 0; i < props.length; i++) { 1417 var descriptor = props[i]; 1418 descriptor.enumerable = descriptor.enumerable || false; 1419 descriptor.configurable = true; 1420 if ("value" in descriptor) descriptor.writable = true; 1421 Object.defineProperty(target, descriptor.key, descriptor); 1422 } 1423 } 1424 1425 function _createClass(Constructor, protoProps, staticProps) { 1426 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 1427 if (staticProps) _defineProperties(Constructor, staticProps); 1428 return Constructor; 1429 } 1430 1431 function _defineProperty(obj, key, value) { 1432 if (key in obj) { 1433 Object.defineProperty(obj, key, { 1434 value: value, 1435 enumerable: true, 1436 configurable: true, 1437 writable: true 1438 }); 1439 } else { 1440 obj[key] = value; 1441 } 1442 1443 return obj; 1444 } 1445 1446 function _objectSpread(target) { 1447 for (var i = 1; i < arguments.length; i++) { 1448 var source = arguments[i] != null ? arguments[i] : {}; 1449 var ownKeys = Object.keys(source); 1450 1451 if (typeof Object.getOwnPropertySymbols === 'function') { 1452 ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { 1453 return Object.getOwnPropertyDescriptor(source, sym).enumerable; 1454 })); 1455 } 1456 1457 ownKeys.forEach(function (key) { 1458 _defineProperty(target, key, source[key]); 1459 }); 1460 } 1461 1462 return target; 1463 } 1464 1465 function _inheritsLoose(subClass, superClass) { 1466 subClass.prototype = Object.create(superClass.prototype); 1467 subClass.prototype.constructor = subClass; 1468 subClass.__proto__ = superClass; 1469 } 1470 1471 /** 1472 * -------------------------------------------------------------------------- 1473 * Bootstrap (v4.1.0): util.js 1474 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1475 * -------------------------------------------------------------------------- 1476 */ 1477 1478 var Util = function ($$$1) { 1479 /** 1480 * ------------------------------------------------------------------------ 1481 * Private TransitionEnd Helpers 1482 * ------------------------------------------------------------------------ 1483 */ 1484 var TRANSITION_END = 'transitionend'; 1485 var MAX_UID = 1000000; 1486 var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp) 1487 1488 function toType(obj) { 1489 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); 1490 } 1491 1492 function getSpecialTransitionEndEvent() { 1493 return { 1494 bindType: TRANSITION_END, 1495 delegateType: TRANSITION_END, 1496 handle: function handle(event) { 1497 if ($$$1(event.target).is(this)) { 1498 return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params 1499 } 1500 1501 return undefined; // eslint-disable-line no-undefined 1502 } 1503 }; 1504 } 1505 1506 function transitionEndEmulator(duration) { 1507 var _this = this; 1508 1509 var called = false;
1510 $$$1(this).one(Util.TRANSITION_END, function () { 1511 called = true; 1512 }); 1513 setTimeout(function () { 1514 if (!called) { 1515 Util.triggerTransitionEnd(_this); 1516 } 1517 }, duration); 1518 return this; 1519 } 1520 1521 function setTransitionEndSupport() { 1522 $$$1.fn.emulateTransitionEnd = transitionEndEmulator; 1523 $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); 1524 } 1525 /** 1526 * -------------------------------------------------------------------------- 1527 * Public Util Api 1528 * -------------------------------------------------------------------------- 1529 */ 1530 1531 1532 var Util = { 1533 TRANSITION_END: 'bsTransitionEnd', 1534 getUID: function getUID(prefix) { 1535 do { 1536 // eslint-disable-next-line no-bitwise 1537 prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here 1538 } while (document.getElementById(prefix)); 1539 1540 return prefix; 1541 }, 1542 getSelectorFromElement: function getSelectorFromElement(element) { 1543 var selector = element.getAttribute('data-target'); 1544 1545 if (!selector || selector === '#') { 1546 selector = element.getAttribute('href') || ''; 1547 } 1548 1549 try { 1550 var $selector = $$$1(document).find(selector); 1551 return $selector.length > 0 ? selector : null; 1552 } catch (err) { 1553 return null; 1554 } 1555 }, 1556 getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { 1557 if (!element) { 1558 return 0; 1559 } // Get transition-duration of the element 1560 1561 1562 var transitionDuration = $$$1(element).css('transition-duration'); 1563 var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found 1564 1565 if (!floatTransitionDuration) { 1566 return 0; 1567 } // If multiple durations are defined, take the first 1568 1569 1570 transitionDuration = transitionDuration.split(',')[0]; 1571 return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER; 1572 }, 1573 reflow: function reflow(element) { 1574 return element.offsetHeight; 1575 }, 1576 triggerTransitionEnd: function triggerTransitionEnd(element) { 1577 $$$1(element).trigger(TRANSITION_END); 1578 }, 1579 // TODO: Remove in v5 1580 supportsTransitionEnd: function supportsTransitionEnd() { 1581 return Boolean(TRANSITION_END); 1582 }, 1583 isElement: function isElement(obj) { 1584 return (obj[0] || obj).nodeType; 1585 }, 1586 typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { 1587 for (var property in configTypes) { 1588 if (Object.prototype.hasOwnProperty.call(configTypes, property)) { 1589 var expectedTypes = configTypes[property]; 1590 var value = config[property]; 1591 var valueType = value && Util.isElement(value) ? 'element' : toType(value); 1592 1593 if (!new RegExp(expectedTypes).test(valueType)) { 1594 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); 1595 } 1596 } 1597 } 1598 } 1599 }; 1600 setTransitionEndSupport(); 1601 return Util; 1602 }($); 1603 1604 /** 1605 * -------------------------------------------------------------------------- 1606 * Bootstrap (v4.1.0): alert.js 1607 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1608 * -------------------------------------------------------------------------- 1609 */ 1610 1611 var Alert = function ($$$1) { 1612 /** 1613 * ------------------------------------------------------------------------ 1614 * Constants 1615 * ------------------------------------------------------------------------ 1616 */ 1617 var NAME = 'alert'; 1618 var VERSION = '4.1.0'; 1619 var DATA_KEY = 'bs.alert'; 1620 var EVENT_KEY = "." + DATA_KEY; 1621 var DATA_API_KEY = '.data-api'; 1622 var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; 1623 var Selector = { 1624 DISMISS: '[data-dismiss="alert"]' 1625 }; 1626 var Event = { 1627 CLOSE: "close" + EVENT_KEY, 1628 CLOSED: "closed" + EVENT_KEY, 1629 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 1630 }; 1631 var ClassName = { 1632 ALERT: 'alert', 1633 FADE: 'fade', 1634 SHOW: 'show' 1635 /** 1636 * ------------------------------------------------------------------------ 1637 * Class Definition 1638 * ------------------------------------------------------------------------ 1639 */ 1640 1641 }; 1642 1643 var Alert = 1644 /*#__PURE__*/ 1645 function () { 1646 function Alert(element) { 1647 this._element = element; 1648 } // Getters 1649 1650 1651 var _proto = Alert.prototype; 1652 1653 // Public 1654 _proto.close = function close(element) { 1655 element = element || this._element; 1656 1657 var rootElement = this._getRootElement(element); 1658 1659 var customEvent = this._triggerCloseEvent(rootElement); 1660 1661 if (customEvent.isDefaultPrevented()) { 1662 return; 1663 } 1664 1665 this._removeElement(rootElement); 1666 }; 1667 1668 _proto.dispose = function dispose() { 1669 $$$1.removeData(this._element, DATA_KEY); 1670 this._element = null; 1671 }; // Private 1672 1673 1674 _proto._getRootElement = function _getRootElement(element) { 1675 var selector = Util.getSelectorFromElement(element); 1676 var parent = false;
1677 1678 if (selector) { 1679 parent = $$$1(selector)[0]; 1680 } 1681 1682 if (!parent) { 1683 parent = $$$1(element).closest("." + ClassName.ALERT)[0]; 1684 } 1685 1686 return parent; 1687 }; 1688 1689 _proto._triggerCloseEvent = function _triggerCloseEvent(element) { 1690 var closeEvent = $$$1.Event(Event.CLOSE); 1691 $$$1(element).trigger(closeEvent); 1692 return closeEvent; 1693 }; 1694 1695 _proto._removeElement = function _removeElement(element) { 1696 var _this = this; 1697 1698 $$$1(element).removeClass(ClassName.SHOW); 1699 1700 if (!$$$1(element).hasClass(ClassName.FADE)) { 1701 this._destroyElement(element); 1702 1703 return; 1704 } 1705 1706 var transitionDuration = Util.getTransitionDurationFromElement(element); 1707 $$$1(element).one(Util.TRANSITION_END, function (event) { 1708 return _this._destroyElement(element, event); 1709 }).emulateTransitionEnd(transitionDuration); 1710 }; 1711 1712 _proto._destroyElement = function _destroyElement(element) { 1713 $$$1(element).detach().trigger(Event.CLOSED).remove(); 1714 }; // Static 1715 1716 1717 Alert._jQueryInterface = function _jQueryInterface(config) { 1718 return this.each(function () { 1719 var $element = $$$1(this); 1720 var data = $element.data(DATA_KEY); 1721 1722 if (!data) { 1723 data = new Alert(this); 1724 $element.data(DATA_KEY, data); 1725 } 1726 1727 if (config === 'close') { 1728 data[config](this); 1729 } 1730 }); 1731 }; 1732 1733 Alert._handleDismiss = function _handleDismiss(alertInstance) { 1734 return function (event) { 1735 if (event) { 1736 event.preventDefault(); 1737 } 1738 1739 alertInstance.close(this); 1740 }; 1741 }; 1742 1743 _createClass(Alert, null, [{ 1744 key: "VERSION", 1745 get: function get() { 1746 return VERSION; 1747 } 1748 }]); 1749 1750 return Alert; 1751 }(); 1752 /** 1753 * ------------------------------------------------------------------------ 1754 * Data Api implementation 1755 * ------------------------------------------------------------------------ 1756 */ 1757 1758 1759 $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); 1760 /** 1761 * ------------------------------------------------------------------------ 1762 * jQuery 1763 * ------------------------------------------------------------------------ 1764 */ 1765 1766 $$$1.fn[NAME] = Alert._jQueryInterface; 1767 $$$1.fn[NAME].Constructor = Alert; 1768 1769 $$$1.fn[NAME].noConflict = function () { 1770 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 1771 return Alert._jQueryInterface; 1772 }; 1773 1774 return Alert; 1775 }($); 1776 1777 /** 1778 * -------------------------------------------------------------------------- 1779 * Bootstrap (v4.1.0): button.js 1780 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1781 * -------------------------------------------------------------------------- 1782 */ 1783 1784 var Button = function ($$$1) { 1785 /** 1786 * ------------------------------------------------------------------------ 1787 * Constants 1788 * ------------------------------------------------------------------------ 1789 */ 1790 var NAME = 'button'; 1791 var VERSION = '4.1.0'; 1792 var DATA_KEY = 'bs.button'; 1793 var EVENT_KEY = "." + DATA_KEY; 1794 var DATA_API_KEY = '.data-api'; 1795 var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; 1796 var ClassName = { 1797 ACTIVE: 'active', 1798 BUTTON: 'btn', 1799 FOCUS: 'focus' 1800 }; 1801 var Selector = { 1802 DATA_TOGGLE_CARROT: '[data-toggle^="button"]', 1803 DATA_TOGGLE: '[data-toggle="buttons"]', 1804 INPUT: 'input', 1805 ACTIVE: '.active', 1806 BUTTON: '.btn' 1807 }; 1808 var Event = { 1809 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, 1810 FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY) 1811 /** 1812 * ------------------------------------------------------------------------ 1813 * Class Definition 1814 * ------------------------------------------------------------------------ 1815 */ 1816 1817 }; 1818 1819 var Button = 1820 /*#__PURE__*/ 1821 function () { 1822 function Button(element) { 1823 this._element = element; 1824 } // Getters 1825 1826 1827 var _proto = Button.prototype; 1828 1829 // Public
1830 _proto.toggle = function toggle() { 1831 var triggerChangeEvent = true; 1832 var addAriaPressed = true; 1833 var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0]; 1834 1835 if (rootElement) { 1836 var input = $$$1(this._element).find(Selector.INPUT)[0]; 1837 1838 if (input) { 1839 if (input.type === 'radio') { 1840 if (input.checked && $$$1(this._element).hasClass(ClassName.ACTIVE)) { 1841 triggerChangeEvent = false; 1842 } else { 1843 var activeElement = $$$1(rootElement).find(Selector.ACTIVE)[0]; 1844 1845 if (activeElement) { 1846 $$$1(activeElement).removeClass(ClassName.ACTIVE); 1847 } 1848 } 1849 } 1850 1851 if (triggerChangeEvent) { 1852 if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { 1853 return; 1854 } 1855 1856 input.checked = !$$$1(this._element).hasClass(ClassName.ACTIVE); 1857 $$$1(input).trigger('change'); 1858 } 1859 1860 input.focus(); 1861 addAriaPressed = false; 1862 } 1863 } 1864 1865 if (addAriaPressed) { 1866 this._element.setAttribute('aria-pressed', !$$$1(this._element).hasClass(ClassName.ACTIVE)); 1867 } 1868 1869 if (triggerChangeEvent) { 1870 $$$1(this._element).toggleClass(ClassName.ACTIVE); 1871 } 1872 }; 1873 1874 _proto.dispose = function dispose() { 1875 $$$1.removeData(this._element, DATA_KEY); 1876 this._element = null; 1877 }; // Static 1878 1879 1880 Button._jQueryInterface = function _jQueryInterface(config) { 1881 return this.each(function () { 1882 var data = $$$1(this).data(DATA_KEY); 1883 1884 if (!data) { 1885 data = new Button(this); 1886 $$$1(this).data(DATA_KEY, data); 1887 } 1888 1889 if (config === 'toggle') { 1890 data[config](); 1891 } 1892 }); 1893 }; 1894 1895 _createClass(Button, null, [{ 1896 key: "VERSION", 1897 get: function get() { 1898 return VERSION; 1899 } 1900 }]); 1901 1902 return Button; 1903 }(); 1904 /** 1905 * ------------------------------------------------------------------------ 1906 * Data Api implementation 1907 * ------------------------------------------------------------------------ 1908 */ 1909 1910 1911 $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { 1912 event.preventDefault(); 1913 var button = event.target; 1914 1915 if (!$$$1(button).hasClass(ClassName.BUTTON)) { 1916 button = $$$1(button).closest(Selector.BUTTON); 1917 } 1918 1919 Button._jQueryInterface.call($$$1(button), 'toggle'); 1920 }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { 1921 var button = $$$1(event.target).closest(Selector.BUTTON)[0]; 1922 $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); 1923 }); 1924 /** 1925 * ------------------------------------------------------------------------ 1926 * jQuery 1927 * ------------------------------------------------------------------------ 1928 */ 1929 1930 $$$1.fn[NAME] = Button._jQueryInterface; 1931 $$$1.fn[NAME].Constructor = Button; 1932 1933 $$$1.fn[NAME].noConflict = function () { 1934 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 1935 return Button._jQueryInterface; 1936 }; 1937 1938 return Button; 1939 }($); 1940 1941 /** 1942 * -------------------------------------------------------------------------- 1943 * Bootstrap (v4.1.0): carousel.js 1944 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1945 * -------------------------------------------------------------------------- 1946 */ 1947 1948 var Carousel = function ($$$1) { 1949 /** 1950 * ------------------------------------------------------------------------ 1951 * Constants 1952 * ------------------------------------------------------------------------ 1953 */ 1954 var NAME = 'carousel'; 1955 var VERSION = '4.1.0'; 1956 var DATA_KEY = 'bs.carousel'; 1957 var EVENT_KEY = "." + DATA_KEY; 1958 var DATA_API_KEY = '.data-api'; 1959 var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; 1960 var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key 1961 1962 var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key 1963 1964 var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch 1965 1966 var Default = { 1967 interval: 5000, 1968 keyboard: true, 1969 slide: false, 1970 pause: 'hover', 1971 wrap: true 1972 }; 1973 var DefaultType = { 1974 interval: '(number|boolean)', 1975 keyboard: 'boolean', 1976 slide: '(boolean|string)', 1977 pause: '(string|boolean)', 1978 wrap: 'boolean' 1979 }; 1980 var Direction = { 1981 NEXT: 'next', 1982 PREV: 'prev', 1983 LEFT: 'left', 1984 RIGHT: 'right' 1985 }; 1986 var Event = { 1987 SLIDE: "slide" + EVENT_KEY, 1988 SLID: "slid" + EVENT_KEY, 1989 KEYDOWN: "keydown" + EVENT_KEY, 1990 MOUSEENTER: "mouseenter" + EVENT_KEY, 1991 MOUSELEAVE: "mouseleave" + EVENT_KEY, 1992 TOUCHEND: "touchend" + EVENT_KEY, 1993 LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY, 1994 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 1995 }; 1996 var ClassName = { 1997 CAROUSEL: 'carousel', 1998 ACTIVE: 'active', 1999 SLIDE: 'slide', 2000 RIGHT: 'carousel-item-right', 2001 LEFT: 'carousel-item-left', 2002 NEXT: 'carousel-item-next', 2003 PREV: 'carousel-item-prev', 2004 ITEM: 'carousel-item' 2005 }; 2006 var Selector = { 2007 ACTIVE: '.active', 2008 ACTIVE_ITEM: '.active.carousel-item', 2009 ITEM: '.carousel-item', 2010 NEXT_PREV: '.carousel-item-next, .carousel-item-prev', 2011 INDICATORS: '.carousel-indicators',
2012 DATA_SLIDE: '[data-slide], [data-slide-to]', 2013 DATA_RIDE: '[data-ride="carousel"]' 2014 /** 2015 * ------------------------------------------------------------------------ 2016 * Class Definition 2017 * ------------------------------------------------------------------------ 2018 */ 2019 2020 }; 2021 2022 var Carousel = 2023 /*#__PURE__*/ 2024 function () { 2025 function Carousel(element, config) { 2026 this._items = null; 2027 this._interval = null; 2028 this._activeElement = null; 2029 this._isPaused = false; 2030 this._isSliding = false; 2031 this.touchTimeout = null; 2032 this._config = this._getConfig(config); 2033 this._element = $$$1(element)[0]; 2034 this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0]; 2035 2036 this._addEventListeners(); 2037 } // Getters 2038 2039 2040 var _proto = Carousel.prototype; 2041 2042 // Public 2043 _proto.next = function next() { 2044 if (!this._isSliding) { 2045 this._slide(Direction.NEXT); 2046 } 2047 }; 2048 2049 _proto.nextWhenVisible = function nextWhenVisible() { 2050 // Don't call next when the page isn't visible 2051 // or the carousel or its parent isn't visible 2052 if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') { 2053 this.next(); 2054 } 2055 }; 2056 2057 _proto.prev = function prev() { 2058 if (!this._isSliding) { 2059 this._slide(Direction.PREV); 2060 } 2061 }; 2062 2063 _proto.pause = function pause(event) { 2064 if (!event) { 2065 this._isPaused = true; 2066 } 2067 2068 if ($$$1(this._element).find(Selector.NEXT_PREV)[0]) { 2069 Util.triggerTransitionEnd(this._element); 2070 this.cycle(true); 2071 } 2072 2073 clearInterval(this._interval); 2074 this._interval = null; 2075 }; 2076 2077 _proto.cycle = function cycle(event) { 2078 if (!event) { 2079 this._isPaused = false; 2080 } 2081 2082 if (this._interval) { 2083 clearInterval(this._interval); 2084 this._interval = null; 2085 } 2086 2087 if (this._config.interval && !this._isPaused) { 2088 this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); 2089 } 2090 }; 2091 2092 _proto.to = function to(index) { 2093 var _this = this; 2094 2095 this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0]; 2096 2097 var activeIndex = this._getItemIndex(this._activeElement); 2098 2099 if (index > this._items.length - 1 || index < 0) { 2100 return; 2101 } 2102 2103 if (this._isSliding) { 2104 $$$1(this._element).one(Event.SLID, function () { 2105 return _this.to(index); 2106 }); 2107 return; 2108 } 2109 2110 if (activeIndex === index) { 2111 this.pause(); 2112 this.cycle(); 2113 return; 2114 } 2115 2116 var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; 2117 2118 this._slide(direction, this._items[index]); 2119 }; 2120 2121 _proto.dispose = function dispose() { 2122 $$$1(this._element).off(EVENT_KEY); 2123 $$$1.removeData(this._element, DATA_KEY); 2124 this._items = null; 2125 this._config = null; 2126 this._element = null; 2127 this._interval = null; 2128 this._isPaused = null; 2129 this._isSliding = null; 2130 this._activeElement = null; 2131 this._indicatorsElement = null; 2132 }; // Private 2133 2134 2135 _proto._getConfig = function _getConfig(config) { 2136 config = _objectSpread({}, Default, config); 2137 Util.typeCheckConfig(NAME, config, DefaultType); 2138 return config; 2139 }; 2140 2141 _proto._addEventListeners = function _addEventListeners() { 2142 var _this2 = this; 2143 2144 if (this._config.keyboard) { 2145 $$$1(this._element).on(Event.KEYDOWN, function (event) { 2146 return _this2._keydown(event); 2147 }); 2148 } 2149 2150 if (this._config.pause === 'hover') { 2151 $$$1(this._element).on(Event.MOUSEENTER, function (event) { 2152 return _this2.pause(event); 2153 }).on(Event.MOUSELEAVE, function (event) { 2154 return _this2.cycle(event); 2155 }); 2156 2157 if ('ontouchstart' in document.documentElement) {
2158 // If it's a touch-enabled device, mouseenter/leave are fired as 2159 // part of the mouse compatibility events on first tap - the carousel 2160 // would stop cycling until user tapped out of it; 2161 // here, we listen for touchend, explicitly pause the carousel 2162 // (as if it's the second time we tap on it, mouseenter compat event 2163 // is NOT fired) and after a timeout (to allow for mouse compatibility 2164 // events to fire) we explicitly restart cycling 2165 $$$1(this._element).on(Event.TOUCHEND, function () { 2166 _this2.pause(); 2167 2168 if (_this2.touchTimeout) { 2169 clearTimeout(_this2.touchTimeout); 2170 } 2171 2172 _this2.touchTimeout = setTimeout(function (event) { 2173 return _this2.cycle(event); 2174 }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval); 2175 }); 2176 } 2177 } 2178 }; 2179 2180 _proto._keydown = function _keydown(event) { 2181 if (/input|textarea/i.test(event.target.tagName)) { 2182 return; 2183 } 2184 2185 switch (event.which) { 2186 case ARROW_LEFT_KEYCODE: 2187 event.preventDefault(); 2188 this.prev(); 2189 break; 2190 2191 case ARROW_RIGHT_KEYCODE: 2192 event.preventDefault(); 2193 this.next(); 2194 break; 2195 2196 default: 2197 } 2198 }; 2199 2200 _proto._getItemIndex = function _getItemIndex(element) { 2201 this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM)); 2202 return this._items.indexOf(element); 2203 }; 2204 2205 _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { 2206 var isNextDirection = direction === Direction.NEXT; 2207 var isPrevDirection = direction === Direction.PREV; 2208 2209 var activeIndex = this._getItemIndex(activeElement); 2210 2211 var lastItemIndex = this._items.length - 1; 2212 var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; 2213 2214 if (isGoingToWrap && !this._config.wrap) { 2215 return activeElement; 2216 } 2217 2218 var delta = direction === Direction.PREV ? -1 : 1; 2219 var itemIndex = (activeIndex + delta) % this._items.length; 2220 return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; 2221 }; 2222 2223 _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { 2224 var targetIndex = this._getItemIndex(relatedTarget); 2225 2226 var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]); 2227 2228 var slideEvent = $$$1.Event(Event.SLIDE, { 2229 relatedTarget: relatedTarget, 2230 direction: eventDirectionName, 2231 from: fromIndex, 2232 to: targetIndex 2233 }); 2234 $$$1(this._element).trigger(slideEvent); 2235 return slideEvent; 2236 }; 2237 2238 _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { 2239 if (this._indicatorsElement) { 2240 $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); 2241 2242 var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; 2243 2244 if (nextIndicator) { 2245 $$$1(nextIndicator).addClass(ClassName.ACTIVE); 2246 } 2247 } 2248 }; 2249 2250 _proto._slide = function _slide(direction, element) { 2251 var _this3 = this; 2252 2253 var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0]; 2254 2255 var activeElementIndex = this._getItemIndex(activeElement); 2256 2257 var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); 2258 2259 var nextElementIndex = this._getItemIndex(nextElement); 2260 2261 var isCycling = Boolean(this._interval); 2262 var directionalClassName; 2263 var orderClassName; 2264 var eventDirectionName; 2265 2266 if (direction === Direction.NEXT) { 2267 directionalClassName = ClassName.LEFT; 2268 orderClassName = ClassName.NEXT; 2269 eventDirectionName = Direction.LEFT; 2270 } else { 2271 directionalClassName = ClassName.RIGHT; 2272 orderClassName = ClassName.PREV; 2273 eventDirectionName = Direction.RIGHT; 2274 } 2275 2276 if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) { 2277 this._isSliding = false;
2278 return; 2279 } 2280 2281 var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); 2282 2283 if (slideEvent.isDefaultPrevented()) { 2284 return; 2285 } 2286 2287 if (!activeElement || !nextElement) { 2288 // Some weirdness is happening, so we bail 2289 return; 2290 } 2291 2292 this._isSliding = true; 2293 2294 if (isCycling) { 2295 this.pause(); 2296 } 2297 2298 this._setActiveIndicatorElement(nextElement); 2299 2300 var slidEvent = $$$1.Event(Event.SLID, { 2301 relatedTarget: nextElement, 2302 direction: eventDirectionName, 2303 from: activeElementIndex, 2304 to: nextElementIndex 2305 }); 2306 2307 if ($$$1(this._element).hasClass(ClassName.SLIDE)) { 2308 $$$1(nextElement).addClass(orderClassName); 2309 Util.reflow(nextElement); 2310 $$$1(activeElement).addClass(directionalClassName); 2311 $$$1(nextElement).addClass(directionalClassName); 2312 var transitionDuration = Util.getTransitionDurationFromElement(activeElement); 2313 $$$1(activeElement).one(Util.TRANSITION_END, function () { 2314 $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE); 2315 $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName); 2316 _this3._isSliding = false; 2317 setTimeout(function () { 2318 return $$$1(_this3._element).trigger(slidEvent); 2319 }, 0); 2320 }).emulateTransitionEnd(transitionDuration); 2321 } else { 2322 $$$1(activeElement).removeClass(ClassName.ACTIVE); 2323 $$$1(nextElement).addClass(ClassName.ACTIVE); 2324 this._isSliding = false; 2325 $$$1(this._element).trigger(slidEvent); 2326 } 2327 2328 if (isCycling) { 2329 this.cycle(); 2330 } 2331 }; // Static 2332 2333 2334 Carousel._jQueryInterface = function _jQueryInterface(config) { 2335 return this.each(function () { 2336 var data = $$$1(this).data(DATA_KEY); 2337 2338 var _config = _objectSpread({}, Default, $$$1(this).data()); 2339 2340 if (typeof config === 'object') { 2341 _config = _objectSpread({}, _config, config); 2342 } 2343 2344 var action = typeof config === 'string' ? config : _config.slide; 2345 2346 if (!data) { 2347 data = new Carousel(this, _config); 2348 $$$1(this).data(DATA_KEY, data); 2349 } 2350 2351 if (typeof config === 'number') { 2352 data.to(config); 2353 } else if (typeof action === 'string') { 2354 if (typeof data[action] === 'undefined') { 2355 throw new TypeError("No method named \"" + action + "\""); 2356 } 2357 2358 data[action](); 2359 } else if (_config.interval) { 2360 data.pause(); 2361 data.cycle(); 2362 } 2363 }); 2364 }; 2365 2366 Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { 2367 var selector = Util.getSelectorFromElement(this); 2368 2369 if (!selector) { 2370 return; 2371 } 2372 2373 var target = $$$1(selector)[0]; 2374 2375 if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) { 2376 return; 2377 } 2378 2379 var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data()); 2380 2381 var slideIndex = this.getAttribute('data-slide-to'); 2382 2383 if (slideIndex) { 2384 config.interval = false; 2385 } 2386 2387 Carousel._jQueryInterface.call($$$1(target), config); 2388 2389 if (slideIndex) { 2390 $$$1(target).data(DATA_KEY).to(slideIndex); 2391 } 2392 2393 event.preventDefault(); 2394 }; 2395 2396 _createClass(Carousel, null, [{ 2397 key: "VERSION", 2398 get: function get() { 2399 return VERSION; 2400 } 2401 }, { 2402 key: "Default", 2403 get: function get() { 2404 return Default; 2405 } 2406 }]); 2407 2408 return Carousel; 2409 }(); 2410 /** 2411 * ------------------------------------------------------------------------ 2412 * Data Api implementation 2413 * ------------------------------------------------------------------------ 2414 */ 2415 2416 2417 $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); 2418 $$$1(window).on(Event.LOAD_DATA_API, function () { 2419 $$$1(Selector.DATA_RIDE).each(function () { 2420 var $carousel = $$$1(this); 2421
2422 Carousel._jQueryInterface.call($carousel, $carousel.data()); 2423 }); 2424 }); 2425 /** 2426 * ------------------------------------------------------------------------ 2427 * jQuery 2428 * ------------------------------------------------------------------------ 2429 */ 2430 2431 $$$1.fn[NAME] = Carousel._jQueryInterface; 2432 $$$1.fn[NAME].Constructor = Carousel; 2433 2434 $$$1.fn[NAME].noConflict = function () { 2435 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 2436 return Carousel._jQueryInterface; 2437 }; 2438 2439 return Carousel; 2440 }($); 2441 2442 /** 2443 * -------------------------------------------------------------------------- 2444 * Bootstrap (v4.1.0): collapse.js 2445 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2446 * -------------------------------------------------------------------------- 2447 */ 2448 2449 var Collapse = function ($$$1) { 2450 /** 2451 * ------------------------------------------------------------------------ 2452 * Constants 2453 * ------------------------------------------------------------------------ 2454 */ 2455 var NAME = 'collapse'; 2456 var VERSION = '4.1.0'; 2457 var DATA_KEY = 'bs.collapse'; 2458 var EVENT_KEY = "." + DATA_KEY; 2459 var DATA_API_KEY = '.data-api'; 2460 var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; 2461 var Default = { 2462 toggle: true, 2463 parent: '' 2464 }; 2465 var DefaultType = { 2466 toggle: 'boolean', 2467 parent: '(string|element)' 2468 }; 2469 var Event = { 2470 SHOW: "show" + EVENT_KEY, 2471 SHOWN: "shown" + EVENT_KEY, 2472 HIDE: "hide" + EVENT_KEY, 2473 HIDDEN: "hidden" + EVENT_KEY, 2474 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 2475 }; 2476 var ClassName = { 2477 SHOW: 'show', 2478 COLLAPSE: 'collapse', 2479 COLLAPSING: 'collapsing', 2480 COLLAPSED: 'collapsed' 2481 }; 2482 var Dimension = { 2483 WIDTH: 'width', 2484 HEIGHT: 'height' 2485 }; 2486 var Selector = { 2487 ACTIVES: '.show, .collapsing', 2488 DATA_TOGGLE: '[data-toggle="collapse"]' 2489 /** 2490 * ------------------------------------------------------------------------ 2491 * Class Definition 2492 * ------------------------------------------------------------------------ 2493 */ 2494 2495 }; 2496 2497 var Collapse = 2498 /*#__PURE__*/ 2499 function () { 2500 function Collapse(element, config) { 2501 this._isTransitioning = false; 2502 this._element = element; 2503 this._config = this._getConfig(config); 2504 this._triggerArray = $$$1.makeArray($$$1("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); 2505 var tabToggles = $$$1(Selector.DATA_TOGGLE); 2506 2507 for (var i = 0; i < tabToggles.length; i++) { 2508 var elem = tabToggles[i]; 2509 var selector = Util.getSelectorFromElement(elem); 2510 2511 if (selector !== null && $$$1(selector).filter(element).length > 0) { 2512 this._selector = selector; 2513 2514 this._triggerArray.push(elem); 2515 } 2516 } 2517 2518 this._parent = this._config.parent ? this._getParent() : null; 2519 2520 if (!this._config.parent) { 2521 this._addAriaAndCollapsedClass(this._element, this._triggerArray); 2522 } 2523 2524 if (this._config.toggle) { 2525 this.toggle(); 2526 } 2527 } // Getters 2528 2529 2530 var _proto = Collapse.prototype; 2531 2532 // Public 2533 _proto.toggle = function toggle() { 2534 if ($$$1(this._element).hasClass(ClassName.SHOW)) { 2535 this.hide(); 2536 } else { 2537 this.show(); 2538 } 2539 }; 2540 2541 _proto.show = function show() { 2542 var _this = this; 2543 2544 if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) { 2545 return; 2546 } 2547 2548 var actives; 2549 var activesData; 2550 2551 if (this._parent) { 2552 actives = $$$1.makeArray($$$1(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"" + this._config.parent + "\"]")); 2553 2554 if (actives.length === 0) { 2555 actives = null; 2556 } 2557 } 2558 2559 if (actives) { 2560 activesData = $$$1(actives).not(this._selector).data(DATA_KEY); 2561 2562 if (activesData && activesData._isTransitioning) { 2563 return; 2564 } 2565 } 2566 2567 var startEvent = $$$1.Event(Event.SHOW); 2568 $$$1(this._element).trigger(startEvent); 2569 2570 if (startEvent.isDefaultPrevented()) { 2571 return; 2572 } 2573 2574 if (actives) { 2575 Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide'); 2576 2577 if (!activesData) { 2578 $$$1(actives).data(DATA_KEY, null); 2579 } 2580 } 2581 2582 var dimension = this._getDimension(); 2583 2584 $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); 2585 this._element.style[dimension] = 0; 2586 2587 if (this._triggerArray.length > 0) { 2588 $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); 2589 } 2590 2591 this.setTransitioning(true); 2592 2593 var complete = function complete() { 2594 $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW); 2595 _this._element.style[dimension] = ''; 2596
2597 _this.setTransitioning(false); 2598 2599 $$$1(_this._element).trigger(Event.SHOWN); 2600 }; 2601 2602 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); 2603 var scrollSize = "scroll" + capitalizedDimension; 2604 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 2605 $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 2606 this._element.style[dimension] = this._element[scrollSize] + "px"; 2607 }; 2608 2609 _proto.hide = function hide() { 2610 var _this2 = this; 2611 2612 if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) { 2613 return; 2614 } 2615 2616 var startEvent = $$$1.Event(Event.HIDE); 2617 $$$1(this._element).trigger(startEvent); 2618 2619 if (startEvent.isDefaultPrevented()) { 2620 return; 2621 } 2622 2623 var dimension = this._getDimension(); 2624 2625 this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; 2626 Util.reflow(this._element); 2627 $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); 2628 2629 if (this._triggerArray.length > 0) { 2630 for (var i = 0; i < this._triggerArray.length; i++) { 2631 var trigger = this._triggerArray[i]; 2632 var selector = Util.getSelectorFromElement(trigger); 2633 2634 if (selector !== null) { 2635 var $elem = $$$1(selector); 2636 2637 if (!$elem.hasClass(ClassName.SHOW)) { 2638 $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); 2639 } 2640 } 2641 } 2642 } 2643 2644 this.setTransitioning(true); 2645 2646 var complete = function complete() { 2647 _this2.setTransitioning(false); 2648 2649 $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); 2650 }; 2651 2652 this._element.style[dimension] = ''; 2653 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 2654 $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 2655 }; 2656 2657 _proto.setTransitioning = function setTransitioning(isTransitioning) { 2658 this._isTransitioning = isTransitioning; 2659 }; 2660 2661 _proto.dispose = function dispose() { 2662 $$$1.removeData(this._element, DATA_KEY); 2663 this._config = null; 2664 this._parent = null; 2665 this._element = null; 2666 this._triggerArray = null; 2667 this._isTransitioning = null; 2668 }; // Private 2669 2670 2671 _proto._getConfig = function _getConfig(config) { 2672 config = _objectSpread({}, Default, config); 2673 config.toggle = Boolean(config.toggle); // Coerce string values 2674 2675 Util.typeCheckConfig(NAME, config, DefaultType); 2676 return config; 2677 }; 2678 2679 _proto._getDimension = function _getDimension() { 2680 var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH); 2681 return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; 2682 }; 2683 2684 _proto._getParent = function _getParent() { 2685 var _this3 = this; 2686 2687 var parent = null; 2688 2689 if (Util.isElement(this._config.parent)) { 2690 parent = this._config.parent; // It's a jQuery object 2691 2692 if (typeof this._config.parent.jquery !== 'undefined') { 2693 parent = this._config.parent[0]; 2694 } 2695 } else { 2696 parent = $$$1(this._config.parent)[0]; 2697 } 2698 2699 var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; 2700 $$$1(parent).find(selector).each(function (i, element) { 2701 _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); 2702 }); 2703 return parent; 2704 }; 2705 2706 _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { 2707 if (element) { 2708 var isOpen = $$$1(element).hasClass(ClassName.SHOW); 2709 2710 if (triggerArray.length > 0) { 2711 $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); 2712 } 2713 } 2714 }; // Static 2715 2716
2717 Collapse._getTargetFromElement = function _getTargetFromElement(element) { 2718 var selector = Util.getSelectorFromElement(element); 2719 return selector ? $$$1(selector)[0] : null; 2720 }; 2721 2722 Collapse._jQueryInterface = function _jQueryInterface(config) { 2723 return this.each(function () { 2724 var $this = $$$1(this); 2725 var data = $this.data(DATA_KEY); 2726 2727 var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config); 2728 2729 if (!data && _config.toggle && /show|hide/.test(config)) { 2730 _config.toggle = false; 2731 } 2732 2733 if (!data) { 2734 data = new Collapse(this, _config); 2735 $this.data(DATA_KEY, data); 2736 } 2737 2738 if (typeof config === 'string') { 2739 if (typeof data[config] === 'undefined') { 2740 throw new TypeError("No method named \"" + config + "\""); 2741 } 2742 2743 data[config](); 2744 } 2745 }); 2746 }; 2747 2748 _createClass(Collapse, null, [{ 2749 key: "VERSION", 2750 get: function get() { 2751 return VERSION; 2752 } 2753 }, { 2754 key: "Default", 2755 get: function get() { 2756 return Default; 2757 } 2758 }]); 2759 2760 return Collapse; 2761 }(); 2762 /** 2763 * ------------------------------------------------------------------------ 2764 * Data Api implementation 2765 * ------------------------------------------------------------------------ 2766 */ 2767 2768 2769 $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 2770 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element 2771 if (event.currentTarget.tagName === 'A') { 2772 event.preventDefault(); 2773 } 2774 2775 var $trigger = $$$1(this); 2776 var selector = Util.getSelectorFromElement(this); 2777 $$$1(selector).each(function () { 2778 var $target = $$$1(this); 2779 var data = $target.data(DATA_KEY); 2780 var config = data ? 'toggle' : $trigger.data(); 2781 2782 Collapse._jQueryInterface.call($target, config); 2783 }); 2784 }); 2785 /** 2786 * ------------------------------------------------------------------------ 2787 * jQuery 2788 * ------------------------------------------------------------------------ 2789 */ 2790 2791 $$$1.fn[NAME] = Collapse._jQueryInterface; 2792 $$$1.fn[NAME].Constructor = Collapse; 2793 2794 $$$1.fn[NAME].noConflict = function () { 2795 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 2796 return Collapse._jQueryInterface; 2797 }; 2798 2799 return Collapse; 2800 }($); 2801 2802 /** 2803 * -------------------------------------------------------------------------- 2804 * Bootstrap (v4.1.0): dropdown.js 2805 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2806 * -------------------------------------------------------------------------- 2807 */ 2808 2809 var Dropdown = function ($$$1) { 2810 /** 2811 * ------------------------------------------------------------------------ 2812 * Constants 2813 * ------------------------------------------------------------------------ 2814 */ 2815 var NAME = 'dropdown'; 2816 var VERSION = '4.1.0'; 2817 var DATA_KEY = 'bs.dropdown'; 2818 var EVENT_KEY = "." + DATA_KEY; 2819 var DATA_API_KEY = '.data-api'; 2820 var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; 2821 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key 2822 2823 var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key 2824 2825 var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key 2826 2827 var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key 2828 2829 var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key 2830 2831 var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) 2832 2833 var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); 2834 var Event = { 2835 HIDE: "hide" + EVENT_KEY, 2836 HIDDEN: "hidden" + EVENT_KEY, 2837 SHOW: "show" + EVENT_KEY, 2838 SHOWN: "shown" + EVENT_KEY, 2839 CLICK: "click" + EVENT_KEY, 2840 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, 2841 KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY, 2842 KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY 2843 }; 2844 var ClassName = { 2845 DISABLED: 'disabled', 2846 SHOW: 'show', 2847 DROPUP: 'dropup', 2848 DROPRIGHT: 'dropright', 2849 DROPLEFT: 'dropleft', 2850 MENURIGHT: 'dropdown-menu-right', 2851 MENULEFT: 'dropdown-menu-left', 2852 POSITION_STATIC: 'position-static' 2853 }; 2854 var Selector = { 2855 DATA_TOGGLE: '[data-toggle="dropdown"]', 2856 FORM_CHILD: '.dropdown form', 2857 MENU: '.dropdown-menu', 2858 NAVBAR_NAV: '.navbar-nav', 2859 VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' 2860 }; 2861 var AttachmentMap = { 2862 TOP: 'top-start', 2863 TOPEND: 'top-end', 2864 BOTTOM: 'bottom-start', 2865 BOTTOMEND: 'bottom-end', 2866 RIGHT: 'right-start', 2867 RIGHTEND: 'right-end', 2868 LEFT: 'left-start', 2869 LEFTEND: 'left-end' 2870 }; 2871 var Default = { 2872 offset: 0, 2873 flip: true, 2874 boundary: 'scrollParent', 2875 reference: 'toggle', 2876 display: 'dynamic' 2877 }; 2878 var DefaultType = { 2879 offset: '(number|string|function)', 2880 flip: 'boolean', 2881 boundary: '(string|element)', 2882 reference: '(string|element)', 2883 display: 'string' 2884 /** 2885 * ------------------------------------------------------------------------ 2886 * Class Definition 2887 * ------------------------------------------------------------------------ 2888 */ 2889 2890 }; 2891 2892 var Dropdown = 2893 /*#__PURE__*/ 2894 function () { 2895 function Dropdown(element, config) { 2896 this._element = element; 2897 this._popper = null; 2898 this._config = this._getConfig(config); 2899 this._menu = this._getMenuElement(); 2900 this._inNavbar = this._detectNavbar(); 2901 2902 this._addEventListeners(); 2903 } // Getters 2904 2905 2906 var _proto = Dropdown.prototype; 2907 2908 // Public
2909 _proto.toggle = function toggle() { 2910 if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) { 2911 return; 2912 } 2913 2914 var parent = Dropdown._getParentFromElement(this._element); 2915 2916 var isActive = $$$1(this._menu).hasClass(ClassName.SHOW); 2917 2918 Dropdown._clearMenus(); 2919 2920 if (isActive) { 2921 return; 2922 } 2923 2924 var relatedTarget = { 2925 relatedTarget: this._element 2926 }; 2927 var showEvent = $$$1.Event(Event.SHOW, relatedTarget); 2928 $$$1(parent).trigger(showEvent); 2929 2930 if (showEvent.isDefaultPrevented()) { 2931 return; 2932 } // Disable totally Popper.js for Dropdown in Navbar 2933 2934 2935 if (!this._inNavbar) { 2936 /** 2937 * Check for Popper dependency 2938 * Popper - https://popper.js.org 2939 */ 2940 if (typeof Popper === 'undefined') { 2941 throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)'); 2942 } 2943 2944 var referenceElement = this._element; 2945 2946 if (this._config.reference === 'parent') { 2947 referenceElement = parent; 2948 } else if (Util.isElement(this._config.reference)) { 2949 referenceElement = this._config.reference; // Check if it's jQuery element 2950 2951 if (typeof this._config.reference.jquery !== 'undefined') { 2952 referenceElement = this._config.reference[0]; 2953 } 2954 } // If boundary is not `scrollParent`, then set position to `static` 2955 // to allow the menu to "escape" the scroll parent's boundaries 2956 // https://github.com/twbs/bootstrap/issues/24251 2957 2958 2959 if (this._config.boundary !== 'scrollParent') { 2960 $$$1(parent).addClass(ClassName.POSITION_STATIC); 2961 } 2962 2963 this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); 2964 } // If this is a touch-enabled device we add extra 2965 // empty mouseover listeners to the body's immediate children; 2966 // only needed because of broken event delegation on iOS 2967 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 2968 2969 2970 if ('ontouchstart' in document.documentElement && $$$1(parent).closest(Selector.NAVBAR_NAV).length === 0) { 2971 $$$1(document.body).children().on('mouseover', null, $$$1.noop); 2972 } 2973 2974 this._element.focus(); 2975 2976 this._element.setAttribute('aria-expanded', true); 2977 2978 $$$1(this._menu).toggleClass(ClassName.SHOW); 2979 $$$1(parent).toggleClass(ClassName.SHOW).trigger($$$1.Event(Event.SHOWN, relatedTarget)); 2980 }; 2981 2982 _proto.dispose = function dispose() { 2983 $$$1.removeData(this._element, DATA_KEY); 2984 $$$1(this._element).off(EVENT_KEY); 2985 this._element = null; 2986 this._menu = null; 2987 2988 if (this._popper !== null) { 2989 this._popper.destroy(); 2990 2991 this._popper = null; 2992 } 2993 }; 2994 2995 _proto.update = function update() { 2996 this._inNavbar = this._detectNavbar(); 2997 2998 if (this._popper !== null) { 2999 this._popper.scheduleUpdate(); 3000 } 3001 }; // Private 3002 3003 3004 _proto._addEventListeners = function _addEventListeners() { 3005 var _this = this; 3006 3007 $$$1(this._element).on(Event.CLICK, function (event) { 3008 event.preventDefault(); 3009 event.stopPropagation(); 3010 3011 _this.toggle(); 3012 }); 3013 }; 3014 3015 _proto._getConfig = function _getConfig(config) { 3016 config = _objectSpread({}, this.constructor.Default, $$$1(this._element).data(), config); 3017 Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); 3018 return config; 3019 }; 3020 3021 _proto._getMenuElement = function _getMenuElement() { 3022 if (!this._menu) { 3023 var parent = Dropdown._getParentFromElement(this._element); 3024 3025 this._menu = $$$1(parent).find(Selector.MENU)[0]; 3026 } 3027 3028 return this._menu; 3029 }; 3030 3031 _proto._getPlacement = function _getPlacement() { 3032 var $parentDropdown = $$$1(this._element).parent(); 3033 var placement = AttachmentMap.BOTTOM; // Handle dropup 3034 3035 if ($parentDropdown.hasClass(ClassName.DROPUP)) { 3036 placement = AttachmentMap.TOP; 3037
3038 if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { 3039 placement = AttachmentMap.TOPEND; 3040 } 3041 } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) { 3042 placement = AttachmentMap.RIGHT; 3043 } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) { 3044 placement = AttachmentMap.LEFT; 3045 } else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { 3046 placement = AttachmentMap.BOTTOMEND; 3047 } 3048 3049 return placement; 3050 }; 3051 3052 _proto._detectNavbar = function _detectNavbar() { 3053 return $$$1(this._element).closest('.navbar').length > 0; 3054 }; 3055 3056 _proto._getPopperConfig = function _getPopperConfig() { 3057 var _this2 = this; 3058 3059 var offsetConf = {}; 3060 3061 if (typeof this._config.offset === 'function') { 3062 offsetConf.fn = function (data) { 3063 data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {}); 3064 return data; 3065 }; 3066 } else { 3067 offsetConf.offset = this._config.offset; 3068 } 3069 3070 var popperConfig = { 3071 placement: this._getPlacement(), 3072 modifiers: { 3073 offset: offsetConf, 3074 flip: { 3075 enabled: this._config.flip 3076 }, 3077 preventOverflow: { 3078 boundariesElement: this._config.boundary 3079 } 3080 } // Disable Popper.js if we have a static display 3081 3082 }; 3083 3084 if (this._config.display === 'static') { 3085 popperConfig.modifiers.applyStyle = { 3086 enabled: false 3087 }; 3088 } 3089 3090 return popperConfig; 3091 }; // Static 3092 3093 3094 Dropdown._jQueryInterface = function _jQueryInterface(config) { 3095 return this.each(function () { 3096 var data = $$$1(this).data(DATA_KEY); 3097 3098 var _config = typeof config === 'object' ? config : null; 3099 3100 if (!data) { 3101 data = new Dropdown(this, _config); 3102 $$$1(this).data(DATA_KEY, data); 3103 } 3104 3105 if (typeof config === 'string') { 3106 if (typeof data[config] === 'undefined') { 3107 throw new TypeError("No method named \"" + config + "\""); 3108 } 3109 3110 data[config](); 3111 } 3112 }); 3113 }; 3114 3115 Dropdown._clearMenus = function _clearMenus(event) { 3116 if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { 3117 return; 3118 } 3119 3120 var toggles = $$$1.makeArray($$$1(Selector.DATA_TOGGLE)); 3121 3122 for (var i = 0; i < toggles.length; i++) { 3123 var parent = Dropdown._getParentFromElement(toggles[i]); 3124 3125 var context = $$$1(toggles[i]).data(DATA_KEY); 3126 var relatedTarget = { 3127 relatedTarget: toggles[i] 3128 }; 3129 3130 if (!context) { 3131 continue; 3132 } 3133 3134 var dropdownMenu = context._menu; 3135 3136 if (!$$$1(parent).hasClass(ClassName.SHOW)) { 3137 continue; 3138 } 3139 3140 if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $$$1.contains(parent, event.target)) { 3141 continue; 3142 } 3143 3144 var hideEvent = $$$1.Event(Event.HIDE, relatedTarget); 3145 $$$1(parent).trigger(hideEvent); 3146 3147 if (hideEvent.isDefaultPrevented()) { 3148 continue; 3149 } // If this is a touch-enabled device we remove the extra 3150 // empty mouseover listeners we added for iOS support 3151 3152 3153 if ('ontouchstart' in document.documentElement) { 3154 $$$1(document.body).children().off('mouseover', null, $$$1.noop); 3155 } 3156 3157 toggles[i].setAttribute('aria-expanded', 'false'); 3158 $$$1(dropdownMenu).removeClass(ClassName.SHOW); 3159 $$$1(parent).removeClass(ClassName.SHOW).trigger($$$1.Event(Event.HIDDEN, relatedTarget)); 3160 } 3161 }; 3162 3163 Dropdown._getParentFromElement = function _getParentFromElement(element) { 3164 var parent; 3165 var selector = Util.getSelectorFromElement(element); 3166 3167 if (selector) { 3168 parent = $$$1(selector)[0]; 3169 } 3170 3171 return parent || element.parentNode; 3172 }; // eslint-disable-next-line complexity 3173 3174 3175 Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { 3176 // If not input/textarea: 3177 // - And not a key in REGEXP_KEYDOWN => not a dropdown command 3178 // If input/textarea: 3179 // - If space key => not a dropdown command 3180 // - If key is other than escape 3181 // - If key is not up or down => not a dropdown command 3182 // - If trigger inside the menu =>
3182 not a dropdown command 3183 if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $$$1(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { 3184 return; 3185 } 3186 3187 event.preventDefault(); 3188 event.stopPropagation(); 3189 3190 if (this.disabled || $$$1(this).hasClass(ClassName.DISABLED)) { 3191 return; 3192 } 3193 3194 var parent = Dropdown._getParentFromElement(this); 3195 3196 var isActive = $$$1(parent).hasClass(ClassName.SHOW); 3197 3198 if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { 3199 if (event.which === ESCAPE_KEYCODE) { 3200 var toggle = $$$1(parent).find(Selector.DATA_TOGGLE)[0]; 3201 $$$1(toggle).trigger('focus'); 3202 } 3203 3204 $$$1(this).trigger('click'); 3205 return; 3206 } 3207 3208 var items = $$$1(parent).find(Selector.VISIBLE_ITEMS).get(); 3209 3210 if (items.length === 0) { 3211 return; 3212 } 3213 3214 var index = items.indexOf(event.target); 3215 3216 if (event.which === ARROW_UP_KEYCODE && index > 0) { 3217 // Up 3218 index--; 3219 } 3220 3221 if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { 3222 // Down 3223 index++; 3224 } 3225 3226 if (index < 0) { 3227 index = 0; 3228 } 3229 3230 items[index].focus(); 3231 }; 3232 3233 _createClass(Dropdown, null, [{ 3234 key: "VERSION", 3235 get: function get() { 3236 return VERSION; 3237 } 3238 }, { 3239 key: "Default", 3240 get: function get() { 3241 return Default; 3242 } 3243 }, { 3244 key: "DefaultType", 3245 get: function get() { 3246 return DefaultType; 3247 } 3248 }]); 3249 3250 return Dropdown; 3251 }(); 3252 /** 3253 * ------------------------------------------------------------------------ 3254 * Data Api implementation 3255 * ------------------------------------------------------------------------ 3256 */ 3257 3258 3259 $$$1(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 3260 event.preventDefault(); 3261 event.stopPropagation(); 3262 3263 Dropdown._jQueryInterface.call($$$1(this), 'toggle'); 3264 }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { 3265 e.stopPropagation(); 3266 }); 3267 /** 3268 * ------------------------------------------------------------------------ 3269 * jQuery 3270 * ------------------------------------------------------------------------ 3271 */ 3272 3273 $$$1.fn[NAME] = Dropdown._jQueryInterface; 3274 $$$1.fn[NAME].Constructor = Dropdown; 3275 3276 $$$1.fn[NAME].noConflict = function () { 3277 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 3278 return Dropdown._jQueryInterface; 3279 }; 3280 3281 return Dropdown; 3282 }($, Popper); 3283 3284 /** 3285 * -------------------------------------------------------------------------- 3286 * Bootstrap (v4.1.0): modal.js 3287 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 3288 * -------------------------------------------------------------------------- 3289 */ 3290 3291 var Modal = function ($$$1) { 3292 /** 3293 * ------------------------------------------------------------------------ 3294 * Constants 3295 * ------------------------------------------------------------------------ 3296 */ 3297 var NAME = 'modal'; 3298 var VERSION = '4.1.0'; 3299 var DATA_KEY = 'bs.modal'; 3300 var EVENT_KEY = "." + DATA_KEY; 3301 var DATA_API_KEY = '.data-api'; 3302 var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; 3303 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key 3304 3305 var Default = { 3306 backdrop: true, 3307 keyboard: true, 3308 focus: true, 3309 show: true 3310 }; 3311 var DefaultType = { 3312 backdrop: '(boolean|string)', 3313 keyboard: 'boolean', 3314 focus: 'boolean', 3315 show: 'boolean' 3316 }; 3317 var Event = { 3318 HIDE: "hide" + EVENT_KEY, 3319 HIDDEN: "hidden" + EVENT_KEY, 3320 SHOW: "show" + EVENT_KEY, 3321 SHOWN: "shown" + EVENT_KEY, 3322 FOCUSIN: "focusin" + EVENT_KEY, 3323 RESIZE: "resize" + EVENT_KEY, 3324 CLICK_DISMISS: "click.dismiss" + EVENT_KEY, 3325 KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY, 3326 MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY, 3327 MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY, 3328 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 3329 }; 3330 var ClassName = {
3331 SCROLLBAR_MEASURER: 'modal-scrollbar-measure', 3332 BACKDROP: 'modal-backdrop', 3333 OPEN: 'modal-open', 3334 FADE: 'fade', 3335 SHOW: 'show' 3336 }; 3337 var Selector = { 3338 DIALOG: '.modal-dialog', 3339 DATA_TOGGLE: '[data-toggle="modal"]', 3340 DATA_DISMISS: '[data-dismiss="modal"]', 3341 FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', 3342 STICKY_CONTENT: '.sticky-top', 3343 NAVBAR_TOGGLER: '.navbar-toggler' 3344 /** 3345 * ------------------------------------------------------------------------ 3346 * Class Definition 3347 * ------------------------------------------------------------------------ 3348 */ 3349 3350 }; 3351 3352 var Modal = 3353 /*#__PURE__*/ 3354 function () { 3355 function Modal(element, config) { 3356 this._config = this._getConfig(config); 3357 this._element = element; 3358 this._dialog = $$$1(element).find(Selector.DIALOG)[0]; 3359 this._backdrop = null; 3360 this._isShown = false; 3361 this._isBodyOverflowing = false; 3362 this._ignoreBackdropClick = false; 3363 this._scrollbarWidth = 0; 3364 } // Getters 3365 3366 3367 var _proto = Modal.prototype; 3368 3369 // Public 3370 _proto.toggle = function toggle(relatedTarget) { 3371 return this._isShown ? this.hide() : this.show(relatedTarget); 3372 }; 3373 3374 _proto.show = function show(relatedTarget) { 3375 var _this = this; 3376 3377 if (this._isTransitioning || this._isShown) { 3378 return; 3379 } 3380 3381 if ($$$1(this._element).hasClass(ClassName.FADE)) { 3382 this._isTransitioning = true; 3383 } 3384 3385 var showEvent = $$$1.Event(Event.SHOW, { 3386 relatedTarget: relatedTarget 3387 }); 3388 $$$1(this._element).trigger(showEvent); 3389 3390 if (this._isShown || showEvent.isDefaultPrevented()) { 3391 return; 3392 } 3393 3394 this._isShown = true; 3395 3396 this._checkScrollbar(); 3397 3398 this._setScrollbar(); 3399 3400 this._adjustDialog(); 3401 3402 $$$1(document.body).addClass(ClassName.OPEN); 3403 3404 this._setEscapeEvent(); 3405 3406 this._setResizeEvent(); 3407 3408 $$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) { 3409 return _this.hide(event); 3410 }); 3411 $$$1(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { 3412 $$$1(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { 3413 if ($$$1(event.target).is(_this._element)) { 3414 _this._ignoreBackdropClick = true; 3415 } 3416 }); 3417 }); 3418 3419 this._showBackdrop(function () { 3420 return _this._showElement(relatedTarget); 3421 }); 3422 }; 3423 3424 _proto.hide = function hide(event) { 3425 var _this2 = this; 3426 3427 if (event) { 3428 event.preventDefault(); 3429 } 3430 3431 if (this._isTransitioning || !this._isShown) { 3432 return; 3433 } 3434 3435 var hideEvent = $$$1.Event(Event.HIDE); 3436 $$$1(this._element).trigger(hideEvent); 3437 3438 if (!this._isShown || hideEvent.isDefaultPrevented()) { 3439 return; 3440 } 3441 3442 this._isShown = false; 3443 var transition = $$$1(this._element).hasClass(ClassName.FADE); 3444 3445 if (transition) { 3446 this._isTransitioning = true; 3447 } 3448 3449 this._setEscapeEvent(); 3450 3451 this._setResizeEvent(); 3452 3453 $$$1(document).off(Event.FOCUSIN); 3454 $$$1(this._element).removeClass(ClassName.SHOW); 3455 $$$1(this._element).off(Event.CLICK_DISMISS); 3456 $$$1(this._dialog).off(Event.MOUSEDOWN_DISMISS); 3457 3458 if (transition) { 3459 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 3460 $$$1(this._element).one(Util.TRANSITION_END, function (event) { 3461 return _this2._hideModal(event); 3462 }).emulateTransitionEnd(transitionDuration); 3463 } else { 3464 this._hideModal(); 3465 } 3466 }; 3467 3468 _proto.dispose = function dispose() { 3469 $$$1.removeData(this._element, DATA_KEY); 3470 $$$1(window, document, this._element, this._backdrop).off(EVENT_KEY); 3471 this._config = null; 3472 this._element = null; 3473 this._dialog = null; 3474 this._backdrop = null; 3475 this._isShown = null; 3476 this._isBodyOverflowing = null; 3477 this._ignoreBackdropClick = null; 3478 this._scrollbarWidth = null; 3479 }; 3480 3481 _proto.handleUpdate = function handleUpdate() { 3482 this._adjustDialog(); 3483 }; // Private 3484 3485 3486 _proto._getConfig = function _getConfig(config) { 3487 config = _objectSpread({}, Default, config); 3488 Util.typeCheckConfig(NAME, config, DefaultType); 3489 return config; 3490 }; 3491 3492 _proto._showElement = function _showElement(relatedTarget) { 3493 var _this3 = this; 3494 3495 var transition = $$$1(this._element).hasClass(ClassName.FADE); 3496 3497 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { 3498 // Don't move modal's DOM position 3499 document.body.appendChild(this._element); 3500 } 3501 3502 this._element.style.display = 'block'; 3503 3504 this._element.removeAttribute('aria-hidden'); 3505 3506 this._element.scrollTop = 0; 3507 3508 if (transition) { 3509 Util.reflow(this._element); 3510 } 3511 3512 $$$1(this._element).addClass(ClassName.SHOW); 3513 3514 if (this._config.focus) { 3515 this._enforceFocus(); 3516 } 3517 3518 var shownEvent = $$$1.Event(Event.SHOWN, { 3519 relatedTarget: relatedTarget 3520 }); 3521 3522 var transitionComplete = function transitionComplete() { 3523 if (_this3._config.focus) { 3524 _this3._element.focus(); 3525 } 3526 3527 _this3._isTransitioning = false;
3528 $$$1(_this3._element).trigger(shownEvent); 3529 }; 3530 3531 if (transition) { 3532 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 3533 $$$1(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); 3534 } else { 3535 transitionComplete(); 3536 } 3537 }; 3538 3539 _proto._enforceFocus = function _enforceFocus() { 3540 var _this4 = this; 3541 3542 $$$1(document).off(Event.FOCUSIN) // Guard against infinite focus loop 3543 .on(Event.FOCUSIN, function (event) { 3544 if (document !== event.target && _this4._element !== event.target && $$$1(_this4._element).has(event.target).length === 0) { 3545 _this4._element.focus(); 3546 } 3547 }); 3548 }; 3549 3550 _proto._setEscapeEvent = function _setEscapeEvent() { 3551 var _this5 = this; 3552 3553 if (this._isShown && this._config.keyboard) { 3554 $$$1(this._element).on(Event.KEYDOWN_DISMISS, function (event) { 3555 if (event.which === ESCAPE_KEYCODE) { 3556 event.preventDefault(); 3557 3558 _this5.hide(); 3559 } 3560 }); 3561 } else if (!this._isShown) { 3562 $$$1(this._element).off(Event.KEYDOWN_DISMISS); 3563 } 3564 }; 3565 3566 _proto._setResizeEvent = function _setResizeEvent() { 3567 var _this6 = this; 3568 3569 if (this._isShown) { 3570 $$$1(window).on(Event.RESIZE, function (event) { 3571 return _this6.handleUpdate(event); 3572 }); 3573 } else { 3574 $$$1(window).off(Event.RESIZE); 3575 } 3576 }; 3577 3578 _proto._hideModal = function _hideModal() { 3579 var _this7 = this; 3580 3581 this._element.style.display = 'none'; 3582 3583 this._element.setAttribute('aria-hidden', true); 3584 3585 this._isTransitioning = false; 3586 3587 this._showBackdrop(function () { 3588 $$$1(document.body).removeClass(ClassName.OPEN); 3589 3590 _this7._resetAdjustments(); 3591 3592 _this7._resetScrollbar(); 3593 3594 $$$1(_this7._element).trigger(Event.HIDDEN); 3595 }); 3596 }; 3597 3598 _proto._removeBackdrop = function _removeBackdrop() { 3599 if (this._backdrop) { 3600 $$$1(this._backdrop).remove(); 3601 this._backdrop = null; 3602 } 3603 }; 3604 3605 _proto._showBackdrop = function _showBackdrop(callback) { 3606 var _this8 = this; 3607 3608 var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; 3609
3610 if (this._isShown && this._config.backdrop) { 3611 this._backdrop = document.createElement('div'); 3612 this._backdrop.className = ClassName.BACKDROP; 3613 3614 if (animate) { 3615 $$$1(this._backdrop).addClass(animate); 3616 } 3617 3618 $$$1(this._backdrop).appendTo(document.body); 3619 $$$1(this._element).on(Event.CLICK_DISMISS, function (event) { 3620 if (_this8._ignoreBackdropClick) { 3621 _this8._ignoreBackdropClick = false; 3622 return; 3623 } 3624 3625 if (event.target !== event.currentTarget) { 3626 return; 3627 } 3628 3629 if (_this8._config.backdrop === 'static') { 3630 _this8._element.focus(); 3631 } else { 3632 _this8.hide(); 3633 } 3634 }); 3635 3636 if (animate) { 3637 Util.reflow(this._backdrop); 3638 } 3639 3640 $$$1(this._backdrop).addClass(ClassName.SHOW); 3641 3642 if (!callback) { 3643 return; 3644 } 3645 3646 if (!animate) { 3647 callback(); 3648 return; 3649 } 3650 3651 var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); 3652 $$$1(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); 3653 } else if (!this._isShown && this._backdrop) { 3654 $$$1(this._backdrop).removeClass(ClassName.SHOW); 3655 3656 var callbackRemove = function callbackRemove() { 3657 _this8._removeBackdrop(); 3658 3659 if (callback) { 3660 callback(); 3661 } 3662 }; 3663 3664 if ($$$1(this._element).hasClass(ClassName.FADE)) { 3665 var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); 3666 3667 $$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); 3668 } else { 3669 callbackRemove(); 3670 } 3671 } else if (callback) { 3672 callback(); 3673 } 3674 }; // ---------------------------------------------------------------------- 3675 // the following methods are used to handle overflowing modals 3676 // todo (fat): these should probably be refactored out of modal.js 3677 // ---------------------------------------------------------------------- 3678 3679 3680 _proto._adjustDialog = function _adjustDialog() { 3681 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; 3682 3683 if (!this._isBodyOverflowing && isModalOverflowing) { 3684 this._element.style.paddingLeft = this._scrollbarWidth + "px"; 3685 } 3686 3687 if (this._isBodyOverflowing && !isModalOverflowing) { 3688 this._element.style.paddingRight = this._scrollbarWidth + "px"; 3689 } 3690 }; 3691 3692 _proto._resetAdjustments = function _resetAdjustments() { 3693 this._element.style.paddingLeft = ''; 3694 this._element.style.paddingRight = ''; 3695 }; 3696 3697 _proto._checkScrollbar = function _checkScrollbar() { 3698 var rect = document.body.getBoundingClientRect(); 3699 this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; 3700 this._scrollbarWidth = this._getScrollbarWidth(); 3701 }; 3702 3703 _proto._setScrollbar = function _setScrollbar() { 3704 var _this9 = this; 3705 3706 if (this._isBodyOverflowing) { 3707 // Note: DOMNode.style.paddingRight returns the actual value or '' if not set 3708 // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set 3709 // Adjust fixed content padding 3710 $$$1(Selector.FIXED_CONTENT).each(function (index, element) { 3711 var actualPadding = $$$1(element)[0].style.paddingRight; 3712 var calculatedPadding = $$$1(element).css('padding-right'); 3713 $$$1(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); 3714 }); // Adjust sticky content margin 3715 3716 $$$1(Selector.STICKY_CONTENT).each(function (index, element) { 3717 var actualMargin = $$$1(element)[0].style.marginRight; 3718 var calculatedMargin = $$$1(element).css('margin-right'); 3719 $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); 3720 }); // Adjust navbar-toggler margin 3721 3722 $$$1(Selector.NAVBAR_TOGGLER).each(function (index, element) { 3723 var actualMargin = $$$1(element)[0].style.marginRight; 3724 var calculatedMargin = $$$1(element).css('margin-right'); 3725 $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px"); 3726 }); // Adjust body padding 3727 3728 var actualPadding = document.body.style.paddingRight; 3729 var calculatedPadding = $$$1(document.body).css('padding-right'); 3730 $$$1(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); 3731 } 3732 }; 3733 3734 _proto._resetScrollbar = function _resetScrollbar() { 3735 // Restore fixed content padding 3736 $$$1(Selector.FIXED_CONTENT).each(function (index, element) { 3737 var padding = $$$1(element).data('padding-right'); 3738 3739 if (typeof padding !== 'undefined') { 3740 $$$1(element).css('padding-right', padding).removeData('padding-right'); 3741 } 3742 }); // Restore sticky content and navbar-toggler margin 3743 3744 $$$1(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) { 3745 var margin = $$$1(element).data('margin-right'); 3746 3747 if (typeof margin !== 'undefined') { 3748 $$$1(element).css('margin-right', margin).removeData('margin-right'); 3749 } 3750 }); // Restore body padding 3751 3752 var padding = $$$1(document.body).data('padding-right'); 3753 3754 if (typeof padding !== 'undefined') { 3755 $$$1(document.body).css('padding-right', padding).removeData('padding-right'); 3756 } 3757 }; 3758 3759 _proto._getScrollbarWidth = function _getScrollbarWidth() { 3760 // thx d.walsh 3761 var scrollDiv = document.createElement('div'); 3762 scrollDiv.className = ClassName.SCROLLBAR_MEASURER; 3763 document.body.appendChild(scrollDiv); 3764 var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; 3765 document.body.removeChild(scrollDiv); 3766 return scrollbarWidth; 3767 }; // Static 3768 3769
3770 Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { 3771 return this.each(function () { 3772 var data = $$$1(this).data(DATA_KEY); 3773 3774 var _config = _objectSpread({}, Modal.Default, $$$1(this).data(), typeof config === 'object' && config); 3775 3776 if (!data) { 3777 data = new Modal(this, _config); 3778 $$$1(this).data(DATA_KEY, data); 3779 } 3780 3781 if (typeof config === 'string') { 3782 if (typeof data[config] === 'undefined') { 3783 throw new TypeError("No method named \"" + config + "\""); 3784 } 3785 3786 data[config](relatedTarget); 3787 } else if (_config.show) { 3788 data.show(relatedTarget); 3789 } 3790 }); 3791 }; 3792 3793 _createClass(Modal, null, [{ 3794 key: "VERSION", 3795 get: function get() { 3796 return VERSION; 3797 } 3798 }, { 3799 key: "Default", 3800 get: function get() { 3801 return Default; 3802 } 3803 }]); 3804 3805 return Modal; 3806 }(); 3807 /** 3808 * ------------------------------------------------------------------------ 3809 * Data Api implementation 3810 * ------------------------------------------------------------------------ 3811 */ 3812 3813 3814 $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 3815 var _this10 = this; 3816 3817 var target; 3818 var selector = Util.getSelectorFromElement(this); 3819 3820 if (selector) { 3821 target = $$$1(selector)[0]; 3822 } 3823 3824 var config = $$$1(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $$$1(target).data(), $$$1(this).data()); 3825 3826 if (this.tagName === 'A' || this.tagName === 'AREA') { 3827 event.preventDefault(); 3828 } 3829 3830 var $target = $$$1(target).one(Event.SHOW, function (showEvent) { 3831 if (showEvent.isDefaultPrevented()) { 3832 // Only register focus restorer if modal will actually get shown 3833 return; 3834 } 3835 3836 $target.one(Event.HIDDEN, function () { 3837 if ($$$1(_this10).is(':visible')) { 3838 _this10.focus(); 3839 } 3840 }); 3841 }); 3842 3843 Modal._jQueryInterface.call($$$1(target), config, this); 3844 }); 3845 /** 3846 * ------------------------------------------------------------------------ 3847 * jQuery 3848 * ------------------------------------------------------------------------ 3849 */ 3850 3851 $$$1.fn[NAME] = Modal._jQueryInterface; 3852 $$$1.fn[NAME].Constructor = Modal; 3853 3854 $$$1.fn[NAME].noConflict = function () { 3855 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 3856 return Modal._jQueryInterface; 3857 }; 3858 3859 return Modal; 3860 }($); 3861 3862 /** 3863 * -------------------------------------------------------------------------- 3864 * Bootstrap (v4.1.0): tooltip.js 3865 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 3866 * -------------------------------------------------------------------------- 3867 */ 3868 3869 var Tooltip = function ($$$1) { 3870 /** 3871 * ------------------------------------------------------------------------ 3872 * Constants 3873 * ------------------------------------------------------------------------ 3874 */ 3875 var NAME = 'tooltip'; 3876 var VERSION = '4.1.0'; 3877 var DATA_KEY = 'bs.tooltip'; 3878 var EVENT_KEY = "." + DATA_KEY; 3879 var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; 3880 var CLASS_PREFIX = 'bs-tooltip'; 3881 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); 3882 var DefaultType = { 3883 animation: 'boolean', 3884 template: 'string', 3885 title: '(string|element|function)', 3886 trigger: 'string', 3887 delay: '(number|object)', 3888 html: 'boolean', 3889 selector: '(string|boolean)', 3890 placement: '(string|function)', 3891 offset: '(number|string)', 3892 container: '(string|element|boolean)', 3893 fallbackPlacement: '(string|array)', 3894 boundary: '(string|element)' 3895 }; 3896 var AttachmentMap = { 3897 AUTO: 'auto', 3898 TOP: 'top', 3899 RIGHT: 'right', 3900 BOTTOM: 'bottom', 3901 LEFT: 'left' 3902 }; 3903 var Default = { 3904 animation: true, 3905 template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>', 3906 trigger: 'hover focus', 3907 title: '', 3908 delay: 0, 3909 html: false, 3910 selector: false, 3911 placement: 'top', 3912 offset: 0, 3913 container: false, 3914 fallbackPlacement: 'flip', 3915 boundary: 'scrollParent' 3916 }; 3917 var HoverState = { 3918 SHOW: 'show', 3919 OUT: 'out' 3920 }; 3921 var Event = { 3922 HIDE: "hide" + EVENT_KEY, 3923 HIDDEN: "hidden" + EVENT_KEY, 3924 SHOW: "show" + EVENT_KEY, 3925 SHOWN: "shown" + EVENT_KEY, 3926 INSERTED: "inserted" + EVENT_KEY, 3927 CLICK: "click" + EVENT_KEY, 3928 FOCUSIN: "focusin" + EVENT_KEY, 3929 FOCUSOUT: "focusout" + EVENT_KEY, 3930 MOUSEENTER: "mouseenter" + EVENT_KEY, 3931 MOUSELEAVE: "mouseleave" + EVENT_KEY 3932 }; 3933 var ClassName = { 3934 FADE: 'fade', 3935 SHOW: 'show' 3936 }; 3937 var Selector = { 3938 TOOLTIP: '.tooltip', 3939 TOOLTIP_INNER: '.tooltip-inner', 3940 ARROW: '.arrow' 3941 }; 3942 var Trigger = { 3943 HOVER: 'hover', 3944 FOCUS: 'focus', 3945 CLICK: 'click', 3946 MANUAL: 'manual' 3947 /** 3948 * ------------------------------------------------------------------------ 3949 * Class Definition 3950 * ------------------------------------------------------------------------ 3951 */ 3952 3953 }; 3954 3955 var Tooltip = 3956 /*#__PURE__*/ 3957 function () { 3958 function Tooltip(element, config) { 3959 /** 3960 * Check for Popper dependency 3961 * Popper - https://popper.js.org 3962 */ 3963 if (typeof Popper === 'undefined') { 3964 throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)'); 3965 } // private 3966 3967 3968 this._isEnabled = true; 3969 this._timeout = 0; 3970 this._hoverState = ''; 3971 this._activeTrigger = {}; 3972 this._popper = null; // Protected 3973 3974 this.element = element; 3975 this.config = this._getConfig(config); 3976 this.tip = null; 3977 3978 this._setListeners(); 3979 } // Getters 3980 3981 3982 var _proto = Tooltip.prototype; 3983 3984 // Public 3985 _proto.enable = function enable() { 3986 this._isEnabled = true; 3987 }; 3988 3989 _proto.disable = function disable() { 3990 this._isEnabled = false;
3991 }; 3992 3993 _proto.toggleEnabled = function toggleEnabled() { 3994 this._isEnabled = !this._isEnabled; 3995 }; 3996 3997 _proto.toggle = function toggle(event) { 3998 if (!this._isEnabled) { 3999 return; 4000 } 4001 4002 if (event) { 4003 var dataKey = this.constructor.DATA_KEY; 4004 var context = $$$1(event.currentTarget).data(dataKey); 4005 4006 if (!context) { 4007 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 4008 $$$1(event.currentTarget).data(dataKey, context); 4009 } 4010 4011 context._activeTrigger.click = !context._activeTrigger.click; 4012 4013 if (context._isWithActiveTrigger()) { 4014 context._enter(null, context); 4015 } else { 4016 context._leave(null, context); 4017 } 4018 } else { 4019 if ($$$1(this.getTipElement()).hasClass(ClassName.SHOW)) { 4020 this._leave(null, this); 4021 4022 return; 4023 } 4024 4025 this._enter(null, this); 4026 } 4027 }; 4028 4029 _proto.dispose = function dispose() { 4030 clearTimeout(this._timeout); 4031 $$$1.removeData(this.element, this.constructor.DATA_KEY); 4032 $$$1(this.element).off(this.constructor.EVENT_KEY); 4033 $$$1(this.element).closest('.modal').off('hide.bs.modal'); 4034 4035 if (this.tip) { 4036 $$$1(this.tip).remove(); 4037 } 4038 4039 this._isEnabled = null; 4040 this._timeout = null; 4041 this._hoverState = null; 4042 this._activeTrigger = null; 4043 4044 if (this._popper !== null) { 4045 this._popper.destroy(); 4046 } 4047 4048 this._popper = null; 4049 this.element = null; 4050 this.config = null; 4051 this.tip = null; 4052 }; 4053 4054 _proto.show = function show() { 4055 var _this = this; 4056 4057 if ($$$1(this.element).css('display') === 'none') { 4058 throw new Error('Please use show on visible elements'); 4059 } 4060 4061 var showEvent = $$$1.Event(this.constructor.Event.SHOW); 4062 4063 if (this.isWithContent() && this._isEnabled) { 4064 $$$1(this.element).trigger(showEvent); 4065 var isInTheDom = $$$1.contains(this.element.ownerDocument.documentElement, this.element); 4066 4067 if (showEvent.isDefaultPrevented() || !isInTheDom) { 4068 return; 4069 } 4070 4071 var tip = this.getTipElement(); 4072 var tipId = Util.getUID(this.constructor.NAME);
4073 tip.setAttribute('id', tipId); 4074 this.element.setAttribute('aria-describedby', tipId); 4075 this.setContent(); 4076 4077 if (this.config.animation) { 4078 $$$1(tip).addClass(ClassName.FADE); 4079 } 4080 4081 var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; 4082 4083 var attachment = this._getAttachment(placement); 4084 4085 this.addAttachmentClass(attachment); 4086 var container = this.config.container === false ? document.body : $$$1(this.config.container); 4087 $$$1(tip).data(this.constructor.DATA_KEY, this); 4088 4089 if (!$$$1.contains(this.element.ownerDocument.documentElement, this.tip)) { 4090 $$$1(tip).appendTo(container); 4091 } 4092 4093 $$$1(this.element).trigger(this.constructor.Event.INSERTED); 4094 this._popper = new Popper(this.element, tip, { 4095 placement: attachment, 4096 modifiers: { 4097 offset: { 4098 offset: this.config.offset 4099 }, 4100 flip: { 4101 behavior: this.config.fallbackPlacement 4102 }, 4103 arrow: { 4104 element: Selector.ARROW 4105 }, 4106 preventOverflow: { 4107 boundariesElement: this.config.boundary 4108 } 4109 }, 4110 onCreate: function onCreate(data) { 4111 if (data.originalPlacement !== data.placement) { 4112 _this._handlePopperPlacementChange(data); 4113 } 4114 }, 4115 onUpdate: function onUpdate(data) { 4116 _this._handlePopperPlacementChange(data); 4117 } 4118 }); 4119 $$$1(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra 4120 // empty mouseover listeners to the body's immediate children; 4121 // only needed because of broken event delegation on iOS 4122 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 4123 4124 if ('ontouchstart' in document.documentElement) { 4125 $$$1(document.body).children().on('mouseover', null, $$$1.noop); 4126 } 4127 4128 var complete = function complete() { 4129 if (_this.config.animation) { 4130 _this._fixTransition(); 4131 } 4132 4133 var prevHoverState = _this._hoverState; 4134 _this._hoverState = null; 4135 $$$1(_this.element).trigger(_this.constructor.Event.SHOWN); 4136 4137 if (prevHoverState === HoverState.OUT) { 4138 _this._leave(null, _this); 4139 } 4140 }; 4141 4142 if ($$$1(this.tip).hasClass(ClassName.FADE)) { 4143 var transitionDuration = Util.getTransitionDurationFromElement(this.tip); 4144 $$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 4145 } else { 4146 complete(); 4147 } 4148 } 4149 }; 4150 4151 _proto.hide = function hide(callback) { 4152 var _this2 = this; 4153 4154 var tip = this.getTipElement(); 4155 var hideEvent = $$$1.Event(this.constructor.Event.HIDE); 4156 4157 var complete = function complete() { 4158 if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { 4159 tip.parentNode.removeChild(tip); 4160 } 4161 4162 _this2._cleanTipClass(); 4163 4164 _this2.element.removeAttribute('aria-describedby'); 4165 4166 $$$1(_this2.element).trigger(_this2.constructor.Event.HIDDEN); 4167 4168 if (_this2._popper !== null) { 4169 _this2._popper.destroy(); 4170 } 4171 4172 if (callback) { 4173 callback(); 4174 } 4175 }; 4176 4177 $$$1(this.element).trigger(hideEvent); 4178 4179 if (hideEvent.isDefaultPrevented()) { 4180 return; 4181 } 4182 4183 $$$1(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra 4184 // empty mouseover listeners we added for iOS support 4185 4186 if ('ontouchstart' in document.documentElement) { 4187 $$$1(document.body).children().off('mouseover', null, $$$1.noop); 4188 } 4189 4190 this._activeTrigger[Trigger.CLICK] = false;
4191 this._activeTrigger[Trigger.FOCUS] = false; 4192 this._activeTrigger[Trigger.HOVER] = false; 4193 4194 if ($$$1(this.tip).hasClass(ClassName.FADE)) { 4195 var transitionDuration = Util.getTransitionDurationFromElement(tip); 4196 $$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 4197 } else { 4198 complete(); 4199 } 4200 4201 this._hoverState = ''; 4202 }; 4203 4204 _proto.update = function update() { 4205 if (this._popper !== null) { 4206 this._popper.scheduleUpdate(); 4207 } 4208 }; // Protected 4209 4210 4211 _proto.isWithContent = function isWithContent() { 4212 return Boolean(this.getTitle()); 4213 }; 4214 4215 _proto.addAttachmentClass = function addAttachmentClass(attachment) { 4216 $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); 4217 }; 4218 4219 _proto.getTipElement = function getTipElement() { 4220 this.tip = this.tip || $$$1(this.config.template)[0]; 4221 return this.tip; 4222 }; 4223 4224 _proto.setContent = function setContent() { 4225 var $tip = $$$1(this.getTipElement()); 4226 this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); 4227 $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); 4228 }; 4229 4230 _proto.setElementContent = function setElementContent($element, content) { 4231 var html = this.config.html; 4232 4233 if (typeof content === 'object' && (content.nodeType || content.jquery)) { 4234 // Content is a DOM node or a jQuery 4235 if (html) { 4236 if (!$$$1(content).parent().is($element)) { 4237 $element.empty().append(content); 4238 } 4239 } else { 4240 $element.text($$$1(content).text()); 4241 } 4242 } else { 4243 $element[html ? 'html' : 'text'](content); 4244 } 4245 }; 4246 4247 _proto.getTitle = function getTitle() { 4248 var title = this.element.getAttribute('data-original-title'); 4249 4250 if (!title) { 4251 title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; 4252 } 4253 4254 return title; 4255 }; // Private 4256 4257 4258 _proto._getAttachment = function _getAttachment(placement) { 4259 return AttachmentMap[placement.toUpperCase()]; 4260 }; 4261 4262 _proto._setListeners = function _setListeners() { 4263 var _this3 = this; 4264 4265 var triggers = this.config.trigger.split(' '); 4266 triggers.forEach(function (trigger) { 4267 if (trigger === 'click') { 4268 $$$1(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) { 4269 return _this3.toggle(event); 4270 }); 4271 } else if (trigger !== Trigger.MANUAL) { 4272 var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; 4273 var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; 4274 $$$1(_this3.element).on(eventIn, _this3.config.selector, function (event) { 4275 return _this3._enter(event); 4276 }).on(eventOut, _this3.config.selector, function (event) { 4277 return _this3._leave(event); 4278 }); 4279 } 4280 4281 $$$1(_this3.element).closest('.modal').on('hide.bs.modal', function () { 4282 return _this3.hide(); 4283 }); 4284 }); 4285 4286 if (this.config.selector) { 4287 this.config = _objectSpread({}, this.config, { 4288 trigger: 'manual', 4289 selector: '' 4290 }); 4291 } else { 4292 this._fixTitle(); 4293 } 4294 }; 4295 4296 _proto._fixTitle = function _fixTitle() { 4297 var titleType = typeof this.element.getAttribute('data-original-title'); 4298 4299 if (this.element.getAttribute('title') || titleType !== 'string') { 4300 this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); 4301 this.element.setAttribute('title', ''); 4302 } 4303 }; 4304 4305 _proto._enter = function _enter(event, context) { 4306 var dataKey = this.constructor.DATA_KEY; 4307 context = context || $$$1(event.currentTarget).data(dataKey); 4308 4309 if (!context) { 4310 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 4311 $$$1(event.currentTarget).data(dataKey, context); 4312 } 4313 4314 if (event) { 4315 context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; 4316 } 4317 4318 if ($$$1(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) { 4319 context._hoverState = HoverState.SHOW; 4320 return; 4321 } 4322 4323 clearTimeout(context._timeout); 4324 context._hoverState = HoverState.SHOW; 4325 4326 if (!context.config.delay || !context.config.delay.show) { 4327 context.show(); 4328 return; 4329 } 4330 4331 context._timeout = setTimeout(function () { 4332 if (context._hoverState === HoverState.SHOW) { 4333 context.show(); 4334 } 4335 }, context.config.delay.show); 4336 }; 4337 4338 _proto._leave = function _leave(event, context) { 4339 var dataKey = this.constructor.DATA_KEY; 4340 context = context || $$$1(event.currentTarget).data(dataKey); 4341 4342 if (!context) { 4343 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 4344 $$$1(event.currentTarget).data(dataKey, context); 4345 } 4346 4347 if (event) { 4348 context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
4349 } 4350 4351 if (context._isWithActiveTrigger()) { 4352 return; 4353 } 4354 4355 clearTimeout(context._timeout); 4356 context._hoverState = HoverState.OUT; 4357 4358 if (!context.config.delay || !context.config.delay.hide) { 4359 context.hide(); 4360 return; 4361 } 4362 4363 context._timeout = setTimeout(function () { 4364 if (context._hoverState === HoverState.OUT) { 4365 context.hide(); 4366 } 4367 }, context.config.delay.hide); 4368 }; 4369 4370 _proto._isWithActiveTrigger = function _isWithActiveTrigger() { 4371 for (var trigger in this._activeTrigger) { 4372 if (this._activeTrigger[trigger]) { 4373 return true; 4374 } 4375 } 4376 4377 return false; 4378 }; 4379 4380 _proto._getConfig = function _getConfig(config) { 4381 config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), config); 4382 4383 if (typeof config.delay === 'number') { 4384 config.delay = { 4385 show: config.delay, 4386 hide: config.delay 4387 }; 4388 } 4389 4390 if (typeof config.title === 'number') { 4391 config.title = config.title.toString(); 4392 } 4393 4394 if (typeof config.content === 'number') { 4395 config.content = config.content.toString(); 4396 } 4397 4398 Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); 4399 return config; 4400 }; 4401 4402 _proto._getDelegateConfig = function _getDelegateConfig() { 4403 var config = {}; 4404 4405 if (this.config) { 4406 for (var key in this.config) { 4407 if (this.constructor.Default[key] !== this.config[key]) { 4408 config[key] = this.config[key]; 4409 } 4410 } 4411 } 4412 4413 return config; 4414 }; 4415 4416 _proto._cleanTipClass = function _cleanTipClass() { 4417 var $tip = $$$1(this.getTipElement()); 4418 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); 4419 4420 if (tabClass !== null && tabClass.length > 0) { 4421 $tip.removeClass(tabClass.join('')); 4422 } 4423 }; 4424 4425 _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) { 4426 this._cleanTipClass(); 4427 4428 this.addAttachmentClass(this._getAttachment(data.placement)); 4429 }; 4430 4431 _proto._fixTransition = function _fixTransition() { 4432 var tip = this.getTipElement(); 4433 var initConfigAnimation = this.config.animation; 4434 4435 if (tip.getAttribute('x-placement') !== null) { 4436 return; 4437 } 4438 4439 $$$1(tip).removeClass(ClassName.FADE); 4440 this.config.animation = false; 4441 this.hide(); 4442 this.show(); 4443 this.config.animation = initConfigAnimation; 4444 }; // Static 4445 4446 4447 Tooltip._jQueryInterface = function _jQueryInterface(config) { 4448 return this.each(function () { 4449 var data = $$$1(this).data(DATA_KEY); 4450 4451 var _config = typeof config === 'object' && config; 4452 4453 if (!data && /dispose|hide/.test(config)) { 4454 return; 4455 } 4456 4457 if (!data) { 4458 data = new Tooltip(this, _config); 4459 $$$1(this).data(DATA_KEY, data); 4460 } 4461 4462 if (typeof config === 'string') { 4463 if (typeof data[config] === 'undefined') { 4464 throw new TypeError("No method named \"" + config + "\""); 4465 } 4466 4467 data[config](); 4468 } 4469 }); 4470 }; 4471 4472 _createClass(Tooltip, null, [{ 4473 key: "VERSION", 4474 get: function get() { 4475 return VERSION; 4476 } 4477 }, { 4478 key: "Default", 4479 get: function get() { 4480 return Default; 4481 } 4482 }, { 4483 key: "NAME", 4484 get: function get() { 4485 return NAME; 4486 } 4487 }, { 4488 key: "DATA_KEY", 4489 get: function get() { 4490 return DATA_KEY; 4491 } 4492 }, { 4493 key: "Event", 4494 get: function get() { 4495 return Event; 4496 } 4497 }, { 4498 key: "EVENT_KEY", 4499 get: function get() { 4500 return EVENT_KEY; 4501 } 4502 }, { 4503 key: "DefaultType", 4504 get: function get() { 4505 return DefaultType; 4506 } 4507 }]); 4508 4509 return Tooltip; 4510 }(); 4511 /** 4512 * ------------------------------------------------------------------------ 4513 * jQuery 4514 * ------------------------------------------------------------------------ 4515 */ 4516 4517 4518 $$$1.fn[NAME] = Tooltip._jQueryInterface; 4519 $$$1.fn[NAME].Constructor = Tooltip; 4520 4521 $$$1.fn[NAME].noConflict = function () { 4522 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 4523 return Tooltip._jQueryInterface; 4524 }; 4525 4526 return Tooltip; 4527 }($, Popper); 4528 4529 /** 4530 * -------------------------------------------------------------------------- 4531 * Bootstrap (v4.1.0): popover.js 4532 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 4533 * -------------------------------------------------------------------------- 4534 */ 4535 4536 var Popover = function ($$$1) { 4537 /** 4538 * ------------------------------------------------------------------------ 4539 * Constants 4540 * ------------------------------------------------------------------------ 4541 */ 4542 var NAME = 'popover'; 4543 var VERSION = '4.1.0'; 4544 var DATA_KEY = 'bs.popover'; 4545 var EVENT_KEY = "." + DATA_KEY; 4546 var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
4547 var CLASS_PREFIX = 'bs-popover'; 4548 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); 4549 4550 var Default = _objectSpread({}, Tooltip.Default, { 4551 placement: 'right', 4552 trigger: 'click', 4553 content: '', 4554 template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>' 4555 }); 4556 4557 var DefaultType = _objectSpread({}, Tooltip.DefaultType, { 4558 content: '(string|element|function)' 4559 }); 4560 4561 var ClassName = { 4562 FADE: 'fade', 4563 SHOW: 'show' 4564 }; 4565 var Selector = { 4566 TITLE: '.popover-header', 4567 CONTENT: '.popover-body' 4568 }; 4569 var Event = { 4570 HIDE: "hide" + EVENT_KEY, 4571 HIDDEN: "hidden" + EVENT_KEY, 4572 SHOW: "show" + EVENT_KEY, 4573 SHOWN: "shown" + EVENT_KEY, 4574 INSERTED: "inserted" + EVENT_KEY, 4575 CLICK: "click" + EVENT_KEY, 4576 FOCUSIN: "focusin" + EVENT_KEY, 4577 FOCUSOUT: "focusout" + EVENT_KEY, 4578 MOUSEENTER: "mouseenter" + EVENT_KEY, 4579 MOUSELEAVE: "mouseleave" + EVENT_KEY 4580 /** 4581 * ------------------------------------------------------------------------ 4582 * Class Definition 4583 * ------------------------------------------------------------------------ 4584 */ 4585 4586 }; 4587 4588 var Popover = 4589 /*#__PURE__*/ 4590 function (_Tooltip) { 4591 _inheritsLoose(Popover, _Tooltip); 4592 4593 function Popover() { 4594 return _Tooltip.apply(this, arguments) || this; 4595 } 4596 4597 var _proto = Popover.prototype; 4598 4599 // Overrides 4600 _proto.isWithContent = function isWithContent() { 4601 return this.getTitle() || this._getContent(); 4602 }; 4603 4604 _proto.addAttachmentClass = function addAttachmentClass(attachment) { 4605 $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); 4606 }; 4607 4608 _proto.getTipElement = function getTipElement() { 4609 this.tip = this.tip || $$$1(this.config.template)[0]; 4610 return this.tip; 4611 }; 4612 4613 _proto.setContent = function setContent() { 4614 var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events 4615 4616 this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); 4617 4618 var content = this._getContent(); 4619 4620 if (typeof content === 'function') { 4621 content = content.call(this.element); 4622 } 4623 4624 this.setElementContent($tip.find(Selector.CONTENT), content); 4625 $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); 4626 }; // Private 4627 4628 4629 _proto._getContent = function _getContent() { 4630 return this.element.getAttribute('data-content') || this.config.content; 4631 }; 4632 4633 _proto._cleanTipClass = function _cleanTipClass() { 4634 var $tip = $$$1(this.getTipElement()); 4635 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); 4636 4637 if (tabClass !== null && tabClass.length > 0) { 4638 $tip.removeClass(tabClass.join('')); 4639 } 4640 }; // Static 4641 4642 4643 Popover._jQueryInterface = function _jQueryInterface(config) { 4644 return this.each(function () { 4645 var data = $$$1(this).data(DATA_KEY); 4646 4647 var _config = typeof config === 'object' ? config : null; 4648 4649 if (!data && /destroy|hide/.test(config)) { 4650 return; 4651 } 4652 4653 if (!data) { 4654 data = new Popover(this, _config); 4655 $$$1(this).data(DATA_KEY, data); 4656 } 4657 4658 if (typeof config === 'string') { 4659 if (typeof data[config] === 'undefined') { 4660 throw new TypeError("No method named \"" + config + "\""); 4661 } 4662 4663 data[config](); 4664 } 4665 }); 4666 }; 4667 4668 _createClass(Popover, null, [{ 4669 key: "VERSION", 4670 // Getters 4671 get: function get() { 4672 return VERSION; 4673 } 4674 }, { 4675 key: "Default", 4676 get: function get() { 4677 return Default; 4678 } 4679 }, { 4680 key: "NAME", 4681 get: function get() { 4682 return NAME; 4683 } 4684 }, { 4685 key: "DATA_KEY", 4686 get: function get() { 4687 return DATA_KEY; 4688 } 4689 }, { 4690 key: "Event", 4691 get: function get() { 4692 return Event; 4693 } 4694 }, { 4695 key: "EVENT_KEY", 4696 get: function get() { 4697 return EVENT_KEY; 4698 } 4699 }, { 4700 key: "DefaultType", 4701 get: function get() { 4702 return DefaultType; 4703 } 4704 }]); 4705 4706 return Popover; 4707 }(Tooltip); 4708 /** 4709 * ------------------------------------------------------------------------ 4710 * jQuery 4711 * ------------------------------------------------------------------------ 4712 */ 4713 4714 4715 $$$1.fn[NAME] = Popover._jQueryInterface; 4716 $$$1.fn[NAME].Constructor = Popover; 4717 4718 $$$1.fn[NAME].noConflict = function () { 4719 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 4720 return Popover._jQueryInterface; 4721 }; 4722 4723 return Popover; 4724 }($); 4725 4726 /** 4727 * -------------------------------------------------------------------------- 4728 * Bootstrap (v4.1.0): scrollspy.js 4729 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 4730 * -------------------------------------------------------------------------- 4731 */ 4732 4733 var ScrollSpy = function ($$$1) { 4734 /** 4735 * ------------------------------------------------------------------------ 4736 * Constants 4737 * ------------------------------------------------------------------------ 4738 */ 4739 var NAME = 'scrollspy'; 4740 var VERSION = '4.1.0'; 4741 var DATA_KEY = 'bs.scrollspy'; 4742 var EVENT_KEY = "." + DATA_KEY; 4743 var DATA_API_KEY = '.data-api'; 4744 var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; 4745 var Default = { 4746 offset: 10, 4747 method: 'auto', 4748 target: '' 4749 }; 4750 var DefaultType = { 4751 offset: 'number', 4752 method: 'string', 4753 target: '(string|element)' 4754 }; 4755 var Event = { 4756 ACTIVATE: "activate" + EVENT_KEY, 4757 SCROLL: "scroll" + EVENT_KEY, 4758 LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY 4759 }; 4760 var ClassName = {
4761 DROPDOWN_ITEM: 'dropdown-item', 4762 DROPDOWN_MENU: 'dropdown-menu', 4763 ACTIVE: 'active' 4764 }; 4765 var Selector = { 4766 DATA_SPY: '[data-spy="scroll"]', 4767 ACTIVE: '.active', 4768 NAV_LIST_GROUP: '.nav, .list-group', 4769 NAV_LINKS: '.nav-link', 4770 NAV_ITEMS: '.nav-item', 4771 LIST_ITEMS: '.list-group-item', 4772 DROPDOWN: '.dropdown', 4773 DROPDOWN_ITEMS: '.dropdown-item', 4774 DROPDOWN_TOGGLE: '.dropdown-toggle' 4775 }; 4776 var OffsetMethod = { 4777 OFFSET: 'offset', 4778 POSITION: 'position' 4779 /** 4780 * ------------------------------------------------------------------------ 4781 * Class Definition 4782 * ------------------------------------------------------------------------ 4783 */ 4784 4785 }; 4786 4787 var ScrollSpy = 4788 /*#__PURE__*/ 4789 function () { 4790 function ScrollSpy(element, config) { 4791 var _this = this; 4792 4793 this._element = element; 4794 this._scrollElement = element.tagName === 'BODY' ? window : element; 4795 this._config = this._getConfig(config); 4796 this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS); 4797 this._offsets = []; 4798 this._targets = []; 4799 this._activeTarget = null; 4800 this._scrollHeight = 0; 4801 $$$1(this._scrollElement).on(Event.SCROLL, function (event) { 4802 return _this._process(event); 4803 }); 4804 this.refresh(); 4805 4806 this._process(); 4807 } // Getters 4808 4809 4810 var _proto = ScrollSpy.prototype; 4811 4812 // Public 4813 _proto.refresh = function refresh() { 4814 var _this2 = this; 4815 4816 var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; 4817 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; 4818 var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; 4819 this._offsets = []; 4820 this._targets = []; 4821 this._scrollHeight = this._getScrollHeight(); 4822 var targets = $$$1.makeArray($$$1(this._selector)); 4823 targets.map(function (element) { 4824 var target; 4825 var targetSelector = Util.getSelectorFromElement(element); 4826 4827 if (targetSelector) { 4828 target = $$$1(targetSelector)[0]; 4829 } 4830 4831 if (target) { 4832 var targetBCR = target.getBoundingClientRect(); 4833 4834 if (targetBCR.width || targetBCR.height) { 4835 // TODO (fat): remove sketch reliance on jQuery position/offset 4836 return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector]; 4837 } 4838 } 4839 4840 return null; 4841 }).filter(function (item) { 4842 return item; 4843 }).sort(function (a, b) { 4844 return a[0] - b[0]; 4845 }
4845).forEach(function (item) { 4846 _this2._offsets.push(item[0]); 4847 4848 _this2._targets.push(item[1]); 4849 }); 4850 }; 4851 4852 _proto.dispose = function dispose() { 4853 $$$1.removeData(this._element, DATA_KEY); 4854 $$$1(this._scrollElement).off(EVENT_KEY); 4855 this._element = null; 4856 this._scrollElement = null; 4857 this._config = null; 4858 this._selector = null; 4859 this._offsets = null; 4860 this._targets = null; 4861 this._activeTarget = null; 4862 this._scrollHeight = null; 4863 }; // Private 4864 4865 4866 _proto._getConfig = function _getConfig(config) { 4867 config = _objectSpread({}, Default, config); 4868 4869 if (typeof config.target !== 'string') { 4870 var id = $$$1(config.target).attr('id'); 4871 4872 if (!id) { 4873 id = Util.getUID(NAME); 4874 $$$1(config.target).attr('id', id); 4875 } 4876 4877 config.target = "#" + id; 4878 } 4879 4880 Util.typeCheckConfig(NAME, config, DefaultType); 4881 return config; 4882 }; 4883 4884 _proto._getScrollTop = function _getScrollTop() { 4885 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; 4886 }; 4887 4888 _proto._getScrollHeight = function _getScrollHeight() { 4889 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 4890 }; 4891 4892 _proto._getOffsetHeight = function _getOffsetHeight() { 4893 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; 4894 }; 4895 4896 _proto._process = function _process() { 4897 var scrollTop = this._getScrollTop() + this._config.offset; 4898 4899 var scrollHeight = this._getScrollHeight(); 4900 4901 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); 4902 4903 if (this._scrollHeight !== scrollHeight) { 4904 this.refresh(); 4905 } 4906 4907 if (scrollTop >= maxScroll) { 4908 var target = this._targets[this._targets.length - 1]; 4909 4910 if (this._activeTarget !== target) { 4911 this._activate(target); 4912 } 4913 4914 return; 4915 } 4916 4917 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { 4918 this._activeTarget = null; 4919 4920 this._clear(); 4921 4922 return; 4923 } 4924 4925 for (var i = this._offsets.length; i--;) { 4926 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); 4927 4928 if (isActiveTarget) { 4929 this._activate(this._targets[i]); 4930 } 4931 } 4932 }; 4933 4934 _proto._activate = function _activate(target) { 4935 this._activeTarget = target; 4936 4937 this._clear(); 4938 4939 var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style 4940 4941 4942 queries = queries.map(function (selector) { 4943 return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]"); 4944 }); 4945 var $link = $$$1(queries.join(',')); 4946 4947 if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { 4948 $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); 4949 $link.addClass(ClassName.ACTIVE); 4950 } else { 4951 // Set triggered link as active 4952 $link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
4953 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor 4954 4955 $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item 4956 4957 $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE); 4958 } 4959 4960 $$$1(this._scrollElement).trigger(Event.ACTIVATE, { 4961 relatedTarget: target 4962 }); 4963 }; 4964 4965 _proto._clear = function _clear() { 4966 $$$1(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); 4967 }; // Static 4968 4969 4970 ScrollSpy._jQueryInterface = function _jQueryInterface(config) { 4971 return this.each(function () { 4972 var data = $$$1(this).data(DATA_KEY); 4973 4974 var _config = typeof config === 'object' && config; 4975 4976 if (!data) { 4977 data = new ScrollSpy(this, _config); 4978 $$$1(this).data(DATA_KEY, data); 4979 } 4980 4981 if (typeof config === 'string') { 4982 if (typeof data[config] === 'undefined') { 4983 throw new TypeError("No method named \"" + config + "\""); 4984 } 4985 4986 data[config](); 4987 } 4988 }); 4989 }; 4990 4991 _createClass(ScrollSpy, null, [{ 4992 key: "VERSION", 4993 get: function get() { 4994 return VERSION; 4995 } 4996 }, { 4997 key: "Default", 4998 get: function get() { 4999 return Default; 5000 } 5001 }]); 5002 5003 return ScrollSpy; 5004 }(); 5005 /** 5006 * ------------------------------------------------------------------------ 5007 * Data Api implementation 5008 * ------------------------------------------------------------------------ 5009 */ 5010 5011 5012 $$$1(window).on(Event.LOAD_DATA_API, function () { 5013 var scrollSpys = $$$1.makeArray($$$1(Selector.DATA_SPY)); 5014 5015 for (var i = scrollSpys.length; i--;) { 5016 var $spy = $$$1(scrollSpys[i]); 5017 5018 ScrollSpy._jQueryInterface.call($spy, $spy.data()); 5019 } 5020 }); 5021 /** 5022 * ------------------------------------------------------------------------ 5023 * jQuery 5024 * ------------------------------------------------------------------------ 5025 */ 5026 5027 $$$1.fn[NAME] = ScrollSpy._jQueryInterface; 5028 $$$1.fn[NAME].Constructor = ScrollSpy; 5029 5030 $$$1.fn[NAME].noConflict = function () { 5031 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 5032 return ScrollSpy._jQueryInterface; 5033 }; 5034 5035 return ScrollSpy; 5036 }($); 5037 5038 /** 5039 * -------------------------------------------------------------------------- 5040 * Bootstrap (v4.1.0): tab.js 5041 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5042 * -------------------------------------------------------------------------- 5043 */ 5044 5045 var Tab = function ($$$1) { 5046 /** 5047 * ------------------------------------------------------------------------ 5048 * Constants 5049 * ------------------------------------------------------------------------ 5050 */ 5051 var NAME = 'tab'; 5052 var VERSION = '4.1.0'; 5053 var DATA_KEY = 'bs.tab'; 5054 var EVENT_KEY = "." + DATA_KEY; 5055 var DATA_API_KEY = '.data-api'; 5056 var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; 5057 var Event = { 5058 HIDE: "hide" + EVENT_KEY, 5059 HIDDEN: "hidden" + EVENT_KEY, 5060 SHOW: "show" + EVENT_KEY, 5061 SHOWN: "shown" + EVENT_KEY, 5062 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 5063 }; 5064 var ClassName = { 5065 DROPDOWN_MENU: 'dropdown-menu', 5066 ACTIVE: 'active', 5067 DISABLED: 'disabled', 5068 FADE: 'fade', 5069 SHOW: 'show' 5070 }; 5071 var Selector = { 5072 DROPDOWN: '.dropdown', 5073 NAV_LIST_GROUP: '.nav, .list-group', 5074 ACTIVE: '.active', 5075 ACTIVE_UL: '> li > .active', 5076 DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', 5077 DROPDOWN_TOGGLE: '.dropdown-toggle', 5078 DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' 5079 /** 5080 * ------------------------------------------------------------------------ 5081 * Class Definition 5082 * ------------------------------------------------------------------------ 5083 */ 5084 5085 }; 5086 5087 var Tab = 5088 /*#__PURE__*/ 5089 function () { 5090 function Tab(element) { 5091 this._element = element; 5092 } // Getters 5093 5094 5095 var _proto = Tab.prototype; 5096 5097 // Public 5098 _proto.show = function show() { 5099 var _this = this; 5100 5101 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $$$1(this._element).hasClass(ClassName.ACTIVE) || $$$1(this._element).hasClass(ClassName.DISABLED)) { 5102 return; 5103 } 5104 5105 var target; 5106 var previous; 5107 var listElement = $$$1(this._element).closest(Selector.NAV_LIST_GROUP)[0]; 5108 var selector = Util.getSelectorFromElement(this._element); 5109 5110 if (listElement) { 5111 var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE; 5112 previous = $$$1.makeArray($$$1(listElement).find(itemSelector)); 5113 previous = previous[previous.length - 1]; 5114 } 5115 5116 var hideEvent = $$$1.Event(Event.HIDE, { 5117 relatedTarget: this._element 5118 }); 5119 var showEvent = $$$1.Event(Event.SHOW, { 5120 relatedTarget: previous 5121 }); 5122 5123 if (previous) { 5124 $$$1(previous).trigger(hideEvent); 5125 } 5126 5127 $$$1(this._element).trigger(showEvent); 5128 5129 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { 5130 return; 5131 } 5132 5133 if (selector) { 5134 target = $$$1(selector)[0]; 5135 } 5136 5137 this._activate(this._element, listElement); 5138 5139 var complete = function complete() { 5140 var hiddenEvent = $$$1.Event(Event.HIDDEN, { 5141 relatedTarget: _this._element 5142 }); 5143 var shownEvent = $$$1.Event(Event.SHOWN, { 5144 relatedTarget: previous 5145 }); 5146 $$$1(previous).trigger(hiddenEvent); 5147 $$$1(_this._element).trigger(shownEvent); 5148 }; 5149 5150 if (target) { 5151 this._activate(target, target.parentNode, complete); 5152 } else { 5153 complete(); 5154 } 5155 }; 5156 5157 _proto.dispose = function dispose() { 5158 $$$1.removeData(this._element, DATA_KEY); 5159 this._element = null; 5160 }; // Private 5161 5162 5163 _proto._activate = function _activate(element, container, callback) { 5164 var _this2 = this; 5165 5166 var activeElements; 5167 5168 if (container.nodeName === 'UL') { 5169 activeElements = $$$1(container).find(Selector.ACTIVE_UL); 5170 } else { 5171 activeElements = $$$1(container).children(Selector.ACTIVE); 5172 } 5173 5174 var active = activeElements[0]; 5175 var isTransitioning = callback && active && $$$1(active).hasClass(ClassName.FADE); 5176 5177 var complete = function complete() { 5178 return _this2._transitionComplete(element, active, callback); 5179 }; 5180 5181 if (active && isTransitioning) { 5182 var transitionDuration = Util.getTransitionDurationFromElement(active); 5183 $$$1(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 5184 } else { 5185 complete(); 5186 } 5187 }; 5188 5189 _proto._transitionComplete = function _transitionComplete(element, active, callback) { 5190 if (active) { 5191 $$$1(active).removeClass(ClassName.SHOW + " " + ClassName.ACTIVE);
5192 var dropdownChild = $$$1(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; 5193 5194 if (dropdownChild) { 5195 $$$1(dropdownChild).removeClass(ClassName.ACTIVE); 5196 } 5197 5198 if (active.getAttribute('role') === 'tab') { 5199 active.setAttribute('aria-selected', false); 5200 } 5201 } 5202 5203 $$$1(element).addClass(ClassName.ACTIVE); 5204 5205 if (element.getAttribute('role') === 'tab') { 5206 element.setAttribute('aria-selected', true); 5207 } 5208 5209 Util.reflow(element); 5210 $$$1(element).addClass(ClassName.SHOW); 5211 5212 if (element.parentNode && $$$1(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { 5213 var dropdownElement = $$$1(element).closest(Selector.DROPDOWN)[0]; 5214 5215 if (dropdownElement) { 5216 $$$1(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); 5217 } 5218 5219 element.setAttribute('aria-expanded', true); 5220 } 5221 5222 if (callback) { 5223 callback(); 5224 } 5225 }; // Static 5226 5227 5228 Tab._jQueryInterface = function _jQueryInterface(config) { 5229 return this.each(function () { 5230 var $this = $$$1(this); 5231 var data = $this.data(DATA_KEY); 5232 5233 if (!data) { 5234 data = new Tab(this); 5235 $this.data(DATA_KEY, data); 5236 } 5237 5238 if (typeof config === 'string') { 5239 if (typeof data[config] === 'undefined') { 5240 throw new TypeError("No method named \"" + config + "\""); 5241 } 5242 5243 data[config](); 5244 } 5245 }); 5246 }; 5247 5248 _createClass(Tab, null, [{ 5249 key: "VERSION", 5250 get: function get() { 5251 return VERSION; 5252 } 5253 }]); 5254 5255 return Tab; 5256 }(); 5257 /** 5258 * ------------------------------------------------------------------------ 5259 * Data Api implementation 5260 * ------------------------------------------------------------------------ 5261 */ 5262 5263 5264 $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 5265 event.preventDefault(); 5266 5267 Tab._jQueryInterface.call($$$1(this), 'show'); 5268 }); 5269 /** 5270 * ------------------------------------------------------------------------ 5271 * jQuery 5272 * ------------------------------------------------------------------------ 5273 */ 5274 5275 $$$1.fn[NAME] = Tab._jQueryInterface; 5276 $$$1.fn[NAME].Constructor = Tab; 5277 5278 $$$1.fn[NAME].noConflict = function () { 5279 $$$1.fn[NAME] = JQUERY_NO_CONFLICT; 5280 return Tab._jQueryInterface; 5281 }; 5282 5283 return Tab; 5284 }($); 5285 5286 /** 5287 * -------------------------------------------------------------------------- 5288 * Bootstrap (v4.0.0): index.js 5289 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5290 * -------------------------------------------------------------------------- 5291 */ 5292 5293 (function ($$$1) { 5294 if (typeof $$$1 === 'undefined') { 5295 throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); 5296 } 5297 5298 var version = $$$1.fn.jquery.split(' ')[0].split('.'); 5299 var minMajor = 1; 5300 var ltMajor = 2; 5301 var minMinor = 9; 5302 var minPatch = 1; 5303 var maxMajor = 4; 5304 5305 if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { 5306 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); 5307 } 5308 })($); 5309 5310 exports.Util = Util; 5311 exports.Alert = Alert; 5312 exports.Button = Button; 5313 exports.Carousel = Carousel; 5314 exports.Collapse = Collapse; 5315 exports.Dropdown = Dropdown; 5316 exports.Modal = Modal; 5317 exports.Popover = Popover; 5318 exports.Scrollspy = ScrollSpy; 5319 exports.Tab = Tab; 5320 exports.Tooltip = Tooltip; 5321 5322 Object.defineProperty(exports, '__esModule', { value: true }); 5323 5324 }))); 5325 //# sourceMappingURL=bootstrap.js.map 5326/*! List.js v1.5.0 (http://listjs.com) by Jonny Strömberg (http://javve.com) */ 5327var List=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=11)}([function(t,e,r){function n(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}var i=r(4),s=/\s+/;Object.prototype.toString;t.exports=function(t){return new n(t)},n.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array(),r=i(e,t);return~r||e.push(t),this.el.className=e.join(" "),this},n.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=i(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},n.prototype.toggle=function(t,e){return this.list?("undefined"!=typeof e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):("undefined"!=typeof e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},n.prototype.array=function(){var t=this.el.getAttribute("class")||"",e=t.replace(/^\s+|\s+$/g,""),r=e.split(s);return""===r[0]&&r.shift(),r},n.prototype.has=n.prototype.contains=function(t){return this.list?this.list.contains(t):!!~i(this.array(),t)}},function(t,e,r){var n=window.addEventListener?"addEventListener":"attachEvent",i=window.removeEventListener?"removeEventListener":"detachEvent",s="addEventListener"!==n?"on":"",a=r(5);e.bind=function(t,e,r,i){t=a(t);for(var o=0;o<t.length;o++)t[o][n](s+e,r,i||!1)},e.unbind=function(t,e,r,n){t=a(t);for(var o=0;o<t.length;o++)t[o][i](s+e,r,n||!1)}},function(t,e){t.exports=function(t){return function(e,r,n){var i=this;this._values={},this.found=!1,this.filtered=!1;
5327var s=function(e,r,n){if(void 0===r)n?i.values(e,n):i.values(e);else{i.elm=r;var s=t.templater.get(i,e);i.values(s)}};this.values=function(e,r){if(void 0===e)return i._values;for(var n in e)i._values[n]=e[n];r!==!0&&t.templater.set(i,i.values())},this.show=function(){t.templater.show(i)},this.hide=function(){t.templater.hide(i)},this.matching=function(){return t.filtered&&t.searched&&i.found&&i.filtered||t.filtered&&!t.searched&&i.filtered||!t.filtered&&t.searched&&i.found||!t.filtered&&!t.searched},this.visible=function(){return!(!i.elm||i.elm.parentNode!=t.list)},s(e,r,n)}}},function(t,e){var r=function(t,e,r){return r?t.getElementsByClassName(e)[0]:t.getElementsByClassName(e)},n=function(t,e,r){return e="."+e,r?t.querySelector(e):t.querySelectorAll(e)},i=function(t,e,r){for(var n=[],i="*",s=t.getElementsByTagName(i),a=s.length,o=new RegExp("(^|\\s)"+e+"(\\s|$)"),l=0,u=0;l<a;l++)if(o.test(s[l].className)){if(r)return s[l];n[u]=s[l],u++}return n};t.exports=function(){return function(t,e,s,a){return a=a||{},a.test&&a.getElementsByClassName||!a.test&&document.getElementsByClassName?r(t,e,s):a.test&&a.querySelector||!a.test&&document.querySelector?n(t,e,s):i(t,e,s)}}()},function(t,e){var r=[].indexOf;t.exports=function(t,e){if(r)return t.indexOf(e);for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}},function(t,e){function r(t){return"[object Array]"===Object.prototype.toString.call(t)}t.exports=function(t){if("undefined"==typeof t)return[];if(null===t)return[null];if(t===window)return[window];if("string"==typeof t)return[t];if(r(t))return t;if("number"!=typeof t.length)return[t];if("function"==typeof t&&t instanceof Function)return[t];for(var e=[],n=0;n<t.length;n++)(Object.prototype.hasOwnProperty.call(t,n)||n in t)&&e.push(t[n]);return e.length?e:[]}},function(t,e){t.exports=function(t){return t=void 0===t?"":t,t=null===t?"":t,t=t.toString()}},function(t,e){t.exports=function(t){for(var e,r=Array.prototype.slice.call(arguments,1),n=0;e=r[n];n++)if(e)for(var i in e)t[i]=e[i];return t}},function(t,e){t.exports=function(t){var e=function(r,n,i){var s=r.splice(0,50);i=i||[],i=i.concat(t.add(s)),r.length>0?setTimeout(function(){e(r,n,i)},1):(t.update(),n(i))};return e}},function(t,e){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,n=0,i=r.length;n<i;n++){var s=r[n];e(s)?s.filtered=!0:s.filtered=!1}}return t.update(),t.trigger("filterComplete"),t.visibleItems}}},function(t,e,r){var n=(r(0),r(1)),i=r(7),s=r(6),a=r(3),o=r(19);t.exports=function(t,e){e=e||{},e=i({location:0,distance:100,threshold:.4,multiSearch:!0,searchClass:"fuzzy-search"},e);var r={search:function(n,i){for(var s=e.multiSearch?n.replace(/ +$/,"").split(/ +/):[n],a=0,o=t.items.length;a<o;a++)r.item(t.items[a],i,s)},item:function(t,e,n){for(var i=!0,s=0;s<n.length;s++){for(var a=!1,o=0,l=e.length;o<l;o++)r.values(t.values(),e[o],n[s])&&(a=!0);a||(i=!1)}t.found=i},values:function(t,r,n){if(t.hasOwnProperty(r)){var i=s(t[r]).toLowerCase();if(o(i,n,e))return!0}return!1}};return n.bind(a(t.listContainer,e.searchClass),"keyup",function(e){var n=e.target||e.srcElement;t.search(n.value,r.search)}),function(e,n){t.search(e,n,r.search)}}},function(t,e,r){var n=r(18),i=r(3),s=r(7),a=r(4),o=r(1),l=r(6),u=r(0),c=r(17),f=r(5);t.exports=function(t,e,h){var d,v=this,m=r(2)(v),g=r(8)(v),p=r(12)(v);d={start:function(){v.listClass="list",v.searchClass="search",v.sortClass="sort",v.page=1e4,v.i=1,v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.searchColumns=void 0,v.handlers={updated:[]},v.valueNames=[],v.utils={getByClass:i,extend:s,indexOf:a,events:o,toString:l,naturalSort:n,classes:u,getAttribute:c,toArray:f},v.utils.extend(v,e),v.listContainer="string"==typeof t?document.getElementById(t):t,v.listContainer&&(v.list=i(v.listContainer,v.listClass,!0),v.parse=r(13)(v),v.templater=r(16)(v),v.search=r(14)(v),v.filter=r(9)(v),v.sort=r(15)(v),v.fuzzySearch=r(10)(v,e.fuzzySearch),this.handlers(),this.items(),this.pagination(),v.update(
5327))},handlers:function(){for(var t in v.handlers)v[t]&&v.on(t,v[t])},items:function(){v.parse(v.list),void 0!==h&&v.add(h)},pagination:function(){if(void 0!==e.pagination){e.pagination===!0&&(e.pagination=[{}]),void 0===e.pagination[0]&&(e.pagination=[e.pagination]);for(var t=0,r=e.pagination.length;t<r;t++)p(e.pagination[t])}}},this.reIndex=function(){v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.parse(v.list)},this.toJSON=function(){for(var t=[],e=0,r=v.items.length;e<r;e++)t.push(v.items[e].values());return t},this.add=function(t,e){if(0!==t.length){if(e)return void g(t,e);var r=[],n=!1;void 0===t[0]&&(t=[t]);for(var i=0,s=t.length;i<s;i++){var a=null;n=v.items.length>v.page,a=new m(t[i],void 0,n),v.items.push(a),r.push(a)}return v.update(),r}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var n=0,i=0,s=v.items.length;i<s;i++)v.items[i].values()[t]==e&&(v.templater.remove(v.items[i],r),v.items.splice(i,1),s--,i--,n++);return v.update(),n},this.get=function(t,e){for(var r=[],n=0,i=v.items.length;n<i;n++){var s=v.items[n];s.values()[t]==e&&r.push(s)}return r},this.size=function(){return v.items.length},this.clear=function(){return v.templater.clear(),v.items=[],v},this.on=function(t,e){return v.handlers[t].push(e),v},this.off=function(t,e){var r=v.handlers[t],n=a(r,e);return n>-1&&r.splice(n,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r<e;r++)t[r].matching()&&v.matchingItems.length+1>=v.i&&v.visibleItems.length<v.page?(t[r].show(),v.visibleItems.push(t[r]),v.matchingItems.push(t[r])):t[r].matching()?(v.matchingItems.push(t[r]),t[r].hide()):t[r].hide();return v.trigger("updated"),v},d.start()}},function(t,e,r){var n=r(0),i=r(1),s=r(11);t.exports=function(t){var e=function(e,i){var s,o=t.matchingItems.length,l=t.i,u=t.page,c=Math.ceil(o/u),f=Math.ceil(l/u),h=i.innerWindow||2,d=i.left||i.outerWindow||0,v=i.right||i.outerWindow||0;v=c-v,e.clear();for(var m=1;m<=c;m++){var g=f===m?"active":"";r.number(m,d,v,f,h)?(s=e.add({page:m,dotted:!1})[0],g&&n(s.elm).add(g),a(s.elm,m,u)):r.dotted(e,m,d,v,f,h,e.size())&&(s=e.add({page:"...",dotted:!0})[0],n(s.elm).add("disabled"))}},r={number:function(t,e,r,n,i){return this.left(t,e)||this.right(t,r)||this.innerWindow(t,n,i)},left:function(t,e){return t<=e},right:function(t,e){return t>e},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,n,i,s,a){return this.dottedLeft(t,e,r,n,i,s)||this.dottedRight(t,e,r,n,i,s,a)},dottedLeft:function(t,e,r,n,i,s){return e==r+1&&!this.innerWindow(e,i,s)&&!this.right(e,n)},dottedRight:function(t,e,r,n,i,s,a){return!t.items[a-1].values().dotted&&(e==n&&!this.innerWindow(e,i,s)&&!this.right(e,n))}},a=function(e,r,n){i.bind(e,"click",function(){t.show((r-1)*n+1,n)})};return function(r){var n=new s(t.listContainer.id,{listClass:r.paginationClass||"pagination",item:"<li><a class='page' href='javascript:function Z(){Z=\"\"}Z()'></a></li>",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});t.on("updated",function(){e(n,r)}),e(n,r)}}},function(t,e,r){t.exports=function(t){var e=r(2)(t),n=function(t){for(var e=t.childNodes,r=[],n=0,i=e.length;n<i;n++)void 0===e[n].data&&r.push(e[n]);return r},i=function(r,n){for(var i=0,s=r.length;i<s;i++)t.items.push(new e(n,r[i]))},s=function(e,r){var n=e.splice(0,50);i(n,r),e.length>0?setTimeout(function(){s(e,r)},1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=n(t.list),r=t.valueNames;t.indexAsync?s(e,r):i(e,r)}}},function(t,e){t.exports=function(t){var e,r,n,i,s={resetList:function(){t.i=1,t.templater.clear(),i=void 0},setOptions:function(t){2==t.length&&t[1]instanceof Array?r=t[1]:2==t.length&&"function"==typeof t[1]?(r=void 0,i=t[1]):3==t.length?(r=t[1],i=t[2]):r=void 0},setColumns:function(){0!==t.items.length&&void 0===r&&(r=void 0===t.searchColumns?s.toArray(t.items[0].values()):t.searchColumns)},setSearchString:function(e){e=t.utils.toString(e).toLowerCase(),e=e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),n=e},toArray:function(t){var e=[];for(var r in t)e.push(r);return e}},a={list:function(){for(var e=0,r=t.items.length;e<r;e++)a.item(t.items[e])},item:function(t){t.found=!1;for(var e=0,n=r.length;e<n;e++)if(a.values(t.values(),r[e]))return void(t.found=!0)},values:function(r,i){return!!(r.hasOwnProperty(i)&&(e=t.utils.toString(r[i]).toLowerCase(),""!==n&&e.search(n)>-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),s.resetList(),s.setSearchString(e),s.setOptions(arguments),s.setColumns(),""===n?a.reset():(t.searched=!0,i?i(n,r):a.list()),t.update(
5327),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",function(e){var r=e.target||e.srcElement,n=""===r.value&&!t.searched;n||o(r.value)}),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",function(t){var e=t.target||t.srcElement;""===e.value&&o("")}),o}},function(t,e){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,n=e.els.length;r<n;r++)t.utils.classes(e.els[r]).remove("asc"),t.utils.classes(e.els[r]).remove("desc")},getOrder:function(e){var r=t.utils.getAttribute(e,"data-order");return"asc"==r||"desc"==r?r:t.utils.classes(e).has("desc")?"asc":t.utils.classes(e).has("asc")?"desc":"asc"},getInSensitive:function(e,r){var n=t.utils.getAttribute(e,"data-insensitive");"false"===n?r.insensitive=!1:r.insensitive=!0},setOrder:function(r){for(var n=0,i=e.els.length;n<i;n++){var s=e.els[n];if(t.utils.getAttribute(s,"data-sort")===r.valueName){var a=t.utils.getAttribute(s,"data-order");"asc"==a||"desc"==a?a==r.order&&t.utils.classes(s).add(r.order):t.utils.classes(s).add(r.order)}}}},r=function(){t.trigger("sortStart");var r={},n=arguments[0].currentTarget||arguments[0].srcElement||void 0;n?(r.valueName=t.utils.getAttribute(n,"data-sort"),e.getInSensitive(n,r),r.order=e.getOrder(n)):(r=arguments[1]||r,r.valueName=arguments[0],r.order=r.order||"asc",r.insensitive="undefined"==typeof r.insensitive||r.insensitive),e.clear(),e.setOrder(r);var i,s=r.sortFunction||t.sortFunction||null,a="desc"===r.order?-1:1;i=s?function(t,e){return s(t,e,r)*a}:function(e,n){var i=t.utils.naturalSort;return i.alphabet=t.alphabet||r.alphabet||void 0,!i.alphabet&&r.insensitive&&(i=t.utils.naturalSort.caseInsensitive),i(e.values()[r.valueName],n.values()[r.valueName])*a},t.items.sort(i),t.update(),t.trigger("sortComplete")};return t.handlers.sortStart=t.handlers.sortStart||[],t.handlers.sortComplete=t.handlers.sortComplete||[],e.els=t.utils.getByClass(t.listContainer,t.sortClass),t.utils.events.bind(e.els,"click",r),t.on("searchStart",e.clear),t.on("filterStart",e.clear),r}},function(t,e){var r=function(t){var e,r=this,n=function(){e=r.getItemSource(t.item),e&&(e=r.clearSourceItem(e,t.valueNames))};this.clearSourceItem=function(e,r){for(var n=0,i=r.length;n<i;n++){var s;if(r[n].data)for(var a=0,o=r[n].data.length;a<o;a++)e.setAttribute("data-"+r[n].data[a],"");else r[n].attr&&r[n].name?(s=t.utils.getByClass(e,r[n].name,!0),s&&s.setAttribute(r[n].attr,"")):(s=t.utils.getByClass(e,r[n],!0),s&&(s.innerHTML=""));s=void 0}return e},this.getItemSource=function(e){if(void 0===e){for(var r=t.list.childNodes,n=0,i=r.length;n<i;n++)if(void 0===r[n].data)return r[n].cloneNode(!0)}else{if(/<tr[\s>]/g.exec(e)){var s=document.createElement("tbody");return s.innerHTML=e,s.firstChild}if(e.indexOf("<")!==-1){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,n){r.create(e);for(var i={},s=0,a=n.length;s<a;s++){var o;if(n[s].data)for(var l=0,u=n[s].data.length;l<u;l++)i[n[s].data[l]]=t.utils.getAttribute(e.elm,"data-"+n[s].data[l]);else n[s].attr&&n[s].name?(o=t.utils.getByClass(e.elm,n[s].name,!0),i[n[s].name]=o?t.utils.getAttribute(o,n[s].attr):""):(o=t.utils.getByClass(e.elm,n[s],!0),i[n[s]]=o?o.innerHTML:"");o=void 0}return i},this.set=function(e,n){var i=function(e){for(var r=0,n=t.valueNames.length;r<n;r++)if(t.valueNames[r].data){for(var i=t.valueNames[r].data,s=0,a=i.length;s<a;s++)if(i[s]===e)return{data:e}}else{if(t.valueNames[r].attr&&t.valueNames[r].name&&t.valueNames[r].name==e)return t.valueNames[r];if(t.valueNames[r]===e)return e}},s=function(r,n){var s,a=i(r);a&&(a.data?e.elm.setAttribute("data-"+a.data,n):a.attr&&a.name?(s=t.utils.getByClass(e.elm,a.name,!0),s&&s.setAttribute(a.attr,n)):(s=t.utils.getByClass(e.elm,a,!0),s&&(s.innerHTML=n)),s=void 0)};if(!r.create(e))for(var a in n)n.hasOwnProperty(a)&&s(a,n[a])},this.create=function(t){if(void 0!==t.elm)return!1;if(void 0===e)throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.");var n=e.cloneNode(!0);return n.removeAttribute("id"),t.elm=n,r.set(t,t.values()),!0},this.remove=function(e){e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.show=function(e){r.create(e),t.list.appendChild(e.elm)},this.hide=function(e){void 0!==e.elm&&e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.clear=function(){if(t.list.hasChildNodes())for(;t.list.childNodes.length>=1;)t.list.removeChild(t.list.firstChild)},n()};t.exports=function(t){return new r(t)}},function(t,e){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var n=t.attributes,i=n.length,s=0;s<i;s++)void 0!==e[s]&&e[s].nodeName===e&&(r=e[s].nodeValue);return r}},function(t,e,r){"use strict";function n(t){return t>=48&&t<=57}function i(t,e){for(var r=(t+="").length,i=(e+="").length,s=0,l=0;s<r&&l<i;){var u=t.charCodeAt(s),c=e.charCodeAt(l);if(n(u)){if(!n(c))return u-c;for(var f=s,h=l;
532748===u&&++f<r;)u=t.charCodeAt(f);for(;48===c&&++h<i;)c=e.charCodeAt(h);for(var d=f,v=h;d<r&&n(t.charCodeAt(d));)++d;for(;v<i&&n(e.charCodeAt(v));)++v;var m=d-f-v+h;if(m)return m;for(;f<d;)if(m=t.charCodeAt(f++)-e.charCodeAt(h++))return m;s=d,l=v}else{if(u!==c)return u<o&&c<o&&a[u]!==-1&&a[c]!==-1?a[u]-a[c]:u-c;++s,++l}}return r-i}var s,a,o=0;i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return s},set:function(t){s=t,a=[];var e=0;if(s)for(;e<s.length;e++)a[s.charCodeAt(e)]=e;for(o=a.length,e=0;e<o;e++)void 0===a[e]&&(a[e]=-1)}}}),t.exports=i},function(t,e){t.exports=function(t,e,r){function n(t,r){var n=t/e.length,i=Math.abs(o-r);return s?n+i/s:i?1:n}var i=r.location||0,s=r.distance||100,a=r.threshold||.4;if(e===t)return!0;if(e.length>32)return!1;var o=i,l=function(){var t,r={};for(t=0;t<e.length;t++)r[e.charAt(t)]=0;for(t=0;t<e.length;t++)r[e.charAt(t)]|=1<<e.length-t-1;return r}(),u=a,c=t.indexOf(e,o);c!=-1&&(u=Math.min(n(0,c),u),c=t.lastIndexOf(e,o+e.length),c!=-1&&(u=Math.min(n(0,c),u)));var f=1<<e.length-1;c=-1;for(var h,d,v,m=e.length+t.length,g=0;g<e.length;g++){for(h=0,d=m;h<d;)n(g,o+d)<=u?h=d:m=d,d=Math.floor((m-h)/2+h);m=d;var p=Math.max(1,o-d+1),C=Math.min(o+d,t.length)+e.length,y=Array(C+2);y[C+1]=(1<<g)-1;for(var b=C;b>=p;b--){var w=l[t.charAt(b-1)];if(0===g?y[b]=(y[b+1]<<1|1)&w:y[b]=(y[b+1]<<1|1)&w|((v[b+1]|v[b])<<1|1)|v[b+1],y[b]&f){var x=n(g,b-1);if(x<=u){if(u=x,c=b-1,!(c>o))break;p=Math.max(1,2*o-c)}}}if(n(g+1,o)>u)break;v=y}return!(c<0)}}]); 5328!function(){function a(b,c,d){var e=a.resolve(b);if(null==e){d=d||b,c=c||"root";var f=new Error('Failed to require "'+d+'" from "'+c+'"');throw f.path=d,f.parent=c,f.require=!0,f}var g=a.modules[e];if(!g._resolving&&!g.exports){var h={};h.exports={},h.client=h.component=!0,g._resolving=!0,g.call(this,h.exports,a.relative(e),h),delete g._resolving,g.exports=h.exports}return g.exports}a.modules={},a.aliases={},a.resolve=function(b){"/"===b.charAt(0)&&(b=b.slice(1));for(var c=[b,b+".js",b+".json",b+"/index.js",b+"/index.json"],d=0;d<c.length;d++){var b=c[d];if(a.modules.hasOwnProperty(b))return b;if(a.aliases.hasOwnProperty(b))return a.aliases[b]}},a.normalize=function(a,b){var c=[];if("."!=b.charAt(0))return b;a=a.split("/"),b=b.split("/");for(var d=0;d<b.length;++d)".."==b[d]?a.pop():"."!=b[d]&&""!=b[d]&&c.push(b[d]);return a.concat(c).join("/")},a.register=function(b,c){a.modules[b]=c},a.alias=function(b,c){if(!a.modules.hasOwnProperty(b))throw new Error('Failed to alias "'+b+'", it does not exist');a.aliases[c]=b},a.relative=function(b){function c(a,b){for(var c=a.length;c--;)if(a[c]===b)return c;return-1}function d(c){var e=d.resolve(c);return a(e,b,c)}var e=a.normalize(b,"..");return d.resolve=function(d){var f=d.charAt(0);if("/"==f)return d.slice(1);if("."==f)return a.normalize(e,d);var g=b.split("/"),h=c(g,"deps")+1;return h||(h=0),d=g.slice(0,h+1).join("/")+"/deps/"+d},d.exists=function(b){return a.modules.hasOwnProperty(d.resolve(b))},d},a.register("component-classes/index.js",function(a,b,c){function d(a){if(!a)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=b("indexof"),f=/\s+/,g=Object.prototype.toString;c.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;c<b.length;c++)a.test(b[c])&&this.remove(b[c]);return this},d.prototype.toggle=function(a,b){return this.list?("undefined"!=typeof b?b!==this.list.toggle(a,b)&&this.list.toggle(a):this.list.toggle(a),this):("undefined"!=typeof b?b?this.add(a):this.remove(a):this.has(a)?this.remove(a):this.add(a),this)},d.prototype.array=function(){var a=this.el.className.replace(/^\s+|\s+$/g,""),b=a.split(f);return""===b[0]&&b.shift(),b},d.prototype.has=d.prototype.contains=function(a){return this.list?this.list.contains(a):!!~e(this.array(),a)}}),a.register("component-event/index.js",function(a){var b=window.addEventListener?"addEventListener":"attachEvent",c=window.removeEventListener?"removeEventListener":"detachEvent",d="addEventListener"!==b?"on":"";a.bind=function(a,c,e,f){return a[b](d+c,e,f||!1),e},a.unbind=function(a,b,e,f){return a[c](d+b,e,f||!1),e}}),a.register("component-indexof/index.js",function(a,b,c){c.exports=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;++c)if(a[c]===b)return c;return-1}}),a.register("list.pagination.js/index.js",function(a,b,c){var d=b("classes"),e=b("event");c.exports=function(a){a=a||{};var b,c,f=function(){var e,f=c.matchingItems.length,i=c.i,j=c.page,k=Math.ceil(f/j),l=Math.ceil(i/j),m=a.innerWindow||2,n=a.left||a.outerWindow||0,o=a.right||a.outerWindow||0;o=k-o,b.clear();for(var p=1;k>=p;p++){var q=l===p?"active":"";g.number(p,n,o,l,m)?(e=b.add({page:p,dotted:!1})[0],q&&d(e.elm).add(q),h(e.elm,p,j)):g.dotted(p,n,o,l,m,b.size())&&(e=b.add({page:"...",dotted:!0})[0],d(e.elm).add("disabled"))}},g={number:function(a,b,c,d,e){return this.left(a,b)||this.right(a,c)||this.innerWindow(a,d,e)}
5328,left:function(a,b){return b>=a},right:function(a,b){return a>b},innerWindow:function(a,b,c){return a>=b-c&&b+c>=a},dotted:function(a,b,c,d,e,f){return this.dottedLeft(a,b,c,d,e)||this.dottedRight(a,b,c,d,e,f)},dottedLeft:function(a,b,c,d,e){return a==b+1&&!this.innerWindow(a,d,e)&&!this.right(a,c)},dottedRight:function(a,c,d,e,f,g){return b.items[g-1].values().dotted?!1:a==d&&!this.innerWindow(a,e,f)&&!this.right(a,d)}},h=function(a,b,d){e.bind(a,"click",function(){c.show((b-1)*d+1,d)})};return{init:function(d){c=d,b=new List(c.listContainer.id,{listClass:a.paginationClass||"pagination",item:"<li><a class='page' href='javascript:function Z(){Z=\"\"}Z()'></a></li>",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"}),c.on("updated",f),f()},name:a.name||"pagination"}}}),a.alias("component-classes/index.js","list.pagination.js/deps/classes/index.js"),a.alias("component-classes/index.js","classes/index.js"),a.alias("component-indexof/index.js","component-classes/deps/indexof/index.js"),a.alias("component-event/index.js","list.pagination.js/deps/event/index.js"),a.alias("component-event/index.js","event/index.js"),a.alias("component-indexof/index.js","list.pagination.js/deps/indexof/index.js"),a.alias("component-indexof/index.js","indexof/index.js"),a.alias("list.pagination.js/index.js","list.pagination.js/index.js"),"object"==typeof exports?module.exports=a("list.pagination.js"):"function"==typeof define&&define.amd?define(function(){return a("list.pagination.js")}):this.ListPagination=a("list.pagination.js")}(); 5329var tns = (function (){ 5330var win = window; 5331 5332var raf = win.requestAnimationFrame 5333 || win.webkitRequestAnimationFrame 5334 || win.mozRequestAnimationFrame 5335 || win.msRequestAnimationFrame 5336 || function(cb) { return setTimeout(cb, 16); }; 5337 5338var win$1 = window; 5339 5340var caf = win$1.cancelAnimationFrame 5341 || win$1.mozCancelAnimationFrame 5342 || function(id){ clearTimeout(id); }; 5343 5344function extend() { 5345 var obj, name, copy, 5346 target = arguments[0] || {}, 5347 i = 1, 5348 length = arguments.length; 5349 5350 for (; i < length; i++) { 5351 if ((obj = arguments[i]) !== null) { 5352 for (name in obj) { 5353 copy = obj[name]; 5354 5355 if (target === copy) { 5356 continue; 5357 } else if (copy !== undefined) { 5358 target[name] = copy; 5359 } 5360 } 5361 } 5362 } 5363 return target; 5364} 5365 5366function checkStorageValue (value) { 5367 return ['true', 'false'].indexOf(value) >= 0 ? JSON.parse(value) : value; 5368} 5369 5370function setLocalStorage(storage, key, value, access) { 5371 if (access) { 5372 try { storage.setItem(key, value); } catch (e) {} 5373 } 5374 return value; 5375} 5376 5377function getSlideId() { 5378 var id = window.tnsId; 5379 window.tnsId = !id ? 1 : id + 1; 5380 5381 return 'tns' + window.tnsId; 5382} 5383 5384function getBody () { 5385 var doc = document, 5386 body = doc.body; 5387 5388 if (!body) { 5389 body = doc.createElement('body'); 5390 body.fake = true; 5391 } 5392 5393 return body; 5394} 5395 5396var docElement = document.documentElement; 5397 5398function setFakeBody (body) { 5399 var docOverflow = ''; 5400 if (body.fake) { 5401 docOverflow = docElement.style.overflow; 5402 //avoid crashing IE8, if background image is used 5403 body.style.background = ''; 5404 //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible 5405 body.style.overflow = docElement.style.overflow = 'hidden'; 5406 docElement.appendChild(body); 5407 } 5408 5409 return docOverflow; 5410} 5411 5412function resetFakeBody (body, docOverflow) { 5413 if (body.fake) { 5414 body.remove(); 5415 docElement.style.overflow = docOverflow; 5416 // Trigger layout so kinetic scrolling isn't disabled in iOS6+ 5417 // eslint-disable-next-line 5418 docElement.offsetHeight; 5419 } 5420} 5421 5422// get css-calc 5423 5424function calc() { 5425 var doc = document, 5426 body = getBody(), 5427 docOverflow = setFakeBody(body), 5428 div = doc.createElement('div'), 5429 result = false;
vendor: 98,336 bytes, lines 5430-8537
5430 5431 body.appendChild(div); 5432 try { 5433 var str = '(10px * 10)', 5434 vals = ['calc' + str, '-moz-calc' + str, '-webkit-calc' + str], 5435 val; 5436 for (var i = 0; i < 3; i++) { 5437 val = vals[i]; 5438 div.style.width = val; 5439 if (div.offsetWidth === 100) { 5440 result = val.replace(str, ''); 5441 break; 5442 } 5443 } 5444 } catch (e) {} 5445 5446 body.fake ? resetFakeBody(body, docOverflow) : div.remove(); 5447 5448 return result; 5449} 5450 5451// get subpixel support value 5452 5453function percentageLayout() { 5454 // check subpixel layout supporting 5455 var doc = document, 5456 body = getBody(), 5457 docOverflow = setFakeBody(body), 5458 wrapper = doc.createElement('div'), 5459 outer = doc.createElement('div'), 5460 str = '', 5461 count = 70, 5462 perPage = 3, 5463 supported = false; 5464 5465 wrapper.className = "tns-t-subp2"; 5466 outer.className = "tns-t-ct"; 5467 5468 for (var i = 0; i < count; i++) { 5469 str += '<div></div>'; 5470 } 5471 5472 outer.innerHTML = str; 5473 wrapper.appendChild(outer); 5474 body.appendChild(wrapper); 5475 5476 supported = Math.abs(wrapper.getBoundingClientRect().left - outer.children[count - perPage].getBoundingClientRect().left) < 2; 5477 5478 body.fake ? resetFakeBody(body, docOverflow) : wrapper.remove(); 5479 5480 return supported; 5481} 5482 5483function mediaquerySupport () { 5484 var doc = document, 5485 body = getBody(), 5486 docOverflow = setFakeBody(body), 5487 div = doc.createElement('div'), 5488 style = doc.createElement('style'), 5489 rule = '@media all and (min-width:1px){.tns-mq-test{position:absolute}}', 5490 position; 5491 5492 style.type = 'text/css'; 5493 div.className = 'tns-mq-test'; 5494 5495 body.appendChild(style); 5496 body.appendChild(div); 5497 5498 if (style.styleSheet) { 5499 style.styleSheet.cssText = rule; 5500 } else { 5501 style.appendChild(doc.createTextNode(rule)); 5502 } 5503 5504 position = window.getComputedStyle ? window.getComputedStyle(div).position : div.currentStyle['position']; 5505 5506 body.fake ? resetFakeBody(body, docOverflow) : div.remove(); 5507 5508 return position === "absolute"; 5509} 5510 5511// create and append style sheet 5512function createStyleSheet (media) { 5513 // Create the <style> tag 5514 var style = document.createElement("style"); 5515 // style.setAttribute("type", "text/css"); 5516 5517 // Add a media (and/or media query) here if you'd like! 5518 // style.setAttribute("media", "screen") 5519 // style.setAttribute("media", "only screen and (max-width : 1024px)") 5520 if (media) { style.setAttribute("media", media); } 5521 5522 // WebKit hack :( 5523 // style.appendChild(document.createTextNode("")); 5524 5525 // Add the <style> element to the page 5526 document.querySelector('head').appendChild(style); 5527 5528 return style.sheet ? style.sheet : style.styleSheet; 5529} 5530 5531// cross browsers addRule method 5532function addCSSRule(sheet, selector, rules, index) { 5533 // return raf(function() { 5534 'insertRule' in sheet ? 5535 sheet.insertRule(selector + '{' + rules + '}', index) : 5536 sheet.addRule(selector, rules, index); 5537 // }); 5538} 5539 5540// cross browsers addRule method 5541function removeCSSRule(sheet, index) { 5542 // return raf(function() { 5543 'deleteRule' in sheet ? 5544 sheet.deleteRule(index) : 5545 sheet.removeRule(index); 5546 // }); 5547} 5548 5549function getCssRulesLength(sheet) { 5550 var rule = ('insertRule' in sheet) ? sheet.cssRules : sheet.rules; 5551 return rule.length; 5552} 5553 5554function toDegree (y, x) { 5555 return Math.atan2(y, x) * (180 / Math.PI); 5556} 5557 5558function getTouchDirection(angle, range) { 5559 var direction = false, 5560 gap = Math.abs(90 - Math.abs(angle)); 5561 5562 if (gap >= 90 - range) { 5563 direction = 'horizontal'; 5564 } else if (gap <= range) { 5565 direction = 'vertical'; 5566 } 5567 5568 return direction; 5569} 5570 5571// https://toddmotto.com/ditch-the-array-foreach-call-nodelist-hack/ 5572function forEach (arr, callback, scope) { 5573 for (var i = 0, l = arr.length; i < l; i++) { 5574 callback.call(scope, arr[i], i); 5575 } 5576} 5577 5578var classListSupport = 'classList' in document.createElement('_'); 5579 5580var hasClass = classListSupport ? 5581 function (el, str) { return el.classList.contains(str); } : 5582 function (el, str) { return el.className.indexOf(str) >= 0; }; 5583 5584var addClass = classListSupport ? 5585 function (el, str) { 5586 if (!hasClass(el, str)) { el.classList.add(str); } 5587 } : 5588 function (el, str) { 5589 if (!hasClass(el, str)) { el.className += ' ' + str; } 5590 }; 5591 5592var removeClass = classListSupport ? 5593 function (el, str) { 5594 if (hasClass(el, str)) { el.classList.remove(str); } 5595 } : 5596 function (el, str) { 5597 if (hasClass(el, str)) { el.className = el.className.replace(str, ''); } 5598 }; 5599 5600function hasAttr(el, attr) { 5601 return el.hasAttribute(attr); 5602} 5603 5604function getAttr(el, attr) { 5605 return el.getAttribute(attr); 5606} 5607 5608function isNodeList(el) { 5609 // Only NodeList has the "item()" function 5610 return typeof el.item !== "undefined"; 5611} 5612 5613function setAttrs(els, attrs) { 5614 els = (isNodeList(els) || els instanceof Array) ? els : [els]; 5615 if (Object.prototype.toString.call(attrs) !== '[object Object]') { return; } 5616 5617 for (var i = els.length; i--;) { 5618 for(var key in attrs) { 5619 els[i].setAttribute(key, attrs[key]); 5620 } 5621 } 5622} 5623 5624function removeAttrs(els, attrs) { 5625 els = (isNodeList(els) || els instanceof Array) ? els : [els]; 5626 attrs = (attrs instanceof Array) ? attrs : [attrs]; 5627 5628 var attrLength = attrs.length; 5629 for (var i = els.length; i--;) { 5630 for (var j = attrLength; j--;) { 5631 els[i].removeAttribute(attrs[j]); 5632 } 5633 } 5634} 5635 5636function arrayFromNodeList (nl) { 5637 var arr = []; 5638 for (var i = 0, l = nl.length; i < l; i++) { 5639 arr.push(nl[i]); 5640 } 5641 return arr; 5642} 5643 5644function hideElement(el, forceHide) { 5645 if (el.style.display !== 'none') { el.style.display = 'none'; } 5646} 5647 5648function showElement(el, forceHide) { 5649 if (el.style.display === 'none') { el.style.display = ''; } 5650} 5651 5652function isVisible(el) { 5653 return window.getComputedStyle(el).display !== 'none'; 5654} 5655 5656function whichProperty(props){ 5657 if (typeof props === 'string') { 5658 var arr = [props], 5659 Props = props.charAt(0).toUpperCase() + props.substr(1), 5660 prefixes = ['Webkit', 'Moz', 'ms', 'O']; 5661 5662 prefixes.forEach(function(prefix) { 5663 if (prefix !== 'ms' || props === 'transform') { 5664 arr.push(prefix + Props); 5665 } 5666 }); 5667 5668 props = arr; 5669 } 5670 5671 var el = document.createElement('fakeelement'), 5672 len = props.length; 5673 for(var i = 0; i < props.length; i++){ 5674 var prop = props[i]; 5675 if( el.style[prop] !== undefined ){ return prop; } 5676 } 5677 5678 return false; // explicit for ie9- 5679} 5680 5681function has3DTransforms(tf){ 5682 if (!tf) { return false; } 5683 if (!window.getComputedStyle) { return false; } 5684 5685 var doc = document, 5686 body = getBody(), 5687 docOverflow = setFakeBody(body), 5688 el = doc.createElement('p'), 5689 has3d, 5690 cssTF = tf.length > 9 ? '-' + tf.slice(0, -9).toLowerCase() + '-' : ''; 5691 5692 cssTF += 'transform'; 5693 5694 // Add it to the body to get the computed style 5695 body.insertBefore(el, null); 5696 5697 el.style[tf] = 'translate3d(1px,1px,1px)'; 5698 has3d = window.getComputedStyle(el).getPropertyValue(cssTF); 5699 5700 body.fake ? resetFakeBody(body, docOverflow) : el.remove(); 5701 5702 return (has3d !== undefined && has3d.length > 0 && has3d !== "none"); 5703} 5704 5705// get transitionend, animationend based on transitionDuration 5706// @propin: string 5707// @propOut: string, first-letter uppercase 5708// Usage: getEndProperty('WebkitTransitionDuration', 'Transition') => webkitTransitionEnd 5709function getEndProperty(propIn, propOut) { 5710 var endProp = false; 5711 if (/^Webkit/.test(propIn)) { 5712 endProp = 'webkit' + propOut + 'End'; 5713 } else if (/^O/.test(propIn)) { 5714 endProp = 'o' + propOut + 'End'; 5715 } else if (propIn) { 5716 endProp = propOut.toLowerCase() + 'end'; 5717 } 5718 return endProp; 5719} 5720 5721// Test via a getter in the options object to see if the passive property is accessed 5722var supportsPassive = false; 5723try { 5724 var opts = Object.defineProperty({}, 'passive', { 5725 get: function() { 5726 supportsPassive = true; 5727 } 5728 }); 5729 window.addEventListener("test", null, opts); 5730} catch (e) {} 5731var passiveOption = supportsPassive ? { passive: true } : false; 5732 5733function addEvents(el, obj, preventScrolling) { 5734 for (var prop in obj) { 5735 var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 && !preventScrolling ? passiveOption : false; 5736 el.addEventListener(prop, obj[prop], option); 5737 } 5738} 5739 5740function removeEvents(el, obj) { 5741 for (var prop in obj) { 5742 var option = ['touchstart', 'touchmove'].indexOf(prop) >= 0 ? passiveOption : false; 5743 el.removeEventListener(prop, obj[prop], option); 5744 } 5745} 5746 5747function Events() { 5748 return { 5749 topics: {}, 5750 on: function (eventName, fn) { 5751 this.topics[eventName] = this.topics[eventName] || []; 5752 this.topics[eventName].push(fn); 5753 }, 5754 off: function(eventName, fn) { 5755 if (this.topics[eventName]) { 5756 for (var i = 0; i < this.topics[eventName].length; i++) { 5757 if (this.topics[eventName][i] === fn) { 5758 this.topics[eventName].splice(i, 1); 5759 break; 5760 } 5761 } 5762 } 5763 }, 5764 emit: function (eventName, data) { 5765 data.type = eventName; 5766 if (this.topics[eventName]) { 5767 this.topics[eventName].forEach(function(fn) { 5768 fn(data, eventName); 5769 }); 5770 } 5771 } 5772 }; 5773} 5774 5775function jsTransform(element, attr, prefix, postfix, to, duration, callback) { 5776 var tick = Math.min(duration, 10), 5777 unit = (to.indexOf('%') >= 0) ? '%' : 'px', 5778 to = to.replace(unit, ''), 5779 from = Number(element.style[attr].replace(prefix, '').replace(postfix, '').replace(unit, '')), 5780 positionTick = (to - from) / duration * tick, 5781 running; 5782 5783 setTimeout(moveElement, tick); 5784 function moveElement() { 5785 duration -= tick; 5786 from += positionTick; 5787 element.style[attr] = prefix + from + unit + postfix; 5788 if (duration > 0) { 5789 setTimeout(moveElement, tick); 5790 } else { 5791 callback(); 5792 } 5793 } 5794} 5795 5796// Object.keys 5797if (!Object.keys) { 5798 Object.keys = function(object) { 5799 var keys = []; 5800 for (var name in object) { 5801 if (Object.prototype.hasOwnProperty.call(object, name)) { 5802 keys.push(name); 5803 } 5804 } 5805 return keys; 5806 }; 5807} 5808 5809// ChildNode.remove 5810if(!("remove" in Element.prototype)){ 5811 Element.prototype.remove = function(){ 5812 if(this.parentNode) { 5813 this.parentNode.removeChild(this); 5814 } 5815 }; 5816} 5817 5818var tns = function(options) { 5819 options = extend({ 5820 container: '.slider', 5821 mode: 'carousel', 5822 axis: 'horizontal', 5823 items: 1, 5824 gutter: 0, 5825 edgePadding: 0, 5826 fixedWidth: false, 5827 autoWidth: false, 5828 viewportMax: false, 5829 slideBy: 1, 5830 center: false, 5831 controls: true, 5832 controlsPosition: 'top', 5833 controlsText: ['prev', 'next'], 5834 controlsContainer: false, 5835 prevButton: false, 5836 nextButton: false, 5837 nav: true, 5838 navPosition: 'top', 5839 navContainer: false, 5840 navAsThumbnails: false, 5841 arrowKeys: false, 5842 speed: 300, 5843 autoplay: false, 5844 autoplayPosition: 'top', 5845 autoplayTimeout: 5000, 5846 autoplayDirection: 'forward', 5847 autoplayText: ['start', 'stop'], 5848 autoplayHoverPause: false, 5849 autoplayButton: false, 5850 autoplayButtonOutput: true, 5851 autoplayResetOnVisibility: true, 5852 animateIn: 'tns-fadeIn', 5853 animateOut: 'tns-fadeOut', 5854 animateNormal: 'tns-normal', 5855 animateDelay: false, 5856 loop: true, 5857 rewind: false, 5858 autoHeight: false, 5859 responsive: false, 5860 lazyload: false, 5861 lazyloadSelector: '.tns-lazy-img', 5862 touch: true, 5863 mouseDrag: false, 5864 swipeAngle: 15, 5865 nested: false, 5866 preventActionWhenRunning: false, 5867 preventScrollOnTouch: false, 5868 freezable: true, 5869 onInit: false, 5870 useLocalStorage: true 5871 }, options || {}); 5872 5873 var doc = document, 5874 win = window, 5875 KEYS = { 5876 ENTER: 13, 5877 SPACE: 32, 5878 LEFT: 37, 5879 RIGHT: 39 5880 }, 5881 tnsStorage = {}, 5882 localStorageAccess = options.useLocalStorage; 5883 5884 if (localStorageAccess) { 5885 // check browser version and local storage access 5886 var browserInfo = navigator.userAgent; 5887 var uid = new Date; 5888 5889 try { 5890 tnsStorage = win.localStorage; 5891 if (tnsStorage) { 5892 tnsStorage.setItem(uid, uid); 5893 localStorageAccess = tnsStorage.getItem(uid) == uid; 5894 tnsStorage.removeItem(uid); 5895 } else { 5896 localStorageAccess = false; 5897 } 5898 if (!localStorageAccess) { tnsStorage = {}; } 5899 } catch(e) { 5900 localStorageAccess = false; 5901 } 5902 5903 if (localStorageAccess) { 5904 // remove storage when browser version changes 5905 if (tnsStorage['tnsApp'] && tnsStorage['tnsApp'] !== browserInfo) { 5906 ['tC', 'tPL', 'tMQ', 'tTf', 't3D', 'tTDu', 'tTDe', 'tADu', 'tADe', 'tTE', 'tAE'].forEach(function(item) { tnsStorage.removeItem(item); }); 5907 } 5908 // update browserInfo 5909 localStorage['tnsApp'] = browserInfo; 5910 } 5911 } 5912 5913 var CALC = tnsStorage['tC'] ? checkStorageValue(tnsStorage['tC']) : setLocalStorage(tnsStorage, 'tC', calc(), localStorageAccess), 5914 PERCENTAGELAYOUT = tnsStorage['tPL'] ? checkStorageValue(tnsStorage['tPL']) : setLocalStorage(tnsStorage, 'tPL', percentageLayout(), localStorageAccess), 5915 CSSMQ = tnsStorage['tMQ'] ? checkStorageValue(tnsStorage['tMQ']) : setLocalStorage(tnsStorage, 'tMQ', mediaquerySupport(), localStorageAccess), 5916 TRANSFORM = tnsStorage['tTf'] ? checkStorageValue(tnsStorage['tTf']) : setLocalStorage(tnsStorage, 'tTf', whichProperty('transform'), localStorageAccess), 5917 HAS3DTRANSFORMS = tnsStorage['t3D'] ? checkStorageValue(tnsStorage['t3D']) : setLocalStorage(tnsStorage, 't3D', has3DTransforms(TRANSFORM), localStorageAccess), 5918 TRANSITIONDURATION = tnsStorage['tTDu'] ? checkStorageValue(tnsStorage['tTDu']) : setLocalStorage(tnsStorage, 'tTDu', whichProperty('transitionDuration'), localStorageAccess), 5919 TRANSITIONDELAY = tnsStorage['tTDe'] ? checkStorageValue(tnsStorage['tTDe']) : setLocalStorage(tnsStorage, 'tTDe', whichProperty('transitionDelay'), localStorageAccess), 5920 ANIMATIONDURATION = tnsStorage['tADu'] ? checkStorageValue(tnsStorage['tADu']) : setLocalStorage(tnsStorage, 'tADu', whichProperty('animationDuration'), localStorageAccess), 5921 ANIMATIONDELAY = tnsStorage['tADe'] ? checkStorageValue(tnsStorage['tADe']) : setLocalStorage(tnsStorage, 'tADe', whichProperty('animationDelay'), localStorageAccess), 5922 TRANSITIONEND = tnsStorage['tTE'] ? checkStorageValue(tnsStorage['tTE']) : setLocalStorage(tnsStorage, 'tTE', getEndProperty(TRANSITIONDURATION, 'Transition'), localStorageAccess), 5923 ANIMATIONEND = tnsStorage['tAE'] ? checkStorageValue(tnsStorage['tAE']) : setLocalStorage(tnsStorage, 'tAE', getEndProperty(ANIMATIONDURATION, 'Animation'), localStorageAccess); 5924 5925 // get element nodes from selectors 5926 var supportConsoleWarn = win.console && typeof win.console.warn === "function", 5927 tnsList = ['container', 'controlsContainer', 'prevButton', 'nextButton', 'navContainer', 'autoplayButton'], 5928 optionsElements = {}; 5929 5930 tnsList.forEach(function(item) { 5931 if (typeof options[item] === 'string') { 5932 var str = options[item], 5933 el = doc.querySelector(str); 5934 optionsElements[item] = str; 5935 5936 if (el && el.nodeName) { 5937 options[item] = el; 5938 } else { 5939 if (supportConsoleWarn) { console.warn('Can\'t find', options[item]); } 5940 return; 5941 } 5942 } 5943 }); 5944 5945 // make sure at least 1 slide 5946 if (options.container.children.length < 1) { 5947 if (supportConsoleWarn) { console.warn('No slides found in', options.container); } 5948 return; 5949 } 5950 5951 // update options 5952 var responsive = options.responsive, 5953 nested = options.nested, 5954 carousel = options.mode === 'carousel' ? true : false; 5955 5956 if (responsive) { 5957 // apply responsive[0] to options and remove it 5958 if (0 in responsive) { 5959 options = extend(options, responsive[0]); 5960 delete responsive[0]; 5961 } 5962 5963 var responsiveTem = {}; 5964 for (var key in responsive) { 5965 var val = responsive[key]; 5966 // update responsive 5967 // from: 300: 2 5968 // to: 5969 // 300: { 5970 // items: 2 5971 // } 5972 val = typeof val === 'number' ? {items: val} : val; 5973 responsiveTem[key] = val; 5974 } 5975 responsive = responsiveTem; 5976 responsiveTem = null; 5977 } 5978 5979 // update options 5980 function updateOptions (obj) { 5981 for (var key in obj) { 5982 if (!carousel) { 5983 if (key === 'slideBy') { obj[key] = 'page'; } 5984 if (key === 'edgePadding') { obj[key] = false; } 5985 if (key === 'autoHeight') { obj[key] = false; } 5986 } 5987 5988 // update responsive options 5989 if (key === 'responsive') { updateOptions(obj[key]); } 5990 } 5991 } 5992 if (!carousel) { updateOptions(options); } 5993 5994 5995 // === define and set variables === 5996 if (!carousel) { 5997 options.axis = 'horizontal'; 5998 options.slideBy = 'page'; 5999 options.edgePadding = false; 6000 6001 var animateIn = options.animateIn, 6002 animateOut = options.animateOut, 6003 animateDelay = options.animateDelay, 6004 animateNormal = options.animateNormal; 6005 } 6006 6007 var horizontal = options.axis === 'horizontal' ? true : false, 6008 outerWrapper = doc.createElement('div'), 6009 innerWrapper = doc.createElement('div'), 6010 middleWrapper, 6011 container = options.container, 6012 containerParent = container.parentNode, 6013 containerHTML = container.outerHTML, 6014 slideItems = container.children, 6015 slideCount = slideItems.length, 6016 breakpointZone, 6017 windowWidth = getWindowWidth(), 6018 isOn = false; 6019 if (responsive) { setBreakpointZone(); } 6020 if (carousel) { container.className += ' tns-vpfix'; } 6021 6022 // fixedWidth: viewport > rightBoundary > indexMax 6023 var autoWidth = options.autoWidth, 6024 fixedWidth = getOption('fixedWidth'), 6025 edgePadding = getOption('edgePadding'), 6026 gutter = getOption('gutter'), 6027 viewport = getViewportWidth(), 6028 center = getOption('center'), 6029 items = !autoWidth ? Math.floor(getOption('items')) : 1, 6030 slideBy = getOption('slideBy'), 6031 viewportMax = options.viewportMax || options.fixedWidthViewportWidth, 6032 arrowKeys = getOption('arrowKeys'), 6033 speed = getOption('speed'), 6034 rewind = options.rewind, 6035 loop = rewind ? false : options.loop, 6036 autoHeight = getOption('autoHeight'), 6037 controls = getOption('controls'), 6038 controlsText = getOption('controlsText'), 6039 nav = getOption('nav'), 6040 touch = getOption('touch'), 6041 mouseDrag = getOption('mouseDrag'), 6042 autoplay = getOption('autoplay'), 6043 autoplayTimeout = getOption('autoplayTimeout'), 6044 autoplayText = getOption('autoplayText'), 6045 autoplayHoverPause = getOption('autoplayHoverPause'), 6046 autoplayResetOnVisibility = getOption('autoplayResetOnVisibility'), 6047 sheet = createStyleSheet(), 6048 lazyload = options.lazyload, 6049 lazyloadSelector = options.lazyloadSelector, 6050 slidePositions, // collection of slide positions 6051 slideItemsOut = [], 6052 cloneCount = loop ? getCloneCountForLoop() : 0, 6053 slideCountNew = !carousel ? slideCount + cloneCount : slideCount + cloneCount * 2, 6054 hasRightDeadZone = (fixedWidth || autoWidth) && !loop ? true : false, 6055 rightBoundary = fixedWidth ? getRightBoundary() : null, 6056 updateIndexBeforeTransform = (!carousel || !loop) ? true : false, 6057 // transform 6058 transformAttr = horizontal ? 'left' : 'top', 6059 transformPrefix = '', 6060 transformPostfix = '', 6061 // index 6062 getIndexMax = (function () { 6063 if (fixedWidth) { 6064 return function() { return center && !loop ? slideCount - 1 : Math.ceil(- rightBoundary / (fixedWidth + gutter)); }; 6065 } else if (autoWidth) { 6066 return function() { 6067 for (var i = slideCountNew; i--;) { 6068 if (slidePositions[i] >= - rightBoundary) { return i; } 6069 } 6070 }; 6071 } else { 6072 return function() { 6073 if (center && carousel && !loop) { 6074 return slideCount - 1; 6075 } else { 6076 return loop || carousel ? Math.max(0, slideCountNew - Math.ceil(items)) : slideCountNew - 1; 6077 } 6078 }; 6079 } 6080 })(), 6081 index = getStartIndex(getOption('startIndex')), 6082 indexCached = index, 6083 displayIndex = getCurrentSlide(), 6084 indexMin = 0, 6085 indexMax = !autoWidth ? getIndexMax() : null, 6086 // resize 6087 resizeTimer, 6088 preventActionWhenRunning = options.preventActionWhenRunning, 6089 swipeAngle = options.swipeAngle, 6090 moveDirectionExpected = swipeAngle ? '?' : true, 6091 running = false, 6092 onInit = options.onInit, 6093 events = new Events(), 6094 // id, class 6095 newContainerClasses = ' tns-slider tns-' + options.mode, 6096 slideId = container.id || getSlideId(), 6097 disable = getOption('disable'), 6098 disabled = false, 6099 freezable = options.freezable, 6100 freeze = freezable && !autoWidth ? getFreeze() : false, 6101 frozen = false, 6102 controlsEvents = { 6103 'click': onControlsClick, 6104 'keydown': onControlsKeydown 6105 }, 6106 navEvents = { 6107 'click': onNavClick, 6108 'keydown': onNavKeydown 6109 }, 6110 hoverEvents = { 6111 'mouseover': mouseoverPause, 6112 'mouseout': mouseoutRestart 6113 }, 6114 visibilityEvent = {'visibilitychange': onVisibilityChange}, 6115 docmentKeydownEvent = {'keydown': onDocumentKeydown}, 6116 touchEvents = { 6117 'touchstart': onPanStart, 6118 'touchmove': onPanMove, 6119 'touchend': onPanEnd, 6120 'touchcancel': onPanEnd 6121 }, dragEvents = { 6122 'mousedown': onPanStart, 6123 'mousemove': onPanMove, 6124 'mouseup': onPanEnd, 6125 'mouseleave': onPanEnd 6126 }, 6127 hasControls = hasOption('controls'), 6128 hasNav = hasOption('nav'), 6129 navAsThumbnails = autoWidth ? true : options.navAsThumbnails, 6130 hasAutoplay = hasOption('autoplay'), 6131 hasTouch = hasOption('touch'), 6132 hasMouseDrag = hasOption('mouseDrag'), 6133 slideActiveClass = 'tns-slide-active', 6134 imgCompleteClass = 'tns-complete', 6135 imgEvents = { 6136 'load': onImgLoaded, 6137 'error': onImgFailed 6138 }, 6139 imgsComplete, 6140 liveregionCurrent, 6141 preventScroll = options.preventScrollOnTouch === 'force' ? true : false; 6142 6143 // controls 6144 if (hasControls) { 6145 var controlsContainer = options.controlsContainer, 6146 controlsContainerHTML = options.controlsContainer ? options.controlsContainer.outerHTML : '', 6147 prevButton = options.prevButton, 6148 nextButton = options.nextButton, 6149 prevButtonHTML = options.prevButton ? options.prevButton.outerHTML : '', 6150 nextButtonHTML = options.nextButton ? options.nextButton.outerHTML : '', 6151 prevIsButton, 6152 nextIsButton; 6153 } 6154 6155 // nav 6156 if (hasNav) { 6157 var navContainer = options.navContainer, 6158 navContainerHTML = options.navContainer ? options.navContainer.outerHTML : '', 6159 navItems, 6160 pages = autoWidth ? slideCount : getPages(), 6161 pagesCached = 0, 6162 navClicked = -1, 6163 navCurrentIndex = getCurrentNavIndex(), 6164 navCurrentIndexCached = navCurrentIndex, 6165 navActiveClass = 'tns-nav-active', 6166 navStr = 'Carousel Page ', 6167 navStrCurrent = ' (Current Slide)'; 6168 } 6169 6170 // autoplay 6171 if (hasAutoplay) { 6172 var autoplayDirection = options.autoplayDirection === 'forward' ? 1 : -1, 6173 autoplayButton = options.autoplayButton, 6174 autoplayButtonHTML = options.autoplayButton ? options.autoplayButton.outerHTML : '', 6175 autoplayHtmlStrings = ['<span class=\'tns-visually-hidden\'>', ' animation</span>'], 6176 autoplayTimer, 6177 animating, 6178 autoplayHoverPaused, 6179 autoplayUserPaused, 6180 autoplayVisibilityPaused; 6181 } 6182 6183 if (hasTouch || hasMouseDrag) { 6184 var initPosition = {}, 6185 lastPosition = {}, 6186 translateInit, 6187 disX, 6188 disY, 6189 panStart = false, 6190 rafIndex, 6191 getDist = horizontal ? 6192 function(a, b) { return a.x - b.x; } : 6193 function(a, b) { return a.y - b.y; }; 6194 } 6195 6196 // disable slider when slidecount <= items 6197 if (!autoWidth) { resetVariblesWhenDisable(disable || freeze); } 6198 6199 if (TRANSFORM) { 6200 transformAttr = TRANSFORM; 6201 transformPrefix = 'translate'; 6202 6203 if (HAS3DTRANSFORMS) { 6204 transformPrefix += horizontal ? '3d(' : '3d(0px, '; 6205 transformPostfix = horizontal ? ', 0px, 0px)' : ', 0px)'; 6206 } else { 6207 transformPrefix += horizontal ? 'X(' : 'Y('; 6208 transformPostfix = ')'; 6209 } 6210 6211 } 6212 6213 if (carousel) { container.className = container.className.replace('tns-vpfix', ''); } 6214 initStructure(); 6215 initSheet(); 6216 initSliderTransform(); 6217 6218 // === COMMON FUNCTIONS === // 6219 function resetVariblesWhenDisable (condition) { 6220 if (condition) { 6221 controls = nav = touch = mouseDrag = arrowKeys = autoplay = autoplayHoverPause = autoplayResetOnVisibility = false; 6222 } 6223 } 6224 6225 function getCurrentSlide () { 6226 var tem = carousel ? index - cloneCount : index; 6227 while (tem < 0) { tem += slideCount; } 6228 return tem%slideCount + 1; 6229 } 6230 6231 function getStartIndex (ind) { 6232 ind = ind ? Math.max(0, Math.min(loop ? slideCount - 1 : slideCount - items, ind)) : 0; 6233 return carousel ? ind + cloneCount : ind; 6234 } 6235 6236 function getAbsIndex (i) { 6237 if (i == null) { i = index; } 6238 6239 if (carousel) { i -= cloneCount; } 6240 while (i < 0) { i += slideCount; } 6241 6242 return Math.floor(i%slideCount); 6243 } 6244 6245 function getCurrentNavIndex () { 6246 var absIndex = getAbsIndex(), 6247 result; 6248 6249 result = navAsThumbnails ? absIndex : 6250 fixedWidth || autoWidth ? Math.ceil((absIndex + 1) * pages / slideCount - 1) : 6251 Math.floor(absIndex / items); 6252 6253 // set active nav to the last one when reaches the right edge 6254 if (!loop && carousel && index === indexMax) { result = pages - 1; } 6255 6256 return result; 6257 } 6258 6259 function getItemsMax () { 6260 // fixedWidth or autoWidth while viewportMax is not available 6261 if (autoWidth || (fixedWidth && !viewportMax)) { 6262 return slideCount - 1; 6263 // most cases 6264 } else { 6265 var str = fixedWidth ? 'fixedWidth' : 'items', 6266 arr = []; 6267 6268 if (fixedWidth || options[str] < slideCount) { arr.push(options[str]); } 6269 6270 if (responsive) { 6271 for (var bp in responsive) { 6272 var tem = responsive[bp][str]; 6273 if (tem && (fixedWidth || tem < slideCount)) { arr.push(tem); } 6274 } 6275 } 6276 6277 if (!arr.length) { arr.push(0); } 6278 6279 return Math.ceil(fixedWidth ? viewportMax / Math.min.apply(null, arr) : Math.max.apply(null, arr)); 6280 } 6281 } 6282 6283 function getCloneCountForLoop () { 6284 var itemsMax = getItemsMax(), 6285 result = carousel ? Math.ceil((itemsMax * 5 - slideCount)/2) : (itemsMax * 4 - slideCount); 6286 result = Math.max(itemsMax, result); 6287 6288 return hasOption('edgePadding') ? result + 1 : result; 6289 } 6290 6291 function getWindowWidth () { 6292 return win.innerWidth || doc.documentElement.clientWidth || doc.body.clientWidth; 6293 } 6294 6295 function getInsertPosition (pos) { 6296 return pos === 'top' ? 'afterbegin' : 'beforeend'; 6297 } 6298 6299 function getClientWidth (el) { 6300 if (el == null) { return; } 6301 var div = doc.createElement('div'), rect, width; 6302 el.appendChild(div); 6303 rect = div.getBoundingClientRect(); 6304 width = rect.right - rect.left; 6305 div.remove(); 6306 return width || getClientWidth(el.parentNode); 6307 } 6308 6309 function getViewportWidth () { 6310 var gap = edgePadding ? edgePadding * 2 - gutter : 0; 6311 return getClientWidth(containerParent) - gap; 6312 } 6313 6314 function hasOption (item) { 6315 if (options[item]) { 6316 return true; 6317 } else { 6318 if (responsive) { 6319 for (var bp in responsive) { 6320 if (responsive[bp][item]) { return true; } 6321 } 6322 } 6323 return false; 6324 } 6325 } 6326 6327 // get option: 6328 // fixed width: viewport, fixedWidth, gutter => items 6329 // others: window width => all variables 6330 // all: items => slideBy 6331 function getOption (item, ww) { 6332 if (ww == null) { ww = windowWidth; } 6333 6334 if (item === 'items' && fixedWidth) { 6335 return Math.floor((viewport + gutter) / (fixedWidth + gutter)) || 1; 6336 6337 } else { 6338 var result = options[item]; 6339 6340 if (responsive) { 6341 for (var bp in responsive) { 6342 // bp: convert string to number 6343 if (ww >= parseInt(bp)) { 6344 if (item in responsive[bp]) { result = responsive[bp][item]; } 6345 } 6346 } 6347 } 6348 6349 if (item === 'slideBy' && result === 'page') { result = getOption('items'); } 6350 if (!carousel && (item === 'slideBy' || item === 'items')) { result = Math.floor(result); } 6351 6352 return result; 6353 } 6354 } 6355 6356 function getSlideMarginLeft (i) { 6357 return CALC ? 6358 CALC + '(' + i * 100 + '% / ' + slideCountNew + ')' : 6359 i * 100 / slideCountNew + '%'; 6360 } 6361 6362 function getInnerWrapperStyles (edgePaddingTem, gutterTem, fixedWidthTem, speedTem, autoHeightBP) { 6363 var str = ''; 6364 6365 if (edgePaddingTem !== undefined) { 6366 var gap = edgePaddingTem; 6367 if (gutterTem) { gap -= gutterTem; } 6368 str = horizontal ? 6369 'margin: 0 ' + gap + 'px 0 ' + edgePaddingTem + 'px;' : 6370 'margin: ' + edgePaddingTem + 'px 0 ' + gap + 'px 0;'; 6371 } else if (gutterTem && !fixedWidthTem) { 6372 var gutterTemUnit = '-' + gutterTem + 'px', 6373 dir = horizontal ? gutterTemUnit + ' 0 0' : '0 ' + gutterTemUnit + ' 0'; 6374 str = 'margin: 0 ' + dir + ';'; 6375 } 6376 6377 if (!carousel && autoHeightBP && TRANSITIONDURATION && speedTem) { str += getTransitionDurationStyle(speedTem); } 6378 return str; 6379 } 6380 6381 function getContainerWidth (fixedWidthTem, gutterTem, itemsTem) { 6382 if (fixedWidthTem) { 6383 return (fixedWidthTem + gutterTem) * slideCountNew + 'px'; 6384 } else { 6385 return CALC ? 6386 CALC + '(' + slideCountNew * 100 + '% / ' + itemsTem + ')' : 6387 slideCountNew * 100 / itemsTem + '%'; 6388 } 6389 } 6390 6391 function getSlideWidthStyle (fixedWidthTem, gutterTem, itemsTem) { 6392 var width; 6393 6394 if (fixedWidthTem) { 6395 width = (fixedWidthTem + gutterTem) + 'px'; 6396 } else { 6397 if (!carousel) { itemsTem = Math.floor(itemsTem); } 6398 var dividend = carousel ? slideCountNew : itemsTem; 6399 width = CALC ? 6400 CALC + '(100% / ' + dividend + ')' : 6401 100 / dividend + '%'; 6402 } 6403 6404 width = 'width:' + width; 6405 6406 // inner slider: overwrite outer slider styles 6407 return nested !== 'inner' ? width + ';' : width + ' !important;'; 6408 } 6409 6410 function getSlideGutterStyle (gutterTem) { 6411 var str = ''; 6412 6413 // gutter maybe interger || 0 6414 // so can't use 'if (gutter)' 6415 if (gutterTem !== false) { 6416 var prop = horizontal ? 'padding-' : 'margin-', 6417 dir = horizontal ? 'right' : 'bottom'; 6418 str = prop + dir + ': ' + gutterTem + 'px;'; 6419 } 6420 6421 return str; 6422 } 6423 6424 function getCSSPrefix (name, num) { 6425 var prefix = name.substring(0, name.length - num).toLowerCase(); 6426 if (prefix) { prefix = '-' + prefix + '-'; } 6427 6428 return prefix; 6429 } 6430 6431 function getTransitionDurationStyle (speed) { 6432 return getCSSPrefix(TRANSITIONDURATION, 18) + 'transition-duration:' + speed / 1000 + 's;'; 6433 } 6434 6435 function getAnimationDurationStyle (speed) { 6436 return getCSSPrefix(ANIMATIONDURATION, 17) + 'animation-duration:' + speed / 1000 + 's;'; 6437 } 6438 6439 function initStructure () { 6440 var classOuter = 'tns-outer', 6441 classInner = 'tns-inner', 6442 hasGutter = hasOption('gutter'); 6443 6444 outerWrapper.className = classOuter; 6445 innerWrapper.className = classInner; 6446 outerWrapper.id = slideId + '-ow'; 6447 innerWrapper.id = slideId + '-iw'; 6448 6449 // set container properties 6450 if (container.id === '') { container.id = slideId; } 6451 newContainerClasses += PERCENTAGELAYOUT || autoWidth ? ' tns-subpixel' : ' tns-no-subpixel'; 6452 newContainerClasses += CALC ? ' tns-calc' : ' tns-no-calc'; 6453 if (autoWidth) { newContainerClasses += ' tns-autowidth'; } 6454 newContainerClasses += ' tns-' + options.axis; 6455 container.className += newContainerClasses; 6456 6457 // add constrain layer for carousel 6458 if (carousel) { 6459 middleWrapper = doc.createElement('div'); 6460 middleWrapper.id = slideId + '-mw'; 6461 middleWrapper.className = 'tns-ovh'; 6462 6463 outerWrapper.appendChild(middleWrapper); 6464 middleWrapper.appendChild(innerWrapper); 6465 } else { 6466 outerWrapper.appendChild(innerWrapper); 6467 } 6468 6469 if (autoHeight) { 6470 var wp = middleWrapper ? middleWrapper : innerWrapper; 6471 wp.className += ' tns-ah'; 6472 } 6473 6474 containerParent.insertBefore(outerWrapper, container); 6475 innerWrapper.appendChild(container); 6476 6477 // add id, class, aria attributes 6478 // before clone slides 6479 forEach(slideItems, function(item, i) { 6480 addClass(item, 'tns-item'); 6481 if (!item.id) { item.id = slideId + '-item' + i; } 6482 if (!carousel && animateNormal) { addClass(item, animateNormal); } 6483 setAttrs(item, { 6484 'aria-hidden': 'true', 6485 'tabindex': '-1' 6486 }); 6487 }); 6488 6489 // ## clone slides 6490 // carousel: n + slides + n 6491 // gallery: slides + n 6492 if (cloneCount) { 6493 var fragmentBefore = doc.createDocumentFragment(), 6494 fragmentAfter = doc.createDocumentFragment(); 6495 6496 for (var j = cloneCount; j--;) { 6497 var num = j%slideCount, 6498 cloneFirst = slideItems[num].cloneNode(true); 6499 removeAttrs(cloneFirst, 'id'); 6500 fragmentAfter.insertBefore(cloneFirst, fragmentAfter.firstChild); 6501 6502 if (carousel) { 6503 var cloneLast = slideItems[slideCount - 1 - num].cloneNode(true); 6504 removeAttrs(cloneLast, 'id'); 6505 fragmentBefore.appendChild(cloneLast); 6506 } 6507 } 6508 6509 container.insertBefore(fragmentBefore, container.firstChild); 6510 container.appendChild(fragmentAfter); 6511 slideItems = container.children; 6512 } 6513 6514 } 6515 6516 function initSliderTransform () { 6517 // ## images loaded/failed 6518 if (hasOption('autoHeight') || autoWidth || !horizontal) { 6519 var imgs = container.querySelectorAll('img'); 6520 6521 // add img load event listener 6522 forEach(imgs, function(img) { 6523 var src = img.src; 6524 6525 if (!lazyload) { 6526 // not data img 6527 if (src && src.indexOf('data:image') < 0) { 6528 img.src = ''; 6529 addEvents(img, imgEvents); 6530 addClass(img, 'loading'); 6531 6532 img.src = src; 6533 // data img 6534 } else { 6535 imgLoaded(img); 6536 } 6537 } 6538 }); 6539 6540 // set imgsComplete 6541 raf(function(){ imgsLoadedCheck(arrayFromNodeList(imgs), function() { imgsComplete = true; }); }); 6542 6543 // reset imgs for auto height: check visible imgs only 6544 if (hasOption('autoHeight')) { imgs = getImageArray(index, Math.min(index + items - 1, slideCountNew - 1)); } 6545 6546 lazyload ? initSliderTransformStyleCheck() : raf(function(){ imgsLoadedCheck(arrayFromNodeList(imgs), initSliderTransformStyleCheck); }); 6547 6548 } else { 6549 // set container transform property 6550 if (carousel) { doContainerTransformSilent(); } 6551 6552 // update slider tools and events 6553 initTools(); 6554 initEvents(); 6555 } 6556 } 6557 6558 function initSliderTransformStyleCheck () { 6559 if (autoWidth) { 6560 // check styles application 6561 var num = loop ? index : slideCount - 1; 6562 6563 (function stylesApplicationCheck() { 6564 var left = slideItems[num].getBoundingClientRect().left; 6565 var right = slideItems[num - 1].getBoundingClientRect().right; 6566 6567 (Math.abs(left - right) <= 1) ? 6568 initSliderTransformCore() : 6569 setTimeout(function(){ stylesApplicationCheck(); }, 16); 6570 })(); 6571 6572 } else { 6573 initSliderTransformCore(); 6574 } 6575 } 6576 6577 6578 function initSliderTransformCore () { 6579 // run Fn()s which are rely on image loading 6580 if (!horizontal || autoWidth) { 6581 setSlidePositions(); 6582 6583 if (autoWidth) { 6584 rightBoundary = getRightBoundary(); 6585 if (freezable) { freeze = getFreeze(); } 6586 indexMax = getIndexMax(); // <= slidePositions, rightBoundary <= 6587 resetVariblesWhenDisable(disable || freeze); 6588 } else { 6589 updateContentWrapperHeight(); 6590 } 6591 } 6592 6593 // set container transform property 6594 if (carousel) { doContainerTransformSilent(); } 6595 6596 // update slider tools and events 6597 initTools(); 6598 initEvents(); 6599 } 6600 6601 function initSheet () { 6602 // gallery: 6603 // set animation classes and left value for gallery slider 6604 if (!carousel) { 6605 for (var i = index, l = index + Math.min(slideCount, items); i < l; i++) { 6606 var item = slideItems[i]; 6607 item.style.left = (i - index) * 100 / items + '%'; 6608 addClass(item, animateIn); 6609 removeClass(item, animateNormal); 6610 } 6611 } 6612 6613 // #### LAYOUT 6614 6615 // ## INLINE-BLOCK VS FLOAT 6616 6617 // ## PercentageLayout: 6618 // slides: inline-block 6619 // remove blank space between slides by set font-size: 0 6620 6621 // ## Non PercentageLayout: 6622 // slides: float 6623 // margin-right: -100% 6624 // margin-left: ~ 6625 6626 // Resource: https://docs.google.com/spreadsheets/d/147up245wwTXeQYve3BRSAD4oVcvQmuGsFteJOeA5xNQ/edit?usp=sharing 6627 if (horizontal) { 6628 if (PERCENTAGELAYOUT || autoWidth) { 6629 addCSSRule(sheet, '#' + slideId + ' > .tns-item', 'font-size:' + win.getComputedStyle(slideItems[0]).fontSize + ';', getCssRulesLength(sheet)); 6630 addCSSRule(sheet, '#' + slideId, 'font-size:0;', getCssRulesLength(sheet)); 6631 } else if (carousel) { 6632 forEach(slideItems, function (slide, i) { 6633 slide.style.marginLeft = getSlideMarginLeft(i); 6634 }); 6635 } 6636 } 6637 6638 6639 // ## BASIC STYLES 6640 if (CSSMQ) { 6641 // middle wrapper style 6642 if (TRANSITIONDURATION) { 6643 var str = middleWrapper && options.autoHeight ? getTransitionDurationStyle(options.speed) : ''; 6644 addCSSRule(sheet, '#' + slideId + '-mw', str, getCssRulesLength(sheet)); 6645 } 6646 6647 // inner wrapper styles 6648 str = getInnerWrapperStyles(options.edgePadding, options.gutter, options.fixedWidth, options.speed, options.autoHeight); 6649 addCSSRule(sheet, '#' + slideId + '-iw', str, getCssRulesLength(sheet)); 6650 6651 // container styles 6652 if (carousel) { 6653 str = horizontal && !autoWidth ? 'width:' + getContainerWidth(options.fixedWidth, options.gutter, options.items) + ';' : ''; 6654 if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); } 6655 addCSSRule(sheet, '#' + slideId, str, getCssRulesLength(sheet)); 6656 } 6657 6658 // slide styles 6659 str = horizontal && !autoWidth ? getSlideWidthStyle(options.fixedWidth, options.gutter, options.items) : ''; 6660 if (options.gutter) { str += getSlideGutterStyle(options.gutter); } 6661 // set gallery items transition-duration 6662 if (!carousel) { 6663 if (TRANSITIONDURATION) { str += getTransitionDurationStyle(speed); } 6664 if (ANIMATIONDURATION) { str += getAnimationDurationStyle(speed); } 6665 } 6666 if (str) { addCSSRule(sheet, '#' + slideId + ' > .tns-item', str, getCssRulesLength(sheet)); } 6667 6668 // non CSS mediaqueries: IE8 6669 // ## update inner wrapper, container, slides if needed 6670 // set inline styles for inner wrapper & container 6671 // insert stylesheet (one line) for slides only (since slides are many) 6672 } else { 6673 // middle wrapper styles 6674 update_carousel_transition_duration(); 6675 6676 // inner wrapper styles 6677 innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, autoHeight); 6678 6679 // container styles 6680 if (carousel && horizontal && !autoWidth) { 6681 container.style.width = getContainerWidth(fixedWidth, gutter, items); 6682 } 6683 6684 // slide styles 6685 var str = horizontal && !autoWidth ? getSlideWidthStyle(fixedWidth, gutter, items) : ''; 6686 if (gutter) { str += getSlideGutterStyle(gutter); } 6687 6688 // append to the last line 6689 if (str) { addCSSRule(sheet, '#' + slideId + ' > .tns-item', str, getCssRulesLength(sheet)); } 6690 } 6691 6692 // ## MEDIAQUERIES 6693 if (responsive && CSSMQ) { 6694 for (var bp in responsive) { 6695 // bp: convert string to number 6696 bp = parseInt(bp); 6697 6698 var opts = responsive[bp], 6699 str = '', 6700 middleWrapperStr = '', 6701 innerWrapperStr = '', 6702 containerStr = '', 6703 slideStr = '', 6704 itemsBP = !autoWidth ? getOption('items', bp) : null, 6705 fixedWidthBP = getOption('fixedWidth', bp), 6706 speedBP = getOption('speed', bp), 6707 edgePaddingBP = getOption('edgePadding', bp), 6708 autoHeightBP = getOption('autoHeight', bp), 6709 gutterBP = getOption('gutter', bp); 6710 6711 // middle wrapper string 6712 if (TRANSITIONDURATION && middleWrapper && getOption('autoHeight', bp) && 'speed' in opts) { 6713 middleWrapperStr = '#' + slideId + '-mw{' + getTransitionDurationStyle(speedBP) + '}'; 6714 } 6715 6716 // inner wrapper string 6717 if ('edgePadding' in opts || 'gutter' in opts) { 6718 innerWrapperStr = '#' + slideId + '-iw{' + getInnerWrapperStyles(edgePaddingBP, gutterBP, fixedWidthBP, speedBP, autoHeightBP) + '}'; 6719 } 6720 6721 // container string 6722 if (carousel && horizontal && !autoWidth && ('fixedWidth' in opts || 'items' in opts || (fixedWidth && 'gutter' in opts))) { 6723 containerStr = 'width:' + getContainerWidth(fixedWidthBP, gutterBP, itemsBP) + ';'; 6724 } 6725 if (TRANSITIONDURATION && 'speed' in opts) { 6726 containerStr += getTransitionDurationStyle(speedBP); 6727 } 6728 if (containerStr) { 6729 containerStr = '#' + slideId + '{' + containerStr + '}'; 6730 } 6731 6732 // slide string 6733 if ('fixedWidth' in opts || (fixedWidth && 'gutter' in opts) || !carousel && 'items' in opts) { 6734 slideStr += getSlideWidthStyle(fixedWidthBP, gutterBP, itemsBP); 6735 } 6736 if ('gutter' in opts) { 6737 slideStr += getSlideGutterStyle(gutterBP); 6738 } 6739 // set gallery items transition-duration 6740 if (!carousel && 'speed' in opts) { 6741 if (TRANSITIONDURATION) { slideStr += getTransitionDurationStyle(speedBP); } 6742 if (ANIMATIONDURATION) { slideStr += getAnimationDurationStyle(speedBP); } 6743 } 6744 if (slideStr) { slideStr = '#' + slideId + ' > .tns-item{' + slideStr + '}'; } 6745 6746 // add up 6747 str = middleWrapperStr + innerWrapperStr + containerStr + slideStr; 6748 6749 if (str) { 6750 sheet.insertRule('@media (min-width: ' + bp / 16 + 'em) {' + str + '}', sheet.cssRules.length); 6751 } 6752 } 6753 } 6754 } 6755 6756 function initTools () { 6757 // == slides == 6758 updateSlideStatus(); 6759 6760 // == live region == 6761 outerWrapper.insertAdjacentHTML('afterbegin', '<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">' + getLiveRegionStr() + '</div>'); 6762 liveregionCurrent = outerWrapper.querySelector('.tns-liveregion'); 6763 6764 // == autoplayInit == 6765 if (hasAutoplay) { 6766 var txt = autoplay ? 'stop' : 'start'; 6767 if (autoplayButton) { 6768 setAttrs(autoplayButton, {'data-action': txt}); 6769 } else if (options.autoplayButtonOutput) { 6770 outerWrapper.insertAdjacentHTML(getInsertPosition(options.autoplayPosition), '<button type="button" data-action="' + txt + '">' + autoplayHtmlStrings[0] + txt + autoplayHtmlStrings[1] + autoplayText[0] + '</button>'); 6771 autoplayButton = outerWrapper.querySelector('[data-action]'); 6772 } 6773 6774 // add event 6775 if (autoplayButton) { 6776 addEvents(autoplayButton, {'click': toggleAutoplay}); 6777 } 6778 6779 if (autoplay) { 6780 startAutoplay(); 6781 if (autoplayHoverPause) { addEvents(container, hoverEvents); } 6782 if (autoplayResetOnVisibility) { addEvents(container, visibilityEvent); } 6783 } 6784 } 6785 6786 // == navInit == 6787 if (hasNav) { 6788 var initIndex = !carousel ? 0 : cloneCount; 6789 // customized nav 6790 // will not hide the navs in case they're thumbnails 6791 if (navContainer) { 6792 setAttrs(navContainer, {'aria-label': 'Carousel Pagination'}); 6793 navItems = navContainer.children; 6794 forEach(navItems, function(item, i) { 6795 setAttrs(item, { 6796 'data-nav': i, 6797 'tabindex': '-1', 6798 'aria-label': navStr + (i + 1), 6799 'aria-controls': slideId, 6800 }); 6801 }); 6802 6803 // generated nav 6804 } else { 6805 var navHtml = '', 6806 hiddenStr = navAsThumbnails ? '' : 'style="display:none"'; 6807 for (var i = 0; i < slideCount; i++) { 6808 // hide nav items by default 6809 navHtml += '<button type="button" data-nav="' + i +'" tabindex="-1" aria-controls="' + slideId + '" ' + hiddenStr + ' aria-label="' + navStr + (i + 1) +'"></button>'; 6810 } 6811 navHtml = '<div class="tns-nav" aria-label="Carousel Pagination">' + navHtml + '</div>'; 6812 outerWrapper.insertAdjacentHTML(getInsertPosition(options.navPosition), navHtml); 6813 6814 navContainer = outerWrapper.querySelector('.tns-nav'); 6815 navItems = navContainer.children; 6816 } 6817 6818 updateNavVisibility(); 6819 6820 // add transition 6821 if (TRANSITIONDURATION) { 6822 var prefix = TRANSITIONDURATION.substring(0, TRANSITIONDURATION.length - 18).toLowerCase(), 6823 str = 'transition: all ' + speed / 1000 + 's'; 6824 6825 if (prefix) { 6826 str = '-' + prefix + '-' + str; 6827 } 6828 6829 addCSSRule(sheet, '[aria-controls^=' + slideId + '-item]', str, getCssRulesLength(sheet)); 6830 } 6831 6832 setAttrs(navItems[navCurrentIndex], {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent}); 6833 removeAttrs(navItems[navCurrentIndex], 'tabindex'); 6834 addClass(navItems[navCurrentIndex], navActiveClass); 6835 6836 // add events 6837 addEvents(navContainer, navEvents); 6838 } 6839 6840 6841 6842 // == controlsInit == 6843 if (hasControls) { 6844 if (!controlsContainer && (!prevButton || !nextButton)) { 6845 outerWrapper.insertAdjacentHTML(getInsertPosition(options.controlsPosition), '<div class="tns-controls" aria-label="Header Karussel Navigation" tabindex="0"><button type="button" data-controls="prev" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[0] + '</button><button type="button" data-controls="next" tabindex="-1" aria-controls="' + slideId +'">' + controlsText[1] + '</button></div>'); 6846 6847 controlsContainer = outerWrapper.querySelector('.tns-controls'); 6848 } 6849 6850 if (!prevButton || !nextButton) { 6851 prevButton = controlsContainer.children[0]; 6852 nextButton = controlsContainer.children[1]; 6853 } 6854 6855 if (options.controlsContainer) { 6856 setAttrs(controlsContainer, { 6857 'aria-label': 'Karussell Navigation' 6858 }); 6859 } 6860 6861 if (options.controlsContainer || (options.prevButton && options.nextButton)) { 6862 setAttrs([prevButton, nextButton], { 6863 'aria-controls': slideId, 6864 'tabindex': '-1', 6865 }); 6866 } 6867 6868 if (options.controlsContainer || (options.prevButton && options.nextButton)) { 6869 setAttrs(prevButton, {'data-controls' : 'prev'}); 6870 setAttrs(nextButton, {'data-controls' : 'next'}); 6871 } 6872 6873 prevIsButton = isButton(prevButton); 6874 nextIsButton = isButton(nextButton); 6875 6876 updateControlsStatus(); 6877 6878 // add events 6879 if (controlsContainer) { 6880 addEvents(controlsContainer, controlsEvents); 6881 } else { 6882 addEvents(prevButton, controlsEvents); 6883 addEvents(nextButton, controlsEvents); 6884 } 6885 } 6886 6887 // hide tools if needed 6888 disableUI(); 6889 } 6890 6891 function initEvents () { 6892 // add events 6893 if (carousel && TRANSITIONEND) { 6894 var eve = {}; 6895 eve[TRANSITIONEND] = onTransitionEnd; 6896 addEvents(container, eve); 6897 } 6898 6899 if (touch) { addEvents(container, touchEvents, options.preventScrollOnTouch); } 6900 if (mouseDrag) { addEvents(container, dragEvents); } 6901 if (arrowKeys) { addEvents(doc, docmentKeydownEvent); } 6902 6903 if (nested === 'inner') { 6904 events.on('outerResized', function () { 6905 resizeTasks(); 6906 events.emit('innerLoaded', info()); 6907 }); 6908 } else if (responsive || fixedWidth || autoWidth || autoHeight || !horizontal) { 6909 addEvents(win, {'resize': onResize}); 6910 } 6911 6912 if (autoHeight) { 6913 if (nested === 'outer') { 6914 events.on('innerLoaded', doAutoHeight); 6915 } else if (!disable) { doAutoHeight(); } 6916 } 6917 6918 doLazyLoad(); 6919 if (disable) { disableSlider(); } else if (freeze) { freezeSlider(); } 6920 6921 events.on('indexChanged', additionalUpdates); 6922 if (nested === 'inner') { events.emit('innerLoaded', info()); } 6923 if (typeof onInit === 'function') { onInit(info()); } 6924 isOn = true; 6925 } 6926 6927 function destroy () { 6928 // sheet 6929 sheet.disabled = true; 6930 if (sheet.ownerNode) { sheet.ownerNode.remove(); } 6931 6932 // remove win event listeners 6933 removeEvents(win, {'resize': onResize}); 6934 6935 // arrowKeys, controls, nav 6936 if (arrowKeys) { removeEvents(doc, docmentKeydownEvent); } 6937 if (controlsContainer) { removeEvents(controlsContainer, controlsEvents); } 6938 if (navContainer) { removeEvents(navContainer, navEvents); } 6939 6940 // autoplay 6941 removeEvents(container, hoverEvents); 6942 removeEvents(container, visibilityEvent); 6943 if (autoplayButton) { removeEvents(autoplayButton, {'click': toggleAutoplay}); } 6944 if (autoplay) { clearInterval(autoplayTimer); } 6945 6946 // container 6947 if (carousel && TRANSITIONEND) { 6948 var eve = {}; 6949 eve[TRANSITIONEND] = onTransitionEnd; 6950 removeEvents(container, eve); 6951 } 6952 if (touch) { removeEvents(container, touchEvents); } 6953 if (mouseDrag) { removeEvents(container, dragEvents); } 6954 6955 // cache Object values in options && reset HTML 6956 var htmlList = [containerHTML, controlsContainerHTML, prevButtonHTML, nextButtonHTML, navContainerHTML, autoplayButtonHTML]; 6957 6958 tnsList.forEach(function(item, i) { 6959 var el = item === 'container' ? outerWrapper : options[item]; 6960 6961 if (typeof el === 'object' && el) { 6962 var prevEl = el.previousElementSibling ? el.previousElementSibling : false, 6963 parentEl = el.parentNode; 6964 el.outerHTML = htmlList[i]; 6965 options[item] = prevEl ? prevEl.nextElementSibling : parentEl.firstElementChild; 6966 } 6967 }); 6968 6969 6970 // reset variables 6971 tnsList = animateIn = animateOut = animateDelay = animateNormal = horizontal = outerWrapper = innerWrapper = container = containerParent = containerHTML = slideItems = slideCount = breakpointZone = windowWidth = autoWidth = fixedWidth = edgePadding = gutter = viewport = items = slideBy = viewportMax = arrowKeys = speed = rewind = loop = autoHeight = sheet = lazyload = slidePositions = slideItemsOut = cloneCount = slideCountNew = hasRightDeadZone = rightBoundary = updateIndexBeforeTransform = transformAttr = transformPrefix = transformPostfix = getIndexMax = index = indexCached = indexMin = indexMax = resizeTimer = swipeAngle = moveDirectionExpected = running = onInit = events = newContainerClasses = slideId = disable = disabled = freezable = freeze = frozen = controlsEvents = navEvents = hoverEvents = visibilityEvent = docmentKeydownEvent = touchEvents = dragEvents = hasControls = hasNav = navAsThumbnails = hasAutoplay = hasTouch = hasMouseDrag = slideActiveClass = imgCompleteClass = imgEvents = imgsComplete = controls = controlsText = controlsContainer = controlsContainerHTML = prevButton = nextButton = prevIsButton = nextIsButton = nav = navContainer = navContainerHTML = navItems = pages = pagesCached = navClicked = navCurrentIndex = navCurrentIndexCached = navActiveClass = navStr = navStrCurrent = autoplay = autoplayTimeout = autoplayDirection = autoplayText = autoplayHoverPause = autoplayButton = autoplayButtonHTML = autoplayResetOnVisibility = autoplayHtmlStrings = autoplayTimer = animating = autoplayHoverPaused = autoplayUserPaused = autoplayVisibilityPaused = initPosition = lastPosition = translateInit = disX = disY = panStart = rafIndex = getDist = touch = mouseDrag = null; 6972 // check variables 6973 // [animateIn, animateOut, animateDelay, animateNormal, horizontal, outerWrapper, innerWrapper, container, containerParent, containerHTML, slideItems, slideCount, breakpointZone, windowWidth, autoWidth, fixedWidth, edgePadding, gutter, viewport, items, slideBy, viewportMax, arrowKeys, speed, rewind, loop, autoHeight, sheet, lazyload, slidePositions, slideItemsOut, cloneCount, slideCountNew, hasRightDeadZone, rightBoundary, updateIndexBeforeTransform, transformAttr, transformPrefix, transformPostfix, getIndexMax, index, indexCached, indexMin, indexMax, resizeTimer, swipeAngle, moveDirectionExpected, running, onInit, events, newContainerClasses, slideId, disable, disabled, freezable, freeze, frozen, controlsEvents, navEvents, hoverEvents, visibilityEvent, docmentKeydownEvent, touchEvents, dragEvents, hasControls, hasNav, navAsThumbnails, hasAutoplay, hasTouch, hasMouseDrag, slideActiveClass, imgCompleteClass, imgEvents, imgsComplete, controls, controlsText, controlsContainer, controlsContainerHTML, prevButton, nextButton, prevIsButton, nextIsButton, nav, navContainer, navContainerHTML, navItems, pages, pagesCached, navClicked, navCurrentIndex, navCurrentIndexCached, navActiveClass, navStr, navStrCurrent, autoplay, autoplayTimeout, autoplayDirection, autoplayText, autoplayHoverPause, autoplayButton, autoplayButtonHTML, autoplayResetOnVisibility, autoplayHtmlStrings, autoplayTimer, animating, autoplayHoverPaused, autoplayUserPaused, autoplayVisibilityPaused, initPosition, lastPosition, translateInit, disX, disY, panStart, rafIndex, getDist, touch, mouseDrag ].forEach(function(item) { if (item !== null) { console.log(item); } }); 6974 6975 for (var a in this) { 6976 if (a !== 'rebuild') { this[a] = null; } 6977 } 6978 isOn = false; 6979 } 6980 6981// === ON RESIZE === 6982 // responsive || fixedWidth || autoWidth || !horizontal 6983 function onResize (e) { 6984 raf(function(){ resizeTasks(getEvent(e)); }); 6985 } 6986 6987 function resizeTasks (e) { 6988 if (!isOn) { return; } 6989 if (nested === 'outer') { events.emit('outerResized', info(e)); } 6990 windowWidth = getWindowWidth(); 6991 var bpChanged, 6992 breakpointZoneTem = breakpointZone, 6993 needContainerTransform = false; 6994 6995 if (responsive) { 6996 setBreakpointZone(); 6997 bpChanged = breakpointZoneTem !== breakpointZone; 6998 // if (hasRightDeadZone) { needContainerTransform = true; } // *? 6999 if (bpChanged) { events.emit('newBreakpointStart', info(e)); } 7000 } 7001 7002 var indChanged, 7003 itemsChanged, 7004 itemsTem = items, 7005 disableTem = disable, 7006 freezeTem = freeze, 7007 arrowKeysTem = arrowKeys, 7008 controlsTem = controls, 7009 navTem = nav, 7010 touchTem = touch, 7011 mouseDragTem = mouseDrag, 7012 autoplayTem = autoplay, 7013 autoplayHoverPauseTem = autoplayHoverPause, 7014 autoplayResetOnVisibilityTem = autoplayResetOnVisibility, 7015 indexTem = index; 7016 7017 if (bpChanged) { 7018 var fixedWidthTem = fixedWidth, 7019 autoHeightTem = autoHeight, 7020 controlsTextTem = controlsText, 7021 centerTem = center, 7022 autoplayTextTem = autoplayText; 7023 7024 if (!CSSMQ) { 7025 var gutterTem = gutter, 7026 edgePaddingTem = edgePadding; 7027 } 7028 } 7029 7030 // get option: 7031 // fixed width: viewport, fixedWidth, gutter => items 7032 // others: window width => all variables 7033 // all: items => slideBy 7034 arrowKeys = getOption('arrowKeys'); 7035 controls = getOption('controls'); 7036 nav = getOption('nav'); 7037 touch = getOption('touch'); 7038 center = getOption('center'); 7039 mouseDrag = getOption('mouseDrag'); 7040 autoplay = getOption('autoplay'); 7041 autoplayHoverPause = getOption('autoplayHoverPause'); 7042 autoplayResetOnVisibility = getOption('autoplayResetOnVisibility'); 7043 7044 if (bpChanged) { 7045 disable = getOption('disable'); 7046 fixedWidth = getOption('fixedWidth'); 7047 speed = getOption('speed'); 7048 autoHeight = getOption('autoHeight'); 7049 controlsText = getOption('controlsText'); 7050 autoplayText = getOption('autoplayText'); 7051 autoplayTimeout = getOption('autoplayTimeout'); 7052 7053 if (!CSSMQ) { 7054 edgePadding = getOption('edgePadding'); 7055 gutter = getOption('gutter'); 7056 } 7057 } 7058 // update options 7059 resetVariblesWhenDisable(disable); 7060 7061 viewport = getViewportWidth(); // <= edgePadding, gutter 7062 if ((!horizontal || autoWidth) && !disable) { 7063 setSlidePositions(); 7064 if (!horizontal) { 7065 updateContentWrapperHeight(); // <= setSlidePositions 7066 needContainerTransform = true; 7067 } 7068 } 7069 if (fixedWidth || autoWidth) { 7070 rightBoundary = getRightBoundary(); // autoWidth: <= viewport, slidePositions, gutter 7071 // fixedWidth: <= viewport, fixedWidth, gutter 7072 indexMax = getIndexMax(); // autoWidth: <= rightBoundary, slidePositions 7073 // fixedWidth: <= rightBoundary, fixedWidth, gutter 7074 } 7075 7076 if (bpChanged || fixedWidth) { 7077 items = getOption('items'); 7078 slideBy = getOption('slideBy'); 7079 itemsChanged = items !== itemsTem; 7080 7081 if (itemsChanged) { 7082 if (!fixedWidth && !autoWidth) { indexMax = getIndexMax(); } // <= items 7083 // check index before transform in case 7084 // slider reach the right edge then items become bigger 7085 updateIndex(); 7086 } 7087 } 7088 7089 if (bpChanged) { 7090 if (disable !== disableTem) { 7091 if (disable) { 7092 disableSlider(); 7093 } else { 7094 enableSlider(); // <= slidePositions, rightBoundary, indexMax 7095 } 7096 } 7097 } 7098 7099 if (freezable && (bpChanged || fixedWidth || autoWidth)) { 7100 freeze = getFreeze(); // <= autoWidth: slidePositions, gutter, viewport, rightBoundary 7101 // <= fixedWidth: fixedWidth, gutter, rightBoundary 7102 // <= others: items 7103 7104 if (freeze !== freezeTem) { 7105 if (freeze) { 7106 doContainerTransform(getContainerTransformValue(getStartIndex(0))); 7107 freezeSlider(); 7108 } else { 7109 unfreezeSlider(); 7110 needContainerTransform = true; 7111 } 7112 } 7113 } 7114 7115 resetVariblesWhenDisable(disable || freeze); // controls, nav, touch, mouseDrag, arrowKeys, autoplay, autoplayHoverPause, autoplayResetOnVisibility 7116 if (!autoplay) { autoplayHoverPause = autoplayResetOnVisibility = false; } 7117 7118 if (arrowKeys !== arrowKeysTem) { 7119 arrowKeys ? 7120 addEvents(doc, docmentKeydownEvent) : 7121 removeEvents(doc, docmentKeydownEvent); 7122 } 7123 if (controls !== controlsTem) { 7124 if (controls) { 7125 if (controlsContainer) { 7126 showElement(controlsContainer); 7127 } else { 7128 if (prevButton) { showElement(prevButton); } 7129 if (nextButton) { showElement(nextButton); } 7130 } 7131 } else { 7132 if (controlsContainer) { 7133 hideElement(controlsContainer); 7134 } else { 7135 if (prevButton) { hideElement(prevButton); } 7136 if (nextButton) { hideElement(nextButton); } 7137 } 7138 } 7139 } 7140 if (nav !== navTem) { 7141 nav ? 7142 showElement(navContainer) : 7143 hideElement(navContainer); 7144 } 7145 if (touch !== touchTem) { 7146 touch ? 7147 addEvents(container, touchEvents, options.preventScrollOnTouch) : 7148 removeEvents(container, touchEvents); 7149 } 7150 if (mouseDrag !== mouseDragTem) { 7151 mouseDrag ? 7152 addEvents(container, dragEvents) : 7153 removeEvents(container, dragEvents); 7154 } 7155 if (autoplay !== autoplayTem) { 7156 if (autoplay) { 7157 if (autoplayButton) { showElement(autoplayButton); } 7158 if (!animating && !autoplayUserPaused) { startAutoplay(); } 7159 } else { 7160 if (autoplayButton) { hideElement(autoplayButton); } 7161 if (animating) { stopAutoplay(); } 7162 } 7163 } 7164 if (autoplayHoverPause !== autoplayHoverPauseTem) { 7165 autoplayHoverPause ? 7166 addEvents(container, hoverEvents) : 7167 removeEvents(container, hoverEvents); 7168 } 7169 if (autoplayResetOnVisibility !== autoplayResetOnVisibilityTem) { 7170 autoplayResetOnVisibility ? 7171 addEvents(doc, visibilityEvent) : 7172 removeEvents(doc, visibilityEvent); 7173 } 7174 7175 if (bpChanged) { 7176 if (fixedWidth !== fixedWidthTem || center !== centerTem) { needContainerTransform = true; } 7177 7178 if (autoHeight !== autoHeightTem) { 7179 if (!autoHeight) { innerWrapper.style.height = ''; } 7180 } 7181 7182 if (controls && controlsText !== controlsTextTem) { 7183 prevButton.innerHTML = controlsText[0]; 7184 nextButton.innerHTML = controlsText[1]; 7185 } 7186 7187 if (autoplayButton && autoplayText !== autoplayTextTem) { 7188 var i = autoplay ? 1 : 0, 7189 html = autoplayButton.innerHTML, 7190 len = html.length - autoplayTextTem[i].length; 7191 if (html.substring(len) === autoplayTextTem[i]) { 7192 autoplayButton.innerHTML = html.substring(0, len) + autoplayText[i]; 7193 } 7194 } 7195 } else { 7196 if (center && (fixedWidth || autoWidth)) { needContainerTransform = true; } 7197 } 7198 7199 if (itemsChanged || fixedWidth && !autoWidth) { 7200 pages = getPages(); 7201 updateNavVisibility(); 7202 } 7203 7204 indChanged = index !== indexTem; 7205 if (indChanged) { 7206 events.emit('indexChanged', info()); 7207 needContainerTransform = true; 7208 } else if (itemsChanged) { 7209 if (!indChanged) { additionalUpdates(); } 7210 } else if (fixedWidth || autoWidth) { 7211 doLazyLoad(); 7212 updateSlideStatus(); 7213 updateLiveRegion(); 7214 } 7215 7216 if (itemsChanged && !carousel) { updateGallerySlidePositions(); } 7217 7218 if (!disable && !freeze) { 7219 // non-mediaqueries: IE8 7220 if (bpChanged && !CSSMQ) { 7221 // middle wrapper styles 7222 7223 // inner wrapper styles 7224 if (edgePadding !== edgePaddingTem || gutter !== gutterTem) { 7225 innerWrapper.style.cssText = getInnerWrapperStyles(edgePadding, gutter, fixedWidth, speed, autoHeight); 7226 } 7227 7228 if (horizontal) { 7229 // container styles 7230 if (carousel) { 7231 container.style.width = getContainerWidth(fixedWidth, gutter, items); 7232 } 7233 7234 // slide styles 7235 var str = getSlideWidthStyle(fixedWidth, gutter, items) + 7236 getSlideGutterStyle(gutter); 7237 7238 // remove the last line and 7239 // add new styles 7240 removeCSSRule(sheet, getCssRulesLength(sheet) - 1); 7241 addCSSRule(sheet, '#' + slideId + ' > .tns-item', str, getCssRulesLength(sheet)); 7242 } 7243 } 7244 7245 // auto height 7246 if (autoHeight) { doAutoHeight(); } 7247 7248 if (needContainerTransform) { 7249 doContainerTransformSilent(); 7250 indexCached = index; 7251 } 7252 } 7253 7254 if (bpChanged) { events.emit('newBreakpointEnd', info(e)); } 7255 } 7256 7257 7258 7259 7260 7261 // === INITIALIZATION FUNCTIONS === // 7262 function getFreeze () { 7263 if (!fixedWidth && !autoWidth) { 7264 var a = center ? items - (items - 1) / 2 : items; 7265 return slideCount <= a; 7266 } 7267 7268 var width = fixedWidth ? (fixedWidth + gutter) * slideCount : slidePositions[slideCount], 7269 vp = edgePadding ? viewport + edgePadding * 2 : viewport + gutter; 7270 7271 if (center) { 7272 vp -= fixedWidth ? (viewport - fixedWidth) / 2 : (viewport - (slidePositions[index + 1] - slidePositions[index] - gutter)) / 2; 7273 } 7274 7275 return width <= vp; 7276 } 7277 7278 function setBreakpointZone () { 7279 breakpointZone = 0; 7280 for (var bp in responsive) { 7281 bp = parseInt(bp); // convert string to number 7282 if (windowWidth >= bp) { breakpointZone = bp; } 7283 } 7284 } 7285 7286 // (slideBy, indexMin, indexMax) => index 7287 var updateIndex = (function () { 7288 return loop ? 7289 carousel ? 7290 // loop + carousel 7291 function () { 7292 var leftEdge = indexMin, 7293 rightEdge = indexMax; 7294 7295 leftEdge += slideBy; 7296 rightEdge -= slideBy; 7297 7298 // adjust edges when has edge paddings 7299 // or fixed-width slider with extra space on the right side 7300 if (edgePadding) { 7301 leftEdge += 1; 7302 rightEdge -= 1; 7303 } else if (fixedWidth) { 7304 if ((viewport + gutter)%(fixedWidth + gutter)) { rightEdge -= 1; } 7305 } 7306 7307 if (cloneCount) { 7308 if (index > rightEdge) { 7309 index -= slideCount; 7310 } else if (index < leftEdge) { 7311 index += slideCount; 7312 } 7313 } 7314 } : 7315 // loop + gallery 7316 function() { 7317 if (index > indexMax) { 7318 while (index >= indexMin + slideCount) { index -= slideCount; } 7319 } else if (index < indexMin) { 7320 while (index <= indexMax - slideCount) { index += slideCount; } 7321 } 7322 } : 7323 // non-loop 7324 function() { 7325 index = Math.max(indexMin, Math.min(indexMax, index)); 7326 }; 7327 })(); 7328 7329 function disableUI () { 7330 if (!autoplay && autoplayButton) { hideElement(autoplayButton); } 7331 if (!nav && navContainer) { hideElement(navContainer); } 7332 if (!controls) { 7333 if (controlsContainer) { 7334 hideElement(controlsContainer); 7335 } else { 7336 if (prevButton) { hideElement(prevButton); } 7337 if (nextButton) { hideElement(nextButton); } 7338 } 7339 } 7340 } 7341 7342 function enableUI () { 7343 if (autoplay && autoplayButton) { showElement(autoplayButton); } 7344 if (nav && navContainer) { showElement(navContainer); } 7345 if (controls) { 7346 if (controlsContainer) { 7347 showElement(controlsContainer); 7348 } else { 7349 if (prevButton) { showElement(prevButton); } 7350 if (nextButton) { showElement(nextButton); } 7351 } 7352 } 7353 } 7354 7355 function freezeSlider () { 7356 if (frozen) { return; } 7357 7358 // remove edge padding from inner wrapper 7359 if (edgePadding) { innerWrapper.style.margin = '0px'; } 7360 7361 // add class tns-transparent to cloned slides 7362 if (cloneCount) { 7363 var str = 'tns-transparent'; 7364 for (var i = cloneCount; i--;) { 7365 if (carousel) { addClass(slideItems[i], str); } 7366 addClass(slideItems[slideCountNew - i - 1], str); 7367 } 7368 } 7369 7370 // update tools 7371 disableUI(); 7372 7373 frozen = true; 7374 } 7375 7376 function unfreezeSlider () { 7377 if (!frozen) { return; } 7378 7379 // restore edge padding for inner wrapper 7380 // for mordern browsers 7381 if (edgePadding && CSSMQ) { innerWrapper.style.margin = ''; } 7382 7383 // remove class tns-transparent to cloned slides 7384 if (cloneCount) { 7385 var str = 'tns-transparent'; 7386 for (var i = cloneCount; i--;) { 7387 if (carousel) { removeClass(slideItems[i], str); } 7388 removeClass(slideItems[slideCountNew - i - 1], str); 7389 } 7390 } 7391 7392 // update tools 7393 enableUI(); 7394 7395 frozen = false; 7396 } 7397 7398 function disableSlider () { 7399 if (disabled) { return; } 7400 7401 sheet.disabled = true; 7402 container.className = container.className.replace(newContainerClasses.substring(1), ''); 7403 removeAttrs(container, ['style']); 7404 if (loop) { 7405 for (var j = cloneCount; j--;) { 7406 if (carousel) { hideElement(slideItems[j]); } 7407 hideElement(slideItems[slideCountNew - j - 1]); 7408 } 7409 } 7410 7411 // vertical slider 7412 if (!horizontal || !carousel) { removeAttrs(innerWrapper, ['style']); } 7413 7414 // gallery 7415 if (!carousel) { 7416 for (var i = index, l = index + slideCount; i < l; i++) { 7417 var item = slideItems[i]; 7418 removeAttrs(item, ['style']); 7419 removeClass(item, animateIn); 7420 removeClass(item, animateNormal); 7421 } 7422 } 7423 7424 // update tools 7425 disableUI(); 7426 7427 disabled = true; 7428 } 7429 7430 function enableSlider () { 7431 if (!disabled) { return; } 7432 7433 sheet.disabled = false; 7434 container.className += newContainerClasses; 7435 doContainerTransformSilent(); 7436 7437 if (loop) { 7438 for (var j = cloneCount; j--;) { 7439 if (carousel) { showElement(slideItems[j]); } 7440 showElement(slideItems[slideCountNew - j - 1]); 7441 } 7442 } 7443 7444 // gallery 7445 if (!carousel) { 7446 for (var i = index, l = index + slideCount; i < l; i++) { 7447 var item = slideItems[i], 7448 classN = i < index + items ? animateIn : animateNormal; 7449 item.style.left = (i - index) * 100 / items + '%'; 7450 addClass(item, classN); 7451 } 7452 } 7453 7454 // update tools 7455 enableUI(); 7456 7457 disabled = false; 7458 } 7459 7460 function updateLiveRegion () { 7461 var str = getLiveRegionStr(); 7462 if (liveregionCurrent.innerHTML !== str) { liveregionCurrent.innerHTML = str; } 7463 } 7464 7465 function getLiveRegionStr () { 7466 var arr = getVisibleSlideRange(), 7467 start = arr[0] + 1, 7468 end = arr[1] + 1; 7469 var current = start; 7470 if(start == slideCount+1){ 7471 current = 1; 7472 } 7473 if(start == slideCount+2){ 7474 current = 2; 7475 } 7476 return "Karussell-Element " + current + " von " + slideCount; 7477 } 7478 7479 function getVisibleSlideRange (val) { 7480 if (val == null) { val = getContainerTransformValue(); } 7481 var start = index, end, rangestart, rangeend; 7482 7483 // get range start, range end for autoWidth and fixedWidth 7484 if (center || edgePadding) { 7485 if (autoWidth || fixedWidth) { 7486 rangestart = - (parseFloat(val) + edgePadding); 7487 rangeend = rangestart + viewport + edgePadding * 2; 7488 } 7489 } else { 7490 if (autoWidth) { 7491 rangestart = slidePositions[index]; 7492 rangeend = rangestart + viewport; 7493 } 7494 } 7495 7496 // get start, end 7497 // - check auto width 7498 if (autoWidth) { 7499 slidePositions.forEach(function(point, i) { 7500 if (i < slideCountNew) { 7501 if ((center || edgePadding) && point <= rangestart + 0.5) { start = i; } 7502 if (rangeend - point >= 0.5) { end = i; } 7503 } 7504 }); 7505 7506 // - check percentage width, fixed width 7507 } else { 7508 7509 if (fixedWidth) { 7510 var cell = fixedWidth + gutter; 7511 if (center || edgePadding) { 7512 start = Math.floor(rangestart/cell); 7513 end = Math.ceil(rangeend/cell - 1); 7514 } else { 7515 end = start + Math.ceil(viewport/cell) - 1; 7516 } 7517 7518 } else { 7519 if (center || edgePadding) { 7520 var a = items - 1; 7521 if (center) { 7522 start -= a / 2; 7523 end = index + a / 2; 7524 } else { 7525 end = index + a; 7526 } 7527 7528 if (edgePadding) { 7529 var b = edgePadding * items / viewport; 7530 start -= b; 7531 end += b; 7532 } 7533 7534 start = Math.floor(start); 7535 end = Math.ceil(end); 7536 } else { 7537 end = start + items - 1; 7538 } 7539 } 7540 7541 start = Math.max(start, 0); 7542 end = Math.min(end, slideCountNew - 1); 7543 } 7544 7545 return [start, end]; 7546 } 7547 7548 function doLazyLoad () { 7549 if (lazyload && !disable) { 7550 var arg = getVisibleSlideRange(); 7551 arg.push(lazyloadSelector); 7552 7553 getImageArray.apply(null, arg).forEach(function (img) { 7554 if (!hasClass(img, imgCompleteClass)) { 7555 // stop propagation transitionend event to container 7556 var eve = {}; 7557 eve[TRANSITIONEND] = function (e) { e.stopPropagation(); }; 7558 addEvents(img, eve); 7559 7560 addEvents(img, imgEvents); 7561 7562 // update src 7563 img.src = getAttr(img, 'data-src'); 7564 7565 // update srcset 7566 var srcset = getAttr(img, 'data-srcset'); 7567 if (srcset) { img.srcset = srcset; } 7568 7569 addClass(img, 'loading'); 7570 } 7571 }); 7572 } 7573 } 7574 7575 function onImgLoaded (e) { 7576 imgLoaded(getTarget(e)); 7577 } 7578 7579 function onImgFailed (e) { 7580 imgFailed(getTarget(e)); 7581 } 7582 7583 function imgLoaded (img) { 7584 addClass(img, 'loaded'); 7585 imgCompleted(img); 7586 } 7587 7588 function imgFailed (img) { 7589 addClass(img, 'failed'); 7590 imgCompleted(img); 7591 } 7592 7593 function imgCompleted (img) { 7594 addClass(img, imgCompleteClass); 7595 removeClass(img, 'loading'); 7596 removeEvents(img, imgEvents); 7597 } 7598 7599 function getImageArray (start, end, imgSelector) { 7600 var imgs = []; 7601 if (!imgSelector) { imgSelector = 'img'; } 7602 7603 while (start <= end) { 7604 forEach(slideItems[start].querySelectorAll(imgSelector), function (img) { imgs.push(img); }); 7605 start++; 7606 } 7607 7608 return imgs; 7609 } 7610 7611 // check if all visible images are loaded 7612 // and update container height if it's done 7613 function doAutoHeight () { 7614 var imgs = getImageArray.apply(null, getVisibleSlideRange()); 7615 raf(function(){ imgsLoadedCheck(imgs, updateInnerWrapperHeight); }); 7616 } 7617 7618 function imgsLoadedCheck (imgs, cb) { 7619 // execute callback function if all images are complete 7620 if (imgsComplete) { return cb(); } 7621 7622 // check image classes 7623 imgs.forEach(function (img, index) { 7624 if (!lazyload && img.complete) { imgCompleted(img); } // Check image.complete 7625 if (hasClass(img, imgCompleteClass)) { imgs.splice(index, 1); } 7626 }); 7627 7628 // execute callback function if selected images are all complete 7629 if (!imgs.length) { return cb(); } 7630 7631 // otherwise execute this functiona again 7632 raf(function(){ imgsLoadedCheck(imgs, cb); }); 7633 } 7634 7635 function additionalUpdates () { 7636 doLazyLoad(); 7637 updateSlideStatus(); 7638 updateLiveRegion(); 7639 updateControlsStatus(); 7640 updateNavStatus(); 7641 } 7642 7643 7644 function update_carousel_transition_duration () { 7645 if (carousel && autoHeight) { 7646 middleWrapper.style[TRANSITIONDURATION] = speed / 1000 + 's'; 7647 } 7648 } 7649 7650 function getMaxSlideHeight (slideStart, slideRange) { 7651 var heights = []; 7652 for (var i = slideStart, l = Math.min(slideStart + slideRange, slideCountNew); i < l; i++) { 7653 heights.push(slideItems[i].offsetHeight); 7654 } 7655 7656 return Math.max.apply(null, heights); 7657 } 7658 7659 // update inner wrapper height 7660 // 1. get the max-height of the visible slides 7661 // 2. set transitionDuration to speed 7662 // 3. update inner wrapper height to max-height 7663 // 4. set transitionDuration to 0s after transition done 7664 function updateInnerWrapperHeight () { 7665 var maxHeight = autoHeight ? getMaxSlideHeight(index, items) : getMaxSlideHeight(cloneCount, slideCount), 7666 wp = middleWrapper ? middleWrapper : innerWrapper; 7667 7668 if (wp.style.height !== maxHeight) { wp.style.height = maxHeight + 'px'; } 7669 } 7670 7671 // get the distance from the top edge of the first slide to each slide 7672 // (init) => slidePositions 7673 function setSlidePositions () { 7674 slidePositions = [0]; 7675 var attr = horizontal ? 'left' : 'top', 7676 attr2 = horizontal ? 'right' : 'bottom', 7677 base = slideItems[0].getBoundingClientRect()[attr]; 7678 7679 forEach(slideItems, function(item, i) { 7680 // skip the first slide 7681 if (i) { slidePositions.push(item.getBoundingClientRect()[attr] - base); } 7682 // add the end edge 7683 if (i === slideCountNew - 1) { slidePositions.push(item.getBoundingClientRect()[attr2] - base); } 7684 }); 7685 } 7686 7687 // update slide 7688 function updateSlideStatus () { 7689 var range = getVisibleSlideRange(), 7690 start = range[0], 7691 end = range[1]; 7692 7693 forEach(slideItems, function(item, i) { 7694 // show slides 7695 if (i >= start && i <= end) { 7696 if (hasAttr(item, 'aria-hidden')) { 7697 removeAttrs(item, ['aria-hidden', 'tabindex']); 7698 addClass(item, slideActiveClass); 7699 } 7700 // hide slides 7701 } else { 7702 if (!hasAttr(item, 'aria-hidden')) { 7703 setAttrs(item, { 7704 'aria-hidden': 'true', 7705 'tabindex': '-1' 7706 }); 7707 removeClass(item, slideActiveClass); 7708 } 7709 } 7710 }); 7711 } 7712 7713 // gallery: update slide position 7714 function updateGallerySlidePositions () { 7715 var l = index + Math.min(slideCount, items); 7716 for (var i = slideCountNew; i--;) { 7717 var item = slideItems[i]; 7718 7719 if (i >= index && i < l) { 7720 // add transitions to visible slides when adjusting their positions 7721 addClass(item, 'tns-moving'); 7722 7723 item.style.left = (i - index) * 100 / items + '%'; 7724 addClass(item, animateIn); 7725 removeClass(item, animateNormal); 7726 } else if (item.style.left) { 7727 item.style.left = ''; 7728 addClass(item, animateNormal); 7729 removeClass(item, animateIn); 7730 } 7731 7732 // remove outlet animation 7733 removeClass(item, animateOut); 7734 } 7735 7736 // removing '.tns-moving' 7737 setTimeout(function() { 7738 forEach(slideItems, function(el) { 7739 removeClass(el, 'tns-moving'); 7740 }); 7741 }, 300); 7742 } 7743 7744 // set tabindex on Nav 7745 function updateNavStatus () { 7746 // get current nav 7747 if (nav) { 7748 navCurrentIndex = navClicked >= 0 ? navClicked : getCurrentNavIndex(); 7749 navClicked = -1; 7750 7751 if (navCurrentIndex !== navCurrentIndexCached) { 7752 var navPrev = navItems[navCurrentIndexCached], 7753 navCurrent = navItems[navCurrentIndex]; 7754 7755 setAttrs(navPrev, { 7756 'tabindex': '-1', 7757 'aria-label': navStr + (navCurrentIndexCached + 1) 7758 }); 7759 removeClass(navPrev, navActiveClass); 7760 7761 setAttrs(navCurrent, {'aria-label': navStr + (navCurrentIndex + 1) + navStrCurrent}); 7762 removeAttrs(navCurrent, 'tabindex'); 7763 addClass(navCurrent, navActiveClass); 7764 7765 navCurrentIndexCached = navCurrentIndex; 7766 } 7767 } 7768 } 7769 7770 function getLowerCaseNodeName (el) { 7771 return el.nodeName.toLowerCase(); 7772 } 7773 7774 function isButton (el) { 7775 return getLowerCaseNodeName(el) === 'button'; 7776 } 7777 7778 function isAriaDisabled (el) { 7779 return el.getAttribute('aria-disabled') === 'true'; 7780 } 7781 7782 function disEnableElement (isButton, el, val) { 7783 if (isButton) { 7784 el.disabled = val; 7785 } else { 7786 el.setAttribute('aria-disabled', val.toString()); 7787 } 7788 } 7789 7790 // set 'disabled' to true on controls when reach the edges 7791 function updateControlsStatus () { 7792 if (!controls || rewind || loop) { return; } 7793 7794 var prevDisabled = (prevIsButton) ? prevButton.disabled : isAriaDisabled(prevButton), 7795 nextDisabled = (nextIsButton) ? nextButton.disabled : isAriaDisabled(nextButton), 7796 disablePrev = (index <= indexMin) ? true : false, 7797 disableNext = (!rewind && index >= indexMax) ? true : false; 7798 7799 if (disablePrev && !prevDisabled) { 7800 disEnableElement(prevIsButton, prevButton, true); 7801 } 7802 if (!disablePrev && prevDisabled) { 7803 disEnableElement(prevIsButton, prevButton, false); 7804 } 7805 if (disableNext && !nextDisabled) { 7806 disEnableElement(nextIsButton, nextButton, true); 7807 } 7808 if (!disableNext && nextDisabled) { 7809 disEnableElement(nextIsButton, nextButton, false); 7810 } 7811 } 7812 7813 // set duration 7814 function resetDuration (el, str) { 7815 if (TRANSITIONDURATION) { el.style[TRANSITIONDURATION] = str; } 7816 } 7817 7818 function getSliderWidth () { 7819 return fixedWidth ? (fixedWidth + gutter) * slideCountNew : slidePositions[slideCountNew]; 7820 } 7821 7822 function getCenterGap (num) { 7823 if (num == null) { num = index; } 7824 7825 var gap = edgePadding ? gutter : 0; 7826 return autoWidth ? ((viewport - gap) - (slidePositions[num + 1] - slidePositions[num] - gutter))/2 : 7827 fixedWidth ? (viewport - fixedWidth) / 2 : 7828 (items - 1) / 2; 7829 } 7830 7831 function getRightBoundary () { 7832 var gap = edgePadding ? gutter : 0, 7833 result = (viewport + gap) - getSliderWidth(); 7834 7835 if (center && !loop) { 7836 result = fixedWidth ? - (fixedWidth + gutter) * (slideCountNew - 1) - getCenterGap() : 7837 getCenterGap(slideCountNew - 1) - slidePositions[slideCountNew - 1]; 7838 } 7839 if (result > 0) { result = 0; } 7840 7841 return result; 7842 } 7843 7844 function getContainerTransformValue (num) { 7845 if (num == null) { num = index; } 7846 7847 var val; 7848 if (horizontal && !autoWidth) { 7849 if (fixedWidth) { 7850 val = - (fixedWidth + gutter) * num; 7851 if (center) { val += getCenterGap(); } 7852 } else { 7853 var denominator = TRANSFORM ? slideCountNew : items; 7854 if (center) { num -= getCenterGap(); } 7855 val = - num * 100 / denominator; 7856 } 7857 } else { 7858 val = - slidePositions[num]; 7859 if (center && autoWidth) { 7860 val += getCenterGap(); 7861 } 7862 } 7863 7864 if (hasRightDeadZone) { val = Math.max(val, rightBoundary); } 7865 7866 val += (horizontal && !autoWidth && !fixedWidth) ? '%' : 'px'; 7867 7868 return val; 7869 } 7870 7871 function doContainerTransformSilent (val) { 7872 resetDuration(container, '0s'); 7873 doContainerTransform(val); 7874 } 7875 7876 function doContainerTransform (val) { 7877 if (val == null) { val = getContainerTransformValue(); } 7878 container.style[transformAttr] = transformPrefix + val + transformPostfix; 7879 } 7880 7881 function animateSlide (number, classOut, classIn, isOut) { 7882 var l = number + items; 7883 if (!loop) { l = Math.min(l, slideCountNew); } 7884 7885 for (var i = number; i < l; i++) { 7886 var item = slideItems[i]; 7887 7888 // set item positions 7889 if (!isOut) { item.style.left = (i - index) * 100 / items + '%'; } 7890 7891 if (animateDelay && TRANSITIONDELAY) { 7892 item.style[TRANSITIONDELAY] = item.style[ANIMATIONDELAY] = animateDelay * (i - number) / 1000 + 's'; 7893 } 7894 removeClass(item, classOut); 7895 addClass(item, classIn); 7896 7897 if (isOut) { slideItemsOut.push(item); } 7898 } 7899 } 7900 7901 // make transfer after click/drag: 7902 // 1. change 'transform' property for mordern browsers 7903 // 2. change 'left' property for legacy browsers 7904 var transformCore = (function () { 7905 return carousel ? 7906 function () { 7907 resetDuration(container, ''); 7908 if (TRANSITIONDURATION || !speed) { 7909 // for morden browsers with non-zero duration or 7910 // zero duration for all browsers 7911 doContainerTransform(); 7912 // run fallback function manually 7913 // when duration is 0 / container is hidden 7914 if (!speed || !isVisible(container)) { onTransitionEnd(); } 7915 7916 } else { 7917 // for old browser with non-zero duration 7918 jsTransform(container, transformAttr, transformPrefix, transformPostfix, getContainerTransformValue(), speed, onTransitionEnd); 7919 } 7920 7921 if (!horizontal) { updateContentWrapperHeight(); } 7922 } : 7923 function () { 7924 slideItemsOut = []; 7925 7926 var eve = {}; 7927 eve[TRANSITIONEND] = eve[ANIMATIONEND] = onTransitionEnd; 7928 removeEvents(slideItems[indexCached], eve); 7929 addEvents(slideItems[index], eve); 7930 7931 animateSlide(indexCached, animateIn, animateOut, true); 7932 animateSlide(index, animateNormal, animateIn); 7933 7934 // run fallback function manually 7935 // when transition or animation not supported / duration is 0 7936 if (!TRANSITIONEND || !ANIMATIONEND || !speed || !isVisible(container)) { onTransitionEnd(); } 7937 }; 7938 })(); 7939 7940 function render (e, sliderMoved) { 7941 if (updateIndexBeforeTransform) { updateIndex(); } 7942 7943 // render when slider was moved (touch or drag) even though index may not change 7944 if (index !== indexCached || sliderMoved) { 7945 // events 7946 events.emit('indexChanged', info()); 7947 events.emit('transitionStart', info()); 7948 if (autoHeight) { doAutoHeight(); } 7949 7950 // pause autoplay when click or keydown from user 7951 if (animating && e && ['click', 'keydown'].indexOf(e.type) >= 0) { stopAutoplay(); } 7952 7953 running = true; 7954 transformCore(); 7955 } 7956 } 7957 7958 /* 7959 * Transfer prefixed properties to the same format 7960 * CSS: -Webkit-Transform => webkittransform 7961 * JS: WebkitTransform => webkittransform 7962 * @param {string} str - property 7963 * 7964 */ 7965 function strTrans (str) { 7966 return str.toLowerCase().replace(/-/g, ''); 7967 } 7968 7969 // AFTER TRANSFORM 7970 // Things need to be done after a transfer: 7971 // 1. check index 7972 // 2. add classes to visible slide 7973 // 3. disable controls buttons when reach the first/last slide in non-loop slider 7974 // 4. update nav status 7975 // 5. lazyload images 7976 // 6. update container height 7977 function onTransitionEnd (event) { 7978 // check running on gallery mode 7979 // make sure trantionend/animationend events run only once 7980 if (carousel || running) { 7981 events.emit('transitionEnd', info(event)); 7982 7983 if (!carousel && slideItemsOut.length > 0) { 7984 for (var i = 0; i < slideItemsOut.length; i++) { 7985 var item = slideItemsOut[i]; 7986 // set item positions 7987 item.style.left = ''; 7988 7989 if (ANIMATIONDELAY && TRANSITIONDELAY) { 7990 item.style[ANIMATIONDELAY] = ''; 7991 item.style[TRANSITIONDELAY] = ''; 7992 } 7993 removeClass(item, animateOut); 7994 addClass(item, animateNormal); 7995 } 7996 } 7997 7998 /* update slides, nav, controls after checking ... 7999 * => legacy browsers who don't support 'event' 8000 * have to check event first, otherwise event.target will cause an error 8001 * => or 'gallery' mode: 8002 * + event target is slide item 8003 * => or 'carousel' mode: 8004 * + event target is container, 8005 * + event.property is the same with transform attribute 8006 */ 8007 if (!event || 8008 !carousel && event.target.parentNode === container || 8009 event.target === container && strTrans(event.propertyName) === strTrans(transformAttr)) { 8010 8011 if (!updateIndexBeforeTransform) { 8012 var indexTem = index; 8013 updateIndex(); 8014 if (index !== indexTem) { 8015 events.emit('indexChanged', info()); 8016 8017 doContainerTransformSilent(); 8018 } 8019 } 8020 8021 if (nested === 'inner') { events.emit('innerLoaded', info()); } 8022 running = false; 8023 indexCached = index; 8024 } 8025 } 8026 8027 } 8028 8029 // # ACTIONS 8030 function goTo (targetIndex, e) { 8031 if (freeze) { return; } 8032 8033 // prev slideBy 8034 if (targetIndex === 'prev') { 8035 onControlsClick(e, -1); 8036 8037 // next slideBy 8038 } else if (targetIndex === 'next') { 8039 onControlsClick(e, 1); 8040 8041 // go to exact slide 8042 } else { 8043 if (running) { 8044 if (preventActionWhenRunning) { return; } else { onTransitionEnd(); } 8045 } 8046 8047 var absIndex = getAbsIndex(), 8048 indexGap = 0; 8049 8050 if (targetIndex === 'first') { 8051 indexGap = - absIndex; 8052 } else if (targetIndex === 'last') { 8053 indexGap = carousel ? slideCount - items - absIndex : slideCount - 1 - absIndex; 8054 } else { 8055 if (typeof targetIndex !== 'number') { targetIndex = parseInt(targetIndex); } 8056 8057 if (!isNaN(targetIndex)) { 8058 // from directly called goTo function 8059 if (!e) { targetIndex = Math.max(0, Math.min(slideCount - 1, targetIndex)); } 8060 8061 indexGap = targetIndex - absIndex; 8062 } 8063 } 8064 8065 // gallery: make sure new page won't overlap with current page 8066 if (!carousel && indexGap && Math.abs(indexGap) < items) { 8067 var factor = indexGap > 0 ? 1 : -1; 8068 indexGap += (index + indexGap - slideCount) >= indexMin ? slideCount * factor : slideCount * 2 * factor * -1; 8069 } 8070 8071 index += indexGap; 8072 8073 // make sure index is in range 8074 if (carousel && loop) { 8075 if (index < indexMin) { index += slideCount; } 8076 if (index > indexMax) { index -= slideCount; } 8077 } 8078 8079 // if index is changed, start rendering 8080 if (getAbsIndex(index) !== getAbsIndex(indexCached)) { 8081 render(e); 8082 } 8083 8084 } 8085 } 8086 8087 // on controls click 8088 function onControlsClick (e, dir) { 8089 if (running) { 8090 if (preventActionWhenRunning) { return; } else { onTransitionEnd(); } 8091 } 8092 var passEventObject; 8093 8094 if (!dir) { 8095 e = getEvent(e); 8096 var target = getTarget(e); 8097 8098 while (target !== controlsContainer && [prevButton, nextButton].indexOf(target) < 0) { target = target.parentNode; } 8099 8100 var targetIn = [prevButton, nextButton].indexOf(target); 8101 if (targetIn >= 0) { 8102 passEventObject = true; 8103 dir = targetIn === 0 ? -1 : 1; 8104 } 8105 } 8106 8107 if (rewind) { 8108 if (index === indexMin && dir === -1) { 8109 goTo('last', e); 8110 return; 8111 } else if (index === indexMax && dir === 1) { 8112 goTo('first', e); 8113 return; 8114 } 8115 } 8116 8117 if (dir) { 8118 index += slideBy * dir; 8119 if (autoWidth) { index = Math.floor(index); } 8120 // pass e when click control buttons or keydown 8121 render((passEventObject || (e && e.type === 'keydown')) ? e : null); 8122 } 8123 } 8124 8125 // on nav click 8126 function onNavClick (e) { 8127 if (running) { 8128 if (preventActionWhenRunning) { return; } else { onTransitionEnd(); } 8129 } 8130 8131 e = getEvent(e); 8132 var target = getTarget(e), navIndex; 8133 8134 // find the clicked nav item 8135 while (target !== navContainer && !hasAttr(target, 'data-nav')) { target = target.parentNode; } 8136 if (hasAttr(target, 'data-nav')) { 8137 var navIndex = navClicked = Number(getAttr(target, 'data-nav')), 8138 targetIndexBase = fixedWidth || autoWidth ? navIndex * slideCount / pages : navIndex * items, 8139 targetIndex = navAsThumbnails ? navIndex : Math.min(Math.ceil(targetIndexBase), slideCount - 1); 8140 goTo(targetIndex, e); 8141 8142 if (navCurrentIndex === navIndex) { 8143 if (animating) { stopAutoplay(); } 8144 navClicked = -1; // reset navClicked 8145 } 8146 } 8147 } 8148 8149 // autoplay functions 8150 function setAutoplayTimer () { 8151 autoplayTimer = setInterval(function () { 8152 onControlsClick(null, autoplayDirection); 8153 }, autoplayTimeout); 8154 8155 animating = true; 8156 } 8157 8158 function stopAutoplayTimer () { 8159 clearInterval(autoplayTimer); 8160 animating = false; 8161 } 8162 8163 function updateAutoplayButton (action, txt) { 8164 setAttrs(autoplayButton, {'data-action': action}); 8165 autoplayButton.innerHTML = autoplayHtmlStrings[0] + action + autoplayHtmlStrings[1] + txt; 8166 } 8167 8168 function startAutoplay () { 8169 setAutoplayTimer(); 8170 if (autoplayButton) { updateAutoplayButton('stop', autoplayText[1]); } 8171 } 8172 8173 function stopAutoplay () { 8174 stopAutoplayTimer(); 8175 if (autoplayButton) { updateAutoplayButton('start', autoplayText[0]); } 8176 } 8177 8178 // programaitcally play/pause the slider 8179 function play () { 8180 if (autoplay && !animating) { 8181 startAutoplay(); 8182 autoplayUserPaused = false; 8183 } 8184 } 8185 function pause () { 8186 if (animating) { 8187 stopAutoplay(); 8188 autoplayUserPaused = true; 8189 } 8190 } 8191 8192 function toggleAutoplay () { 8193 if (animating) { 8194 stopAutoplay(); 8195 autoplayUserPaused = true; 8196 } else { 8197 startAutoplay(); 8198 autoplayUserPaused = false; 8199 } 8200 } 8201 8202 function onVisibilityChange () { 8203 if (doc.hidden) { 8204 if (animating) { 8205 stopAutoplayTimer(); 8206 autoplayVisibilityPaused = true; 8207 } 8208 } else if (autoplayVisibilityPaused) { 8209 setAutoplayTimer(); 8210 autoplayVisibilityPaused = false; 8211 } 8212 } 8213 8214 function mouseoverPause () { 8215 if (animating) { 8216 stopAutoplayTimer(); 8217 autoplayHoverPaused = true; 8218 } 8219 } 8220 8221 function mouseoutRestart () { 8222 if (autoplayHoverPaused) { 8223 setAutoplayTimer(); 8224 autoplayHoverPaused = false; 8225 } 8226 } 8227 8228 // keydown events on document 8229 function onDocumentKeydown (e) { 8230 e = getEvent(e); 8231 var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode); 8232 8233 if (keyIndex >= 0) { 8234 onControlsClick(e, keyIndex === 0 ? -1 : 1); 8235 } 8236 } 8237 8238 // on key control 8239 function onControlsKeydown (e) { 8240 e = getEvent(e); 8241 var keyIndex = [KEYS.LEFT, KEYS.RIGHT].indexOf(e.keyCode); 8242 8243 if (keyIndex >= 0) { 8244 if (keyIndex === 0) { 8245 if (!prevButton.disabled) { onControlsClick(e, -1); } 8246 } else if (!nextButton.disabled) { 8247 onControlsClick(e, 1); 8248 } 8249 } 8250 } 8251 8252 // set focus 8253 function setFocus (el) { 8254 el.focus(); 8255 } 8256 8257 // on key nav 8258 function onNavKeydown (e) { 8259 e = getEvent(e); 8260 var curElement = doc.activeElement; 8261 if (!hasAttr(curElement, 'data-nav')) { return; } 8262 8263 // var code = e.keyCode, 8264 var keyIndex = [KEYS.LEFT, KEYS.RIGHT, KEYS.ENTER, KEYS.SPACE].indexOf(e.keyCode), 8265 navIndex = Number(getAttr(curElement, 'data-nav')); 8266 8267 if (keyIndex >= 0) { 8268 if (keyIndex === 0) { 8269 if (navIndex > 0) { setFocus(navItems[navIndex - 1]); } 8270 } else if (keyIndex === 1) { 8271 if (navIndex < pages - 1) { setFocus(navItems[navIndex + 1]); } 8272 } else { 8273 navClicked = navIndex; 8274 goTo(navIndex, e); 8275 } 8276 } 8277 } 8278 8279 function getEvent (e) { 8280 e = e || win.event; 8281 return isTouchEvent(e) ? e.changedTouches[0] : e; 8282 } 8283 function getTarget (e) { 8284 return e.target || win.event.srcElement; 8285 } 8286 8287 function isTouchEvent (e) { 8288 return e.type.indexOf('touch') >= 0; 8289 } 8290 8291 function preventDefaultBehavior (e) { 8292 e.preventDefault ? e.preventDefault() : e.returnValue = false; 8293 } 8294 8295 function getMoveDirectionExpected () { 8296 return getTouchDirection(toDegree(lastPosition.y - initPosition.y, lastPosition.x - initPosition.x), swipeAngle) === options.axis; 8297 } 8298 8299 function onPanStart (e) { 8300 if (running) { 8301 if (preventActionWhenRunning) { return; } else { onTransitionEnd(); } 8302 } 8303 8304 if (autoplay && animating) { stopAutoplayTimer(); } 8305 8306 panStart = true; 8307 if (rafIndex) { 8308 caf(rafIndex); 8309 rafIndex = null; 8310 } 8311 8312 var $ = getEvent(e); 8313 events.emit(isTouchEvent(e) ? 'touchStart' : 'dragStart', info(e)); 8314 8315 if (!isTouchEvent(e) && ['img', 'a'].indexOf(getLowerCaseNodeName(getTarget(e))) >= 0) { 8316 preventDefaultBehavior(e); 8317 } 8318 8319 lastPosition.x = initPosition.x = $.clientX; 8320 lastPosition.y = initPosition.y = $.clientY; 8321 if (carousel) { 8322 translateInit = parseFloat(container.style[transformAttr].replace(transformPrefix, '')); 8323 resetDuration(container, '0s'); 8324 } 8325 } 8326 8327 function onPanMove (e) { 8328 if (panStart) { 8329 var $ = getEvent(e); 8330 lastPosition.x = $.clientX; 8331 lastPosition.y = $.clientY; 8332 8333 if (carousel) { 8334 if (!rafIndex) { rafIndex = raf(function(){ panUpdate(e); }); } 8335 } else { 8336 if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); } 8337 if (moveDirectionExpected) { preventScroll = true; } 8338 } 8339 8340 if ((typeof e.cancelable !== 'boolean' || e.cancelable) && preventScroll) { 8341 e.preventDefault(); 8342 } 8343 } 8344 } 8345 8346 function panUpdate (e) { 8347 if (!moveDirectionExpected) { 8348 panStart = false; 8349 return; 8350 } 8351 caf(rafIndex); 8352 if (panStart) { rafIndex = raf(function(){ panUpdate(e); }); } 8353 8354 if (moveDirectionExpected === '?') { moveDirectionExpected = getMoveDirectionExpected(); } 8355 if (moveDirectionExpected) { 8356 if (!preventScroll && isTouchEvent(e)) { preventScroll = true; } 8357 8358 try { 8359 if (e.type) { events.emit(isTouchEvent(e) ? 'touchMove' : 'dragMove', info(e)); } 8360 } catch(err) {} 8361 8362 var x = translateInit, 8363 dist = getDist(lastPosition, initPosition); 8364 if (!horizontal || fixedWidth || autoWidth) { 8365 x += dist; 8366 x += 'px'; 8367 } else { 8368 var percentageX = TRANSFORM ? dist * items * 100 / ((viewport + gutter) * slideCountNew): dist * 100 / (viewport + gutter); 8369 x += percentageX; 8370 x += '%'; 8371 } 8372 8373 container.style[transformAttr] = transformPrefix + x + transformPostfix; 8374 } 8375 } 8376 8377 function onPanEnd (e) { 8378 if (panStart) { 8379 if (rafIndex) { 8380 caf(rafIndex); 8381 rafIndex = null; 8382 } 8383 if (carousel) { resetDuration(container, ''); } 8384 panStart = false; 8385 8386 var $ = getEvent(e); 8387 lastPosition.x = $.clientX; 8388 lastPosition.y = $.clientY; 8389 var dist = getDist(lastPosition, initPosition); 8390 8391 if (Math.abs(dist)) { 8392 // drag vs click 8393 if (!isTouchEvent(e)) { 8394 // prevent "click" 8395 var target = getTarget(e); 8396 addEvents(target, {'click': function preventClick (e) { 8397 preventDefaultBehavior(e); 8398 removeEvents(target, {'click': preventClick}); 8399 }}); 8400 } 8401 8402 if (carousel) { 8403 rafIndex = raf(function() { 8404 if (horizontal && !autoWidth) { 8405 var indexMoved = - dist * items / (viewport + gutter); 8406 indexMoved = dist > 0 ? Math.floor(indexMoved) : Math.ceil(indexMoved); 8407 index += indexMoved; 8408 } else { 8409 var moved = - (translateInit + dist); 8410 if (moved <= 0) { 8411 index = indexMin; 8412 } else if (moved >= slidePositions[slideCountNew - 1]) { 8413 index = indexMax; 8414 } else { 8415 var i = 0; 8416 while (i < slideCountNew && moved >= slidePositions[i]) { 8417 index = i; 8418 if (moved > slidePositions[i] && dist < 0) { index += 1; } 8419 i++; 8420 } 8421 } 8422 } 8423 8424 render(e, dist); 8425 events.emit(isTouchEvent(e) ? 'touchEnd' : 'dragEnd', info(e)); 8426 }); 8427 } else { 8428 if (moveDirectionExpected) { 8429 onControlsClick(e, dist > 0 ? -1 : 1); 8430 } 8431 } 8432 } 8433 } 8434 8435 // reset 8436 if (options.preventScrollOnTouch === 'auto') { preventScroll = false; } 8437 if (swipeAngle) { moveDirectionExpected = '?'; } 8438 if (autoplay && !animating) { setAutoplayTimer(); } 8439 } 8440 8441 // === RESIZE FUNCTIONS === // 8442 // (slidePositions, index, items) => vertical_conentWrapper.height 8443 function updateContentWrapperHeight () { 8444 var wp = middleWrapper ? middleWrapper : innerWrapper; 8445 wp.style.height = slidePositions[index + items] - slidePositions[index] + 'px'; 8446 } 8447 8448 function getPages () { 8449 var rough = fixedWidth ? (fixedWidth + gutter) * slideCount / viewport : slideCount / items; 8450 return Math.min(Math.ceil(rough), slideCount); 8451 } 8452 8453 /* 8454 * 1. update visible nav items list 8455 * 2. add "hidden" attributes to previous visible nav items 8456 * 3. remove "hidden" attrubutes to new visible nav items 8457 */ 8458 function updateNavVisibility () { 8459 if (!nav || navAsThumbnails) { return; } 8460 8461 if (pages !== pagesCached) { 8462 var min = pagesCached, 8463 max = pages, 8464 fn = showElement; 8465 8466 if (pagesCached > pages) { 8467 min = pages; 8468 max = pagesCached; 8469 fn = hideElement; 8470 } 8471 8472 while (min < max) { 8473 fn(navItems[min]); 8474 min++; 8475 } 8476 8477 // cache pages 8478 pagesCached = pages; 8479 } 8480 } 8481 8482 function info (e) { 8483 return { 8484 container: container, 8485 slideItems: slideItems, 8486 navContainer: navContainer, 8487 navItems: navItems, 8488 controlsContainer: controlsContainer, 8489 hasControls: hasControls, 8490 prevButton: prevButton, 8491 nextButton: nextButton, 8492 items: items, 8493 slideBy: slideBy, 8494 cloneCount: cloneCount, 8495 slideCount: slideCount, 8496 slideCountNew: slideCountNew, 8497 index: index, 8498 indexCached: indexCached, 8499 displayIndex: getCurrentSlide(), 8500 navCurrentIndex: navCurrentIndex, 8501 navCurrentIndexCached: navCurrentIndexCached, 8502 pages: pages, 8503 pagesCached: pagesCached, 8504 sheet: sheet, 8505 isOn: isOn, 8506 event: e || {}, 8507 }; 8508 } 8509 8510 return { 8511 version: '2.9.2', 8512 getInfo: info, 8513 events: events, 8514 goTo: goTo, 8515 play: play, 8516 pause: pause, 8517 isOn: isOn, 8518 updateSliderHeight: updateInnerWrapperHeight, 8519 refresh: initSliderTransform, 8520 destroy: destroy, 8521 rebuild: function() { 8522 return tns(extend(options, optionsElements)); 8523 } 8524 }; 8525}; 8526 8527return tns; 8528})(); 8529/** 8530 * lodash (Custom Build) <https://lodash.com/> 8531 * Build: `lodash modularize exports="npm" -o ./` 8532 * Copyright jQuery Foundation and other contributors <https://jquery.org/> 8533 * Released under MIT license <https://lodash.com/license> 8534 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 8535 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 8536 */ 8537
8538/** Used as the `TypeError` message for "Functions" methods. */ 8539var FUNC_ERROR_TEXT = 'Expected a function'; 8540 8541/** Used as references for various `Number` constants. */ 8542var NAN = 0 / 0; 8543 8544/** `Object#toString` result references. */ 8545var symbolTag = '[object Symbol]'; 8546 8547/** Used to match leading and trailing whitespace. */ 8548var reTrim = /^\s+|\s+$/g; 8549 8550/** Used to detect bad signed hexadecimal string values. */ 8551var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; 8552 8553/** Used to detect binary string values. */ 8554var reIsBinary = /^0b[01]+$/i; 8555 8556/** Used to detect octal string values. */ 8557var reIsOctal = /^0o[0-7]+$/i; 8558 8559/** Built-in method references without a dependency on `root`. */ 8560var freeParseInt = parseInt; 8561 8562/** Detect free variable `global` from Node.js. */ 8563var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; 8564 8565/** Detect free variable `self`. */ 8566var freeSelf = typeof self == 'object' && self && self.Object === Object && self; 8567 8568/** Used as a reference to the global object. */ 8569var root = freeGlobal || freeSelf || Function('return this')(); 8570 8571/** Used for built-in method references. */ 8572var objectProto = Object.prototype; 8573 8574/** 8575 * Used to resolve the 8576 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) 8577 * of values. 8578 */ 8579var objectToString = objectProto.toString; 8580 8581/* Built-in method references for those with the same name as other `lodash` methods. */ 8582var nativeMax = Math.max, 8583 nativeMin = Math.min; 8584 8585/** 8586 * Gets the timestamp of the number of milliseconds that have elapsed since 8587 * the Unix epoch (1 January 1970 00:00:00 UTC). 8588 * 8589 * @static 8590 * @memberOf _ 8591 * @since 2.4.0 8592 * @category Date 8593 * @returns {number} Returns the timestamp. 8594 * @example 8595 * 8596 * _.defer(function(stamp) { 8597 * console.log(_.now() - stamp); 8598 * }, _.now()); 8599 * // => Logs the number of milliseconds it took for the deferred invocation. 8600 */ 8601var now = function() { 8602 return root.Date.now(); 8603}; 8604 8605/** 8606 * Creates a debounced function that delays invoking `func` until after `wait` 8607 * milliseconds have elapsed since the last time the debounced function was 8608 * invoked. The debounced function comes with a `cancel` method to cancel 8609 * delayed `func` invocations and a `flush` method to immediately invoke them. 8610 * Provide `options` to indicate whether `func` should be invoked on the 8611 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked 8612 * with the last arguments provided to the debounced function. Subsequent 8613 * calls to the debounced function return the result of the last `func` 8614 * invocation. 8615 * 8616 * **Note:** If `leading` and `trailing` options are `true`, `func` is 8617 * invoked on the trailing edge of the timeout only if the debounced function 8618 * is invoked more than once during the `wait` timeout. 8619 * 8620 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred 8621 * until to the next tick, similar to `setTimeout` with a timeout of `0`. 8622 * 8623 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) 8624 * for details over the differences between `_.debounce` and `_.throttle`. 8625 * 8626 * @static 8627 * @memberOf _ 8628 * @since 0.1.0 8629 * @category Function 8630 * @param {Function} func The function to debounce. 8631 * @param {number} [wait=0] The number of milliseconds to delay. 8632 * @param {Object} [options={}] The options object. 8633 * @param {boolean} [options.leading=false] 8634 * Specify invoking on the leading edge of the timeout. 8635 * @param {number} [options.maxWait] 8636 * The maximum time `func` is allowed to be delayed before it's invoked. 8637 * @param {boolean} [options.trailing=true] 8638 * Specify invoking on the trailing edge of the timeout. 8639 * @returns {Function} Returns the new debounced function. 8640 * @example 8641 * 8642 * // Avoid costly calculations while the window size is in flux. 8643 * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); 8644 * 8645 * // Invoke `sendMail` when clicked, debouncing subsequent calls. 8646 * jQuery(element).on('click', _.debounce(sendMail, 300, { 8647 * 'leading': true, 8648 * 'trailing': false 8649 * })); 8650 * 8651 * // Ensure `batchLog` is invoked once after 1 second of debounced calls. 8652 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); 8653 * var source = new EventSource('/stream'); 8654 * jQuery(source).on('message', debounced); 8655 * 8656 * // Cancel the trailing debounced invocation.
vendor: 6,539 bytes, lines 8657-8912
8657 * jQuery(window).on('popstate', debounced.cancel); 8658 */ 8659function debounce(func, wait, options) { 8660 var lastArgs, 8661 lastThis, 8662 maxWait, 8663 result, 8664 timerId, 8665 lastCallTime, 8666 lastInvokeTime = 0, 8667 leading = false, 8668 maxing = false, 8669 trailing = true; 8670 8671 if (typeof func != 'function') { 8672 throw new TypeError(FUNC_ERROR_TEXT); 8673 } 8674 wait = toNumber(wait) || 0; 8675 if (isObject(options)) { 8676 leading = !!options.leading; 8677 maxing = 'maxWait' in options; 8678 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; 8679 trailing = 'trailing' in options ? !!options.trailing : trailing; 8680 } 8681 8682 function invokeFunc(time) { 8683 var args = lastArgs, 8684 thisArg = lastThis; 8685 8686 lastArgs = lastThis = undefined; 8687 lastInvokeTime = time; 8688 result = func.apply(thisArg, args); 8689 return result; 8690 } 8691 8692 function leadingEdge(time) { 8693 // Reset any `maxWait` timer. 8694 lastInvokeTime = time; 8695 // Start the timer for the trailing edge. 8696 timerId = setTimeout(timerExpired, wait); 8697 // Invoke the leading edge. 8698 return leading ? invokeFunc(time) : result; 8699 } 8700 8701 function remainingWait(time) { 8702 var timeSinceLastCall = time - lastCallTime, 8703 timeSinceLastInvoke = time - lastInvokeTime, 8704 result = wait - timeSinceLastCall; 8705 8706 return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; 8707 } 8708 8709 function shouldInvoke(time) { 8710 var timeSinceLastCall = time - lastCallTime, 8711 timeSinceLastInvoke = time - lastInvokeTime; 8712 8713 // Either this is the first call, activity has stopped and we're at the 8714 // trailing edge, the system time has gone backwards and we're treating 8715 // it as the trailing edge, or we've hit the `maxWait` limit. 8716 return (lastCallTime === undefined || (timeSinceLastCall >= wait) || 8717 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); 8718 } 8719 8720 function timerExpired() { 8721 var time = now(); 8722 if (shouldInvoke(time)) { 8723 return trailingEdge(time); 8724 } 8725 // Restart the timer. 8726 timerId = setTimeout(timerExpired, remainingWait(time)); 8727 } 8728 8729 function trailingEdge(time) { 8730 timerId = undefined; 8731 8732 // Only invoke if we have `lastArgs` which means `func` has been 8733 // debounced at least once. 8734 if (trailing && lastArgs) { 8735 return invokeFunc(time); 8736 } 8737 lastArgs = lastThis = undefined; 8738 return result; 8739 } 8740 8741 function cancel() { 8742 if (timerId !== undefined) { 8743 clearTimeout(timerId); 8744 } 8745 lastInvokeTime = 0; 8746 lastArgs = lastCallTime = lastThis = timerId = undefined; 8747 } 8748 8749 function flush() { 8750 return timerId === undefined ? result : trailingEdge(now()); 8751 } 8752 8753 function debounced() { 8754 var time = now(), 8755 isInvoking = shouldInvoke(time); 8756 8757 lastArgs = arguments; 8758 lastThis = this; 8759 lastCallTime = time; 8760 8761 if (isInvoking) { 8762 if (timerId === undefined) { 8763 return leadingEdge(lastCallTime); 8764 } 8765 if (maxing) { 8766 // Handle invocations in a tight loop. 8767 timerId = setTimeout(timerExpired, wait); 8768 return invokeFunc(lastCallTime); 8769 } 8770 } 8771 if (timerId === undefined) { 8772 timerId = setTimeout(timerExpired, wait); 8773 } 8774 return result; 8775 } 8776 debounced.cancel = cancel; 8777 debounced.flush = flush; 8778 return debounced; 8779} 8780 8781/** 8782 * Checks if `value` is the 8783 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) 8784 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) 8785 * 8786 * @static 8787 * @memberOf _ 8788 * @since 0.1.0 8789 * @category Lang 8790 * @param {*} value The value to check. 8791 * @returns {boolean} Returns `true` if `value` is an object, else `false`. 8792 * @example 8793 * 8794 * _.isObject({}); 8795 * // => true 8796 * 8797 * _.isObject([1, 2, 3]); 8798 * // => true 8799 * 8800 * _.isObject(_.noop); 8801 * // => true 8802 * 8803 * _.isObject(null); 8804 * // => false 8805 */ 8806function isObject(value) { 8807 var type = typeof value; 8808 return !!value && (type == 'object' || type == 'function'); 8809} 8810 8811/** 8812 * Checks if `value` is object-like. A value is object-like if it's not `null` 8813 * and has a `typeof` result of "object". 8814 * 8815 * @static 8816 * @memberOf _ 8817 * @since 4.0.0 8818 * @category Lang 8819 * @param {*} value The value to check. 8820 * @returns {boolean} Returns `true` if `value` is object-like, else `false`. 8821 * @example 8822 * 8823 * _.isObjectLike({}); 8824 * // => true 8825 * 8826 * _.isObjectLike([1, 2, 3]); 8827 * // => true 8828 * 8829 * _.isObjectLike(_.noop); 8830 * // => false 8831 * 8832 * _.isObjectLike(null); 8833 * // => false 8834 */ 8835function isObjectLike(value) { 8836 return !!value && typeof value == 'object'; 8837} 8838 8839/** 8840 * Checks if `value` is classified as a `Symbol` primitive or object. 8841 * 8842 * @static 8843 * @memberOf _ 8844 * @since 4.0.0 8845 * @category Lang 8846 * @param {*} value The value to check. 8847 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. 8848 * @example 8849 * 8850 * _.isSymbol(Symbol.iterator); 8851 * // => true 8852 * 8853 * _.isSymbol('abc'); 8854 * // => false 8855 */ 8856function isSymbol(value) { 8857 return typeof value == 'symbol' || 8858 (isObjectLike(value) && objectToString.call(value) == symbolTag); 8859} 8860 8861/** 8862 * Converts `value` to a number. 8863 * 8864 * @static 8865 * @memberOf _ 8866 * @since 4.0.0 8867 * @category Lang 8868 * @param {*} value The value to process. 8869 * @returns {number} Returns the number. 8870 * @example 8871 * 8872 * _.toNumber(3.2); 8873 * // => 3.2 8874 * 8875 * _.toNumber(Number.MIN_VALUE); 8876 * // => 5e-324 8877 * 8878 * _.toNumber(Infinity); 8879 * // => Infinity 8880 * 8881 * _.toNumber('3.2'); 8882 * // => 3.2 8883 */ 8884function toNumber(value) { 8885 if (typeof value == 'number') { 8886 return value; 8887 } 8888 if (isSymbol(value)) { 8889 return NAN; 8890 } 8891 if (isObject(value)) { 8892 var other = typeof value.valueOf == 'function' ? value.valueOf() : value; 8893 value = isObject(other) ? (other + '') : other; 8894 } 8895 if (typeof value != 'string') { 8896 return value === 0 ? value : +value; 8897 } 8898 value = value.replace(reTrim, ''); 8899 var isBinary = reIsBinary.test(value); 8900 return (isBinary || reIsOctal.test(value)) 8901 ? freeParseInt(value.slice(2), isBinary ? 2 : 8) 8902 : (reIsBadHex.test(value) ? NAN : +value); 8903} 8904 8905/*! iFrame Resizer (iframeSizer.min.js ) - v4.3.1 - 2021-01-11 8906 * Desc: Force cross domain iframes to size to content. 8907 * Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame. 8908 * Copyright: (c) 2021 David J. Bradshaw - [email protected] 8909 * License: MIT 8910 */ 8911 8912!function(l){if("undefined"!=typeof window){var e,m=0,g=!1,o=!1,x="message".length,M="[iFrameSizer]",I=M.length,k=null,r=window.requestAnimationFrame,h={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},F={}
8912,i=null,p={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!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&&((e=window.jQuery).fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(i){return this.filter("iframe").each(function(e,n){d(n,i)}).end()}):E("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof define&&define.amd?define([],v):"object"==typeof module&&"object"==typeof module.exports&&(module.exports=v()),window.iFrameResize=window.iFrameResize||v()}function w(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function O(e,n,i){e.addEventListener(n,i,!1)}function R(e,n,i){e.removeEventListener(n,i,!1)}function a(e){return M+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}function t(e){return F[e]?F[e].log:g}function T(e,n){s("log",e,n,t(e))}function E(e,n){s("info",e,n,t(e))}function N(e,n){s("warn",e,n,!0)}function s(e,n,i,t){!0===t&&"object"==typeof window.console&&console[e](a(n),i)}function n(n){function e(){i("Height"),i("Width"),L(function(){A(y),H(v),c("onResized",y)},y,"init")}function i(e){var n=Number(F[v]["max"+e]),i=Number(F[v]["min"+e]),t=e.toLowerCase(),o=Number(y[t]);T(v,"Checking "+t+" is in range "+i+"-"+n),o<i&&(o=i,T(v,"Set "+t+" to min value")),n<o&&(o=n,T(v,"Set "+t+" to max value")),y[t]=""+o}function t(e){return b.substr(b.indexOf(":")+x+e)}function a(e,n){!function(e,n,i){z[i]||(z[i]=setTimeout(function(){z[i]=null,e()},n))}(function(){B("Send Page Info","pageInfo:"+function(){var e=document.body.getBoundingClientRect(),n=y.iframe.getBoundingClientRect();return 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})}(),e,n)},32,n)}function r(e){var n=e.getBoundingClientRect();return S(v),{x:Math.floor(Number(n.left)+Number(k.x)),y:Math.floor(Number(n.top)+Number(k.y))}}function o(e){var n=e?r(y.iframe):{x:0,y:0},i={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":"")](i.x,i.y):N(v,"Unable to scroll to requested position, window.parentIFrame not found"):(k=i,s(),T(v,"--"))}function s(){!1!==c("onScroll",k)?H(v):j()}function d(e){var n={};if(0===Number(y.width)&&0===Number(y.height)){var i=t(9).split(":");n={x:i[1],y:i[0]}}else n={x:y.width,y:y.height};c(e,{iframe:y.iframe,screenX:Number(n.x),screenY:Number(n.y),type:y.type})}function c(e,n){return W(v,e,n)}var u,f,l,m,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?(g=b.substr(I).split(":"),h=g[1]?parseInt(g[1],10):0,p=F[g[0]]&&F[g[0]].iframe,w=getComputedStyle(p),y={iframe:p,id:g[0],height:h+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.paddingTop?parseInt(e.paddingTop,10):0,i=e.paddingBottom?parseInt(e.paddingBottom,10):0;return n+i}(w)+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.borderTopWidth?parseInt(e.borderTopWidth,10):0,i=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return n+i}
8912(w),width:g[2],type:g[3]},v=y.id,F[v]&&(F[v].loaded=!0),(m=y.type in{true:1,false:1,undefined:1})&&T(v,"Ignoring init message from meta parent page"),!m&&(l=!0,F[f=v]||(l=!1,N(y.type+" No settings for "+f+". Message was: "+b)),l)&&(T(v,"Received: "+b),u=!0,null===y.iframe&&(N(v,"IFrame ("+y.id+") not found"),u=!1),u&&function(){var e,i=n.origin,t=F[v]&&F[v].checkOrigin;if(t&&""+i!="null"&&!(t.constructor===Array?function(){var e=0,n=!1;for(T(v,"Checking connection is from allowed list of origins: "+t);e<t.length;e++)if(t[e]===i){n=!0;break}return n}():(e=F[v]&&F[v].remoteHost,T(v,"Checking connection is from: "+e),i===e)))throw new Error("Unexpected message received from: "+i+" 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!0}()&&function(){switch(F[v]&&F[v].firstRun&&F[v]&&(F[v].firstRun=!1),y.type){case"close":C(y.iframe);break;case"message":!function(e){T(v,"onMessage passed: {iframe: "+y.iframe.id+", message: "+e+"}"),c("onMessage",{iframe:y.iframe,message:JSON.parse(e)}),T(v,"--")}(t(6));break;case"mouseenter":d("onMouseEnter");break;case"mouseleave":d("onMouseLeave");break;case"autoResize":F[v].autoResize=JSON.parse(t(9));break;case"scrollTo":o(!1);break;case"scrollToOffset":o(!0);break;case"pageInfo":a(F[v]&&F[v].iframe,v),function(){function e(n,i){function t(){F[r]?a(F[r].iframe,r):o()}["scroll","resize"].forEach(function(e){T(r,n+e+" listener for sendPageInfo"),i(window,e,t)})}function o(){e("Remove ",R)}var 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":!function(e){var n,i=e.split("#")[1]||"",t=decodeURIComponent(i),o=document.getElementById(t)||document.getElementsByName(t)[0];o?(n=r(o),T(v,"Moving to in page link (#"+i+") at x: "+n.x+" y: "+n.y),k={x:n.x,y:n.y},s(),T(v,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(i):T(v,"In page link #"+i+" not found and window.parentIFrame not found"):T(v,"In page link #"+i+" not found")}(t(9));break;case"reset":P(y);break;case"init":e(),c("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"):e()}}())):E(v,"Ignored: "+b)}function W(e,n,i){var t=null,o=null;if(F[e]){if("function"!=typeof(t=F[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=t(i)}return o}function b(e){var n=e.id;delete F[n]}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,"--"),b(e)}else T(n,"Close iframe cancelled by onClose event")}function S(e){null===k&&T(e,"Get page position: "+(k={x:window.pageXOffset!==l?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==l?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(n){function i(e){o||"0"!==n[e]||(o=!0,T(t,"Hidden iFrame detected, creating visibility listener"),function(){function n(){Object.keys(F).forEach(function(e){!function(n){function e(e){return"0px"===(F[n]&&F[n].iframe.style[e])}F[n]&&null!==F[n].iframe.offsetParent&&(e("height")||e("width"))&&B("Visibility change","resize",F[n].iframe,n)}(e)})}function i(e){T("window","Mutation observed: "+e[0].target+" "+e[0].type),c(n,16)}var t=w();t&&function(){var e=document.querySelector("body");new t(i).observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})}()}())}function e(e){!function(e){n.id?(n.iframe.style[e]=n[e]+"px",T(n.id,"IFrame ("+t+") "+e+" set to "+n[e]+"px")):T("undefined","messageData id not set")}(e),i(e)}var t=n.iframe.id;F[t]&&(F[t].sizeHeight&&e("height"),F[t].sizeWidth&&e("width"))}function L(e,n,i){i!==n.type&&r&&!window.jasmine?(T(n.id,"Requesting animation frame"),r(e)):e()}function B(e,n,i,t,o){var r,a=!1;t=t||i.id,F[t]&&(i&&"contentWindow"in i&&null!==i.contentWindow?(r=F[t]&&F[t].targetOrigin,T(t,"["+e+"] Sending msg to iframe["+t+"] ("+n+") targetOrigin: "+r),i.contentWindow.postMessage(M+n,r)):N(t,"["+e+"] IFrame("+t+") not found"),o&&F[t]&&F[t].warningTimeout&&(F[t].msgTimeout=setTimeout(function(){!F[t]||F[t].loaded||a||(a=!0,N(t,"IFrame has not responded within "+F[t].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[t].warningTimeout)))}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].bodyBackgroun
8912d+":"+F[e].bodyPadding+":"+F[e].tolerance+":"+F[e].inPageLinks+":"+F[e].resizeFrom+":"+F[e].widthCalculationMethod+":"+F[e].mouseEvents}function d(i,e){function n(e){var n=e.split("Callback");if(2===n.length){var i="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[i]=this[e],delete this[e],N(c,"Deprecated: '"+e+"' has been renamed '"+i+"'. The old method will be removed in the next major version.")}}var t,o,r,a,s,d,c=(""===(o=i.id)&&(i.id=(t=e&&e.id||p.id+m++,null!==document.getElementById(t)&&(t+=m++),o=t),g=(e||{}).log,T(o,"Added missing iframe ID: "+o+" ("+i.src+")")),o);function u(e){1/0!==F[c][e]&&0!==F[c][e]&&(i.style[e]=F[c][e]+"px",T(c,"Set "+e+" = "+F[c][e]+"px"))}function f(e){if(F[c]["min"+e]>F[c]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}c in F&&"iFrameResizer"in i?N(c,"Ignored iFrame, already setup."):(d=(d=e)||{},F[c]={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")}(d),Object.keys(d).forEach(n,d),function(e){for(var n in p)Object.prototype.hasOwnProperty.call(p,n)&&(F[c][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:p[n])}(d),F[c]&&(F[c].targetOrigin=!0===F[c].checkOrigin?function(e){return""===e||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e}(F[c].remoteHost):"*"),function(){switch(T(c,"IFrame scrolling "+(F[c]&&F[c].scrolling?"enabled":"disabled")+" for "+c),i.style.overflow=!1===(F[c]&&F[c].scrolling)?"hidden":"auto",F[c]&&F[c].scrolling){case"omit":break;case!0:i.scrolling="yes";break;case!1:i.scrolling="no";break;default:i.scrolling=F[c]?F[c].scrolling:"no"}}(),f("Height"),f("Width"),u("maxHeight"),u("minHeight"),u("maxWidth"),u("minWidth"),"number"!=typeof(F[c]&&F[c].bodyMargin)&&"0"!==(F[c]&&F[c].bodyMargin)||(F[c].bodyMarginV1=F[c].bodyMargin,F[c].bodyMargin=F[c].bodyMargin+"px"),r=q(c),(s=w())&&(a=s,i.parentNode&&new a(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(){B("iFrame.onload",r,i,l,!0),function(){var e=F[c]&&F[c].firstRun,n=F[c]&&F[c].heightCalculationMethod in h;!e&&n&&P({iframe:i,height:0,width:0,type:"init"})}()}),B("init",r,i,l,!0),F[c]&&(F[c].iframe.iFrameResizer={close:C.bind(null,F[c].iframe),removeListeners:b.bind(null,F[c].iframe),resize:B.bind(null,"Window resize","resize",F[c].iframe),moveToAnchor:function(e){B("Move to anchor","moveToAnchor:"+e,F[c].iframe,c)},sendMessage:function(e){B("Send Message","message:"+(e=JSON.stringify(e)),F[c].iframe,c)}}))}function c(e,n){null===i&&(i=setTimeout(function(){i=null,e()},n))}function u(){"hidden"!==document.visibilityState&&(T("document","Trigger event: Visiblity change"),c(function(){f("Tab Visable","resize")},16))}function f(n,i){Object.keys(F).forEach(function(e){!function(e){return F[e]&&"parent"===F[e].resizeFrom&&F[e].autoResize&&!F[e].firstRun}(e)||B(n,i,F[e].iframe,e)})}function y(){O(window,"message",n),O(window,"resize",function(){!function(e){T("window","Trigger event: "+e),c(function(){f("Window "+e,"resize")},16)}("resize")}),O(document,"visibilitychange",u),O(document,"-webkit-visibilitychange",u)}function v(){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),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!r;e+=1)r=window[n[e]+"RequestAnimationFrame"];r?r=r.bind(window):T("setup","RequestAnimationFrame not supported")}(),y(),function(e,n){switch(t=[],function(e){e&&e.enablePublicMethods&&N("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(e),typeof n){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(n||"iframe"),i.bind(l,e));break;case"object":i(e,n);break;default:throw new TypeError("Unexpected data type ("+typeof n+")")}return t}}}(); 8913//# sourceMappingURL=iframeResizer.map
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.