PageSourceSearch

https://www.cobblestoneloyalty.com/skins/skin-prodcobblestone/1791304707/assets/loyalty/scripts/scripts.min.js

js cobblestoneloyalty.com collected 2026-10-10 02:28:55 UTC 1,513,546 bytes, 27,917 lines download raw bytes

vendor: 86,927 bytes, lines 1-2
1/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
2!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(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.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(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.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||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.1"+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]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(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(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.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=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),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("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=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)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(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 fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){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[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.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},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.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 f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(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?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,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(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===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]||oe.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]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(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(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!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!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.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:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){n&&!(i=F.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length));for(a in r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)};function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(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 Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||be(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=we(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(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},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.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&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s<o.length)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,I,i),a(o,n,W,i)):(o++,l.call(e,a(o,n,I,i),a(o,n,W,i),a(o,n,I,n.notifyWith))):(r!==I&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(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},X=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(X,"ms-").replace(U,V)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=w.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(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[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(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(G):(t=G(t))in r?[t]:t.match(M)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.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&&!w.isEmptyObject(t)}};var J=new Q,K=new Q,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}K.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return K.hasData(e)||J.hasData(e)},data:function(e,t,n){return K.access(e,t,n)},removeData:function(e,t){K.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=K.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){K.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=K.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){K.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.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=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},se=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.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 le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ae(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.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(){ae(this)?w(this).show():w(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,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(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=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.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,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){s=w.event.handlers.call(this,t,l),n=0;while((o=s[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((a=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(a.namespace)||(t.handleObj=a,t.data=a.data,void 0!==(i=((w.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.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&&e.button>=1))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?w(i,this).index(l)>-1:w.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(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,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&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.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,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&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return De(this,e,t,n,r)},one:function(e,t,n,r){return De(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(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=ke),this.each(function(){w.event.remove(this,e,n,t)})}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}K.hasData(e)&&(s=K.access(e),u=w.extend({},s),K.set(t,u))}}function Me(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,y=t[0],v=g(y);if(v||p>1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,Oe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!J.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(qe,""),c,l))}return e}function Ie(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Me(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=ye(s,"script")).length>0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.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 Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(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&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(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&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),$e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Be=new RegExp(oe.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Fe(e,t,n){var r,i,o,a,s=e.style;return(n=n||$e(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&We.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 _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","Moz","ms"],Ye=r.createElement("div").style;function Qe(e){if(e in Ye)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ge.length;while(n--)if((e=Ge[n]+t)in Ye)return e}function Je(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Qe(e)||e),t}function Ke(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(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+=w.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[a]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[a]+"Width",!0,i):s+=w.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!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=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.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=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.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=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.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):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.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=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(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&&ae(e),y=J.get(e,"fxshow");n.queue||(null==(a=w._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--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=J.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.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;for(r in d)u||(y?"hidden"in y&&(g=y.hidden):y=J.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),J.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(ft(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=pt(this,w.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,at())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.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=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(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(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.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=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.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)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.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||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(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]}function Ut(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}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.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":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(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(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.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 w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Yt=[],Qt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||w.expando+"_"+Et++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qt,"$1"+i):!1!==t.jsonp&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Yt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=A.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=xe([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=w.css(e,"position"),f=w(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=w.css(e,"top"),u=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.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"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||be})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return z(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),We.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return z(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)},t,a?i:void 0,a)}})}),w.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,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.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)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=g,w.isWindow=y,w.camelCase=G,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Jt=e.jQuery,Kt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Kt),t&&e.jQuery===w&&(e.jQuery=Jt),w},t||(e.jQuery=e.$=w),w});
vendor: 5,127 bytes, lines 3-9
3
4/*! jQuery UI - v1.12.1 - 2017-11-28
5 * http://jqueryui.com
6 * Includes: widget.js, position.js, focusable.js, form-reset-mixin.js, keycode.js, labels.js, tabbable.js, unique-id.js, widgets/datepicker.js, widgets/menu.js, widgets/mouse.js, widgets/selectmenu.js, widgets/slider.js
7 * Copyright jQuery Foundation and other contributors; Licensed MIT */
8
9(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(h.inline?h.dpDiv.parent()[0]:h.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.ui=t.ui||{},t.ui.version="1.12.1";var r=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o}
vendor: 4,241 bytes, line 9
9,t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=r++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})}
vendor: 13,446 bytes, line 9
9,_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,l=t(this),h=l.outerWidth(),c=l.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=h+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),T=e(k.my,l.outerWidth(),l.outerHeight());"right"===n.my[0]?D.left-=h:"center"===n.my[0]&&(D.left-=h/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=T[0],D.top+=T[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:h,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+T[0],u[1]+T[1]],my:n.my,at:n.at,within:b,elem:l})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-h,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:l,left:D.left,top:D.top,width:h,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.focusable=function(i,s){var n,o,a,r,l,h=i.nodeName.toLowerCase();return"area"===h?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(h)?(r=!i.disabled,r&&(l=t(i).closest("fieldset")[0],l&&(r=!l.disabled))):r="a"===h?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.ui,{datepicker:{version:"1.12.1"}});var h;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,l,h,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>
9"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,h/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),h===n&&(h=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),a(h.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==n.dateFormat&&void 0===n.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0}
vendor: 12,186 bytes, lines 9-10
9,_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,l,h,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),l=t.datepicker._checkOffset(s,l,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),s.inline||(h=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?s.dpDiv.show(h,t.datepicker._get(s,"showOptions"),c):s.dpDiv[h||"show"](h?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))}},_updateDatepicker:function(e){this.maxRows=4,h=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+r):0),i
10},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(l).match(o);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(l,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],l+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>l&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return l(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||l("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":r+=parseInt(h[1],10);break;case"w":case"W":r+=7*parseInt(h[1],10);break;case"m":case"M":a+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}h=l.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null}
vendor: 6,672 bytes, line 10
10,_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,T,I,M,P,S,N,H,z,A,O,E,W,F,L,R=new Date,Y=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),B=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),X=this._get(t,"stepMonths"),$=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-X,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+X,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:Y,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",h=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(B?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),T=" ui-corner-all",I="",$){if(I+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:I+=" ui-datepicker-group-first",T=" ui-corner-"+(B?"right":"left");break;case U[1]-1:I+=" ui-datepicker-group-last",T=" ui-corner-"+(B?"left":"right");break;default:I+=" ui-datepicker-group-middle",T=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===k?B?o:s:"")+(/all|right/.test(T)&&0===k?B?s:o:"")+this._generateMonthYearHeader(t,Z,te,J,Q,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",M=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)P=(w+c)%7,M+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[P]+"'>"+p[P]+"</span></th>";for(I+=M+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),N=(this._getFirstDayOfMonth(te,Z)-c+7)%7,H=Math.ceil((N+S)/7),z=$?this.maxRows>H?this.maxRows:H:H,this.maxRows=z,A=this._daylightSavingAdjust(new Date(te,Z,1-N)),O=0;z>O;O++){for(I+="<tr>",E=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)W=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!W[0]||J&&J>A||Q&&A>Q,E+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+W[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!W[2]?"":" title='"+W[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===Y.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);I+=E+"</tr>"}Z++,Z>11&&(Z=0,te++),I+="</tbody></table>"+($?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=I}y+=x}return y+=h,t._keyEvent=!1,y}
vendor: 11,681 bytes, line 10
10,_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=s.getMonth())&&(!h||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
10se")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var c=!1;t(document).on("mouseup",function(){c=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!c){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)
11},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,c=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0
vendor: 9,386 bytes, line 11
11}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null}
vendor: 10,145 bytes, line 11
11,numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,l,h,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}})});
vendor: 2,966 bytes, lines 11-120
11
12/*!
13 * jQuery Cookie Plugin v1.4.1
14 * https://github.com/carhartl/jquery-cookie
15 *
16 * Copyright 2006, 2014 Klaus Hartl
17 * Released under the MIT license
18 */
19(function (factory) {
20	if (typeof define === 'function' && define.amd) {
21		// AMD
22		define(['jquery'], factory);
23	} else if (typeof exports === 'object') {
24		// CommonJS
25		factory(require('jquery'));
26	} else {
27		// Browser globals
28		factory(jQuery);
29	}
30}(function ($) {
31
32	var pluses = /\+/g;
33
34	function encode(s) {
35		return config.raw ? s : encodeURIComponent(s);
36	}
37
38	function decode(s) {
39		return config.raw ? s : decodeURIComponent(s);
40	}
41
42	function stringifyCookieValue(value) {
43		return encode(config.json ? JSON.stringify(value) : String(value));
44	}
45
46	function parseCookieValue(s) {
47		if (s.indexOf('"') === 0) {
48			// This is a quoted cookie as according to RFC2068, unescape...
49			s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
50		}
51
52		try {
53			// Replace server-side written pluses with spaces.
54			// If we can't decode the cookie, ignore it, it's unusable.
55			// If we can't parse the cookie, ignore it, it's unusable.
56			s = decodeURIComponent(s.replace(pluses, ' '));
57			return config.json ? JSON.parse(s) : s;
58		} catch(e) {}
59	}
60
61	function read(s, converter) {
62		var value = config.raw ? s : parseCookieValue(s);
63		return $.isFunction(converter) ? converter(value) : value;
64	}
65
66	var config = $.cookie = function (key, value, options) {
67
68		// Write
69
70		if (arguments.length > 1 && !$.isFunction(value)) {
71			options = $.extend({}, config.defaults, options);
72
73			if (typeof options.expires === 'number') {
74				var days = options.expires, t = options.expires = new Date();
75				t.setTime(+t + days * 864e+5);
76			}
77
78			return (document.cookie = [
79				encode(key), '=', stringifyCookieValue(value),
80				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
81				options.path    ? '; path=' + options.path : '',
82				options.domain  ? '; domain=' + options.domain : '',
83				options.secure  ? '; secure' : ''
84			].join(''));
85		}
86
87		// Read
88
89		var result = key ? undefined : {};
90
91		// To prevent the for loop in the first place assign an empty array
92		// in case there are no cookies at all. Also prevents odd result when
93		// calling $.cookie().
94		var cookies = document.cookie ? document.cookie.split('; ') : [];
95
96		for (var i = 0, l = cookies.length; i < l; i++) {
97			var parts = cookies[i].split('=');
98			var name = decode(parts.shift());
99			var cookie = parts.join('=');
100
101			if (key && key === name) {
102				// If second argument (value) is a function it's a converter...
103				result = read(cookie, value);
104				break;
105			}
106
107			// Prevent storing a cookie that we couldn't decode.
108			if (!key && (cookie = read(cookie)) !== undefined) {
109				result[name] = cookie;
110			}
111		}
112
113		return result;
114	};
115
116	config.defaults = {};
117
118	$.removeCookie = function (key, options) {
119		if ($.cookie(key) === undefined) {
120			return false;
121		}
122
123		// Must not alter options, thus extending a fresh object...
124		$.cookie(key, '', $.extend({}, options, { expires: -1 }));
125		return !$.cookie(key);
126	};
127
128}));
129/*! lozad.js - v1.7.0 - 2018-11-08
130* https://github.com/ApoorvSaxena/lozad.js
131* Copyright (c) 2018 Apoorv Saxena; Licensed MIT */
132!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lozad=e()}(this,function(){"use strict";var g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},r="undefined"!=typeof document&&document.documentMode,l={rootMargin:"0px",threshold:0,load:function(t){if("picture"===t.nodeName.toLowerCase()){var e=document.createElement("img");r&&t.getAttribute("data-iesrc")&&(e.src=t.getAttribute("data-iesrc")),t.getAttribute("data-alt")&&(e.alt=t.getAttribute("data-alt")),t.appendChild(e)}t.getAttribute("data-src")&&(t.src=t.getAttribute("data-src")),t.getAttribute("data-srcset")&&t.setAttribute("srcset",t.getAttribute("data-srcset")),t.getAttribute("data-background-image")&&(t.style.backgroundImage="url('"+t.getAttribute("data-background-image")+"')"),t.getAttribute("data-toggle-class")&&t.classList.toggle(t.getAttribute("data-toggle-class"))},loaded:function(){}};
133/**
134   * Detect IE browser
135   * @const {boolean}
136   * @private
137   */function f(t){t.setAttribute("data-loaded",!0)}var b=function(t){return"true"===t.getAttribute("data-loaded")};return function(){var r,o,a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".lozad",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=g({},l,t),n=e.root,i=e.rootMargin,d=e.threshold,u=e.load,c=e.loaded,s=void 0;return window.IntersectionObserver&&(s=new IntersectionObserver((r=u,o=c,function(t,e){t.forEach(function(t){(0<t.intersectionRatio||t.isIntersecting)&&(e.unobserve(t.target),b(t.target)||(r(t.target),f(t.target),o(t.target)))})}),{root:n,rootMargin:i,threshold:d})),{observe:function(){for(var t=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document;return t instanceof Element?[t]:t instanceof NodeList?t:e.querySelectorAll(t)}(a,n),e=0;e<t.length;e++)b(t[e])||(s?s.observe(t[e]):(u(t[e]),f(t[e]),c(t[e])))},triggerLoad:function(t){b(t)||(u(t),f(t),c(t))},observer:s}}});
138
139/**
140 * jQuery JSON plugin 2.4.0
141 *
142 * @author Brantley Harris, 2009-2011
143 * @author Timo Tijhof, 2011-2014
144 * @source This plugin is heavily influenced by MochiKit's serializeJSON, which is
145 *         copyrighted 2005 by Bob Ippolito.
146 * @source Brantley Harris wrote this plugin. It is based somewhat on the JSON.org
147 *         website's http://www.json.org/json2.js, which proclaims:
148 *         "NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.", a sentiment that
149 *         I uphold.
150 * @license MIT License <http://opensource.org/licenses/MIT>
151 */
152(function ($) {
153    'use strict';
154
155    var escape = /["\\\x00-\x1f\x7f-\x9f]/g,
156        meta = {
157            '\b': '\\b',
158            '\t': '\\t',
159            '\n': '\\n',
160            '\f': '\\f',
161            '\r': '\\r',
162            '"': '\\"',
163            '\\': '\\\\'
164        },
165        hasOwn = Object.prototype.hasOwnProperty;
166
167    /**
168     * jQuery.toJSON
169     * Converts the given argument into a JSON representation.
170     *
171     * @param o {Mixed} The json-serializable *thing* to be converted
172     *
173     * If an object has a toJSON prototype, that will be used to get the representation.
174     * Non-integer/string keys are skipped in the object, as are keys that point to a
175     * function.
176     *
177     */
178    $.toJSON = typeof JSON === 'object' && JSON.stringify ? JSON.stringify : function (o) {
179        if (o === null) {
180            return 'null';
181        }
182
183        var pairs, k, name, val,
184            type = $.type(o);
185
186        if (type === 'undefined') {
187            return undefined;
188        }
189
190        // Also covers instantiated Number and Boolean objects,
191        // which are typeof 'object' but thanks to $.type, we
192        // catch them here. I don't know whether it is right
193        // or wrong that instantiated primitives are not
194        // exported to JSON as an {"object":..}.
195        // We choose this path because that's what the browsers did.
196        if (type === 'number' || type === 'boolean') {
197            return String(o);
198        }
199        if (type === 'string') {
200            return $.quoteString(o);
201        }
202        if (typeof o.toJSON === 'function') {
203            return $.toJSON(o.toJSON());
204        }
205        if (type === 'date') {
206            var month = o.getUTCMonth() + 1,
207                day = o.getUTCDate(),
208                year = o.getUTCFullYear(),
209                hours = o.getUTCHours(),
210                minutes = o.getUTCMinutes(),
211                seconds = o.getUTCSeconds(),
212                milli = o.getUTCMilliseconds();
213
214            if (month < 10) {
215                month = '0' + month;
216            }
217            if (day < 10) {
218                day = '0' + day;
219            }
220            if (hours < 10) {
221                hours = '0' + hours;
222            }
223            if (minutes < 10) {
224                minutes = '0' + minutes;
225            }
226            if (seconds < 10) {
227                seconds = '0' + seconds;
228            }
229            if (milli < 100) {
230                milli = '0' + milli;
231            }
232            if (milli < 10) {
233                milli = '0' + milli;
234            }
235            return '"' + year + '-' + month + '-' + day + 'T' +
236                hours + ':' + minutes + ':' + seconds +
237                '.' + milli + 'Z"';
238        }
239
240        pairs = [];
241
242        if ($.isArray(o)) {
243            for (k = 0; k < o.length; k++) {
244                pairs.push($.toJSON(o[k]) || 'null');
245            }
246            return '[' + pairs.join(',') + ']';
247        }
248
249        // Any other object (plain object, RegExp, ..)
250        // Need to do typeof instead of $.type, because we also
251        // want to catch non-plain objects.
252        if (typeof o === 'object') {
253            for (k in o) {
254                // Only include own properties,
255                // Filter out inherited prototypes
256                if (hasOwn.call(o, k)) {
257                    // Keys must be numerical or string. Skip others
258                    type = typeof k;
259                    if (type === 'number') {
260                        name = '"' + k + '"';
261                    } else if (type === 'string') {
262                        name = $.quoteString(k);
263                    } else {
264                        continue;
265                    }
266                    type = typeof o[k];
267
268                    // Invalid values like these return undefined
269                    // from toJSON, however those object members
270                    // shouldn't be included in the JSON string at all.
271                    if (type !== 'function' && type !== 'undefined') {
272                        val = $.toJSON(o[k]);
273                        pairs.push(name + ':' + val);
274                    }
275                }
276            }
277            return '{' + pairs.join(',') + '}';
278        }
279    };
280
281    /**
282     * jQuery.evalJSON
283     * Evaluates a given json string.
284     *
285     * @param str {String}
286     */
287    $.evalJSON = typeof JSON === 'object' && JSON.parse ? JSON.parse : function (str) {
288        /*jshint evil: true */
289        return eval('(' + str + ')');
290    };
291
292    /**
293     * jQuery.secureEvalJSON
294     * Evals JSON in a way that is *more* secure.
295     *
296     * @param str {String}
297     */
298    $.secureEvalJSON = typeof JSON === 'object' && JSON.parse ? JSON.parse : function (str) {
299        var filtered =
300            str
301                .replace(/\\["\\\/bfnrtu]/g, '@')
302                .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
303                .replace(/(?:^|:|,)(?:\s*\[)+/g, '');
304
305        if (/^[\],:{}\s]*$/.test(filtered)) {
306            /*jshint evil: true */
307            return eval('(' + str + ')');
308        }
309        throw new SyntaxError('Error parsing JSON, source is not valid.');
310    };
311
312    /**
313     * jQuery.quoteString
314     * Returns a string-repr of a string, escaping quotes intelligently.
315     * Mostly a support function for toJSON.
316     * Examples:
317     * >>> jQuery.quoteString('apple')
318     * "apple"
319     *
320     * >>> jQuery.quoteString('"Where are we going?", she asked.')
321     * "\"Where are we going?\", she asked."
322     */
323    $.quoteString = function (str) {
324        if (str.match(escape)) {
325            return '"' + str.replace(escape, function (a) {
326                var c = meta[a];
327                if (typeof c === 'string') {
328                    return c;
329                }
330                c = a.charCodeAt();
331                return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
332            }) + '"';
333        }
334        return '"' + str + '"';
335    };
336
337}(jQuery));
338/**
339 * what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
340 * @version v5.0.1
341 * @link https://github.com/ten1seven/what-input
342 * @license MIT
343 */
344!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("whatInput",[],t):"object"==typeof exports?exports.whatInput=t():e.whatInput=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";e.exports=function(){var e=document.documentElement,t=null,n="initial",o=n,i=["input","select","textarea"],r=[],u=[16,17,18,91,93],d={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch"},a=!1,s=!1,c={x:null,y:null},p={2:"touch",3:"touch",4:"mouse"},w=!1;try{var f=Object.defineProperty({},"passive",{get:function(){w=!0}});window.addEventListener("test",null,f)}catch(e){}var v=function(){var e=!!w&&{passive:!0};window.PointerEvent?(window.addEventListener("pointerdown",l),window.addEventListener("pointermove",h)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",l),window.addEventListener("MSPointerMove",h)):(window.addEventListener("mousedown",l),window.addEventListener("mousemove",h),"ontouchstart"in window&&(window.addEventListener("touchstart",L,e),window.addEventListener("touchend",L))),window.addEventListener(b(),h,e),window.addEventListener("keydown",l),window.addEventListener("keyup",l),window.addEventListener("focusin",y),window.addEventListener("focusout",E)},l=function(e){if(!a){var t=e.which,r=d[e.type];"pointer"===r&&(r=x(e));var s="keyboard"===r&&t&&-1===u.indexOf(t)||"mouse"===r||"touch"===r;if(n!==r&&s&&(n=r,m("input")),o!==r&&s){var c=document.activeElement;c&&c.nodeName&&-1===i.indexOf(c.nodeName.toLowerCase())&&(o=r,m("intent"))}}},m=function(t){e.setAttribute("data-what"+t,"input"===t?n:o),g(t)},h=function(e){if(k(e),!a&&!s){var t=d[e.type];"pointer"===t&&(t=x(e)),o!==t&&(o=t,m("intent"))}},y=function(n){t=n.target.nodeName.toLowerCase(),e.setAttribute("data-whatelement",t),n.target.classList.length&&e.setAttribute("data-whatclasses",n.target.classList.toString().replace(" ",","))},E=function(){t=null,e.removeAttribute("data-whatelement"),e.removeAttribute("data-whatclasses")},L=function(e){"touchstart"===e.type?(a=!1,l(e)):a=!0},x=function(e){return"number"==typeof e.pointerType?p[e.pointerType]:"pen"===e.pointerType?"touch":e.pointerType},b=function(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"},g=function(e){for(var t=0,i=r.length;t<i;t++)r[t].type===e&&r[t].fn.call(void 0,"input"===e?n:o)},M=function(e){for(var t=0,n=r.length;t<n;t++)if(r[t].fn===e)return t},k=function(e){c.x!==e.screenX||c.y!==e.screenY?(s=!1,c.x=e.screenX,c.y=e.screenY):s=!0};return"addEventListener"in window&&Array.prototype.indexOf&&function(){d[b()]="mouse",v(),m("input"),m("intent")}(),{ask:function(e){return"intent"===e?o:n},element:function(){return t},ignoreKeys:function(e){u=e},registerOnChange:function(e,t){r.push({fn:e,type:t||"input"})},unRegisterOnChange:function(e){var t=M(e);t&&r.splice(t,1)}}}()}])});
345function validFileSize(field, rules, i, options)
346{
347    if(typeof field.prop('files')[0] !== 'undefined'){
348        var fileSizeInKb = (field.prop('files')[0].size)/1024,
349            maxFileSize = ((typeof field.data('max-file-size-kb') !== 'undefined') && (field.data('max-file-size-kb') != 0))
350                ? field.data('max-file-size-kb')
351                : 2000;
352        if (fileSizeInKb > maxFileSize) {
353            return field.data('errormessage-custom-error')
354                ? field.data('errormessage-custom-error')
355                : 'File size must be less than ' + maxFileSize + 'kb.';
356        }
357    }
358}
359
360/*
361 * Inline Form Validation Engine 2.6.2, jQuery plugin
362 *
363 * Copyright(c) 2010, Cedric Dugas
364 * http://www.position-absolute.com
365 *
366 * 2.0 Rewrite by Olivier Refalo
367 * http://www.crionics.com
368 *
369 * Form validation engine allowing custom regex rules to be added.
370 * Licensed under the MIT License
371 */
372 (function($) {
373
374	"use strict";
375
376	var methods = {
377
378		/**
379		* Kind of the constructor, called before any action
380		* @param {Map} user options
381		*/
382		init: function(options) {
383			var form = this;
384			if (!form.data('jqv') || form.data('jqv') == null ) {
385				options = methods._saveOptions(form, options);
386				// bind all formError elements to close on click
387				$(document).on("click", ".formError", function() {
388					$(this).fadeOut(150, function() {
389						// remove prompt once invisible
390						$(this).closest('.formError').remove();
391					});
392				});
393			}
394			return this;
395		 },
396		/**
397		* Attachs jQuery.validationEngine to form.submit and field.blur events
398		* Takes an optional params: a list of options
399		* ie. jQuery("#formID1").validationEngine('attach', {promptPosition : "centerRight"});
400		*/
401		attach: function(userOptions) {
402
403			var form = this;
404			var options;
405
406			if(userOptions)
407				options = methods._saveOptions(form, userOptions);
408			else
409				options = form.data('jqv');
410
411			options.validateAttribute = (form.find("[data-validation-engine*=validate]").length) ? "data-validation-engine" : "class";
412			if (options.binded) {
413
414				// delegate fields
415				form.on(options.validationEventTrigger, "["+options.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)", methods._onFieldEvent);
416				form.on("click", "["+options.validateAttribute+"*=validate][type=c
416heckbox],["+options.validateAttribute+"*=validate][type=radio]", methods._onFieldEvent);
417				form.on(options.validationEventTrigger,"["+options.validateAttribute+"*=validate][class*=datepicker]", {"delay": 300}, methods._onFieldEvent);
418			}
419			if (options.autoPositionUpdate) {
420				$(window).bind("resize", {
421					"noAnimation": true,
422					"formElem": form
423				}, methods.updatePromptsPosition);
424			}
425			form.on("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']", methods._submitButtonClick);
426			form.removeData('jqv_submitButton');
427
428			// bind form.submit
429			form.on("submit", methods._onSubmitEvent);
430			return this;
431		},
432		/**
433		* Unregisters any bindings that may point to jQuery.validaitonEngine
434		*/
435		detach: function() {
436
437			var form = this;
438			var options = form.data('jqv');
439
440			// unbind fields
441			form.off(options.validationEventTrigger, "["+options.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)", methods._onFieldEvent);
442			form.off("click", "["+options.validateAttribute+"*=validate][type=checkbox],["+options.validateAttribute+"*=validate][type=radio]", methods._onFieldEvent);
443			form.off(options.validationEventTrigger,"["+options.validateAttribute+"*=validate][class*=datepicker]", methods._onFieldEvent);
444
445			// unbind form.submit
446			form.off("submit", methods._onSubmitEvent);
447			form.removeData('jqv');
448
449			form.off("click", "a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']", methods._submitButtonClick);
450			form.removeData('jqv_submitButton');
451
452			if (options.autoPositionUpdate)
453				$(window).off("resize", methods.updatePromptsPosition);
454
455			return this;
456		},
457		/**
458		* Validates either a form or a list of fields, shows prompts accordingly.
459		* Note: There is no ajax form validation with this method, only field ajax validation are evaluated
460		*
461		* @return true if the form validates, false if it fails
462		*/
463		validate: function(userOptions) {
464			var element = $(this);
465			var valid = null;
466			var options;
467
468			if (element.is("form") || element.hasClass("validationEngineContainer")) {
469				if (element.hasClass('validating')) {
470					// form is already validating.
471					// Should abort old validation and start new one. I don't know how to implement it.
472					return false;
473				} else {
474					element.addClass('validating');
475					if(userOptions)
476						options = methods._saveOptions(element, userOptions);
477					else
478						options = element.data('jqv');
479					var valid = methods._validateFields(this);
480
481					// If the form doesn't validate, clear the 'validating' class before the user has a chance to submit again
482					setTimeout(function(){
483						element.removeClass('validating');
484					}, 100);
485					if (valid && options.onSuccess) {
486						options.onSuccess();
487					} else if (!valid && options.onFailure) {
488						options.onFailure();
489					}
490				}
491			} else if (element.is('form') || element.hasClass('validationEngineContainer')) {
492				element.removeClass('validating');
493			} else {
494				// field validation
495		                var form = element.closest('form, .validationEngineContainer');
496		                options = (form.data('jqv')) ? form.data('jqv') : $.validationEngine.defaults;
497		                valid = methods._validateField(element, options);
498
499		                if (valid && options.onFieldSuccess)
500		                    options.onFieldSuccess();
501		                else if (options.onFieldFailure && options.InvalidFields.length > 0) {
502		                    options.onFieldFailure();
503		                }
504
505		                return !valid;
506			}
507			if(options.onValidationComplete) {
508				// !! ensures that an undefined return is interpreted as return false but allows a onValidationComplete() to possibly return true and have form continue processing
509				return !!options.onValidationComplete(form, valid);
510			}
511			return valid;
512		},
513		/**
514		*  Redraw prompts position, useful when you change the DOM state when validating
515		*/
516		updatePromptsPosition: function(event) {
517
518			if (event && this == window) {
519				var form = event.data.formElem;
520				var noAnimation = event.data.noAnimation;
521			}
522			else
523				var form = $(this.closest('form, .validationEngineContainer'));
524
525			var options = form.data('jqv');
526			// No option, take default one
527			if (!options)
528				options = methods._saveOptions(form, options);
529			form.find('['+options.validateAttribute+'*=validate]').not(":disabled").each(function(){
530				var field = $(this);
531				if (options.prettySelect && field.is(":hidden"))
532				  field = form.find("#" + options.usePrefix + field.attr('id') + options.useSuffix);
533				var prompt = methods._getPrompt(field);
534				var promptText = $(prompt).find(".formErrorContent").html();
535
536				if(prompt)
537					methods._updatePrompt(field, $(prompt), promptText, undefined, false, options, noAnimation);
538			});
539			return this;
540		},
541		/**
542		* Displays a prompt on a element.
543		* Note that the element needs an id!
544		*
545		* @param {String} promptText html text to display type
546		* @param {String} type the type of bubble: 'pass' (green), 'load' (black) anything else (red)
547		* @param {String} possible values topLeft, topRight, bottomLeft, centerRight, bottomRight
548		*/
549		showPrompt: function(promptText, type, promptPosition, showArrow) {
550			var form = this.closest('form, .validationEngineContainer');
551			var options = form.data('jqv');
552			// No option, take default one
553			if(!options)
554				options = methods._saveOptions(this, options);
555			if(promptPosition)
556				options.promptPosition=promptPosition;
557			options.showArrow = showArrow==true;
558
559			methods._showPrompt(this, promptText, type, false, options);
560			return this;
561		},
562		/**
563		* Closes form error prompts, CAN be invidual
564		*/
565		hide: function() {
566			 var form = $(this).closest('form, .validationEngineContainer');
567			 var options = form.data('jqv');
568			 // No option, take default one
569			 if (!options)
570				options = methods._saveOptions(form, options);
571			 var fadeDuration = (options && options.fadeDuration) ? options.fadeDuration : 0.3;
572			 var closingtag;
573
574			 if(form.is("form") || form.hasClass("validationEngineContainer")) {
575				 closingtag = "parentForm"+methods._getClassName($(form).attr("id"));
576			 } else {
577				 closingtag = methods._getClassName($(form).attr("id")) +"formError";
578			 }
579			 $('.'+closingtag).fadeTo(fadeDuration, 0, function() {
580				 $(this).closest('.formError').remove();
581			 });
582			 return this;
583		 },
584		 /**
585		 * Closes all error prompts on the page
586		 */
587		 hideAll: function() {
588			 var form = this;
589			 var options = form.data('jqv');
590			 var duration = options ? options.fadeDuration:300;
591			 $('.formError').fadeTo(duration, 0, function() {
592				 $(this).closest('.formError').remove();
593			 });
594			 return this;
595		 },
596		/**
597		* Typically called when user exists a field using tab or a mouse click, triggers a field
598		* validation
599		*/
600		_onFieldEvent: function(event) {
601			var field = $(this);
602			var form = field.closest('form, .validationEngineContainer');
603			var options = form.data('jqv');
604			// No option, take default one
605			if (!options)
606				options = methods._saveOptions(form, options);
607			options.eventTrigger = "field";
608
609            if (options.notEmpty == true){
610
611                if(field.val().length > 0){
612                    // validate the current field
613                    window.setTimeout(function() {
614                        methods._validateField(field, options);
615                    }, (event.data) ? event.data.delay : 0);
616
617                }
618
619            }else{
620
621                // validate the current field
622                window.setTimeout(function() {
623                    methods._validateField(field, options);
624                }, (event.data) ? event.data.delay : 0);
625
626            }
627
628
629
630
631		},
632		/**
633		* Called when the form is submited, shows prompts accordingly
634		*
635		* @param {jqObject}
636		*            form
637		* @return false if form submission needs to be cancelled
638		*/
639		_onSubmitEvent: function() {
640			var form = $(this);
641			var options = form.data('jqv');
642
643			//check if it is trigger from skipped button
644			if (form.data("jqv_submitButton")){
645				var submitButton = $("#" + form.data("jqv_submitButton"));
646				if (submitButton){
647					if (submitButton.length > 0){
648						if (submitButton.hasClass("validate-skip") || submitButton.attr("data-validation-engine-skip") == "true")
649							return true;
650					}
651				}
652			}
653
654			options.eventTrigger = "submit";
655
656			// validate each field
657			// (- skip field ajax validation, not necessary IF we will perform an ajax form validation)
658			var r=methods._validateFields(form);
659
660			if (r && options.ajaxFormValidation) {
661				methods._validateFormWithAjax(form, options);
662				// cancel form auto-submission - process with async call onAjaxFormComplete
663				return false;
664			}
665
666			if(options.onValidationComplete) {
667				// !! ensures that an undefined return is interpreted as return false but allows a onValidationComplete() to possibly return true and have form continue processing
668				return !!options.onValidationComplete(form, r);
669			}
670			return r;
671		},
672		/**
673		* Return true if the ajax field validations passed so far
674		* @param {Object} options
675		* @return true, is all ajax validation passed so far (remember ajax is async)
676		*/
677		_checkAjaxStatus: function(options) {
678			var status = true;
679			$.each(options.ajaxValidCache, function(key, value) {
680				if (!value) {
681					status = false;
682					// break the each
683					return false;
684				}
685			});
686			return status;
687		},
688
689		/**
690		* Return true if the ajax field is validated
691		* @param {String} fieldid
692		* @param {Object} options
693		* @return true, if validation passed, false if false or doesn't exist
694		*/
695		_checkAjaxFieldStatus: function(fieldid, options) {
696			return options.ajaxValidCache[fieldid] == true;
697		},
698		/**
699		* Validates form fields, shows prompts accordingly
700		*
701		* @param {jqObject}
702		*            form
703		* @param {skipAjaxFieldValidation}
704		*            boolean - when set to true, ajax field validation is skipped, typically used when the submit button is clicked
705		*
706		* @return true if form is valid, false if not, undefined if ajax form validation is done
707		*/
708		_validateFields: function(form) {
709			var options = form.data('jqv');
710
711			// this variable is set to true if an error is found
712			var errorFound = false;
713
714			// Trigger hook, start validation
715			form.trigger("jqv.form.validating");
716			// first, evaluate status of non ajax fields
717			var first_err=null;
718			form.find('['+options.validateAttribute+'*=validate]').not(":disabled").each( function() {
719				var field = $(this);
720				var names = [];
721				if ($.inArray(field.attr('name'), names) < 0) {
722					errorFound |= methods._validateField(field, options);
723					if (errorFound && first_err==null)
724						if (field.is(":hidden") && options.prettySelect)
725							first_err = field = form.find("#" + options.usePrefix + methods._jqSelector(field.attr('id')) + options.useSuffix);
726						else {
727
728							//Check if we need to adjust what element to show the prompt on
729							//and and such scroll to instead
730							if(field.data('jqv-prompt-at') instanceof jQuery ){
731								field = field.data('jqv-prompt-at');
732							} else if(field.data('jqv-prompt-at')) {
733								field = $(field.data('jqv-prompt-at'));
734							}
735							first_err=field;
736						}
737					if (options.doNotShowAllErrosOnSubmit)
738						return false;
739					names.push(field.attr('name'));
740
741					//if option set, stop checking validation rules after one error is found
742					if(options.showOneMessage == true && errorFound){
743						return false;
744					}
745				}
746			});
747
748			// second, check to see if all ajax calls completed ok
749			// errorFound |= !methods._checkAjaxStatus(options);
750
751			// third, check status and scroll the container accordingly
752			form.trigger("jqv.form.result", [errorFound]);
753
754			if (errorFound) {
755				if (options.scroll) {
756					var destination=first_err.offset().top;
757					var fixleft = first_err.offset().left;
758
759					//prompt positioning adjustment support. Usage: positionType:Xshift,Yshift (for ex.: bottomLeft:+20 or bottomLeft:-20,+10)
760					var positionType=options.promptPosition;
761					if (typeof(positionType)=='string' && positionType.indexOf(":")!=-1)
762						positionType=positionType.substring(0,positionType.indexOf(":"));
763
764					if (positionType!="bottomRight" && positionType!="bottomLeft") {
765						var prompt_err= methods._getPrompt(first_err);
766						if (prompt_err) {
767							destination=prompt_err.offset().top;
768						}
769					}
770
771					// Offset the amount the page scrolls by an amount in px to accomodate fixed elements at top of page
772					if (options.scrollOffset) {
773						destination -= options.scrollOffset;
774					}
775
776					// get the position of the first error, there should be at least one, no need to check this
777					//var destination = form.find(".formError:not('.greenPopup'):first").offset().top;
778					if (options.isOverflown) {
779						var overflowDIV = $(options.overflownDIV);
780						if(!overflowDIV.length) return false;
781						var scrollContainerScroll = overflowDIV.scrollTop();
782						var scrollContainerPos = -parseInt(overflowDIV.offset().top);
783
784						destination += scrollContainerScroll + scrollContainerPos - 5;
785						var scrollContainer = $(options.overflownDIV).filter(":not(:animated)");
786
787						scrollContainer.animate({ scrollTop: destination }, 1100, function(){
788							if(options.focusFirstField) first_err.focus();
789						});
790
791					} else {
792						$("html, body").animate({
793							scrollTop: destination
794						}, 1100, function(){
795							if(options.focusFirstField) first_err.focus();
796						});
797						$("html, body").animate({scrollLeft: fixleft},1100)
798					}
799
800				} else if(options.focusFirstField)
801					first_err.focus();
802				return false;
803			}
804			return true;
805		},
806		/**
807		* This method is called to perform an ajax form validation.
808		* During this process all the (field, value) pairs are sent to the server which returns a list of invalid fields or true
809		*
810		* @param {jqObject} form
811		* @param {Map} options
812		*/
813		_validateFormWithAjax: function(form, options) {
814
815			var data = form.serialize();
816									var type = (options.ajaxFormValidationMethod) ? options.ajaxFormValidationMethod : "GET";
817			var url = (options.ajaxFormValidationURL) ? options.ajaxFormValidationURL : form.attr("action");
818									var dataType = (options.dataType) ? options.dataType : "json";
819			$.ajax({
820				type: type,
821				url: url,
822				cache: false,
823				dataType: dataType,
824				data: data,
825				form: form,
826				methods: methods,
827				options: options,
828				beforeSend: function() {
829					return options.onBeforeAjaxFormValidation(form, options);
830				},
831				error: function(data, transport) {
832					if (options.onFailure) {
833						options.onFailure(data, transport);
834					} else {
835						methods._ajaxError(data, transport);
836					}
837				},
838				success: function(json) {
839					if ((dataType == "json") && (json !== true)) {
840						// getting to this case doesn't necessary means that the form is invalid
841						// the server may return green or closing prompt actions
842						// this flag helps figuring it out
843						var errorInForm=false;
844						for (var i = 0; i < json.length; i++) {
845							var value = json[i];
846
847							var errorFieldId = value[0];
848							var errorField = $($("#" + errorFieldId)[0]);
849
850							// make sure we found the element
851							if (errorField.length == 1) {
852
853								// promptText or selector
854								var msg = value[2];
855								// if the field is valid
856								if (value[1] == true) {
857
858									if (msg == ""  || !msg){
859										// if for some reason, status==true and error="", just close the prompt
860										methods._closePrompt(errorField);
861									} else {
862										// the field is valid, but we are displaying a green prompt
863										if (options.allrules[msg]) {
864											var txt = options.allrules[msg].alertTextOk;
865											if (txt)
866												msg = txt;
867										}
868										if (options.showPrompts) methods._showPrompt(errorField, msg, "pass", false, options, true);
869									}
870								} else {
871									// the field is invalid, show the red error prompt
872									errorInForm|=true;
873									if (options.allrules[msg]) {
874										var txt = options.allrules[msg].alertText;
875										if (txt)
876											msg = txt;
877									}
878									if(options.showPrompts) methods._showPrompt(errorField, msg, "", false, options, true);
879								}
880							}
881						}
882						options.onAjaxFormComplete(!errorInForm, form, json, options);
883					} else
884						options.onAjaxFormComplete(true, form, json, options);
885
886				}
887			});
888
889		},
890		/**
891		* Validates field, shows prompts accordingly
892		*
893		* @param {jqObject}
894		*            field
895		* @param {Array[String]}
896		*            field's validation rules
897		* @param {Map}
898		*            user options
899		* @return false if field is valid (It is inversed for *fields*, it return false on validate and true on errors.)
900		*/
901		_validateField: function(field, options, skipAjaxValidation) {
902			if (!field.attr("id")) {
903				field.attr("id", "form-validation-field-" + $.validationEngine.fieldIdCounter);
904				++$.validationEngine.fieldIdCounter;
905			}
906
907			if(field.hasClass(options.ignoreFieldsWithClass))
908				return false;
909
910           if (!options.validateNonVisibleFields && (field.is(":hidden") && !options.prettySelect || field.parent().is(":hidden")))
911				return false;
912
913			var rulesParsing = field.attr(options.validateAttribute);
914			var getRules = /validate\[(.*)\]/.exec(rulesParsing);
915
916			if (!getRules)
917				return false;
918			var str = getRules[1];
919			var rules = str.split(/\[|,|\]/);
920
921			// true if we ran the ajax validation, tells the logic to stop messing with prompts
922			var isAjaxValidator = false;
923			var fieldName = field.attr("name");
924			var promptText = "";
925			var promptType = "";
926			var required = false;
927			var limitErrors = false;
928			options.isError = false;
929			options.showArrow = options.showArrow ==true;
930
931			// If the programmer wants to limit the amount of error messages per field,
932			if (options.maxErrorsPerField > 0) {
933				limitErrors = true;
934			}
935
936			var form = $(field.closest("form, .validationEngineContainer"));
937			// Fix for adding spaces in the rules
938			for (var i = 0; i < rules.length; i++) {
939				rules[i] = rules[i].toString().replace(" ", "");//.toString to worked on IE8
940				// Remove any parsing errors
941				if (rules[i] === '') {
942					delete rules[i];
943				}
944			}
945
946			for (var i = 0, field_errors = 0; i < rules.length; i++) {
947
948				// If we are limiting errors, and have hit the max, break
949				if (limitErrors && field_errors >= options.maxErrorsPerField) {
950					// If we haven't hit a required yet, check to see if there is one in the validation rules for this
951					// field and that it's index is greater or equal to our current index
952					if (!required) {
953						var have_required = $.inArray('required', rules);
954						required = (have_required != -1 &&  have_required >= i);
955					}
956					break;
957				}
958
959
960				var errorMsg = undefined;
961				switch (rules[i]) {
962
963					case "required":
964						required = true;
965						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._required);
966						break;
967					case "custom":
968						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._custom);
969						break;
970					case "groupRequired":
971						// Check is its the first of group, if not, reload validation with first field
972						// AND continue normal validation on present field
973						var classGroup = "["+options.validateAttribute+"*=" +rules[i + 1] +"]";
974						var firstOfGroup = form.find(classGroup).eq(0);
975						if(firstOfGroup[0] != field[0]){
976
977							methods._validateField(firstOfGroup, options, skipAjaxValidation);
978							options.showArrow = true;
979
980						}
981						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._groupRequired);
982						if(errorMsg)  required = true;
983						options.showArrow = false;
984						break;
985					case "ajax":
986						// AJAX defaults to returning it's loading message
987						errorMsg = methods._ajax(field, rules, i, options);
988						if (errorMsg) {
989							promptType = "load";
990						}
991						break;
992					case "minSize":
993						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._minSize);
994						break;
995					case "maxSize":
996						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._maxSize);
997						break;
998					case "min":
999						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._min);
1000						break;
1001					case "max":
1002						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._max);
1003						break;
1004					case "past":
1005						errorMsg = methods._getErrorMessage(form, field,rules[i], rules, i, options, methods._past);
1006						break;
1007					case "future":
1008						errorMsg = methods._getErrorMessage(form, field,rules[i], rules, i, options, methods._future);
1009						break;
1010					case "dateRange":
1011						var classGroup = "["+options.validateAttribute+"*=" + rules[i + 1] + "]";
1012						options.firstOfGroup = form.find(classGroup).eq(0);
1013						options.secondOfGroup = form.find(classGroup).eq(1);
1014
1015						//if one entry out of the pair has value then proceed to run through validation
1016						if (options.firstOfGroup[0].value || options.secondOfGroup[0].value) {
1017							errorMsg = methods._getErrorMessage(form, field,rules[i], rules, i, options, methods._dateRange);
1018						}
1019						if (errorMsg) required = true;
1020						options.showArrow = false;
1021						break;
1022
1023					case "dateTimeRange":
1024						var classGroup = "["+options.validateAttribute+"*=" + rules[i + 1] + "]";
1025						options.firstOfGroup = form.find(classGroup).eq(0);
1026						options.secondOfGroup = form.find(classGroup).eq(1);
1027
1028						//if one entry out of the pair has value then proceed to run through validation
1029						if (options.firstOfGroup[0].value || options.secondOfGroup[0].value) {
1030							errorMsg = methods._getErrorMessage(form, field,rules[i], rules, i, options, methods._dateTimeRange);
1031						}
1032						if (errorMsg) required = true;
1033						options.showArrow = false;
1034						break;
1035					case "maxCheckbox":
1036						field = $(form.find("input[name='" + fieldName + "']"));
1037						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._maxCheckbox);
1038						break;
1039					case "minCheckbox":
1040						field = $(form.find("input[name='" + fieldName + "']"));
1041						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._minCheckbox);
1042						break;
1043					case "equals":
1044						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._equals);
1045						break;
1046					case "funcCall":
1047						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._funcCall);
1048						break;
1049					case "creditCard":
1050						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._creditCard);
1051						break;
1052					case "condRequired":
1053						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._condRequired);
1054						if (errorMsg !== undefined) {
1055							required = true;
1056						}
1057						break;
1058					case "funcCallRequired":
1059						errorMsg = methods._getErrorMessage(form, field, rules[i], rules, i, options, methods._funcCallRequired);
1060						if (errorMsg !== undefined) {
1061							required = true;
1062						}
1063						break;
1064
1065					default:
1066				}
1067
1068				var end_validation = false;
1069
1070				// If we were passed back an message object, check what the status was to determine what to do
1071				if (typeof errorMsg == "object") {
1072					switch (errorMsg.status) {
1073						case "_break":
1074							end_validation = true;
1075							break;
1076						// If we have an error message, set errorMsg to the error message
1077						case "_error":
1078							errorMsg = errorMsg.message;
1079							break;
1080						// If we want to throw an error, but not show a prompt, return early with true
1081						case "_error_no_prompt":
1082							return true;
1083							break;
1084						// Anything else we continue on
1085						default:
1086							break;
1087					}
1088				}
1089
1090				//funcCallRequired, first in rules, and has error, skip anything else
1091				if( i==0 && str.indexOf('funcCallRequired')==0 && errorMsg !== undefined ){
1092					if(promptText != '') {
1093						promptText += "<br/>";
1094					}
1095					promptText += errorMsg;
1096					options.isError=true;
1097					field_errors++;
1098					end_validation=true;
1099				}
1100
1101				// If it has been specified that validation should end now, break
1102				if (end_validation) {
1103					break;
1104				}
1105
1106				// If we have a string, that means that we have an error, so add it to the error message.
1107				if (typeof errorMsg == 'string') {
1108					if(promptText != '') {
1109						promptText += "<br/>";
1110					}
1111					promptText += errorMsg;
1112					options.isError = true;
1113					field_errors++;
1114				}
1115			}
1116			// If the rules required is not added, an empty field is not validated
1117			//the 3rd condition is added so that even empty password fields should be equal
1118			//otherwise if one is filled and another left empty, the "equal" condition would fail
1119			//which does not make any sense
1120			if(!required && !(field.val()) && field.val().length < 1 && $.inArray('equals', rules) < 0) options.isError = false;
1121
1122			// Hack for radio/checkbox group button, the validation go into the
1123			// first radio/checkbox of the group
1124			var fieldType = field.prop("type");
1125			var positionType=field.data("promptPosition") || options.promptPosition;
1126
1127			if ((fieldType == "radio" || fieldType == "checkbox") && form.find("input[name='" + fieldName + "']").length > 1) {
1128				if(positionType === 'inline') {
1129					field = $(form.find("input[name='" + fieldName + "'][type!=hidden]:last"));
1130				} else {
1131				field = $(form.find("input[name='" + fieldName + "'][type!=hidden]:first"));
1132				}
1133				options.showArrow = options.showArrowOnRadioAndCheckbox;
1134			}
1135
1136			if(field.is(":hidden") && options.prettySelect) {
1137				field = form.find("#" + options.usePrefix + methods._jqSelector(field.attr('id')) + options.useSuffix);
1138			}
1139
1140			if (options.isError && options.showPrompts){
1141				methods._showPrompt(field, promptText, promptType, false, options);
1142			}else{
1143				if (!isAjaxValidator) methods._closePrompt(field);
1144			}
1145
1146			if (!isAjaxValidator) {
1147				field.trigger("jqv.field.result", [field, options.isError, promptText]);
1148			}
1149
1150			/* Record error */
1151			var errindex = $.inArray(field[0], options.InvalidFields);
1152			if (errindex == -1) {
1153				if (options.isError)
1154				options.InvalidFields.push(field[0]);
1155			} else if (!options.isError) {
1156				options.InvalidFields.splice(errindex, 1);
1157			}
1158
1159			methods._handleStatusCssClasses(field, options);
1160
1161			/* run callback function for each field */
1162			if (options.isError && options.onFieldFailure)
1163				options.onFieldFailure(field);
1164
1165			if (!options.isError && options.onFieldSuccess)
1166				options.onFieldSuccess(field);
1167
1168			return options.isError;
1169		},
1170		/**
1171		* Handling css classes of fields indicating result of validation
1172		*
1173		* @param {jqObject}
1174		*            field
1175		* @param {Array[String]}
1176		*            field's validation rules
1177		* @private
1178		*/
1179		_handleStatusCssClasses: function(field, options) {
1180			/* remove all classes */
1181			if(options.addSuccessCssClassToField)
1182				field.removeClass(options.addSuccessCssClassToField);
1183
1184			if(options.addFailureCssClassToField)
1185				field.removeClass(options.addFailureCssClassToField);
1186
1187			/* Add classes */
1188			if (options.addSuccessCssClassToField && !options.isError)
1189				field.addClass(options.addSuccessCssClassToField);
1190
1191			if (options.addFailureCssClassToField && options.isError)
1192				field.addClass(options.addFailureCssClassToField);
1193		},
1194
1195		 /********************
1196		  * _getErrorMessage
1197		  *
1198		  * @param form
1199		  * @param field
1200		  * @param rule
1201		  * @param rules
1202		  * @param i
1203		  * @param options
1204		  * @param originalValidationMethod
1205		  * @return {*}
1206		  * @private
1207		  */
1208		 _getErrorMessage:function (form, field, rule, rules, i, options, originalValidationMethod) {
1209			 // If we are using the custon validation type, build the index for the rule.
1210			 // Otherwise if we are doing a function call, make the call and return the object
1211			 // that is passed back.
1212	 		 var rule_index = jQuery.inArray(rule, rules);
1213			 if (rule === "custom" || rule === "funcCall" || rule === "funcCallRequired") {
1214				 var custom_validation_type = rules[rule_index + 1];
1215				 rule = rule + "[" + custom_validation_type + "]";
1216				 // Delete the rule from the rules array so that it doesn't try to call the
1217			    // same rule over again
1218			    delete(rules[rule_index]);
1219			 }
1220			 // Change the rule to the composite rule, if it was different from the original
1221			 var alteredRule = rule;
1222
1223
1224			 var element_classes = (field.attr("data-validation-engine")) ? field.attr("data-validation-engine") : field.attr("class");
1225			 var element_classes_array = element_classes.split(" ");
1226
1227			 // Call the original validation method. If we are dealing with dates or checkboxes, also pass the form
1228			 var errorMsg;
1229			 if (rule == "future" || rule == "past"  || rule == "maxCheckbox" || rule == "minCheckbox") {
1230				 errorMsg = originalValidationMethod(form, field, rules, i, options);
1231			 } else {
1232				 errorMsg = originalValidationMethod(field, rules, i, options);
1233			 }
1234
1235			 // If the original validation method returned an error and we have a custom error message,
1236			 // return the custom message instead. Otherwise return the original error message.
1237			 if (errorMsg != undefined) {
1238				 var custom_message = methods._getCustomErrorMessage($(field), element_classes_array, alteredRule, options);
1239				 if (custom_message) errorMsg = custom_message;
1240			 }
1241			 return errorMsg;
1242
1243		 },
1244		 _getCustomErrorMessage:function (field, classes, rule, options) {
1245			var custom_message = false;
1246			var validityProp = /^custom\[.*\]$/.test(rule) ? methods._validityProp["custom"] : methods._validityProp[rule];
1247			 // If there is a validityProp for this rule, check to see if the field has an attribute for it
1248			if (validityProp != undefined) {
1249				custom_message = field.attr("data-errormessage-"+validityProp);
1250				// If there was an error message for it, return the message
1251				if (custom_message != undefined)
1252					return custom_message;
1253			}
1254			custom_message = field.attr("data-errormessage");
1255			 // If there is an inline custom error message, return it
1256			if (custom_message != undefined)
1257				return custom_message;
1258			var id = '#' + field.attr("id");
1259			// If we have custom messages for the element's id, get the message for the rule from the id.
1260			// Otherwise, if we have custom messages for the element's classes, use the first class message we find instead.
1261			if (typeof options.custom_error_messages[id] != "undefined" &&
1262				typeof options.custom_error_messages[id][rule] != "undefined" ) {
1263						  custom_message = options.custom_error_messages[id][rule]['message'];
1264			} else if (classes.length > 0) {
1265				for (var i = 0; i < classes.length && classes.length > 0; i++) {
1266					 var element_class = "." + classes[i];
1267					if (typeof options.custom_error_messages[element_class] != "undefined" &&
1268						typeof options.custom_error_messages[element_class][rule] != "undefined") {
1269							custom_message = options.custom_error_messages[element_class][rule]['message'];
1270							break;
1271					}
1272				}
1273			}
1274			if (!custom_message &&
1275				typeof options.custom_error_messages[rule] != "undefined" &&
1276				typeof options.custom_error_messages[rule]['message'] != "undefined"){
1277					 custom_message = options.custom_error_messages[rule]['message'];
1278			 }
1279			 return custom_message;
1280		 },
1281		 _validityProp: {
1282			 "required": "value-missing",
1283			 "custom": "custom-error",
1284			 "groupRequired": "value-missing",
1285			 "ajax": "custom-error",
1286			 "minSize": "range-underflow",
1287			 "maxSize": "range-overflow",
1288			 "min": "range-underflow",
1289			 "max": "range-overflow",
1290			 "past": "type-mismatch",
1291			 "future": "type-mismatch",
1292			 "dateRange": "type-mismatch",
1293			 "dateTimeRange": "type-mismatch",
1294			 "maxCheckbox": "range-overflow",
1295			 "minCheckbox": "range-underflow",
1296			 "equals": "pattern-mismatch",
1297			 "funcCall": "custom-error",
1298			 "funcCallRequired": "custom-error",
1299			 "creditCard": "pattern-mismatch",
1300			 "condRequired": "value-missing"
1301		 },
1302		/**
1303		* Required validation
1304		*
1305		* @param {jqObject} field
1306		* @param {Array[String]} rules
1307		* @param {int} i rules index
1308		* @param {Map}
1309		*            user options
1310		* @param {bool} condRequired flag when method is used for internal purpose in condRequired check
1311		* @return an error string if validation failed
1312		*/
1313		_required: function(field, rules, i, options, condRequired) {
1314			switch (field.prop("type")) {
1315				case "radio":
1316				case "checkbox":
1317					// new validation style to only check dependent field
1318					if (condRequired) {
1319						if (!field.prop('checked')) {
1320							return options.allrules[rules[i]].alertTextCheckboxMultiple;
1321						}
1322						break;
1323					}
1324					// old validation style
1325					var form = field.closest("form, .validationEngineContainer");
1326					var name = field.attr("name");
1327					if (form.find("input[name='" + name + "']:checked").length == 0) {
1328						if (form.find("input[name='" + name + "']:visible").length == 1)
1329							return options.allrules[rules[i]].alertTextCheckboxe;
1330						else
1331							return options.allrules[rules[i]].alertTextCheckboxMultiple;
1332					}
1333					break;
1334				case "text":
1335				case "password":
1336				case "textarea":
1337				case "file":
1338				case "select-one":
1339				case "select-multiple":
1340				default:
1341					var field_val      = $.trim( field.val()                               );
1342					var dv_placeholder = $.trim( field.attr("data-validation-placeholder") );
1343					var placeholder    = $.trim( field.attr("placeholder")                 );
1344					if (
1345						   ( !field_val                                    )
1346						|| ( dv_placeholder && field_val == dv_placeholder )
1347						|| ( placeholder    && field_val == placeholder    )
1348					) {
1349						return options.allrules[rules[i]].alertText;
1350					}
1351					break;
1352			}
1353		},
1354		/**
1355		* Validate that 1 from the group field is required
1356		*
1357		* @param {jqObject} field
1358		* @param {Array[String]} rules
1359		* @param {int} i rules index
1360		* @param {Map}
1361		*            user options
1362		* @return an error string if validation failed
1363		*/
1364		_groupRequired: function(field, rules, i, options) {
1365			var classGroup = "["+options.validateAttribute+"*=" +rules[i + 1] +"]";
1366			var isValid = false;
1367			// Check all fields from the group
1368			field.closest("form, .validationEngineContainer").find(classGroup).each(function(){
1369				if(!methods._required($(this), rules, i, options)){
1370					isValid = true;
1371					return false;
1372				}
1373			});
1374
1375			if(!isValid) {
1376		  return options.allrules[rules[i]].alertText;
1377		}
1378		},
1379		/**
1380		* Validate rules
1381		*
1382		* @param {jqObject} field
1383		* @param {Array[String]} rules
1384		* @param {int} i rules index
1385		* @param {Map}
1386		*            user options
1387		* @return an error string if validation failed
1388		*/
1389		_custom: function(field, rules, i, options) {
1390			var customRule = rules[i + 1];
1391			var rule = options.allrules[customRule];
1392			var fn;
1393			if(!rule) {
1394				alert("jqv:custom rule not found - "+customRule);
1395				return;
1396			}
1397
1398			if(rule["regex"]) {
1399				 var ex=rule.regex;
1400					if(!ex) {
1401						alert("jqv:custom regex not found - "+customRule);
1402						return;
1403					}
1404					var pattern = new RegExp(ex);
1405
1406					if (!pattern.test(field.val())) return options.allrules[customRule].alertText;
1407
1408			} else if(rule["func"]) {
1409				fn = rule["func"];
1410
1411				if (typeof(fn) !== "function") {
1412					alert("jqv:custom parameter 'function' is no function - "+customRule);
1413						return;
1414				}
1415
1416				if (!fn(field, rules, i, options))
1417					return options.allrules[customRule].alertText;
1418			} else {
1419				alert("jqv:custom type not allowed "+customRule);
1420					return;
1421			}
1422		},
1423		/**
1424		* Validate custom function outside of the engine scope
1425		*
1426		* @param {jqObject} field
1427		* @param {Array[String]} rules
1428		* @param {int} i rules index
1429		* @param {Map}
1430		*            user options
1431		* @return an error string if validation failed
1432		*/
1433		_funcCall: function(field, rules, i, options) {
1434			var functionName = rules[i + 1];
1435			var fn;
1436			if(functionName.indexOf('.') >-1)
1437			{
1438				var namespaces = functionName.split('.');
1439				var scope = window;
1440				while(namespaces.length)
1441				{
1442					scope = scope[namespaces.shift()];
1443				}
1444				fn = scope;
1445			}
1446			else
1447				fn = window[functionName] || options.customFunctions[functionName];
1448			if (typeof(fn) == 'function')
1449				return fn(field, rules, i, options);
1450
1451		},
1452		_funcCallRequired: function(field, rules, i, options) {
1453			return methods._funcCall(field,rules,i,options);
1454		},
1455		/**
1456		* Field match
1457		*
1458		* @param {jqObject} field
1459		* @param {Array[String]} rules
1460		* @param {int} i rules index
1461		* @param {Map}
1462		*            user options
1463		* @return an error string if validation failed
1464		*/
1465		_equals: function(field, rules, i, options) {
1466			var equalsField = rules[i + 1];
1467
1468			if (field.val() != $("#" + equalsField).val())
1469				return options.allrules.equals.alertText;
1470		},
1471		/**
1472		* Check the maximum size (in characters)
1473		*
1474		* @param {jqObject} field
1475		* @param {Array[String]} rules
1476		* @param {int} i rules index
1477		* @param {Map}
1478		*            user options
1479		* @return an error string if validation failed
1480		*/
1481		_maxSize: function(field, rules, i, options) {
1482			var max = rules[i + 1];
1483			var len = field.val().length;
1484
1485			if (len > max) {
1486				var rule = options.allrules.maxSize;
1487				return rule.alertText + max + rule.alertText2;
1488			}
1489		},
1490		/**
1491		* Check the minimum size (in characters)
1492		*
1493		* @param {jqObject} field
1494		* @param {Array[String]} rules
1495		* @param {int} i rules index
1496		* @param {Map}
1497		*            user options
1498		* @return an error string if validation failed
1499		*/
1500		_minSize: function(field, rules, i, options) {
1501			var min = rules[i + 1];
1502			var len = field.val().length;
1503
1504			if (len < min) {
1505				var rule = options.allrules.minSize;
1506				return rule.alertText + min + rule.alertText2;
1507			}
1508		},
1509		/**
1510		* Check number minimum value
1511		*
1512		* @param {jqObject} field
1513		* @param {Array[String]} rules
1514		* @param {int} i rules index
1515		* @param {Map}
1516		*            user options
1517		* @return an error string if validation failed
1518		*/
1519		_min: function(field, rules, i, options) {
1520			var min = parseFloat(rules[i + 1]);
1521			var len = parseFloat(field.val());
1522
1523			if (len < min) {
1524				var rule = options.allrules.min;
1525				if (rule.alertText2) return rule.alertText + min + rule.alertText2;
1526				return rule.alertText + min;
1527			}
1528		},
1529		/**
1530		* Check number maximum value
1531		*
1532		* @param {jqObject} field
1533		* @param {Array[String]} rules
1534		* @param {int} i rules index
1535		* @param {Map}
1536		*            user options
1537		* @return an error string if validation failed
1538		*/
1539		_max: function(field, rules, i, options) {
1540			var max = parseFloat(rules[i + 1]);
1541			var len = parseFloat(field.val());
1542
1543			if (len >max ) {
1544				var rule = options.allrules.max;
1545				if (rule.alertText2) return rule.alertText + max + rule.alertText2;
1546				//orefalo: to review, also do the translations
1547				return rule.alertText + max;
1548			}
1549		},
1550		/**
1551		* Checks date is in the past
1552		*
1553		* @param {jqObject} field
1554		* @param {Array[String]} rules
1555		* @param {int} i rules index
1556		* @param {Map}
1557		*            user options
1558		* @return an error string if validation failed
1559		*/
1560		_past: function(form, field, rules, i, options) {
1561
1562			var p=rules[i + 1];
1563			var fieldAlt = $(form.find("*[name='" + p.replace(/^#+/, '') + "']"));
1564			var pdate;
1565
1566			if (p.toLowerCase() == "now") {
1567				pdate = new Date();
1568			} else if (undefined != fieldAlt.val()) {
1569				if (fieldAlt.is(":disabled"))
1570					return;
1571				pdate = methods._parseDate(fieldAlt.val());
1572			} else {
1573				pdate = methods._parseDate(p);
1574			}
1575			var vdate = methods._parseDate(field.val());
1576
1577			if (vdate > pdate ) {
1578				var rule = options.allrules.past;
1579				if (rule.alertText2) return rule.alertText + methods._dateToString(pdate) + rule.alertText2;
1580				return rule.alertText + methods._dateToString(pdate);
1581			}
1582		},
1583		/**
1584		* Checks date is in the future
1585		*
1586		* @param {jqObject} field
1587		* @param {Array[String]} rules
1588		* @param {int} i rules index
1589		* @param {Map}
1590		*            user options
1591		* @return an error string if validation failed
1592		*/
1593		_future: function(form, field, rules, i, options) {
1594
1595			var p=rules[i + 1];
1596			var fieldAlt = $(form.find("*[name='" + p.replace(/^#+/, '') + "']"));
1597			var pdate;
1598
1599			if (p.toLowerCase() == "now") {
1600				pdate = new Date();
1601			} else if (undefined != fieldAlt.val()) {
1602				if (fieldAlt.is(":disabled"))
1603					return;
1604				pdate = methods._parseDate(fieldAlt.val());
1605			} else {
1606				pdate = methods._parseDate(p);
1607			}
1608			var vdate = methods._parseDate(field.val());
1609
1610			if (vdate < pdate ) {
1611				var rule = options.allrules.future;
1612				if (rule.alertText2)
1613					return rule.alertText + methods._dateToString(pdate) + rule.alertText2;
1614				return rule.alertText + methods._dateToString(pdate);
1615			}
1616		},
1617		/**
1618		* Checks if valid date
1619		*
1620		* @param {string} date string
1621		* @return a bool based on determination of valid date
1622		*/
1623		_isDate: function (value) {
1624			var dateRegEx = new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?
1624:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/);
1625			return dateRegEx.test(value);
1626		},
1627		/**
1628		* Checks if valid date time
1629		*
1630		* @param {string} date string
1631		* @return a bool based on determination of valid date time
1632		*/
1633		_isDateTime: function (value){
1634			var dateTimeRegEx = new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/);
1635			return dateTimeRegEx.test(value);
1636		},
1637		//Checks if the start date is before the end date
1638		//returns true if end is later than start
1639		_dateCompare: function (start, end) {
1640			return (new Date(start.toString()) < new Date(end.toString()));
1641		},
1642		/**
1643		* Checks date range
1644		*
1645		* @param {jqObject} first field name
1646		* @param {jqObject} second field name
1647		* @return an error string if validation failed
1648		*/
1649		_dateRange: function (field, rules, i, options) {
1650			//are not both populated
1651			if ((!options.firstOfGroup[0].value && options.secondOfGroup[0].value) || (options.firstOfGroup[0].value && !options.secondOfGroup[0].value)) {
1652				return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
1653			}
1654
1655			//are not both dates
1656			if (!methods._isDate(options.firstOfGroup[0].value) || !methods._isDate(options.secondOfGroup[0].value)) {
1657				return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
1658			}
1659
1660			//are both dates but range is off
1661			if (!methods._dateCompare(options.firstOfGroup[0].value, options.secondOfGroup[0].value)) {
1662				return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
1663			}
1664		},
1665		/**
1666		* Checks date time range
1667		*
1668		* @param {jqObject} first field name
1669		* @param {jqObject} second field name
1670		* @return an error string if validation failed
1671		*/
1672		_dateTimeRange: function (field, rules, i, options) {
1673			//are not both populated
1674			if ((!options.firstOfGroup[0].value && options.secondOfGroup[0].value) || (options.firstOfGroup[0].value && !options.secondOfGroup[0].value)) {
1675				return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
1676			}
1677			//are not both dates
1678			if (!methods._isDateTime(options.firstOfGroup[0].value) || !methods._isDateTime(options.secondOfGroup[0].value)) {
1679				return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
1680			}
1681			//are both dates but range is off
1682			if (!methods._dateCompare(options.firstOfGroup[0].value, options.secondOfGroup[0].value)) {
1683				return options.allrules[rules[i]].alertText + options.allrules[rules[i]].alertText2;
1684			}
1685		},
1686		/**
1687		* Max number of checkbox selected
1688		*
1689		* @param {jqObject} field
1690		* @param {Array[String]} rules
1691		* @param {int} i rules index
1692		* @param {Map}
1693		*            user options
1694		* @return an error string if validation failed
1695		*/
1696		_maxCheckbox: function(form, field, rules, i, options) {
1697
1698			var nbCheck = rules[i + 1];
1699			var groupname = field.attr("name");
1700			var groupSize = form.find("input[name='" + groupname + "']:checked").length;
1701			if (groupSize > nbCheck) {
1702				options.showArrow = false;
1703				if (options.allrules.maxCheckbox.alertText2)
1704					 return options.allrules.maxCheckbox.alertText + " " + nbCheck + " " + options.allrules.maxCheckbox.alertText2;
1705				return options.allrules.maxCheckbox.alertText;
1706			}
1707		},
1708		/**
1709		* Min number of checkbox selected
1710		*
1711		* @param {jqObject} field
1712		* @param {Array[String]} rules
1713		* @param {int} i rules index
1714		* @param {Map}
1715		*            user options
1716		* @return an error string if validation failed
1717		*/
1718		_minCheckbox: function(form, field, rules, i, options) {
1719
1720			var nbCheck = rules[i + 1];
1721			var groupname = field.attr("name");
1722			var groupSize = form.find("input[name='" + groupname + "']:checked").length;
1723			if (groupSize < nbCheck) {
1724				options.showArrow = false;
1725				return options.allrules.minCheckbox.alertText + " " + nbCheck + " " + options.allrules.minCheckbox.alertText2;
1726			}
1727		},
1728		/**
1729		* Checks that it is a valid credit card number according to the
1730		* Luhn checksum algorithm.
1731		*
1732		* @param {jqObject} field
1733		* @param {Array[String]} rules
1734		* @param {int} i rules index
1735		* @param {Map}
1736		*            user options
1737		* @return an error string if validation failed
1738		*/
1739		_creditCard: function(field, rules, i, options) {
1740			//spaces and dashes may be valid characters, but must be stripped to calculate the checksum.
1741			var valid = false, cardNumber = field.val().replace(/ +/g, '').replace(/-+/g, '');
1742
1743			var numDigits = cardNumber.length;
1744			if (numDigits >= 14 && numDigits <= 16 && parseInt(cardNumber) > 0) {
1745
1746				var sum = 0, i = numDigits - 1, pos = 1, digit, luhn = new String();
1747				do {
1748					digit = parseInt(cardNumber.charAt(i));
1749					luhn += (pos++ % 2 == 0) ? digit * 2 : digit;
1750				} while (--i >= 0)
1751
1752				for (i = 0; i < luhn.length; i++) {
1753					sum += parseInt(luhn.charAt(i));
1754				}
1755				valid = sum % 10 == 0;
1756			}
1757			if (!valid) return options.allrules.creditCard.alertText;
1758		},
1759		/**
1760		* Ajax field validation
1761		*
1762		* @param {jqObject} field
1763		* @param {Array[String]} rules
1764		* @param {int} i rules index
1765		* @param {Map}
1766		*            user options
1767		* @return nothing! the ajax validator handles the prompts itself
1768		*/
1769		 _ajax: function(field, rules, i, options) {
1770
1771			 var errorSelector = rules[i + 1];
1772			 var rule = options.allrules[errorSelector];
1773			 var extraData = rule.extraData;
1774			 var extraDataDynamic = rule.extraDataDynamic;
1775			 var data = {
1776				"fieldId" : field.attr("id"),
1777				"fieldValue" : field.val()
1778			 };
1779
1780			 if (typeof extraData === "object") {
1781				$.extend(data, extraData);
1782			 } else if (typeof extraData === "string") {
1783				var tempData = extraData.split("&");
1784				for(var i = 0; i < tempData.length; i++) {
1785					var values = tempData[i].split("=");
1786					if (values[0] && values[0]) {
1787						data[values[0]] = values[1];
1788					}
1789				}
1790			 }
1791
1792			 if (extraDataDynamic) {
1793				 var tmpData = [];
1794				 var domIds = String(extraDataDynamic).split(",");
1795				 for (var i = 0; i < domIds.length; i++) {
1796					 var id = domIds[i];
1797					 if ($(id).length) {
1798						 var inputValue = field.closest("form, .validationEngineContainer").find(id).val();
1799						 var keyValue = id.replace('#', '') + '=' + escape(inputValue);
1800						 data[id.replace('#', '')] = inputValue;
1801					 }
1802				 }
1803			 }
1804
1805			 // If a field change event triggered this we want to clear the cache for this ID
1806			 if (options.eventTrigger == "field") {
1807				delete(options.ajaxValidCache[field.attr("id")]);
1808			 }
1809
1810			 // If there is an error or if the the field is already validated, do not re-execute AJAX
1811			 if (!options.isError && !methods._checkAjaxFieldStatus(field.attr("id"), options)) {
1812				 $.ajax({
1813					 type: options.ajaxFormValidationMethod,
1814					 url: rule.url,
1815					 cache: false,
1816					 dataType: "json",
1817					 data: data,
1818					 field: field,
1819					 rule: rule,
1820					 methods: methods,
1821					 options: options,
1822					 beforeSend: function() {},
1823					 error: function(data, transport) {
1824						if (options.onFailure) {
1825							options.onFailure(data, transport);
1826						} else {
1827							methods._ajaxError(data, transport);
1828						}
1829					 },
1830					 success: function(json) {
1831
1832						 // asynchronously called on success, data is the json answer from the server
1833						 var errorFieldId = json[0];
1834						 //var errorField = $($("#" + errorFieldId)[0]);
1835						 var errorField = $("#"+ errorFieldId).eq(0);
1836
1837						 // make sure we found the element
1838						 if (errorField.length == 1) {
1839							 var status = json[1];
1840							 // read the optional msg from the server
1841							 var msg = json[2];
1842							 if (!status) {
1843								 // Houston we got a problem - display an red prompt
1844								 options.ajaxValidCache[errorFieldId] = false;
1845								 options.isError = true;
1846
1847								 // resolve the msg prompt
1848								 if(msg) {
1849									 if (options.allrules[msg]) {
1850										 var txt = options.allrules[msg].alertText;
1851										 if (txt) {
1852											msg = txt;
1853							}
1854									 }
1855								 }
1856								 else
1857									msg = rule.alertText;
1858
1859								 if (options.showPrompts) methods._showPrompt(errorField, msg, "", true, options);
1860							 } else {
1861								 options.ajaxValidCache[errorFieldId] = true;
1862
1863								 // resolves the msg prompt
1864								 if(msg) {
1865									 if (options.allrules[msg]) {
1866										 var txt = options.allrules[msg].alertTextOk;
1867										 if (txt) {
1868											msg = txt;
1869							}
1870									 }
1871								 }
1872								 else
1873								 msg = rule.alertTextOk;
1874
1875								 if (options.showPrompts) {
1876									 // see if we should display a green prompt
1877									 if (msg)
1878										methods._showPrompt(errorField, msg, "pass", true, options);
1879									 else
1880										methods._closePrompt(errorField);
1881								}
1882
1883								 // If a submit form triggered this, we want to re-submit the form
1884								 if (options.eventTrigger == "submit")
1885									field.closest("form").submit();
1886							 }
1887						 }
1888						 errorField.trigger("jqv.field.result", [errorField, options.isError, msg]);
1889					 }
1890				 });
1891
1892				 return rule.alertTextLoad;
1893			 }
1894		 },
1895		/**
1896		* Common method to handle ajax errors
1897		*
1898		* @param {Object} data
1899		* @param {Object} transport
1900		*/
1901		_ajaxError: function(data, transport) {
1902			if(data.status == 0 && transport == null)
1903				alert("The page is not served from a server! ajax call failed");
1904			else if(typeof console != "undefined")
1905				console.log("Ajax error: " + data.status + " " + transport);
1906		},
1907		/**
1908		* date -> string
1909		*
1910		* @param {Object} date
1911		*/
1912		_dateToString: function(date) {
1913			return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
1914		},
1915		/**
1916		* Parses an ISO date
1917		* @param {String} d
1918		*/
1919		_parseDate: function(d) {
1920
1921			var dateParts = d.split("-");
1922			if(dateParts==d)
1923				dateParts = d.split("/");
1924			if(dateParts==d) {
1925				dateParts = d.split(".");
1926				return new Date(dateParts[2], (dateParts[1] - 1), dateParts[0]);
1927			}
1928			return new Date(dateParts[0], (dateParts[1] - 1) ,dateParts[2]);
1929		},
1930		/**
1931		* Builds or updates a prompt with the given information
1932		*
1933		* @param {jqObject} field
1934		* @param {String} promptText html text to display type
1935		* @param {String} type the type of bubble: 'pass' (green), 'load' (black) anything else (red)
1936		* @param {boolean} ajaxed - use to mark fields than being validated with ajax
1937		* @param {Map} options user options
1938		*/
1939		 _showPrompt: function(field, promptText, type, ajaxed, options, ajaxform) {
1940		 	//Check if we need to adjust what element to show the prompt on
1941			if(field.data('jqv-prompt-at') instanceof jQuery ){
1942				field = field.data('jqv-prompt-at');
1943			} else if(field.data('jqv-prompt-at')) {
1944				field = $(field.data('jqv-prompt-at'));
1945			}
1946
1947			 var prompt = methods._getPrompt(field);
1948			 // The ajax submit errors are not see has an error in the form,
1949			 // When the form errors are returned, the engine see 2 bubbles, but those are ebing closed by the engine at the same time
1950			 // Because no error was found befor submitting
1951			 if(ajaxform) prompt = false;
1952			 // Check that there is indded text
1953			 if($.trim(promptText)){
1954				 if (prompt)
1955					methods._updatePrompt(field, prompt, promptText, type, ajaxed, options);
1956				 else
1957					methods._buildPrompt(field, promptText, type, ajaxed, options);
1958			}
1959		 },
1960		/**
1961		* Builds and shades a prompt for the given field.
1962		*
1963		* @param {jqObject} field
1964		* @param {String} promptText html text to display type
1965		* @param {String} type the type of bubble: 'pass' (green), 'load' (black) anything else (red)
1966		* @param {boolean} ajaxed - use to mark fields than being validated with ajax
1967		* @param {Map} options user options
1968		*/
1969		_buildPrompt: function(field, promptText, type, ajaxed, options) {
1970
1971			// create the prompt
1972			var prompt = $('<div>');
1973			prompt.addClass(methods._getClassName(field.attr("id")) + "formError");
1974			// add a class name to identify the parent form of the prompt
1975			prompt.addClass("parentForm"+methods._getClassName(field.closest('form, .validationEngineContainer').attr("id")));
1976			prompt.addClass("formError");
1977
1978			switch (type) {
1979				case "pass":
1980					prompt.addClass("greenPopup");
1981					break;
1982				case "load":
1983					prompt.addClass("blackPopup");
1984					break;
1985				default:
1986					/* it has error  */
1987					//alert("unknown popup type:"+type);
1988			}
1989			if (ajaxed)
1990				prompt.addClass("ajaxed");
1991
1992			// create the prompt content
1993			var promptContent = $('<div>').addClass("formErrorContent").html(promptText).appendTo(prompt);
1994
1995			// determine position type
1996			var positionType=field.data("promptPosition") || options.promptPosition;
1997
1998			// create the css arrow pointing at the field
1999			// note that there is no triangle on max-checkbox and radio
2000			if (options.showArrow) {
2001				var arrow = $('<div>').addClass("formErrorArrow");
2002
2003				//prompt positioning adjustment support. Usage: positionType:Xshift,Yshift (for ex.: bottomLeft:+20 or bottomLeft:-20,+10)
2004				if (typeof(positionType)=='string')
2005				{
2006					var pos=positionType.indexOf(":");
2007					if(pos!=-1)
2008						positionType=positionType.substring(0,pos);
2009				}
2010
2011				switch (positionType) {
2012					case "bottomLeft":
2013					case "bottomRight":
2014						prompt.find(".formErrorContent").before(arrow);
2015						arrow.addClass("formErrorArrowBottom").html('<div class="line1"><!-- --></div><div class="line2"><!-- --></div><div class="line3"><!-- --></div><div class="line4"><!-- --></div><div class="line5"><!-- --></div><div class="line6"><!-- --></div><div class="line7"><!-- --></div><div class="line8"><!-- --></div><div class="line9"><!-- --></div><div class="line10"><!-- --></div>');
2016						break;
2017					case "topLeft":
2018					case "topRight":
2019						arrow.html('<div class="line10"><!-- --></div><div class="line9"><!-- --></div><div class="line8"><!-- --></div><div class="line7"><!-- --></div><div class="line6"><!-- --></div><div class="line5"><!-- --></div><div class="line4"><!-- --></div><div class="line3"><!-- --></div><div class="line2"><!-- --></div><div class="line1"><!-- --></div>');
2020						prompt.append(arrow);
2021						break;
2022				}
2023			}
2024			// Add custom prompt class
2025			if (options.addPromptClass)
2026				prompt.addClass(options.addPromptClass);
2027
2028            // Add custom prompt class defined in element
2029            var requiredOverride = field.attr('data-required-class');
2030            if(requiredOverride !== undefined) {
2031                prompt.addClass(requiredOverride);
2032            } else {
2033                if(options.prettySelect) {
2034                    if($('#' + field.attr('id')).next().is('select')) {
2035                        var prettyOverrideClass = $('#' + field.attr('id').substr(options.usePrefix.length).substring(options.useSuffix.length)).attr('data-required-class');
2036                        if(prettyOverrideClass !== undefined) {
2037                            prompt.addClass(prettyOverrideClass);
2038                        }
2039                    }
2040                }
2041            }
2042
2043			prompt.css({
2044				"opacity": 0
2045			});
2046			if(positionType === 'inline') {
2047				prompt.addClass("inline");
2048				if(typeof field.attr('data-prompt-target') !== 'undefined' && $('#'+field.attr('data-prompt-target')).length > 0) {
2049					prompt.appendTo($('#'+field.attr('data-prompt-target')));
2050				} else {
2051					field.after(prompt);
2052				}
2053			} else {
2054				field.before(prompt);
2055			}
2056
2057			var pos = methods._calculatePosition(field, prompt, options);
2058			// Support RTL layouts by @yasser_lotfy ( Yasser Lotfy )
2059			if ($('body').hasClass('rtl')) {
2060				prompt.css({
2061					'position': positionType === 'inline' ? 'relative' : 'absolute',
2062					"top": pos.callerTopPosition,
2063					"left": "initial",
2064					"right": pos.callerleftPosition,
2065					"marginTop": pos.marginTopSize,
2066					"opacity": 0
2067				}).data("callerField", field);
2068		    	} else {
2069				prompt.css({
2070					'position': positionType === 'inline' ? 'relative' : 'absolute',
2071					"top": pos.callerTopPosition,
2072					"left": pos.callerleftPosition,
2073					"right": "initial",
2074					"marginTop": pos.marginTopSize,
2075					"opacity": 0
2076				}).data("callerField", field);
2077		    	}
2078
2079
2080			if (options.autoHidePrompt) {
2081				setTimeout(function(){
2082					prompt.animate({
2083						"opacity": 0
2084					},function(){
2085						prompt.closest('.formError').remove();
2086					});
2087				}, options.autoHideDelay);
2088			}
2089			return prompt.animate({
2090				"opacity": 0.87
2091			});
2092		},
2093		/**
2094		* Updates the prompt text field - the field for which the prompt
2095		* @param {jqObject} field
2096		* @param {String} promptText html text to display type
2097		* @param {String} type the type of bubble: 'pass' (green), 'load' (black) anything else (red)
2098		* @param {boolean} ajaxed - use to mark fields than being validated with ajax
2099		* @param {Map} options user options
2100		*/
2101		_updatePrompt: function(field, prompt, promptText, type, ajaxed, options, noAnimation) {
2102
2103			if (prompt) {
2104				if (typeof type !== "undefined") {
2105					if (type == "pass")
2106						prompt.addClass("greenPopup");
2107					else
2108						prompt.removeClass("greenPopup");
2109
2110					if (type == "load")
2111						prompt.addClass("blackPopup");
2112					else
2113						prompt.removeClass("blackPopup");
2114				}
2115				if (ajaxed)
2116					prompt.addClass("ajaxed");
2117				else
2118					prompt.removeClass("ajaxed");
2119
2120				prompt.find(".formErrorContent").html(promptText);
2121
2122				var pos = methods._calculatePosition(field, prompt, options);
2123				// Support RTL layouts by @yasser_lotfy ( Yasser Lotfy )
2124				if ($('body').hasClass('rtl')) {
2125					var css = {"top": pos.callerTopPosition,
2126					"left": "initial",
2127					"right": pos.callerleftPosition,
2128					"marginTop": pos.marginTopSize,
2129					"opacity": 0.87};
2130				} else {
2131					var css = {"top": pos.callerTopPosition,
2132					"left": pos.callerleftPosition,
2133					"right": "initial",
2134					"marginTop": pos.marginTopSize,
2135					"opacity": 0.87};
2136				}
2137
2138                prompt.css({
2139                    "opacity": 0,
2140                    "display": "block"
2141                });
2142
2143				if (noAnimation)
2144					prompt.css(css);
2145				else
2146					prompt.animate(css);
2147			}
2148		},
2149		/**
2150		* Closes the prompt associated with the given field
2151		*
2152		* @param {jqObject}
2153		*            field
2154		*/
2155		 _closePrompt: function(field) {
2156			 var prompt = methods._getPrompt(field);
2157			 if (prompt)
2158				 prompt.fadeTo("fast", 0, function() {
2159					 prompt.closest('.formError').remove();
2160				 });
2161		 },
2162		 closePrompt: function(field) {
2163			 return methods._closePrompt(field);
2164		 },
2165		/**
2166		* Returns the error prompt matching the field if any
2167		*
2168		* @param {jqObject}
2169		*            field
2170		* @return undefined or the error prompt (jqObject)
2171		*/
2172		_getPrompt: function(field) {
2173				var formId = $(field).closest('form, .validationEngineContainer').attr('id');
2174			var className = methods._getClassName(field.attr("id")) + "formError";
2175				var match = $("." + methods._escapeExpression(className) + '.parentForm' + methods._getClassName(formId))[0];
2176			if (match)
2177			return $(match);
2178		},
2179		/**
2180		  * Returns the escapade classname
2181		  *
2182		  * @param {selector}
2183		  *            className
2184		  */
2185		  _escapeExpression: function (selector) {
2186			  return selector.replace(/([#;&,\.\+\*\~':"\!\^$\[\]\(\)=>\|])/g, "\\$1");
2187		  },
2188		/**
2189		 * returns true if we are in a RTLed document
2190		 *
2191		 * @param {jqObject} field
2192		 */
2193		isRTL: function(field)
2194		{
2195			var $document = $(document);
2196			var $body = $('body');
2197			var rtl =
2198				(field && field.hasClass('rtl')) ||
2199				(field && (field.attr('dir') || '').toLowerCase()==='rtl') ||
2200				$document.hasClass('rtl') ||
2201				($document.attr('dir') || '').toLowerCase()==='rtl' ||
2202				$body.hasClass('rtl') ||
2203				($body.attr('dir') || '').toLowerCase()==='rtl';
2204			return Boolean(rtl);
2205		},
2206		/**
2207		* Calculates prompt position
2208		*
2209		* @param {jqObject}
2210		*            field
2211		* @param {jqObject}
2212		*            the prompt
2213		* @param {Map}
2214		*            options
2215		* @return positions
2216		*/
2217		_calculatePosition: function (field, promptElmt, options) {
2218
2219			var promptTopPosition, promptleftPosition, marginTopSize;
2220			var fieldWidth 	= field.width();
2221			var fieldLeft 	= field.position().left;
2222			var fieldTop 	=  field.position().top;
2223			var fieldHeight 	=  field.height();
2224			var promptHeight = promptElmt.height();
2225
2226
2227			// is the form contained in an overflown container?
2228			promptTopPosition = promptleftPosition = 0;
2229			// compensation for the arrow
2230			marginTopSize = -promptHeight;
2231
2232
2233			//prompt positioning adjustment support
2234			//now you can adjust prompt position
2235			//usage: positionType:Xshift,Yshift
2236			//for example:
2237			//   bottomLeft:+20 means bottomLeft position shifted by 20 pixels right horizontally
2238			//   topRight:20, -15 means topRight position shifted by 20 pixels to right and 15 pixels to top
2239			//You can use +pixels, - pixels. If no sign is provided than + is default.
2240			var positionType=field.data("promptPosition") || options.promptPosition;
2241			var shift1="";
2242			var shift2="";
2243			var shiftX=0;
2244			var shiftY=0;
2245			if (typeof(positionType)=='string') {
2246				//do we have any position adjustments ?
2247				if (positionType.indexOf(":")!=-1) {
2248					shift1=positionType.substring(positionType.indexOf(":")+1);
2249					positionType=positionType.substring(0,positionType.indexOf(":"));
2250
2251					//if any advanced positioning will be needed (percents or something else) - parser should be added here
2252					//for now we use simple parseInt()
2253
2254					//do we have second parameter?
2255					if (shift1.indexOf(",") !=-1) {
2256						shift2=shift1.substring(shift1.indexOf(",") +1);
2257						shift1=shift1.substring(0,shift1.indexOf(","));
2258						shiftY=parseInt(shift2);
2259						if (isNaN(shiftY)) shiftY=0;
2260					};
2261
2262					shiftX=parseInt(shift1);
2263					if (isNaN(shift1)) shift1=0;
2264
2265				};
2266			};
2267
2268
2269			switch (positionType) {
2270				default:
2271				case "topRight":
2272					promptleftPosition +=  fieldLeft + fieldWidth - 27;
2273					promptTopPosition +=  fieldTop;
2274					break;
2275
2276				case "topLeft":
2277					promptTopPosition +=  fieldTop;
2278					promptleftPosition += fieldLeft;
2279					break;
2280
2281				case "centerRight":
2282					promptTopPosition = fieldTop+4;
2283					marginTopSize = 0;
2284					promptleftPosition= fieldLeft + field.outerWidth(true)+5;
2285					break;
2286				case "centerLeft":
2287					promptleftPosition = fieldLeft - (promptElmt.width() + 2);
2288					promptTopPosition = fieldTop+4;
2289					marginTopSize = 0;
2290
2291					break;
2292
2293				case "bottomLeft":
2294					promptTopPosition = fieldTop + field.height() + 5;
2295					marginTopSize = 0;
2296					promptleftPosition = fieldLeft;
2297					break;
2298				case "bottomRight":
2299					promptleftPosition = fieldLeft + fieldWidth - 27;
2300					promptTopPosition =  fieldTop +  field.height() + 5;
2301					marginTopSize = 0;
2302					break;
2303				case "inline":
2304					promptleftPosition = 0;
2305					promptTopPosition = 0;
2306					marginTopSize = 0;
2307			};
2308
2309
2310
2311			//apply adjusments if any
2312			promptleftPosition += shiftX;
2313			promptTopPosition  += shiftY;
2314
2315			return {
2316				"callerTopPosition": promptTopPosition + "px",
2317				"callerleftPosition": promptleftPosition + "px",
2318				"marginTopSize": marginTopSize + "px"
2319			};
2320		},
2321		/**
2322		* Saves the user options and variables in the form.data
2323		*
2324		* @param {jqObject}
2325		*            form - the form where the user option should be saved
2326		* @param {Map}
2327		*            options - the user options
2328		* @return the user options (extended from the defaults)
2329		*/
2330		 _saveOptions: function(form, options) {
2331
2332			 // is there a language localisation ?
2333			 if ($.validationEngineLanguage)
2334			 var allRules = $.validationEngineLanguage.allRules;
2335			 else
2336			 $.error("jQuery.validationEngine rules are not loaded, plz add localization files to the page");
2337			 // --- Internals DO NOT TOUCH or OVERLOAD ---
2338			 // validation rules and i18
2339			 $.validationEngine.defaults.allrules = allRules;
2340
2341			 var userOptions = $.extend(true,{},$.validationEngine.defaults,options);
2342
2343			 form.data('jqv', userOptions);
2344			 return userOptions;
2345		 },
2346
2347		 /**
2348		 * Removes forbidden characters from class name
2349		 * @param {String} className
2350		 */
2351		 _getClassName: function(className) {
2352			 if(className)
2353				 return className.replace(/:/g, "_").replace(/\./g, "_");
2354					  },
2355		/**
2356		 * Escape special character for jQuery selector
2357		 * http://totaldev.com/content/escaping-characters-get-valid-jquery-id
2358		 * @param {String} selector
2359		 */
2360		 _jqSelector: function(str){
2361			return str.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
2362		},
2363		/**
2364		* Conditionally required field
2365		*
2366		* @param {jqObject} field
2367		* @param {Array[String]} rules
2368		* @param {int} i rules index
2369		* @param {Map}
2370		* user options
2371		* @return an error string if validation failed
2372		*/
2373		_condRequired: function(field, rules, i, options) {
2374			var idx, dependingField;
2375
2376			for(idx = (i + 1); idx < rules.length; idx++) {
2377				dependingField = jQuery("#" + rules[idx]).first();
2378
2379				/* Use _required for determining wether dependingField has a value.
2380				 * There is logic there for handling all field types, and default value; so we won't replicate that here
2381				 * Indicate this special use by setting the last parameter to true so we only validate the dependingField on chackboxes and radio buttons (#462)
2382				 */
2383				if (dependingField.length && methods._required(dependingField, ["required"], 0, options, true) == undefined) {
2384					/* We now know any of the depending fields has a value,
2385					 * so we can validate this field as per normal required code
2386					 */
2387					return methods._required(field, ["required"], 0, options);
2388				}
2389			}
2390		},
2391
2392	    _submitButtonClick: function(event) {
2393	        var button = $(this);
2394	        var form = button.closest('form, .validationEngineContainer');
2395	        form.data("jqv_submitButton", button.attr("id"));
2396	    }
2397		  };
2398
2399	 /**
2400	 * Plugin entry point.
2401	 * You may pass an action as a parameter or a list of options.
2402	 * if none, the init and attach methods are being called.
2403	 * Remember: if you pass options, the attached method is NOT called automatically
2404	 *
2405	 * @param {String}
2406	 *            method (optional) action
2407	 */
2408	 $.fn.validationEngine = function(method) {
2409
2410		 var form = $(this);
2411		 if(!form[0]) return form;  // stop here if the form does not exist
2412
2413		 if (typeof(method) == 'string' && method.charAt(0) != '_' && methods[method]) {
2414
2415			 // make sure init is called once
2416			 if(method != "showPrompt" && method != "hide" && method != "hideAll")
2417			 methods.init.apply(form);
2418
2419			 return methods[method].apply(form, Array.prototype.slice.call(arguments, 1));
2420		 } else if (typeof method == 'object' || !method) {
2421
2422			 // default constructor with or without arguments
2423			 methods.init.apply(form, arguments);
2424			 return methods.attach.apply(form);
2425		 } else {
2426			 $.error('Method ' + method + ' does not exist in jQuery.validationEngine');
2427		 }
2428	};
2429
2430
2431
2432	// LEAK GLOBAL OPTIONS
2433	$.validationEngine= {fieldIdCounter: 0,defaults:{
2434
2435		// Name of the event triggering field validation
2436		validationEventTrigger: "blur",
2437		// Automatically scroll viewport to the first error
2438		scroll: true,
2439		// Focus on the first input
2440		focusFirstField:true,
2441		// Show prompts, set to false to disable prompts
2442		showPrompts: true,
2443		// Should we attempt to validate non-visible input fields contained in the form? (Useful in cases of tabbed containers, e.g. jQuery-UI tabs)
2444		validateNonVisibleFields: false,
2445		// ignore the validation for fields with this specific class (Useful in cases of tabbed containers AND hidden fields we don't want to validate)
2446		ignoreFieldsWithClass: 'ignoreMe',
2447		// Opening box position, possible locations are: topLeft,
2448		// topRight, bottomLeft, centerRight, bottomRight, inline
2449		// inline gets inserted after the validated field or into an element specified in data-prompt-target
2450		promptPosition: "topRight",
2451		bindMethod:"bind",
2452		// internal, automatically set to true when it parse a _ajax rule
2453		inlineAjax: false,
2454		// if set to true, the form data is sent asynchronously via ajax to the form.action url (get)
2455		ajaxFormValidation: false,
2456		// The url to send the submit ajax validation (default to action)
2457		ajaxFormValidationURL: false,
2458		// HTTP method used for ajax validation
2459		ajaxFormValidationMethod: 'get',
2460		// Ajax form validation callback method: boolean onComplete(form, status, errors, options)
2461		// retuns false if the form.submit event needs to be canceled.
2462		onAjaxFormComplete: $.noop,
2463		// called right before the ajax call, may return false to cancel
2464		onBeforeAjaxFormValidation: $.noop,
2465		// Stops form from submitting and execute function assiciated with it
2466		onValidationComplete: false,
2467
2468		// Used when you have a form fields too close and the errors messages are on top of other disturbing viewing messages
2469		doNotShowAllErrosOnSubmit: false,
2470		// Object where you store custom messages to override the default error messages
2471		custom_error_messages:{},
2472		// true if you want to validate the input fields on blur event
2473		binded: true,
2474		// set to true if you want to validate the input fields on blur only if the field it's not empty
2475		notEmpty: false,
2476		// set to true, when the prompt arrow needs to be displayed
2477		showArrow: true,
2478		// set to false, determines if the prompt arrow should be displayed when validating
2479		// checkboxes and radio buttons
2480		showArrowOnRadioAndCheckbox: false,
2481		// did one of the validation fail ? kept global to stop further ajax validations
2482		isError: false,
2483		// Limit how many displayed errors a field can have
2484		maxErrorsPerField: false,
2485
2486		// Caches field validation status, typically only bad status are created.
2487		// the array is used during ajax form validation to detect issues early and prevent an expensive submit
2488		ajaxValidCache: {},
2489		// Auto update prompt position after window resize
2490		autoPositionUpdate: false,
2491
2492		InvalidFields: [],
2493		onFieldSuccess: false,
2494		onFieldFailure: false,
2495		onSuccess: false,
2496		onFailure: false,
2497		validateAttribute: "class",
2498		addSuccessCssClassToField: "",
2499		addFailureCssClassToField: "",
2500
2501		// Auto-hide prompt
2502		autoHidePrompt: false,
2503		// Delay before auto-hide
2504		autoHideDelay: 10000,
2505		// Fade out duration while hiding the validations
2506		fadeDuration: 300,
2507	 // Use Prettify select library
2508	 prettySelect: false,
2509	 // Add css class on prompt
2510	 addPromptClass : "",
2511	 // Custom ID uses prefix
2512	 usePrefix: "",
2513	 // Custom ID uses suffix
2514	 useSuffix: "",
2515	 // Only show one message per error prompt
2516	 showOneMessage: false
2517	}};
2518	$(function(){$.validationEngine.defaults.promptPosition = methods.isRTL()?'topLeft':"topRight"});
2519})(jQuery);
2520
2521(function ($) {
2522  $.fn.validationEngineLanguage = function () {};
2523  $.validationEngineLanguage = {
2524    newLang: function () {
2525      $.validationEngineLanguage.allRules = {
2526        required: {
2527          // Add your regex rules here, you can take telephone as an example
2528          regex: "none",
2529          alertText: "* This field is required",
2530          alertTextCheckboxMultiple: "* Please select an option",
2531          alertTextCheckboxe: "* This checkbox is required",
2532          alertTextDateRange: "* Both date range fields are required",
2533        },
2534        dateRange: {
2535          regex: "none",
2536          alertText: "* Invalid ",
2537          alertText2: "Date Range",
2538        },
2539        dateTimeRange: {
2540          regex: "none",
2541          alertText: "* Invalid ",
2542          alertText2: "Date Time Range",
2543        },
2544        minSize: {
2545          regex: "none",
2546          alertText: "* Minimum ",
2547          alertText2: " characters allowed",
2548        },
2549        maxSize: {
2550          regex: "none",
2551          alertText: "* Maximum ",
2552          alertText2: " characters allowed",
2553        },
2554        groupRequired: {
2555          regex: "none",
2556          alertText: "* You must fill one of the following fields",
2557        },
2558        min: {
2559          regex: "none",
2560          alertText: "* Minimum value is ",
2561        },
2562        max: {
2563          regex: "none",
2564          alertText: "* Maximum value is ",
2565        },
2566        past: {
2567          regex: "none",
2568          alertText: "* Date prior to ",
2569        },
2570        future: {
2571          regex: "none",
2572          alertText: "* Date past ",
2573        },
2574        maxCheckbox: {
2575          regex: "none",
2576          alertText: "* Maximum ",
2577          alertText2: " options allowed",
2578        },
2579        minCheckbox: {
2580          regex: "none",
2581          alertText: "* Please select ",
2582          alertText2: " options",
2583        },
2584        equals: {
2585          regex: "none",
2586          alertText: "* Fields do not match",
2587        },
2588        telephone: {
2589          // credit: jquery.h5validate.js / orefalo
2590          regex: /^(\+|00)[1-9][0-9 \-\(\)\.]{7,32}$/,
2591          alertText: "* Invalid phone number",
2592        },
2593        email: {
2594          // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
2595          regex:
2596            /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,
2597          alertText: "* Invalid email address",
2598        },
2599        integer: {
2600          regex: /^[\-\+]?\d+$/,
2601          alertText: "* Not a valid integer",
2602        },
2603        number: {
2604          // Number, including positive, negative, and floating decimal. credit: orefalo
2605          regex: /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
2606          alertText: "* Invalid floating decimal number",
2607        },
2608        date: {
2609            regex:
2610              /^(?:(?:(?:0[13578]|1[02])\/(?:0[1-9]|[12][0-9]|3[01])\/\d{4})|(?:(?:0[469]|11)\/(?:0[1-9]|[12][0-9]|30)\/\d{4})|(?:02\/(?:0[1-9]|1[0-9]|2[0-8])\/\d{4})|(?:02\/29\/(?:(?:\d{2}(?:0[48]|[2468][048]|[13579][26]))|(?:[02468][048]00|[13579][26]00))))$/,
2611            alertText: "* Invalid date, must be in MM/DD/YYYY format",
2612          },
2613        ipv4: {
2614          regex:
2615            /^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,
2616          alertText: "* Invalid IP address",
2617        },
2618        url: {
2619          regex:
2620            /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
2621          alertText: "* Invalid URL",
2622        },
2623        onlyNumber: {
2624          regex: /^[0-9\ ]+$/,
2625          alertText: "* Numbers only",
2626        },
2627        onlyLetter: {
2628          regex: /^[a-zA-Z\ \']+$/,
2629          alertText: "* Letters only",
2630        },
2631        noSpecialCaracters: {
2632          regex: /^[0-9a-zA-Z]+$/,
2633          alertText: "* No special characters allowed",
2634        },
2635        // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
2636        ajaxUserCall: {
2637          url: "ajaxValidateFieldUser",
2638          // you may want to pass extra data on the ajax call
2639          extraData: "name=eric",
2640          alertText: "* This user is already taken",
2641          alertTextLoad: "* Validating, please wait",
2642        },
2643        ajaxUserCallPhp: {
2644          url: "phpajax/ajaxValidateFieldUser.php",
2645          // you may want to pass extra data on the ajax call
2646          extraData: "name=eric",
2647          // if you provide an "alertTextOk", it will show as a green prompt when the field validates
2648          alertTextOk: "* This username is available",
2649          alertText: "* This user is already taken",
2650          alertTextLoad: "* Validating, please wait",
2651        },
2652        ajaxNameCall: {
2653          // remote json service location
2654          url: "ajaxValidateFieldName",
2655          // error
2656          alertText: "* This name is already taken",
2657          // if you provide an "alertTextOk", it will show as a green prompt when the field validates
2658          alertTextOk: "* This name is available",
2659          // speaks by itself
2660          alertTextLoad: "* Validating, please wait",
2661        },
2662        ajaxNameCallPhp: {
2663          // remote json service location
2664          url: "phpajax/ajaxValidateFieldName.php",
2665          // error
2666          alertText: "* This name is already taken",
2667          // speaks by itself
2668          alertTextLoad: "* Validating, please wait",
2669        },
2670        validate2fields: {
2671          alertText: "* Please input HELLO",
2672        },
2673        //tls warning:homegrown not fielded
2674        dateFormat: {
2675          regex:
2676            /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?
2676:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,
2677          alertText: "* Invalid Date",
2678        },
2679        //tls warning:homegrown not fielded
2680        dateTimeFormat: {
2681          regex:
2682            /^(((0[1-9]|[12][0-9]|3[01])\/(0[13578]|10|12)\/(\d{4}))|(([0][1-9]|[12][0-9]|30)\/(0[469]|11)\/(\d{4}))|((0[1-9]|1[0-9]|2[0-8])\/(02)\/(\d{4}))|((29)\/(02)\/([02468][048]00))|((29)\/(02)\/([13579][26]00))|((29)\/(02)\/([0-9][0-9][0][48]))|((29)\/(02)\/([0-9][0-9][2468][048]))|((29)\/(02)\/([0-9][0-9][13579][26])))\s+((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])))$/,
2683          alertText: "* Invalid Date or Date Format",
2684          alertText2: "Expected Format: ",
2685          alertText3: "dd/mm/yyyy hh:mm:ss AM|PM or ",
2686          alertText4: "dd/mm/yyyy HH:mm:ss ",
2687        },
2688      };
2689    },
2690  };
2691
2692  $.validationEngineLanguage.newLang();
2693})(jQuery);
2694
2695(function( $ ) {
2696    var log = function() {
2697        try {
2698            console.log.apply(console, arguments);
2699        } catch(err) {}
2700    };
2701
2702    $.fn.hebsBP = function(options) {
2703        if (typeof bookingEngineVars === 'undefined') {
2704            log('HeBS Booking: "bookingEngineVars" variable must be defined.');
2705            return false;
2706        }
2707
2708        var self = $(this);
2709
2710        if (self.length == 0) {
2711            log('HeBS Booking: must be attached to form. Please specify proper form selector.');
2712            return false;
2713        }
2714
2715        var settings = {
2716            'propertyId'       : null,
2717            'propertySelector' : null,
2718            'checkIn'               : null,
2719            'checkOut'              : null,
2720            'stay'             : null,
2721            'adults'           : null,
2722            'extraFields'      : {},
2723            'singleCookie'     : true,
2724            'onComplete'       : function() {}
2725        };
2726
2727        try {
2728            var booking_window, booking_length, number_of_adults, extraFields = [];
2729            if (options) {
2730                $.extend( settings, options );
2731            }
2732
2733            if (!settings.checkIn || !$(settings.checkIn, self).length) {
2734                log('HeBS Booking: "Check-in" selector is incorrect.');
2735                return false;
2736            }
2737
2738            var settingsPropertyId = settings.propertyId;
2739            var currentDefaultBooking = $.grep(bookingEngineVars, function(e){
2740                if (settingsPropertyId) {
2741                    return e.property_id == settingsPropertyId;
2742                } else {
2743                    return !e.property_id;
2744                }
2745            });
2746
2747            var today = new Date(),
2748                checkin_date,
2749                checkout_date;
2750
2751            var property_id = null,
2752                default_booking_window   = currentDefaultBooking[0].default_booking_window,
2753                default_booking_length   = currentDefaultBooking[0].default_booking_length,
2754                default_number_of_adults = currentDefaultBooking[0].default_number_of_adults;
2755
2756            var cookie_base_name = '__hebs_booking',
2757                cookie_options = { expires : 36500, path : '/' },
2758                cookie;
2759
2760            if(settings.singleCookie){
2761                cookie = $.cookie(cookie_base_name);
2762            }
2763            else{
2764                if (settingsPropertyId) {
2765                    cookie = $.cookie(cookie_base_name + '-' + settingsPropertyId);
2766                } else {
2767                    cookie = $.cookie(cookie_base_name);
2768                }
2769            }
2770
2771            if (cookie) {
2772                var cookie_obj = $.secureEvalJSON(cookie);
2773
2774                booking_window = typeof cookie_obj.bw !== 'undefined' ? cookie_obj.bw : default_booking_window;
2775                if (today.getTime() <= cookie_obj.checkInDate) {
2776                    booking_length   = typeof cookie_obj.bl !== 'undefined' ? cookie_obj.bl : default_booking_length;
2777                    number_of_adults = typeof cookie_obj.noa  !== 'undefined' ? cookie_obj.noa : default_number_of_adults;
2778
2779                    /* init ckeckin date */
2780                    checkin_date  = new Date(cookie_obj.checkInDate);
2781
2782                    /* init ckeckout date */
2783                    checkout_date = new Date(checkin_date);
2784                    checkout_date.setDate(checkout_date.getDate() + booking_length);
2785                } else {
2786                    booking_length   = typeof cookie_obj.bl !== 'undefined' ? cookie_obj.bl : default_booking_length;
2787                    number_of_adults = cookie_obj.noa ? cookie_obj.noa : default_number_of_adults;
2788
2789                    /* init ckeckin date */
2790                    checkin_date = new Date(today);
2791                    checkin_date.setDate(checkin_date.getDate()+booking_window);
2792
2793                    /* init ckeckout date */
2794                    checkout_date = new Date(checkin_date);
2795                    checkout_date.setDate(checkout_date.getDate() + booking_length);
2796                }
2797
2798                if (cookie_obj.ef) {
2799                    $.each (cookie_obj.ef, function( key, value ) {
2800                        $(key, self).val(value);
2801                        extraFields.push({'selector':key,'value':value});
2802                    });
2803                }
2804
2805                if (cookie_obj.pid && typeof cookie_obj.pid !== 'undefined') {
2806                    property_id = cookie_obj.pid;
2807                }
2808            } else {
2809
2810                booking_window   = default_booking_window;
2811                booking_length   = default_booking_length;
2812                number_of_adults = default_number_of_adults;
2813
2814                /* init ckeckin date */
2815                checkin_date = new Date(today);
2816
2817                checkin_date.setDate(checkin_date.getDate()+booking_window);
2818
2819                /* init ckeckout date */
2820                checkout_date = new Date(checkin_date);
2821                checkout_date.setDate(checkout_date.getDate() + booking_length);
2822            }
2823
2824            // returns default values if cookie dosnt exist
2825            var return_data  = {
2826                'checkin_date'     : checkin_date,
2827                'checkout_date'    : checkout_date,
2828                'booking_window'   : booking_window,
2829                'booking_length'   : booking_length,
2830                'number_of_adults' : number_of_adults,
2831                'property_id'      : (settingsPropertyId) ? settingsPropertyId : property_id,
2832                'extra_fields'     : extraFields ? extraFields : [],
2833                'default'          : {
2834                    'booking_window'   : default_booking_window,
2835                    'booking_length'   : default_booking_length,
2836                    'number_of_adults' : default_number_of_adults
2837                }
2838            };
2839        }
2840        catch(err){}
2841
2842        if (currentPropertyId) {
2843            var ccookie_obj = {
2844                pid: currentPropertyId
2845            };
2846            var ccookie = $.cookie(cookie_base_name);
2847            if (ccookie) {
2848                ccookie_obj = $.secureEvalJSON(ccookie);
2849                /* set corporate widget's property to last visited property */
2850                ccookie_obj.pid = currentPropertyId;
2851            }
2852            var cjson = $.toJSON(ccookie_obj);
2853            $.cookie(cookie_base_name, cjson, cookie_options);
2854        }
2855
2856        $(self).on( "submit", function() {
2857            saveCookie();
2858        });
2859
2860        if (settings.propertySelector && $(settings.propertySelector, self).length) {
2861            $(settings.propertySelector, self).on('change',function(){
2862                saveCookie();
2863            });
2864        }
2865
2866        if (settings.checkIn && $(settings.checkIn, self).length) {
2867            $(settings.checkIn, self).on('change',function(){
2868                saveCookie();
2869            });
2870        }
2871
2872        if (settings.checkOut && $(settings.checkOut, self).length) {
2873            $(settings.checkOut, self).on('change',function(){
2874                saveCookie();
2875            });
2876        }
2877
2878        if (settings.adults && $(settings.adults, self).length) {
2879            $(settings.adults, self).on('change',function(){
2880                saveCookie();
2881            });
2882        }
2883
2884        if (settings.extraFields){
2885            $.each( settings.extraFields, function( key, value ) {
2886                $(key, self).on( value, function() {
2887                    saveCookie();
2888                });
2889            });
2890        }
2891
2892        if (typeof settings.onComplete == 'function') {
2893            settings.onComplete.call(self, return_data);
2894        }
2895
2896        function getValue(selector, scope) {
2897            if (selector && $(selector, scope).length) {
2898                var type = $(selector, scope).prop('type');
2899                switch (type) {
2900                    case 'radio':
2901                    case 'checkbox':
2902                        return $(selector+":checked", scope).map(function(){ return $(this).val(); }).get();
2903                    default:
2904                        return $(selector, scope).val();
2905                }
2906            }
2907            return undefined;
2908        }
2909
2910        function saveCookie(){
2911            var propertyId;
2912            var selected_property_id = null;
2913            if (!currentPropertyId) {
2914                selected_property_id = getValue(settings.propertySelector, self);
2915                propertyId = typeof selected_property_id !== 'undefined' ? selected_property_id : null;
2916            }
2917            else
2918                propertyId = currentPropertyId;
2919
2920            try{
2921                var today = new Date();
2922                today.setHours(0,0,0,0);
2923
2924                var ci = new Date($(settings.checkIn, self).val());
2925                ci.setHours(0,0,0,0);
2926
2927                var booking_window = Math.floor((ci - today)/86400000);
2928
2929                var booking_length = default_booking_window;
2930                if (settings.checkOut && $(settings.checkOut, self).length) {
2931                    var co = new Date ($(settings.checkOut, self).val());
2932                    co.setHours(0,0,0,0);
2933                    booking_length = Math.floor((co - ci)/86400000);
2934                } else if (settings.stay && $(settings.stay, self).length) {
2935                    booking_length = $(settings.stay, self).val();
2936                }
2937
2938                var number_of_adults = null;
2939                if (settings.adults && $(settings.adults, self).length) {
2940                    number_of_adults = $(settings.adults, self).val();
2941                }
2942
2943                var extraFields = {};
2944                if (settings.extraFields) {
2945                    $.each( settings.extraFields, function( key, value ) {
2946                        extraFields[key] =  getValue(key, self);
2947                    });
2948                }
2949
2950                var obj = {
2951                    checkInDate: ci.getTime(),
2952                    bw:          booking_window,
2953                    bl:          booking_length,
2954                    noa:         number_of_adults,
2955                    ef:          extraFields,
2956                    pid:         propertyId
2957                };
2958
2959                var json = $.toJSON(obj);
2960                if(!settings.singleCookie && currentPropertyId){
2961                    $.cookie(cookie_base_name + '-' + currentPropertyId, json, cookie_options);
2962
2963                    var cobj = {
2964                        pid: obj.pid
2965                    };
2966
2967                    var ccookie = $.cookie(cookie_base_name);
2968                    if (ccookie) {
2969                        ccookie_obj = $.secureEvalJSON(ccookie);
2970                        cobj = $.extend({}, ccookie_obj, cobj);
2971                    }
2972
2973                    var cjson = $.toJSON(cobj);
2974                    $.cookie(cookie_base_name, cjson, cookie_options);
2975                }
2976                else{
2977                    $.cookie(cookie_base_name, json, cookie_options);
2978                }
2979            } catch(err){}
2980        }
2981
2982        return self;
2983
2984    };
2985})(jQuery);
2986
2987/**
2988 * Swiper 4.4.6
2989 * Most modern mobile touch slider and framework with hardware accelerated transitions
2990 * http://www.idangero.us/swiper/
2991 *
2992 * Copyright 2014-2018 Vladimir Kharlampidi
2993 *
2994 * Released under the MIT License
2995 *
2996 * Released on: December 19, 2018
2997 */
2998
2999(function (global, factory) {
3000    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3001        typeof define === 'function' && define.amd ? define(factory) :
3002            (global.Swiper = factory());
3003}(this, (function () { 'use strict';
3004
3005    /**
3006     * SSR Window 1.0.1
3007     * Better handling for window object in SSR environment
3008     * https://github.com/nolimits4web/ssr-window
3009     *
3010     * Copyright 2018, Vladimir Kharlampidi
3011     *
3012     * Licensed under MIT
3013     *
3014     * Released on: July 18, 2018
3015     */
3016    var doc = (typeof document === 'undefined') ? {
3017        body: {},
3018        addEventListener: function addEventListener() {},
3019        removeEventListener: function removeEventListener() {},
3020        activeElement: {
3021            blur: function blur() {},
3022            nodeName: '',
3023        },
3024        querySelector: function querySelector() {
3025            return null;
3026        },
3027        querySelectorAll: function querySelectorAll() {
3028            return [];
3029        },
3030        getElementById: function getElementById() {
3031            return null;
3032        },
3033        createEvent: function createEvent() {
3034            return {
3035                initEvent: function initEvent() {},
3036            };
3037        },
3038        createElement: function createElement() {
3039            return {
3040                children: [],
3041                childNodes: [],
3042                style: {},
3043                setAttribute: function setAttribute() {},
3044                getElementsByTagName: function getElementsByTagName() {
3045                    return [];
3046                },
3047            };
3048        },
3049        location: { hash: '' },
3050    } : document; // eslint-disable-line
3051
3052    var win = (typeof window === 'undefined') ? {
3053        document: doc,
3054        navigator: {
3055            userAgent: '',
3056        },
3057        location: {},
3058        history: {},
3059        CustomEvent: function CustomEvent() {
3060            return this;
3061        },
3062        addEventListener: function addEventListener() {},
3063        removeEventListener: function removeEventListener() {},
3064        getComputedStyle: function getComputedStyle() {
3065            return {
3066                getPropertyValue: function getPropertyValue() {
3067                    return '';
3068                },
3069            };
3070        },
3071        Image: function Image() {},
3072        Date: function Date() {},
3073        screen: {},
3074        setTimeout: function setTimeout() {},
3075        clearTimeout: function clearTimeout() {},
3076    } : window; // eslint-disable-line
3077
3078    /**
3079     * Dom7 2.1.2
3080     * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
3081     * http://framework7.io/docs/dom.html
3082     *
3083     * Copyright 2018, Vladimir Kharlampidi
3084     * The iDangero.us
3085     * http://www.idangero.us/
3086     *
3087     * Licensed under MIT
3088     *
3089     * Released on: September 13, 2018
3090     */
3091
3092    var Dom7 = function Dom7(arr) {
3093        var self = this;
3094        // Create array-like object
3095        for (var i = 0; i < arr.length; i += 1) {
3096            self[i] = arr[i];
3097        }
3098        self.length = arr.length;
3099        // Return collection with methods
3100        return this;
3101    };
3102
3103    function $(selector, context) {
3104        var arr = [];
3105        var i = 0;
3106        if (selector && !context) {
3107            if (selector instanceof Dom7) {
3108                return selector;
3109            }
3110        }
3111        if (selector) {
3112            // String
3113            if (typeof selector === 'string') {
3114                var els;
3115                var tempParent;
3116                var html = selector.trim();
3117                if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {
3118                    var toCreate = 'div';
3119                    if (html.indexOf('<li') === 0) { toCreate = 'ul'; }
3120                    if (html.indexOf('<tr') === 0) { toCreate = 'tbody'; }
3121                    if (html.indexOf('<td') === 0 || html.indexOf('<th') =
vendor: 315,213 bytes, lines 3121-10859
3121== 0) { toCreate = 'tr'; }
3122                    if (html.indexOf('<tbody') === 0) { toCreate = 'table'; }
3123                    if (html.indexOf('<option') === 0) { toCreate = 'select'; }
3124                    tempParent = doc.createElement(toCreate);
3125                    tempParent.innerHTML = html;
3126                    for (i = 0; i < tempParent.childNodes.length; i += 1) {
3127                        arr.push(tempParent.childNodes[i]);
3128                    }
3129                } else {
3130                    if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {
3131                        // Pure ID selector
3132                        els = [doc.getElementById(selector.trim().split('#')[1])];
3133                    } else {
3134                        // Other selectors
3135                        els = (context || doc).querySelectorAll(selector.trim());
3136                    }
3137                    for (i = 0; i < els.length; i += 1) {
3138                        if (els[i]) { arr.push(els[i]); }
3139                    }
3140                }
3141            } else if (selector.nodeType || selector === win || selector === doc) {
3142                // Node/element
3143                arr.push(selector);
3144            } else if (selector.length > 0 && selector[0].nodeType) {
3145                // Array of elements or instance of Dom
3146                for (i = 0; i < selector.length; i += 1) {
3147                    arr.push(selector[i]);
3148                }
3149            }
3150        }
3151        return new Dom7(arr);
3152    }
3153
3154    $.fn = Dom7.prototype;
3155    $.Class = Dom7;
3156    $.Dom7 = Dom7;
3157
3158    function unique(arr) {
3159        var uniqueArray = [];
3160        for (var i = 0; i < arr.length; i += 1) {
3161            if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); }
3162        }
3163        return uniqueArray;
3164    }
3165
3166    // Classes and attributes
3167    function addClass(className) {
3168        if (typeof className === 'undefined') {
3169            return this;
3170        }
3171        var classes = className.split(' ');
3172        for (var i = 0; i < classes.length; i += 1) {
3173            for (var j = 0; j < this.length; j += 1) {
3174                if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.add(classes[i]); }
3175            }
3176        }
3177        return this;
3178    }
3179    function removeClass(className) {
3180        var classes = className.split(' ');
3181        for (var i = 0; i < classes.length; i += 1) {
3182            for (var j = 0; j < this.length; j += 1) {
3183                if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.remove(classes[i]); }
3184            }
3185        }
3186        return this;
3187    }
3188    function hasClass(className) {
3189        if (!this[0]) { return false; }
3190        return this[0].classList.contains(className);
3191    }
3192    function toggleClass(className) {
3193        var classes = className.split(' ');
3194        for (var i = 0; i < classes.length; i += 1) {
3195            for (var j = 0; j < this.length; j += 1) {
3196                if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.toggle(classes[i]); }
3197            }
3198        }
3199        return this;
3200    }
3201    function attr(attrs, value) {
3202        var arguments$1 = arguments;
3203
3204        if (arguments.length === 1 && typeof attrs === 'string') {
3205            // Get attr
3206            if (this[0]) { return this[0].getAttribute(attrs); }
3207            return undefined;
3208        }
3209
3210        // Set attrs
3211        for (var i = 0; i < this.length; i += 1) {
3212            if (arguments$1.length === 2) {
3213                // String
3214                this[i].setAttribute(attrs, value);
3215            } else {
3216                // Object
3217                // eslint-disable-next-line
3218                for (var attrName in attrs) {
3219                    this[i][attrName] = attrs[attrName];
3220                    this[i].setAttribute(attrName, attrs[attrName]);
3221                }
3222            }
3223        }
3224        return this;
3225    }
3226    // eslint-disable-next-line
3227    function removeAttr(attr) {
3228        for (var i = 0; i < this.length; i += 1) {
3229            this[i].removeAttribute(attr);
3230        }
3231        return this;
3232    }
3233    function data(key, value) {
3234        var el;
3235        if (typeof value === 'undefined') {
3236            el = this[0];
3237            // Get value
3238            if (el) {
3239                if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) {
3240                    return el.dom7ElementDataStorage[key];
3241                }
3242
3243                var dataKey = el.getAttribute(("data-" + key));
3244                if (dataKey) {
3245                    return dataKey;
3246                }
3247                return undefined;
3248            }
3249            return undefined;
3250        }
3251
3252        // Set value
3253        for (var i = 0; i < this.length; i += 1) {
3254            el = this[i];
3255            if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; }
3256            el.dom7ElementDataStorage[key] = value;
3257        }
3258        return this;
3259    }
3260    // Transforms
3261    // eslint-disable-next-line
3262    function transform(transform) {
3263        for (var i = 0; i < this.length; i += 1) {
3264            var elStyle = this[i].style;
3265            elStyle.webkitTransform = transform;
3266            elStyle.transform = transform;
3267        }
3268        return this;
3269    }
3270    function transition(duration) {
3271        if (typeof duration !== 'string') {
3272            duration = duration + "ms"; // eslint-disable-line
3273        }
3274        for (var i = 0; i < this.length; i += 1) {
3275            var elStyle = this[i].style;
3276            elStyle.webkitTransitionDuration = duration;
3277            elStyle.transitionDuration = duration;
3278        }
3279        return this;
3280    }
3281    // Events
3282    function on() {
3283        var assign;
3284
3285        var args = [], len = arguments.length;
3286        while ( len-- ) args[ len ] = arguments[ len ];
3287        var eventType = args[0];
3288        var targetSelector = args[1];
3289        var listener = args[2];
3290        var capture = args[3];
3291        if (typeof args[1] === 'function') {
3292            (assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
3293            targetSelector = undefined;
3294        }
3295        if (!capture) { capture = false; }
3296
3297        function handleLiveEvent(e) {
3298            var target = e.target;
3299            if (!target) { return; }
3300            var eventData = e.target.dom7EventData || [];
3301            if (eventData.indexOf(e) < 0) {
3302                eventData.unshift(e);
3303            }
3304            if ($(target).is(targetSelector)) { listener.apply(target, eventData); }
3305            else {
3306                var parents = $(target).parents(); // eslint-disable-line
3307                for (var k = 0; k < parents.length; k += 1) {
3308                    if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); }
3309                }
3310            }
3311        }
3312        function handleEvent(e) {
3313            var eventData = e && e.target ? e.target.dom7EventData || [] : [];
3314            if (eventData.indexOf(e) < 0) {
3315                eventData.unshift(e);
3316            }
3317            listener.apply(this, eventData);
3318        }
3319        var events = eventType.split(' ');
3320        var j;
3321        for (var i = 0; i < this.length; i += 1) {
3322            var el = this[i];
3323            if (!targetSelector) {
3324                for (j = 0; j < events.length; j += 1) {
3325                    var event = events[j];
3326                    if (!el.dom7Listeners) { el.dom7Listeners = {}; }
3327                    if (!el.dom7Listeners[event]) { el.dom7Listeners[event] = []; }
3328                    el.dom7Listeners[event].push({
3329                        listener: listener,
3330                        proxyListener: handleEvent,
3331                    });
3332                    el.addEventListener(event, handleEvent, capture);
3333                }
3334            } else {
3335                // Live events
3336                for (j = 0; j < events.length; j += 1) {
3337                    var event$1 = events[j];
3338                    if (!el.dom7LiveListeners) { el.dom7LiveListeners = {}; }
3339                    if (!el.dom7LiveListeners[event$1]) { el.dom7LiveListeners[event$1] = []; }
3340                    el.dom7LiveListeners[event$1].push({
3341                        listener: listener,
3342                        proxyListener: handleLiveEvent,
3343                    });
3344                    el.addEventListener(event$1, handleLiveEvent, capture);
3345                }
3346            }
3347        }
3348        return this;
3349    }
3350    function off() {
3351        var assign;
3352
3353        var args = [], len = arguments.length;
3354        while ( len-- ) args[ len ] = arguments[ len ];
3355        var eventType = args[0];
3356        var targetSelector = args[1];
3357        var listener = args[2];
3358        var capture = args[3];
3359        if (typeof args[1] === 'function') {
3360            (assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
3361            targetSelector = undefined;
3362        }
3363        if (!capture) { capture = false; }
3364
3365        var events = eventType.split(' ');
3366        for (var i = 0; i < events.length; i += 1) {
3367            var event = events[i];
3368            for (var j = 0; j < this.length; j += 1) {
3369                var el = this[j];
3370                var handlers = (void 0);
3371                if (!targetSelector && el.dom7Listeners) {
3372                    handlers = el.dom7Listeners[event];
3373                } else if (targetSelector && el.dom7LiveListeners) {
3374                    handlers = el.dom7LiveListeners[event];
3375                }
3376                if (handlers && handlers.length) {
3377                    for (var k = handlers.length - 1; k >= 0; k -= 1) {
3378                        var handler = handlers[k];
3379                        if (listener && handler.listener === listener) {
3380                            el.removeEventListener(event, handler.proxyListener, capture);
3381                            handlers.splice(k, 1);
3382                        } else if (!listener) {
3383                            el.removeEventListener(event, handler.proxyListener, capture);
3384                            handlers.splice(k, 1);
3385                        }
3386                    }
3387                }
3388            }
3389        }
3390        return this;
3391    }
3392    function trigger() {
3393        var args = [], len = arguments.length;
3394        while ( len-- ) args[ len ] = arguments[ len ];
3395
3396        var events = args[0].split(' ');
3397        var eventData = args[1];
3398        for (var i = 0; i < events.length; i += 1) {
3399            var event = events[i];
3400            for (var j = 0; j < this.length; j += 1) {
3401                var el = this[j];
3402                var evt = (void 0);
3403                try {
3404                    evt = new win.CustomEvent(event, {
3405                        detail: eventData,
3406                        bubbles: true,
3407                        cancelable: true,
3408                    });
3409                } catch (e) {
3410                    evt = doc.createEvent('Event');
3411                    evt.initEvent(event, true, true);
3412                    evt.detail = eventData;
3413                }
3414                // eslint-disable-next-line
3415                el.dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; });
3416                el.dispatchEvent(evt);
3417                el.dom7EventData = [];
3418                delete el.dom7EventData;
3419            }
3420        }
3421        return this;
3422    }
3423    function transitionEnd(callback) {
3424        var events = ['webkitTransitionEnd', 'transitionend'];
3425        var dom = this;
3426        var i;
3427        function fireCallBack(e) {
3428            /* jshint validthis:true */
3429            if (e.target !== this) { return; }
3430            callback.call(this, e);
3431            for (i = 0; i < events.length; i += 1) {
3432                dom.off(events[i], fireCallBack);
3433            }
3434        }
3435        if (callback) {
3436            for (i = 0; i < events.length; i += 1) {
3437                dom.on(events[i], fireCallBack);
3438            }
3439        }
3440        return this;
3441    }
3442    function outerWidth(includeMargins) {
3443        if (this.length > 0) {
3444            if (includeMargins) {
3445                // eslint-disable-next-line
3446                var styles = this.styles();
3447                return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));
3448            }
3449            return this[0].offsetWidth;
3450        }
3451        return null;
3452    }
3453    function outerHeight(includeMargins) {
3454        if (this.length > 0) {
3455            if (includeMargins) {
3456                // eslint-disable-next-line
3457                var styles = this.styles();
3458                return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));
3459            }
3460            return this[0].offsetHeight;
3461        }
3462        return null;
3463    }
3464    function offset() {
3465        if (this.length > 0) {
3466            var el = this[0];
3467            var box = el.getBoundingClientRect();
3468            var body = doc.body;
3469            var clientTop = el.clientTop || body.clientTop || 0;
3470            var clientLeft = el.clientLeft || body.clientLeft || 0;
3471            var scrollTop = el === win ? win.scrollY : el.scrollTop;
3472            var scrollLeft = el === win ? win.scrollX : el.scrollLeft;
3473            return {
3474                top: (box.top + scrollTop) - clientTop,
3475                left: (box.left + scrollLeft) - clientLeft,
3476            };
3477        }
3478
3479        return null;
3480    }
3481    function styles() {
3482        if (this[0]) { return win.getComputedStyle(this[0], null); }
3483        return {};
3484    }
3485    function css(props, value) {
3486        var i;
3487        if (arguments.length === 1) {
3488            if (typeof props === 'string') {
3489                if (this[0]) { return win.getComputedStyle(this[0], null).getPropertyValue(props); }
3490            } else {
3491                for (i = 0; i < this.length; i += 1) {
3492                    // eslint-disable-next-line
3493                    for (var prop in props) {
3494                        this[i].style[prop] = props[prop];
3495                    }
3496                }
3497                return this;
3498            }
3499        }
3500        if (arguments.length === 2 && typeof props === 'string') {
3501            for (i = 0; i < this.length; i += 1) {
3502                this[i].style[props] = value;
3503            }
3504            return this;
3505        }
3506        return this;
3507    }
3508    // Iterate over the collection passing elements to `callback`
3509    function each(callback) {
3510        // Don't bother continuing without a callback
3511        if (!callback) { return this; }
3512        // Iterate over the current collection
3513        for (var i = 0; i < this.length; i += 1) {
3514            // If the callback returns false
3515            if (callback.call(this[i], i, this[i]) === false) {
3516                // End the loop early
3517                return this;
3518            }
3519        }
3520        // Return `this` to allow chained DOM operations
3521        return this;
3522    }
3523    // eslint-disable-next-line
3524    function html(html) {
3525        if (typeof html === 'undefined') {
3526            return this[0] ? this[0].innerHTML : undefined;
3527        }
3528
3529        for (var i = 0; i < this.length; i += 1) {
3530            this[i].innerHTML = html;
3531        }
3532        return this;
3533    }
3534    // eslint-disable-next-line
3535    function text(text) {
3536        if (typeof text === 'undefined') {
3537            if (this[0]) {
3538                return this[0].textContent.trim();
3539            }
3540            return null;
3541        }
3542
3543        for (var i = 0; i < this.length; i += 1) {
3544            this[i].textContent = text;
3545        }
3546        return this;
3547    }
3548    function is(selector) {
3549        var el = this[0];
3550        var compareWith;
3551        var i;
3552        if (!el || typeof selector === 'undefined') { return false; }
3553        if (typeof selector === 'string') {
3554            if (el.matches) { return el.matches(selector); }
3555            else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); }
3556            else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); }
3557
3558            compareWith = $(selector);
3559            for (i = 0; i < compareWith.length; i += 1) {
3560                if (compareWith[i] === el) { return true; }
3561            }
3562            return false;
3563        } else if (selector === doc) { return el === doc; }
3564        else if (selector === win) { return el === win; }
3565
3566        if (selector.nodeType || selector instanceof Dom7) {
3567            compareWith = selector.nodeType ? [selector] : selector;
3568            for (i = 0; i < compareWith.length; i += 1) {
3569                if (compareWith[i] === el) { return true; }
3570            }
3571            return false;
3572        }
3573        return false;
3574    }
3575    function index() {
3576        var child = this[0];
3577        var i;
3578        if (child) {
3579            i = 0;
3580            // eslint-disable-next-line
3581            while ((child = child.previousSibling) !== null) {
3582                if (child.nodeType === 1) { i += 1; }
3583            }
3584            return i;
3585        }
3586        return undefined;
3587    }
3588    // eslint-disable-next-line
3589    function eq(index) {
3590        if (typeof index === 'undefined') { return this; }
3591        var length = this.length;
3592        var returnIndex;
3593        if (index > length - 1) {
3594            return new Dom7([]);
3595        }
3596        if (index < 0) {
3597            returnIndex = length + index;
3598            if (returnIndex < 0) { return new Dom7([]); }
3599            return new Dom7([this[returnIndex]]);
3600        }
3601        return new Dom7([this[index]]);
3602    }
3603    function append() {
3604        var args = [], len = arguments.length;
3605        while ( len-- ) args[ len ] = arguments[ len ];
3606
3607        var newChild;
3608
3609        for (var k = 0; k < args.length; k += 1) {
3610            newChild = args[k];
3611            for (var i = 0; i < this.length; i += 1) {
3612                if (typeof newChild === 'string') {
3613                    var tempDiv = doc.createElement('div');
3614                    tempDiv.innerHTML = newChild;
3615                    while (tempDiv.firstChild) {
3616                        this[i].appendChild(tempDiv.firstChild);
3617                    }
3618                } else if (newChild instanceof Dom7) {
3619                    for (var j = 0; j < newChild.length; j += 1) {
3620                        this[i].appendChild(newChild[j]);
3621                    }
3622                } else {
3623                    this[i].appendChild(newChild);
3624                }
3625            }
3626        }
3627
3628        return this;
3629    }
3630    function prepend(newChild) {
3631        var i;
3632        var j;
3633        for (i = 0; i < this.length; i += 1) {
3634            if (typeof newChild === 'string') {
3635                var tempDiv = doc.createElement('div');
3636                tempDiv.innerHTML = newChild;
3637                for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {
3638                    this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);
3639                }
3640            } else if (newChild instanceof Dom7) {
3641                for (j = 0; j < newChild.length; j += 1) {
3642                    this[i].insertBefore(newChild[j], this[i].childNodes[0]);
3643                }
3644            } else {
3645                this[i].insertBefore(newChild, this[i].childNodes[0]);
3646            }
3647        }
3648        return this;
3649    }
3650    function next(selector) {
3651        if (this.length > 0) {
3652            if (selector) {
3653                if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {
3654                    return new Dom7([this[0].nextElementSibling]);
3655                }
3656                return new Dom7([]);
3657            }
3658
3659            if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); }
3660            return new Dom7([]);
3661        }
3662        return new Dom7([]);
3663    }
3664    function nextAll(selector) {
3665        var nextEls = [];
3666        var el = this[0];
3667        if (!el) { return new Dom7([]); }
3668        while (el.nextElementSibling) {
3669            var next = el.nextElementSibling; // eslint-disable-line
3670            if (selector) {
3671                if ($(next).is(selector)) { nextEls.push(next); }
3672            } else { nextEls.push(next); }
3673            el = next;
3674        }
3675        return new Dom7(nextEls);
3676    }
3677    function prev(selector) {
3678        if (this.length > 0) {
3679            var el = this[0];
3680            if (selector) {
3681                if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {
3682                    return new Dom7([el.previousElementSibling]);
3683                }
3684                return new Dom7([]);
3685            }
3686
3687            if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); }
3688            return new Dom7([]);
3689        }
3690        return new Dom7([]);
3691    }
3692    function prevAll(selector) {
3693        var prevEls = [];
3694        var el = this[0];
3695        if (!el) { return new Dom7([]); }
3696        while (el.previousElementSibling) {
3697            var prev = el.previousElementSibling; // eslint-disable-line
3698            if (selector) {
3699                if ($(prev).is(selector)) { prevEls.push(prev); }
3700            } else { prevEls.push(prev); }
3701            el = prev;
3702        }
3703        return new Dom7(prevEls);
3704    }
3705    function parent(selector) {
3706        var parents = []; // eslint-disable-line
3707        for (var i = 0; i < this.length; i += 1) {
3708            if (this[i].parentNode !== null) {
3709                if (selector) {
3710                    if ($(this[i].parentNode).is(selector)) { parents.push(this[i].parentNode); }
3711                } else {
3712                    parents.push(this[i].parentNode);
3713                }
3714            }
3715        }
3716        return $(unique(parents));
3717    }
3718    function parents(selector) {
3719        var parents = []; // eslint-disable-line
3720        for (var i = 0; i < this.length; i += 1) {
3721            var parent = this[i].parentNode; // eslint-disable-line
3722            while (parent) {
3723                if (selector) {
3724                    if ($(parent).is(selector)) { parents.push(parent); }
3725                } else {
3726                    parents.push(parent);
3727                }
3728                parent = parent.parentNode;
3729            }
3730        }
3731        return $(unique(parents));
3732    }
3733    function closest(selector) {
3734        var closest = this; // eslint-disable-line
3735        if (typeof selector === 'undefined') {
3736            return new Dom7([]);
3737        }
3738        if (!closest.is(selector)) {
3739            closest = closest.parents(selector).eq(0);
3740        }
3741        return closest;
3742    }
3743    function find(selector) {
3744        var foundElements = [];
3745        for (var i = 0; i < this.length; i += 1) {
3746            var found = this[i].querySelectorAll(selector);
3747            for (var j = 0; j < found.length; j += 1) {
3748                foundElements.push(found[j]);
3749            }
3750        }
3751        return new Dom7(foundElements);
3752    }
3753    function children(selector) {
3754        var children = []; // eslint-disable-line
3755        for (var i = 0; i < this.length; i += 1) {
3756            var childNodes = this[i].childNodes;
3757
3758            for (var j = 0; j < childNodes.length; j += 1) {
3759                if (!selector) {
3760                    if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); }
3761                } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) {
3762                    children.push(childNodes[j]);
3763                }
3764            }
3765        }
3766        return new Dom7(unique(children));
3767    }
3768    function remove() {
3769        for (var i = 0; i < this.length; i += 1) {
3770            if (this[i].parentNode) { this[i].parentNode.removeChild(this[i]); }
3771        }
3772        return this;
3773    }
3774    function add() {
3775        var args = [], len = arguments.length;
3776        while ( len-- ) args[ len ] = arguments[ len ];
3777
3778        var dom = this;
3779        var i;
3780        var j;
3781        for (i = 0; i < args.length; i += 1) {
3782            var toAdd = $(args[i]);
3783            for (j = 0; j < toAdd.length; j += 1) {
3784                dom[dom.length] = toAdd[j];
3785                dom.length += 1;
3786            }
3787        }
3788        return dom;
3789    }
3790
3791    var Methods = {
3792        addClass: addClass,
3793        removeClass: removeClass,
3794        hasClass: hasClass,
3795        toggleClass: toggleClass,
3796        attr: attr,
3797        removeAttr: removeAttr,
3798        data: data,
3799        transform: transform,
3800        transition: transition,
3801        on: on,
3802        off: off,
3803        trigger: trigger,
3804        transitionEnd: transitionEnd,
3805        outerWidth: outerWidth,
3806        outerHeight: outerHeight,
3807        offset: offset,
3808        css: css,
3809        each: each,
3810        html: html,
3811        text: text,
3812        is: is,
3813        index: index,
3814        eq: eq,
3815        append: append,
3816        prepend: prepend,
3817        next: next,
3818        nextAll: nextAll,
3819        prev: prev,
3820        prevAll: prevAll,
3821        parent: parent,
3822        parents: parents,
3823        closest: closest,
3824        find: find,
3825        children: children,
3826        remove: remove,
3827        add: add,
3828        styles: styles,
3829    };
3830
3831    Object.keys(Methods).forEach(function (methodName) {
3832        $.fn[methodName] = Methods[methodName];
3833    });
3834
3835    var Utils = {
3836        deleteProps: function deleteProps(obj) {
3837            var object = obj;
3838            Object.keys(object).forEach(function (key) {
3839                try {
3840                    object[key] = null;
3841                } catch (e) {
3842                    // no getter for object
3843                }
3844                try {
3845                    delete object[key];
3846                } catch (e) {
3847                    // something got wrong
3848                }
3849            });
3850        },
3851        nextTick: function nextTick(callback, delay) {
3852            if ( delay === void 0 ) delay = 0;
3853
3854            return setTimeout(callback, delay);
3855        },
3856        now: function now() {
3857            return Date.now();
3858        },
3859        getTranslate: function getTranslate(el, axis) {
3860            if ( axis === void 0 ) axis = 'x';
3861
3862            var matrix;
3863            var curTransform;
3864            var transformMatrix;
3865
3866            var curStyle = win.getComputedStyle(el, null);
3867
3868            if (win.WebKitCSSMatrix) {
3869                curTransform = curStyle.transform || curStyle.webkitTransform;
3870                if (curTransform.split(',').length > 6) {
3871                    curTransform = curTransform.split(', ').map(function (a) { return a.replace(',', '.'); }).join(', ');
3872                }
3873                // Some old versions of Webkit choke when 'none' is passed; pass
3874                // empty string instead in this case
3875                transformMatrix = new win.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
3876            } else {
3877                transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
3878                matrix = transformMatrix.toString().split(',');
3879            }
3880
3881            if (axis === 'x') {
3882                // Latest Chrome and webkits Fix
3883                if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m41; }
3884                // Crazy IE10 Matrix
3885                else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); }
3886                // Normal Browsers
3887                else { curTransform = parseFloat(matrix[4]); }
3888            }
3889            if (axis === 'y') {
3890                // Latest Chrome and webkits Fix
3891                if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m42; }
3892                // Crazy IE10 Matrix
3893                else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); }
3894                // Normal Browsers
3895                else { curTransform = parseFloat(matrix[5]); }
3896            }
3897            return curTransform || 0;
3898        },
3899        parseUrlQuery: function parseUrlQuery(url) {
3900            var query = {};
3901            var urlToParse = url || win.location.href;
3902            var i;
3903            var params;
3904            var param;
3905            var length;
3906            if (typeof urlToParse === 'string' && urlToParse.length) {
3907                urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
3908                params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; });
3909                length = params.length;
3910
3911                for (i = 0; i < length; i += 1) {
3912                    param = params[i].replace(/#\S+/g, '').split('=');
3913                    query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
3914                }
3915            }
3916            return query;
3917        },
3918        isObject: function isObject(o) {
3919            return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
3920        },
3921        extend: function extend() {
3922            var args = [], len$1 = arguments.length;
3923            while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ];
3924
3925            var to = Object(args[0]);
3926            for (var i = 1; i < args.length; i += 1) {
3927                var nextSource = args[i];
3928                if (nextSource !== undefined && nextSource !== null) {
3929                    var keysArray = Object.keys(Object(nextSource));
3930                    for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
3931                        var nextKey = keysArray[nextIndex];
3932                        var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
3933                        if (desc !== undefined && desc.enumerable) {
3934                            if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
3935                                Utils.extend(to[nextKey], nextSource[nextKey]);
3936                            } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
3937                                to[nextKey] = {};
3938                                Utils.extend(to[nextKey], nextSource[nextKey]);
3939                            } else {
3940                                to[nextKey] = nextSource[nextKey];
3941                            }
3942                        }
3943                    }
3944                }
3945            }
3946            return to;
3947        },
3948    };
3949
3950    var Support = (function Support() {
3951        var testDiv = doc.createElement('div');
3952        return {
3953            touch: (win.Modernizr && win.Modernizr.touch === true) || (function checkTouch() {
3954                return !!((win.navigator.maxTouchPoints > 0) || ('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch));
3955            }()),
3956
3957            pointerEvents: !!(win.navigator.pointerEnabled || win.PointerEvent || ('maxTouchPoints' in win.navigator)),
3958            prefixedPointerEvents: !!win.navigator.msPointerEnabled,
3959
3960            transition: (function checkTransition() {
3961                var style = testDiv.style;
3962                return ('transition' in style || 'webkitTransition' in style || 'MozTransition' in style);
3963            }()),
3964            transforms3d: (win.Modernizr && win.Modernizr.csstransforms3d === true) || (function checkTransforms3d() {
3965                var style = testDiv.style;
3966                return ('webkitPerspective' in style || 'MozPerspective' in style || 'OPerspective' in style || 'MsPerspective' in style || 'perspective' in style);
3967            }()),
3968
3969            flexbox: (function checkFlexbox() {
3970                var style = testDiv.style;
3971                var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
3972                for (var i = 0; i < styles.length; i += 1) {
3973                    if (styles[i] in style) { return true; }
3974                }
3975                return false;
3976            }()),
3977
3978            observer: (function checkObserver() {
3979                return ('MutationObserver' in win || 'WebkitMutationObserver' in win);
3980            }()),
3981
3982            passiveListener: (function checkPassiveListener() {
3983                var supportsPassive = false;
3984                try {
3985                    var opts = Object.defineProperty({}, 'passive', {
3986                        // eslint-disable-next-line
3987                        get: function get() {
3988                            supportsPassive = true;
3989                        },
3990                    });
3991                    win.addEventListener('testPassiveListener', null, opts);
3992                } catch (e) {
3993                    // No support
3994                }
3995                return supportsPassive;
3996            }()),
3997
3998            gestures: (function checkGestures() {
3999                return 'ongesturestart' in win;
4000            }()),
4001        };
4002    }());
4003
4004    var SwiperClass = function SwiperClass(params) {
4005        if ( params === void 0 ) params = {};
4006
4007        var self = this;
4008        self.params = params;
4009
4010        // Events
4011        self.eventsListeners = {};
4012
4013        if (self.params && self.params.on) {
4014            Object.keys(self.params.on).forEach(function (eventName) {
4015                self.on(eventName, self.params.on[eventName]);
4016            });
4017        }
4018    };
4019
4020    var staticAccessors = { components: { configurable: true } };
4021
4022    SwiperClass.prototype.on = function on (events, handler, priority) {
4023        var self = this;
4024        if (typeof handler !== 'function') { return self; }
4025        var method = priority ? 'unshift' : 'push';
4026        events.split(' ').forEach(function (event) {
4027            if (!self.eventsListeners[event]) { self.eventsListeners[event] = []; }
4028            self.eventsListeners[event][method](handler);
4029        });
4030        return self;
4031    };
4032
4033    SwiperClass.prototype.once = function once (events, handler, priority) {
4034        var self = this;
4035        if (typeof handler !== 'function') { return self; }
4036        function onceHandler() {
4037            var args = [], len = arguments.length;
4038            while ( len-- ) args[ len ] = arguments[ len ];
4039
4040            handler.apply(self, args);
4041            self.off(events, onceHandler);
4042        }
4043        return self.on(events, onceHandler, priority);
4044    };
4045
4046    SwiperClass.prototype.off = function off (events, handler) {
4047        var self = this;
4048        if (!self.eventsListeners) { return self; }
4049        events.split(' ').forEach(function (event) {
4050            if (typeof handler === 'undefined') {
4051                self.eventsListeners[event] = [];
4052            } else if (self.eventsListeners[event] && self.eventsListeners[event].length) {
4053                self.eventsListeners[event].forEach(function (eventHandler, index) {
4054                    if (eventHandler === handler) {
4055                        self.eventsListeners[event].splice(index, 1);
4056                    }
4057                });
4058            }
4059        });
4060        return self;
4061    };
4062
4063    SwiperClass.prototype.emit = function emit () {
4064        var args = [], len = arguments.length;
4065        while ( len-- ) args[ len ] = arguments[ len ];
4066
4067        var self = this;
4068        if (!self.eventsListeners) { return self; }
4069        var events;
4070        var data;
4071        var context;
4072        if (typeof args[0] === 'string' || Array.isArray(args[0])) {
4073            events = args[0];
4074            data = args.slice(1, args.length);
4075            context = self;
4076        } else {
4077            events = args[0].events;
4078            data = args[0].data;
4079            context = args[0].context || self;
4080        }
4081        var eventsArray = Array.isArray(events) ? events : events.split(' ');
4082        eventsArray.forEach(function (event) {
4083            if (self.eventsListeners && self.eventsListeners[event]) {
4084                var handlers = [];
4085                self.eventsListeners[event].forEach(function (eventHandler) {
4086                    handlers.push(eventHandler);
4087                });
4088                handlers.forEach(function (eventHandler) {
4089                    eventHandler.apply(context, data);
4090                });
4091            }
4092        });
4093        return self;
4094    };
4095
4096    SwiperClass.prototype.useModulesParams = function useModulesParams (instanceParams) {
4097        var instance = this;
4098        if (!instance.modules) { return; }
4099        Object.keys(instance.modules).forEach(function (moduleName) {
4100            var module = instance.modules[moduleName];
4101            // Extend params
4102            if (module.params) {
4103                Utils.extend(instanceParams, module.params);
4104            }
4105        });
4106    };
4107
4108    SwiperClass.prototype.useModules = function useModules (modulesParams) {
4109        if ( modulesParams === void 0 ) modulesParams = {};
4110
4111        var instance = this;
4112        if (!instance.modules) { return; }
4113        Object.keys(instance.modules).forEach(function (moduleName) {
4114            var module = instance.modules[moduleName];
4115            var moduleParams = modulesParams[moduleName] || {};
4116            // Extend instance methods and props
4117            if (module.instance) {
4118                Object.keys(module.instance).forEach(function (modulePropName) {
4119                    var moduleProp = module.instance[modulePropName];
4120                    if (typeof moduleProp === 'function') {
4121                        instance[modulePropName] = moduleProp.bind(instance);
4122                    } else {
4123                        instance[modulePropName] = moduleProp;
4124                    }
4125                });
4126            }
4127            // Add event listeners
4128            if (module.on && instance.on) {
4129                Object.keys(module.on).forEach(function (moduleEventName) {
4130                    instance.on(moduleEventName, module.on[moduleEventName]);
4131                });
4132            }
4133
4134            // Module create callback
4135            if (module.create) {
4136                module.create.bind(instance)(moduleParams);
4137            }
4138        });
4139    };
4140
4141    staticAccessors.components.set = function (components) {
4142        var Class = this;
4143        if (!Class.use) { return; }
4144        Class.use(components);
4145    };
4146
4147    SwiperClass.installModule = function installModule (module) {
4148        var params = [], len = arguments.length - 1;
4149        while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ];
4150
4151        var Class = this;
4152        if (!Class.prototype.modules) { Class.prototype.modules = {}; }
4153        var name = module.name || (((Object.keys(Class.prototype.modules).length) + "_" + (Utils.now())));
4154        Class.prototype.modules[name] = module;
4155        // Prototype
4156        if (module.proto) {
4157            Object.keys(module.proto).forEach(function (key) {
4158                Class.prototype[key] = module.proto[key];
4159            });
4160        }
4161        // Class
4162        if (module.static) {
4163            Object.keys(module.static).forEach(function (key) {
4164                Class[key] = module.static[key];
4165            });
4166        }
4167        // Callback
4168        if (module.install) {
4169            module.install.apply(Class, params);
4170        }
4171        return Class;
4172    };
4173
4174    SwiperClass.use = function use (module) {
4175        var params = [], len = arguments.length - 1;
4176        while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ];
4177
4178        var Class = this;
4179        if (Array.isArray(module)) {
4180            module.forEach(function (m) { return Class.installModule(m); });
4181            return Class;
4182        }
4183        return Class.installModule.apply(Class, [ module ].concat( params ));
4184    };
4185
4186    Object.defineProperties( SwiperClass, staticAccessors );
4187
4188    function updateSize () {
4189        var swiper = this;
4190        var width;
4191        var height;
4192        var $el = swiper.$el;
4193        if (typeof swiper.params.width !== 'undefined') {
4194            width = swiper.params.width;
4195        } else {
4196            width = $el[0].clientWidth;
4197        }
4198        if (typeof swiper.params.height !== 'undefined') {
4199            height = swiper.params.height;
4200        } else {
4201            height = $el[0].clientHeight;
4202        }
4203        if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
4204            return;
4205        }
4206
4207        // Subtract paddings
4208        width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
4209        height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
4210
4211        Utils.extend(swiper, {
4212            width: width,
4213            height: height,
4214            size: swiper.isHorizontal() ? width : height,
4215        });
4216    }
4217
4218    function updateSlides () {
4219        var swiper = this;
4220        var params = swiper.params;
4221
4222        var $wrapperEl = swiper.$wrapperEl;
4223        var swiperSize = swiper.size;
4224        var rtl = swiper.rtlTranslate;
4225        var wrongRTL = swiper.wrongRTL;
4226        var isVirtual = swiper.virtual && params.virtual.enabled;
4227        var previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
4228        var slides = $wrapperEl.children(("." + (swiper.params.slideClass)));
4229        var slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
4230        var snapGrid = [];
4231        var slidesGrid = [];
4232        var slidesSizesGrid = [];
4233
4234        var offsetBefore = params.slidesOffsetBefore;
4235        if (typeof offsetBefore === 'function') {
4236            offsetBefore = params.slidesOffsetBefore.call(swiper);
4237        }
4238
4239        var offsetAfter = params.slidesOffsetAfter;
4240        if (typeof offsetAfter === 'function') {
4241            offsetAfter = params.slidesOffsetAfter.call(swiper);
4242        }
4243
4244        var previousSnapGridLength = swiper.snapGrid.length;
4245        var previousSlidesGridLength = swiper.snapGrid.length;
4246
4247        var spaceBetween = params.spaceBetween;
4248        var slidePosition = -offsetBefore;
4249        var prevSlideSize = 0;
4250        var index = 0;
4251        if (typeof swiperSize === 'undefined') {
4252            return;
4253        }
4254        if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
4255            spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
4256        }
4257
4258        swiper.virtualSize = -spaceBetween;
4259
4260        // reset margins
4261        if (rtl) { slides.css({ marginLeft: '', marginTop: '' }); }
4262        else { slides.css({ marginRight: '', marginBottom: '' }); }
4263
4264        var slidesNumberEvenToRows;
4265        if (params.slidesPerColumn > 1) {
4266            if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
4267                slidesNumberEvenToRows = slidesLength;
4268            } else {
4269                slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
4270            }
4271            if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
4272                slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
4273            }
4274        }
4275
4276        // Calc slides
4277        var slideSize;
4278        var slidesPerColumn = params.slidesPerColumn;
4279        var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
4280        var numFullColumns = Math.floor(slidesLength / params.slidesPerColumn);
4281        for (var i = 0; i < slidesLength; i += 1) {
4282            slideSize = 0;
4283            var slide = slides.eq(i);
4284            if (params.slidesPerColumn > 1) {
4285                // Set slides order
4286                var newSlideOrderIndex = (void 0);
4287                var column = (void 0);
4288                var row = (void 0);
4289                if (params.slidesPerColumnFill === 'column') {
4290                    column = Math.floor(i / slidesPerColumn);
4291                    row = i - (column * slidesPerColumn);
4292                    if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
4293                        row += 1;
4294                        if (row >= slidesPerColumn) {
4295                            row = 0;
4296                            column += 1;
4297                        }
4298                    }
4299                    newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
4300                    slide
4301                        .css({
4302                            '-webkit-box-ordinal-group': newSlideOrderIndex,
4303                            '-moz-box-ordinal-group': newSlideOrderIndex,
4304                            '-ms-flex-order': newSlideOrderIndex,
4305                            '-webkit-order': newSlideOrderIndex,
4306                            order: newSlideOrderIndex,
4307                        });
4308                } else {
4309                    row = Math.floor(i / slidesPerRow);
4310                    column = i - (row * slidesPerRow);
4311                }
4312                slide
4313                    .css(
4314                        ("margin-" + (swiper.isHorizontal() ? 'top' : 'left')),
4315                        (row !== 0 && params.spaceBetween) && (((params.spaceBetween) + "px"))
4316                    )
4317                    .attr('data-swiper-column', column)
4318                    .attr('data-swiper-row', row);
4319            }
4320            if (slide.css('display') === 'none') { continue; } // eslint-disable-line
4321
4322            if (params.slidesPerView === 'auto') {
4323                var slideStyles = win.getComputedStyle(slide[0], null);
4324                var currentTransform = slide[0].style.transform;
4325                var currentWebKitTransform = slide[0].style.webkitTransform;
4326                if (currentTransform) {
4327                    slide[0].style.transform = 'none';
4328                }
4329                if (currentWebKitTransform) {
4330                    slide[0].style.webkitTransform = 'none';
4331                }
4332                if (params.roundLengths) {
4333                    slideSize = swiper.isHorizontal()
4334                        ? slide.outerWidth(true)
4335                        : slide.outerHeight(true);
4336                } else {
4337                    // eslint-disable-next-line
4338                    if (swiper.isHorizontal()) {
4339                        var width = parseFloat(slideStyles.getPropertyValue('width'));
4340                        var paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left'));
4341                        var paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right'));
4342                        var marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left'));
4343                        var marginRight = parseFloat(slideStyles.getPropertyValue('margin-right'));
4344                        var boxSizing = slideStyles.getPropertyValue('box-sizing');
4345                        if (boxSizing && boxSizing === 'border-box') {
4346                            slideSize = width + marginLeft + marginRight;
4347                        } else {
4348                            slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight;
4349                        }
4350                    } else {
4351                        var height = parseFloat(slideStyles.getPropertyValue('height'));
4352                        var paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top'));
4353                        var paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom'));
4354                        var marginTop = parseFloat(slideStyles.getPropertyValue('margin-top'));
4355                        var marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom'));
4356                        var boxSizing$1 = slideStyles.getPropertyValue('box-sizing');
4357                        if (boxSizing$1 && boxSizing$1 === 'border-box') {
4358                            slideSize = height + marginTop + marginBottom;
4359                        } else {
4360                            slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom;
4361                        }
4362                    }
4363                }
4364                if (currentTransform) {
4365                    slide[0].style.transform = currentTransform;
4366                }
4367                if (currentWebKitTransform) {
4368                    slide[0].style.webkitTransform = currentWebKitTransform;
4369                }
4370                if (params.roundLengths) { slideSize = Math.floor(slideSize); }
4371            } else {
4372                slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
4373                if (params.roundLengths) { slideSize = Math.floor(slideSize); }
4374
4375                if (slides[i]) {
4376                    if (swiper.isHorizontal()) {
4377                        slides[i].style.width = slideSize + "px";
4378                    } else {
4379                        slides[i].style.height = slideSize + "px";
4380                    }
4381                }
4382            }
4383            if (slides[i]) {
4384                slides[i].swiperSlideSize = slideSize;
4385            }
4386            slidesSizesGrid.push(slideSize);
4387
4388
4389            if (params.centeredSlides) {
4390                slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
4391                if (prevSlideSize === 0 && i !== 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; }
4392                if (i === 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; }
4393                if (Math.abs(slidePosition) < 1 / 1000) { slidePosition = 0; }
4394                if (params.roundLengths) { slidePosition = Math.floor(slidePosition); }
4395                if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); }
4396                slidesGrid.push(slidePosition);
4397            } else {
4398                if (params.roundLengths) { slidePosition = Math.floor(slidePosition); }
4399                if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); }
4400                slidesGrid.push(slidePosition);
4401                slidePosition = slidePosition + slideSize + spaceBetween;
4402            }
4403
4404            swiper.virtualSize += slideSize + spaceBetween;
4405
4406            prevSlideSize = slideSize;
4407
4408            index += 1;
4409        }
4410        swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
4411        var newSlidesGrid;
4412
4413        if (
4414            rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
4415            $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") });
4416        }
4417        if (!Support.flexbox || params.setWrapperSize) {
4418            if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
4419            else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
4420        }
4421
4422        if (params.slidesPerColumn > 1) {
4423            swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
4424            swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
4425            if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
4426            else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
4427            if (params.centeredSlides) {
4428                newSlidesGrid = [];
4429                for (var i$1 = 0; i$1 < snapGrid.length; i$1 += 1) {
4430                    var slidesGridItem = snapGrid[i$1];
4431                    if (params.roundLengths) { slidesGridItem = Math.floor(slidesGridItem); }
4432                    if (snapGrid[i$1] < swiper.virtualSize + snapGrid[0]) { newSlidesGrid.push(slidesGridItem); }
4433                }
4434                snapGrid = newSlidesGrid;
4435            }
4436        }
4437
4438        // Remove last grid elements depending on width
4439        if (!params.centeredSlides) {
4440            newSlidesGrid = [];
4441            for (var i$2 = 0; i$2 < snapGrid.length; i$2 += 1) {
4442                var slidesGridItem$1 = snapGrid[i$2];
4443                if (params.roundLengths) { slidesGridItem$1 = Math.floor(slidesGridItem$1); }
4444                if (snapGrid[i$2] <= swiper.virtualSize - swiperSize) {
4445                    newSlidesGrid.push(slidesGridItem$1);
4446                }
4447            }
4448            snapGrid = newSlidesGrid;
4449            if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
4450                snapGrid.push(swiper.virtualSize - swiperSize);
4451            }
4452        }
4453        if (snapGrid.length === 0) { snapGrid = [0]; }
4454
4455        if (params.spaceBetween !== 0) {
4456            if (swiper.isHorizontal()) {
4457                if (rtl) { slides.css({ marginLeft: (spaceBetween + "px") }); }
4458                else { slides.css({ marginRight: (spaceBetween + "px") }); }
4459            } else { slides.css({ marginBottom: (spaceBetween + "px") }); }
4460        }
4461
4462        if (params.centerInsufficientSlides) {
4463            var allSlidesSize = 0;
4464            slidesSizesGrid.forEach(function (slideSizeValue) {
4465                allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);
4466            });
4467            allSlidesSize -= params.spaceBetween;
4468            if (allSlidesSize < swiperSize) {
4469                var allSlidesOffset = (swiperSize - allSlidesSize) / 2;
4470                snapGrid.forEach(function (snap, snapIndex) {
4471                    snapGrid[snapIndex] = snap - allSlidesOffset;
4472                });
4473                slidesGrid.forEach(function (snap, snapIndex) {
4474                    slidesGrid[snapIndex] = snap + allSlidesOffset;
4475                });
4476            }
4477        }
4478
4479        Utils.extend(swiper, {
4480            slides: slides,
4481            snapGrid: snapGrid,
4482            slidesGrid: slidesGrid,
4483            slidesSizesGrid: slidesSizesGrid,
4484        });
4485
4486        if (slidesLength !== previousSlidesLength) {
4487            swiper.emit('slidesLengthChange');
4488        }
4489        if (snapGrid.length !== previousSnapGridLength) {
4490            if (swiper.params.watchOverflow) { swiper.checkOverflow(); }
4491            swiper.emit('snapGridLengthChange');
4492        }
4493        if (slidesGrid.length !== previousSlidesGridLength) {
4494            swiper.emit('slidesGridLengthChange');
4495        }
4496
4497        if (params.watchSlidesProgress || params.watchSlidesVisibility) {
4498            swiper.updateSlidesOffset();
4499        }
4500    }
4501
4502    function updateAutoHeight (speed) {
4503        var swiper = this;
4504        var activeSlides = [];
4505        var newHeight = 0;
4506        var i;
4507        if (typeof speed === 'number') {
4508            swiper.setTransition(speed);
4509        } else if (speed === true) {
4510            swiper.setTransition(swiper.params.speed);
4511        }
4512        // Find slides currently in view
4513        if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
4514            for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
4515                var index = swiper.activeIndex + i;
4516                if (index > swiper.slides.length) { break; }
4517                activeSlides.push(swiper.slides.eq(index)[0]);
4518            }
4519        } else {
4520            activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
4521        }
4522
4523        // Find new height from highest slide in view
4524        for (i = 0; i < activeSlides.length; i += 1) {
4525            if (typeof activeSlides[i] !== 'undefined') {
4526                var height = activeSlides[i].offsetHeight;
4527                newHeight = height > newHeight ? height : newHeight;
4528            }
4529        }
4530
4531        // Update Height
4532        if (newHeight) { swiper.$wrapperEl.css('height', (newHeight + "px")); }
4533    }
4534
4535    function updateSlidesOffset () {
4536        var swiper = this;
4537        var slides = swiper.slides;
4538        for (var i = 0; i < slides.length; i += 1) {
4539            slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
4540        }
4541    }
4542
4543    function updateSlidesProgress (translate) {
4544        if ( translate === void 0 ) translate = (this && this.translate) || 0;
4545
4546        var swiper = this;
4547        var params = swiper.params;
4548
4549        var slides = swiper.slides;
4550        var rtl = swiper.rtlTranslate;
4551
4552        if (slides.length === 0) { return; }
4553        if (typeof slides[0].swiperSlideOffset === 'undefined') { swiper.updateSlidesOffset(); }
4554
4555        var offsetCenter = -translate;
4556        if (rtl) { offsetCenter = translate; }
4557
4558        // Visible Slides
4559        slides.removeClass(params.slideVisibleClass);
4560
4561        swiper.visibleSlidesIndexes = [];
4562        swiper.visibleSlides = [];
4563
4564        for (var i = 0; i < slides.length; i += 1) {
4565            var slide = slides[i];
4566            var slideProgress = (
4567                (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
4568            ) / (slide.swiperSlideSize + params.spaceBetween);
4569            if (params.watchSlidesVisibility) {
4570                var slideBefore = -(offsetCenter - slide.swiperSlideOffset);
4571                var slideAfter = slideBefore + swiper.slidesSizesGrid[i];
4572                var isVisible = (slideBefore >= 0 && slideBefore < swiper.size)
4573                    || (slideAfter > 0 && slideAfter <= swiper.size)
4574                    || (slideBefore <= 0 && slideAfter >= swiper.size);
4575                if (isVisible) {
4576                    swiper.visibleSlides.push(slide);
4577                    swiper.visibleSlidesIndexes.push(i);
4578                    slides.eq(i).addClass(params.slideVisibleClass);
4579                }
4580            }
4581            slide.progress = rtl ? -slideProgress : slideProgress;
4582        }
4583        swiper.visibleSlides = $(swiper.visibleSlides);
4584    }
4585
4586    function updateProgress (translate) {
4587        if ( translate === void 0 ) translate = (this && this.translate) || 0;
4588
4589        var swiper = this;
4590        var params = swiper.params;
4591
4592        var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
4593        var progress = swiper.progress;
4594        var isBeginning = swiper.isBeginning;
4595        var isEnd = swiper.isEnd;
4596        var wasBeginning = isBeginning;
4597        var wasEnd = isEnd;
4598        if (translatesDiff === 0) {
4599            progress = 0;
4600            isBeginning = true;
4601            isEnd = true;
4602        } else {
4603            progress = (translate - swiper.minTranslate()) / (translatesDiff);
4604            isBeginning = progress <= 0;
4605            isEnd = progress >= 1;
4606        }
4607        Utils.extend(swiper, {
4608            progress: progress,
4609            isBeginning: isBeginning,
4610            isEnd: isEnd,
4611        });
4612
4613        if (params.watchSlidesProgress || params.watchSlidesVisibility) { swiper.updateSlidesProgress(translate); }
4614
4615        if (isBeginning && !wasBeginning) {
4616            swiper.emit('reachBeginning toEdge');
4617        }
4618        if (isEnd && !wasEnd) {
4619            swiper.emit('reachEnd toEdge');
4620        }
4621        if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
4622            swiper.emit('fromEdge');
4623        }
4624
4625        swiper.emit('progress', progress);
4626    }
4627
4628    function updateSlidesClasses () {
4629        var swiper = this;
4630
4631        var slides = swiper.slides;
4632        var params = swiper.params;
4633        var $wrapperEl = swiper.$wrapperEl;
4634        var activeIndex = swiper.activeIndex;
4635        var realIndex = swiper.realIndex;
4636        var isVirtual = swiper.virtual && params.virtual.enabled;
4637
4638        slides.removeClass(((params.slideActiveClass) + " " + (params.slideNextClass) + " " + (params.slidePrevClass) + " " + (params.slideDuplicateActiveClass) + " " + (params.slideDuplicateNextClass) + " " + (params.slideDuplicatePrevClass)));
4639
4640        var activeSlide;
4641        if (isVirtual) {
4642            activeSlide = swiper.$wrapperEl.find(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + activeIndex + "\"]"));
4643        } else {
4644            activeSlide = slides.eq(activeIndex);
4645        }
4646
4647        // Active classes
4648        activeSlide.addClass(params.slideActiveClass);
4649
4650        if (params.loop) {
4651            // Duplicate to all looped slides
4652            if (activeSlide.hasClass(params.slideDuplicateClass)) {
4653                $wrapperEl
4654                    .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + realIndex + "\"]"))
4655                    .addClass(params.slideDuplicateActiveClass);
4656            } else {
4657                $wrapperEl
4658                    .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]"))
4659                    .addClass(params.slideDuplicateActiveClass);
4660            }
4661        }
4662        // Next Slide
4663        var nextSlide = activeSlide.nextAll(("." + (params.slideClass))).eq(0).addClass(params.slideNextClass);
4664        if (params.loop && nextSlide.length === 0) {
4665            nextSlide = slides.eq(0);
4666            nextSlide.addClass(params.slideNextClass);
4667        }
4668        // Prev Slide
4669        var prevSlide = activeSlide.prevAll(("." + (params.slideClass))).eq(0).addClass(params.slidePrevClass);
4670        if (params.loop && prevSlide.length === 0) {
4671            prevSlide = slides.eq(-1);
4672            prevSlide.addClass(params.slidePrevClass);
4673        }
4674        if (params.loop) {
4675            // Duplicate to all looped slides
4676            if (nextSlide.hasClass(params.slideDuplicateClass)) {
4677                $wrapperEl
4678                    .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]"))
4679                    .addClass(params.slideDuplicateNextClass);
4680            } else {
4681                $wrapperEl
4682                    .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]"))
4683                    .addClass(params.slideDuplicateNextClass);
4684            }
4685            if (prevSlide.hasClass(params.slideDuplicateClass)) {
4686                $wrapperEl
4687                    .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]"))
4688                    .addClass(params.slideDuplicatePrevClass);
4689            } else {
4690                $wrapperEl
4691                    .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]"))
4692                    .addClass(params.slideDuplicatePrevClass);
4693            }
4694        }
4695    }
4696
4697    function updateActiveIndex (newActiveIndex) {
4698        var swiper = this;
4699        var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
4700        var slidesGrid = swiper.slidesGrid;
4701        var snapGrid = swiper.snapGrid;
4702        var params = swiper.params;
4703        var previousIndex = swiper.activeIndex;
4704        var previousRealIndex = swiper.realIndex;
4705        var previousSnapIndex = swiper.snapIndex;
4706        var activeIndex = newActiveIndex;
4707        var snapIndex;
4708        if (typeof activeIndex === 'undefined') {
4709            for (var i = 0; i < slidesGrid.length; i += 1) {
4710                if (typeof slidesGrid[i + 1] !== 'undefined') {
4711                    if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
4712                        activeIndex = i;
4713                    } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
4714                        activeIndex = i + 1;
4715                    }
4716                } else if (translate >= slidesGrid[i]) {
4717                    activeIndex = i;
4718                }
4719            }
4720            // Normalize slideIndex
4721            if (params.normalizeSlideIndex) {
4722                if (activeIndex < 0 || typeof activeIndex === 'undefined') { activeIndex = 0; }
4723            }
4724        }
4725        if (snapGrid.indexOf(translate) >= 0) {
4726            snapIndex = snapGrid.indexOf(translate);
4727        } else {
4728            snapIndex = Math.floor(activeIndex / params.slidesPerGroup);
4729        }
4730        if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; }
4731        if (activeIndex === previousIndex) {
4732            if (snapIndex !== previousSnapIndex) {
4733                swiper.snapIndex = snapIndex;
4734                swiper.emit('snapIndexChange');
4735            }
4736            return;
4737        }
4738
4739        // Get real index
4740        var realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
4741
4742        Utils.extend(swiper, {
4743            snapIndex: snapIndex,
4744            realIndex: realIndex,
4745            previousIndex: previousIndex,
4746            activeIndex: activeIndex,
4747        });
4748        swiper.emit('activeIndexChange');
4749        swiper.emit('snapIndexChange');
4750        if (previousRealIndex !== realIndex) {
4751            swiper.emit('realIndexChange');
4752        }
4753        swiper.emit('slideChange');
4754    }
4755
4756    function updateClickedSlide (e) {
4757        var swiper = this;
4758        var params = swiper.params;
4759        var slide = $(e.target).closest(("." + (params.slideClass)))[0];
4760        var slideFound = false;
4761        if (slide) {
4762            for (var i = 0; i < swiper.slides.length; i += 1) {
4763                if (swiper.slides[i] === slide) { slideFound = true; }
4764            }
4765        }
4766
4767        if (slide && slideFound) {
4768            swiper.clickedSlide = slide;
4769            if (swiper.virtual && swiper.params.virtual.enabled) {
4770                swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
4771            } else {
4772                swiper.clickedIndex = $(slide).index();
4773            }
4774        } else {
4775            swiper.clickedSlide = undefined;
4776            swiper.clickedIndex = undefined;
4777            return;
4778        }
4779        if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
4780            swiper.slideToClickedSlide();
4781        }
4782    }
4783
4784    var update = {
4785        updateSize: updateSize,
4786        updateSlides: updateSlides,
4787        updateAutoHeight: updateAutoHeight,
4788        updateSlidesOffset: updateSlidesOffset,
4789        updateSlidesProgress: updateSlidesProgress,
4790        updateProgress: updateProgress,
4791        updateSlidesClasses: updateSlidesClasses,
4792        updateActiveIndex: updateActiveIndex,
4793        updateClickedSlide: updateClickedSlide,
4794    };
4795
4796    function getTranslate (axis) {
4797        if ( axis === void 0 ) axis = this.isHorizontal() ? 'x' : 'y';
4798
4799        var swiper = this;
4800
4801        var params = swiper.params;
4802        var rtl = swiper.rtlTranslate;
4803        var translate = swiper.translate;
4804        var $wrapperEl = swiper.$wrapperEl;
4805
4806        if (params.virtualTranslate) {
4807            return rtl ? -translate : translate;
4808        }
4809
4810        var currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
4811        if (rtl) { currentTranslate = -currentTranslate; }
4812
4813        return currentTranslate || 0;
4814    }
4815
4816    function setTranslate (translate, byController) {
4817        var swiper = this;
4818        var rtl = swiper.rtlTranslate;
4819        var params = swiper.params;
4820        var $wrapperEl = swiper.$wrapperEl;
4821        var progress = swiper.progress;
4822        var x = 0;
4823        var y = 0;
4824        var z = 0;
4825
4826        if (swiper.isHorizontal()) {
4827            x = rtl ? -translate : translate;
4828        } else {
4829            y = translate;
4830        }
4831
4832        if (params.roundLengths) {
4833            x = Math.floor(x);
4834            y = Math.floor(y);
4835        }
4836
4837        if (!params.virtualTranslate) {
4838            if (Support.transforms3d) { $wrapperEl.transform(("translate3d(" + x + "px, " + y + "px, " + z + "px)")); }
4839            else { $wrapperEl.transform(("translate(" + x + "px, " + y + "px)")); }
4840        }
4841        swiper.previousTranslate = swiper.translate;
4842        swiper.translate = swiper.isHorizontal() ? x : y;
4843
4844        // Check if we need to update progress
4845        var newProgress;
4846        var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
4847        if (translatesDiff === 0) {
4848            newProgress = 0;
4849        } else {
4850            newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
4851        }
4852        if (newProgress !== progress) {
4853            swiper.updateProgress(translate);
4854        }
4855
4856        swiper.emit('setTranslate', swiper.translate, byController);
4857    }
4858
4859    function minTranslate () {
4860        return (-this.snapGrid[0]);
4861    }
4862
4863    function maxTranslate () {
4864        return (-this.snapGrid[this.snapGrid.length - 1]);
4865    }
4866
4867    var translate = {
4868        getTranslate: getTranslate,
4869        setTranslate: setTranslate,
4870        minTranslate: minTranslate,
4871        maxTranslate: maxTranslate,
4872    };
4873
4874    function setTransition (duration, byController) {
4875        var swiper = this;
4876
4877        swiper.$wrapperEl.transition(duration);
4878
4879        swiper.emit('setTransition', duration, byController);
4880    }
4881
4882    function transitionStart (runCallbacks, direction) {
4883        if ( runCallbacks === void 0 ) runCallbacks = true;
4884
4885        var swiper = this;
4886        var activeIndex = swiper.activeIndex;
4887        var params = swiper.params;
4888        var previousIndex = swiper.previousIndex;
4889        if (params.autoHeight) {
4890            swiper.updateAutoHeight();
4891        }
4892
4893        var dir = direction;
4894        if (!dir) {
4895            if (activeIndex > previousIndex) { dir = 'next'; }
4896            else if (activeIndex < previousIndex) { dir = 'prev'; }
4897            else { dir = 'reset'; }
4898        }
4899
4900        swiper.emit('transitionStart');
4901
4902        if (runCallbacks && activeIndex !== previousIndex) {
4903            if (dir === 'reset') {
4904                swiper.emit('slideResetTransitionStart');
4905                return;
4906            }
4907            swiper.emit('slideChangeTransitionStart');
4908            if (dir === 'next') {
4909                swiper.emit('slideNextTransitionStart');
4910            } else {
4911                swiper.emit('slidePrevTransitionStart');
4912            }
4913        }
4914    }
4915
4916    function transitionEnd$1 (runCallbacks, direction) {
4917        if ( runCallbacks === void 0 ) runCallbacks = true;
4918
4919        var swiper = this;
4920        var activeIndex = swiper.activeIndex;
4921        var previousIndex = swiper.previousIndex;
4922        swiper.animating = false;
4923        swiper.setTransition(0);
4924
4925        var dir = direction;
4926        if (!dir) {
4927            if (activeIndex > previousIndex) { dir = 'next'; }
4928            else if (activeIndex < previousIndex) { dir = 'prev'; }
4929            else { dir = 'reset'; }
4930        }
4931
4932        swiper.emit('transitionEnd');
4933
4934        if (runCallbacks && activeIndex !== previousIndex) {
4935            if (dir === 'reset') {
4936                swiper.emit('slideResetTransitionEnd');
4937                return;
4938            }
4939            swiper.emit('slideChangeTransitionEnd');
4940            if (dir === 'next') {
4941                swiper.emit('slideNextTransitionEnd');
4942            } else {
4943                swiper.emit('slidePrevTransitionEnd');
4944            }
4945        }
4946    }
4947
4948    var transition$1 = {
4949        setTransition: setTransition,
4950        transitionStart: transitionStart,
4951        transitionEnd: transitionEnd$1,
4952    };
4953
4954    function slideTo (index, speed, runCallbacks, internal) {
4955        if ( index === void 0 ) index = 0;
4956        if ( speed === void 0 ) speed = this.params.speed;
4957        if ( runCallbacks === void 0 ) runCallbacks = true;
4958
4959        var swiper = this;
4960        var slideIndex = index;
4961        if (slideIndex < 0) { slideIndex = 0; }
4962
4963        var params = swiper.params;
4964        var snapGrid = swiper.snapGrid;
4965        var slidesGrid = swiper.slidesGrid;
4966        var previousIndex = swiper.previousIndex;
4967        var activeIndex = swiper.activeIndex;
4968        var rtl = swiper.rtlTranslate;
4969        if (swiper.animating && params.preventInteractionOnTransition) {
4970            return false;
4971        }
4972
4973        var snapIndex = Math.floor(slideIndex / params.slidesPerGroup);
4974        if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; }
4975
4976        if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
4977            swiper.emit('beforeSlideChangeStart');
4978        }
4979
4980        var translate = -snapGrid[snapIndex];
4981
4982        // Update progress
4983        swiper.updateProgress(translate);
4984
4985        // Normalize slideIndex
4986        if (params.normalizeSlideIndex) {
4987            for (var i = 0; i < slidesGrid.length; i += 1) {
4988                if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
4989                    slideIndex = i;
4990                }
4991            }
4992        }
4993        // Directions locks
4994        if (swiper.initialized && slideIndex !== activeIndex) {
4995            if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
4996                return false;
4997            }
4998            if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
4999                if ((activeIndex || 0) !== slideIndex) { return false; }
5000            }
5001        }
5002
5003        var direction;
5004        if (slideIndex > activeIndex) { direction = 'next'; }
5005        else if (slideIndex < activeIndex) { direction = 'prev'; }
5006        else { direction = 'reset'; }
5007
5008
5009        // Update Index
5010        if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
5011            swiper.updateActiveIndex(slideIndex);
5012            // Update Height
5013            if (params.autoHeight) {
5014                swiper.updateAutoHeight();
5015            }
5016            swiper.updateSlidesClasses();
5017            if (params.effect !== 'slide') {
5018                swiper.setTranslate(translate);
5019            }
5020            if (direction !== 'reset') {
5021                swiper.transitionStart(runCallbacks, direction);
5022                swiper.transitionEnd(runCallbacks, direction);
5023            }
5024            return false;
5025        }
5026
5027        if (speed === 0 || !Support.transition) {
5028            swiper.setTransition(0);
5029            swiper.setTranslate(translate);
5030            swiper.updateActiveIndex(slideIndex);
5031            swiper.updateSlidesClasses();
5032            swiper.emit('beforeTransitionStart', speed, internal);
5033            swiper.transitionStart(runCallbacks, direction);
5034            swiper.transitionEnd(runCallbacks, direction);
5035        } else {
5036            swiper.setTransition(speed);
5037            swiper.setTranslate(translate);
5038            swiper.updateActiveIndex(slideIndex);
5039            swiper.updateSlidesClasses();
5040            swiper.emit('beforeTransitionStart', speed, internal);
5041            swiper.transitionStart(runCallbacks, direction);
5042            if (!swiper.animating) {
5043                swiper.animating = true;
5044                if (!swiper.onSlideToWrapperTransitionEnd) {
5045                    swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
5046                        if (!swiper || swiper.destroyed) { return; }
5047                        if (e.target !== this) { return; }
5048                        swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
5049                        swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
5050                        swiper.onSlideToWrapperTransitionEnd = null;
5051                        delete swiper.onSlideToWrapperTransitionEnd;
5052                        swiper.transitionEnd(runCallbacks, direction);
5053                    };
5054                }
5055                swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
5056                swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
5057            }
5058        }
5059
5060        return true;
5061    }
5062
5063    function slideToLoop (index, speed, runCallbacks, internal) {
5064        if ( index === void 0 ) index = 0;
5065        if ( speed === void 0 ) speed = this.params.speed;
5066        if ( runCallbacks === void 0 ) runCallbacks = true;
5067
5068        var swiper = this;
5069        var newIndex = index;
5070        if (swiper.params.loop) {
5071            newIndex += swiper.loopedSlides;
5072        }
5073
5074        return swiper.slideTo(newIndex, speed, runCallbacks, internal);
5075    }
5076
5077    /* eslint no-unused-vars: "off" */
5078    function slideNext (speed, runCallbacks, internal) {
5079        if ( speed === void 0 ) speed = this.params.speed;
5080        if ( runCallbacks === void 0 ) runCallbacks = true;
5081
5082        var swiper = this;
5083        var params = swiper.params;
5084        var animating = swiper.animating;
5085        if (params.loop) {
5086            if (animating) { return false; }
5087            swiper.loopFix();
5088            // eslint-disable-next-line
5089            swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
5090            return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
5091        }
5092        return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
5093    }
5094
5095    /* eslint no-unused-vars: "off" */
5096    function slidePrev (speed, runCallbacks, internal) {
5097        if ( speed === void 0 ) speed = this.params.speed;
5098        if ( runCallbacks === void 0 ) runCallbacks = true;
5099
5100        var swiper = this;
5101        var params = swiper.params;
5102        var animating = swiper.animating;
5103        var snapGrid = swiper.snapGrid;
5104        var slidesGrid = swiper.slidesGrid;
5105        var rtlTranslate = swiper.rtlTranslate;
5106
5107        if (params.loop) {
5108            if (animating) { return false; }
5109            swiper.loopFix();
5110            // eslint-disable-next-line
5111            swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
5112        }
5113        var translate = rtlTranslate ? swiper.translate : -swiper.translate;
5114        function normalize(val) {
5115            if (val < 0) { return -Math.floor(Math.abs(val)); }
5116            return Math.floor(val);
5117        }
5118        var normalizedTranslate = normalize(translate);
5119        var normalizedSnapGrid = snapGrid.map(function (val) { return normalize(val); });
5120        var normalizedSlidesGrid = slidesGrid.map(function (val) { return normalize(val); });
5121
5122        var currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
5123        var prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
5124        var prevIndex;
5125        if (typeof prevSnap !== 'undefined') {
5126            prevIndex = slidesGrid.indexOf(prevSnap);
5127            if (prevIndex < 0) { prevIndex = swiper.activeIndex - 1; }
5128        }
5129        return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
5130    }
5131
5132    /* eslint no-unused-vars: "off" */
5133    function slideReset (speed, runCallbacks, internal) {
5134        if ( speed === void 0 ) speed = this.params.speed;
5135        if ( runCallbacks === void 0 ) runCallbacks = true;
5136
5137        var swiper = this;
5138        return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
5139    }
5140
5141    /* eslint no-unused-vars: "off" */
5142    function slideToClosest (speed, runCallbacks, internal) {
5143        if ( speed === void 0 ) speed = this.params.speed;
5144        if ( runCallbacks === void 0 ) runCallbacks = true;
5145
5146        var swiper = this;
5147        var index = swiper.activeIndex;
5148        var snapIndex = Math.floor(index / swiper.params.slidesPerGroup);
5149
5150        if (snapIndex < swiper.snapGrid.length - 1) {
5151            var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
5152
5153            var currentSnap = swiper.snapGrid[snapIndex];
5154            var nextSnap = swiper.snapGrid[snapIndex + 1];
5155
5156            if ((translate - currentSnap) > (nextSnap - currentSnap) / 2) {
5157                index = swiper.params.slidesPerGroup;
5158            }
5159        }
5160
5161        return swiper.slideTo(index, speed, runCallbacks, internal);
5162    }
5163
5164    function slideToClickedSlide () {
5165        var swiper = this;
5166        var params = swiper.params;
5167        var $wrapperEl = swiper.$wrapperEl;
5168
5169        var slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
5170        var slideToIndex = swiper.clickedIndex;
5171        var realIndex;
5172        if (params.loop) {
5173            if (swiper.animating) { return; }
5174            realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
5175            if (params.centeredSlides) {
5176                if (
5177                    (slideToIndex < swiper.loopedSlides - (slidesPerView / 2))
5178                    || (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
5179                ) {
5180                    swiper.loopFix();
5181                    slideToIndex = $wrapperEl
5182                        .children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")"))
5183                        .eq(0)
5184                        .index();
5185
5186                    Utils.nextTick(function () {
5187                        swiper.slideTo(slideToIndex);
5188                    });
5189                } else {
5190                    swiper.slideTo(slideToIndex);
5191                }
5192            } else if (slideToIndex > swiper.slides.length - slidesPerView) {
5193                swiper.loopFix();
5194                slideToIndex = $wrapperEl
5195                    .children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")"))
5196                    .eq(0)
5197                    .index();
5198
5199                Utils.nextTick(function () {
5200                    swiper.slideTo(slideToIndex);
5201                });
5202            } else {
5203                swiper.slideTo(slideToIndex);
5204            }
5205        } else {
5206            swiper.slideTo(slideToIndex);
5207        }
5208    }
5209
5210    var slide = {
5211        slideTo: slideTo,
5212        slideToLoop: slideToLoop,
5213        slideNext: slideNext,
5214        slidePrev: slidePrev,
5215        slideReset: slideReset,
5216        slideToClosest: slideToClosest,
5217        slideToClickedSlide: slideToClickedSlide,
5218    };
5219
5220    function loopCreate () {
5221        var swiper = this;
5222        var params = swiper.params;
5223        var $wrapperEl = swiper.$wrapperEl;
5224        // Remove duplicated slides
5225        $wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass))).remove();
5226
5227        var slides = $wrapperEl.children(("." + (params.slideClass)));
5228
5229        if (params.loopFillGroupWithBlank) {
5230            var blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
5231            if (blankSlidesNum !== params.slidesPerGroup) {
5232                for (var i = 0; i < blankSlidesNum; i += 1) {
5233                    var blankNode = $(doc.createElement('div')).addClass(((params.slideClass) + " " + (params.slideBlankClass)));
5234                    $wrapperEl.append(blankNode);
5235                }
5236                slides = $wrapperEl.children(("." + (params.slideClass)));
5237            }
5238        }
5239
5240        if (params.slidesPerView === 'auto' && !params.loopedSlides) { params.loopedSlides = slides.length; }
5241
5242        swiper.loopedSlides = parseInt(params.loopedSlides || params.slidesPerView, 10);
5243        swiper.loopedSlides += params.loopAdditionalSlides;
5244        if (swiper.loopedSlides > slides.length) {
5245            swiper.loopedSlides = slides.length;
5246        }
5247
5248        var prependSlides = [];
5249        var appendSlides = [];
5250        slides.each(function (index, el) {
5251            var slide = $(el);
5252            if (index < swiper.loopedSlides) { appendSlides.push(el); }
5253            if (index < slides.length && index >= slides.length - swiper.loopedSlides) { prependSlides.push(el); }
5254            slide.attr('data-swiper-slide-index', index);
5255        });
5256        for (var i$1 = 0; i$1 < appendSlides.length; i$1 += 1) {
5257            $wrapperEl.append($(appendSlides[i$1].cloneNode(true)).addClass(params.slideDuplicateClass));
5258        }
5259        for (var i$2 = prependSlides.length - 1; i$2 >= 0; i$2 -= 1) {
5260            $wrapperEl.prepend($(prependSlides[i$2].cloneNode(true)).addClass(params.slideDuplicateClass));
5261        }
5262    }
5263
5264    function loopFix () {
5265        var swiper = this;
5266        var params = swiper.params;
5267        var activeIndex = swiper.activeIndex;
5268        var slides = swiper.slides;
5269        var loopedSlides = swiper.loopedSlides;
5270        var allowSlidePrev = swiper.allowSlidePrev;
5271        var allowSlideNext = swiper.allowSlideNext;
5272        var snapGrid = swiper.snapGrid;
5273        var rtl = swiper.rtlTranslate;
5274        var newIndex;
5275        swiper.allowSlidePrev = true;
5276        swiper.allowSlideNext = true;
5277
5278        var snapTranslate = -snapGrid[activeIndex];
5279        var diff = snapTranslate - swiper.getTranslate();
5280
5281
5282        // Fix For Negative Oversliding
5283        if (activeIndex < loopedSlides) {
5284            newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
5285            newIndex += loopedSlides;
5286            var slideChanged = swiper.slideTo(newIndex, 0, false, true);
5287            if (slideChanged && diff !== 0) {
5288                swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
5289            }
5290        } else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex >= slides.length - loopedSlides)) {
5291            // Fix For Positive Oversliding
5292            newIndex = -slides.length + activeIndex + loopedSlides;
5293            newIndex += loopedSlides;
5294            var slideChanged$1 = swiper.slideTo(newIndex, 0, false, true);
5295            if (slideChanged$1 && diff !== 0) {
5296                swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
5297            }
5298        }
5299        swiper.allowSlidePrev = allowSlidePrev;
5300        swiper.allowSlideNext = allowSlideNext;
5301    }
5302
5303    function loopDestroy () {
5304        var swiper = this;
5305        var $wrapperEl = swiper.$wrapperEl;
5306        var params = swiper.params;
5307        var slides = swiper.slides;
5308        $wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + ",." + (params.slideClass) + "." + (params.slideBlankClass))).remove();
5309        slides.removeAttr('data-swiper-slide-index');
5310    }
5311
5312    var loop = {
5313        loopCreate: loopCreate,
5314        loopFix: loopFix,
5315        loopDestroy: loopDestroy,
5316    };
5317
5318    function setGrabCursor (moving) {
5319        var swiper = this;
5320        if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) { return; }
5321        var el = swiper.el;
5322        el.style.cursor = 'move';
5323        el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
5324        el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
5325        el.style.cursor = moving ? 'grabbing' : 'grab';
5326    }
5327
5328    function unsetGrabCursor () {
5329        var swiper = this;
5330        if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) { return; }
5331        swiper.el.style.cursor = '';
5332    }
5333
5334    var grabCursor = {
5335        setGrabCursor: setGrabCursor,
5336        unsetGrabCursor: unsetGrabCursor,
5337    };
5338
5339    function appendSlide (slides) {
5340        var swiper = this;
5341        var $wrapperEl = swiper.$wrapperEl;
5342        var params = swiper.params;
5343        if (params.loop) {
5344            swiper.loopDestroy();
5345        }
5346        if (typeof slides === 'object' && 'length' in slides) {
5347            for (var i = 0; i < slides.length; i += 1) {
5348                if (slides[i]) { $wrapperEl.append(slides[i]); }
5349            }
5350        } else {
5351            $wrapperEl.append(slides);
5352        }
5353        if (params.loop) {
5354            swiper.loopCreate();
5355        }
5356        if (!(params.observer && Support.observer)) {
5357            swiper.update();
5358        }
5359    }
5360
5361    function prependSlide (slides) {
5362        var swiper = this;
5363        var params = swiper.params;
5364        var $wrapperEl = swiper.$wrapperEl;
5365        var activeIndex = swiper.activeIndex;
5366
5367        if (params.loop) {
5368            swiper.loopDestroy();
5369        }
5370        var newActiveIndex = activeIndex + 1;
5371        if (typeof slides === 'object' && 'length' in slides) {
5372            for (var i = 0; i < slides.length; i += 1) {
5373                if (slides[i]) { $wrapperEl.prepend(slides[i]); }
5374            }
5375            newActiveIndex = activeIndex + slides.length;
5376        } else {
5377            $wrapperEl.prepend(slides);
5378        }
5379        if (params.loop) {
5380            swiper.loopCreate();
5381        }
5382        if (!(params.observer && Support.observer)) {
5383            swiper.update();
5384        }
5385        swiper.slideTo(newActiveIndex, 0, false);
5386    }
5387
5388    function addSlide (index, slides) {
5389        var swiper = this;
5390        var $wrapperEl = swiper.$wrapperEl;
5391        var params = swiper.params;
5392        var activeIndex = swiper.activeIndex;
5393        var activeIndexBuffer = activeIndex;
5394        if (params.loop) {
5395            activeIndexBuffer -= swiper.loopedSlides;
5396            swiper.loopDestroy();
5397            swiper.slides = $wrapperEl.children(("." + (params.slideClass)));
5398        }
5399        var baseLength = swiper.slides.length;
5400        if (index <= 0) {
5401            swiper.prependSlide(slides);
5402            return;
5403        }
5404        if (index >= baseLength) {
5405            swiper.appendSlide(slides);
5406            return;
5407        }
5408        var newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;
5409
5410        var slidesBuffer = [];
5411        for (var i = baseLength - 1; i >= index; i -= 1) {
5412            var currentSlide = swiper.slides.eq(i);
5413            currentSlide.remove();
5414            slidesBuffer.unshift(currentSlide);
5415        }
5416
5417        if (typeof slides === 'object' && 'length' in slides) {
5418            for (var i$1 = 0; i$1 < slides.length; i$1 += 1) {
5419                if (slides[i$1]) { $wrapperEl.append(slides[i$1]); }
5420            }
5421            newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;
5422        } else {
5423            $wrapperEl.append(slides);
5424        }
5425
5426        for (var i$2 = 0; i$2 < slidesBuffer.length; i$2 += 1) {
5427            $wrapperEl.append(slidesBuffer[i$2]);
5428        }
5429
5430        if (params.loop) {
5431            swiper.loopCreate();
5432        }
5433        if (!(params.observer && Support.observer)) {
5434            swiper.update();
5435        }
5436        if (params.loop) {
5437            swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
5438        } else {
5439            swiper.slideTo(newActiveIndex, 0, false);
5440        }
5441    }
5442
5443    function removeSlide (slidesIndexes) {
5444        var swiper = this;
5445        var params = swiper.params;
5446        var $wrapperEl = swiper.$wrapperEl;
5447        var activeIndex = swiper.activeIndex;
5448
5449        var activeIndexBuffer = activeIndex;
5450        if (params.loop) {
5451            activeIndexBuffer -= swiper.loopedSlides;
5452            swiper.loopDestroy();
5453            swiper.slides = $wrapperEl.children(("." + (params.slideClass)));
5454        }
5455        var newActiveIndex = activeIndexBuffer;
5456        var indexToRemove;
5457
5458        if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
5459            for (var i = 0; i < slidesIndexes.length; i += 1) {
5460                indexToRemove = slidesIndexes[i];
5461                if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); }
5462                if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; }
5463            }
5464            newActiveIndex = Math.max(newActiveIndex, 0);
5465        } else {
5466            indexToRemove = slidesIndexes;
5467            if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); }
5468            if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; }
5469            newActiveIndex = Math.max(newActiveIndex, 0);
5470        }
5471
5472        if (params.loop) {
5473            swiper.loopCreate();
5474        }
5475
5476        if (!(params.observer && Support.observer)) {
5477            swiper.update();
5478        }
5479        if (params.loop) {
5480            swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
5481        } else {
5482            swiper.slideTo(newActiveIndex, 0, false);
5483        }
5484    }
5485
5486    function removeAllSlides () {
5487        var swiper = this;
5488
5489        var slidesIndexes = [];
5490        for (var i = 0; i < swiper.slides.length; i += 1) {
5491            slidesIndexes.push(i);
5492        }
5493        swiper.removeSlide(slidesIndexes);
5494    }
5495
5496    var manipulation = {
5497        appendSlide: appendSlide,
5498        prependSlide: prependSlide,
5499        addSlide: addSlide,
5500        removeSlide: removeSlide,
5501        removeAllSlides: removeAllSlides,
5502    };
5503
5504    var Device = (function Device() {
5505        var ua = win.navigator.userAgent;
5506
5507        var device = {
5508            ios: false,
5509            android: false,
5510            androidChrome: false,
5511            desktop: false,
5512            windows: false,
5513            iphone: false,
5514            ipod: false,
5515            ipad: false,
5516            cordova: win.cordova || win.phonegap,
5517            phonegap: win.cordova || win.phonegap,
5518        };
5519
5520        var windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); // eslint-disable-line
5521        var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
5522        var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
5523        var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
5524        var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
5525
5526
5527        // Windows
5528        if (windows) {
5529            device.os = 'windows';
5530            device.osVersion = windows[2];
5531            device.windows = true;
5532        }
5533        // Android
5534        if (android && !windows) {
5535            device.os = 'android';
5536            device.osVersion = android[2];
5537            device.android = true;
5538            device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
5539        }
5540        if (ipad || iphone || ipod) {
5541            device.os = 'ios';
5542            device.ios = true;
5543        }
5544        // iOS
5545        if (iphone && !ipod) {
5546            device.osVersion = iphone[2].replace(/_/g, '.');
5547            device.iphone = true;
5548        }
5549        if (ipad) {
5550            device.osVersion = ipad[2].replace(/_/g, '.');
5551            device.ipad = true;
5552        }
5553        if (ipod) {
5554            device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
5555            device.iphone = true;
5556        }
5557        // iOS 8+ changed UA
5558        if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
5559            if (device.osVersion.split('.')[0] === '10') {
5560                device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
5561            }
5562        }
5563
5564        // Desktop
5565        device.desktop = !(device.os || device.android || device.webView);
5566
5567        // Webview
5568        device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);
5569
5570        // Minimal UI
5571        if (device.os && device.os === 'ios') {
5572            var osVersionArr = device.osVersion.split('.');
5573            var metaViewport = doc.querySelector('meta[name="viewport"]');
5574            device.minimalUi = !device.webView
5575                && (ipod || iphone)
5576                && (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7)
5577                && metaViewport && metaViewport.getAttribute('content').indexOf('minimal-ui') >= 0;
5578        }
5579
5580        // Pixel Ratio
5581        device.pixelRatio = win.devicePixelRatio || 1;
5582
5583        // Export object
5584        return device;
5585    }());
5586
5587    function onTouchStart (event) {
5588        var swiper = this;
5589        var data = swiper.touchEventsData;
5590        var params = swiper.params;
5591        var touches = swiper.touches;
5592        if (swiper.animating && params.preventInteractionOnTransition) {
5593            return;
5594        }
5595        var e = event;
5596        if (e.originalEvent) { e = e.originalEvent; }
5597        data.isTouchEvent = e.type === 'touchstart';
5598        if (!data.isTouchEvent && 'which' in e && e.which === 3) { return; }
5599        if (!data.isTouchEvent && 'button' in e && e.button > 0) { return; }
5600        if (data.isTouched && data.isMoved) { return; }
5601        if (params.noSwiping && $(e.target).closest(params.noSwipingSelector ? params.noSwipingSelector : ("." + (params.noSwipingClass)))[0]) {
5602            swiper.allowClick = true;
5603            return;
5604        }
5605        if (params.swipeHandler) {
5606            if (!$(e).closest(params.swipeHandler)[0]) { return; }
5607        }
5608
5609        touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
5610        touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
5611        var startX = touches.currentX;
5612        var startY = touches.currentY;
5613
5614        // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
5615
5616        var edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
5617        var edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
5618        if (
5619            edgeSwipeDetection
5620            && ((startX <= edgeSwipeThreshold)
5621            || (startX >= win.screen.width - edgeSwipeThreshold))
5622        ) {
5623            return;
5624        }
5625
5626        Utils.extend(data, {
5627            isTouched: true,
5628            isMoved: false,
5629            allowTouchCallbacks: true,
5630            isScrolling: undefined,
5631            startMoving: undefined,
5632        });
5633
5634        touches.startX = startX;
5635        touches.startY = startY;
5636        data.touchStartTime = Utils.now();
5637        swiper.allowClick = true;
5638        swiper.updateSize();
5639        swiper.swipeDirection = undefined;
5640        if (params.threshold > 0) { data.allowThresholdMove = false; }
5641        if (e.type !== 'touchstart') {
5642            var preventDefault = true;
5643            if ($(e.target).is(data.formElements)) { preventDefault = false; }
5644            if (
5645                doc.activeElement
5646                && $(doc.activeElement).is(data.formElements)
5647                && doc.activeElement !== e.target
5648            ) {
5649                doc.activeElement.blur();
5650            }
5651
5652            var shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
5653            if (params.touchStartForcePreventDefault || shouldPreventDefault) {
5654                e.preventDefault();
5655            }
5656        }
5657        swiper.emit('touchStart', e);
5658    }
5659
5660    function onTouchMove (event) {
5661        var swiper = this;
5662        var data = swiper.touchEventsData;
5663        var params = swiper.params;
5664        var touches = swiper.touches;
5665        var rtl = swiper.rtlTranslate;
5666        var e = event;
5667        if (e.originalEvent) { e = e.originalEvent; }
5668        if (!data.isTouched) {
5669            if (data.startMoving && data.isScrolling) {
5670                swiper.emit('touchMoveOpposite', e);
5671            }
5672            return;
5673        }
5674        if (data.isTouchEvent && e.type === 'mousemove') { return; }
5675        var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
5676        var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
5677        if (e.preventedByNestedSwiper) {
5678            touches.startX = pageX;
5679            touches.startY = pageY;
5680            return;
5681        }
5682        if (!swiper.allowTouchMove) {
5683            // isMoved = true;
5684            swiper.allowClick = false;
5685            if (data.isTouched) {
5686                Utils.extend(touches, {
5687                    startX: pageX,
5688                    startY: pageY,
5689                    currentX: pageX,
5690                    currentY: pageY,
5691                });
5692                data.touchStartTime = Utils.now();
5693            }
5694            return;
5695        }
5696        if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
5697            if (swiper.isVertical()) {
5698                // Vertical
5699                if (
5700                    (pageY < touches.startY && swiper.translate <= swiper.maxTranslate())
5701                    || (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
5702                ) {
5703                    data.isTouched = false;
5704                    data.isMoved = false;
5705                    return;
5706                }
5707            } else if (
5708                (pageX < touches.startX && swiper.translate <= swiper.maxTranslate())
5709                || (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
5710            ) {
5711                return;
5712            }
5713        }
5714        if (data.isTouchEvent && doc.activeElement) {
5715            if (e.target === doc.activeElement && $(e.target).is(data.formElements)) {
5716                data.isMoved = true;
5717                swiper.allowClick = false;
5718                return;
5719            }
5720        }
5721        if (data.allowTouchCallbacks) {
5722            swiper.emit('touchMove', e);
5723        }
5724        if (e.targetTouches && e.targetTouches.length > 1) { return; }
5725
5726        touches.currentX = pageX;
5727        touches.currentY = pageY;
5728
5729        var diffX = touches.currentX - touches.startX;
5730        var diffY = touches.currentY - touches.startY;
5731        if (swiper.params.threshold && Math.sqrt((Math.pow( diffX, 2 )) + (Math.pow( diffY, 2 ))) < swiper.params.threshold) { return; }
5732
5733        if (typeof data.isScrolling === 'undefined') {
5734            var touchAngle;
5735            if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
5736                data.isScrolling = false;
5737            } else {
5738                // eslint-disable-next-line
5739                if ((diffX * diffX) + (diffY * diffY) >= 25) {
5740                    touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
5741                    data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
5742                }
5743            }
5744        }
5745        if (data.isScrolling) {
5746            swiper.emit('touchMoveOpposite', e);
5747        }
5748        if (typeof data.startMoving === 'undefined') {
5749            if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
5750                data.startMoving = true;
5751            }
5752        }
5753        if (data.isScrolling) {
5754            data.isTouched = false;
5755            return;
5756        }
5757        if (!data.startMoving) {
5758            return;
5759        }
5760        swiper.allowClick = false;
5761        e.preventDefault();
5762        if (params.touchMoveStopPropagation && !params.nested) {
5763            e.stopPropagation();
5764        }
5765
5766        if (!data.isMoved) {
5767            if (params.loop) {
5768                swiper.loopFix();
5769            }
5770            data.startTranslate = swiper.getTranslate();
5771            swiper.setTransition(0);
5772            if (swiper.animating) {
5773                swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
5774            }
5775            data.allowMomentumBounce = false;
5776            // Grab Cursor
5777            if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
5778                swiper.setGrabCursor(true);
5779            }
5780            swiper.emit('sliderFirstMove', e);
5781        }
5782        swiper.emit('sliderMove', e);
5783        data.isMoved = true;
5784
5785        var diff = swiper.isHorizontal() ? diffX : diffY;
5786        touches.diff = diff;
5787
5788        diff *= params.touchRatio;
5789        if (rtl) { diff = -diff; }
5790
5791        swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
5792        data.currentTranslate = diff + data.startTranslate;
5793
5794        var disableParentSwiper = true;
5795        var resistanceRatio = params.resistanceRatio;
5796        if (params.touchReleaseOnEdges) {
5797            resistanceRatio = 0;
5798        }
5799        if ((diff > 0 && data.currentTranslate > swiper.minTranslate())) {
5800            disableParentSwiper = false;
5801            if (params.resistance) { data.currentTranslate = (swiper.minTranslate() - 1) + (Math.pow( (-swiper.minTranslate() + data.startTranslate + diff), resistanceRatio )); }
5802        } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {
5803            disableParentSwiper = false;
5804            if (params.resistance) { data.currentTranslate = (swiper.maxTranslate() + 1) - (Math.pow( (swiper.maxTranslate() - data.startTranslate - diff), resistanceRatio )); }
5805        }
5806
5807        if (disableParentSwiper) {
5808            e.preventedByNestedSwiper = true;
5809        }
5810
5811        // Directions locks
5812        if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {
5813            data.currentTranslate = data.startTranslate;
5814        }
5815        if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {
5816            data.currentTranslate = data.startTranslate;
5817        }
5818
5819
5820        // Threshold
5821        if (params.threshold > 0) {
5822            if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
5823                if (!data.allowThresholdMove) {
5824                    data.allowThresholdMove = true;
5825                    touches.startX = touches.currentX;
5826                    touches.startY = touches.currentY;
5827                    data.currentTranslate = data.startTranslate;
5828                    touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
5829                    return;
5830                }
5831            } else {
5832                data.currentTranslate = data.startTranslate;
5833                return;
5834            }
5835        }
5836
5837        if (!params.followFinger) { return; }
5838
5839        // Update active index in free mode
5840        if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
5841            swiper.updateActiveIndex();
5842            swiper.updateSlidesClasses();
5843        }
5844        if (params.freeMode) {
5845            // Velocity
5846            if (data.velocities.length === 0) {
5847                data.velocities.push({
5848                    position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
5849                    time: data.touchStartTime,
5850                });
5851            }
5852            data.velocities.push({
5853                position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
5854                time: Utils.now(),
5855            });
5856        }
5857        // Update progress
5858        swiper.updateProgress(data.currentTranslate);
5859        // Update translate
5860        swiper.setTranslate(data.currentTranslate);
5861    }
5862
5863    function onTouchEnd (event) {
5864        var swiper = this;
5865        var data = swiper.touchEventsData;
5866
5867        var params = swiper.params;
5868        var touches = swiper.touches;
5869        var rtl = swiper.rtlTranslate;
5870        var $wrapperEl = swiper.$wrapperEl;
5871        var slidesGrid = swiper.slidesGrid;
5872        var snapGrid = swiper.snapGrid;
5873        var e = event;
5874        if (e.originalEvent) { e = e.originalEvent; }
5875        if (data.allowTouchCallbacks) {
5876            swiper.emit('touchEnd', e);
5877        }
5878        data.allowTouchCallbacks = false;
5879        if (!data.isTouched) {
5880            if (data.isMoved && params.grabCursor) {
5881                swiper.setGrabCursor(false);
5882            }
5883            data.isMoved = false;
5884            data.startMoving = false;
5885            return;
5886        }
5887        // Return Grab Cursor
5888        if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
5889            swiper.setGrabCursor(false);
5890        }
5891
5892        // Time diff
5893        var touchEndTime = Utils.now();
5894        var timeDiff = touchEndTime - data.touchStartTime;
5895
5896        // Tap, doubleTap, Click
5897        if (swiper.allowClick) {
5898            swiper.updateClickedSlide(e);
5899            swiper.emit('tap', e);
5900            if (timeDiff < 300 && (touchEndTime - data.lastClickTime) > 300) {
5901                if (data.clickTimeout) { clearTimeout(data.clickTimeout); }
5902                data.clickTimeout = Utils.nextTick(function () {
5903                    if (!swiper || swiper.destroyed) { return; }
5904                    swiper.emit('click', e);
5905                }, 300);
5906            }
5907            if (timeDiff < 300 && (touchEndTime - data.lastClickTime) < 300) {
5908                if (data.clickTimeout) { clearTimeout(data.clickTimeout); }
5909                swiper.emit('doubleTap', e);
5910            }
5911        }
5912
5913        data.lastClickTime = Utils.now();
5914        Utils.nextTick(function () {
5915            if (!swiper.destroyed) { swiper.allowClick = true; }
5916        });
5917
5918        if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {
5919            data.isTouched = false;
5920            data.isMoved = false;
5921            data.startMoving = false;
5922            return;
5923        }
5924        data.isTouched = false;
5925        data.isMoved = false;
5926        data.startMoving = false;
5927
5928        var currentPos;
5929        if (params.followFinger) {
5930            currentPos = rtl ? swiper.translate : -swiper.translate;
5931        } else {
5932            currentPos = -data.currentTranslate;
5933        }
5934
5935        if (params.freeMode) {
5936            if (currentPos < -swiper.minTranslate()) {
5937                swiper.slideTo(swiper.activeIndex);
5938                return;
5939            }
5940            if (currentPos > -swiper.maxTranslate()) {
5941                if (swiper.slides.length < snapGrid.length) {
5942                    swiper.slideTo(snapGrid.length - 1);
5943                } else {
5944                    swiper.slideTo(swiper.slides.length - 1);
5945                }
5946                return;
5947            }
5948
5949            if (params.freeModeMomentum) {
5950                if (data.velocities.length > 1) {
5951                    var lastMoveEvent = data.velocities.pop();
5952                    var velocityEvent = data.velocities.pop();
5953
5954                    var distance = lastMoveEvent.position - velocityEvent.position;
5955                    var time = lastMoveEvent.time - velocityEvent.time;
5956                    swiper.velocity = distance / time;
5957                    swiper.velocity /= 2;
5958                    if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
5959                        swiper.velocity = 0;
5960                    }
5961                    // this implies that the user stopped moving a finger then released.
5962                    // There would be no events with distance zero, so the last event is stale.
5963                    if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
5964                        swiper.velocity = 0;
5965                    }
5966                } else {
5967                    swiper.velocity = 0;
5968                }
5969                swiper.velocity *= params.freeModeMomentumVelocityRatio;
5970
5971                data.velocities.length = 0;
5972                var momentumDuration = 1000 * params.freeModeMomentumRatio;
5973                var momentumDistance = swiper.velocity * momentumDuration;
5974
5975                var newPosition = swiper.translate + momentumDistance;
5976                if (rtl) { newPosition = -newPosition; }
5977
5978                var doBounce = false;
5979                var afterBouncePosition;
5980                var bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
5981                var needsLoopFix;
5982                if (newPosition < swiper.maxTranslate()) {
5983                    if (params.freeModeMomentumBounce) {
5984                        if (newPosition + swiper.maxTranslate() < -bounceAmount) {
5985                            newPosition = swiper.maxTranslate() - bounceAmount;
5986                        }
5987                        afterBouncePosition = swiper.maxTranslate();
5988                        doBounce = true;
5989                        data.allowMomentumBounce = true;
5990                    } else {
5991                        newPosition = swiper.maxTranslate();
5992                    }
5993                    if (params.loop && params.centeredSlides) { needsLoopFix = true; }
5994                } else if (newPosition > swiper.minTranslate()) {
5995                    if (params.freeModeMomentumBounce) {
5996                        if (newPosition - swiper.minTranslate() > bounceAmount) {
5997                            newPosition = swiper.minTranslate() + bounceAmount;
5998                        }
5999                        afterBouncePosition = swiper.minTranslate();
6000                        doBounce = true;
6001                        data.allowMomentumBounce = true;
6002                    } else {
6003                        newPosition = swiper.minTranslate();
6004                    }
6005                    if (params.loop && params.centeredSlides) { needsLoopFix = true; }
6006                } else if (params.freeModeSticky) {
6007                    var nextSlide;
6008                    for (var j = 0; j < snapGrid.length; j += 1) {
6009                        if (snapGrid[j] > -newPosition) {
6010                            nextSlide = j;
6011                            break;
6012                        }
6013                    }
6014
6015                    if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
6016                        newPosition = snapGrid[nextSlide];
6017                    } else {
6018                        newPosition = snapGrid[nextSlide - 1];
6019                    }
6020                    newPosition = -newPosition;
6021                }
6022                if (needsLoopFix) {
6023                    swiper.once('transitionEnd', function () {
6024                        swiper.loopFix();
6025                    });
6026                }
6027                // Fix duration
6028                if (swiper.velocity !== 0) {
6029                    if (rtl) {
6030                        momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
6031                    } else {
6032                        momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
6033                    }
6034                } else if (params.freeModeSticky) {
6035                    swiper.slideToClosest();
6036                    return;
6037                }
6038
6039                if (params.freeModeMomentumBounce && doBounce) {
6040                    swiper.updateProgress(afterBouncePosition);
6041                    swiper.setTransition(momentumDuration);
6042                    swiper.setTranslate(newPosition);
6043                    swiper.transitionStart(true, swiper.swipeDirection);
6044                    swiper.animating = true;
6045                    $wrapperEl.transitionEnd(function () {
6046                        if (!swiper || swiper.destroyed || !data.allowMomentumBounce) { return; }
6047                        swiper.emit('momentumBounce');
6048
6049                        swiper.setTransition(params.speed);
6050                        swiper.setTranslate(afterBouncePosition);
6051                        $wrapperEl.transitionEnd(function () {
6052                            if (!swiper || swiper.destroyed) { return; }
6053                            swiper.transitionEnd();
6054                        });
6055                    });
6056                } else if (swiper.velocity) {
6057                    swiper.updateProgress(newPosition);
6058                    swiper.setTransition(momentumDuration);
6059                    swiper.setTranslate(newPosition);
6060                    swiper.transitionStart(true, swiper.swipeDirection);
6061                    if (!swiper.animating) {
6062                        swiper.animating = true;
6063                        $wrapperEl.transitionEnd(function () {
6064                            if (!swiper || swiper.destroyed) { return; }
6065                            swiper.transitionEnd();
6066                        });
6067                    }
6068                } else {
6069                    swiper.updateProgress(newPosition);
6070                }
6071
6072                swiper.updateActiveIndex();
6073                swiper.updateSlidesClasses();
6074            } else if (params.freeModeSticky) {
6075                swiper.slideToClosest();
6076                return;
6077            }
6078
6079            if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
6080                swiper.updateProgress();
6081                swiper.updateActiveIndex();
6082                swiper.updateSlidesClasses();
6083            }
6084            return;
6085        }
6086
6087        // Find current slide
6088        var stopIndex = 0;
6089        var groupSize = swiper.slidesSizesGrid[0];
6090        for (var i = 0; i < slidesGrid.length; i += params.slidesPerGroup) {
6091            if (typeof slidesGrid[i + params.slidesPerGroup] !== 'undefined') {
6092                if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + params.slidesPerGroup]) {
6093                    stopIndex = i;
6094                    groupSize = slidesGrid[i + params.slidesPerGroup] - slidesGrid[i];
6095                }
6096            } else if (currentPos >= slidesGrid[i]) {
6097                stopIndex = i;
6098                groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
6099            }
6100        }
6101
6102        // Find current slide size
6103        var ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
6104
6105        if (timeDiff > params.longSwipesMs) {
6106            // Long touches
6107            if (!params.longSwipes) {
6108                swiper.slideTo(swiper.activeIndex);
6109                return;
6110            }
6111            if (swiper.swipeDirection === 'next') {
6112                if (ratio >= params.longSwipesRatio) { swiper.slideTo(stopIndex + params.slidesPerGroup); }
6113                else { swiper.slideTo(stopIndex); }
6114            }
6115            if (swiper.swipeDirection === 'prev') {
6116                if (ratio > (1 - params.longSwipesRatio)) { swiper.slideTo(stopIndex + params.slidesPerGroup); }
6117                else { swiper.slideTo(stopIndex); }
6118            }
6119        } else {
6120            // Short swipes
6121            if (!params.shortSwipes) {
6122                swiper.slideTo(swiper.activeIndex);
6123                return;
6124            }
6125            if (swiper.swipeDirection === 'next') {
6126                swiper.slideTo(stopIndex + params.slidesPerGroup);
6127            }
6128            if (swiper.swipeDirection === 'prev') {
6129                swiper.slideTo(stopIndex);
6130            }
6131        }
6132    }
6133
6134    function onResize () {
6135        var swiper = this;
6136
6137        var params = swiper.params;
6138        var el = swiper.el;
6139
6140        if (el && el.offsetWidth === 0) { return; }
6141
6142        // Breakpoints
6143        if (params.breakpoints) {
6144            swiper.setBreakpoint();
6145        }
6146
6147        // Save locks
6148        var allowSlideNext = swiper.allowSlideNext;
6149        var allowSlidePrev = swiper.allowSlidePrev;
6150        var snapGrid = swiper.snapGrid;
6151
6152        // Disable locks on resize
6153        swiper.allowSlideNext = true;
6154        swiper.allowSlidePrev = true;
6155
6156        swiper.updateSize();
6157        swiper.updateSlides();
6158
6159        if (params.freeMode) {
6160            var newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate());
6161            swiper.setTranslate(newTranslate);
6162            swiper.updateActiveIndex();
6163            swiper.updateSlidesClasses();
6164
6165            if (params.autoHeight) {
6166                swiper.updateAutoHeight();
6167            }
6168        } else {
6169            swiper.updateSlidesClasses();
6170            if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
6171                swiper.slideTo(swiper.slides.length - 1, 0, false, true);
6172            } else {
6173                swiper.slideTo(swiper.activeIndex, 0, false, true);
6174            }
6175        }
6176        // Return locks after resize
6177        swiper.allowSlidePrev = allowSlidePrev;
6178        swiper.allowSlideNext = allowSlideNext;
6179
6180        if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
6181            swiper.checkOverflow();
6182        }
6183    }
6184
6185    function onClick (e) {
6186        var swiper = this;
6187        if (!swiper.allowClick) {
6188            if (swiper.params.preventClicks) { e.preventDefault(); }
6189            if (swiper.params.preventClicksPropagation && swiper.animating) {
6190                e.stopPropagation();
6191                e.stopImmediatePropagation();
6192            }
6193        }
6194    }
6195
6196    function attachEvents() {
6197        var swiper = this;
6198        var params = swiper.params;
6199        var touchEvents = swiper.touchEvents;
6200        var el = swiper.el;
6201        var wrapperEl = swiper.wrapperEl;
6202
6203        {
6204            swiper.onTouchStart = onTouchStart.bind(swiper);
6205            swiper.onTouchMove = onTouchMove.bind(swiper);
6206            swiper.onTouchEnd = onTouchEnd.bind(swiper);
6207        }
6208
6209        swiper.onClick = onClick.bind(swiper);
6210
6211        var target = params.touchEventsTarget === 'container' ? el : wrapperEl;
6212        var capture = !!params.nested;
6213
6214        // Touch Events
6215        {
6216            if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
6217                target.addEventListener(touchEvents.start, swiper.onTouchStart, false);
6218                doc.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
6219                doc.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
6220            } else {
6221                if (Support.touch) {
6222                    var passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
6223                    target.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
6224                    target.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture: capture } : capture);
6225                    target.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
6226                }
6227                if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
6228                    target.addEventListener('mousedown', swiper.onTouchStart, false);
6229                    doc.addEventListener('mousemove', swiper.onTouchMove, capture);
6230                    doc.addEventListener('mouseup', swiper.onTouchEnd, false);
6231                }
6232            }
6233            // Prevent Links Clicks
6234            if (params.preventClicks || params.preventClicksPropagation) {
6235                target.addEventListener('click', swiper.onClick, true);
6236            }
6237        }
6238
6239        // Resize handler
6240        swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
6241    }
6242
6243    function detachEvents() {
6244        var swiper = this;
6245
6246        var params = swiper.params;
6247        var touchEvents = swiper.touchEvents;
6248        var el = swiper.el;
6249        var wrapperEl = swiper.wrapperEl;
6250
6251        var target = params.touchEventsTarget === 'container' ? el : wrapperEl;
6252        var capture = !!params.nested;
6253
6254        // Touch Events
6255        {
6256            if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
6257                target.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
6258                doc.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
6259                doc.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
6260            } else {
6261                if (Support.touch) {
6262                    var passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
6263                    target.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
6264                    target.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
6265                    target.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
6266                }
6267                if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
6268                    target.removeEventListener('mousedown', swiper.onTouchStart, false);
6269                    doc.removeEventListener('mousemove', swiper.onTouchMove, capture);
6270                    doc.removeEventListener('mouseup', swiper.onTouchEnd, false);
6271                }
6272            }
6273            // Prevent Links Clicks
6274            if (params.preventClicks || params.preventClicksPropagation) {
6275                target.removeEventListener('click', swiper.onClick, true);
6276            }
6277        }
6278
6279        // Resize handler
6280        swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
6281    }
6282
6283    var events = {
6284        attachEvents: attachEvents,
6285        detachEvents: detachEvents,
6286    };
6287
6288    function setBreakpoint () {
6289        var swiper = this;
6290        var activeIndex = swiper.activeIndex;
6291        var initialized = swiper.initialized;
6292        var loopedSlides = swiper.loopedSlides; if ( loopedSlides === void 0 ) loopedSlides = 0;
6293        var params = swiper.params;
6294        var breakpoints = params.breakpoints;
6295        if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) { return; }
6296
6297        // Set breakpoint for window width and update parameters
6298        var breakpoint = swiper.getBreakpoint(breakpoints);
6299
6300        if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
6301            var breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
6302            if (breakpointOnlyParams) {
6303                ['slidesPerView', 'spaceBetween', 'slidesPerGroup'].forEach(function (param) {
6304                    var paramValue = breakpointOnlyParams[param];
6305                    if (typeof paramValue === 'undefined') { return; }
6306                    if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) {
6307                        breakpointOnlyParams[param] = 'auto';
6308                    } else if (param === 'slidesPerView') {
6309                        breakpointOnlyParams[param] = parseFloat(paramValue);
6310                    } else {
6311                        breakpointOnlyParams[param] = parseInt(paramValue, 10);
6312                    }
6313                });
6314            }
6315
6316            var breakpointParams = breakpointOnlyParams || swiper.originalParams;
6317            var needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView);
6318
6319            Utils.extend(swiper.params, breakpointParams);
6320
6321            Utils.extend(swiper, {
6322                allowTouchMove: swiper.params.allowTouchMove,
6323                allowSlideNext: swiper.params.allowSlideNext,
6324                allowSlidePrev: swiper.params.allowSlidePrev,
6325            });
6326
6327            swiper.currentBreakpoint = breakpoint;
6328
6329            if (needsReLoop && initialized) {
6330                swiper.loopDestroy();
6331                swiper.loopCreate();
6332                swiper.updateSlides();
6333                swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
6334            }
6335            swiper.emit('breakpoint', breakpointParams);
6336        }
6337    }
6338
6339    function getBreakpoint (breakpoints) {
6340        var swiper = this;
6341        // Get breakpoint for window width
6342        if (!breakpoints) { return undefined; }
6343        var breakpoint = false;
6344        var points = [];
6345        Object.keys(breakpoints).forEach(function (point) {
6346            points.push(point);
6347        });
6348        points.sort(function (a, b) { return parseInt(a, 10) - parseInt(b, 10); });
6349        for (var i = 0; i < points.length; i += 1) {
6350            var point = points[i];
6351            if (swiper.params.breakpointsInverse) {
6352                if (point <= win.innerWidth) {
6353                    breakpoint = point;
6354                }
6355            } else if (point >= win.innerWidth && !breakpoint) {
6356                breakpoint = point;
6357            }
6358        }
6359        return breakpoint || 'max';
6360    }
6361
6362    var breakpoints = { setBreakpoint: setBreakpoint, getBreakpoint: getBreakpoint };
6363
6364    var Browser = (function Browser() {
6365        function isSafari() {
6366            var ua = win.navigator.userAgent.toLowerCase();
6367            return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
6368        }
6369        return {
6370            isIE: !!win.navigator.userAgent.match(/Trident/g) || !!win.navigator.userAgent.match(/MSIE/g),
6371            isEdge: !!win.navigator.userAgent.match(/Edge/g),
6372            isSafari: isSafari(),
6373            isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(win.navigator.userAgent),
6374        };
6375    }());
6376
6377    function addClasses () {
6378        var swiper = this;
6379        var classNames = swiper.classNames;
6380        var params = swiper.params;
6381        var rtl = swiper.rtl;
6382        var $el = swiper.$el;
6383        var suffixes = [];
6384
6385        suffixes.push(params.direction);
6386
6387        if (params.freeMode) {
6388            suffixes.push('free-mode');
6389        }
6390        if (!Support.flexbox) {
6391            suffixes.push('no-flexbox');
6392        }
6393        if (params.autoHeight) {
6394            suffixes.push('autoheight');
6395        }
6396        if (rtl) {
6397            suffixes.push('rtl');
6398        }
6399        if (params.slidesPerColumn > 1) {
6400            suffixes.push('multirow');
6401        }
6402        if (Device.android) {
6403            suffixes.push('android');
6404        }
6405        if (Device.ios) {
6406            suffixes.push('ios');
6407        }
6408        // WP8 Touch Events Fix
6409        if ((Browser.isIE || Browser.isEdge) && (Support.pointerEvents || Support.prefixedPointerEvents)) {
6410            suffixes.push(("wp8-" + (params.direction)));
6411        }
6412
6413        suffixes.forEach(function (suffix) {
6414            classNames.push(params.containerModifierClass + suffix);
6415        });
6416
6417        $el.addClass(classNames.join(' '));
6418    }
6419
6420    function removeClasses () {
6421        var swiper = this;
6422        var $el = swiper.$el;
6423        var classNames = swiper.classNames;
6424
6425        $el.removeClass(classNames.join(' '));
6426    }
6427
6428    var classes = { addClasses: addClasses, removeClasses: removeClasses };
6429
6430    function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
6431        var image;
6432        function onReady() {
6433            if (callback) { callback(); }
6434        }
6435        if (!imageEl.complete || !checkForComplete) {
6436            if (src) {
6437                image = new win.Image();
6438                image.onload = onReady;
6439                image.onerror = onReady;
6440                if (sizes) {
6441                    image.sizes = sizes;
6442                }
6443                if (srcset) {
6444                    image.srcset = srcset;
6445                }
6446                if (src) {
6447                    image.src = src;
6448                }
6449            } else {
6450                onReady();
6451            }
6452        } else {
6453            // image already loaded...
6454            onReady();
6455        }
6456    }
6457
6458    function preloadImages () {
6459        var swiper = this;
6460        swiper.imagesToLoad = swiper.$el.find('img');
6461        function onReady() {
6462            if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) { return; }
6463            if (swiper.imagesLoaded !== undefined) { swiper.imagesLoaded += 1; }
6464            if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
6465                if (swiper.params.updateOnImagesReady) { swiper.update(); }
6466                swiper.emit('imagesReady');
6467            }
6468        }
6469        for (var i = 0; i < swiper.imagesToLoad.length; i += 1) {
6470            var imageEl = swiper.imagesToLoad[i];
6471            swiper.loadImage(
6472                imageEl,
6473                imageEl.currentSrc || imageEl.getAttribute('src'),
6474                imageEl.srcset || imageEl.getAttribute('srcset'),
6475                imageEl.sizes || imageEl.getAttribute('sizes'),
6476                true,
6477                onReady
6478            );
6479        }
6480    }
6481
6482    var images = {
6483        loadImage: loadImage,
6484        preloadImages: preloadImages,
6485    };
6486
6487    function checkOverflow() {
6488        var swiper = this;
6489        var wasLocked = swiper.isLocked;
6490
6491        swiper.isLocked = swiper.snapGrid.length === 1;
6492        swiper.allowSlideNext = !swiper.isLocked;
6493        swiper.allowSlidePrev = !swiper.isLocked;
6494
6495        // events
6496        if (wasLocked !== swiper.isLocked) { swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); }
6497
6498        if (wasLocked && wasLocked !== swiper.isLocked) {
6499            swiper.isEnd = false;
6500            swiper.navigation.update();
6501        }
6502    }
6503
6504    var checkOverflow$1 = { checkOverflow: checkOverflow };
6505
6506    var defaults = {
6507        init: true,
6508        direction: 'horizontal',
6509        touchEventsTarget: 'container',
6510        initialSlide: 0,
6511        speed: 300,
6512        //
6513        preventInteractionOnTransition: false,
6514
6515        // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
6516        edgeSwipeDetection: false,
6517        edgeSwipeThreshold: 20,
6518
6519        // Free mode
6520        freeMode: false,
6521        freeModeMomentum: true,
6522        freeModeMomentumRatio: 1,
6523        freeModeMomentumBounce: true,
6524        freeModeMomentumBounceRatio: 1,
6525        freeModeMomentumVelocityRatio: 1,
6526        freeModeSticky: false,
6527        freeModeMinimumVelocity: 0.02,
6528
6529        // Autoheight
6530        autoHeight: false,
6531
6532        // Set wrapper width
6533        setWrapperSize: false,
6534
6535        // Virtual Translate
6536        virtualTranslate: false,
6537
6538        // Effects
6539        effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
6540
6541        // Breakpoints
6542        breakpoints: undefined,
6543        breakpointsInverse: false,
6544
6545        // Slides grid
6546        spaceBetween: 0,
6547        slidesPerView: 1,
6548        slidesPerColumn: 1,
6549        slidesPerColumnFill: 'column',
6550        slidesPerGroup: 1,
6551        centeredSlides: false,
6552        slidesOffsetBefore: 0, // in px
6553        slidesOffsetAfter: 0, // in px
6554        normalizeSlideIndex: true,
6555        centerInsufficientSlides: false,
6556
6557        // Disable swiper and hide navigation when container not overflow
6558        watchOverflow: false,
6559
6560        // Round length
6561        roundLengths: false,
6562
6563        // Touches
6564        touchRatio: 1,
6565        touchAngle: 45,
6566        simulateTouch: true,
6567        shortSwipes: true,
6568        longSwipes: true,
6569        longSwipesRatio: 0.5,
6570        longSwipesMs: 300,
6571        followFinger: true,
6572        allowTouchMove: true,
6573        threshold: 0,
6574        touchMoveStopPropagation: true,
6575        touchStartPreventDefault: true,
6576        touchStartForcePreventDefault: false,
6577        touchReleaseOnEdges: false,
6578
6579        // Unique Navigation Elements
6580        uniqueNavElements: true,
6581
6582        // Resistance
6583        resistance: true,
6584        resistanceRatio: 0.85,
6585
6586        // Progress
6587        watchSlidesProgress: false,
6588        watchSlidesVisibility: false,
6589
6590        // Cursor
6591        grabCursor: false,
6592
6593        // Clicks
6594        preventClicks: true,
6595        preventClicksPropagation: true,
6596        slideToClickedSlide: false,
6597
6598        // Images
6599        preloadImages: true,
6600        updateOnImagesReady: true,
6601
6602        // loop
6603        loop: false,
6604        loopAdditionalSlides: 0,
6605        loopedSlides: null,
6606        loopFillGroupWithBlank: false,
6607
6608        // Swiping/no swiping
6609        allowSlidePrev: true,
6610        allowSlideNext: true,
6611        swipeHandler: null, // '.swipe-handler',
6612        noSwiping: true,
6613        noSwipingClass: 'swiper-no-swiping',
6614        noSwipingSelector: null,
6615
6616        // Passive Listeners
6617        passiveListeners: true,
6618
6619        // NS
6620        containerModifierClass: 'swiper-container-', // NEW
6621        slideClass: 'swiper-slide',
6622        slideBlankClass: 'swiper-slide-invisible-blank',
6623        slideActiveClass: 'swiper-slide-active',
6624        slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
6625        slideVisibleClass: 'swiper-slide-visible',
6626        slideDuplicateClass: 'swiper-slide-duplicate',
6627        slideNextClass: 'swiper-slide-next',
6628        slideDuplicateNextClass: 'swiper-slide-duplicate-next',
6629        slidePrevClass: 'swiper-slide-prev',
6630        slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
6631        wrapperClass: 'swiper-wrapper',
6632
6633        // Callbacks
6634        runCallbacksOnInit: true,
6635    };
6636
6637    var prototypes = {
6638        update: update,
6639        translate: translate,
6640        transition: transition$1,
6641        slide: slide,
6642        loop: loop,
6643        grabCursor: grabCursor,
6644        manipulation: manipulation,
6645        events: events,
6646        breakpoints: breakpoints,
6647        checkOverflow: checkOverflow$1,
6648        classes: classes,
6649        images: images,
6650    };
6651
6652    var extendedDefaults = {};
6653
6654    var Swiper = /*@__PURE__*/(function (SwiperClass$$1) {
6655        function Swiper() {
6656            var assign;
6657
6658            var args = [], len = arguments.length;
6659            while ( len-- ) args[ len ] = arguments[ len ];
6660            var el;
6661            var params;
6662            if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
6663                params = args[0];
6664            } else {
6665                (assign = args, el = assign[0], params = assign[1]);
6666            }
6667            if (!params) { params = {}; }
6668
6669            params = Utils.extend({}, params);
6670            if (el && !params.el) { params.el = el; }
6671
6672            SwiperClass$$1.call(this, params);
6673
6674            Object.keys(prototypes).forEach(function (prototypeGroup) {
6675                Object.keys(prototypes[prototypeGroup]).forEach(function (protoMethod) {
6676                    if (!Swiper.prototype[protoMethod]) {
6677                        Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
6678                    }
6679                });
6680            });
6681
6682            // Swiper Instance
6683            var swiper = this;
6684            if (typeof swiper.modules === 'undefined') {
6685                swiper.modules = {};
6686            }
6687            Object.keys(swiper.modules).forEach(function (moduleName) {
6688                var module = swiper.modules[moduleName];
6689                if (module.params) {
6690                    var moduleParamName = Object.keys(module.params)[0];
6691                    var moduleParams = module.params[moduleParamName];
6692                    if (typeof moduleParams !== 'object' || moduleParams === null) { return; }
6693                    if (!(moduleParamName in params && 'enabled' in moduleParams)) { return; }
6694                    if (params[moduleParamName] === true) {
6695                        params[moduleParamName] = { enabled: true };
6696                    }
6697                    if (
6698                        typeof params[moduleParamName] === 'object'
6699                        && !('enabled' in params[moduleParamName])
6700                    ) {
6701                        params[moduleParamName].enabled = true;
6702                    }
6703                    if (!params[moduleParamName]) { params[moduleParamName] = { enabled: false }; }
6704                }
6705            });
6706
6707            // Extend defaults with modules params
6708            var swiperParams = Utils.extend({}, defaults);
6709            swiper.useModulesParams(swiperParams);
6710
6711            // Extend defaults with passed params
6712            swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
6713            swiper.originalParams = Utils.extend({}, swiper.params);
6714            swiper.passedParams = Utils.extend({}, params);
6715
6716            // Save Dom lib
6717            swiper.$ = $;
6718
6719            // Find el
6720            var $el = $(swiper.params.el);
6721            el = $el[0];
6722
6723            if (!el) {
6724                return undefined;
6725            }
6726
6727            if ($el.length > 1) {
6728                var swipers = [];
6729                $el.each(function (index, containerEl) {
6730                    var newParams = Utils.extend({}, params, { el: containerEl });
6731                    swipers.push(new Swiper(newParams));
6732                });
6733                return swipers;
6734            }
6735
6736            el.swiper = swiper;
6737            $el.data('swiper', swiper);
6738
6739            // Find Wrapper
6740            var $wrapperEl = $el.children(("." + (swiper.params.wrapperClass)));
6741
6742            // Extend Swiper
6743            Utils.extend(swiper, {
6744                $el: $el,
6745                el: el,
6746                $wrapperEl: $wrapperEl,
6747                wrapperEl: $wrapperEl[0],
6748
6749                // Classes
6750                classNames: [],
6751
6752                // Slides
6753                slides: $(),
6754                slidesGrid: [],
6755                snapGrid: [],
6756                slidesSizesGrid: [],
6757
6758                // isDirection
6759                isHorizontal: function isHorizontal() {
6760                    return swiper.params.direction === 'horizontal';
6761                },
6762                isVertical: function isVertical() {
6763                    return swiper.params.direction === 'vertical';
6764                },
6765                // RTL
6766                rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
6767                rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
6768                wrongRTL: $wrapperEl.css('display') === '-webkit-box',
6769
6770                // Indexes
6771                activeIndex: 0,
6772                realIndex: 0,
6773
6774                //
6775                isBeginning: true,
6776                isEnd: false,
6777
6778                // Props
6779                translate: 0,
6780                previousTranslate: 0,
6781                progress: 0,
6782                velocity: 0,
6783                animating: false,
6784
6785                // Locks
6786                allowSlideNext: swiper.params.allowSlideNext,
6787                allowSlidePrev: swiper.params.allowSlidePrev,
6788
6789                // Touch Events
6790                touchEvents: (function touchEvents() {
6791                    var touch = ['touchstart', 'touchmove', 'touchend'];
6792                    var desktop = ['mousedown', 'mousemove', 'mouseup'];
6793                    if (Support.pointerEvents) {
6794                        desktop = ['pointerdown', 'pointermove', 'pointerup'];
6795                    } else if (Support.prefixedPointerEvents) {
6796                        desktop = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];
6797                    }
6798                    swiper.touchEventsTouch = {
6799                        start: touch[0],
6800                        move: touch[1],
6801                        end: touch[2],
6802                    };
6803                    swiper.touchEventsDesktop = {
6804                        start: desktop[0],
6805                        move: desktop[1],
6806                        end: desktop[2],
6807                    };
6808                    return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
6809                }()),
6810                touchEventsData: {
6811                    isTouched: undefined,
6812                    isMoved: undefined,
6813                    allowTouchCallbacks: undefined,
6814                    touchStartTime: undefined,
6815                    isScrolling: undefined,
6816                    currentTranslate: undefined,
6817                    startTranslate: undefined,
6818                    allowThresholdMove: undefined,
6819                    // Form elements to match
6820                    formElements: 'input, select, option, textarea, button, video',
6821                    // Last click time
6822                    lastClickTime: Utils.now(),
6823                    clickTimeout: undefined,
6824                    // Velocities
6825                    velocities: [],
6826                    allowMomentumBounce: undefined,
6827                    isTouchEvent: undefined,
6828                    startMoving: undefined,
6829                },
6830
6831                // Clicks
6832                allowClick: true,
6833
6834                // Touches
6835                allowTouchMove: swiper.params.allowTouchMove,
6836
6837                touches: {
6838                    startX: 0,
6839                    startY: 0,
6840                    currentX: 0,
6841                    currentY: 0,
6842                    diff: 0,
6843                },
6844
6845                // Images
6846                imagesToLoad: [],
6847                imagesLoaded: 0,
6848
6849            });
6850
6851            // Install Modules
6852            swiper.useModules();
6853
6854            // Init
6855            if (swiper.params.init) {
6856                swiper.init();
6857            }
6858
6859            // Return app instance
6860            return swiper;
6861        }
6862
6863        if ( SwiperClass$$1 ) Swiper.__proto__ = SwiperClass$$1;
6864        Swiper.prototype = Object.create( SwiperClass$$1 && SwiperClass$$1.prototype );
6865        Swiper.prototype.constructor = Swiper;
6866
6867        var staticAccessors = { extendedDefaults: { configurable: true },defaults: { configurable: true },Class: { configurable: true },$: { configurable: true } };
6868
6869        Swiper.prototype.slidesPerViewDynamic = function slidesPerViewDynamic () {
6870            var swiper = this;
6871            var params = swiper.params;
6872            var slides = swiper.slides;
6873            var slidesGrid = swiper.slidesGrid;
6874            var swiperSize = swiper.size;
6875            var activeIndex = swiper.activeIndex;
6876            var spv = 1;
6877            if (params.centeredSlides) {
6878                var slideSize = slides[activeIndex].swiperSlideSize;
6879                var breakLoop;
6880                for (var i = activeIndex + 1; i < slides.length; i += 1) {
6881                    if (slides[i] && !breakLoop) {
6882                        slideSize += slides[i].swiperSlideSize;
6883                        spv += 1;
6884                        if (slideSize > swiperSize) { breakLoop = true; }
6885                    }
6886                }
6887                for (var i$1 = activeIndex - 1; i$1 >= 0; i$1 -= 1) {
6888                    if (slides[i$1] && !breakLoop) {
6889                        slideSize += slides[i$1].swiperSlideSize;
6890                        spv += 1;
6891                        if (slideSize > swiperSize) { breakLoop = true; }
6892                    }
6893                }
6894            } else {
6895                for (var i$2 = activeIndex + 1; i$2 < slides.length; i$2 += 1) {
6896                    if (slidesGrid[i$2] - slidesGrid[activeIndex] < swiperSize) {
6897                        spv += 1;
6898                    }
6899                }
6900            }
6901            return spv;
6902        };
6903
6904        Swiper.prototype.update = function update$$1 () {
6905            var swiper = this;
6906            if (!swiper || swiper.destroyed) { return; }
6907            var snapGrid = swiper.snapGrid;
6908            var params = swiper.params;
6909            // Breakpoints
6910            if (params.breakpoints) {
6911                swiper.setBreakpoint();
6912            }
6913            swiper.updateSize();
6914            swiper.updateSlides();
6915            swiper.updateProgress();
6916            swiper.updateSlidesClasses();
6917
6918            function setTranslate() {
6919                var translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
6920                var newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
6921                swiper.setTranslate(newTranslate);
6922                swiper.updateActiveIndex();
6923                swiper.updateSlidesClasses();
6924            }
6925            var translated;
6926            if (swiper.params.freeMode) {
6927                setTranslate();
6928                if (swiper.params.autoHeight) {
6929                    swiper.updateAutoHeight();
6930                }
6931            } else {
6932                if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
6933                    translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
6934                } else {
6935                    translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
6936                }
6937                if (!translated) {
6938                    setTranslate();
6939                }
6940            }
6941            if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
6942                swiper.checkOverflow();
6943            }
6944            swiper.emit('update');
6945        };
6946
6947        Swiper.prototype.init = function init () {
6948            var swiper = this;
6949            if (swiper.initialized) { return; }
6950
6951            swiper.emit('beforeInit');
6952
6953            // Set breakpoint
6954            if (swiper.params.breakpoints) {
6955                swiper.setBreakpoint();
6956            }
6957
6958            // Add Classes
6959            swiper.addClasses();
6960
6961            // Create loop
6962            if (swiper.params.loop) {
6963                swiper.loopCreate();
6964            }
6965
6966            // Update size
6967            swiper.updateSize();
6968
6969            // Update slides
6970            swiper.updateSlides();
6971
6972            if (swiper.params.watchOverflow) {
6973                swiper.checkOverflow();
6974            }
6975
6976            // Set Grab Cursor
6977            if (swiper.params.grabCursor) {
6978                swiper.setGrabCursor();
6979            }
6980
6981            if (swiper.params.preloadImages) {
6982                swiper.preloadImages();
6983            }
6984
6985            // Slide To Initial Slide
6986            if (swiper.params.loop) {
6987                swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
6988            } else {
6989                swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
6990            }
6991
6992            // Attach events
6993            swiper.attachEvents();
6994
6995            // Init Flag
6996            swiper.initialized = true;
6997
6998            // Emit
6999            swiper.emit('init');
7000        };
7001
7002        Swiper.prototype.destroy = function destroy (deleteInstance, cleanStyles) {
7003            if ( deleteInstance === void 0 ) deleteInstance = true;
7004            if ( cleanStyles === void 0 ) cleanStyles = true;
7005
7006            var swiper = this;
7007            var params = swiper.params;
7008            var $el = swiper.$el;
7009            var $wrapperEl = swiper.$wrapperEl;
7010            var slides = swiper.slides;
7011
7012            if (typeof swiper.params === 'undefined' || swiper.destroyed) {
7013                return null;
7014            }
7015
7016            swiper.emit('beforeDestroy');
7017
7018            // Init Flag
7019            swiper.initialized = false;
7020
7021            // Detach events
7022            swiper.detachEvents();
7023
7024            // Destroy loop
7025            if (params.loop) {
7026                swiper.loopDestroy();
7027            }
7028
7029            // Cleanup styles
7030            if (cleanStyles) {
7031                swiper.removeClasses();
7032                $el.removeAttr('style');
7033                $wrapperEl.removeAttr('style');
7034                if (slides && slides.length) {
7035                    slides
7036                        .removeClass([
7037                            params.slideVisibleClass,
7038                            params.slideActiveClass,
7039                            params.slideNextClass,
7040                            params.slidePrevClass ].join(' '))
7041                        .removeAttr('style')
7042                        .removeAttr('data-swiper-slide-index')
7043                        .removeAttr('data-swiper-column')
7044                        .removeAttr('data-swiper-row');
7045                }
7046            }
7047
7048            swiper.emit('destroy');
7049
7050            // Detach emitter events
7051            Object.keys(swiper.eventsListeners).forEach(function (eventName) {
7052                swiper.off(eventName);
7053            });
7054
7055            if (deleteInstance !== false) {
7056                swiper.$el[0].swiper = null;
7057                swiper.$el.data('swiper', null);
7058                Utils.deleteProps(swiper);
7059            }
7060            swiper.destroyed = true;
7061
7062            return null;
7063        };
7064
7065        Swiper.extendDefaults = function extendDefaults (newDefaults) {
7066            Utils.extend(extendedDefaults, newDefaults);
7067        };
7068
7069        staticAccessors.extendedDefaults.get = function () {
7070            return extendedDefaults;
7071        };
7072
7073        staticAccessors.defaults.get = function () {
7074            return defaults;
7075        };
7076
7077        staticAccessors.Class.get = function () {
7078            return SwiperClass$$1;
7079        };
7080
7081        staticAccessors.$.get = function () {
7082            return $;
7083        };
7084
7085        Object.defineProperties( Swiper, staticAccessors );
7086
7087        return Swiper;
7088    }(SwiperClass));
7089
7090    var Device$1 = {
7091        name: 'device',
7092        proto: {
7093            device: Device,
7094        },
7095        static: {
7096            device: Device,
7097        },
7098    };
7099
7100    var Support$1 = {
7101        name: 'support',
7102        proto: {
7103            support: Support,
7104        },
7105        static: {
7106            support: Support,
7107        },
7108    };
7109
7110    var Browser$1 = {
7111        name: 'browser',
7112        proto: {
7113            browser: Browser,
7114        },
7115        static: {
7116            browser: Browser,
7117        },
7118    };
7119
7120    var Resize = {
7121        name: 'resize',
7122        create: function create() {
7123            var swiper = this;
7124            Utils.extend(swiper, {
7125                resize: {
7126                    resizeHandler: function resizeHandler() {
7127                        if (!swiper || swiper.destroyed || !swiper.initialized) { return; }
7128                        swiper.emit('beforeResize');
7129                        swiper.emit('resize');
7130                    },
7131                    orientationChangeHandler: function orientationChangeHandler() {
7132                        if (!swiper || swiper.destroyed || !swiper.initialized) { return; }
7133                        swiper.emit('orientationchange');
7134                    },
7135                },
7136            });
7137        },
7138        on: {
7139            init: function init() {
7140                var swiper = this;
7141                // Emit resize
7142                win.addEventListener('resize', swiper.resize.resizeHandler);
7143
7144                // Emit orientationchange
7145                win.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
7146            },
7147            destroy: function destroy() {
7148                var swiper = this;
7149                win.removeEventListener('resize', swiper.resize.resizeHandler);
7150                win.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
7151            },
7152        },
7153    };
7154
7155    var Observer = {
7156        func: win.MutationObserver || win.WebkitMutationObserver,
7157        attach: function attach(target, options) {
7158            if ( options === void 0 ) options = {};
7159
7160            var swiper = this;
7161
7162            var ObserverFunc = Observer.func;
7163            var observer = new ObserverFunc(function (mutations) {
7164                // The observerUpdate event should only be triggered
7165                // once despite the number of mutations.  Additional
7166                // triggers are redundant and are very costly
7167                if (mutations.length === 1) {
7168                    swiper.emit('observerUpdate', mutations[0]);
7169                    return;
7170                }
7171                var observerUpdate = function observerUpdate() {
7172                    swiper.emit('observerUpdate', mutations[0]);
7173                };
7174
7175                if (win.requestAnimationFrame) {
7176                    win.requestAnimationFrame(observerUpdate);
7177                } else {
7178                    win.setTimeout(observerUpdate, 0);
7179                }
7180            });
7181
7182            observer.observe(target, {
7183                attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
7184                childList: typeof options.childList === 'undefined' ? true : options.childList,
7185                characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
7186            });
7187
7188            swiper.observer.observers.push(observer);
7189        },
7190        init: function init() {
7191            var swiper = this;
7192            if (!Support.observer || !swiper.params.observer) { return; }
7193            if (swiper.params.observeParents) {
7194                var containerParents = swiper.$el.parents();
7195                for (var i = 0; i < containerParents.length; i += 1) {
7196                    swiper.observer.attach(containerParents[i]);
7197                }
7198            }
7199            // Observe container
7200            swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren });
7201
7202            // Observe wrapper
7203            swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
7204        },
7205        destroy: function destroy() {
7206            var swiper = this;
7207            swiper.observer.observers.forEach(function (observer) {
7208                observer.disconnect();
7209            });
7210            swiper.observer.observers = [];
7211        },
7212    };
7213
7214    var Observer$1 = {
7215        name: 'observer',
7216        params: {
7217            observer: false,
7218            observeParents: false,
7219            observeSlideChildren: false,
7220        },
7221        create: function create() {
7222            var swiper = this;
7223            Utils.extend(swiper, {
7224                observer: {
7225                    init: Observer.init.bind(swiper),
7226                    attach: Observer.attach.bind(swiper),
7227                    destroy: Observer.destroy.bind(swiper),
7228                    observers: [],
7229                },
7230            });
7231        },
7232        on: {
7233            init: function init() {
7234                var swiper = this;
7235                swiper.observer.init();
7236            },
7237            destroy: function destroy() {
7238                var swiper = this;
7239                swiper.observer.destroy();
7240            },
7241        },
7242    };
7243
7244    var Virtual = {
7245        update: function update(force) {
7246            var swiper = this;
7247            var ref = swiper.params;
7248            var slidesPerView = ref.slidesPerView;
7249            var slidesPerGroup = ref.slidesPerGroup;
7250            var centeredSlides = ref.centeredSlides;
7251            var ref$1 = swiper.params.virtual;
7252            var addSlidesBefore = ref$1.addSlidesBefore;
7253            var addSlidesAfter = ref$1.addSlidesAfter;
7254            var ref$2 = swiper.virtual;
7255            var previousFrom = ref$2.from;
7256            var previousTo = ref$2.to;
7257            var slides = ref$2.slides;
7258            var previousSlidesGrid = ref$2.slidesGrid;
7259            var renderSlide = ref$2.renderSlide;
7260            var previousOffset = ref$2.offset;
7261            swiper.updateActiveIndex();
7262            var activeIndex = swiper.activeIndex || 0;
7263
7264            var offsetProp;
7265            if (swiper.rtlTranslate) { offsetProp = 'right'; }
7266            else { offsetProp = swiper.isHorizontal() ? 'left' : 'top'; }
7267
7268            var slidesAfter;
7269            var slidesBefore;
7270            if (centeredSlides) {
7271                slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;
7272                slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;
7273            } else {
7274                slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore;
7275                slidesBefore = slidesPerGroup + addSlidesAfter;
7276            }
7277            var from = Math.max((activeIndex || 0) - slidesBefore, 0);
7278            var to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
7279            var offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
7280
7281            Utils.extend(swiper.virtual, {
7282                from: from,
7283                to: to,
7284                offset: offset,
7285                slidesGrid: swiper.slidesGrid,
7286            });
7287
7288            function onRendered() {
7289                swiper.updateSlides();
7290                swiper.updateProgress();
7291                swiper.updateSlidesClasses();
7292                if (swiper.lazy && swiper.params.lazy.enabled) {
7293                    swiper.lazy.load();
7294                }
7295            }
7296
7297            if (previousFrom === from && previousTo === to && !force) {
7298                if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {
7299                    swiper.slides.css(offsetProp, (offset + "px"));
7300                }
7301                swiper.updateProgress();
7302                return;
7303            }
7304            if (swiper.params.virtual.renderExternal) {
7305                swiper.params.virtual.renderExternal.call(swiper, {
7306                    offset: offset,
7307                    from: from,
7308                    to: to,
7309                    slides: (function getSlides() {
7310                        var slidesToRender = [];
7311                        for (var i = from; i <= to; i += 1) {
7312                            slidesToRender.push(slides[i]);
7313                        }
7314                        return slidesToRender;
7315                    }()),
7316                });
7317                onRendered();
7318                return;
7319            }
7320            var prependIndexes = [];
7321            var appendIndexes = [];
7322            if (force) {
7323                swiper.$wrapperEl.find(("." + (swiper.params.slideClass))).remove();
7324            } else {
7325                for (var i = previousFrom; i <= previousTo; i += 1) {
7326                    if (i < from || i > to) {
7327                        swiper.$wrapperEl.find(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + i + "\"]")).remove();
7328                    }
7329                }
7330            }
7331            for (var i$1 = 0; i$1 < slides.length; i$1 += 1) {
7332                if (i$1 >= from && i$1 <= to) {
7333                    if (typeof previousTo === 'undefined' || force) {
7334                        appendIndexes.push(i$1);
7335                    } else {
7336                        if (i$1 > previousTo) { appendIndexes.push(i$1); }
7337                        if (i$1 < previousFrom) { prependIndexes.push(i$1); }
7338                    }
7339                }
7340            }
7341            appendIndexes.forEach(function (index) {
7342                swiper.$wrapperEl.append(renderSlide(slides[index], index));
7343            });
7344            prependIndexes.sort(function (a, b) { return b - a; }).forEach(function (index) {
7345                swiper.$wrapperEl.prepend(renderSlide(slides[index], index));
7346            });
7347            swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, (offset + "px"));
7348            onRendered();
7349        },
7350        renderSlide: function renderSlide(slide, index) {
7351            var swiper = this;
7352            var params = swiper.params.virtual;
7353            if (params.cache && swiper.virtual.cache[index]) {
7354                return swiper.virtual.cache[index];
7355            }
7356            var $slideEl = params.renderSlide
7357                ? $(params.renderSlide.call(swiper, slide, index))
7358                : $(("<div class=\"" + (swiper.params.slideClass) + "\" data-swiper-slide-index=\"" + index + "\">" + slide + "</div>"));
7359            if (!$slideEl.attr('data-swiper-slide-index')) { $slideEl.attr('data-swiper-slide-index', index); }
7360            if (params.cache) { swiper.virtual.cache[index] = $slideEl; }
7361            return $slideEl;
7362        },
7363        appendSlide: function appendSlide(slide) {
7364            var swiper = this;
7365            swiper.virtual.slides.push(slide);
7366            swiper.virtual.update(true);
7367        },
7368        prependSlide: function prependSlide(slide) {
7369            var swiper = this;
7370            swiper.virtual.slides.unshift(slide);
7371            if (swiper.params.virtual.cache) {
7372                var cache = swiper.virtual.cache;
7373                var newCache = {};
7374                Object.keys(cache).forEach(function (cachedIndex) {
7375                    newCache[cachedIndex + 1] = cache[cachedIndex];
7376                });
7377                swiper.virtual.cache = newCache;
7378            }
7379            swiper.virtual.update(true);
7380            swiper.slideNext(0);
7381        },
7382    };
7383
7384    var Virtual$1 = {
7385        name: 'virtual',
7386        params: {
7387            virtual: {
7388                enabled: false,
7389                slides: [],
7390                cache: true,
7391                renderSlide: null,
7392                renderExternal: null,
7393                addSlidesBefore: 0,
7394                addSlidesAfter: 0,
7395            },
7396        },
7397        create: function create() {
7398            var swiper = this;
7399            Utils.extend(swiper, {
7400                virtual: {
7401                    update: Virtual.update.bind(swiper),
7402                    appendSlide: Virtual.appendSlide.bind(swiper),
7403                    prependSlide: Virtual.prependSlide.bind(swiper),
7404                    renderSlide: Virtual.renderSlide.bind(swiper),
7405                    slides: swiper.params.virtual.slides,
7406                    cache: {},
7407                },
7408            });
7409        },
7410        on: {
7411            beforeInit: function beforeInit() {
7412                var swiper = this;
7413                if (!swiper.params.virtual.enabled) { return; }
7414                swiper.classNames.push(((swiper.params.containerModifierClass) + "virtual"));
7415                var overwriteParams = {
7416                    watchSlidesProgress: true,
7417                };
7418                Utils.extend(swiper.params, overwriteParams);
7419                Utils.extend(swiper.originalParams, overwriteParams);
7420
7421                if (!swiper.params.initialSlide) {
7422                    swiper.virtual.update();
7423                }
7424            },
7425            setTranslate: function setTranslate() {
7426                var swiper = this;
7427                if (!swiper.params.virtual.enabled) { return; }
7428                swiper.virtual.update();
7429            },
7430        },
7431    };
7432
7433    var Keyboard = {
7434        handle: function handle(event) {
7435            var swiper = this;
7436            var rtl = swiper.rtlTranslate;
7437            var e = event;
7438            if (e.originalEvent) { e = e.originalEvent; } // jquery fix
7439            var kc = e.keyCode || e.charCode;
7440            // Directions locks
7441            if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) {
7442                return false;
7443            }
7444            if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) {
7445                return false;
7446            }
7447            if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
7448                return undefined;
7449            }
7450            if (doc.activeElement && doc.activeElement.nodeName && (doc.activeElement.nodeName.toLowerCase() === 'input' || doc.activeElement.nodeName.toLowerCase() === 'textarea')) {
7451                return undefined;
7452            }
7453            if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
7454                var inView = false;
7455                // Check that swiper should be inside of visible area of window
7456                if (swiper.$el.parents(("." + (swiper.params.slideClass))).length > 0 && swiper.$el.parents(("." + (swiper.params.slideActiveClass))).length === 0) {
7457                    return undefined;
7458                }
7459                var windowWidth = win.innerWidth;
7460                var windowHeight = win.innerHeight;
7461                var swiperOffset = swiper.$el.offset();
7462                if (rtl) { swiperOffset.left -= swiper.$el[0].scrollLeft; }
7463                var swiperCoord = [
7464                    [swiperOffset.left, swiperOffset.top],
7465                    [swiperOffset.left + swiper.width, swiperOffset.top],
7466                    [swiperOffset.left, swiperOffset.top + swiper.height],
7467                    [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height] ];
7468                for (var i = 0; i < swiperCoord.length; i += 1) {
7469                    var point = swiperCoord[i];
7470                    if (
7471                        point[0] >= 0 && point[0] <= windowWidth
7472                        && point[1] >= 0 && point[1] <= windowHeight
7473                    ) {
7474                        inView = true;
7475                    }
7476                }
7477                if (!inView) { return undefined; }
7478            }
7479            if (swiper.isHorizontal()) {
7480                if (kc === 37 || kc === 39) {
7481                    if (e.preventDefault) { e.preventDefault(); }
7482                    else { e.returnValue = false; }
7483                }
7484                if ((kc === 39 && !rtl) || (kc === 37 && rtl)) { swiper.slideNext(); }
7485                if ((kc === 37 && !rtl) || (kc === 39 && rtl)) { swiper.slidePrev(); }
7486            } else {
7487                if (kc === 38 || kc === 40) {
7488                    if (e.preventDefault) { e.preventDefault(); }
7489                    else { e.returnValue = false; }
7490                }
7491                if (kc === 40) { swiper.slideNext(); }
7492                if (kc === 38) { swiper.slidePrev(); }
7493            }
7494            swiper.emit('keyPress', kc);
7495            return undefined;
7496        },
7497        enable: function enable() {
7498            var swiper = this;
7499            if (swiper.keyboard.enabled) { return; }
7500            $(doc).on('keydown', swiper.keyboard.handle);
7501            swiper.keyboard.enabled = true;
7502        },
7503        disable: function disable() {
7504            var swiper = this;
7505            if (!swiper.keyboard.enabled) { return; }
7506            $(doc).off('keydown', swiper.keyboard.handle);
7507            swiper.keyboard.enabled = false;
7508        },
7509    };
7510
7511    var Keyboard$1 = {
7512        name: 'keyboard',
7513        params: {
7514            keyboard: {
7515                enabled: false,
7516                onlyInViewport: true,
7517            },
7518        },
7519        create: function create() {
7520            var swiper = this;
7521            Utils.extend(swiper, {
7522                keyboard: {
7523                    enabled: false,
7524                    enable: Keyboard.enable.bind(swiper),
7525                    disable: Keyboard.disable.bind(swiper),
7526                    handle: Keyboard.handle.bind(swiper),
7527                },
7528            });
7529        },
7530        on: {
7531            init: function init() {
7532                var swiper = this;
7533                if (swiper.params.keyboard.enabled) {
7534                    swiper.keyboard.enable();
7535                }
7536            },
7537            destroy: function destroy() {
7538                var swiper = this;
7539                if (swiper.keyboard.enabled) {
7540                    swiper.keyboard.disable();
7541                }
7542            },
7543        },
7544    };
7545
7546    function isEventSupported() {
7547        var eventName = 'onwheel';
7548        var isSupported = eventName in doc;
7549
7550        if (!isSupported) {
7551            var element = doc.createElement('div');
7552            element.setAttribute(eventName, 'return;');
7553            isSupported = typeof element[eventName] === 'function';
7554        }
7555
7556        if (!isSupported
7557            && doc.implementation
7558            && doc.implementation.hasFeature
7559            // always returns true in newer browsers as per the standard.
7560            // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
7561            && doc.implementation.hasFeature('', '') !== true
7562        ) {
7563            // This is the only way to test support for the `wheel` event in IE9+.
7564            isSupported = doc.implementation.hasFeature('Events.wheel', '3.0');
7565        }
7566
7567        return isSupported;
7568    }
7569    var Mousewheel = {
7570        lastScrollTime: Utils.now(),
7571        event: (function getEvent() {
7572            if (win.navigator.userAgent.indexOf('firefox') > -1) { return 'DOMMouseScroll'; }
7573            return isEventSupported() ? 'wheel' : 'mousewheel';
7574        }()),
7575        normalize: function normalize(e) {
7576            // Reasonable defaults
7577            var PIXEL_STEP = 10;
7578            var LINE_HEIGHT = 40;
7579            var PAGE_HEIGHT = 800;
7580
7581            var sX = 0;
7582            var sY = 0; // spinX, spinY
7583            var pX = 0;
7584            var pY = 0; // pixelX, pixelY
7585
7586            // Legacy
7587            if ('detail' in e) {
7588                sY = e.detail;
7589            }
7590            if ('wheelDelta' in e) {
7591                sY = -e.wheelDelta / 120;
7592            }
7593            if ('wheelDeltaY' in e) {
7594                sY = -e.wheelDeltaY / 120;
7595            }
7596            if ('wheelDeltaX' in e) {
7597                sX = -e.wheelDeltaX / 120;
7598            }
7599
7600            // side scrolling on FF with DOMMouseScroll
7601            if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
7602                sX = sY;
7603                sY = 0;
7604            }
7605
7606            pX = sX * PIXEL_STEP;
7607            pY = sY * PIXEL_STEP;
7608
7609            if ('deltaY' in e) {
7610                pY = e.deltaY;
7611            }
7612            if ('deltaX' in e) {
7613                pX = e.deltaX;
7614            }
7615
7616            if ((pX || pY) && e.deltaMode) {
7617                if (e.deltaMode === 1) { // delta in LINE units
7618                    pX *= LINE_HEIGHT;
7619                    pY *= LINE_HEIGHT;
7620                } else { // delta in PAGE units
7621                    pX *= PAGE_HEIGHT;
7622                    pY *= PAGE_HEIGHT;
7623                }
7624            }
7625
7626            // Fall-back if spin cannot be determined
7627            if (pX && !sX) {
7628                sX = (pX < 1) ? -1 : 1;
7629            }
7630            if (pY && !sY) {
7631                sY = (pY < 1) ? -1 : 1;
7632            }
7633
7634            return {
7635                spinX: sX,
7636                spinY: sY,
7637                pixelX: pX,
7638                pixelY: pY,
7639            };
7640        },
7641        handleMouseEnter: function handleMouseEnter() {
7642            var swiper = this;
7643            swiper.mouseEntered = true;
7644        },
7645        handleMouseLeave: function handleMouseLeave() {
7646            var swiper = this;
7647            swiper.mouseEntered = false;
7648        },
7649        handle: function handle(event) {
7650            var e = event;
7651            var swiper = this;
7652            var params = swiper.params.mousewheel;
7653
7654            if (!swiper.mouseEntered && !params.releaseOnEdges) { return true; }
7655
7656            if (e.originalEvent) { e = e.originalEvent; } // jquery fix
7657            var delta = 0;
7658            var rtlFactor = swiper.rtlTranslate ? -1 : 1;
7659
7660            var data = Mousewheel.normalize(e);
7661
7662            if (params.forceToAxis) {
7663                if (swiper.isHorizontal()) {
7664                    if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) { delta = data.pixelX * rtlFactor; }
7665                    else { return true; }
7666                } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) { delta = data.pixelY; }
7667                else { return true; }
7668            } else {
7669                delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;
7670            }
7671
7672            if (delta === 0) { return true; }
7673
7674            if (params.invert) { delta = -delta; }
7675
7676            if (!swiper.params.freeMode) {
7677                if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) {
7678                    if (delta < 0) {
7679                        if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
7680                            swiper.slideNext();
7681                            swiper.emit('scroll', e);
7682                        } else if (params.releaseOnEdges) { return true; }
7683                    } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
7684                        swiper.slidePrev();
7685                        swiper.emit('scroll', e);
7686                    } else if (params.releaseOnEdges) { return true; }
7687                }
7688                swiper.mousewheel.lastScrollTime = (new win.Date()).getTime();
7689            } else {
7690                // Freemode or scrollContainer:
7691                if (swiper.params.loop) {
7692                    swiper.loopFix();
7693                }
7694                var position = swiper.getTranslate() + (delta * params.sensitivity);
7695                var wasBeginning = swiper.isBeginning;
7696                var wasEnd = swiper.isEnd;
7697
7698                if (position >= swiper.minTranslate()) { position = swiper.minTranslate(); }
7699                if (position <= swiper.maxTranslate()) { position = swiper.maxTranslate(); }
7700
7701                swiper.setTransition(0);
7702                swiper.setTranslate(position);
7703                swiper.updateProgress();
7704                swiper.updateActiveIndex();
7705                swiper.updateSlidesClasses();
7706
7707                if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
7708                    swiper.updateSlidesClasses();
7709                }
7710
7711                if (swiper.params.freeModeSticky) {
7712                    clearTimeout(swiper.mousewheel.timeout);
7713                    swiper.mousewheel.timeout = Utils.nextTick(function () {
7714                        swiper.slideToClosest();
7715                    }, 300);
7716                }
7717                // Emit event
7718                swiper.emit('scroll', e);
7719
7720                // Stop autoplay
7721                if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) { swiper.autoplay.stop(); }
7722                // Return page scroll on edge positions
7723                if (position === swiper.minTranslate() || position === swiper.maxTranslate()) { return true; }
7724            }
7725
7726            if (e.preventDefault) { e.preventDefault(); }
7727            else { e.returnValue = false; }
7728            return false;
7729        },
7730        enable: function enable() {
7731            var swiper = this;
7732            if (!Mousewheel.event) { return false; }
7733            if (swiper.mousewheel.enabled) { return false; }
7734            var target = swiper.$el;
7735            if (swiper.params.mousewheel.eventsTarged !== 'container') {
7736                target = $(swiper.params.mousewheel.eventsTarged);
7737            }
7738            target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
7739            target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
7740            target.on(Mousewheel.event, swiper.mousewheel.handle);
7741            swiper.mousewheel.enabled = true;
7742            return true;
7743        },
7744        disable: function disable() {
7745            var swiper = this;
7746            if (!Mousewheel.event) { return false; }
7747            if (!swiper.mousewheel.enabled) { return false; }
7748            var target = swiper.$el;
7749            if (swiper.params.mousewheel.eventsTarged !== 'container') {
7750                target = $(swiper.params.mousewheel.eventsTarged);
7751            }
7752            target.off(Mousewheel.event, swiper.mousewheel.handle);
7753            swiper.mousewheel.enabled = false;
7754            return true;
7755        },
7756    };
7757
7758    var Mousewheel$1 = {
7759        name: 'mousewheel',
7760        params: {
7761            mousewheel: {
7762                enabled: false,
7763                releaseOnEdges: false,
7764                invert: false,
7765                forceToAxis: false,
7766                sensitivity: 1,
7767                eventsTarged: 'container',
7768            },
7769        },
7770        create: function create() {
7771            var swiper = this;
7772            Utils.extend(swiper, {
7773                mousewheel: {
7774                    enabled: false,
7775                    enable: Mousewheel.enable.bind(swiper),
7776                    disable: Mousewheel.disable.bind(swiper),
7777                    handle: Mousewheel.handle.bind(swiper),
7778                    handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
7779                    handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
7780                    lastScrollTime: Utils.now(),
7781                },
7782            });
7783        },
7784        on: {
7785            init: function init() {
7786                var swiper = this;
7787                if (swiper.params.mousewheel.enabled) { swiper.mousewheel.enable(); }
7788            },
7789            destroy: function destroy() {
7790                var swiper = this;
7791                if (swiper.mousewheel.enabled) { swiper.mousewheel.disable(); }
7792            },
7793        },
7794    };
7795
7796    var Navigation = {
7797        update: function update() {
7798            // Update Navigation Buttons
7799            var swiper = this;
7800            var params = swiper.params.navigation;
7801
7802            if (swiper.params.loop) { return; }
7803            var ref = swiper.navigation;
7804            var $nextEl = ref.$nextEl;
7805            var $prevEl = ref.$prevEl;
7806
7807            if ($prevEl && $prevEl.length > 0) {
7808                if (swiper.isBeginning) {
7809                    $prevEl.addClass(params.disabledClass);
7810                } else {
7811                    $prevEl.removeClass(params.disabledClass);
7812                }
7813                $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
7814            }
7815            if ($nextEl && $nextEl.length > 0) {
7816                if (swiper.isEnd) {
7817                    $nextEl.addClass(params.disabledClass);
7818                } else {
7819                    $nextEl.removeClass(params.disabledClass);
7820                }
7821                $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
7822            }
7823        },
7824        onPrevClick: function onPrevClick(e) {
7825            var swiper = this;
7826            e.preventDefault();
7827            if (swiper.isBeginning && !swiper.params.loop) { return; }
7828            swiper.slidePrev();
7829        },
7830        onNextClick: function onNextClick(e) {
7831            var swiper = this;
7832            e.preventDefault();
7833            if (swiper.isEnd && !swiper.params.loop) { return; }
7834            swiper.slideNext();
7835        },
7836        init: function init() {
7837            var swiper = this;
7838            var params = swiper.params.navigation;
7839            if (!(params.nextEl || params.prevEl)) { return; }
7840
7841            var $nextEl;
7842            var $prevEl;
7843            if (params.nextEl) {
7844                $nextEl = $(params.nextEl);
7845                if (
7846                    swiper.params.uniqueNavElements
7847                    && typeof params.nextEl === 'string'
7848                    && $nextEl.length > 1
7849                    && swiper.$el.find(params.nextEl).length === 1
7850                ) {
7851                    $nextEl = swiper.$el.find(params.nextEl);
7852                }
7853            }
7854            if (params.prevEl) {
7855                $prevEl = $(params.prevEl);
7856                if (
7857                    swiper.params.uniqueNavElements
7858                    && typeof params.prevEl === 'string'
7859                    && $prevEl.length > 1
7860                    && swiper.$el.find(params.prevEl).length === 1
7861                ) {
7862                    $prevEl = swiper.$el.find(params.prevEl);
7863                }
7864            }
7865
7866            if ($nextEl && $nextEl.length > 0) {
7867                $nextEl.on('click', swiper.navigation.onNextClick);
7868            }
7869            if ($prevEl && $prevEl.length > 0) {
7870                $prevEl.on('click', swiper.navigation.onPrevClick);
7871            }
7872
7873            Utils.extend(swiper.navigation, {
7874                $nextEl: $nextEl,
7875                nextEl: $nextEl && $nextEl[0],
7876                $prevEl: $prevEl,
7877                prevEl: $prevEl && $prevEl[0],
7878            });
7879        },
7880        destroy: function destroy() {
7881            var swiper = this;
7882            var ref = swiper.navigation;
7883            var $nextEl = ref.$nextEl;
7884            var $prevEl = ref.$prevEl;
7885            if ($nextEl && $nextEl.length) {
7886                $nextEl.off('click', swiper.navigation.onNextClick);
7887                $nextEl.removeClass(swiper.params.navigation.disabledClass);
7888            }
7889            if ($prevEl && $prevEl.length) {
7890                $prevEl.off('click', swiper.navigation.onPrevClick);
7891                $prevEl.removeClass(swiper.params.navigation.disabledClass);
7892            }
7893        },
7894    };
7895
7896    var Navigation$1 = {
7897        name: 'navigation',
7898        params: {
7899            navigation: {
7900                nextEl: null,
7901                prevEl: null,
7902
7903                hideOnClick: false,
7904                disabledClass: 'swiper-button-disabled',
7905                hiddenClass: 'swiper-button-hidden',
7906                lockClass: 'swiper-button-lock',
7907            },
7908        },
7909        create: function create() {
7910            var swiper = this;
7911            Utils.extend(swiper, {
7912                navigation: {
7913                    init: Navigation.init.bind(swiper),
7914                    update: Navigation.update.bind(swiper),
7915                    destroy: Navigation.destroy.bind(swiper),
7916                    onNextClick: Navigation.onNextClick.bind(swiper),
7917                    onPrevClick: Navigation.onPrevClick.bind(swiper),
7918                },
7919            });
7920        },
7921        on: {
7922            init: function init() {
7923                var swiper = this;
7924                swiper.navigation.init();
7925                swiper.navigation.update();
7926            },
7927            toEdge: function toEdge() {
7928                var swiper = this;
7929                swiper.navigation.update();
7930            },
7931            fromEdge: function fromEdge() {
7932                var swiper = this;
7933                swiper.navigation.update();
7934            },
7935            destroy: function destroy() {
7936                var swiper = this;
7937                swiper.navigation.destroy();
7938            },
7939            click: function click(e) {
7940                var swiper = this;
7941                var ref = swiper.navigation;
7942                var $nextEl = ref.$nextEl;
7943                var $prevEl = ref.$prevEl;
7944                if (
7945                    swiper.params.navigation.hideOnClick
7946                    && !$(e.target).is($prevEl)
7947                    && !$(e.target).is($nextEl)
7948                ) {
7949                    if ($nextEl) { $nextEl.toggleClass(swiper.params.navigation.hiddenClass); }
7950                    if ($prevEl) { $prevEl.toggleClass(swiper.params.navigation.hiddenClass); }
7951                }
7952            },
7953        },
7954    };
7955
7956    var Pagination = {
7957        update: function update() {
7958            // Render || Update Pagination bullets/items
7959            var swiper = this;
7960            var rtl = swiper.rtl;
7961            var params = swiper.params.pagination;
7962            if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
7963            var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
7964            var $el = swiper.pagination.$el;
7965            // Current/Total
7966            var current;
7967            var total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
7968            if (swiper.params.loop) {
7969                current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
7970                if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
7971                    current -= (slidesLength - (swiper.loopedSlides * 2));
7972                }
7973                if (current > total - 1) { current -= total; }
7974                if (current < 0 && swiper.params.paginationType !== 'bullets') { current = total + current; }
7975            } else if (typeof swiper.snapIndex !== 'undefined') {
7976                current = swiper.snapIndex;
7977            } else {
7978                current = swiper.activeIndex || 0;
7979            }
7980            // Types
7981            if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
7982                var bullets = swiper.pagination.bullets;
7983                var firstIndex;
7984                var lastIndex;
7985                var midIndex;
7986                if (params.dynamicBullets) {
7987                    swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
7988                    $el.css(swiper.isHorizontal() ? 'width' : 'height', ((swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)) + "px"));
7989                    if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
7990                        swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
7991                        if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
7992                            swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
7993                        } else if (swiper.pagination.dynamicBulletIndex < 0) {
7994                            swiper.pagination.dynamicBulletIndex = 0;
7995                        }
7996                    }
7997                    firstIndex = current - swiper.pagination.dynamicBulletIndex;
7998                    lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
7999                    midIndex = (lastIndex + firstIndex) / 2;
8000                }
8001                bullets.removeClass(((params.bulletActiveClass) + " " + (params.bulletActiveClass) + "-next " + (params.bulletActiveClass) + "-next-next " + (params.bulletActiveClass) + "-prev " + (params.bulletActiveClass) + "-prev-prev " + (params.bulletActiveClass) + "-main"));
8002                if ($el.length > 1) {
8003                    bullets.each(function (index, bullet) {
8004                        var $bullet = $(bullet);
8005                        var bulletIndex = $bullet.index();
8006                        if (bulletIndex === current) {
8007                            $bullet.addClass(params.bulletActiveClass);
8008                        }
8009                        if (params.dynamicBullets) {
8010                            if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
8011                                $bullet.addClass(((params.bulletActiveClass) + "-main"));
8012                            }
8013                            if (bulletIndex === firstIndex) {
8014                                $bullet
8015                                    .prev()
8016                                    .addClass(((params.bulletActiveClass) + "-prev"))
8017                                    .prev()
8018                                    .addClass(((params.bulletActiveClass) + "-prev-prev"));
8019                            }
8020                            if (bulletIndex === lastIndex) {
8021                                $bullet
8022                                    .next()
8023                                    .addClass(((params.bulletActiveClass) + "-next"))
8024                                    .next()
8025                                    .addClass(((params.bulletActiveClass) + "-next-next"));
8026                            }
8027                        }
8028                    });
8029                } else {
8030                    var $bullet = bullets.eq(current);
8031                    $bullet.addClass(params.bulletActiveClass);
8032                    if (params.dynamicBullets) {
8033                        var $firstDisplayedBullet = bullets.eq(firstIndex);
8034                        var $lastDisplayedBullet = bullets.eq(lastIndex);
8035                        for (var i = firstIndex; i <= lastIndex; i += 1) {
8036                            bullets.eq(i).addClass(((params.bulletActiveClass) + "-main"));
8037                        }
8038                        $firstDisplayedBullet
8039                            .prev()
8040                            .addClass(((params.bulletActiveClass) + "-prev"))
8041                            .prev()
8042                            .addClass(((params.bulletActiveClass) + "-prev-prev"));
8043                        $lastDisplayedBullet
8044                            .next()
8045                            .addClass(((params.bulletActiveClass) + "-next"))
8046                            .next()
8047                            .addClass(((params.bulletActiveClass) + "-next-next"));
8048                    }
8049                }
8050                if (params.dynamicBullets) {
8051                    var dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
8052                    var bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
8053                    var offsetProp = rtl ? 'right' : 'left';
8054                    bullets.css(swiper.isHorizontal() ? offsetProp : 'top', (bulletsOffset + "px"));
8055                }
8056            }
8057            if (params.type === 'fraction') {
8058                $el.find(("." + (params.currentClass))).text(params.formatFractionCurrent(current + 1));
8059                $el.find(("." + (params.totalClass))).text(params.formatFractionTotal(total));
8060            }
8061            if (params.type === 'progressbar') {
8062                var progressbarDirection;
8063                if (params.progressbarOpposite) {
8064                    progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
8065                } else {
8066                    progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
8067                }
8068                var scale = (current + 1) / total;
8069                var scaleX = 1;
8070                var scaleY = 1;
8071                if (progressbarDirection === 'horizontal') {
8072                    scaleX = scale;
8073                } else {
8074                    scaleY = scale;
8075                }
8076                $el.find(("." + (params.progressbarFillClass))).transform(("translate3d(0,0,0) scaleX(" + scaleX + ") scaleY(" + scaleY + ")")).transition(swiper.params.speed);
8077            }
8078            if (params.type === 'custom' && params.renderCustom) {
8079                $el.html(params.renderCustom(swiper, current + 1, total));
8080                swiper.emit('paginationRender', swiper, $el[0]);
8081            } else {
8082                swiper.emit('paginationUpdate', swiper, $el[0]);
8083            }
8084            $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
8085        },
8086        render: function render() {
8087            // Render Container
8088            var swiper = this;
8089            var params = swiper.params.pagination;
8090            if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
8091            var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
8092
8093            var $el = swiper.pagination.$el;
8094            var paginationHTML = '';
8095            if (params.type === 'bullets') {
8096                var numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
8097                for (var i = 0; i < numberOfBullets; i += 1) {
8098                    if (params.renderBullet) {
8099                        paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
8100                    } else {
8101                        paginationHTML += "<" + (params.bulletElement) + " class=\"" + (params.bulletClass) + "\"></" + (params.bulletElement) + ">";
8102                    }
8103                }
8104                $el.html(paginationHTML);
8105                swiper.pagination.bullets = $el.find(("." + (params.bulletClass)));
8106            }
8107            if (params.type === 'fraction') {
8108                if (params.renderFraction) {
8109                    paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
8110                } else {
8111                    paginationHTML = "<span class=\"" + (params.currentClass) + "\"></span>"
8112                        + ' / '
8113                        + "<span class=\"" + (params.totalClass) + "\"></span>";
8114                }
8115                $el.html(paginationHTML);
8116            }
8117            if (params.type === 'progressbar') {
8118                if (params.renderProgressbar) {
8119                    paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
8120                } else {
8121                    paginationHTML = "<span class=\"" + (params.progressbarFillClass) + "\"></span>";
8122                }
8123                $el.html(paginationHTML);
8124            }
8125            if (params.type !== 'custom') {
8126                swiper.emit('paginationRender', swiper.pagination.$el[0]);
8127            }
8128        },
8129        init: function init() {
8130            var swiper = this;
8131            var params = swiper.params.pagination;
8132            if (!params.el) { return; }
8133
8134            var $el = $(params.el);
8135            if ($el.length === 0) { return; }
8136
8137            if (
8138                swiper.params.uniqueNavElements
8139                && typeof params.el === 'string'
8140                && $el.length > 1
8141                && swiper.$el.find(params.el).length === 1
8142            ) {
8143                $el = swiper.$el.find(params.el);
8144            }
8145
8146            if (params.type === 'bullets' && params.clickable) {
8147                $el.addClass(params.clickableClass);
8148            }
8149
8150            $el.addClass(params.modifierClass + params.type);
8151
8152            if (params.type === 'bullets' && params.dynamicBullets) {
8153                $el.addClass(("" + (params.modifierClass) + (params.type) + "-dynamic"));
8154                swiper.pagination.dynamicBulletIndex = 0;
8155                if (params.dynamicMainBullets < 1) {
8156                    params.dynamicMainBullets = 1;
8157                }
8158            }
8159            if (params.type === 'progressbar' && params.progressbarOpposite) {
8160                $el.addClass(params.progressbarOppositeClass);
8161            }
8162
8163            if (params.clickable) {
8164                $el.on('click', ("." + (params.bulletClass)), function onClick(e) {
8165                    e.preventDefault();
8166                    var index = $(this).index() * swiper.params.slidesPerGroup;
8167                    if (swiper.params.loop) { index += swiper.loopedSlides; }
8168                    swiper.slideTo(index);
8169                });
8170            }
8171
8172            Utils.extend(swiper.pagination, {
8173                $el: $el,
8174                el: $el[0],
8175            });
8176        },
8177        destroy: function destroy() {
8178            var swiper = this;
8179            var params = swiper.params.pagination;
8180            if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
8181            var $el = swiper.pagination.$el;
8182
8183            $el.removeClass(params.hiddenClass);
8184            $el.removeClass(params.modifierClass + params.type);
8185            if (swiper.pagination.bullets) { swiper.pagination.bullets.removeClass(params.bulletActiveClass); }
8186            if (params.clickable) {
8187                $el.off('click', ("." + (params.bulletClass)));
8188            }
8189        },
8190    };
8191
8192    var Pagination$1 = {
8193        name: 'pagination',
8194        params: {
8195            pagination: {
8196                el: null,
8197                bulletElement: 'span',
8198                clickable: false,
8199                hideOnClick: false,
8200                renderBullet: null,
8201                renderProgressbar: null,
8202                renderFraction: null,
8203                renderCustom: null,
8204                progressbarOpposite: false,
8205                type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
8206                dynamicBullets: false,
8207                dynamicMainBullets: 1,
8208                formatFractionCurrent: function (number) { return number; },
8209                formatFractionTotal: function (number) { return number; },
8210                bulletClass: 'swiper-pagination-bullet',
8211                bulletActiveClass: 'swiper-pagination-bullet-active',
8212                modifierClass: 'swiper-pagination-', // NEW
8213                currentClass: 'swiper-pagination-current',
8214                totalClass: 'swiper-pagination-total',
8215                hiddenClass: 'swiper-pagination-hidden',
8216                progressbarFillClass: 'swiper-pagination-progressbar-fill',
8217                progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
8218                clickableClass: 'swiper-pagination-clickable', // NEW
8219                lockClass: 'swiper-pagination-lock',
8220            },
8221        },
8222        create: function create() {
8223            var swiper = this;
8224            Utils.extend(swiper, {
8225                pagination: {
8226                    init: Pagination.init.bind(swiper),
8227                    render: Pagination.render.bind(swiper),
8228                    update: Pagination.update.bind(swiper),
8229                    destroy: Pagination.destroy.bind(swiper),
8230                    dynamicBulletIndex: 0,
8231                },
8232            });
8233        },
8234        on: {
8235            init: function init() {
8236                var swiper = this;
8237                swiper.pagination.init();
8238                swiper.pagination.render();
8239                swiper.pagination.update();
8240            },
8241            activeIndexChange: function activeIndexChange() {
8242                var swiper = this;
8243                if (swiper.params.loop) {
8244                    swiper.pagination.update();
8245                } else if (typeof swiper.snapIndex === 'undefined') {
8246                    swiper.pagination.update();
8247                }
8248            },
8249            snapIndexChange: function snapIndexChange() {
8250                var swiper = this;
8251                if (!swiper.params.loop) {
8252                    swiper.pagination.update();
8253                }
8254            },
8255            slidesLengthChange: function slidesLengthChange() {
8256                var swiper = this;
8257                if (swiper.params.loop) {
8258                    swiper.pagination.render();
8259                    swiper.pagination.update();
8260                }
8261            },
8262            snapGridLengthChange: function snapGridLengthChange() {
8263                var swiper = this;
8264                if (!swiper.params.loop) {
8265                    swiper.pagination.render();
8266                    swiper.pagination.update();
8267                }
8268            },
8269            destroy: function destroy() {
8270                var swiper = this;
8271                swiper.pagination.destroy();
8272            },
8273            click: function click(e) {
8274                var swiper = this;
8275                if (
8276                    swiper.params.pagination.el
8277                    && swiper.params.pagination.hideOnClick
8278                    && swiper.pagination.$el.length > 0
8279                    && !$(e.target).hasClass(swiper.params.pagination.bulletClass)
8280                ) {
8281                    swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
8282                }
8283            },
8284        },
8285    };
8286
8287    var Scrollbar = {
8288        setTranslate: function setTranslate() {
8289            var swiper = this;
8290            if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
8291            var scrollbar = swiper.scrollbar;
8292            var rtl = swiper.rtlTranslate;
8293            var progress = swiper.progress;
8294            var dragSize = scrollbar.dragSize;
8295            var trackSize = scrollbar.trackSize;
8296            var $dragEl = scrollbar.$dragEl;
8297            var $el = scrollbar.$el;
8298            var params = swiper.params.scrollbar;
8299
8300            var newSize = dragSize;
8301            var newPos = (trackSize - dragSize) * progress;
8302            if (rtl) {
8303                newPos = -newPos;
8304                if (newPos > 0) {
8305                    newSize = dragSize - newPos;
8306                    newPos = 0;
8307                } else if (-newPos + dragSize > trackSize) {
8308                    newSize = trackSize + newPos;
8309                }
8310            } else if (newPos < 0) {
8311                newSize = dragSize + newPos;
8312                newPos = 0;
8313            } else if (newPos + dragSize > trackSize) {
8314                newSize = trackSize - newPos;
8315            }
8316            if (swiper.isHorizontal()) {
8317                if (Support.transforms3d) {
8318                    $dragEl.transform(("translate3d(" + newPos + "px, 0, 0)"));
8319                } else {
8320                    $dragEl.transform(("translateX(" + newPos + "px)"));
8321                }
8322                $dragEl[0].style.width = newSize + "px";
8323            } else {
8324                if (Support.transforms3d) {
8325                    $dragEl.transform(("translate3d(0px, " + newPos + "px, 0)"));
8326                } else {
8327                    $dragEl.transform(("translateY(" + newPos + "px)"));
8328                }
8329                $dragEl[0].style.height = newSize + "px";
8330            }
8331            if (params.hide) {
8332                clearTimeout(swiper.scrollbar.timeout);
8333                $el[0].style.opacity = 1;
8334                swiper.scrollbar.timeout = setTimeout(function () {
8335                    $el[0].style.opacity = 0;
8336                    $el.transition(400);
8337                }, 1000);
8338            }
8339        },
8340        setTransition: function setTransition(duration) {
8341            var swiper = this;
8342            if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
8343            swiper.scrollbar.$dragEl.transition(duration);
8344        },
8345        updateSize: function updateSize() {
8346            var swiper = this;
8347            if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
8348
8349            var scrollbar = swiper.scrollbar;
8350            var $dragEl = scrollbar.$dragEl;
8351            var $el = scrollbar.$el;
8352
8353            $dragEl[0].style.width = '';
8354            $dragEl[0].style.height = '';
8355            var trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
8356
8357            var divider = swiper.size / swiper.virtualSize;
8358            var moveDivider = divider * (trackSize / swiper.size);
8359            var dragSize;
8360            if (swiper.params.scrollbar.dragSize === 'auto') {
8361                dragSize = trackSize * divider;
8362            } else {
8363                dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
8364            }
8365
8366            if (swiper.isHorizontal()) {
8367                $dragEl[0].style.width = dragSize + "px";
8368            } else {
8369                $dragEl[0].style.height = dragSize + "px";
8370            }
8371
8372            if (divider >= 1) {
8373                $el[0].style.display = 'none';
8374            } else {
8375                $el[0].style.display = '';
8376            }
8377            if (swiper.params.scrollbarHide) {
8378                $el[0].style.opacity = 0;
8379            }
8380            Utils.extend(scrollbar, {
8381                trackSize: trackSize,
8382                divider: divider,
8383                moveDivider: moveDivider,
8384                dragSize: dragSize,
8385            });
8386            scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
8387        },
8388        setDragPosition: function setDragPosition(e) {
8389            var swiper = this;
8390            var scrollbar = swiper.scrollbar;
8391            var rtl = swiper.rtlTranslate;
8392            var $el = scrollbar.$el;
8393            var dragSize = scrollbar.dragSize;
8394            var trackSize = scrollbar.trackSize;
8395
8396            var pointerPosition;
8397            if (swiper.isHorizontal()) {
8398                pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX);
8399            } else {
8400                pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY);
8401            }
8402            var positionRatio;
8403            positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize);
8404            positionRatio = Math.max(Math.min(positionRatio, 1), 0);
8405            if (rtl) {
8406                positionRatio = 1 - positionRatio;
8407            }
8408
8409            var position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
8410
8411            swiper.updateProgress(position);
8412            swiper.setTranslate(position);
8413            swiper.updateActiveIndex();
8414            swiper.updateSlidesClasses();
8415        },
8416        onDragStart: function onDragStart(e) {
8417            var swiper = this;
8418            var params = swiper.params.scrollbar;
8419            var scrollbar = swiper.scrollbar;
8420            var $wrapperEl = swiper.$wrapperEl;
8421            var $el = scrollbar.$el;
8422            var $dragEl = scrollbar.$dragEl;
8423            swiper.scrollbar.isTouched = true;
8424            e.preventDefault();
8425            e.stopPropagation();
8426
8427            $wrapperEl.transition(100);
8428            $dragEl.transition(100);
8429            scrollbar.setDragPosition(e);
8430
8431            clearTimeout(swiper.scrollbar.dragTimeout);
8432
8433            $el.transition(0);
8434            if (params.hide) {
8435                $el.css('opacity', 1);
8436            }
8437            swiper.emit('scrollbarDragStart', e);
8438        },
8439        onDragMove: function onDragMove(e) {
8440            var swiper = this;
8441            var scrollbar = swiper.scrollbar;
8442            var $wrapperEl = swiper.$wrapperEl;
8443            var $el = scrollbar.$el;
8444            var $dragEl = scrollbar.$dragEl;
8445
8446            if (!swiper.scrollbar.isTouched) { return; }
8447            if (e.preventDefault) { e.preventDefault(); }
8448            else { e.returnValue = false; }
8449            scrollbar.setDragPosition(e);
8450            $wrapperEl.transition(0);
8451            $el.transition(0);
8452            $dragEl.transition(0);
8453            swiper.emit('scrollbarDragMove', e);
8454        },
8455        onDragEnd: function onDragEnd(e) {
8456            var swiper = this;
8457
8458            var params = swiper.params.scrollbar;
8459            var scrollbar = swiper.scrollbar;
8460            var $el = scrollbar.$el;
8461
8462            if (!swiper.scrollbar.isTouched) { return; }
8463            swiper.scrollbar.isTouched = false;
8464            if (params.hide) {
8465                clearTimeout(swiper.scrollbar.dragTimeout);
8466                swiper.scrollbar.dragTimeout = Utils.nextTick(function () {
8467                    $el.css('opacity', 0);
8468                    $el.transition(400);
8469                }, 1000);
8470            }
8471            swiper.emit('scrollbarDragEnd', e);
8472            if (params.snapOnRelease) {
8473                swiper.slideToClosest();
8474            }
8475        },
8476        enableDraggable: function enableDraggable() {
8477            var swiper = this;
8478            if (!swiper.params.scrollbar.el) { return; }
8479            var scrollbar = swiper.scrollbar;
8480            var touchEventsTouch = swiper.touchEventsTouch;
8481            var touchEventsDesktop = swiper.touchEventsDesktop;
8482            var params = swiper.params;
8483            var $el = scrollbar.$el;
8484            var target = $el[0];
8485            var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
8486            var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
8487            if (!Support.touch) {
8488                target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
8489                doc.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
8490                doc.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
8491            } else {
8492                target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
8493                target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
8494                target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
8495            }
8496        },
8497        disableDraggable: function disableDraggable() {
8498            var swiper = this;
8499            if (!swiper.params.scrollbar.el) { return; }
8500            var scrollbar = swiper.scrollbar;
8501            var touchEventsTouch = swiper.touchEventsTouch;
8502            var touchEventsDesktop = swiper.touchEventsDesktop;
8503            var params = swiper.params;
8504            var $el = scrollbar.$el;
8505            var target = $el[0];
8506            var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
8507            var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
8508            if (!Support.touch) {
8509                target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
8510                doc.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
8511                doc.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
8512            } else {
8513                target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
8514                target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
8515                target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
8516            }
8517        },
8518        init: function init() {
8519            var swiper = this;
8520            if (!swiper.params.scrollbar.el) { return; }
8521            var scrollbar = swiper.scrollbar;
8522            var $swiperEl = swiper.$el;
8523            var params = swiper.params.scrollbar;
8524
8525            var $el = $(params.el);
8526            if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
8527                $el = $swiperEl.find(params.el);
8528            }
8529
8530            var $dragEl = $el.find(("." + (swiper.params.scrollbar.dragClass)));
8531            if ($dragEl.length === 0) {
8532                $dragEl = $(("<div class=\"" + (swiper.params.scrollbar.dragClass) + "\"></div>"));
8533                $el.append($dragEl);
8534            }
8535
8536            Utils.extend(scrollbar, {
8537                $el: $el,
8538                el: $el[0],
8539                $dragEl: $dragEl,
8540                dragEl: $dragEl[0],
8541            });
8542
8543            if (params.draggable) {
8544                scrollbar.enableDraggable();
8545            }
8546        },
8547        destroy: function destroy() {
8548            var swiper = this;
8549            swiper.scrollbar.disableDraggable();
8550        },
8551    };
8552
8553    var Scrollbar$1 = {
8554        name: 'scrollbar',
8555        params: {
8556            scrollbar: {
8557                el: null,
8558                dragSize: 'auto',
8559                hide: false,
8560                draggable: false,
8561                snapOnRelease: true,
8562                lockClass: 'swiper-scrollbar-lock',
8563                dragClass: 'swiper-scrollbar-drag',
8564            },
8565        },
8566        create: function create() {
8567            var swiper = this;
8568            Utils.extend(swiper, {
8569                scrollbar: {
8570                    init: Scrollbar.init.bind(swiper),
8571                    destroy: Scrollbar.destroy.bind(swiper),
8572                    updateSize: Scrollbar.updateSize.bind(swiper),
8573                    setTranslate: Scrollbar.setTranslate.bind(swiper),
8574                    setTransition: Scrollbar.setTransition.bind(swiper),
8575                    enableDraggable: Scrollbar.enableDraggable.bind(swiper),
8576                    disableDraggable: Scrollbar.disableDraggable.bind(swiper),
8577                    setDragPosition: Scrollbar.setDragPosition.bind(swiper),
8578                    onDragStart: Scrollbar.onDragStart.bind(swiper),
8579                    onDragMove: Scrollbar.onDragMove.bind(swiper),
8580                    onDragEnd: Scrollbar.onDragEnd.bind(swiper),
8581                    isTouched: false,
8582                    timeout: null,
8583                    dragTimeout: null,
8584                },
8585            });
8586        },
8587        on: {
8588            init: function init() {
8589                var swiper = this;
8590                swiper.scrollbar.init();
8591                swiper.scrollbar.updateSize();
8592                swiper.scrollbar.setTranslate();
8593            },
8594            update: function update() {
8595                var swiper = this;
8596                swiper.scrollbar.updateSize();
8597            },
8598            resize: function resize() {
8599                var swiper = this;
8600                swiper.scrollbar.updateSize();
8601            },
8602            observerUpdate: function observerUpdate() {
8603                var swiper = this;
8604                swiper.scrollbar.updateSize();
8605            },
8606            setTranslate: function setTranslate() {
8607                var swiper = this;
8608                swiper.scrollbar.setTranslate();
8609            },
8610            setTransition: function setTransition(duration) {
8611                var swiper = this;
8612                swiper.scrollbar.setTransition(duration);
8613            },
8614            destroy: function destroy() {
8615                var swiper = this;
8616                swiper.scrollbar.destroy();
8617            },
8618        },
8619    };
8620
8621    var Parallax = {
8622        setTransform: function setTransform(el, progress) {
8623            var swiper = this;
8624            var rtl = swiper.rtl;
8625
8626            var $el = $(el);
8627            var rtlFactor = rtl ? -1 : 1;
8628
8629            var p = $el.attr('data-swiper-parallax') || '0';
8630            var x = $el.attr('data-swiper-parallax-x');
8631            var y = $el.attr('data-swiper-parallax-y');
8632            var scale = $el.attr('data-swiper-parallax-scale');
8633            var opacity = $el.attr('data-swiper-parallax-opacity');
8634
8635            if (x || y) {
8636                x = x || '0';
8637                y = y || '0';
8638            } else if (swiper.isHorizontal()) {
8639                x = p;
8640                y = '0';
8641            } else {
8642                y = p;
8643                x = '0';
8644            }
8645
8646            if ((x).indexOf('%') >= 0) {
8647                x = (parseInt(x, 10) * progress * rtlFactor) + "%";
8648            } else {
8649                x = (x * progress * rtlFactor) + "px";
8650            }
8651            if ((y).indexOf('%') >= 0) {
8652                y = (parseInt(y, 10) * progress) + "%";
8653            } else {
8654                y = (y * progress) + "px";
8655            }
8656
8657            if (typeof opacity !== 'undefined' && opacity !== null) {
8658                var currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
8659                $el[0].style.opacity = currentOpacity;
8660            }
8661            if (typeof scale === 'undefined' || scale === null) {
8662                $el.transform(("translate3d(" + x + ", " + y + ", 0px)"));
8663            } else {
8664                var currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
8665                $el.transform(("translate3d(" + x + ", " + y + ", 0px) scale(" + currentScale + ")"));
8666            }
8667        },
8668        setTranslate: function setTranslate() {
8669            var swiper = this;
8670            var $el = swiper.$el;
8671            var slides = swiper.slides;
8672            var progress = swiper.progress;
8673            var snapGrid = swiper.snapGrid;
8674            $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
8675                .each(function (index, el) {
8676                    swiper.parallax.setTransform(el, progress);
8677                });
8678            slides.each(function (slideIndex, slideEl) {
8679                var slideProgress = slideEl.progress;
8680                if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
8681                    slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
8682                }
8683                slideProgress = Math.min(Math.max(slideProgress, -1), 1);
8684                $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
8685                    .each(function (index, el) {
8686                        swiper.parallax.setTransform(el, slideProgress);
8687                    });
8688            });
8689        },
8690        setTransition: function setTransition(duration) {
8691            if ( duration === void 0 ) duration = this.params.speed;
8692
8693            var swiper = this;
8694            var $el = swiper.$el;
8695            $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
8696                .each(function (index, parallaxEl) {
8697                    var $parallaxEl = $(parallaxEl);
8698                    var parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
8699                    if (duration === 0) { parallaxDuration = 0; }
8700                    $parallaxEl.transition(parallaxDuration);
8701                });
8702        },
8703    };
8704
8705    var Parallax$1 = {
8706        name: 'parallax',
8707        params: {
8708            parallax: {
8709                enabled: false,
8710            },
8711        },
8712        create: function create() {
8713            var swiper = this;
8714            Utils.extend(swiper, {
8715                parallax: {
8716                    setTransform: Parallax.setTransform.bind(swiper),
8717                    setTranslate: Parallax.setTranslate.bind(swiper),
8718                    setTransition: Parallax.setTransition.bind(swiper),
8719                },
8720            });
8721        },
8722        on: {
8723            beforeInit: function beforeInit() {
8724                var swiper = this;
8725                if (!swiper.params.parallax.enabled) { return; }
8726                swiper.params.watchSlidesProgress = true;
8727                swiper.originalParams.watchSlidesProgress = true;
8728            },
8729            init: function init() {
8730                var swiper = this;
8731                if (!swiper.params.parallax) { return; }
8732                swiper.parallax.setTranslate();
8733            },
8734            setTranslate: function setTranslate() {
8735                var swiper = this;
8736                if (!swiper.params.parallax) { return; }
8737                swiper.parallax.setTranslate();
8738            },
8739            setTransition: function setTransition(duration) {
8740                var swiper = this;
8741                if (!swiper.params.parallax) { return; }
8742                swiper.parallax.setTransition(duration);
8743            },
8744        },
8745    };
8746
8747    var Zoom = {
8748        // Calc Scale From Multi-touches
8749        getDistanceBetweenTouches: function getDistanceBetweenTouches(e) {
8750            if (e.targetTouches.length < 2) { return 1; }
8751            var x1 = e.targetTouches[0].pageX;
8752            var y1 = e.targetTouches[0].pageY;
8753            var x2 = e.targetTouches[1].pageX;
8754            var y2 = e.targetTouches[1].pageY;
8755            var distance = Math.sqrt((Math.pow( (x2 - x1), 2 )) + (Math.pow( (y2 - y1), 2 )));
8756            return distance;
8757        },
8758        // Events
8759        onGestureStart: function onGestureStart(e) {
8760            var swiper = this;
8761            var params = swiper.params.zoom;
8762            var zoom = swiper.zoom;
8763            var gesture = zoom.gesture;
8764            zoom.fakeGestureTouched = false;
8765            zoom.fakeGestureMoved = false;
8766            if (!Support.gestures) {
8767                if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
8768                    return;
8769                }
8770                zoom.fakeGestureTouched = true;
8771                gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
8772            }
8773            if (!gesture.$slideEl || !gesture.$slideEl.length) {
8774                gesture.$slideEl = $(e.target).closest('.swiper-slide');
8775                if (gesture.$slideEl.length === 0) { gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); }
8776                gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
8777                gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
8778                gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
8779                if (gesture.$imageWrapEl.length === 0) {
8780                    gesture.$imageEl = undefined;
8781                    return;
8782                }
8783            }
8784            gesture.$imageEl.transition(0);
8785            swiper.zoom.isScaling = true;
8786        },
8787        onGestureChange: function onGestureChange(e) {
8788            var swiper = this;
8789            var params = swiper.params.zoom;
8790            var zoom = swiper.zoom;
8791            var gesture = zoom.gesture;
8792            if (!Support.gestures) {
8793                if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
8794                    return;
8795                }
8796                zoom.fakeGestureMoved = true;
8797                gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
8798            }
8799            if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
8800            if (Support.gestures) {
8801                zoom.scale = e.scale * zoom.currentScale;
8802            } else {
8803                zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
8804            }
8805            if (zoom.scale > gesture.maxRatio) {
8806                zoom.scale = (gesture.maxRatio - 1) + (Math.pow( ((zoom.scale - gesture.maxRatio) + 1), 0.5 ));
8807            }
8808            if (zoom.scale < params.minRatio) {
8809                zoom.scale = (params.minRatio + 1) - (Math.pow( ((params.minRatio - zoom.scale) + 1), 0.5 ));
8810            }
8811            gesture.$imageEl.transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
8812        },
8813        onGestureEnd: function onGestureEnd(e) {
8814            var swiper = this;
8815            var params = swiper.params.zoom;
8816            var zoom = swiper.zoom;
8817            var gesture = zoom.gesture;
8818            if (!Support.gestures) {
8819                if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
8820                    return;
8821                }
8822                if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
8823                    return;
8824                }
8825                zoom.fakeGestureTouched = false;
8826                zoom.fakeGestureMoved = false;
8827            }
8828            if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
8829            zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
8830            gesture.$imageEl.transition(swiper.params.speed).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
8831            zoom.currentScale = zoom.scale;
8832            zoom.isScaling = false;
8833            if (zoom.scale === 1) { gesture.$slideEl = undefined; }
8834        },
8835        onTouchStart: function onTouchStart(e) {
8836            var swiper = this;
8837            var zoom = swiper.zoom;
8838            var gesture = zoom.gesture;
8839            var image = zoom.image;
8840            if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
8841            if (image.isTouched) { return; }
8842            if (Device.android) { e.preventDefault(); }
8843            image.isTouched = true;
8844            image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
8845            image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
8846        },
8847        onTouchMove: function onTouchMove(e) {
8848            var swiper = this;
8849            var zoom = swiper.zoom;
8850            var gesture = zoom.gesture;
8851            var image = zoom.image;
8852            var velocity = zoom.velocity;
8853            if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
8854            swiper.allowClick = false;
8855            if (!image.isTouched || !gesture.$slideEl) { return; }
8856
8857            if (!image.isMoved) {
8858                image.width = gesture.$imageEl[0].offsetWidth;
8859                image.height = gesture.$imageEl[0].offsetHeight;
8860                image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
8861                image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
8862                gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
8863                gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
8864                gesture.$imageWrapEl.transition(0);
8865                if (swiper.rtl) {
8866                    image.startX = -image.startX;
8867                    image.startY = -image.startY;
8868                }
8869            }
8870            // Define if we need image drag
8871            var scaledWidth = image.width * zoom.scale;
8872            var scaledHeight = image.height * zoom.scale;
8873
8874            if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) { return; }
8875
8876            image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
8877            image.maxX = -image.minX;
8878            image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
8879            image.maxY = -image.minY;
8880
8881            image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
8882            image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
8883
8884            if (!image.isMoved && !zoom.isScaling) {
8885                if (
8886                    swiper.isHorizontal()
8887                    && (
8888                        (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x)
8889                        || (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
8890                    )
8891                ) {
8892                    image.isTouched = false;
8893                    return;
8894                } if (
8895                    !swiper.isHorizontal()
8896                    && (
8897                        (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y)
8898                        || (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
8899                    )
8900                ) {
8901                    image.isTouched = false;
8902                    return;
8903                }
8904            }
8905            e.preventDefault();
8906            e.stopPropagation();
8907
8908            image.isMoved = true;
8909            image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
8910            image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
8911
8912            if (image.currentX < image.minX) {
8913                image.currentX = (image.minX + 1) - (Math.pow( ((image.minX - image.currentX) + 1), 0.8 ));
8914            }
8915            if (image.currentX > image.maxX) {
8916                image.currentX = (image.maxX - 1) + (Math.pow( ((image.currentX - image.maxX) + 1), 0.8 ));
8917            }
8918
8919            if (image.currentY < image.minY) {
8920                image.currentY = (image.minY + 1) - (Math.pow( ((image.minY - image.currentY) + 1), 0.8 ));
8921            }
8922            if (image.currentY > image.maxY) {
8923                image.currentY = (image.maxY - 1) + (Math.pow( ((image.currentY - image.maxY) + 1), 0.8 ));
8924            }
8925
8926            // Velocity
8927            if (!velocity.prevPositionX) { velocity.prevPositionX = image.touchesCurrent.x; }
8928            if (!velocity.prevPositionY) { velocity.prevPositionY = image.touchesCurrent.y; }
8929            if (!velocity.prevTime) { velocity.prevTime = Date.now(); }
8930            velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
8931            velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
8932            if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) { velocity.x = 0; }
8933            if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) { velocity.y = 0; }
8934            velocity.prevPositionX = image.touchesCurrent.x;
8935            velocity.prevPositionY = image.touchesCurrent.y;
8936            velocity.prevTime = Date.now();
8937
8938            gesture.$imageWrapEl.transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)"));
8939        },
8940        onTouchEnd: function onTouchEnd() {
8941            var swiper = this;
8942            var zoom = swiper.zoom;
8943            var gesture = zoom.gesture;
8944            var image = zoom.image;
8945            var velocity = zoom.velocity;
8946            if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
8947            if (!image.isTouched || !image.isMoved) {
8948                image.isTouched = false;
8949                image.isMoved = false;
8950                return;
8951            }
8952            image.isTouched = false;
8953            image.isMoved = false;
8954            var momentumDurationX = 300;
8955            var momentumDurationY = 300;
8956            var momentumDistanceX = velocity.x * momentumDurationX;
8957            var newPositionX = image.currentX + momentumDistanceX;
8958            var momentumDistanceY = velocity.y * momentumDurationY;
8959            var newPositionY = image.currentY + momentumDistanceY;
8960
8961            // Fix duration
8962            if (velocity.x !== 0) { momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); }
8963            if (velocity.y !== 0) { momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); }
8964            var momentumDuration = Math.max(momentumDurationX, momentumDurationY);
8965
8966            image.currentX = newPositionX;
8967            image.currentY = newPositionY;
8968
8969            // Define if we need image drag
8970            var scaledWidth = image.width * zoom.scale;
8971            var scaledHeight = image.height * zoom.scale;
8972            image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
8973            image.maxX = -image.minX;
8974            image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
8975            image.maxY = -image.minY;
8976            image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
8977            image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
8978
8979            gesture.$imageWrapEl.transition(momentumDuration).transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)"));
8980        },
8981        onTransitionEnd: function onTransitionEnd() {
8982            var swiper = this;
8983            var zoom = swiper.zoom;
8984            var gesture = zoom.gesture;
8985            if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
8986                gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
8987                gesture.$imageWrapEl.transform('translate3d(0,0,0)');
8988
8989                zoom.scale = 1;
8990                zoom.currentScale = 1;
8991
8992                gesture.$slideEl = undefined;
8993                gesture.$imageEl = undefined;
8994                gesture.$imageWrapEl = undefined;
8995            }
8996        },
8997        // Toggle Zoom
8998        toggle: function toggle(e) {
8999            var swiper = this;
9000            var zoom = swiper.zoom;
9001
9002            if (zoom.scale && zoom.scale !== 1) {
9003                // Zoom Out
9004                zoom.out();
9005            } else {
9006                // Zoom In
9007                zoom.in(e);
9008            }
9009        },
9010        in: function in$1(e) {
9011            var swiper = this;
9012
9013            var zoom = swiper.zoom;
9014            var params = swiper.params.zoom;
9015            var gesture = zoom.gesture;
9016            var image = zoom.image;
9017
9018            if (!gesture.$slideEl) {
9019                gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
9020                gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
9021                gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
9022            }
9023            if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
9024
9025            gesture.$slideEl.addClass(("" + (params.zoomedSlideClass)));
9026
9027            var touchX;
9028            var touchY;
9029            var offsetX;
9030            var offsetY;
9031            var diffX;
9032            var diffY;
9033            var translateX;
9034            var translateY;
9035            var imageWidth;
9036            var imageHeight;
9037            var scaledWidth;
9038            var scaledHeight;
9039            var translateMinX;
9040            var translateMinY;
9041            var translateMaxX;
9042            var translateMaxY;
9043            var slideWidth;
9044            var slideHeight;
9045
9046            if (typeof image.touchesStart.x === 'undefined' && e) {
9047                touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
9048                touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
9049            } else {
9050                touchX = image.touchesStart.x;
9051                touchY = image.touchesStart.y;
9052            }
9053
9054            zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
9055            zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
9056            if (e) {
9057                slideWidth = gesture.$slideEl[0].offsetWidth;
9058                slideHeight = gesture.$slideEl[0].offsetHeight;
9059                offsetX = gesture.$slideEl.offset().left;
9060                offsetY = gesture.$slideEl.offset().top;
9061                diffX = (offsetX + (slideWidth / 2)) - touchX;
9062                diffY = (offsetY + (slideHeight / 2)) - touchY;
9063
9064                imageWidth = gesture.$imageEl[0].offsetWidth;
9065                imageHeight = gesture.$imageEl[0].offsetHeight;
9066                scaledWidth = imageWidth * zoom.scale;
9067                scaledHeight = imageHeight * zoom.scale;
9068
9069                translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
9070                translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
9071                translateMaxX = -translateMinX;
9072                translateMaxY = -translateMinY;
9073
9074                translateX = diffX * zoom.scale;
9075                translateY = diffY * zoom.scale;
9076
9077                if (translateX < translateMinX) {
9078                    translateX = translateMinX;
9079                }
9080                if (translateX > translateMaxX) {
9081                    translateX = translateMaxX;
9082                }
9083
9084                if (translateY < translateMinY) {
9085                    translateY = translateMinY;
9086                }
9087                if (translateY > translateMaxY) {
9088                    translateY = translateMaxY;
9089                }
9090            } else {
9091                translateX = 0;
9092                translateY = 0;
9093            }
9094            gesture.$imageWrapEl.transition(300).transform(("translate3d(" + translateX + "px, " + translateY + "px,0)"));
9095            gesture.$imageEl.transition(300).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
9096        },
9097        out: function out() {
9098            var swiper = this;
9099
9100            var zoom = swiper.zoom;
9101            var params = swiper.params.zoom;
9102            var gesture = zoom.gesture;
9103
9104            if (!gesture.$slideEl) {
9105                gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
9106                gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
9107                gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
9108            }
9109            if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
9110
9111            zoom.scale = 1;
9112            zoom.currentScale = 1;
9113            gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
9114            gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
9115            gesture.$slideEl.removeClass(("" + (params.zoomedSlideClass)));
9116            gesture.$slideEl = undefined;
9117        },
9118        // Attach/Detach Events
9119        enable: function enable() {
9120            var swiper = this;
9121            var zoom = swiper.zoom;
9122            if (zoom.enabled) { return; }
9123            zoom.enabled = true;
9124
9125            var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
9126
9127            // Scale image
9128            if (Support.gestures) {
9129                swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
9130                swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
9131                swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
9132            } else if (swiper.touchEvents.start === 'touchstart') {
9133                swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
9134                swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
9135                swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
9136            }
9137
9138            // Move image
9139            swiper.$wrapperEl.on(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove);
9140        },
9141        disable: function disable() {
9142            var swiper = this;
9143            var zoom = swiper.zoom;
9144            if (!zoom.enabled) { return; }
9145
9146            swiper.zoom.enabled = false;
9147
9148            var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
9149
9150            // Scale image
9151            if (Support.gestures) {
9152                swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
9153                swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
9154                swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
9155            } else if (swiper.touchEvents.start === 'touchstart') {
9156                swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
9157                swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
9158                swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
9159            }
9160
9161            // Move image
9162            swiper.$wrapperEl.off(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove);
9163        },
9164    };
9165
9166    var Zoom$1 = {
9167        name: 'zoom',
9168        params: {
9169            zoom: {
9170                enabled: false,
9171                maxRatio: 3,
9172                minRatio: 1,
9173                toggle: true,
9174                containerClass: 'swiper-zoom-container',
9175                zoomedSlideClass: 'swiper-slide-zoomed',
9176            },
9177        },
9178        create: function create() {
9179            var swiper = this;
9180            var zoom = {
9181                enabled: false,
9182                scale: 1,
9183                currentScale: 1,
9184                isScaling: false,
9185                gesture: {
9186                    $slideEl: undefined,
9187                    slideWidth: undefined,
9188                    slideHeight: undefined,
9189                    $imageEl: undefined,
9190                    $imageWrapEl: undefined,
9191                    maxRatio: 3,
9192                },
9193                image: {
9194                    isTouched: undefined,
9195                    isMoved: undefined,
9196                    currentX: undefined,
9197                    currentY: undefined,
9198                    minX: undefined,
9199                    minY: undefined,
9200                    maxX: undefined,
9201                    maxY: undefined,
9202                    width: undefined,
9203                    height: undefined,
9204                    startX: undefined,
9205                    startY: undefined,
9206                    touchesStart: {},
9207                    touchesCurrent: {},
9208                },
9209                velocity: {
9210                    x: undefined,
9211                    y: undefined,
9212                    prevPositionX: undefined,
9213                    prevPositionY: undefined,
9214                    prevTime: undefined,
9215                },
9216            };
9217
9218            ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach(function (methodName) {
9219                zoom[methodName] = Zoom[methodName].bind(swiper);
9220            });
9221            Utils.extend(swiper, {
9222                zoom: zoom,
9223            });
9224
9225            var scale = 1;
9226            Object.defineProperty(swiper.zoom, 'scale', {
9227                get: function get() {
9228                    return scale;
9229                },
9230                set: function set(value) {
9231                    if (scale !== value) {
9232                        var imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined;
9233                        var slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined;
9234                        swiper.emit('zoomChange', value, imageEl, slideEl);
9235                    }
9236                    scale = value;
9237                },
9238            });
9239        },
9240        on: {
9241            init: function init() {
9242                var swiper = this;
9243                if (swiper.params.zoom.enabled) {
9244                    swiper.zoom.enable();
9245                }
9246            },
9247            destroy: function destroy() {
9248                var swiper = this;
9249                swiper.zoom.disable();
9250            },
9251            touchStart: function touchStart(e) {
9252                var swiper = this;
9253                if (!swiper.zoom.enabled) { return; }
9254                swiper.zoom.onTouchStart(e);
9255            },
9256            touchEnd: function touchEnd(e) {
9257                var swiper = this;
9258                if (!swiper.zoom.enabled) { return; }
9259                swiper.zoom.onTouchEnd(e);
9260            },
9261            doubleTap: function doubleTap(e) {
9262                var swiper = this;
9263                if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
9264                    swiper.zoom.toggle(e);
9265                }
9266            },
9267            transitionEnd: function transitionEnd() {
9268                var swiper = this;
9269                if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
9270                    swiper.zoom.onTransitionEnd();
9271                }
9272            },
9273        },
9274    };
9275
9276    var Lazy = {
9277        loadInSlide: function loadInSlide(index, loadInDuplicate) {
9278            if ( loadInDuplicate === void 0 ) loadInDuplicate = true;
9279
9280            var swiper = this;
9281            var params = swiper.params.lazy;
9282            if (typeof index === 'undefined') { return; }
9283            if (swiper.slides.length === 0) { return; }
9284            var isVirtual = swiper.virtual && swiper.params.virtual.enabled;
9285
9286            var $slideEl = isVirtual
9287                ? swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]"))
9288                : swiper.slides.eq(index);
9289
9290            var $images = $slideEl.find(("." + (params.elementClass) + ":not(." + (params.loadedClass) + "):not(." + (params.loadingClass) + ")"));
9291            if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
9292                $images = $images.add($slideEl[0]);
9293            }
9294            if ($images.length === 0) { return; }
9295
9296            $images.each(function (imageIndex, imageEl) {
9297                var $imageEl = $(imageEl);
9298                $imageEl.addClass(params.loadingClass);
9299
9300                var background = $imageEl.attr('data-background');
9301                var src = $imageEl.attr('data-src');
9302                var srcset = $imageEl.attr('data-srcset');
9303                var sizes = $imageEl.attr('data-sizes');
9304
9305                swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, function () {
9306                    if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) { return; }
9307                    if (background) {
9308                        $imageEl.css('background-image', ("url(\"" + background + "\")"));
9309                        $imageEl.removeAttr('data-background');
9310                    } else {
9311                        if (srcset) {
9312                            $imageEl.attr('srcset', srcset);
9313                            $imageEl.removeAttr('data-srcset');
9314                        }
9315                        if (sizes) {
9316                            $imageEl.attr('sizes', sizes);
9317                            $imageEl.removeAttr('data-sizes');
9318                        }
9319                        if (src) {
9320                            $imageEl.attr('src', src);
9321                            $imageEl.removeAttr('data-src');
9322                        }
9323                    }
9324
9325                    $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
9326                    $slideEl.find(("." + (params.preloaderClass))).remove();
9327                    if (swiper.params.loop && loadInDuplicate) {
9328                        var slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
9329                        if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
9330                            var originalSlide = swiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]:not(." + (swiper.params.slideDuplicateClass) + ")"));
9331                            swiper.lazy.loadInSlide(originalSlide.index(), false);
9332                        } else {
9333                            var duplicatedSlide = swiper.$wrapperEl.children(("." + (swiper.params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]"));
9334                            swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
9335                        }
9336                    }
9337                    swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
9338                });
9339
9340                swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
9341            });
9342        },
9343        load: function load() {
9344            var swiper = this;
9345            var $wrapperEl = swiper.$wrapperEl;
9346            var swiperParams = swiper.params;
9347            var slides = swiper.slides;
9348            var activeIndex = swiper.activeIndex;
9349            var isVirtual = swiper.virtual && swiperParams.virtual.enabled;
9350            var params = swiperParams.lazy;
9351
9352            var slidesPerView = swiperParams.slidesPerView;
9353            if (slidesPerView === 'auto') {
9354                slidesPerView = 0;
9355            }
9356
9357            function slideExist(index) {
9358                if (isVirtual) {
9359                    if ($wrapperEl.children(("." + (swiperParams.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")).length) {
9360                        return true;
9361                    }
9362                } else if (slides[index]) { return true; }
9363                return false;
9364            }
9365            function slideIndex(slideEl) {
9366                if (isVirtual) {
9367                    return $(slideEl).attr('data-swiper-slide-index');
9368                }
9369                return $(slideEl).index();
9370            }
9371
9372            if (!swiper.lazy.initialImageLoaded) { swiper.lazy.initialImageLoaded = true; }
9373            if (swiper.params.watchSlidesVisibility) {
9374                $wrapperEl.children(("." + (swiperParams.slideVisibleClass))).each(function (elIndex, slideEl) {
9375                    var index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
9376                    swiper.lazy.loadInSlide(index);
9377                });
9378            } else if (slidesPerView > 1) {
9379                for (var i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
9380                    if (slideExist(i)) { swiper.lazy.loadInSlide(i); }
9381                }
9382            } else {
9383                swiper.lazy.loadInSlide(activeIndex);
9384            }
9385            if (params.loadPrevNext) {
9386                if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
9387                    var amount = params.loadPrevNextAmount;
9388                    var spv = slidesPerView;
9389                    var maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
9390                    var minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
9391                    // Next Slides
9392                    for (var i$1 = activeIndex + slidesPerView; i$1 < maxIndex; i$1 += 1) {
9393                        if (slideExist(i$1)) { swiper.lazy.loadInSlide(i$1); }
9394                    }
9395                    // Prev Slides
9396                    for (var i$2 = minIndex; i$2 < activeIndex; i$2 += 1) {
9397                        if (slideExist(i$2)) { swiper.lazy.loadInSlide(i$2); }
9398                    }
9399                } else {
9400                    var nextSlide = $wrapperEl.children(("." + (swiperParams.slideNextClass)));
9401                    if (nextSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(nextSlide)); }
9402
9403                    var prevSlide = $wrapperEl.children(("." + (swiperParams.slidePrevClass)));
9404                    if (prevSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(prevSlide)); }
9405                }
9406            }
9407        },
9408    };
9409
9410    var Lazy$1 = {
9411        name: 'lazy',
9412        params: {
9413            lazy: {
9414                enabled: false,
9415                loadPrevNext: false,
9416                loadPrevNextAmount: 1,
9417                loadOnTransitionStart: false,
9418
9419                elementClass: 'swiper-lazy',
9420                loadingClass: 'swiper-lazy-loading',
9421                loadedClass: 'swiper-lazy-loaded',
9422                preloaderClass: 'swiper-lazy-preloader',
9423            },
9424        },
9425        create: function create() {
9426            var swiper = this;
9427            Utils.extend(swiper, {
9428                lazy: {
9429                    initialImageLoaded: false,
9430                    load: Lazy.load.bind(swiper),
9431                    loadInSlide: Lazy.loadInSlide.bind(swiper),
9432                },
9433            });
9434        },
9435        on: {
9436            beforeInit: function beforeInit() {
9437                var swiper = this;
9438                if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
9439                    swiper.params.preloadImages = false;
9440                }
9441            },
9442            init: function init() {
9443                var swiper = this;
9444                if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
9445                    swiper.lazy.load();
9446                }
9447            },
9448            scroll: function scroll() {
9449                var swiper = this;
9450                if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
9451                    swiper.lazy.load();
9452                }
9453            },
9454            resize: function resize() {
9455                var swiper = this;
9456                if (swiper.params.lazy.enabled) {
9457                    swiper.lazy.load();
9458                }
9459            },
9460            scrollbarDragMove: function scrollbarDragMove() {
9461                var swiper = this;
9462                if (swiper.params.lazy.enabled) {
9463                    swiper.lazy.load();
9464                }
9465            },
9466            transitionStart: function transitionStart() {
9467                var swiper = this;
9468                if (swiper.params.lazy.enabled) {
9469                    if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
9470                        swiper.lazy.load();
9471                    }
9472                }
9473            },
9474            transitionEnd: function transitionEnd() {
9475                var swiper = this;
9476                if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
9477                    swiper.lazy.load();
9478                }
9479            },
9480        },
9481    };
9482
9483    /* eslint no-bitwise: ["error", { "allow": [">>"] }] */
9484
9485    var Controller = {
9486        LinearSpline: function LinearSpline(x, y) {
9487            var binarySearch = (function search() {
9488                var maxIndex;
9489                var minIndex;
9490                var guess;
9491                return function (array, val) {
9492                    minIndex = -1;
9493                    maxIndex = array.length;
9494                    while (maxIndex - minIndex > 1) {
9495                        guess = maxIndex + minIndex >> 1;
9496                        if (array[guess] <= val) {
9497                            minIndex = guess;
9498                        } else {
9499                            maxIndex = guess;
9500                        }
9501                    }
9502                    return maxIndex;
9503                };
9504            }());
9505            this.x = x;
9506            this.y = y;
9507            this.lastIndex = x.length - 1;
9508            // Given an x value (x2), return the expected y2 value:
9509            // (x1,y1) is the known point before given value,
9510            // (x3,y3) is the known point after given value.
9511            var i1;
9512            var i3;
9513
9514            this.interpolate = function interpolate(x2) {
9515                if (!x2) { return 0; }
9516
9517                // Get the indexes of x1 and x3 (the array indexes before and after given x2):
9518                i3 = binarySearch(this.x, x2);
9519                i1 = i3 - 1;
9520
9521                // We have our indexes i1 & i3, so we can calculate already:
9522                // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
9523                return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
9524            };
9525            return this;
9526        },
9527        // xxx: for now i will just save one spline function to to
9528        getInterpolateFunction: function getInterpolateFunction(c) {
9529            var swiper = this;
9530            if (!swiper.controller.spline) {
9531                swiper.controller.spline = swiper.params.loop
9532                    ? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid)
9533                    : new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
9534            }
9535        },
9536        setTranslate: function setTranslate(setTranslate$1, byController) {
9537            var swiper = this;
9538            var controlled = swiper.controller.control;
9539            var multiplier;
9540            var controlledTranslate;
9541            function setControlledTranslate(c) {
9542                // this will create an Interpolate function based on the snapGrids
9543                // x is the Grid of the scrolled scroller and y will be the controlled scroller
9544                // it makes sense to create this only once and recall it for the interpolation
9545                // the function does a lot of value caching for performance
9546                var translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
9547                if (swiper.params.controller.by === 'slide') {
9548                    swiper.controller.getInterpolateFunction(c);
9549                    // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
9550                    // but it did not work out
9551                    controlledTranslate = -swiper.controller.spline.interpolate(-translate);
9552                }
9553
9554                if (!controlledTranslate || swiper.params.controller.by === 'container') {
9555                    multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
9556                    controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate();
9557                }
9558
9559                if (swiper.params.controller.inverse) {
9560                    controlledTranslate = c.maxTranslate() - controlledTranslate;
9561                }
9562                c.updateProgress(controlledTranslate);
9563                c.setTranslate(controlledTranslate, swiper);
9564                c.updateActiveIndex();
9565                c.updateSlidesClasses();
9566            }
9567            if (Array.isArray(controlled)) {
9568                for (var i = 0; i < controlled.length; i += 1) {
9569                    if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
9570                        setControlledTranslate(controlled[i]);
9571                    }
9572                }
9573            } else if (controlled instanceof Swiper && byController !== controlled) {
9574                setControlledTranslate(controlled);
9575            }
9576        },
9577        setTransition: function setTransition(duration, byController) {
9578            var swiper = this;
9579            var controlled = swiper.controller.control;
9580            var i;
9581            function setControlledTransition(c) {
9582                c.setTransition(duration, swiper);
9583                if (duration !== 0) {
9584                    c.transitionStart();
9585                    if (c.params.autoHeight) {
9586                        Utils.nextTick(function () {
9587                            c.updateAutoHeight();
9588                        });
9589                    }
9590                    c.$wrapperEl.transitionEnd(function () {
9591                        if (!controlled) { return; }
9592                        if (c.params.loop && swiper.params.controller.by === 'slide') {
9593                            c.loopFix();
9594                        }
9595                        c.transitionEnd();
9596                    });
9597                }
9598            }
9599            if (Array.isArray(controlled)) {
9600                for (i = 0; i < controlled.length; i += 1) {
9601                    if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
9602                        setControlledTransition(controlled[i]);
9603                    }
9604                }
9605            } else if (controlled instanceof Swiper && byController !== controlled) {
9606                setControlledTransition(controlled);
9607            }
9608        },
9609    };
9610    var Controller$1 = {
9611        name: 'controller',
9612        params: {
9613            controller: {
9614                control: undefined,
9615                inverse: false,
9616                by: 'slide', // or 'container'
9617            },
9618        },
9619        create: function create() {
9620            var swiper = this;
9621            Utils.extend(swiper, {
9622                controller: {
9623                    control: swiper.params.controller.control,
9624                    getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),
9625                    setTranslate: Controller.setTranslate.bind(swiper),
9626                    setTransition: Controller.setTransition.bind(swiper),
9627                },
9628            });
9629        },
9630        on: {
9631            update: function update() {
9632                var swiper = this;
9633                if (!swiper.controller.control) { return; }
9634                if (swiper.controller.spline) {
9635                    swiper.controller.spline = undefined;
9636                    delete swiper.controller.spline;
9637                }
9638            },
9639            resize: function resize() {
9640                var swiper = this;
9641                if (!swiper.controller.control) { return; }
9642                if (swiper.controller.spline) {
9643                    swiper.controller.spline = undefined;
9644                    delete swiper.controller.spline;
9645                }
9646            },
9647            observerUpdate: function observerUpdate() {
9648                var swiper = this;
9649                if (!swiper.controller.control) { return; }
9650                if (swiper.controller.spline) {
9651                    swiper.controller.spline = undefined;
9652                    delete swiper.controller.spline;
9653                }
9654            },
9655            setTranslate: function setTranslate(translate, byController) {
9656                var swiper = this;
9657                if (!swiper.controller.control) { return; }
9658                swiper.controller.setTranslate(translate, byController);
9659            },
9660            setTransition: function setTransition(duration, byController) {
9661                var swiper = this;
9662                if (!swiper.controller.control) { return; }
9663                swiper.controller.setTransition(duration, byController);
9664            },
9665        },
9666    };
9667
9668    var a11y = {
9669        makeElFocusable: function makeElFocusable($el) {
9670            $el.attr('tabIndex', '0');
9671            return $el;
9672        },
9673        addElRole: function addElRole($el, role) {
9674            $el.attr('role', role);
9675            return $el;
9676        },
9677        addElLabel: function addElLabel($el, label) {
9678            $el.attr('aria-label', label);
9679            return $el;
9680        },
9681        disableEl: function disableEl($el) {
9682            $el.attr('aria-disabled', true);
9683            return $el;
9684        },
9685        enableEl: function enableEl($el) {
9686            $el.attr('aria-disabled', false);
9687            return $el;
9688        },
9689        onEnterKey: function onEnterKey(e) {
9690            var swiper = this;
9691            var params = swiper.params.a11y;
9692            if (e.keyCode !== 13) { return; }
9693            var $targetEl = $(e.target);
9694            if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
9695                if (!(swiper.isEnd && !swiper.params.loop)) {
9696                    swiper.slideNext();
9697                }
9698                if (swiper.isEnd) {
9699                    swiper.a11y.notify(params.lastSlideMessage);
9700                } else {
9701                    swiper.a11y.notify(params.nextSlideMessage);
9702                }
9703            }
9704            if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
9705                if (!(swiper.isBeginning && !swiper.params.loop)) {
9706                    swiper.slidePrev();
9707                }
9708                if (swiper.isBeginning) {
9709                    swiper.a11y.notify(params.firstSlideMessage);
9710                } else {
9711                    swiper.a11y.notify(params.prevSlideMessage);
9712                }
9713            }
9714            if (swiper.pagination && $targetEl.is(("." + (swiper.params.pagination.bulletClass)))) {
9715                $targetEl[0].click();
9716            }
9717        },
9718        notify: function notify(message) {
9719            var swiper = this;
9720            var notification = swiper.a11y.liveRegion;
9721            if (notification.length === 0) { return; }
9722            notification.html('');
9723            notification.html(message);
9724        },
9725        updateNavigation: function updateNavigation() {
9726            var swiper = this;
9727
9728            if (swiper.params.loop) { return; }
9729            var ref = swiper.navigation;
9730            var $nextEl = ref.$nextEl;
9731            var $prevEl = ref.$prevEl;
9732
9733            if ($prevEl && $prevEl.length > 0) {
9734                if (swiper.isBeginning) {
9735                    swiper.a11y.disableEl($prevEl);
9736                } else {
9737                    swiper.a11y.enableEl($prevEl);
9738                }
9739            }
9740            if ($nextEl && $nextEl.length > 0) {
9741                if (swiper.isEnd) {
9742                    swiper.a11y.disableEl($nextEl);
9743                } else {
9744                    swiper.a11y.enableEl($nextEl);
9745                }
9746            }
9747        },
9748        updatePagination: function updatePagination() {
9749            var swiper = this;
9750            var params = swiper.params.a11y;
9751            if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
9752                swiper.pagination.bullets.each(function (bulletIndex, bulletEl) {
9753                    var $bulletEl = $(bulletEl);
9754                    swiper.a11y.makeElFocusable($bulletEl);
9755                    swiper.a11y.addElRole($bulletEl, 'button');
9756                    swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1));
9757                });
9758            }
9759        },
9760        init: function init() {
9761            var swiper = this;
9762
9763            swiper.$el.append(swiper.a11y.liveRegion);
9764
9765            // Navigation
9766            var params = swiper.params.a11y;
9767            var $nextEl;
9768            var $prevEl;
9769            if (swiper.navigation && swiper.navigation.$nextEl) {
9770                $nextEl = swiper.navigation.$nextEl;
9771            }
9772            if (swiper.navigation && swiper.navigation.$prevEl) {
9773                $prevEl = swiper.navigation.$prevEl;
9774            }
9775            if ($nextEl) {
9776                swiper.a11y.makeElFocusable($nextEl);
9777                swiper.a11y.addElRole($nextEl, 'button');
9778                swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);
9779                $nextEl.on('keydown', swiper.a11y.onEnterKey);
9780            }
9781            if ($prevEl) {
9782                swiper.a11y.makeElFocusable($prevEl);
9783                swiper.a11y.addElRole($prevEl, 'button');
9784                swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);
9785                $prevEl.on('keydown', swiper.a11y.onEnterKey);
9786            }
9787
9788            // Pagination
9789            if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
9790                swiper.pagination.$el.on('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey);
9791            }
9792        },
9793        destroy: function destroy() {
9794            var swiper = this;
9795            if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) { swiper.a11y.liveRegion.remove(); }
9796
9797            var $nextEl;
9798            var $prevEl;
9799            if (swiper.navigation && swiper.navigation.$nextEl) {
9800                $nextEl = swiper.navigation.$nextEl;
9801            }
9802            if (swiper.navigation && swiper.navigation.$prevEl) {
9803                $prevEl = swiper.navigation.$prevEl;
9804            }
9805            if ($nextEl) {
9806                $nextEl.off('keydown', swiper.a11y.onEnterKey);
9807            }
9808            if ($prevEl) {
9809                $prevEl.off('keydown', swiper.a11y.onEnterKey);
9810            }
9811
9812            // Pagination
9813            if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
9814                swiper.pagination.$el.off('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey);
9815            }
9816        },
9817    };
9818    var A11y = {
9819        name: 'a11y',
9820        params: {
9821            a11y: {
9822                enabled: true,
9823                notificationClass: 'swiper-notification',
9824                prevSlideMessage: 'Previous slide',
9825                nextSlideMessage: 'Next slide',
9826                firstSlideMessage: 'This is the first slide',
9827                lastSlideMessage: 'This is the last slide',
9828                paginationBulletMessage: 'Go to slide {{index}}',
9829            },
9830        },
9831        create: function create() {
9832            var swiper = this;
9833            Utils.extend(swiper, {
9834                a11y: {
9835                    liveRegion: $(("<span class=\"" + (swiper.params.a11y.notificationClass) + "\" aria-live=\"assertive\" aria-atomic=\"true\"></span>")),
9836                },
9837            });
9838            Object.keys(a11y).forEach(function (methodName) {
9839                swiper.a11y[methodName] = a11y[methodName].bind(swiper);
9840            });
9841        },
9842        on: {
9843            init: function init() {
9844                var swiper = this;
9845                if (!swiper.params.a11y.enabled) { return; }
9846                swiper.a11y.init();
9847                swiper.a11y.updateNavigation();
9848            },
9849            toEdge: function toEdge() {
9850                var swiper = this;
9851                if (!swiper.params.a11y.enabled) { return; }
9852                swiper.a11y.updateNavigation();
9853            },
9854            fromEdge: function fromEdge() {
9855                var swiper = this;
9856                if (!swiper.params.a11y.enabled) { return; }
9857                swiper.a11y.updateNavigation();
9858            },
9859            paginationUpdate: function paginationUpdate() {
9860                var swiper = this;
9861                if (!swiper.params.a11y.enabled) { return; }
9862                swiper.a11y.updatePagination();
9863            },
9864            destroy: function destroy() {
9865                var swiper = this;
9866                if (!swiper.params.a11y.enabled) { return; }
9867                swiper.a11y.destroy();
9868            },
9869        },
9870    };
9871
9872    var History = {
9873        init: function init() {
9874            var swiper = this;
9875            if (!swiper.params.history) { return; }
9876            if (!win.history || !win.history.pushState) {
9877                swiper.params.history.enabled = false;
9878                swiper.params.hashNavigation.enabled = true;
9879                return;
9880            }
9881            var history = swiper.history;
9882            history.initialized = true;
9883            history.paths = History.getPathValues();
9884            if (!history.paths.key && !history.paths.value) { return; }
9885            history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);
9886            if (!swiper.params.history.replaceState) {
9887                win.addEventListener('popstate', swiper.history.setHistoryPopState);
9888            }
9889        },
9890        destroy: function destroy() {
9891            var swiper = this;
9892            if (!swiper.params.history.replaceState) {
9893                win.removeEventListener('popstate', swiper.history.setHistoryPopState);
9894            }
9895        },
9896        setHistoryPopState: function setHistoryPopState() {
9897            var swiper = this;
9898            swiper.history.paths = History.getPathValues();
9899            swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
9900        },
9901        getPathValues: function getPathValues() {
9902            var pathArray = win.location.pathname.slice(1).split('/').filter(function (part) { return part !== ''; });
9903            var total = pathArray.length;
9904            var key = pathArray[total - 2];
9905            var value = pathArray[total - 1];
9906            return { key: key, value: value };
9907        },
9908        setHistory: function setHistory(key, index) {
9909            var swiper = this;
9910            if (!swiper.history.initialized || !swiper.params.history.enabled) { return; }
9911            var slide = swiper.slides.eq(index);
9912            var value = History.slugify(slide.attr('data-history'));
9913            if (!win.location.pathname.includes(key)) {
9914                value = key + "/" + value;
9915            }
9916            var currentState = win.history.state;
9917            if (currentState && currentState.value === value) {
9918                return;
9919            }
9920            if (swiper.params.history.replaceState) {
9921                win.history.replaceState({ value: value }, null, value);
9922            } else {
9923                win.history.pushState({ value: value }, null, value);
9924            }
9925        },
9926        slugify: function slugify(text) {
9927            return text.toString().toLowerCase()
9928                .replace(/\s+/g, '-')
9929                .replace(/[^\w-]+/g, '')
9930                .replace(/--+/g, '-')
9931                .replace(/^-+/, '')
9932                .replace(/-+$/, '');
9933        },
9934        scrollToSlide: function scrollToSlide(speed, value, runCallbacks) {
9935            var swiper = this;
9936            if (value) {
9937                for (var i = 0, length = swiper.slides.length; i < length; i += 1) {
9938                    var slide = swiper.slides.eq(i);
9939                    var slideHistory = History.slugify(slide.attr('data-history'));
9940                    if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {
9941                        var index = slide.index();
9942                        swiper.slideTo(index, speed, runCallbacks);
9943                    }
9944                }
9945            } else {
9946                swiper.slideTo(0, speed, runCallbacks);
9947            }
9948        },
9949    };
9950
9951    var History$1 = {
9952        name: 'history',
9953        params: {
9954            history: {
9955                enabled: false,
9956                replaceState: false,
9957                key: 'slides',
9958            },
9959        },
9960        create: function create() {
9961            var swiper = this;
9962            Utils.extend(swiper, {
9963                history: {
9964                    init: History.init.bind(swiper),
9965                    setHistory: History.setHistory.bind(swiper),
9966                    setHistoryPopState: History.setHistoryPopState.bind(swiper),
9967                    scrollToSlide: History.scrollToSlide.bind(swiper),
9968                    destroy: History.destroy.bind(swiper),
9969                },
9970            });
9971        },
9972        on: {
9973            init: function init() {
9974                var swiper = this;
9975                if (swiper.params.history.enabled) {
9976                    swiper.history.init();
9977                }
9978            },
9979            destroy: function destroy() {
9980                var swiper = this;
9981                if (swiper.params.history.enabled) {
9982                    swiper.history.destroy();
9983                }
9984            },
9985            transitionEnd: function transitionEnd() {
9986                var swiper = this;
9987                if (swiper.history.initialized) {
9988                    swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
9989                }
9990            },
9991        },
9992    };
9993
9994    var HashNavigation = {
9995        onHashCange: function onHashCange() {
9996            var swiper = this;
9997            var newHash = doc.location.hash.replace('#', '');
9998            var activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');
9999            if (newHash !== activeSlideHash) {
10000                var newIndex = swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-hash=\"" + newHash + "\"]")).index();
10001                if (typeof newIndex === 'undefined') { return; }
10002                swiper.slideTo(newIndex);
10003            }
10004        },
10005        setHash: function setHash() {
10006            var swiper = this;
10007            if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) { return; }
10008            if (swiper.params.hashNavigation.replaceState && win.history && win.history.replaceState) {
10009                win.history.replaceState(null, null, (("#" + (swiper.slides.eq(swiper.activeIndex).attr('data-hash'))) || ''));
10010            } else {
10011                var slide = swiper.slides.eq(swiper.activeIndex);
10012                var hash = slide.attr('data-hash') || slide.attr('data-history');
10013                doc.location.hash = hash || '';
10014            }
10015        },
10016        init: function init() {
10017            var swiper = this;
10018            if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) { return; }
10019            swiper.hashNavigation.initialized = true;
10020            var hash = doc.location.hash.replace('#', '');
10021            if (hash) {
10022                var speed = 0;
10023                for (var i = 0, length = swiper.slides.length; i < length; i += 1) {
10024                    var slide = swiper.slides.eq(i);
10025                    var slideHash = slide.attr('data-hash') || slide.attr('data-history');
10026                    if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {
10027                        var index = slide.index();
10028                        swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);
10029                    }
10030                }
10031            }
10032            if (swiper.params.hashNavigation.watchState) {
10033                $(win).on('hashchange', swiper.hashNavigation.onHashCange);
10034            }
10035        },
10036        destroy: function destroy() {
10037            var swiper = this;
10038            if (swiper.params.hashNavigation.watchState) {
10039                $(win).off('hashchange', swiper.hashNavigation.onHashCange);
10040            }
10041        },
10042    };
10043    var HashNavigation$1 = {
10044        name: 'hash-navigation',
10045        params: {
10046            hashNavigation: {
10047                enabled: false,
10048                replaceState: false,
10049                watchState: false,
10050            },
10051        },
10052        create: function create() {
10053            var swiper = this;
10054            Utils.extend(swiper, {
10055                hashNavigation: {
10056                    initialized: false,
10057                    init: HashNavigation.init.bind(swiper),
10058                    destroy: HashNavigation.destroy.bind(swiper),
10059                    setHash: HashNavigation.setHash.bind(swiper),
10060                    onHashCange: HashNavigation.onHashCange.bind(swiper),
10061                },
10062            });
10063        },
10064        on: {
10065            init: function init() {
10066                var swiper = this;
10067                if (swiper.params.hashNavigation.enabled) {
10068                    swiper.hashNavigation.init();
10069                }
10070            },
10071            destroy: function destroy() {
10072                var swiper = this;
10073                if (swiper.params.hashNavigation.enabled) {
10074                    swiper.hashNavigation.destroy();
10075                }
10076            },
10077            transitionEnd: function transitionEnd() {
10078                var swiper = this;
10079                if (swiper.hashNavigation.initialized) {
10080                    swiper.hashNavigation.setHash();
10081                }
10082            },
10083        },
10084    };
10085
10086    /* eslint no-underscore-dangle: "off" */
10087
10088    var Autoplay = {
10089        run: function run() {
10090            var swiper = this;
10091            var $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
10092            var delay = swiper.params.autoplay.delay;
10093            if ($activeSlideEl.attr('data-swiper-autoplay')) {
10094                delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
10095            }
10096            swiper.autoplay.timeout = Utils.nextTick(function () {
10097                if (swiper.params.autoplay.reverseDirection) {
10098                    if (swiper.params.loop) {
10099                        swiper.loopFix();
10100                        swiper.slidePrev(swiper.params.speed, true, true);
10101                        swiper.emit('autoplay');
10102                    } else if (!swiper.isBeginning) {
10103                        swiper.slidePrev(swiper.params.speed, true, true);
10104                        swiper.emit('autoplay');
10105                    } else if (!swiper.params.autoplay.stopOnLastSlide) {
10106                        swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
10107                        swiper.emit('autoplay');
10108                    } else {
10109                        swiper.autoplay.stop();
10110                    }
10111                } else if (swiper.params.loop) {
10112                    swiper.loopFix();
10113                    swiper.slideNext(swiper.params.speed, true, true);
10114                    swiper.emit('autoplay');
10115                } else if (!swiper.isEnd) {
10116                    swiper.slideNext(swiper.params.speed, true, true);
10117                    swiper.emit('autoplay');
10118                } else if (!swiper.params.autoplay.stopOnLastSlide) {
10119                    swiper.slideTo(0, swiper.params.speed, true, true);
10120                    swiper.emit('autoplay');
10121                } else {
10122                    swiper.autoplay.stop();
10123                }
10124            }, delay);
10125        },
10126        start: function start() {
10127            var swiper = this;
10128            if (typeof swiper.autoplay.timeout !== 'undefined') { return false; }
10129            if (swiper.autoplay.running) { return false; }
10130            swiper.autoplay.running = true;
10131            swiper.emit('autoplayStart');
10132            swiper.autoplay.run();
10133            return true;
10134        },
10135        stop: function stop() {
10136            var swiper = this;
10137            if (!swiper.autoplay.running) { return false; }
10138            if (typeof swiper.autoplay.timeout === 'undefined') { return false; }
10139
10140            if (swiper.autoplay.timeout) {
10141                clearTimeout(swiper.autoplay.timeout);
10142                swiper.autoplay.timeout = undefined;
10143            }
10144            swiper.autoplay.running = false;
10145            swiper.emit('autoplayStop');
10146            return true;
10147        },
10148        pause: function pause(speed) {
10149            var swiper = this;
10150            if (!swiper.autoplay.running) { return; }
10151            if (swiper.autoplay.paused) { return; }
10152            if (swiper.autoplay.timeout) { clearTimeout(swiper.autoplay.timeout); }
10153            swiper.autoplay.paused = true;
10154            if (speed === 0 || !swiper.params.autoplay.waitForTransition) {
10155                swiper.autoplay.paused = false;
10156                swiper.autoplay.run();
10157            } else {
10158                swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);
10159                swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
10160            }
10161        },
10162    };
10163
10164    var Autoplay$1 = {
10165        name: 'autoplay',
10166        params: {
10167            autoplay: {
10168                enabled: false,
10169                delay: 3000,
10170                waitForTransition: true,
10171                disableOnInteraction: true,
10172                stopOnLastSlide: false,
10173                reverseDirection: false,
10174            },
10175        },
10176        create: function create() {
10177            var swiper = this;
10178            Utils.extend(swiper, {
10179                autoplay: {
10180                    running: false,
10181                    paused: false,
10182                    run: Autoplay.run.bind(swiper),
10183                    start: Autoplay.start.bind(swiper),
10184                    stop: Autoplay.stop.bind(swiper),
10185                    pause: Autoplay.pause.bind(swiper),
10186                    onTransitionEnd: function onTransitionEnd(e) {
10187                        if (!swiper || swiper.destroyed || !swiper.$wrapperEl) { return; }
10188                        if (e.target !== this) { return; }
10189                        swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);
10190                        swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
10191                        swiper.autoplay.paused = false;
10192                        if (!swiper.autoplay.running) {
10193                            swiper.autoplay.stop();
10194                        } else {
10195                            swiper.autoplay.run();
10196                        }
10197                    },
10198                },
10199            });
10200        },
10201        on: {
10202            init: function init() {
10203                var swiper = this;
10204                if (swiper.params.autoplay.enabled) {
10205                    swiper.autoplay.start();
10206                }
10207            },
10208            beforeTransitionStart: function beforeTransitionStart(speed, internal) {
10209                var swiper = this;
10210                if (swiper.autoplay.running) {
10211                    if (internal || !swiper.params.autoplay.disableOnInteraction) {
10212                        swiper.autoplay.pause(speed);
10213                    } else {
10214                        swiper.autoplay.stop();
10215                    }
10216                }
10217            },
10218            sliderFirstMove: function sliderFirstMove() {
10219                var swiper = this;
10220                if (swiper.autoplay.running) {
10221                    if (swiper.params.autoplay.disableOnInteraction) {
10222                        swiper.autoplay.stop();
10223                    } else {
10224                        swiper.autoplay.pause();
10225                    }
10226                }
10227            },
10228            destroy: function destroy() {
10229                var swiper = this;
10230                if (swiper.autoplay.running) {
10231                    swiper.autoplay.stop();
10232                }
10233            },
10234        },
10235    };
10236
10237    var Fade = {
10238        setTranslate: function setTranslate() {
10239            var swiper = this;
10240            var slides = swiper.slides;
10241            for (var i = 0; i < slides.length; i += 1) {
10242                var $slideEl = swiper.slides.eq(i);
10243                var offset = $slideEl[0].swiperSlideOffset;
10244                var tx = -offset;
10245                if (!swiper.params.virtualTranslate) { tx -= swiper.translate; }
10246                var ty = 0;
10247                if (!swiper.isHorizontal()) {
10248                    ty = tx;
10249                    tx = 0;
10250                }
10251                var slideOpacity = swiper.params.fadeEffect.crossFade
10252                    ? Math.max(1 - Math.abs($slideEl[0].progress), 0)
10253                    : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);
10254                $slideEl
10255                    .css({
10256                        opacity: slideOpacity,
10257                    })
10258                    .transform(("translate3d(" + tx + "px, " + ty + "px, 0px)"));
10259            }
10260        },
10261        setTransition: function setTransition(duration) {
10262            var swiper = this;
10263            var slides = swiper.slides;
10264            var $wrapperEl = swiper.$wrapperEl;
10265            slides.transition(duration);
10266            if (swiper.params.virtualTranslate && duration !== 0) {
10267                var eventTriggered = false;
10268                slides.transitionEnd(function () {
10269                    if (eventTriggered) { return; }
10270                    if (!swiper || swiper.destroyed) { return; }
10271                    eventTriggered = true;
10272                    swiper.animating = false;
10273                    var triggerEvents = ['webkitTransitionEnd', 'transitionend'];
10274                    for (var i = 0; i < triggerEvents.length; i += 1) {
10275                        $wrapperEl.trigger(triggerEvents[i]);
10276                    }
10277                });
10278            }
10279        },
10280    };
10281
10282    var EffectFade = {
10283        name: 'effect-fade',
10284        params: {
10285            fadeEffect: {
10286                crossFade: false,
10287            },
10288        },
10289        create: function create() {
10290            var swiper = this;
10291            Utils.extend(swiper, {
10292                fadeEffect: {
10293                    setTranslate: Fade.setTranslate.bind(swiper),
10294                    setTransition: Fade.setTransition.bind(swiper),
10295                },
10296            });
10297        },
10298        on: {
10299            beforeInit: function beforeInit() {
10300                var swiper = this;
10301                if (swiper.params.effect !== 'fade') { return; }
10302                swiper.classNames.push(((swiper.params.containerModifierClass) + "fade"));
10303                var overwriteParams = {
10304                    slidesPerView: 1,
10305                    slidesPerColumn: 1,
10306                    slidesPerGroup: 1,
10307                    watchSlidesProgress: true,
10308                    spaceBetween: 0,
10309                    virtualTranslate: true,
10310                };
10311                Utils.extend(swiper.params, overwriteParams);
10312                Utils.extend(swiper.originalParams, overwriteParams);
10313            },
10314            setTranslate: function setTranslate() {
10315                var swiper = this;
10316                if (swiper.params.effect !== 'fade') { return; }
10317                swiper.fadeEffect.setTranslate();
10318            },
10319            setTransition: function setTransition(duration) {
10320                var swiper = this;
10321                if (swiper.params.effect !== 'fade') { return; }
10322                swiper.fadeEffect.setTransition(duration);
10323            },
10324        },
10325    };
10326
10327    var Cube = {
10328        setTranslate: function setTranslate() {
10329            var swiper = this;
10330            var $el = swiper.$el;
10331            var $wrapperEl = swiper.$wrapperEl;
10332            var slides = swiper.slides;
10333            var swiperWidth = swiper.width;
10334            var swiperHeight = swiper.height;
10335            var rtl = swiper.rtlTranslate;
10336            var swiperSize = swiper.size;
10337            var params = swiper.params.cubeEffect;
10338            var isHorizontal = swiper.isHorizontal();
10339            var isVirtual = swiper.virtual && swiper.params.virtual.enabled;
10340            var wrapperRotate = 0;
10341            var $cubeShadowEl;
10342            if (params.shadow) {
10343                if (isHorizontal) {
10344                    $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');
10345                    if ($cubeShadowEl.length === 0) {
10346                        $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
10347                        $wrapperEl.append($cubeShadowEl);
10348                    }
10349                    $cubeShadowEl.css({ height: (swiperWidth + "px") });
10350                } else {
10351                    $cubeShadowEl = $el.find('.swiper-cube-shadow');
10352                    if ($cubeShadowEl.length === 0) {
10353                        $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
10354                        $el.append($cubeShadowEl);
10355                    }
10356                }
10357            }
10358            for (var i = 0; i < slides.length; i += 1) {
10359                var $slideEl = slides.eq(i);
10360                var slideIndex = i;
10361                if (isVirtual) {
10362                    slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);
10363                }
10364                var slideAngle = slideIndex * 90;
10365                var round = Math.floor(slideAngle / 360);
10366                if (rtl) {
10367                    slideAngle = -slideAngle;
10368                    round = Math.floor(-slideAngle / 360);
10369                }
10370                var progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
10371                var tx = 0;
10372                var ty = 0;
10373                var tz = 0;
10374                if (slideIndex % 4 === 0) {
10375                    tx = -round * 4 * swiperSize;
10376                    tz = 0;
10377                } else if ((slideIndex - 1) % 4 === 0) {
10378                    tx = 0;
10379                    tz = -round * 4 * swiperSize;
10380                } else if ((slideIndex - 2) % 4 === 0) {
10381                    tx = swiperSize + (round * 4 * swiperSize);
10382                    tz = swiperSize;
10383                } else if ((slideIndex - 3) % 4 === 0) {
10384                    tx = -swiperSize;
10385                    tz = (3 * swiperSize) + (swiperSize * 4 * round);
10386                }
10387                if (rtl) {
10388                    tx = -tx;
10389                }
10390
10391                if (!isHorizontal) {
10392                    ty = tx;
10393                    tx = 0;
10394                }
10395
10396                var transform = "rotateX(" + (isHorizontal ? 0 : -slideAngle) + "deg) rotateY(" + (isHorizontal ? slideAngle : 0) + "deg) translate3d(" + tx + "px, " + ty + "px, " + tz + "px)";
10397                if (progress <= 1 && progress > -1) {
10398                    wrapperRotate = (slideIndex * 90) + (progress * 90);
10399                    if (rtl) { wrapperRotate = (-slideIndex * 90) - (progress * 90); }
10400                }
10401                $slideEl.transform(transform);
10402                if (params.slideShadows) {
10403                    // Set shadows
10404                    var shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
10405                    var shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
10406                    if (shadowBefore.length === 0) {
10407                        shadowBefore = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'left' : 'top') + "\"></div>"));
10408                        $slideEl.append(shadowBefore);
10409                    }
10410                    if (shadowAfter.length === 0) {
10411                        shadowAfter = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'right' : 'bottom') + "\"></div>"));
10412                        $slideEl.append(shadowAfter);
10413                    }
10414                    if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); }
10415                    if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); }
10416                }
10417            }
10418            $wrapperEl.css({
10419                '-webkit-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
10420                '-moz-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
10421                '-ms-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
10422                'transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
10423            });
10424
10425            if (params.shadow) {
10426                if (isHorizontal) {
10427                    $cubeShadowEl.transform(("translate3d(0px, " + ((swiperWidth / 2) + params.shadowOffset) + "px, " + (-swiperWidth / 2) + "px) rotateX(90deg) rotateZ(0deg) scale(" + (params.shadowScale) + ")"));
10428                } else {
10429                    var shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);
10430                    var multiplier = 1.5 - (
10431                        (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2)
10432                        + (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)
10433                    );
10434                    var scale1 = params.shadowScale;
10435                    var scale2 = params.shadowScale / multiplier;
10436                    var offset = params.shadowOffset;
10437                    $cubeShadowEl.transform(("scale3d(" + scale1 + ", 1, " + scale2 + ") translate3d(0px, " + ((swiperHeight / 2) + offset) + "px, " + (-swiperHeight / 2 / scale2) + "px) rotateX(-90deg)"));
10438                }
10439            }
10440            var zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0;
10441            $wrapperEl
10442                .transform(("translate3d(0px,0," + zFactor + "px) rotateX(" + (swiper.isHorizontal() ? 0 : wrapperRotate) + "deg) rotateY(" + (swiper.isHorizontal() ? -wrapperRotate : 0) + "deg)"));
10443        },
10444        setTransition: function setTransition(duration) {
10445            var swiper = this;
10446            var $el = swiper.$el;
10447            var slides = swiper.slides;
10448            slides
10449                .transition(duration)
10450                .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
10451                .transition(duration);
10452            if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
10453                $el.find('.swiper-cube-shadow').transition(duration);
10454            }
10455        },
10456    };
10457
10458    var EffectCube = {
10459        name: 'effect-cube',
10460        params: {
10461            cubeEffect: {
10462                slideShadows: true,
10463                shadow: true,
10464                shadowOffset: 20,
10465                shadowScale: 0.94,
10466            },
10467        },
10468        create: function create() {
10469            var swiper = this;
10470            Utils.extend(swiper, {
10471                cubeEffect: {
10472                    setTranslate: Cube.setTranslate.bind(swiper),
10473                    setTransition: Cube.setTransition.bind(swiper),
10474                },
10475            });
10476        },
10477        on: {
10478            beforeInit: function beforeInit() {
10479                var swiper = this;
10480                if (swiper.params.effect !== 'cube') { return; }
10481                swiper.classNames.push(((swiper.params.containerModifierClass) + "cube"));
10482                swiper.classNames.push(((swiper.params.containerModifierClass) + "3d"));
10483                var overwriteParams = {
10484                    slidesPerView: 1,
10485                    slidesPerColumn: 1,
10486                    slidesPerGroup: 1,
10487                    watchSlidesProgress: true,
10488                    resistanceRatio: 0,
10489                    spaceBetween: 0,
10490                    centeredSlides: false,
10491                    virtualTranslate: true,
10492                };
10493                Utils.extend(swiper.params, overwriteParams);
10494                Utils.extend(swiper.originalParams, overwriteParams);
10495            },
10496            setTranslate: function setTranslate() {
10497                var swiper = this;
10498                if (swiper.params.effect !== 'cube') { return; }
10499                swiper.cubeEffect.setTranslate();
10500            },
10501            setTransition: function setTransition(duration) {
10502                var swiper = this;
10503                if (swiper.params.effect !== 'cube') { return; }
10504                swiper.cubeEffect.setTransition(duration);
10505            },
10506        },
10507    };
10508
10509    var Flip = {
10510        setTranslate: function setTranslate() {
10511            var swiper = this;
10512            var slides = swiper.slides;
10513            var rtl = swiper.rtlTranslate;
10514            for (var i = 0; i < slides.length; i += 1) {
10515                var $slideEl = slides.eq(i);
10516                var progress = $slideEl[0].progress;
10517                if (swiper.params.flipEffect.limitRotation) {
10518                    progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
10519                }
10520                var offset = $slideEl[0].swiperSlideOffset;
10521                var rotate = -180 * progress;
10522                var rotateY = rotate;
10523                var rotateX = 0;
10524                var tx = -offset;
10525                var ty = 0;
10526                if (!swiper.isHorizontal()) {
10527                    ty = tx;
10528                    tx = 0;
10529                    rotateX = -rotateY;
10530                    rotateY = 0;
10531                } else if (rtl) {
10532                    rotateY = -rotateY;
10533                }
10534
10535                $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
10536
10537                if (swiper.params.flipEffect.slideShadows) {
10538                    // Set shadows
10539                    var shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
10540                    var shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
10541                    if (shadowBefore.length === 0) {
10542                        shadowBefore = $(("<div class=\"swiper-slide-shadow-" + (swiper.isHorizontal() ? 'left' : 'top') + "\"></div>"));
10543                        $slideEl.append(shadowBefore);
10544                    }
10545                    if (shadowAfter.length === 0) {
10546                        shadowAfter = $(("<div class=\"swiper-slide-shadow-" + (swiper.isHorizontal() ? 'right' : 'bottom') + "\"></div>"));
10547                        $slideEl.append(shadowAfter);
10548                    }
10549                    if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); }
10550                    if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); }
10551                }
10552                $slideEl
10553                    .transform(("translate3d(" + tx + "px, " + ty + "px, 0px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)"));
10554            }
10555        },
10556        setTransition: function setTransition(duration) {
10557            var swiper = this;
10558            var slides = swiper.slides;
10559            var activeIndex = swiper.activeIndex;
10560            var $wrapperEl = swiper.$wrapperEl;
10561            slides
10562                .transition(duration)
10563                .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
10564                .transition(duration);
10565            if (swiper.params.virtualTranslate && duration !== 0) {
10566                var eventTriggered = false;
10567                // eslint-disable-next-line
10568                slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {
10569                    if (eventTriggered) { return; }
10570                    if (!swiper || swiper.destroyed) { return; }
10571                    // if (!$(this).hasClass(swiper.params.slideActiveClass)) return;
10572                    eventTriggered = true;
10573                    swiper.animating = false;
10574                    var triggerEvents = ['webkitTransitionEnd', 'transitionend'];
10575                    for (var i = 0; i < triggerEvents.length; i += 1) {
10576                        $wrapperEl.trigger(triggerEvents[i]);
10577                    }
10578                });
10579            }
10580        },
10581    };
10582
10583    var EffectFlip = {
10584        name: 'effect-flip',
10585        params: {
10586            flipEffect: {
10587                slideShadows: true,
10588                limitRotation: true,
10589            },
10590        },
10591        create: function create() {
10592            var swiper = this;
10593            Utils.extend(swiper, {
10594                flipEffect: {
10595                    setTranslate: Flip.setTranslate.bind(swiper),
10596                    setTransition: Flip.setTransition.bind(swiper),
10597                },
10598            });
10599        },
10600        on: {
10601            beforeInit: function beforeInit() {
10602                var swiper = this;
10603                if (swiper.params.effect !== 'flip') { return; }
10604                swiper.classNames.push(((swiper.params.containerModifierClass) + "flip"));
10605                swiper.classNames.push(((swiper.params.containerModifierClass) + "3d"));
10606                var overwriteParams = {
10607                    slidesPerView: 1,
10608                    slidesPerColumn: 1,
10609                    slidesPerGroup: 1,
10610                    watchSlidesProgress: true,
10611                    spaceBetween: 0,
10612                    virtualTranslate: true,
10613                };
10614                Utils.extend(swiper.params, overwriteParams);
10615                Utils.extend(swiper.originalParams, overwriteParams);
10616            },
10617            setTranslate: function setTranslate() {
10618                var swiper = this;
10619                if (swiper.params.effect !== 'flip') { return; }
10620                swiper.flipEffect.setTranslate();
10621            },
10622            setTransition: function setTransition(duration) {
10623                var swiper = this;
10624                if (swiper.params.effect !== 'flip') { return; }
10625                swiper.flipEffect.setTransition(duration);
10626            },
10627        },
10628    };
10629
10630    var Coverflow = {
10631        setTranslate: function setTranslate() {
10632            var swiper = this;
10633            var swiperWidth = swiper.width;
10634            var swiperHeight = swiper.height;
10635            var slides = swiper.slides;
10636            var $wrapperEl = swiper.$wrapperEl;
10637            var slidesSizesGrid = swiper.slidesSizesGrid;
10638            var params = swiper.params.coverflowEffect;
10639            var isHorizontal = swiper.isHorizontal();
10640            var transform = swiper.translate;
10641            var center = isHorizontal ? -transform + (swiperWidth / 2) : -transform + (swiperHeight / 2);
10642            var rotate = isHorizontal ? params.rotate : -params.rotate;
10643            var translate = params.depth;
10644            // Each slide offset from center
10645            for (var i = 0, length = slides.length; i < length; i += 1) {
10646                var $slideEl = slides.eq(i);
10647                var slideSize = slidesSizesGrid[i];
10648                var slideOffset = $slideEl[0].swiperSlideOffset;
10649                var offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;
10650
10651                var rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
10652                var rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
10653                // var rotateZ = 0
10654                var translateZ = -translate * Math.abs(offsetMultiplier);
10655
10656                var translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier);
10657                var translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0;
10658
10659                // Fix for ultra small values
10660                if (Math.abs(translateX) < 0.001) { translateX = 0; }
10661                if (Math.abs(translateY) < 0.001) { translateY = 0; }
10662                if (Math.abs(translateZ) < 0.001) { translateZ = 0; }
10663                if (Math.abs(rotateY) < 0.001) { rotateY = 0; }
10664                if (Math.abs(rotateX) < 0.001) { rotateX = 0; }
10665
10666                var slideTransform = "translate3d(" + translateX + "px," + translateY + "px," + translateZ + "px)  rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)";
10667
10668                $slideEl.transform(slideTransform);
10669                $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
10670                if (params.slideShadows) {
10671                    // Set shadows
10672                    var $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
10673                    var $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
10674                    if ($shadowBeforeEl.length === 0) {
10675                        $shadowBeforeEl = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'left' : 'top') + "\"></div>"));
10676                        $slideEl.append($shadowBeforeEl);
10677                    }
10678                    if ($shadowAfterEl.length === 0) {
10679                        $shadowAfterEl = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'right' : 'bottom') + "\"></div>"));
10680                        $slideEl.append($shadowAfterEl);
10681                    }
10682                    if ($shadowBeforeEl.length) { $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; }
10683                    if ($shadowAfterEl.length) { $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; }
10684                }
10685            }
10686
10687            // Set correct perspective for IE10
10688            if (Support.pointerEvents || Support.prefixedPointerEvents) {
10689                var ws = $wrapperEl[0].style;
10690                ws.perspectiveOrigin = center + "px 50%";
10691            }
10692        },
10693        setTransition: function setTransition(duration) {
10694            var swiper = this;
10695            swiper.slides
10696                .transition(duration)
10697                .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
10698                .transition(duration);
10699        },
10700    };
10701
10702    var EffectCoverflow = {
10703        name: 'effect-coverflow',
10704        params: {
10705            coverflowEffect: {
10706                rotate: 50,
10707                stretch: 0,
10708                depth: 100,
10709                modifier: 1,
10710                slideShadows: true,
10711            },
10712        },
10713        create: function create() {
10714            var swiper = this;
10715            Utils.extend(swiper, {
10716                coverflowEffect: {
10717                    setTranslate: Coverflow.setTranslate.bind(swiper),
10718                    setTransition: Coverflow.setTransition.bind(swiper),
10719                },
10720            });
10721        },
10722        on: {
10723            beforeInit: function beforeInit() {
10724                var swiper = this;
10725                if (swiper.params.effect !== 'coverflow') { return; }
10726
10727                swiper.classNames.push(((swiper.params.containerModifierClass) + "coverflow"));
10728                swiper.classNames.push(((swiper.params.containerModifierClass) + "3d"));
10729
10730                swiper.params.watchSlidesProgress = true;
10731                swiper.originalParams.watchSlidesProgress = true;
10732            },
10733            setTranslate: function setTranslate() {
10734                var swiper = this;
10735                if (swiper.params.effect !== 'coverflow') { return; }
10736                swiper.coverflowEffect.setTranslate();
10737            },
10738            setTransition: function setTransition(duration) {
10739                var swiper = this;
10740                if (swiper.params.effect !== 'coverflow') { return; }
10741                swiper.coverflowEffect.setTransition(duration);
10742            },
10743        },
10744    };
10745
10746    var Thumbs = {
10747        init: function init() {
10748            var swiper = this;
10749            var ref = swiper.params;
10750            var thumbsParams = ref.thumbs;
10751            var SwiperClass = swiper.constructor;
10752            if (thumbsParams.swiper instanceof SwiperClass) {
10753                swiper.thumbs.swiper = thumbsParams.swiper;
10754                Utils.extend(swiper.thumbs.swiper.originalParams, {
10755                    watchSlidesProgress: true,
10756                    slideToClickedSlide: false,
10757                });
10758                Utils.extend(swiper.thumbs.swiper.params, {
10759                    watchSlidesProgress: true,
10760                    slideToClickedSlide: false,
10761                });
10762            } else if (Utils.isObject(thumbsParams.swiper)) {
10763                swiper.thumbs.swiper = new SwiperClass(Utils.extend({}, thumbsParams.swiper, {
10764                    watchSlidesVisibility: true,
10765                    watchSlidesProgress: true,
10766                    slideToClickedSlide: false,
10767                }));
10768                swiper.thumbs.swiperCreated = true;
10769            }
10770            swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);
10771            swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick);
10772        },
10773        onThumbClick: function onThumbClick() {
10774            var swiper = this;
10775            var thumbsSwiper = swiper.thumbs.swiper;
10776            if (!thumbsSwiper) { return; }
10777            var clickedIndex = thumbsSwiper.clickedIndex;
10778            var clickedSlide = thumbsSwiper.clickedSlide;
10779            if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) { return; }
10780            if (typeof clickedIndex === 'undefined' || clickedIndex === null) { return; }
10781            var slideToIndex;
10782            if (thumbsSwiper.params.loop) {
10783                slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);
10784            } else {
10785                slideToIndex = clickedIndex;
10786            }
10787            if (swiper.params.loop) {
10788                var currentIndex = swiper.activeIndex;
10789                if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {
10790                    swiper.loopFix();
10791                    // eslint-disable-next-line
10792                    swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
10793                    currentIndex = swiper.activeIndex;
10794                }
10795                var prevIndex = swiper.slides.eq(currentIndex).prevAll(("[data-swiper-slide-index=\"" + slideToIndex + "\"]")).eq(0).index();
10796                var nextIndex = swiper.slides.eq(currentIndex).nextAll(("[data-swiper-slide-index=\"" + slideToIndex + "\"]")).eq(0).index();
10797                if (typeof prevIndex === 'undefined') { slideToIndex = nextIndex; }
10798                else if (typeof nextIndex === 'undefined') { slideToIndex = prevIndex; }
10799                else if (nextIndex - currentIndex < currentIndex - prevIndex) { slideToIndex = nextIndex; }
10800                else { slideToIndex = prevIndex; }
10801            }
10802            swiper.slideTo(slideToIndex);
10803        },
10804        update: function update(initial) {
10805            var swiper = this;
10806            var thumbsSwiper = swiper.thumbs.swiper;
10807            if (!thumbsSwiper) { return; }
10808
10809            var slidesPerView = thumbsSwiper.params.slidesPerView === 'auto'
10810                ? thumbsSwiper.slidesPerViewDynamic()
10811                : thumbsSwiper.params.slidesPerView;
10812
10813            if (swiper.realIndex !== thumbsSwiper.realIndex) {
10814                var currentThumbsIndex = thumbsSwiper.activeIndex;
10815                var newThumbsIndex;
10816                if (thumbsSwiper.params.loop) {
10817                    if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {
10818                        thumbsSwiper.loopFix();
10819                        // eslint-disable-next-line
10820                        thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;
10821                        currentThumbsIndex = thumbsSwiper.activeIndex;
10822                    }
10823                    // Find actual thumbs index to slide to
10824                    var prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(("[data-swiper-slide-index=\"" + (swiper.realIndex) + "\"]")).eq(0).index();
10825                    var nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(("[data-swiper-slide-index=\"" + (swiper.realIndex) + "\"]")).eq(0).index();
10826                    if (typeof prevThumbsIndex === 'undefined') { newThumbsIndex = nextThumbsIndex; }
10827                    else if (typeof nextThumbsIndex === 'undefined') { newThumbsIndex = prevThumbsIndex; }
10828                    else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) { newThumbsIndex = currentThumbsIndex; }
10829                    else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) { newThumbsIndex = nextThumbsIndex; }
10830                    else { newThumbsIndex = prevThumbsIndex; }
10831                } else {
10832                    newThumbsIndex = swiper.realIndex;
10833                }
10834                if (thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {
10835                    if (thumbsSwiper.params.centeredSlides) {
10836                        if (newThumbsIndex > currentThumbsIndex) {
10837                            newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;
10838                        } else {
10839                            newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
10840                        }
10841                    } else if (newThumbsIndex > currentThumbsIndex) {
10842                        newThumbsIndex = newThumbsIndex - slidesPerView + 1;
10843                    }
10844                    thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);
10845                }
10846            }
10847
10848            // Activate thumbs
10849            var thumbsToActivate = 1;
10850            var thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;
10851
10852            if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {
10853                thumbsToActivate = swiper.params.slidesPerView;
10854            }
10855
10856            thumbsSwiper.slides.removeClass(thumbActiveClass);
10857            if (thumbsSwiper.params.loop) {
10858                for (var i = 0; i < thumbsToActivate; i += 1) {
10859                    thumbsSwiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + (swiper.realIndex + i
10859) + "\"]")).addClass(thumbActiveClass);
10860                }
10861            } else {
10862                for (var i$1 = 0; i$1 < thumbsToActivate; i$1 += 1) {
10863                    thumbsSwiper.slides.eq(swiper.realIndex + i$1).addClass(thumbActiveClass);
10864                }
10865            }
10866        },
10867    };
10868    var Thumbs$1 = {
10869        name: 'thumbs',
10870        params: {
10871            thumbs: {
10872                swiper: null,
10873                slideThumbActiveClass: 'swiper-slide-thumb-active',
10874                thumbsContainerClass: 'swiper-container-thumbs',
10875            },
10876        },
10877        create: function create() {
10878            var swiper = this;
10879            Utils.extend(swiper, {
10880                thumbs: {
10881                    swiper: null,
10882                    init: Thumbs.init.bind(swiper),
10883                    update: Thumbs.update.bind(swiper),
10884                    onThumbClick: Thumbs.onThumbClick.bind(swiper),
10885                },
10886            });
10887        },
10888        on: {
10889            beforeInit: function beforeInit() {
10890                var swiper = this;
10891                var ref = swiper.params;
10892                var thumbs = ref.thumbs;
10893                if (!thumbs || !thumbs.swiper) { return; }
10894                swiper.thumbs.init();
10895                swiper.thumbs.update(true);
10896            },
10897            slideChange: function slideChange() {
10898                var swiper = this;
10899                if (!swiper.thumbs.swiper) { return; }
10900                swiper.thumbs.update();
10901            },
10902            update: function update() {
10903                var swiper = this;
10904                if (!swiper.thumbs.swiper) { return; }
10905                swiper.thumbs.update();
10906            },
10907            resize: function resize() {
10908                var swiper = this;
10909                if (!swiper.thumbs.swiper) { return; }
10910                swiper.thumbs.update();
10911            },
10912            observerUpdate: function observerUpdate() {
10913                var swiper = this;
10914                if (!swiper.thumbs.swiper) { return; }
10915                swiper.thumbs.update();
10916            },
10917            setTransition: function setTransition(duration) {
10918                var swiper = this;
10919                var thumbsSwiper = swiper.thumbs.swiper;
10920                if (!thumbsSwiper) { return; }
10921                thumbsSwiper.setTransition(duration);
10922            },
10923            beforeDestroy: function beforeDestroy() {
10924                var swiper = this;
10925                var thumbsSwiper = swiper.thumbs.swiper;
10926                if (!thumbsSwiper) { return; }
10927                if (swiper.thumbs.swiperCreated && thumbsSwiper) {
10928                    thumbsSwiper.destroy();
10929                }
10930            },
10931        },
10932    };
10933
10934    // Swiper Class
10935
10936    var components = [
10937        Device$1,
10938        Support$1,
10939        Browser$1,
10940        Resize,
10941        Observer$1,
10942        Virtual$1,
10943        Keyboard$1,
10944        Mousewheel$1,
10945        Navigation$1,
10946        Pagination$1,
10947        Scrollbar$1,
10948        Parallax$1,
10949        Zoom$1,
10950        Lazy$1,
10951        Controller$1,
10952        A11y,
10953        History$1,
10954        HashNavigation$1,
10955        Autoplay$1,
10956        EffectFade,
10957        EffectCube,
10958        EffectFlip,
10959        EffectCoverflow,
10960        Thumbs$1
10961    ];
10962
10963    if (typeof Swiper.use === 'undefined') {
10964        Swiper.use = Swiper.Class.use;
10965        Swiper.installModule = Swiper.Class.installModule;
10966    }
10967
10968    Swiper.use(components);
10969
10970    return Swiper;
10971
10972})));
10973
10974/**
10975 *
10976 * MODIFIED VERSION!!! destroy() method fixed, YouTube thumbnail changed from hqdefault.jpg to maxresdefault.jpg
10977 *
10978 * Galleria v1.5.7 2017-05-10
10979 * http://galleria.io
10980 *
10981 * Copyright (c) 2010 - 2016 worse is better UG
10982 * Licensed under the MIT license
10983 * https://raw.github.com/worseisbetter/galleria/master/LICENSE
10984 *
10985 */
10986
10987(function( $, window, Galleria, undef ) {
10988
10989	/*global jQuery, navigator, Image, module, define */
10990
10991// some references
10992	var doc    = window.document,
10993		$doc   = $( doc ),
10994		$win   = $( window ),
10995
10996// native prototypes
10997		protoArray = Array.prototype,
10998
10999// internal constants
11000		VERSION = 1.57,
11001		DEBUG = true,
11002		TIMEOUT = 30000,
11003		DUMMY = false,
11004		NAV = navigator.userAgent.toLowerCase(),
11005		HASH = window.location.hash.replace(/#\//, ''),
11006		PROT = window.location.protocol == "file:" ? "http:" : window.location.protocol,
11007		M = Math,
vendor: 164,208 bytes, lines 11008-17821
11008		F = function(){},
11009		FALSE = function() { return false; },
11010		MOBILE = !(
11011			( window.screen.width > 1279 && window.devicePixelRatio == 1 ) || // there are not so many mobile devices with more than 1280px and pixelRatio equal to 1 (i.e. retina displays are equal to 2...)
11012			( window.screen.width > 1000 && window.innerWidth < (window.screen.width * .9) ) // this checks in the end if a user is using a resized browser window which is not common on mobile devices
11013		),
11014		IE = (function() {
11015
11016			var v = 3,
11017				div = doc.createElement( 'div' ),
11018				all = div.getElementsByTagName( 'i' );
11019
11020			do {
11021				div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->';
11022			} while ( all[0] );
11023
11024			return v > 4 ? v : doc.documentMode || undef;
11025
11026		}() ),
11027		DOM = function() {
11028			return {
11029				html:  doc.documentElement,
11030				body:  doc.body,
11031				head:  doc.getElementsByTagName('head')[0],
11032				title: doc.title
11033			};
11034		},
11035		IFRAME = window.parent !== window.self,
11036
11037		// list of Galleria events
11038		_eventlist = 'data ready thumbnail loadstart loadfinish image play pause progress ' +
11039			'fullscreen_enter fullscreen_exit idle_enter idle_exit rescale ' +
11040			'lightbox_open lightbox_close lightbox_image',
11041
11042		_events = (function() {
11043
11044			var evs = [];
11045
11046			$.each( _eventlist.split(' '), function( i, ev ) {
11047				evs.push( ev );
11048
11049				// legacy events
11050				if ( /_/.test( ev ) ) {
11051					evs.push( ev.replace( /_/g, '' ) );
11052				}
11053			});
11054
11055			return evs;
11056
11057		}()),
11058
11059		// legacy options
11060		// allows the old my_setting syntax and converts it to camel case
11061
11062		_legacyOptions = function( options ) {
11063
11064			var n;
11065
11066			if ( typeof options !== 'object' ) {
11067
11068				// return whatever it was...
11069				return options;
11070			}
11071
11072			$.each( options, function( key, value ) {
11073				if ( /^[a-z]+_/.test( key ) ) {
11074					n = '';
11075					$.each( key.split('_'), function( i, k ) {
11076						n += i > 0 ? k.substr( 0, 1 ).toUpperCase() + k.substr( 1 ) : k;
11077					});
11078					options[ n ] = value;
11079					delete options[ key ];
11080				}
11081			});
11082
11083			return options;
11084		},
11085
11086		_patchEvent = function( type ) {
11087
11088			// allow 'image' instead of Galleria.IMAGE
11089			if ( $.inArray( type, _events ) > -1 ) {
11090				return Galleria[ type.toUpperCase() ];
11091			}
11092
11093			return type;
11094		},
11095
11096		// video providers
11097		_video = {
11098			youtube: {
11099				reg: /https?:\/\/(?:[a-zA_Z]{2,3}.)?(?:youtube\.com\/watch\?)((?:[\w\d\-\_\=]+&amp;(?:amp;)?)*v(?:&lt;[A-Z]+&gt;)?=([0-9a-zA-Z\-\_]+))/i,
11100				embed: function() {
11101					return PROT + '//www.youtube.com/embed/' + this.id;
11102				},
11103				get_thumb: function( data ) {
11104					return PROT + '//img.youtube.com/vi/'+this.id+'/default.jpg';
11105				},
11106				get_image: function( data ) {
11107					return PROT + '//img.youtube.com/vi/'+this.id+'/maxresdefault.jpg';
11108				}
11109			},
11110			vimeo: {
11111				reg: /https?:\/\/(?:www\.)?(vimeo\.com)\/(?:hd#)?([0-9]+)/i,
11112				embed: function() {
11113					return PROT + '//player.vimeo.com/video/' + this.id;
11114				},
11115				getUrl: function() {
11116					return PROT + '//vimeo.com/api/v2/video/' + this.id + '.json?callback=?';
11117				},
11118				get_thumb: function( data ) {
11119					return data[0].thumbnail_medium;
11120				},
11121				get_image: function( data ) {
11122					return data[0].thumbnail_large;
11123				}
11124			},
11125			dailymotion: {
11126				reg: /https?:\/\/(?:www\.)?(dailymotion\.com)\/video\/([^_]+)/,
11127				embed: function() {
11128					return PROT + '//www.dailymotion.com/embed/video/' + this.id;
11129				},
11130				getUrl: function() {
11131					return 'https://api.dailymotion.com/video/' + this.id + '?fields=thumbnail_240_url,thumbnail_720_url&callback=?';
11132				},
11133				get_thumb: function( data ) {
11134					return data.thumbnail_240_url;
11135				},
11136				get_image: function( data ) {
11137					return data.thumbnail_720_url;
11138				}
11139			},
11140			_inst: []
11141		},
11142		Video = function( type, id ) {
11143
11144			for( var i=0; i<_video._inst.length; i++ ) {
11145				if ( _video._inst[i].id === id && _video._inst[i].type == type ) {
11146					return _video._inst[i];
11147				}
11148			}
11149
11150			this.type = type;
11151			this.id = id;
11152			this.readys = [];
11153
11154			_video._inst.push(this);
11155
11156			var self = this;
11157
11158			$.extend( this, _video[type] );
11159
11160			_videoThumbs = function(data) {
11161				self.data = data;
11162				$.each( self.readys, function( i, fn ) {
11163					fn( self.data );
11164				});
11165				self.readys = [];
11166			};
11167
11168			if ( this.hasOwnProperty('getUrl') ) {
11169				$.getJSON( this.getUrl(), _videoThumbs);
11170			} else {
11171				window.setTimeout(_videoThumbs, 400);
11172			}
11173
11174			this.getMedia = function( type, callback, fail ) {
11175				fail = fail || F;
11176				var self = this;
11177				var success = function( data ) {
11178					callback( self['get_'+type]( data ) );
11179				};
11180				try {
11181					if ( self.data ) {
11182						success( self.data );
11183					} else {
11184						self.readys.push( success );
11185					}
11186				} catch(e) {
11187					fail();
11188				}
11189			};
11190		},
11191
11192		// utility for testing the video URL and getting the video ID
11193		_videoTest = function( url ) {
11194			var match;
11195			for ( var v in _video ) {
11196				match = url && _video[v].reg && url.match( _video[v].reg );
11197				if( match && match.length ) {
11198					return {
11199						id: match[2],
11200						provider: v
11201					};
11202				}
11203			}
11204			return false;
11205		},
11206
11207		// native fullscreen handler
11208		_nativeFullscreen = {
11209
11210			support: (function() {
11211				var html = DOM().html;
11212				return !IFRAME && ( html.requestFullscreen || html.msRequestFullscreen || html.mozRequestFullScreen || html.webkitRequestFullScreen );
11213			}()),
11214
11215			callback: F,
11216
11217			enter: function( instance, callback, elem ) {
11218
11219				this.instance = instance;
11220
11221				this.callback = callback || F;
11222
11223				elem = elem || DOM().html;
11224				if ( elem.requestFullscreen ) {
11225					elem.requestFullscreen();
11226				}
11227				else if ( elem.msRequestFullscreen ) {
11228					elem.msRequestFullscreen();
11229				}
11230				else if ( elem.mozRequestFullScreen ) {
11231					elem.mozRequestFullScreen();
11232				}
11233				else if ( elem.webkitRequestFullScreen ) {
11234					elem.webkitRequestFullScreen();
11235				}
11236			},
11237
11238			exit: function( callback ) {
11239
11240				this.callback = callback || F;
11241
11242				if ( doc.exitFullscreen ) {
11243					doc.exitFullscreen();
11244				}
11245				else if ( doc.msExitFullscreen ) {
11246					doc.msExitFullscreen();
11247				}
11248				else if ( doc.mozCancelFullScreen ) {
11249					doc.mozCancelFullScreen();
11250				}
11251				else if ( doc.webkitCancelFullScreen ) {
11252					doc.webkitCancelFullScreen();
11253				}
11254			},
11255
11256			instance: null,
11257
11258			listen: function() {
11259
11260				if ( !this.support ) {
11261					return;
11262				}
11263
11264				var handler = function() {
11265
11266					if ( !_nativeFullscreen.instance ) {
11267						return;
11268					}
11269					var fs = _nativeFullscreen.instance._fullscreen;
11270
11271					if ( doc.fullscreen || doc.mozFullScreen || doc.webkitIsFullScreen || ( doc.msFullscreenElement && doc.msFullscreenElement !== null ) ) {
11272						fs._enter( _nativeFullscreen.callback );
11273					} else {
11274						fs._exit( _nativeFullscreen.callback );
11275					}
11276				};
11277				doc.addEventListener( 'fullscreenchange', handler, false );
11278				doc.addEventListener( 'MSFullscreenChange', handler, false );
11279				doc.addEventListener( 'mozfullscreenchange', handler, false );
11280				doc.addEventListener( 'webkitfullscreenchange', handler, false );
11281			}
11282		},
11283
11284		// the internal gallery holder
11285		_galleries = [],
11286
11287		// the internal instance holder
11288		_instances = [],
11289
11290		// flag for errors
11291		_hasError = false,
11292
11293		// canvas holder
11294		_canvas = false,
11295
11296		// instance pool, holds the galleries until themeLoad is triggered
11297		_pool = [],
11298
11299		// Run galleries from theme trigger
11300		_loadedThemes = [],
11301		_themeLoad = function( theme ) {
11302
11303			_loadedThemes.push(theme);
11304
11305			// run the instances we have in the pool
11306			// and apply the last theme if not specified
11307			$.each( _pool, function( i, instance ) {
11308				if ( instance._options.theme == theme.name || (!instance._initialized && !instance._options.theme) ) {
11309					instance.theme = theme;
11310					instance._init.call( instance );
11311				}
11312			});
11313		},
11314
11315		// the Utils singleton
11316		Utils = (function() {
11317
11318			return {
11319
11320				// legacy support for clearTimer
11321				clearTimer: function( id ) {
11322					$.each( Galleria.get(), function() {
11323						this.clearTimer( id );
11324					});
11325				},
11326
11327				// legacy support for addTimer
11328				addTimer: function( id ) {
11329					$.each( Galleria.get(), function() {
11330						this.addTimer( id );
11331					});
11332				},
11333
11334				array : function( obj ) {
11335					return protoArray.slice.call(obj, 0);
11336				},
11337
11338				create : function( className, nodeName ) {
11339					nodeName = nodeName || 'div';
11340					var elem = doc.createElement( nodeName );
11341					elem.className = className;
11342					return elem;
11343				},
11344
11345				removeFromArray : function( arr, elem ) {
11346					$.each(arr, function(i, el) {
11347						if ( el == elem ) {
11348							arr.splice(i, 1);
11349							return false;
11350						}
11351					});
11352					return arr;
11353				},
11354
11355				getScriptPath : function( src ) {
11356
11357					// the currently executing script is always the last
11358					src = src || $('script:last').attr('src');
11359					var slices = src.split('/');
11360
11361					if (slices.length == 1) {
11362						return '';
11363					}
11364
11365					slices.pop();
11366
11367					return slices.join('/') + '/';
11368				},
11369
11370				// CSS3 transitions, added in 1.2.4
11371				animate : (function() {
11372
11373					// detect transition
11374					var transition = (function( style ) {
11375						var props = 'transition WebkitTransition MozTransition OTransition'.split(' '),
11376							i;
11377
11378						// disable css3 animations in opera until stable
11379						if ( window.opera ) {
11380							return false;
11381						}
11382
11383						for ( i = 0; props[i]; i++ ) {
11384							if ( typeof style[ props[ i ] ] !== 'undefined' ) {
11385								return props[ i ];
11386							}
11387						}
11388						return false;
11389					}(( doc.body || doc.documentElement).style ));
11390
11391					// map transitionend event
11392					var endEvent = {
11393						MozTransition: 'transitionend',
11394						OTransition: 'oTransitionEnd',
11395						WebkitTransition: 'webkitTransitionEnd',
11396						transition: 'transitionend'
11397					}[ transition ];
11398
11399					// map bezier easing conversions
11400					var easings = {
11401						_default: [0.25, 0.1, 0.25, 1],
11402						galleria: [0.645, 0.045, 0.355, 1],
11403						galleriaIn: [0.55, 0.085, 0.68, 0.53],
11404						galleriaOut: [0.25, 0.46, 0.45, 0.94],
11405						ease: [0.25, 0, 0.25, 1],
11406						linear: [0.25, 0.25, 0.75, 0.75],
11407						'ease-in': [0.42, 0, 1, 1],
11408						'ease-out': [0, 0, 0.58, 1],
11409						'ease-in-out': [0.42, 0, 0.58, 1]
11410					};
11411
11412					// function for setting transition css for all browsers
11413					var setStyle = function( elem, value, suffix ) {
11414						var css = {};
11415						suffix = suffix || 'transition';
11416						$.each( 'webkit moz ms o'.split(' '), function() {
11417							css[ '-' + this + '-' + suffix ] = value;
11418						});
11419						elem.css( css );
11420					};
11421
11422					// clear styles
11423					var clearStyle = function( elem ) {
11424						setStyle( elem, 'none', 'transition' );
11425						if ( Galleria.WEBKIT && Galleria.TOUCH ) {
11426							setStyle( elem, 'translate3d(0,0,0)', 'transform' );
11427							if ( elem.data('revert') ) {
11428								elem.css( elem.data('revert') );
11429								elem.data('revert', null);
11430							}
11431						}
11432					};
11433
11434					// various variables
11435					var change, strings, easing, syntax, revert, form, css;
11436
11437					// the actual animation method
11438					return function( elem, to, options ) {
11439
11440						// extend defaults
11441						options = $.extend({
11442							duration: 400,
11443							complete: F,
11444							stop: false
11445						}, options);
11446
11447						// cache jQuery instance
11448						elem = $( elem );
11449
11450						if ( !options.duration ) {
11451							elem.css( to );
11452							options.complete.call( elem[0] );
11453							return;
11454						}
11455
11456						// fallback to jQuery's animate if transition is not supported
11457						if ( !transition ) {
11458							elem.animate(to, options);
11459							return;
11460						}
11461
11462						// stop
11463						if ( options.stop ) {
11464							// clear the animation
11465							elem.off( endEvent );
11466							clearStyle( elem );
11467						}
11468
11469						// see if there is a change
11470						change = false;
11471						$.each( to, function( key, val ) {
11472							css = elem.css( key );
11473							if ( Utils.parseValue( css ) != Utils.parseValue( val ) ) {
11474								change = true;
11475							}
11476							// also add computed styles for FF
11477							elem.css( key, css );
11478						});
11479						if ( !change ) {
11480							window.setTimeout( function() {
11481								options.complete.call( elem[0] );
11482							}, options.duration );
11483							return;
11484						}
11485
11486						// the css strings to be applied
11487						strings = [];
11488
11489						// the easing bezier
11490						easing = options.easing in easings ? easings[ options.easing ] : easings._default;
11491
11492						// the syntax
11493						syntax = ' ' + options.duration + 'ms' + ' cubic-bezier('  + easing.join(',') + ')';
11494
11495						// add a tiny timeout so that the browsers catches any css changes before animating
11496						window.setTimeout( (function(elem, endEvent, to, syntax) {
11497							return function() {
11498
11499								// attach the end event
11500								elem.one(endEvent, (function( elem ) {
11501									return function() {
11502
11503										// clear the animation
11504										clearStyle(elem);
11505
11506										// run the complete method
11507										options.complete.call(elem[0]);
11508									};
11509								}( elem )));
11510
11511								// do the webkit translate3d for better performance on iOS
11512								if( Galleria.WEBKIT && Galleria.TOUCH ) {
11513
11514									revert = {};
11515									form = [0,0,0];
11516
11517									$.each( ['left', 'top'], function(i, m) {
11518										if ( m in to ) {
11519											form[ i ] = ( Utils.parseValue( to[ m ] ) - Utils.parseValue(elem.css( m )) ) + 'px';
11520											revert[ m ] = to[ m ];
11521											delete to[ m ];
11522										}
11523									});
11524
11525									if ( form[0] || form[1]) {
11526
11527										elem.data('revert', revert);
11528
11529										strings.push('-webkit-transform' + syntax);
11530
11531										// 3d animate
11532										setStyle( elem, 'translate3d(' + form.join(',') + ')', 'transform');
11533									}
11534								}
11535
11536								// push the animation props
11537								$.each(to, function( p, val ) {
11538									strings.push(p + syntax);
11539								});
11540
11541								// set the animation styles
11542								setStyle( elem, strings.join(',') );
11543
11544								// animate
11545								elem.css( to );
11546
11547							};
11548						}(elem, endEvent, to, syntax)), 2);
11549					};
11550				}()),
11551
11552				removeAlpha : function( elem ) {
11553					if ( elem instanceof jQuery ) {
11554						elem = elem[0];
11555					}
11556					if ( IE < 9 && elem ) {
11557
11558						var style = elem.style,
11559							currentStyle = elem.currentStyle,
11560							filter = currentStyle && currentStyle.filter || style.filter || "";
11561
11562						if ( /alpha/.test( filter ) ) {
11563							style.filter = filter.replace( /alpha\([^)]*\)/i, '' );
11564						}
11565					}
11566				},
11567
11568				forceStyles : function( elem, styles ) {
11569					elem = $(elem);
11570					if ( elem.attr( 'style' ) ) {
11571						elem.data( 'styles', elem.attr( 'style' ) ).removeAttr( 'style' );
11572					}
11573					elem.css( styles );
11574				},
11575
11576				revertStyles : function() {
11577					$.each( Utils.array( arguments ), function( i, elem ) {
11578
11579						elem = $( elem );
11580						elem.removeAttr( 'style' );
11581
11582						elem.attr('style',''); // "fixes" webkit bug
11583
11584						if ( elem.data( 'styles' ) ) {
11585							elem.attr( 'style', elem.data('styles') ).data( 'styles', null );
11586						}
11587					});
11588				},
11589
11590				moveOut : function( elem ) {
11591					Utils.forceStyles( elem, {
11592						position: 'absolute',
11593						left: -10000
11594					});
11595				},
11596
11597				moveIn : function() {
11598					Utils.revertStyles.apply( Utils, Utils.array( arguments ) );
11599				},
11600
11601				hide : function( elem, speed, callback ) {
11602
11603					callback = callback || F;
11604
11605					var $elem = $(elem);
11606					elem = $elem[0];
11607
11608					// save the value if not exist
11609					if (! $elem.data('opacity') ) {
11610						$elem.data('opacity', $elem.css('opacity') );
11611					}
11612
11613					// always hide
11614					var style = { opacity: 0 };
11615
11616					if (speed) {
11617
11618						var complete = IE < 9 && elem ? function() {
11619							Utils.removeAlpha( elem );
11620							elem.style.visibility = 'hidden';
11621							callback.call( elem );
11622						} : callback;
11623
11624						Utils.animate( elem, style, {
11625							duration: speed,
11626							complete: complete,
11627							stop: true
11628						});
11629					} else {
11630						if ( IE < 9 && elem ) {
11631							Utils.removeAlpha( elem );
11632							elem.style.visibility = 'hidden';
11633						} else {
11634							$elem.css( style );
11635						}
11636					}
11637				},
11638
11639				show : function( elem, speed, callback ) {
11640
11641					callback = callback || F;
11642
11643					var $elem = $(elem);
11644					elem = $elem[0];
11645
11646					// bring back saved opacity
11647					var saved = parseFloat( $elem.data('opacity') ) || 1,
11648						style = { opacity: saved };
11649
11650					// animate or toggle
11651					if (speed) {
11652
11653						if ( IE < 9 ) {
11654							$elem.css('opacity', 0);
11655							elem.style.visibility = 'visible';
11656						}
11657
11658						var complete = IE < 9 && elem ? function() {
11659							if ( style.opacity == 1 ) {
11660								Utils.removeAlpha( elem );
11661							}
11662							callback.call( elem );
11663						} : callback;
11664
11665						Utils.animate( elem, style, {
11666							duration: speed,
11667							complete: complete,
11668							stop: true
11669						});
11670					} else {
11671						if ( IE < 9 && style.opacity == 1 && elem ) {
11672							Utils.removeAlpha( elem );
11673							elem.style.visibility = 'visible';
11674						} else {
11675							$elem.css( style );
11676						}
11677					}
11678				},
11679
11680				wait : function(options) {
11681
11682					Galleria._waiters = Galleria._waiters || [];
11683
11684					options = $.extend({
11685						until : FALSE,
11686						success : F,
11687						error : function() { Galleria.raise('Could not complete wait function.'); },
11688						timeout: 3000
11689					}, options);
11690
11691					var start = Utils.timestamp(),
11692						elapsed,
11693						now,
11694						tid,
11695						fn = function() {
11696							now = Utils.timestamp();
11697							elapsed = now - start;
11698							Utils.removeFromArray( Galleria._waiters, tid );
11699							if ( options.until( elapsed ) ) {
11700								options.success();
11701								return false;
11702							}
11703							if (typeof options.timeout == 'number' && now >= start + options.timeout) {
11704								options.error();
11705								return false;
11706							}
11707							Galleria._waiters.push( tid = window.setTimeout(fn, 10) );
11708						};
11709					Galleria._waiters.push( tid = window.setTimeout(fn, 10) );
11710				},
11711
11712				toggleQuality : function( img, force ) {
11713
11714					if ( ( IE !== 7 && IE !== 8 ) || !img || img.nodeName.toUpperCase() != 'IMG' ) {
11715						return;
11716					}
11717
11718					if ( typeof force === 'undefined' ) {
11719						force = img.style.msInterpolationMode === 'nearest-neighbor';
11720					}
11721
11722					img.style.msInterpolationMode = force ? 'bicubic' : 'nearest-neighbor';
11723				},
11724
11725				insertStyleTag : function( styles, id ) {
11726
11727					if ( id && $( '#'+id ).length ) {
11728						return;
11729					}
11730
11731					var style = doc.createElement( 'style' );
11732					if ( id ) {
11733						style.id = id;
11734					}
11735
11736					DOM().head.appendChild( style );
11737
11738					if ( style.styleSheet ) { // IE
11739						style.styleSheet.cssText = styles;
11740					} else {
11741						var cssText = doc.createTextNode( styles );
11742						style.appendChild( cssText );
11743					}
11744				},
11745
11746				// a loadscript method that works for local scripts
11747				loadScript: function( url, callback ) {
11748
11749					var done = false,
11750						script = $('<scr'+'ipt>').attr({
11751							src: url,
11752							async: true
11753						}).get(0);
11754
11755					// Attach handlers for all browsers
11756					script.onload = script.onreadystatechange = function() {
11757						if ( !done && (!this.readyState ||
11758								this.readyState === 'loaded' || this.readyState === 'complete') ) {
11759
11760							done = true;
11761
11762							// Handle memory leak in IE
11763							script.onload = script.onreadystatechange = null;
11764
11765							if (typeof callback === 'function') {
11766								callback.call( this, this );
11767							}
11768						}
11769					};
11770
11771					DOM().head.appendChild( script );
11772				},
11773
11774				// parse anything into a number
11775				parseValue: function( val ) {
11776					if (typeof val === 'number') {
11777						return val;
11778					} else if (typeof val === 'string') {
11779						var arr = val.match(/\-?\d|\./g);
11780						return arr && arr.constructor === Array ? arr.join('')*1 : 0;
11781					} else {
11782						return 0;
11783					}
11784				},
11785
11786				// timestamp abstraction
11787				timestamp: function() {
11788					return new Date().getTime();
11789				},
11790
11791				loadCSS : function( href, id, callback ) {
11792
11793					var link,
11794						length;
11795
11796					// look for manual css
11797					$('link[rel=stylesheet]').each(function() {
11798						if ( new RegExp( href ).test( this.href ) ) {
11799							link = this;
11800							return false;
11801						}
11802					});
11803
11804					if ( typeof id === 'function' ) {
11805						callback = id;
11806						id = undef;
11807					}
11808
11809					callback = callback || F; // dirty
11810
11811					// if already present, return
11812					if ( link ) {
11813						callback.call( link, link );
11814						return link;
11815					}
11816
11817					// save the length of stylesheets to check against
11818					length = doc.styleSheets.length;
11819
11820					// check for existing id
11821					if( $( '#' + id ).length ) {
11822
11823						$( '#' + id ).attr( 'href', href );
11824						length--;
11825
11826					} else {
11827						link = $( '<link>' ).attr({
11828							rel: 'stylesheet',
11829							href: href,
11830							id: id
11831						}).get(0);
11832
11833						var styles = $('link[rel="stylesheet"], style');
11834						if ( styles.length ) {
11835							styles.get(0).parentNode.insertBefore( link, styles[0] );
11836						} else {
11837							DOM().head.appendChild( link );
11838						}
11839
11840						if ( IE && length >= 31 ) {
11841							Galleria.raise( 'You have reached the browser stylesheet limit (31)', true );
11842							return;
11843						}
11844					}
11845
11846					if ( typeof callback === 'function' ) {
11847
11848						// First check for dummy element (new in 1.2.8)
11849						var $loader = $('<s>').attr( 'id', 'galleria-loader' ).hide().appendTo( DOM().body );
11850
11851						Utils.wait({
11852							until: function() {
11853								return $loader.height() > 0;
11854							},
11855							success: function() {
11856								$loader.remove();
11857								callback.call( link, link );
11858							},
11859							error: function() {
11860								$loader.remove();
11861
11862								// If failed, tell the dev to download the latest theme
11863								Galleria.raise( 'Theme CSS could not load after 20 sec. ' + ( Galleria.QUIRK ?
11864									'Your browser is in Quirks Mode, please add a correct doctype.' :
11865									'Please download the latest theme at http://galleria.io/customer/.' ), true );
11866							},
11867							timeout: 5000
11868						});
11869					}
11870					return link;
11871				}
11872			};
11873		}()),
11874
11875		// play icon
11876		_playIcon = function( container ) {
11877
11878			var css = '.galleria-videoicon{width:60px;height:60px;position:absolute;top:50%;left:50%;z-index:1;' +
11879				'margin:-30px 0 0 -30px;cursor:pointer;background:#000;background:rgba(0,0,0,.8);border-radius:3px;-webkit-transition:all 150ms}' +
11880				'.galleria-videoicon i{width:0px;height:0px;border-style:solid;border-width:10px 0 10px 16px;display:block;' +
11881				'border-color:transparent transparent transparent #ffffff;margin:20px 0 0 22px}.galleria-image:hover .galleria-videoicon{background:#000}';
11882
11883			Utils.insertStyleTag( css, 'galleria-videoicon' );
11884
11885			return $( Utils.create( 'galleria-videoicon' ) ).html( '<i></i>' ).appendTo( container )
11886				.click( function() { $( this ).siblings( 'img' ).mouseup(); });
11887		},
11888
11889		// the transitions holder
11890		_transitions = (function() {
11891
11892			var _slide = function(params, complete, fade, door) {
11893
11894				var easing = this.getOptions('easing'),
11895					distance = this.getStageWidth(),
11896					from = { left: distance * ( params.rewind ? -1 : 1 ) },
11897					to = { left: 0 };
11898
11899				if ( fade ) {
11900					from.opacity = 0;
11901					to.opacity = 1;
11902				} else {
11903					from.opacity = 1;
11904				}
11905
11906				$(params.next).css(from);
11907
11908				Utils.animate(params.next, to, {
11909					duration: params.speed,
11910					complete: (function( elems ) {
11911						return function() {
11912							complete();
11913							elems.css({
11914								left: 0
11915							});
11916						};
11917					}( $( params.next ).add( params.prev ) )),
11918					queue: false,
11919					easing: easing
11920				});
11921
11922				if (door) {
11923					params.rewind = !params.rewind;
11924				}
11925
11926				if (params.prev) {
11927
11928					from = { left: 0 };
11929					to = { left: distance * ( params.rewind ? 1 : -1 ) };
11930
11931					if ( fade ) {
11932						from.opacity = 1;
11933						to.opacity = 0;
11934					}
11935
11936					$(params.prev).css(from);
11937					Utils.animate(params.prev, to, {
11938						duration: params.speed,
11939						queue: false,
11940						easing: easing,
11941						complete: function() {
11942							$(this).css('opacity', 0);
11943						}
11944					});
11945				}
11946			};
11947
11948			return {
11949
11950				active: false,
11951
11952				init: function( effect, params, complete ) {
11953					if ( _transitions.effects.hasOwnProperty( effect ) ) {
11954						_transitions.effects[ effect ].call( this, params, complete );
11955					}
11956				},
11957
11958				effects: {
11959
11960					fade: function(params, complete) {
11961						$(params.next).css({
11962							opacity: 0,
11963							left: 0
11964						});
11965						Utils.animate(params.next, {
11966							opacity: 1
11967						},{
11968							duration: params.speed,
11969							complete: complete
11970						});
11971						if (params.prev) {
11972							$(params.prev).css('opacity',1).show();
11973							Utils.animate(params.prev, {
11974								opacity: 0
11975							},{
11976								duration: params.speed
11977							});
11978						}
11979					},
11980
11981					flash: function(params, complete) {
11982						$(params.next).css({
11983							opacity: 0,
11984							left: 0
11985						});
11986						if (params.prev) {
11987							Utils.animate( params.prev, {
11988								opacity: 0
11989							},{
11990								duration: params.speed/2,
11991								complete: function() {
11992									Utils.animate( params.next, {
11993										opacity:1
11994									},{
11995										duration: params.speed,
11996										complete: complete
11997									});
11998								}
11999							});
12000						} else {
12001							Utils.animate( params.next, {
12002								opacity: 1
12003							},{
12004								duration: params.speed,
12005								complete: complete
12006							});
12007						}
12008					},
12009
12010					pulse: function(params, complete) {
12011						if (params.prev) {
12012							$(params.prev).hide();
12013						}
12014						$(params.next).css({
12015							opacity: 0,
12016							left: 0
12017						}).show();
12018						Utils.animate(params.next, {
12019							opacity:1
12020						},{
12021							duration: params.speed,
12022							complete: complete
12023						});
12024					},
12025
12026					slide: function(params, complete) {
12027						_slide.apply( this, Utils.array( arguments ) );
12028					},
12029
12030					fadeslide: function(params, complete) {
12031						_slide.apply( this, Utils.array( arguments ).concat( [true] ) );
12032					},
12033
12034					doorslide: function(params, complete) {
12035						_slide.apply( this, Utils.array( arguments ).concat( [false, true] ) );
12036					}
12037				}
12038			};
12039		}());
12040
12041// listen to fullscreen
12042	_nativeFullscreen.listen();
12043
12044// create special click:fast event for fast touch interaction
12045	$.event.special['click:fast'] = {
12046		propagate: true,
12047		add: function(handleObj) {
12048
12049			var getCoords = function(e) {
12050				if ( e.touches && e.touches.length ) {
12051					var touch = e.touches[0];
12052					return {
12053						x: touch.pageX,
12054						y: touch.pageY
12055					};
12056				}
12057			};
12058
12059			var def = {
12060				touched: false,
12061				touchdown: false,
12062				coords: { x:0, y:0 },
12063				evObj: {}
12064			};
12065
12066			$(this).data({
12067				clickstate: def,
12068				timer: 0
12069			}).on('touchstart.fast', function(e) {
12070				window.clearTimeout($(this).data('timer'));
12071				$(this).data('clickstate', {
12072					touched: true,
12073					touchdown: true,
12074					coords: getCoords(e.originalEvent),
12075					evObj: e
12076				});
12077			}).on('touchmove.fast', function(e) {
12078				var coords = getCoords(e.originalEvent),
12079					state = $(this).data('clickstate'),
12080					distance = Math.max(
12081						Math.abs(state.coords.x - coords.x),
12082						Math.abs(state.coords.y - coords.y)
12083					);
12084				if ( distance > 6 ) {
12085					$(this).data('clickstate', $.extend(state, {
12086						touchdown: false
12087					}));
12088				}
12089			}).on('touchend.fast', function(e) {
12090				var $this = $(this),
12091					state = $this.data('clickstate');
12092				if(state.touchdown) {
12093					handleObj.handler.call(this, e);
12094				}
12095				$this.data('timer', window.setTimeout(function() {
12096					$this.data('clickstate', def);
12097				}, 400));
12098			}).on('click.fast', function(e) {
12099				var state = $(this).data('clickstate');
12100				if ( state.touched ) {
12101					return false;
12102				}
12103				$(this).data('clickstate', def);
12104				handleObj.handler.call(this, e);
12105			});
12106		},
12107		remove: function() {
12108			$(this).off('touchstart.fast touchmove.fast touchend.fast click.fast');
12109		}
12110	};
12111
12112// trigger resize on orientationchange (IOS7)
12113	$win.on( 'orientationchange', function() {
12114		$(this).resize();
12115	});
12116
12117	/**
12118	 The main Galleria class
12119
12120	 @class
12121	 @constructor
12122
12123	 @example var gallery = new Galleria();
12124
12125	 @author http://wib.io
12126
12127	 @requires jQuery
12128
12129	 */
12130
12131	Galleria = function() {
12132
12133		var self = this;
12134
12135		// internal options
12136		this._options = {};
12137
12138		// flag for controlling play/pause
12139		this._playing = false;
12140
12141		// internal interval for slideshow
12142		this._playtime = 5000;
12143
12144		// internal variable for the currently active image
12145		this._active = null;
12146
12147		// the internal queue, arrayified
12148		this._queue = { length: 0 };
12149
12150		// the internal data array
12151		this._data = [];
12152
12153		// the internal dom collection
12154		this._dom = {};
12155
12156		// the internal thumbnails array
12157		this._thumbnails = [];
12158
12159		// the internal layers array
12160		this._layers = [];
12161
12162		// internal init flag
12163		this._initialized = false;
12164
12165		// internal firstrun flag
12166		this._firstrun = false;
12167
12168		// global stagewidth/height
12169		this._stageWidth = 0;
12170		this._stageHeight = 0;
12171
12172		// target holder
12173		this._target = undef;
12174
12175		// bind hashes
12176		this._binds = [];
12177
12178		// instance id
12179		this._id = parseInt(M.random()*10000, 10);
12180
12181		// add some elements
12182		var divs =  'container stage images image-nav image-nav-left image-nav-right ' +
12183			'info info-text info-title info-description ' +
12184			'thumbnails thumbnails-list thumbnails-container thumb-nav-left thumb-nav-right ' +
12185			'loader counter tooltip',
12186			spans = 'current total';
12187
12188		$.each( divs.split(' '), function( i, elemId ) {
12189			self._dom[ elemId ] = Utils.create( 'galleria-' + elemId );
12190		});
12191
12192		$.each( spans.split(' '), function( i, elemId ) {
12193			self._dom[ elemId ] = Utils.create( 'galleria-' + elemId, 'span' );
12194		});
12195
12196		// the internal keyboard object
12197		// keeps reference of the keybinds and provides helper methods for binding keys
12198		var keyboard = this._keyboard = {
12199
12200			keys : {
12201				'UP': 38,
12202				'DOWN': 40,
12203				'LEFT': 37,
12204				'RIGHT': 39,
12205				'RETURN': 13,
12206				'ESCAPE': 27,
12207				'BACKSPACE': 8,
12208				'SPACE': 32
12209			},
12210
12211			map : {},
12212
12213			bound: false,
12214
12215			press: function(e) {
12216				var key = e.keyCode || e.which;
12217				if ( key in keyboard.map && typeof keyboard.map[key] === 'function' ) {
12218					keyboard.map[key].call(self, e);
12219				}
12220			},
12221
12222			attach: function(map) {
12223
12224				var key, up;
12225
12226				for( key in map ) {
12227					if ( map.hasOwnProperty( key ) ) {
12228						up = key.toUpperCase();
12229						if ( up in keyboard.keys ) {
12230							keyboard.map[ keyboard.keys[up] ] = map[key];
12231						} else {
12232							keyboard.map[ up ] = map[key];
12233						}
12234					}
12235				}
12236				if ( !keyboard.bound ) {
12237					keyboard.bound = true;
12238					$doc.on('keydown', keyboard.press);
12239				}
12240			},
12241
12242			detach: function() {
12243				keyboard.bound = false;
12244				keyboard.map = {};
12245				$doc.off('keydown', keyboard.press);
12246			}
12247		};
12248
12249		// internal controls for keeping track of active / inactive images
12250		var controls = this._controls = {
12251
12252			0: undef,
12253
12254			1: undef,
12255
12256			active : 0,
12257
12258			swap : function() {
12259				controls.active = controls.active ? 0 : 1;
12260			},
12261
12262			getActive : function() {
12263				return self._options.swipe ? controls.slides[ self._active ] : controls[ controls.active ];
12264			},
12265
12266			getNext : function() {
12267				return self._options.swipe ? controls.slides[ self.getNext( self._active ) ] : controls[ 1 - controls.active ];
12268			},
12269
12270			slides : [],
12271
12272			frames: [],
12273
12274			layers: []
12275		};
12276
12277		// internal carousel object
12278		var carousel = this._carousel = {
12279
12280			// shortcuts
12281			next: self.$('thumb-nav-right'),
12282			prev: self.$('thumb-nav-left'),
12283
12284			// cache the width
12285			width: 0,
12286
12287			// track the current position
12288			current: 0,
12289
12290			// cache max value
12291			max: 0,
12292
12293			// save all hooks for each width in an array
12294			hooks: [],
12295
12296			// update the carousel
12297			// you can run this method anytime, f.ex on window.resize
12298			update: function() {
12299				var w = 0,
12300					h = 0,
12301					hooks = [0];
12302
12303				$.each( self._thumbnails, function( i, thumb ) {
12304					if ( thumb.ready ) {
12305						w += thumb.outerWidth || $( thumb.container ).outerWidth( true );
12306						// Due to a bug in jquery, outerwidth() returns the floor of the actual outerwidth,
12307						// if the browser is zoom to a value other than 100%. height() returns the floating point value.
12308						var containerWidth = $( thumb.container).width();
12309						w += containerWidth - M.floor(containerWidth);
12310
12311						hooks[ i+1 ] = w;
12312						h = M.max( h, thumb.outerHeight || $( thumb.container).outerHeight( true ) );
12313					}
12314				});
12315
12316				self.$( 'thumbnails' ).css({
12317					width: w,
12318					height: h
12319				});
12320
12321				carousel.max = w;
12322				carousel.hooks = hooks;
12323				carousel.width = self.$( 'thumbnails-list' ).width();
12324				carousel.setClasses();
12325
12326				self.$( 'thumbnails-container' ).toggleClass( 'galleria-carousel', w > carousel.width );
12327
12328				// one extra calculation
12329				carousel.width = self.$( 'thumbnails-list' ).width();
12330
12331				// todo: fix so the carousel moves to the left
12332			},
12333
12334			bindControls: function() {
12335
12336				var i;
12337
12338				carousel.next.on( 'click:fast', function(e) {
12339					e.preventDefault();
12340
12341					if ( self._options.carouselSteps === 'auto' ) {
12342
12343						for ( i = carousel.current; i < carousel.hooks.length; i++ ) {
12344							if ( carousel.hooks[i] - carousel.hooks[ carousel.current ] > carousel.width ) {
12345								carousel.set(i - 2);
12346								break;
12347							}
12348						}
12349
12350					} else {
12351						carousel.set( carousel.current + self._options.carouselSteps);
12352					}
12353				});
12354
12355				carousel.prev.on( 'click:fast', function(e) {
12356					e.preventDefault();
12357
12358					if ( self._options.carouselSteps === 'auto' ) {
12359
12360						for ( i = carousel.current; i >= 0; i-- ) {
12361							if ( carousel.hooks[ carousel.current ] - carousel.hooks[i] > carousel.width ) {
12362								carousel.set( i + 2 );
12363								break;
12364							} else if ( i === 0 ) {
12365								carousel.set( 0 );
12366								break;
12367							}
12368						}
12369					} else {
12370						carousel.set( carousel.current - self._options.carouselSteps );
12371					}
12372				});
12373			},
12374
12375			// calculate and set positions
12376			set: function( i ) {
12377				i = M.max( i, 0 );
12378				while ( carousel.hooks[i - 1] + carousel.width >= carousel.max && i >= 0 ) {
12379					i--;
12380				}
12381				carousel.current = i;
12382				carousel.animate();
12383			},
12384
12385			// get the last position
12386			getLast: function(i) {
12387				return ( i || carousel.current ) - 1;
12388			},
12389
12390			// follow the active image
12391			follow: function(i) {
12392
12393				//don't follow if position fits
12394				if ( i === 0 || i === carousel.hooks.length - 2 ) {
12395					carousel.set( i );
12396					return;
12397				}
12398
12399				// calculate last position
12400				var last = carousel.current;
12401				while( carousel.hooks[last] - carousel.hooks[ carousel.current ] <
12402				carousel.width && last <= carousel.hooks.length ) {
12403					last ++;
12404				}
12405
12406				// set position
12407				if ( i - 1 < carousel.current ) {
12408					carousel.set( i - 1 );
12409				} else if ( i + 2 > last) {
12410					carousel.set( i - last + carousel.current + 2 );
12411				}
12412			},
12413
12414			// helper for setting disabled classes
12415			setClasses: function() {
12416				carousel.prev.toggleClass( 'disabled', !carousel.current );
12417				carousel.next.toggleClass( 'disabled', carousel.hooks[ carousel.current ] + carousel.width >= carousel.max );
12418			},
12419
12420			// the animation method
12421			animate: function(to) {
12422				carousel.setClasses();
12423				var num = carousel.hooks[ carousel.current ] * -1;
12424
12425				if ( isNaN( num ) ) {
12426					return;
12427				}
12428
12429				// FF 24 bug
12430				self.$( 'thumbnails' ).css('left', function() {
12431					return $(this).css('left');
12432				});
12433
12434				Utils.animate(self.get( 'thumbnails' ), {
12435					left: num
12436				},{
12437					duration: self._options.carouselSpeed,
12438					easing: self._options.easing,
12439					queue: false
12440				});
12441			}
12442		};
12443
12444		// tooltip control
12445		// added in 1.2
12446		var tooltip = this._tooltip = {
12447
12448			initialized : false,
12449
12450			open: false,
12451
12452			timer: 'tooltip' + self._id,
12453
12454			swapTimer: 'swap' + self._id,
12455
12456			init: function() {
12457
12458				tooltip.initialized = true;
12459
12460				var css = '.galleria-tooltip{padding:3px 8px;max-width:50%;background:#ffe;color:#000;z-index:3;position:absolute;font-size:11px;line-height:1.3;' +
12461					'opacity:0;box-shadow:0 0 2px rgba(0,0,0,.4);-moz-box-shadow:0 0 2px rgba(0,0,0,.4);-webkit-box-shadow:0 0 2px rgba(0,0,0,.4);}';
12462
12463				Utils.insertStyleTag( css, 'galleria-tooltip' );
12464
12465				self.$( 'tooltip' ).css({
12466					opacity: 0.8,
12467					visibility: 'visible',
12468					display: 'none'
12469				});
12470
12471			},
12472
12473			// move handler
12474			move: function( e ) {
12475				var mouseX = self.getMousePosition(e).x,
12476					mouseY = self.getMousePosition(e).y,
12477					$elem = self.$( 'tooltip' ),
12478					x = mouseX,
12479					y = mouseY,
12480					height = $elem.outerHeight( true ) + 1,
12481					width = $elem.outerWidth( true ),
12482					limitY = height + 15;
12483
12484				var maxX = self.$( 'container' ).width() - width - 2,
12485					maxY = self.$( 'container' ).height() - height - 2;
12486
12487				if ( !isNaN(x) && !isNaN(y) ) {
12488
12489					x += 10;
12490					y -= ( height+8 );
12491
12492					x = M.max( 0, M.min( maxX, x ) );
12493					y = M.max( 0, M.min( maxY, y ) );
12494
12495					if( mouseY < limitY ) {
12496						y = limitY;
12497					}
12498
12499					$elem.css({ left: x, top: y });
12500				}
12501			},
12502
12503			// bind elements to the tooltip
12504			// you can bind multiple elementIDs using { elemID : function } or { elemID : string }
12505			// you can also bind single DOM elements using bind(elem, string)
12506			bind: function( elem, value ) {
12507
12508				// todo: revise if alternative tooltip is needed for mobile devices
12509				if (Galleria.TOUCH) {
12510					return;
12511				}
12512
12513				if (! tooltip.initialized ) {
12514					tooltip.init();
12515				}
12516
12517				var mouseout = function() {
12518					self.$( 'container' ).off( 'mousemove', tooltip.move );
12519					self.clearTimer( tooltip.timer );
12520
12521					self.$( 'tooltip' ).stop().animate({
12522						opacity: 0
12523					}, 200, function() {
12524
12525						self.$( 'tooltip' ).hide();
12526
12527						self.addTimer( tooltip.swapTimer, function() {
12528							tooltip.open = false;
12529						}, 1000);
12530					});
12531				};
12532
12533				var hover = function( elem, value) {
12534
12535					tooltip.define( elem, value );
12536
12537					$( elem ).hover(function() {
12538
12539						self.clearTimer( tooltip.swapTimer );
12540						self.$('container').off( 'mousemove', tooltip.move ).on( 'mousemove', tooltip.move ).trigger( 'mousemove' );
12541						tooltip.show( elem );
12542
12543						self.addTimer( tooltip.timer, function() {
12544							self.$( 'tooltip' ).stop().show().animate({
12545								opacity: 1
12546							});
12547							tooltip.open = true;
12548
12549						}, tooltip.open ? 0 : 500);
12550
12551					}, mouseout).click(mouseout);
12552				};
12553
12554				if ( typeof value === 'string' ) {
12555					hover( ( elem in self._dom ? self.get( elem ) : elem ), value );
12556				} else {
12557					// asume elemID here
12558					$.each( elem, function( elemID, val ) {
12559						hover( self.get(elemID), val );
12560					});
12561				}
12562			},
12563
12564			show: function( elem ) {
12565
12566				elem = $( elem in self._dom ? self.get(elem) : elem );
12567
12568				var text = elem.data( 'tt' ),
12569					mouseup = function( e ) {
12570
12571						// attach a tiny settimeout to make sure the new tooltip is filled
12572						window.setTimeout( (function( ev ) {
12573							return function() {
12574								tooltip.move( ev );
12575							};
12576						}( e )), 10);
12577
12578						elem.off( 'mouseup', mouseup );
12579
12580					};
12581
12582				text = typeof text === 'function' ? text() : text;
12583
12584				if ( ! text ) {
12585					return;
12586				}
12587
12588				self.$( 'tooltip' ).html( text.replace(/\s/, '&#160;') );
12589
12590				// trigger mousemove on mouseup in case of click
12591				elem.on( 'mouseup', mouseup );
12592			},
12593
12594			define: function( elem, value ) {
12595
12596				// we store functions, not strings
12597				if (typeof value !== 'function') {
12598					var s = value;
12599					value = function() {
12600						return s;
12601					};
12602				}
12603
12604				elem = $( elem in self._dom ? self.get(elem) : elem ).data('tt', value);
12605
12606				tooltip.show( elem );
12607
12608			}
12609		};
12610
12611		// internal fullscreen control
12612		var fullscreen = this._fullscreen = {
12613
12614			scrolled: 0,
12615
12616			crop: undef,
12617
12618			active: false,
12619
12620			prev: $(),
12621
12622			beforeEnter: function(fn){ fn(); },
12623			beforeExit:  function(fn){ fn(); },
12624
12625			keymap: self._keyboard.map,
12626
12627			parseCallback: function( callback, enter ) {
12628
12629				return _transitions.active ? function() {
12630					if ( typeof callback == 'function' ) {
12631						callback.call(self);
12632					}
12633					var active = self._controls.getActive(),
12634						next = self._controls.getNext();
12635
12636					self._scaleImage( next );
12637					self._scaleImage( active );
12638
12639					if ( enter && self._options.trueFullscreen ) {
12640						// Firefox bug, revise later
12641						$( active.container ).add( next.container ).trigger( 'transitionend' );
12642					}
12643
12644				} : callback;
12645
12646			},
12647
12648			enter: function( callback ) {
12649
12650				fullscreen.beforeEnter(function() {
12651
12652					callback = fullscreen.parseCallback( callback, true );
12653
12654					if ( self._options.trueFullscreen && _nativeFullscreen.support ) {
12655
12656						// do some stuff prior animation for wmoother transitions
12657
12658						fullscreen.active = true;
12659
12660						Utils.forceStyles( self.get('container'), {
12661							width: '100%',
12662							height: '100%'
12663						});
12664
12665						self.rescale();
12666
12667						if ( Galleria.MAC ) {
12668							if ( !( Galleria.SAFARI && /version\/[1-5]/.test(NAV)) ) {
12669								self.$('container').css('opacity', 0).addClass('fullscreen');
12670								window.setTimeout(function() {
12671									fullscreen.scale();
12672									self.$('container').css('opacity', 1);
12673								}, 50);
12674							} else {
12675								self.$('stage').css('opacity', 0);
12676								window.setTimeout(function() {
12677									fullscreen.scale();
12678									self.$('stage').css('opacity', 1);
12679								},4);
12680							}
12681						} else {
12682							self.$('container').addClass('fullscreen');
12683						}
12684
12685						$win.resize( fullscreen.scale );
12686
12687						_nativeFullscreen.enter( self, callback, self.get('container') );
12688
12689					} else {
12690
12691						fullscreen.scrolled = $win.scrollTop();
12692						if( !Galleria.TOUCH ) {
12693							window.scrollTo(0, 0);
12694						}
12695
12696						fullscreen._enter( callback );
12697					}
12698				});
12699
12700			},
12701
12702			_enter: function( callback ) {
12703
12704				fullscreen.active = true;
12705
12706				if ( IFRAME ) {
12707
12708					fullscreen.iframe = (function() {
12709
12710						var elem,
12711							refer = doc.referrer,
12712							test = doc.createElement('a'),
12713							loc = window.location;
12714
12715						test.href = refer;
12716
12717						if( test.protocol != loc.protocol ||
12718							test.hostname != loc.hostname ||
12719							test.port != loc.port ) {
12720							Galleria.raise('Parent fullscreen not available. Iframe protocol, domains and ports must match.');
12721							return false;
12722						}
12723
12724						fullscreen.pd = window.parent.document;
12725
12726						$( fullscreen.pd ).find('iframe').each(function() {
12727							var idoc = this.contentDocument || this.contentWindow.document;
12728							if ( idoc === doc ) {
12729								elem = this;
12730								return false;
12731							}
12732						});
12733
12734						return elem;
12735					}());
12736
12737				}
12738
12739				// hide the image until rescale is complete
12740				Utils.hide( self.getActiveImage() );
12741
12742				if ( IFRAME && fullscreen.iframe ) {
12743					fullscreen.iframe.scrolled = $( window.parent ).scrollTop();
12744					window.parent.scrollTo(0, 0);
12745				}
12746
12747				var data = self.getData(),
12748					options = self._options,
12749					inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
12750					htmlbody = {
12751						height: '100%',
12752						overflow: 'hidden',
12753						margin:0,
12754						padding:0
12755					};
12756
12757				if (inBrowser) {
12758
12759					self.$('container').addClass('fullscreen');
12760					fullscreen.prev = self.$('container').prev();
12761
12762					if ( !fullscreen.prev.length ) {
12763						fullscreen.parent = self.$( 'container' ).parent();
12764					}
12765
12766					// move
12767					self.$( 'container' ).appendTo( 'body' );
12768
12769					// begin styleforce
12770
12771					Utils.forceStyles(self.get('container'), {
12772						position: Galleria.TOUCH ? 'absolute' : 'fixed',
12773						top: 0,
12774						left: 0,
12775						width: '100%',
12776						height: '100%',
12777						zIndex: 10000
12778					});
12779					Utils.forceStyles( DOM().html, htmlbody );
12780					Utils.forceStyles( DOM().body, htmlbody );
12781				}
12782
12783				if ( IFRAME && fullscreen.iframe ) {
12784					Utils.forceStyles( fullscreen.pd.documentElement, htmlbody );
12785					Utils.forceStyles( fullscreen.pd.body, htmlbody );
12786					Utils.forceStyles( fullscreen.iframe, $.extend( htmlbody, {
12787						width: '100%',
12788						height: '100%',
12789						top: 0,
12790						left: 0,
12791						position: 'fixed',
12792						zIndex: 10000,
12793						border: 'none'
12794					}));
12795				}
12796
12797				// temporarily attach some keys
12798				// save the old ones first in a cloned object
12799				fullscreen.keymap = $.extend({}, self._keyboard.map);
12800
12801				self.attachKeyboard({
12802					escape: self.exitFullscreen,
12803					right: self.next,
12804					left: self.prev
12805				});
12806
12807				// temporarily save the crop
12808				fullscreen.crop = options.imageCrop;
12809
12810				// set fullscreen options
12811				if ( options.fullscreenCrop != undef ) {
12812					options.imageCrop = options.fullscreenCrop;
12813				}
12814
12815				// swap to big image if it's different from the display image
12816				if ( data && data.big && data.image !== data.big ) {
12817					var big    = new Galleria.Picture(),
12818						cached = big.isCached( data.big ),
12819						index  = self.getIndex(),
12820						thumb  = self._thumbnails[ index ];
12821
12822					self.trigger( {
12823						type: Galleria.LOADSTART,
12824						cached: cached,
12825						rewind: false,
12826						index: index,
12827						imageTarget: self.getActiveImage(),
12828						thumbTarget: thumb,
12829						galleriaData: data
12830					});
12831
12832					big.load( data.big, function( big ) {
12833						self._scaleImage( big, {
12834							complete: function( big ) {
12835								self.trigger({
12836									type: Galleria.LOADFINISH,
12837									cached: cached,
12838									index: index,
12839									rewind: false,
12840									imageTarget: big.image,
12841									thumbTarget: thumb
12842								});
12843								var image = self._controls.getActive().image;
12844								if ( image ) {
12845									$( image ).width( big.image.width ).height( big.image.height )
12846										.attr( 'style', $( big.image ).attr('style') )
12847										.attr( 'src', big.image.src );
12848								}
12849							}
12850						});
12851					});
12852
12853					var n = self.getNext(index),
12854						p = new Galleria.Picture(),
12855						ndata = self.getData( n );
12856					p.preload( self.isFullscreen() && ndata.big ? ndata.big : ndata.image );
12857				}
12858
12859				// init the first rescale and attach callbacks
12860
12861				self.rescale(function() {
12862
12863					self.addTimer(false, function() {
12864						// show the image after 50 ms
12865						if ( inBrowser ) {
12866							Utils.show( self.getActiveImage() );
12867						}
12868
12869						if (typeof callback === 'function') {
12870							callback.call( self );
12871						}
12872						self.rescale();
12873
12874					}, 100);
12875
12876					self.trigger( Galleria.FULLSCREEN_ENTER );
12877				});
12878
12879				if ( !inBrowser ) {
12880					Utils.show( self.getActiveImage() );
12881				} else {
12882					$win.resize( fullscreen.scale );
12883				}
12884
12885			},
12886
12887			scale : function() {
12888				self.rescale();
12889			},
12890
12891			exit: function( callback ) {
12892
12893				fullscreen.beforeExit(function() {
12894
12895					callback = fullscreen.parseCallback( callback );
12896
12897					if ( self._options.trueFullscreen && _nativeFullscreen.support ) {
12898						_nativeFullscreen.exit( callback );
12899					} else {
12900						fullscreen._exit( callback );
12901					}
12902				});
12903			},
12904
12905			_exit: function( callback ) {
12906
12907				fullscreen.active = false;
12908
12909				var inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
12910					$container = self.$( 'container' ).removeClass( 'fullscreen' );
12911
12912				// move back
12913				if ( fullscreen.parent ) {
12914					fullscreen.parent.prepend( $container );
12915				} else {
12916					$container.insertAfter( fullscreen.prev );
12917				}
12918
12919				if ( inBrowser ) {
12920					Utils.hide( self.getActiveImage() );
12921
12922					// revert all styles
12923					Utils.revertStyles( self.get('container'), DOM().html, DOM().body );
12924
12925					// scroll back
12926					if( !Galleria.TOUCH ) {
12927						window.scrollTo(0, fullscreen.scrolled);
12928					}
12929
12930					// reload iframe src manually
12931					var frame = self._controls.frames[ self._controls.active ];
12932					if ( frame && frame.image ) {
12933						frame.image.src = frame.image.src;
12934					}
12935				}
12936
12937				if ( IFRAME && fullscreen.iframe ) {
12938					Utils.revertStyles( fullscreen.pd.documentElement, fullscreen.pd.body, fullscreen.iframe );
12939					if ( fullscreen.iframe.scrolled ) {
12940						window.parent.scrollTo(0, fullscreen.iframe.scrolled );
12941					}
12942				}
12943
12944				// detach all keyboard events and apply the old keymap
12945				self.detachKeyboard();
12946				self.attachKeyboard( fullscreen.keymap );
12947
12948				// bring back cached options
12949				self._options.imageCrop = fullscreen.crop;
12950
12951				// return to original image
12952				var big = self.getData().big,
12953					image = self._controls.getActive().image;
12954
12955				if ( !self.getData().iframe && image && big && big == image.src ) {
12956
12957					window.setTimeout(function(src) {
12958						return function() {
12959							image.src = src;
12960						};
12961					}( self.getData().image ), 1 );
12962
12963				}
12964
12965				self.rescale(function() {
12966					self.addTimer(false, function() {
12967
12968						// show the image after 50 ms
12969						if ( inBrowser ) {
12970							Utils.show( self.getActiveImage() );
12971						}
12972
12973						if ( typeof callback === 'function' ) {
12974							callback.call( self );
12975						}
12976
12977						$win.trigger( 'resize' );
12978
12979					}, 50);
12980					self.trigger( Galleria.FULLSCREEN_EXIT );
12981				});
12982
12983				$win.off('resize', fullscreen.scale);
12984			}
12985		};
12986
12987		// the internal idle object for controlling idle states
12988		var idle = this._idle = {
12989
12990			trunk: [],
12991
12992			bound: false,
12993
12994			active: false,
12995
12996			add: function(elem, to, from, hide) {
12997				if ( !elem || Galleria.TOUCH ) {
12998					return;
12999				}
13000				if (!idle.bound) {
13001					idle.addEvent();
13002				}
13003				elem = $(elem);
13004
13005				if ( typeof from == 'boolean' ) {
13006					hide = from;
13007					from = {};
13008				}
13009
13010				from = from || {};
13011
13012				var extract = {},
13013					style;
13014
13015				for ( style in to ) {
13016					if ( to.hasOwnProperty( style ) ) {
13017						extract[ style ] = elem.css( style );
13018					}
13019				}
13020
13021				elem.data('idle', {
13022					from: $.extend( extract, from ),
13023					to: to,
13024					complete: true,
13025					busy: false
13026				});
13027
13028				if ( !hide ) {
13029					idle.addTimer();
13030				} else {
13031					elem.css( to );
13032				}
13033				idle.trunk.push(elem);
13034			},
13035
13036			remove: function(elem) {
13037
13038				elem = $(elem);
13039
13040				$.each(idle.trunk, function(i, el) {
13041					if ( el && el.length && !el.not(elem).length ) {
13042						elem.css( elem.data( 'idle' ).from );
13043						idle.trunk.splice(i, 1);
13044					}
13045				});
13046
13047				if (!idle.trunk.length) {
13048					idle.removeEvent();
13049					self.clearTimer( idle.timer );
13050				}
13051			},
13052
13053			addEvent : function() {
13054				idle.bound = true;
13055				self.$('container').on( 'mousemove click', idle.showAll );
13056				if ( self._options.idleMode == 'hover' ) {
13057					self.$('container').on( 'mouseleave', idle.hide );
13058				}
13059			},
13060
13061			removeEvent : function() {
13062				idle.bound = false;
13063				self.$('container').on( 'mousemove click', idle.showAll );
13064				if ( self._options.idleMode == 'hover' ) {
13065					self.$('container').off( 'mouseleave', idle.hide );
13066				}
13067			},
13068
13069			addTimer : function() {
13070				if( self._options.idleMode == 'hover' ) {
13071					return;
13072				}
13073				self.addTimer( 'idle', function() {
13074					idle.hide();
13075				}, self._options.idleTime );
13076			},
13077
13078			hide : function() {
13079
13080				if ( !self._options.idleMode || self.getIndex() === false ) {
13081					return;
13082				}
13083
13084				self.trigger( Galleria.IDLE_ENTER );
13085
13086				var len = idle.trunk.length;
13087
13088				$.each( idle.trunk, function(i, elem) {
13089
13090					var data = elem.data('idle');
13091
13092					if (! data) {
13093						return;
13094					}
13095
13096					elem.data('idle').complete = false;
13097
13098					Utils.animate( elem, data.to, {
13099						duration: self._options.idleSpeed,
13100						complete: function() {
13101							if ( i == len-1 ) {
13102								idle.active = false;
13103							}
13104						}
13105					});
13106				});
13107			},
13108
13109			showAll : function() {
13110
13111				self.clearTimer( 'idle' );
13112
13113				$.each( idle.trunk, function( i, elem ) {
13114					idle.show( elem );
13115				});
13116			},
13117
13118			show: function(elem) {
13119
13120				var data = elem.data('idle');
13121
13122				if ( !idle.active || ( !data.busy && !data.complete ) ) {
13123
13124					data.busy = true;
13125
13126					self.trigger( Galleria.IDLE_EXIT );
13127
13128					self.clearTimer( 'idle' );
13129
13130					Utils.animate( elem, data.from, {
13131						duration: self._options.idleSpeed/2,
13132						complete: function() {
13133							idle.active = true;
13134							$(elem).data('idle').busy = false;
13135							$(elem).data('idle').complete = true;
13136						}
13137					});
13138
13139				}
13140				idle.addTimer();
13141			}
13142		};
13143
13144		// internal lightbox object
13145		// creates a predesigned lightbox for simple popups of images in galleria
13146		var lightbox = this._lightbox = {
13147
13148			width : 0,
13149
13150			height : 0,
13151
13152			initialized : false,
13153
13154			active : null,
13155
13156			image : null,
13157
13158			elems : {},
13159
13160			keymap: false,
13161
13162			init : function() {
13163
13164				if ( lightbox.initialized ) {
13165					return;
13166				}
13167				lightbox.initialized = true;
13168
13169				// create some elements to work with
13170				var elems = 'overlay box content shadow title info close prevholder prev nextholder next counter image',
13171					el = {},
13172					op = self._options,
13173					css = '',
13174					abs = 'position:absolute;',
13175					prefix = 'lightbox-',
13176					cssMap = {
13177						overlay:    'position:fixed;display:none;opacity:'+op.overlayOpacity+';filter:alpha(opacity='+(op.overlayOpacity*100)+
13178						');top:0;left:0;width:100%;height:100%;background:'+op.overlayBackground+';z-index:99990',
13179						box:        'position:fixed;display:none;width:400px;height:400px;top:50%;left:50%;margin-top:-200px;margin-left:-200px;z-index:99991',
13180						shadow:     abs+'background:#000;width:100%;height:100%;',
13181						content:    abs+'background-color:#fff;top:10px;left:10px;right:10px;bottom:10px;overflow:hidden',
13182						info:       abs+'bottom:10px;left:10px;right:10px;color:#444;font:11px/13px arial,sans-serif;height:13px',
13183						close:      abs+'top:10px;right:10px;height:20px;width:20px;background:#fff;text-align:center;cursor:pointer;color:#444;font:16px/22px arial,sans-serif;z-index:99999',
13184						image:      abs+'top:10px;left:10px;right:10px;bottom:30px;overflow:hidden;display:block;',
13185						prevholder: abs+'width:50%;top:0;bottom:40px;cursor:pointer;',
13186						nextholder: abs+'width:50%;top:0;bottom:40px;right:-1px;cursor:pointer;',
13187						prev:       abs+'top:50%;margin-top:-20px;height:40px;width:30px;background:#fff;left:20px;display:none;text-align:center;color:#000;font:bold 16px/36px arial,sans-serif',
13188						next:       abs+'top:50%;margin-top:-20px;height:40px;width:30px;background:#fff;right:20px;left:auto;display:none;font:bold 16px/36px arial,sans-serif;text-align:center;color:#000',
13189						title:      'float:left',
13190						counter:    'float:right;margin-left:8px;'
13191					},
13192					hover = function(elem) {
13193						return elem.hover(
13194							function() { $(this).css( 'color', '#bbb' ); },
13195							function() { $(this).css( 'color', '#444' ); }
13196						);
13197					},
13198					appends = {};
13199
13200				// fix for navigation hovers transparent background event "feature"
13201				var exs = '';
13202				if ( IE > 7 ) {
13203					exs = IE < 9 ? 'background:#000;filter:alpha(opacity=0);' : 'background:rgba(0,0,0,0);';
13204				} else {
13205					exs = 'z-index:99999';
13206				}
13207
13208				cssMap.nextholder += exs;
13209				cssMap.prevholder += exs;
13210
13211				// create and insert CSS
13212				$.each(cssMap, function( key, value ) {
13213					css += '.galleria-'+prefix+key+'{'+value+'}';
13214				});
13215
13216				css += '.galleria-'+prefix+'box.iframe .galleria-'+prefix+'prevholder,'+
13217					'.galleria-'+prefix+'box.iframe .galleria-'+prefix+'nextholder{'+
13218					'width:100px;height:100px;top:50%;margin-top:-70px}';
13219
13220				Utils.insertStyleTag( css, 'galleria-lightbox' );
13221
13222				// create the elements
13223				$.each(elems.split(' '), function( i, elemId ) {
13224					self.addElement( 'lightbox-' + elemId );
13225					el[ elemId ] = lightbox.elems[ elemId ] = self.get( 'lightbox-' + elemId );
13226				});
13227
13228				// initiate the image
13229				lightbox.image = new Galleria.Picture();
13230
13231				// append the elements
13232				$.each({
13233					box: 'shadow content close prevholder nextholder',
13234					info: 'title counter',
13235					content: 'info image',
13236					prevholder: 'prev',
13237					nextholder: 'next'
13238				}, function( key, val ) {
13239					var arr = [];
13240					$.each( val.split(' '), function( i, prop ) {
13241						arr.push( prefix + prop );
13242					});
13243					appends[ prefix+key ] = arr;
13244				});
13245
13246				self.append( appends );
13247
13248				$( el.image ).append( lightbox.image.container );
13249
13250				$( DOM().body ).append( el.overlay, el.box );
13251
13252				// add the prev/next nav and bind some controls
13253
13254				hover( $( el.close ).on( 'click:fast', lightbox.hide ).html('&#215;') );
13255
13256				$.each( ['Prev','Next'], function(i, dir) {
13257
13258					var $d = $( el[ dir.toLowerCase() ] ).html( /v/.test( dir ) ? '&#8249;&#160;' : '&#160;&#8250;' ),
13259						$e = $( el[ dir.toLowerCase()+'holder'] );
13260
13261					$e.on( 'click:fast', function() {
13262						lightbox[ 'show' + dir ]();
13263					});
13264
13265					// IE7 and touch devices will simply show the nav
13266					if ( IE < 8 || Galleria.TOUCH ) {
13267						$d.show();
13268						return;
13269					}
13270
13271					$e.hover( function() {
13272						$d.show();
13273					}, function(e) {
13274						$d.stop().fadeOut( 200 );
13275					});
13276
13277				});
13278				$( el.overlay ).on( 'click:fast', lightbox.hide );
13279
13280				// the lightbox animation is slow on ipad
13281				if ( Galleria.IPAD ) {
13282					self._options.lightboxTransitionSpeed = 0;
13283				}
13284
13285			},
13286
13287			rescale: function(event) {
13288
13289				// calculate
13290				var width = M.min( $win.width()-40, lightbox.width ),
13291					height = M.min( $win.height()-60, lightbox.height ),
13292					ratio = M.min( width / lightbox.width, height / lightbox.height ),
13293					destWidth = M.round( lightbox.width * ratio ) + 40,
13294					destHeight = M.round( lightbox.height * ratio ) + 60,
13295					to = {
13296						width: destWidth,
13297						height: destHeight,
13298						'margin-top': M.ceil( destHeight / 2 ) *- 1,
13299						'margin-left': M.ceil( destWidth / 2 ) *- 1
13300					};
13301
13302				// if rescale event, don't animate
13303				if ( event ) {
13304					$( lightbox.elems.box ).css( to );
13305				} else {
13306					$( lightbox.elems.box ).animate( to, {
13307						duration: self._options.lightboxTransitionSpeed,
13308						easing: self._options.easing,
13309						complete: function() {
13310							var image = lightbox.image,
13311								speed = self._options.lightboxFadeSpeed;
13312
13313							self.trigger({
13314								type: Galleria.LIGHTBOX_IMAGE,
13315								imageTarget: image.image
13316							});
13317
13318							$( image.container ).show();
13319
13320							$( image.image ).animate({ opacity: 1 }, speed);
13321							Utils.show( lightbox.elems.info, speed );
13322						}
13323					});
13324				}
13325			},
13326
13327			hide: function() {
13328
13329				// remove the image
13330				lightbox.image.image = null;
13331
13332				$win.off('resize', lightbox.rescale);
13333
13334				$( lightbox.elems.box ).hide().find( 'iframe' ).remove();
13335
13336				Utils.hide( lightbox.elems.info );
13337
13338				self.detachKeyboard();
13339				self.attachKeyboard( lightbox.keymap );
13340
13341				lightbox.keymap = false;
13342
13343				Utils.hide( lightbox.elems.overlay, 200, function() {
13344					$( this ).hide().css( 'opacity', self._options.overlayOpacity );
13345					self.trigger( Galleria.LIGHTBOX_CLOSE );
13346				});
13347			},
13348
13349			showNext: function() {
13350				lightbox.show( self.getNext( lightbox.active ) );
13351			},
13352
13353			showPrev: function() {
13354				lightbox.show( self.getPrev( lightbox.active ) );
13355			},
13356
13357			show: function(index) {
13358
13359				lightbox.active = index = typeof index === 'number' ? index : self.getIndex() || 0;
13360
13361				if ( !lightbox.initialized ) {
13362					lightbox.init();
13363				}
13364
13365				// trigger the event
13366				self.trigger( Galleria.LIGHTBOX_OPEN );
13367
13368				// temporarily attach some keys
13369				// save the old ones first in a cloned object
13370				if ( !lightbox.keymap ) {
13371
13372					lightbox.keymap = $.extend({}, self._keyboard.map);
13373
13374					self.attachKeyboard({
13375						escape: lightbox.hide,
13376						right: lightbox.showNext,
13377						left: lightbox.showPrev
13378					});
13379				}
13380
13381				$win.off('resize', lightbox.rescale );
13382
13383				var data = self.getData(index),
13384					total = self.getDataLength(),
13385					n = self.getNext( index ),
13386					ndata, p, i;
13387
13388				Utils.hide( lightbox.elems.info );
13389
13390				try {
13391					for ( i = self._options.preload; i > 0; i-- ) {
13392						p = new Galleria.Picture();
13393						ndata = self.getData( n );
13394						p.preload( ndata.big ? ndata.big : ndata.image );
13395						n = self.getNext( n );
13396					}
13397				} catch(e) {}
13398
13399				lightbox.image.isIframe = ( data.iframe && !data.image );
13400
13401				$( lightbox.elems.box ).toggleClass( 'iframe', lightbox.image.isIframe );
13402
13403				$( lightbox.image.container ).find( '.galleria-videoicon' ).remove();
13404
13405				lightbox.image.load( data.big || data.image || data.iframe, function( image ) {
13406
13407					if ( image.isIframe ) {
13408
13409						var cw = $(window).width(),
13410							ch = $(window).height();
13411
13412						if ( image.video && self._options.maxVideoSize ) {
13413							var r = M.min( self._options.maxVideoSize/cw, self._options.maxVideoSize/ch );
13414							if ( r < 1 ) {
13415								cw *= r;
13416								ch *= r;
13417							}
13418						}
13419						lightbox.width = cw;
13420						lightbox.height = ch;
13421
13422					} else {
13423						lightbox.width = image.original.width;
13424						lightbox.height = image.original.height;
13425					}
13426
13427					$( image.image ).css({
13428						width: image.isIframe ? '100%' : '100.1%',
13429						height: image.isIframe ? '100%' : '100.1%',
13430						top: 0,
13431						bottom: 0,
13432						zIndex: 99998,
13433						opacity: 0,
13434						visibility: 'visible'
13435					}).parent().height('100%');
13436
13437					lightbox.elems.title.innerHTML = data.title || '';
13438					lightbox.elems.counter.innerHTML = (index + 1) + ' / ' + total;
13439					$win.resize( lightbox.rescale );
13440					lightbox.rescale();
13441
13442					if( data.image && data.iframe ) {
13443
13444						$( lightbox.elems.box ).addClass('iframe');
13445
13446						if ( data.video ) {
13447							var $icon = _playIcon( image.container ).hide();
13448							window.setTimeout(function() {
13449								$icon.fadeIn(200);
13450							}, 200);
13451						}
13452
13453						$( image.image ).css( 'cursor', 'pointer' ).mouseup((function(data, image) {
13454							return function(e) {
13455								$( lightbox.image.container ).find( '.galleria-videoicon' ).remove();
13456								e.preventDefault();
13457								image.isIframe = true;
13458								image.load( data.iframe + ( data.video ? '&autoplay=1' : '' ), {
13459									width: '100%',
13460									height: IE < 8 ? $( lightbox.image.container ).height() : '100%'
13461								});
13462							};
13463						}(data, image)));
13464					}
13465				});
13466
13467				$( lightbox.elems.overlay ).show().css( 'visibility', 'visible' );
13468				$( lightbox.elems.box ).show();
13469			}
13470		};
13471
13472		// the internal timeouts object
13473		// provides helper methods for controlling timeouts
13474
13475		var _timer = this._timer = {
13476
13477			trunk: {},
13478
13479			add: function( id, fn, delay, loop ) {
13480				id = id || new Date().getTime();
13481				loop = loop || false;
13482				this.clear( id );
13483				if ( loop ) {
13484					var old = fn;
13485					fn = function() {
13486						old();
13487						_timer.add( id, fn, delay );
13488					};
13489				}
13490				this.trunk[ id ] = window.setTimeout( fn, delay );
13491			},
13492
13493			clear: function( id ) {
13494
13495				var del = function( i ) {
13496					window.clearTimeout( this.trunk[ i ] );
13497					delete this.trunk[ i ];
13498				}, i;
13499
13500				if ( !!id && id in this.trunk ) {
13501					del.call( this, id );
13502
13503				} else if ( typeof id === 'undefined' ) {
13504					for ( i in this.trunk ) {
13505						if ( this.trunk.hasOwnProperty( i ) ) {
13506							del.call( this, i );
13507						}
13508					}
13509				}
13510			}
13511		};
13512
13513		return this;
13514	};
13515
13516// end Galleria constructor
13517
13518	Galleria.prototype = {
13519
13520		// bring back the constructor reference
13521
13522		constructor: Galleria,
13523
13524		/**
13525		 Use this function to initialize the gallery and start loading.
13526		 Should only be called once per instance.
13527
13528		 @param {HTMLElement} target The target element
13529		 @param {Object} options The gallery options
13530
13531		 @returns Instance
13532		 */
13533
13534		init: function( target, options ) {
13535
13536			options = _legacyOptions( options );
13537
13538			// save the original ingredients
13539			this._original = {
13540				target: target,
13541				options: options,
13542				data: null
13543			};
13544
13545			// save the target here
13546			this._target = this._dom.target = target.nodeName ? target : $( target ).get(0);
13547
13548			// save the original content for destruction
13549			this._original.html = this._target.innerHTML;
13550
13551			// push the instance
13552			_instances.push( this );
13553
13554			// raise error if no target is detected
13555			if ( !this._target ) {
13556				Galleria.raise('Target not found', true);
13557				return;
13558			}
13559
13560			// apply options
13561			this._options = {
13562				autoplay: false,
13563				carousel: true,
13564				carouselFollow: true, // legacy, deprecate at 1.3
13565				carouselSpeed: 400,
13566				carouselSteps: 'auto',
13567				clicknext: false,
13568				dailymotion: {
13569					foreground: '%23EEEEEE',
13570					highlight: '%235BCEC5',
13571					background: '%23222222',
13572					logo: 0,
13573					hideInfos: 1
13574				},
13575				dataConfig : function( elem ) { return {}; },
13576				dataSelector: 'img',
13577				dataSort: false,
13578				dataSource: this._target,
13579				debug: undef,
13580				dummy: undef, // 1.2.5
13581				easing: 'galleria',
13582				extend: function(options) {},
13583				fullscreenCrop: undef, // 1.2.5
13584				fullscreenDoubleTap: true, // 1.2.4 toggles fullscreen on double-tap for touch devices
13585				fullscreenTransition: undef, // 1.2.6
13586				height: 0,
13587				idleMode: true, // 1.2.4 toggles idleMode
13588				idleTime: 3000,
13589				idleSpeed: 200,
13590				imageCrop: false,
13591				imageMargin: 0,
13592				imagePan: false,
13593				imagePanSmoothness: 12,
13594				imagePosition: '50%',
13595				imageTimeout: undef, // 1.2.5
13596				initialTransition: undef, // 1.2.4, replaces transitionInitial
13597				keepSource: false,
13598				layerFollow: true, // 1.2.5
13599				lightbox: false, // 1.2.3
13600				lightboxFadeSpeed: 200,
13601				lightboxTransitionSpeed: 200,
13602				linkSourceImages: true,
13603				maxScaleRatio: undef,
13604				maxVideoSize: undef, // 1.2.9
13605				minScaleRatio: undef, // deprecated in 1.2.9
13606				overlayOpacity: 0.85,
13607				overlayBackground: '#0b0b0b',
13608				pauseOnInteraction: true,
13609				popupLinks: false,
13610				preload: 2,
13611				queue: true,
13612				responsive: true,
13613				show: 0,
13614				showInfo: true,
13615				showCounter: true,
13616				showImagenav: true,
13617				swipe: 'auto', // 1.2.4 -> revised in 1.3 -> changed type in 1.3.5
13618				theme: null,
13619				thumbCrop: true,
13620				thumbEventType: 'click:fast',
13621				thumbMargin: 0,
13622				thumbQuality: 'auto',
13623				thumbDisplayOrder: true, // 1.2.8
13624				thumbPosition: '50%', // 1.3
13625				thumbnails: true,
13626				touchTransition: undef, // 1.2.6
13627				transition: 'fade',
13628				transitionInitial: undef, // legacy, deprecate in 1.3. Use initialTransition instead.
13629				transitionSpeed: 400,
13630				trueFullscreen: true, // 1.2.7
13631				useCanvas: false, // 1.2.4
13632				variation: '', // 1.3.2
13633				videoPoster: true, // 1.3
13634				vimeo: {
13635					title: 0,
13636					byline: 0,
13637					portrait: 0,
13638					color: 'aaaaaa'
13639				},
13640				wait: 5000, // 1.2.7
13641				width: 'auto',
13642				youtube: {
13643					modestbranding: 1,
13644					autohide: 1,
13645					color: 'white',
13646					hd: 1,
13647					rel: 0,
13648					showinfo: 0
13649				}
13650			};
13651
13652			// legacy support for transitionInitial
13653			this._options.initialTransition = this._options.initialTransition || this._options.transitionInitial;
13654
13655			if ( options ) {
13656
13657				// turn off debug
13658				if ( options.debug === false ) {
13659					DEBUG = false;
13660				}
13661
13662				// set timeout
13663				if ( typeof options.imageTimeout === 'number' ) {
13664					TIMEOUT = options.imageTimeout;
13665				}
13666
13667				// set dummy
13668				if ( typeof options.dummy === 'string' ) {
13669					DUMMY = options.dummy;
13670				}
13671
13672				// set theme
13673				if ( typeof options.theme == 'string' ) {
13674					this._options.theme = options.theme;
13675				}
13676			}
13677
13678			// hide all content
13679			$( this._target ).children().hide();
13680
13681			// Warn for quirks mode
13682			if ( Galleria.QUIRK ) {
13683				Galleria.raise('Your page is in Quirks mode, Galleria may not render correctly. Please validate your HTML and add a correct doctype.');
13684			}
13685
13686			// now we just have to wait for the theme...
13687			// first check if it has already loaded
13688			if ( _loadedThemes.length ) {
13689				if ( this._options.theme ) {
13690					for ( var i=0; i<_loadedThemes.length; i++ ) {
13691						if( this._options.theme === _loadedThemes[i].name ) {
13692							this.theme = _loadedThemes[i];
13693							break;
13694						}
13695					}
13696				} else {
13697					// if no theme sepcified, apply the first loaded theme
13698					this.theme = _loadedThemes[0];
13699				}
13700			}
13701
13702			if ( typeof this.theme == 'object' ) {
13703				this._init();
13704			} else {
13705				// if no theme is loaded yet, push the instance into a pool and run it when the theme is ready
13706				_pool.push( this );
13707			}
13708
13709			return this;
13710		},
13711
13712		// this method should only be called once per instance
13713		// for manipulation of data, use the .load method
13714
13715		_init: function() {
13716
13717			var self = this,
13718				options = this._options;
13719
13720			if ( this._initialized ) {
13721				Galleria.raise( 'Init failed: Gallery instance already initialized.' );
13722				return this;
13723			}
13724
13725			this._initialized = true;
13726
13727			if ( !this.theme ) {
13728				Galleria.raise( 'Init failed: No theme found.', true );
13729				return this;
13730			}
13731
13732			// merge the theme & caller options
13733			$.extend( true, options, this.theme.defaults, this._original.options, Galleria.configure.options );
13734
13735			// internally we use boolean for swipe
13736			options.swipe = (function(s) {
13737
13738				if ( s == 'enforced' ) { return true; }
13739
13740				// legacy patch
13741				if( s === false || s == 'disabled' ) { return false; }
13742
13743				return !!Galleria.TOUCH;
13744
13745			}( options.swipe ));
13746
13747			// disable options that arent compatible with swipe
13748			if ( options.swipe ) {
13749				options.clicknext = false;
13750				options.imagePan = false;
13751			}
13752
13753			// check for canvas support
13754			(function( can ) {
13755				if ( !( 'getContext' in can ) ) {
13756					can = null;
13757					return;
13758				}
13759				_canvas = _canvas || {
13760					elem: can,
13761					context: can.getContext( '2d' ),
13762					cache: {},
13763					length: 0
13764				};
13765			}( doc.createElement( 'canvas' ) ) );
13766
13767			// bind the gallery to run when data is ready
13768			this.bind( Galleria.DATA, function() {
13769
13770				// remove big if total pixels are less than 1024 (most phones)
13771				if ( window.screen && window.screen.width && Array.prototype.forEach ) {
13772
13773					this._data.forEach(function(data) {
13774
13775						var density = 'devicePixelRatio' in window ? window.devicePixelRatio : 1,
13776							m = M.max( window.screen.width, window.screen.height );
13777
13778						if ( m*density < 1024 ) {
13779							data.big = data.image;
13780						}
13781					});
13782				}
13783
13784				// save the new data
13785				this._original.data = this._data;
13786
13787				// lets show the counter here
13788				this.get('total').innerHTML = this.getDataLength();
13789
13790				// cache the container
13791				var $container = this.$( 'container' );
13792
13793				// set ratio if height is < 2
13794				if ( self._options.height < 2 ) {
13795					self._userRatio = self._ratio = self._options.height;
13796				}
13797
13798				// the gallery is ready, let's just wait for the css
13799				var num = { width: 0, height: 0 };
13800				var testHeight = function() {
13801					return self.$( 'stage' ).height();
13802				};
13803
13804				// check container and thumbnail height
13805				Utils.wait({
13806					until: function() {
13807
13808						// keep trying to get the value
13809						num = self._getWH();
13810						$container.width( num.width ).height( num.height );
13811						return testHeight() && num.width && num.height > 50;
13812
13813					},
13814					success: function() {
13815
13816						self._width = num.width;
13817						self._height = num.height;
13818						self._ratio = self._ratio || num.height/num.width;
13819
13820						// for some strange reason, webkit needs a single setTimeout to play ball
13821						if ( Galleria.WEBKIT ) {
13822							window.setTimeout( function() {
13823								self._run();
13824							}, 1);
13825						} else {
13826							self._run();
13827						}
13828					},
13829					error: function() {
13830
13831						// Height was probably not set, raise hard errors
13832
13833						if ( testHeight() ) {
13834							Galleria.raise('Could not extract sufficient width/height of the gallery container. Traced measures: width:' + num.width + 'px, height: ' + num.height + 'px.', true);
13835						} else {
13836							Galleria.raise('Could not extract a stage height from the CSS. Traced height: ' + testHeight() + 'px.', true);
13837						}
13838					},
13839					timeout: typeof this._options.wait == 'number' ? this._options.wait : false
13840				});
13841			});
13842
13843			// build the gallery frame
13844			this.append({
13845				'info-text' :
13846					['info-title', 'info-description'],
13847				'info' :
13848					['info-text'],
13849				'image-nav' :
13850					['image-nav-right', 'image-nav-left'],
13851				'stage' :
13852					['images', 'loader', 'counter', 'image-nav'],
13853				'thumbnails-list' :
13854					['thumbnails'],
13855				'thumbnails-container' :
13856					['thumb-nav-left', 'thumbnails-list', 'thumb-nav-right'],
13857				'container' :
13858					['stage', 'thumbnails-container', 'info', 'tooltip']
13859			});
13860
13861			Utils.hide( this.$( 'counter' ).append(
13862				this.get( 'current' ),
13863				doc.createTextNode(' / '),
13864				this.get( 'total' )
13865			) );
13866
13867			this.setCounter('&#8211;');
13868
13869			Utils.hide( self.get('tooltip') );
13870
13871			// add a notouch class on the container to prevent unwanted :hovers on touch devices
13872			this.$( 'container' ).addClass([
13873				( Galleria.TOUCH ? 'touch' : 'notouch' ),
13874				this._options.variation,
13875				'galleria-theme-'+this.theme.name
13876			].join(' '));
13877
13878			// add images to the controls
13879			if ( !this._options.swipe ) {
13880				$.each( new Array(2), function( i ) {
13881
13882					// create a new Picture instance
13883					var image = new Galleria.Picture();
13884
13885					// apply some styles, create & prepend overlay
13886					$( image.container ).css({
13887						position: 'absolute',
13888						top: 0,
13889						left: 0
13890					}).prepend( self._layers[i] = $( Utils.create('galleria-layer') ).css({
13891						position: 'absolute',
13892						top:0, left:0, right:0, bottom:0,
13893						zIndex:2
13894					})[0] );
13895
13896					// append the image
13897					self.$( 'images' ).append( image.container );
13898
13899					// reload the controls
13900					self._controls[i] = image;
13901
13902					// build a frame
13903					var frame = new Galleria.Picture();
13904					frame.isIframe = true;
13905
13906					$( frame.container ).attr('class', 'galleria-frame').css({
13907						position: 'absolute',
13908						top: 0,
13909						left: 0,
13910						zIndex: 4,
13911						background: '#000',
13912						display: 'none'
13913					}).appendTo( image.container );
13914
13915					self._controls.frames[i] = frame;
13916
13917				});
13918			}
13919
13920			// some forced generic styling
13921			this.$( 'images' ).css({
13922				position: 'relative',
13923				top: 0,
13924				left: 0,
13925				width: '100%',
13926				height: '100%'
13927			});
13928
13929			if ( options.swipe ) {
13930				this.$( 'images' ).css({
13931					position: 'absolute',
13932					top: 0,
13933					left: 0,
13934					width: 0,
13935					height: '100%'
13936				});
13937				this.finger = new Galleria.Finger(this.get('stage'), {
13938					onchange: function(page) {
13939						self.pause().show(page);
13940					},
13941					oncomplete: function(page) {
13942
13943						var index = M.max( 0, M.min( parseInt( page, 10 ), self.getDataLength() - 1 ) ),
13944							data = self.getData(index);
13945
13946						$( self._thumbnails[ index ].container )
13947							.addClass( 'active' )
13948							.siblings( '.active' )
13949							.removeClass( 'active' );
13950
13951						if ( !data ) {
13952							return;
13953						}
13954
13955						// remove video iframes
13956						self.$( 'images' ).find( '.galleria-frame' ).css('opacity', 0).hide().find( 'iframe' ).remove();
13957
13958						if ( self._options.carousel && self._options.carouselFollow ) {
13959							self._carousel.follow( index );
13960						}
13961					}
13962				});
13963				this.bind( Galleria.RESCALE, function() {
13964					this.finger.setup();
13965				});
13966				this.$('stage').on('click', function(e) {
13967					var data = self.getData();
13968					if ( !data ) {
13969						return;
13970					}
13971					if ( data.iframe ) {
13972
13973						if ( self.isPlaying() ) {
13974							self.pause();
13975						}
13976						var frame = self._controls.frames[ self._active ],
13977							w = self._stageWidth,
13978							h = self._stageHeight;
13979
13980						if ( $( frame.container ).find( 'iframe' ).length ) {
13981							return;
13982						}
13983
13984						$( frame.container ).css({
13985							width: w,
13986							height: h,
13987							opacity: 0
13988						}).show().animate({
13989							opacity: 1
13990						}, 200);
13991
13992						window.setTimeout(function() {
13993							frame.load( data.iframe + ( data.video ? '&autoplay=1' : '' ), {
13994								width: w,
13995								height: h
13996							}, function( frame ) {
13997								self.$( 'container' ).addClass( 'videoplay' );
13998								frame.scale({
13999									width: self._stageWidth,
14000									height: self._stageHeight,
14001									iframelimit: data.video ? self._options.maxVideoSize : undef
14002								});
14003							});
14004						}, 100);
14005
14006						return;
14007					}
14008
14009					if ( data.link ) {
14010						if ( self._options.popupLinks ) {
14011							var win = window.open( data.link, '_blank' );
14012						} else {
14013							window.location.href = data.link;
14014						}
14015						return;
14016					}
14017				});
14018				this.bind( Galleria.IMAGE, function(e) {
14019
14020					self.setCounter( e.index );
14021					self.setInfo( e.index );
14022
14023					var next = this.getNext(),
14024						prev = this.getPrev();
14025
14026					var preloads = [prev,next];
14027					preloads.push(this.getNext(next), this.getPrev(prev), self._controls.slides.length-1);
14028
14029					var filtered = [];
14030
14031					$.each(preloads, function(i, val) {
14032						if ( $.inArray(val, filtered) == -1 ) {
14033							filtered.push(val);
14034						}
14035					});
14036
14037					$.each(filtered, function(i, loadme) {
14038						var d = self.getData(loadme),
14039							img = self._controls.slides[loadme],
14040							src = self.isFullscreen() && d.big ? d.big : ( d.image || d.iframe );
14041
14042						if ( d.iframe && !d.image ) {
14043							img.isIframe = true;
14044						}
14045
14046						if ( !img.ready ) {
14047							self._controls.slides[loadme].load(src, function(img) {
14048								if ( !img.isIframe ) {
14049									$(img.image).css('visibility', 'hidden');
14050								}
14051								self._scaleImage(img, {
14052									complete: function(img) {
14053										if ( !img.isIframe ) {
14054											$(img.image).css({
14055												opacity: 0,
14056												visibility: 'visible'
14057											}).animate({
14058												opacity: 1
14059											}, 200);
14060										}
14061									}
14062								});
14063							});
14064						}
14065					});
14066				});
14067			}
14068
14069			this.$( 'thumbnails, thumbnails-list' ).css({
14070				overflow: 'hidden',
14071				position: 'relative'
14072			});
14073
14074			// bind image navigation arrows
14075			this.$( 'image-nav-right, image-nav-left' ).on( 'click:fast', function(e) {
14076
14077				// pause if options is set
14078				if ( options.pauseOnInteraction ) {
14079					self.pause();
14080				}
14081
14082				// navigate
14083				var fn = /right/.test( this.className ) ? 'next' : 'prev';
14084				self[ fn ]();
14085
14086			}).on('click', function(e) {
14087
14088				e.preventDefault();
14089
14090				// tune the clicknext option
14091				if ( options.clicknext || options.swipe ) {
14092					e.stopPropagation();
14093				}
14094			});
14095
14096			// hide controls if chosen to
14097			$.each( ['info','counter','image-nav'], function( i, el ) {
14098				if ( options[ 'show' + el.substr(0,1).toUpperCase() + el.substr(1).replace(/-/,'') ] === false ) {
14099					Utils.moveOut( self.get( el.toLowerCase() ) );
14100				}
14101			});
14102
14103			// load up target content
14104			this.load();
14105
14106			// now it's usually safe to remove the content
14107			// IE will never stop loading if we remove it, so let's keep it hidden for IE (it's usually fast enough anyway)
14108			if ( !options.keepSource && !IE ) {
14109				this._target.innerHTML = '';
14110			}
14111
14112			// re-append the errors, if they happened before clearing
14113			if ( this.get( 'errors' ) ) {
14114				this.appendChild( 'target', 'errors' );
14115			}
14116
14117			// append the gallery frame
14118			this.appendChild( 'target', 'container' );
14119
14120			// parse the carousel on each thumb load
14121			if ( options.carousel ) {
14122				var count = 0,
14123					show = options.show;
14124				this.bind( Galleria.THUMBNAIL, function() {
14125					this.updateCarousel();
14126					if ( ++count == this.getDataLength() && typeof show == 'number' && show > 0 ) {
14127						this._carousel.follow( show );
14128					}
14129				});
14130			}
14131
14132			// bind window resize for responsiveness
14133			if ( options.responsive ) {
14134				$win.on( 'resize', function() {
14135					if ( !self.isFullscreen() ) {
14136						self.resize();
14137					}
14138				});
14139			}
14140
14141			// double-tap/click fullscreen toggle
14142
14143			if ( options.fullscreenDoubleTap ) {
14144
14145				this.$( 'stage' ).on( 'touchstart', (function() {
14146					var last, cx, cy, lx, ly, now,
14147						getData = function(e) {
14148							return e.originalEvent.touches ? e.originalEvent.touches[0] : e;
14149						};
14150					self.$( 'stage' ).on('touchmove', function() {
14151						last = 0;
14152					});
14153					return function(e) {
14154						if( /(-left|-right)/.test(e.target.className) ) {
14155							return;
14156						}
14157						now = Utils.timestamp();
14158						cx = getData(e).pageX;
14159						cy = getData(e).pageY;
14160						if ( e.originalEvent.touches.length < 2 && ( now - last < 300 ) && ( cx - lx < 20) && ( cy - ly < 20) ) {
14161							self.toggleFullscreen();
14162							e.preventDefault();
14163							return;
14164						}
14165						last = now;
14166						lx = cx;
14167						ly = cy;
14168					};
14169				}()));
14170			}
14171
14172			// bind the ons
14173			$.each( Galleria.on.binds, function(i, bind) {
14174				// check if already bound
14175				if ( $.inArray( bind.hash, self._binds ) == -1 ) {
14176					self.bind( bind.type, bind.callback );
14177				}
14178			});
14179
14180			return this;
14181		},
14182
14183		addTimer : function() {
14184			this._timer.add.apply( this._timer, Utils.array( arguments ) );
14185			return this;
14186		},
14187
14188		clearTimer : function() {
14189			this._timer.clear.apply( this._timer, Utils.array( arguments ) );
14190			return this;
14191		},
14192
14193		// parse width & height from CSS or options
14194
14195		_getWH : function() {
14196
14197			var $container = this.$( 'container' ),
14198				$target = this.$( 'target' ),
14199				self = this,
14200				num = {},
14201				arr;
14202
14203			$.each(['width', 'height'], function( i, m ) {
14204
14205				// first check if options is set
14206				if ( self._options[ m ] && typeof self._options[ m ] === 'number') {
14207					num[ m ] = self._options[ m ];
14208				} else {
14209
14210					arr = [
14211						Utils.parseValue( $container.css( m ) ),         // the container css height
14212						Utils.parseValue( $target.css( m ) ),            // the target css height
14213						$container[ m ](),                               // the container jQuery method
14214						$target[ m ]()                                   // the target jQuery method
14215					];
14216
14217					// if first time, include the min-width & min-height
14218					if ( !self[ '_'+m ] ) {
14219						arr.splice(arr.length,
14220							Utils.parseValue( $container.css( 'min-'+m ) ),
14221							Utils.parseValue( $target.css( 'min-'+m ) )
14222						);
14223					}
14224
14225					// else extract the measures from different sources and grab the highest value
14226					num[ m ] = M.max.apply( M, arr );
14227				}
14228			});
14229
14230			// allow setting a height ratio instead of exact value
14231			// useful when doing responsive galleries
14232
14233			if ( self._userRatio ) {
14234				num.height = num.width * self._userRatio;
14235			}
14236
14237			return num;
14238		},
14239
14240		// Creates the thumbnails and carousel
14241		// can be used at any time, f.ex when the data object is manipulated
14242		// push is an optional argument with pushed images
14243
14244		_createThumbnails : function( push ) {
14245
14246			this.get( 'total' ).innerHTML = this.getDataLength();
14247
14248			var src,
14249				thumb,
14250				data,
14251
14252				$container,
14253
14254				self = this,
14255				o = this._options,
14256
14257				i = push ? this._data.length - push.length : 0,
14258				chunk = i,
14259
14260				thumbchunk = [],
14261				loadindex = 0,
14262
14263				gif = IE < 8 ? 'http://upload.wikimedia.org/wikipedia/commons/c/c0/Blank.gif' :
14264					'data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D',
14265
14266				// get previously active thumbnail, if exists
14267				active = (function() {
14268					var a = self.$('thumbnails').find('.active');
14269					if ( !a.length ) {
14270						return false;
14271					}
14272					return a.find('img').attr('src');
14273				}()),
14274
14275				// cache the thumbnail option
14276				optval = typeof o.thumbnails === 'string' ? o.thumbnails.toLowerCase() : null,
14277
14278				// move some data into the instance
14279				// for some reason, jQuery cant handle css(property) when zooming in FF, breaking the gallery
14280				// so we resort to getComputedStyle for browsers who support it
14281				getStyle = function( prop ) {
14282					return doc.defaultView && doc.defaultView.getComputedStyle ?
14283						doc.defaultView.getComputedStyle( thumb.container, null )[ prop ] :
14284						$container.css( prop );
14285				},
14286
14287				fake = function(image, index, container) {
14288					return function() {
14289						$( container ).append( image );
14290						self.trigger({
14291							type: Galleria.THUMBNAIL,
14292							thumbTarget: image,
14293							index: index,
14294							galleriaData: self.getData( index )
14295						});
14296					};
14297				},
14298
14299				onThumbEvent = function( e ) {
14300
14301					// pause if option is set
14302					if ( o.pauseOnInteraction ) {
14303						self.pause();
14304					}
14305
14306					// extract the index from the data
14307					var index = $( e.currentTarget ).data( 'index' );
14308					if ( self.getIndex() !== index ) {
14309						self.show( index );
14310					}
14311
14312					e.preventDefault();
14313				},
14314
14315				thumbComplete = function( thumb, callback ) {
14316
14317					$( thumb.container ).css( 'visibility', 'visible' );
14318					self.trigger({
14319						type: Galleria.THUMBNAIL,
14320						thumbTarget: thumb.image,
14321						index: thumb.data.order,
14322						galleriaData: self.getData( thumb.data.order )
14323					});
14324
14325					if ( typeof callback == 'function' ) {
14326						callback.call( self, thumb );
14327					}
14328				},
14329
14330				onThumbLoad = function( thumb, callback ) {
14331
14332					// scale when ready
14333					thumb.scale({
14334						width:    thumb.data.width,
14335						height:   thumb.data.height,
14336						crop:     o.thumbCrop,
14337						margin:   o.thumbMargin,
14338						canvas:   o.useCanvas,
14339						position: o.thumbPosition,
14340						complete: function( thumb ) {
14341
14342							// shrink thumbnails to fit
14343							var top = ['left', 'top'],
14344								arr = ['Width', 'Height'],
14345								m,
14346								css,
14347								data = self.getData( thumb.index );
14348
14349							// calculate shrinked positions
14350							$.each(arr, function( i, measure ) {
14351								m = measure.toLowerCase();
14352								if ( (o.thumbCrop !== true || o.thumbCrop === m ) ) {
14353									css = {};
14354									css[ m ] = thumb[ m ];
14355									$( thumb.container ).css( css );
14356									css = {};
14357									css[ top[ i ] ] = 0;
14358									$( thumb.image ).css( css );
14359								}
14360
14361								// cache outer measures
14362								thumb[ 'outer' + measure ] = $( thumb.container )[ 'outer' + measure ]( true );
14363							});
14364
14365							// set high quality if downscale is moderate
14366							Utils.toggleQuality( thumb.image,
14367								o.thumbQuality === true ||
14368								( o.thumbQuality === 'auto' && thumb.original.width < thumb.width * 3 )
14369							);
14370
14371							if ( o.thumbDisplayOrder && !thumb.lazy ) {
14372
14373								$.each( thumbchunk, function( i, th ) {
14374									if ( i === loadindex && th.ready && !th.displayed ) {
14375
14376										loadindex++;
14377										th.displayed = true;
14378
14379										thumbComplete( th, callback );
14380
14381										return;
14382									}
14383								});
14384							} else {
14385								thumbComplete( thumb, callback );
14386							}
14387						}
14388					});
14389				};
14390
14391			if ( !push ) {
14392				this._thumbnails = [];
14393				this.$( 'thumbnails' ).empty();
14394			}
14395
14396			// loop through data and create thumbnails
14397			for( ; this._data[ i ]; i++ ) {
14398
14399				data = this._data[ i ];
14400
14401				// get source from thumb or image
14402				src = data.thumb || data.image;
14403
14404				if ( ( o.thumbnails === true || optval == 'lazy' ) && ( data.thumb || data.image ) ) {
14405
14406					// add a new Picture instance
14407					thumb = new Galleria.Picture(i);
14408
14409					// save the index
14410					thumb.index = i;
14411
14412					// flag displayed
14413					thumb.displayed = false;
14414
14415					// flag lazy
14416					thumb.lazy = false;
14417
14418					// flag video
14419					thumb.video = false;
14420
14421					// append the thumbnail
14422					this.$( 'thumbnails' ).append( thumb.container );
14423
14424					// cache the container
14425					$container = $( thumb.container );
14426
14427					// hide it
14428					$container.css( 'visibility', 'hidden' );
14429
14430					thumb.data = {
14431						width  : Utils.parseValue( getStyle( 'width' ) ),
14432						height : Utils.parseValue( getStyle( 'height' ) ),
14433						order  : i,
14434						src    : src
14435					};
14436
14437					// grab & reset size for smoother thumbnail loads
14438					if ( o.thumbCrop !== true ) {
14439						$container.css( { width: 'auto', height: 'auto' } );
14440					} else {
14441						$container.css( { width: thumb.data.width, height: thumb.data.height } );
14442					}
14443
14444					// load the thumbnail
14445					if ( optval == 'lazy' ) {
14446
14447						$container.addClass( 'lazy' );
14448
14449						thumb.lazy = true;
14450
14451						thumb.load( gif, {
14452							height: thumb.data.height,
14453							width: thumb.data.width
14454						});
14455
14456					} else {
14457						thumb.load( src, onThumbLoad );
14458					}
14459
14460					// preload all images here
14461					if ( o.preload === 'all' ) {
14462						thumb.preload( data.image );
14463					}
14464
14465					// create empty spans if thumbnails is set to 'empty'
14466				} else if ( ( data.iframe && optval !== null ) || optval === 'empty' || optval === 'numbers' ) {
14467					thumb = {
14468						container: Utils.create( 'galleria-image' ),
14469						image: Utils.create( 'img', 'span' ),
14470						ready: true,
14471						data: {
14472							order: i
14473						}
14474					};
14475
14476					// create numbered thumbnails
14477					if ( optval === 'numbers' ) {
14478						$( thumb.image ).text( i + 1 );
14479					}
14480
14481					if ( data.iframe ) {
14482						$( thumb.image ).addClass( 'iframe' );
14483					}
14484
14485					this.$( 'thumbnails' ).append( thumb.container );
14486
14487					// we need to "fake" a loading delay before we append and trigger
14488					// 50+ should be enough
14489
14490					window.setTimeout( ( fake )( thumb.image, i, thumb.container ), 50 + ( i*20 ) );
14491
14492					// create null object to silent errors
14493				} else {
14494					thumb = {
14495						container: null,
14496						image: null
14497					};
14498				}
14499
14500				// add events for thumbnails
14501				// you can control the event type using thumb_event_type
14502				// we'll add the same event to the source if it's kept
14503
14504				$( thumb.container ).add( o.keepSource && o.linkSourceImages ? data.original : null )
14505					.data('index', i).on( o.thumbEventType, onThumbEvent )
14506					.data('thumbload', onThumbLoad);
14507
14508				if (active === src) {
14509					$( thumb.container ).addClass( 'active' );
14510				}
14511
14512				this._thumbnails.push( thumb );
14513			}
14514
14515			thumbchunk = this._thumbnails.slice( chunk );
14516
14517			return this;
14518		},
14519
14520		/**
14521		 Lazy-loads thumbnails.
14522		 You can call this method to load lazy thumbnails at run time
14523
14524		 @param {Array|Number} index Index or array of indexes of thumbnails to be loaded
14525		 @param {Function} complete Callback that is called when all lazy thumbnails have been loaded
14526
14527		 @returns Instance
14528		 */
14529
14530		lazyLoad: function( index, complete ) {
14531
14532			var arr = index.constructor == Array ? index : [ index ],
14533				self = this,
14534				loaded = 0;
14535
14536			$.each( arr, function(i, ind) {
14537
14538				if ( ind > self._thumbnails.length - 1 ) {
14539					return;
14540				}
14541
14542				var thumb = self._thumbnails[ ind ],
14543					data = thumb.data,
14544					callback = function() {
14545						if ( ++loaded == arr.length && typeof complete == 'function' ) {
14546							complete.call( self );
14547						}
14548					},
14549					thumbload = $( thumb.container ).data( 'thumbload' );
14550				if (thumbload) {
14551					if ( thumb.video ) {
14552						thumbload.call( self, thumb, callback );
14553					} else {
14554						thumb.load( data.src , function( thumb ) {
14555							thumbload.call( self, thumb, callback );
14556						});
14557					}
14558				}
14559			});
14560
14561			return this;
14562
14563		},
14564
14565		/**
14566		 Lazy-loads thumbnails in chunks.
14567		 This method automatcally chops up the loading process of many thumbnails into chunks
14568
14569		 @param {Number} size Size of each chunk to be loaded
14570		 @param {Number} [delay] Delay between each loads
14571
14572		 @returns Instance
14573		 */
14574
14575		lazyLoadChunks: function( size, delay ) {
14576
14577			var len = this.getDataLength(),
14578				i = 0,
14579				n = 0,
14580				arr = [],
14581				temp = [],
14582				self = this;
14583
14584			delay = delay || 0;
14585
14586			for( ; i<len; i++ ) {
14587				temp.push(i);
14588				if ( ++n == size || i == len-1 ) {
14589					arr.push( temp );
14590					n = 0;
14591					temp = [];
14592				}
14593			}
14594
14595			var init = function( wait ) {
14596				var a = arr.shift();
14597				if ( a ) {
14598					window.setTimeout(function() {
14599						self.lazyLoad(a, function() {
14600							init( true );
14601						});
14602					}, ( delay && wait ) ? delay : 0 );
14603				}
14604			};
14605
14606			init( false );
14607
14608			return this;
14609
14610		},
14611
14612		// the internal _run method should be called after loading data into galleria
14613		// makes sure the gallery has proper measurements before postrun & ready
14614		_run : function() {
14615
14616			var self = this;
14617
14618			self._createThumbnails();
14619
14620			// make sure we have a stageHeight && stageWidth
14621
14622			Utils.wait({
14623
14624				timeout: 10000,
14625
14626				until: function() {
14627
14628					// Opera crap
14629					if ( Galleria.OPERA ) {
14630						self.$( 'stage' ).css( 'display', 'inline-block' );
14631					}
14632
14633					self._stageWidth  = self.$( 'stage' ).width();
14634					self._stageHeight = self.$( 'stage' ).height();
14635
14636					return( self._stageWidth &&
14637						self._stageHeight > 50 ); // what is an acceptable height?
14638				},
14639
14640				success: function() {
14641
14642					// save the instance
14643					_galleries.push( self );
14644
14645					// postrun some stuff after the gallery is ready
14646
14647					// create the touch slider
14648					if ( self._options.swipe ) {
14649
14650						var $images = self.$( 'images' ).width( self.getDataLength() * self._stageWidth );
14651						$.each( new Array( self.getDataLength() ), function(i) {
14652
14653							var image = new Galleria.Picture(),
14654								data = self.getData(i);
14655
14656							$( image.container ).css({
14657								position: 'absolute',
14658								top: 0,
14659								left: self._stageWidth*i
14660							}).prepend( self._layers[i] = $( Utils.create('galleria-layer') ).css({
14661								position: 'absolute',
14662								top:0, left:0, right:0, bottom:0,
14663								zIndex:2
14664							})[0] ).appendTo( $images );
14665
14666							if( data.video ) {
14667								_playIcon( image.container );
14668							}
14669
14670							self._controls.slides.push(image);
14671
14672							var frame = new Galleria.Picture();
14673							frame.isIframe = true;
14674
14675							$( frame.container ).attr('class', 'galleria-frame').css({
14676								position: 'absolute',
14677								top: 0,
14678								left: 0,
14679								zIndex: 4,
14680								background: '#000',
14681								display: 'none'
14682							}).appendTo( image.container );
14683
14684							self._controls.frames.push(frame);
14685						});
14686
14687						self.finger.setup();
14688					}
14689
14690					// show counter
14691					Utils.show( self.get('counter') );
14692
14693					// bind carousel nav
14694					if ( self._options.carousel ) {
14695						self._carousel.bindControls();
14696					}
14697
14698					// start autoplay
14699					if ( self._options.autoplay ) {
14700
14701						self.pause();
14702
14703						if ( typeof self._options.autoplay === 'number' ) {
14704							self._playtime = self._options.autoplay;
14705						}
14706
14707						self._playing = true;
14708					}
14709					// if second load, just do the show and return
14710					if ( self._firstrun ) {
14711
14712						if ( self._options.autoplay ) {
14713							self.trigger( Galleria.PLAY );
14714						}
14715
14716						if ( typeof self._options.show === 'number' ) {
14717							self.show( self._options.show );
14718						}
14719						return;
14720					}
14721
14722					self._firstrun = true;
14723
14724					// initialize the History plugin
14725					if ( Galleria.History ) {
14726
14727						// bind the show method
14728						Galleria.History.change(function( value ) {
14729
14730							// if ID is NaN, the user pressed back from the first image
14731							// return to previous address
14732							if ( isNaN( value ) ) {
14733								window.history.go(-1);
14734
14735								// else show the image
14736							} else {
14737								self.show( value, undef, true );
14738							}
14739						});
14740					}
14741
14742					self.trigger( Galleria.READY );
14743
14744					// call the theme init method
14745					self.theme.init.call( self, self._options );
14746
14747					// Trigger Galleria.ready
14748					$.each( Galleria.ready.callbacks, function(i ,fn) {
14749						if ( typeof fn == 'function' ) {
14750							fn.call( self, self._options );
14751						}
14752					});
14753
14754					// call the extend option
14755					self._options.extend.call( self, self._options );
14756
14757					// show the initial image
14758					// first test for permalinks in history
14759					if ( /^[0-9]{1,4}$/.test( HASH ) && Galleria.History ) {
14760						self.show( HASH, undef, true );
14761
14762					} else if( self._data[ self._options.show ] ) {
14763						self.show( self._options.show );
14764					}
14765
14766					// play trigger
14767					if ( self._options.autoplay ) {
14768						self.trigger( Galleria.PLAY );
14769					}
14770				},
14771
14772				error: function() {
14773					Galleria.raise('Stage width or height is too small to show the gallery. Traced measures: width:' + self._stageWidth + 'px, height: ' + self._stageHeight + 'px.', true);
14774				}
14775
14776			});
14777		},
14778
14779		/**
14780		 Loads data into the gallery.
14781		 You can call this method on an existing gallery to reload the gallery with new data.
14782
14783		 @param {Array|string} [source] Optional JSON array of data or selector of where to find data in the document.
14784		 Defaults to the Galleria target or dataSource option.
14785
14786		 @param {string} [selector] Optional element selector of what elements to parse.
14787		 Defaults to 'img'.
14788
14789		 @param {Function} [config] Optional function to modify the data extraction proceedure from the selector.
14790		 See the dataConfig option for more information.
14791
14792		 @returns Instance
14793		 */
14794
14795		load : function( source, selector, config ) {
14796
14797			var self = this,
14798				o = this._options;
14799
14800			// empty the data array
14801			this._data = [];
14802
14803			// empty the thumbnails
14804			this._thumbnails = [];
14805			this.$('thumbnails').empty();
14806
14807			// shorten the arguments
14808			if ( typeof selector === 'function' ) {
14809				config = selector;
14810				selector = null;
14811			}
14812
14813			// use the source set by target
14814			source = source || o.dataSource;
14815
14816			// use selector set by option
14817			selector = selector || o.dataSelector;
14818
14819			// use the dataConfig set by option
14820			config = config || o.dataConfig;
14821
14822			// if source is a true object, make it into an array
14823			if( $.isPlainObject( source ) ) {
14824				source = [source];
14825			}
14826
14827			// check if the data is an array already
14828			if ( $.isArray( source ) ) {
14829				if ( this.validate( source ) ) {
14830					this._data = source;
14831				} else {
14832					Galleria.raise( 'Load failed: JSON Array not valid.' );
14833				}
14834			} else {
14835
14836				// add .video and .iframe to the selector (1.2.7)
14837				selector += ',.video,.iframe';
14838
14839				// loop through images and set data
14840				$( source ).find( selector ).each( function( i, elem ) {
14841
14842					elem = $( elem );
14843					var data = {},
14844						parent = elem.parent(),
14845						href = parent.attr( 'href' ),
14846						rel  = parent.attr( 'rel' );
14847
14848					if( href && ( elem[0].nodeName == 'IMG' || elem.hasClass('video') ) && _videoTest( href ) ) {
14849						data.video = href;
14850					} else if( href && elem.hasClass('iframe') ) {
14851						data.iframe = href;
14852					} else {
14853						data.image = data.big = href;
14854					}
14855
14856					if ( rel ) {
14857						data.big = rel;
14858					}
14859
14860					// alternative extraction from HTML5 data attribute, added in 1.2.7
14861					$.each( 'big title description link layer image'.split(' '), function( i, val ) {
14862						if ( elem.data(val) ) {
14863							data[ val ] = elem.data(val).toString();
14864						}
14865					});
14866
14867					if ( !data.big ) {
14868						data.big = data.image;
14869					}
14870
14871					// mix default extractions with the hrefs and config
14872					// and push it into the data array
14873					self._data.push( $.extend({
14874
14875						title:       elem.attr('title') || '',
14876						thumb:       elem.attr('src'),
14877						image:       elem.attr('src'),
14878						big:         elem.attr('src'),
14879						description: elem.attr('alt') || '',
14880						link:        elem.attr('longdesc'),
14881						original:    elem.get(0) // saved as a reference
14882
14883					}, data, config( elem ) ) );
14884
14885				});
14886			}
14887
14888			if ( typeof o.dataSort == 'function' ) {
14889				protoArray.sort.call( this._data, o.dataSort );
14890			} else if ( o.dataSort == 'random' ) {
14891				this._data.sort( function() {
14892					return M.round(M.random())-0.5;
14893				});
14894			}
14895
14896			// trigger the DATA event and return
14897			if ( this.getDataLength() ) {
14898				this._parseData( function() {
14899					this.trigger( Galleria.DATA );
14900				} );
14901			}
14902			return this;
14903
14904		},
14905
14906		// make sure the data works properly
14907		_parseData : function( callback ) {
14908
14909			var self = this,
14910				current,
14911				ready = false,
14912				onload = function() {
14913					var complete = true;
14914					$.each( self._data, function( i, data ) {
14915						if ( data.loading ) {
14916							complete = false;
14917							return false;
14918						}
14919					});
14920					if ( complete && !ready ) {
14921						ready = true;
14922						callback.call( self );
14923					}
14924				};
14925
14926			$.each( this._data, function( i, data ) {
14927
14928				current = self._data[ i ];
14929
14930				// copy image as thumb if no thumb exists
14931				if ( 'thumb' in data === false ) {
14932					current.thumb = data.image;
14933				}
14934				// copy image as big image if no biggie exists
14935				if ( !data.big ) {
14936					current.big = data.image;
14937				}
14938				// parse video
14939				if ( 'video' in data ) {
14940					var result = _videoTest( data.video );
14941
14942					if ( result ) {
14943						current.iframe = new Video(result.provider, result.id ).embed() + (function() {
14944
14945							// add options
14946							if ( typeof self._options[ result.provider ] == 'object' ) {
14947								var str = '?', arr = [];
14948								$.each( self._options[ result.provider ], function( key, val ) {
14949									arr.push( key + '=' + val );
14950								});
14951
14952								// small youtube specifics, perhaps move to _video later
14953								if ( result.provider == 'youtube' ) {
14954									arr = ['wmode=opaque'].concat(arr);
14955								}
14956								return str + arr.join('&');
14957							}
14958							return '';
14959						}());
14960
14961						// pre-fetch video providers media
14962
14963						if( !current.thumb || !current.image ) {
14964							$.each( ['thumb', 'image'], function( i, type ) {
14965								if ( type == 'image' && !self._options.videoPoster ) {
14966									current.image = undef;
14967									return;
14968								}
14969								var video = new Video( result.provider, result.id );
14970								if ( !current[ type ] ) {
14971									current.loading = true;
14972									video.getMedia( type, (function(current, type) {
14973										return function(src) {
14974											current[ type ] = src;
14975											if ( type == 'image' && !current.big ) {
14976												current.big = current.image;
14977											}
14978											delete current.loading;
14979											onload();
14980										};
14981									}( current, type )));
14982								}
14983							});
14984						}
14985					}
14986				}
14987			});
14988
14989			onload();
14990
14991			return this;
14992		},
14993
14994		/**
14995		 Destroy the Galleria instance and recover the original content
14996
14997		 @example this.destroy();
14998
14999		 @returns Instance
15000		 */
15001
15002		destroy : function() {
15003			this.$( 'target' ).data( 'galleria', null );
15004			this.$( 'container' ).off( 'galleria' );
15005			this.get( 'target' ).innerHTML = this._original.html;
15006			this.clearTimer();
15007			Utils.removeFromArray( _instances, this );
15008			Utils.removeFromArray( _galleries, this );
15009			if ( Galleria._waiters !== undefined && Galleria._waiters.length ) {
15010				$.each( Galleria._waiters, function( i, w ) {
15011					if ( w ) window.clearTimeout( w );
15012				});
15013			}
15014			_video._inst = [];
15015			return this;
15016		},
15017
15018		/**
15019		 Adds and/or removes images from the gallery
15020		 Works just like Array.splice
15021		 https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice
15022
15023		 @example this.splice( 2, 4 ); // removes 4 images after the second image
15024
15025		 @returns Instance
15026		 */
15027
15028		splice : function() {
15029			var self = this,
15030				args = Utils.array( arguments );
15031			window.setTimeout(function() {
15032				protoArray.splice.apply( self._data, args );
15033				self._parseData( function() {
15034					self._createThumbnails();
15035				});
15036			},2);
15037			return self;
15038		},
15039
15040		/**
15041		 Append images to the gallery
15042		 Works just like Array.push
15043		 https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/push
15044
15045		 @example this.push({ image: 'image1.jpg' }); // appends the image to the gallery
15046
15047		 @returns Instance
15048		 */
15049
15050		push : function() {
15051			var self = this,
15052				args = Utils.array( arguments );
15053
15054			if ( args.length == 1 && args[0].constructor == Array ) {
15055				args = args[0];
15056			}
15057
15058			window.setTimeout(function() {
15059				protoArray.push.apply( self._data, args );
15060				self._parseData( function() {
15061					self._createThumbnails( args );
15062				});
15063			}, 2);
15064			return self;
15065		},
15066
15067		_getActive : function() {
15068			return this._controls.getActive();
15069		},
15070
15071		validate : function( data ) {
15072			// todo: validate a custom data array
15073			return true;
15074		},
15075
15076		/**
15077		 Bind any event to Galleria
15078
15079		 @param {string} type The Event type to listen for
15080		 @param {Function} fn The function to execute when the event is triggered
15081
15082		 @example this.bind( 'image', function() { Galleria.log('image shown') });
15083
15084		 @returns Instance
15085		 */
15086
15087		bind : function(type, fn) {
15088
15089			// allow 'image' instead of Galleria.IMAGE
15090			type = _patchEvent( type );
15091
15092			this.$( 'container' ).on( type, this.proxy(fn) );
15093			return this;
15094		},
15095
15096		/**
15097		 Unbind any event to Galleria
15098
15099		 @param {string} type The Event type to forget
15100
15101		 @returns Instance
15102		 */
15103
15104		unbind : function(type) {
15105
15106			type = _patchEvent( type );
15107
15108			this.$( 'container' ).off( type );
15109			return this;
15110		},
15111
15112		/**
15113		 Manually trigger a Galleria event
15114
15115		 @param {string} type The Event to trigger
15116
15117		 @returns Instance
15118		 */
15119
15120		trigger : function( type ) {
15121
15122			type = typeof type === 'object' ?
15123				$.extend( type, { scope: this } ) :
15124				{ type: _patchEvent( type ), scope: this };
15125
15126			this.$( 'container' ).trigger( type );
15127
15128			return this;
15129		},
15130
15131		/**
15132		 Assign an "idle state" to any element.
15133		 The idle state will be applied after a certain amount of idle time
15134		 Useful to hide f.ex navigation when the gallery is inactive
15135
15136		 @param {HTMLElement|string} elem The Dom node or selector to apply the idle state to
15137		 @param {Object} styles the CSS styles to apply when in idle mode
15138		 @param {Object} [from] the CSS styles to apply when in normal
15139		 @param {Boolean} [hide] set to true if you want to hide it first
15140
15141		 @example addIdleState( this.get('image-nav'), { opacity: 0 });
15142		 @example addIdleState( '.galleria-image-nav', { top: -200 }, true);
15143
15144		 @returns Instance
15145		 */
15146
15147		addIdleState: function( elem, styles, from, hide ) {
15148			this._idle.add.apply( this._idle, Utils.array( arguments ) );
15149			return this;
15150		},
15151
15152		/**
15153		 Removes any idle state previously set using addIdleState()
15154
15155		 @param {HTMLElement|string} elem The Dom node or selector to remove the idle state from.
15156
15157		 @returns Instance
15158		 */
15159
15160		removeIdleState: function( elem ) {
15161			this._idle.remove.apply( this._idle, Utils.array( arguments ) );
15162			return this;
15163		},
15164
15165		/**
15166		 Force Galleria to enter idle mode.
15167
15168		 @returns Instance
15169		 */
15170
15171		enterIdleMode: function() {
15172			this._idle.hide();
15173			return this;
15174		},
15175
15176		/**
15177		 Force Galleria to exit idle mode.
15178
15179		 @returns Instance
15180		 */
15181
15182		exitIdleMode: function() {
15183			this._idle.showAll();
15184			return this;
15185		},
15186
15187		/**
15188		 Enter FullScreen mode
15189
15190		 @param {Function} callback the function to be executed when the fullscreen mode is fully applied.
15191
15192		 @returns Instance
15193		 */
15194
15195		enterFullscreen: function( callback ) {
15196			this._fullscreen.enter.apply( this, Utils.array( arguments ) );
15197			return this;
15198		},
15199
15200		/**
15201		 Exits FullScreen mode
15202
15203		 @param {Function} callback the function to be executed when the fullscreen mode is fully applied.
15204
15205		 @returns Instance
15206		 */
15207
15208		exitFullscreen: function( callback ) {
15209			this._fullscreen.exit.apply( this, Utils.array( arguments ) );
15210			return this;
15211		},
15212
15213		/**
15214		 Toggle FullScreen mode
15215
15216		 @param {Function} callback the function to be executed when the fullscreen mode is fully applied or removed.
15217
15218		 @returns Instance
15219		 */
15220
15221		toggleFullscreen: function( callback ) {
15222			this._fullscreen[ this.isFullscreen() ? 'exit' : 'enter'].apply( this, Utils.array( arguments ) );
15223			return this;
15224		},
15225
15226		/**
15227		 Adds a tooltip to any element.
15228		 You can also call this method with an object as argument with elemID:value pairs to apply tooltips to (see examples)
15229
15230		 @param {HTMLElement} elem The DOM Node to attach the event to
15231		 @param {string|Function} value The tooltip message. Can also be a function that returns a string.
15232
15233		 @example this.bindTooltip( this.get('thumbnails'), 'My thumbnails');
15234		 @example this.bindTooltip( this.get('thumbnails'), function() { return 'My thumbs' });
15235		 @example this.bindTooltip( { image_nav: 'Navigation' });
15236
15237		 @returns Instance
15238		 */
15239
15240		bindTooltip: function( elem, value ) {
15241			this._tooltip.bind.apply( this._tooltip, Utils.array(arguments) );
15242			return this;
15243		},
15244
15245		/**
15246		 Note: this method is deprecated. Use refreshTooltip() instead.
15247
15248		 Redefine a tooltip.
15249		 Use this if you want to re-apply a tooltip value to an already bound tooltip element.
15250
15251		 @param {HTMLElement} elem The DOM Node to attach the event to
15252		 @param {string|Function} value The tooltip message. Can also be a function that returns a string.
15253
15254		 @returns Instance
15255		 */
15256
15257		defineTooltip: function( elem, value ) {
15258			this._tooltip.define.apply( this._tooltip, Utils.array(arguments) );
15259			return this;
15260		},
15261
15262		/**
15263		 Refresh a tooltip value.
15264		 Use this if you want to change the tooltip value at runtime, f.ex if you have a play/pause toggle.
15265
15266		 @param {HTMLElement} elem The DOM Node that has a tooltip that should be refreshed
15267
15268		 @returns Instance
15269		 */
15270
15271		refreshTooltip: function( elem ) {
15272			this._tooltip.show.apply( this._tooltip, Utils.array(arguments) );
15273			return this;
15274		},
15275
15276		/**
15277		 Open a pre-designed lightbox with the currently active image.
15278		 You can control some visuals using gallery options.
15279
15280		 @returns Instance
15281		 */
15282
15283		openLightbox: function() {
15284			this._lightbox.show.apply( this._lightbox, Utils.array( arguments ) );
15285			return this;
15286		},
15287
15288		/**
15289		 Close the lightbox.
15290
15291		 @returns Instance
15292		 */
15293
15294		closeLightbox: function() {
15295			this._lightbox.hide.apply( this._lightbox, Utils.array( arguments ) );
15296			return this;
15297		},
15298
15299		/**
15300		 Check if a variation exists
15301
15302		 @returns {Boolean} If the variation has been applied
15303		 */
15304
15305		hasVariation: function( variation ) {
15306			return $.inArray( variation, this._options.variation.split(/\s+/) ) > -1;
15307		},
15308
15309		/**
15310		 Get the currently active image element.
15311
15312		 @returns {HTMLElement} The image element
15313		 */
15314
15315		getActiveImage: function() {
15316			var active = this._getActive();
15317			return active ? active.image : undef;
15318		},
15319
15320		/**
15321		 Get the currently active thumbnail element.
15322
15323		 @returns {HTMLElement} The thumbnail element
15324		 */
15325
15326		getActiveThumb: function() {
15327			return this._thumbnails[ this._active ].image || undef;
15328		},
15329
15330		/**
15331		 Get the mouse position relative to the gallery container
15332
15333		 @param e The mouse event
15334
15335		 @example
15336
15337		 var gallery = this;
15338		 $(document).mousemove(function(e) {
15339    console.log( gallery.getMousePosition(e).x );
15340});
15341
15342		 @returns {Object} Object with x & y of the relative mouse postion
15343		 */
15344
15345		getMousePosition : function(e) {
15346			return {
15347				x: e.pageX - this.$( 'container' ).offset().left,
15348				y: e.pageY - this.$( 'container' ).offset().top
15349			};
15350		},
15351
15352		/**
15353		 Adds a panning effect to the image
15354
15355		 @param [img] The optional image element. If not specified it takes the currently active image
15356
15357		 @returns Instance
15358		 */
15359
15360		addPan : function( img ) {
15361
15362			if ( this._options.imageCrop === false ) {
15363				return;
15364			}
15365
15366			img = $( img || this.getActiveImage() );
15367
15368			// define some variables and methods
15369			var self   = this,
15370				x      = img.width() / 2,
15371				y      = img.height() / 2,
15372				destX  = parseInt( img.css( 'left' ), 10 ),
15373				destY  = parseInt( img.css( 'top' ), 10 ),
15374				curX   = destX || 0,
15375				curY   = destY || 0,
15376				distX  = 0,
15377				distY  = 0,
15378				active = false,
15379				ts     = Utils.timestamp(),
15380				cache  = 0,
15381				move   = 0,
15382
15383				// positions the image
15384				position = function( dist, cur, pos ) {
15385					if ( dist > 0 ) {
15386						move = M.round( M.max( dist * -1, M.min( 0, cur ) ) );
15387						if ( cache !== move ) {
15388
15389							cache = move;
15390
15391							if ( IE === 8 ) { // scroll is faster for IE
15392								img.parent()[ 'scroll' + pos ]( move * -1 );
15393							} else {
15394								var css = {};
15395								css[ pos.toLowerCase() ] = move;
15396								img.css(css);
15397							}
15398						}
15399					}
15400				},
15401
15402				// calculates mouse position after 50ms
15403				calculate = function(e) {
15404					if (Utils.timestamp() - ts < 50) {
15405						return;
15406					}
15407					active = true;
15408					x = self.getMousePosition(e).x;
15409					y = self.getMousePosition(e).y;
15410				},
15411
15412				// the main loop to check
15413				loop = function(e) {
15414
15415					if (!active) {
15416						return;
15417					}
15418
15419					distX = img.width() - self._stageWidth;
15420					distY = img.height() - self._stageHeight;
15421					destX = x / self._stageWidth * distX * -1;
15422					destY = y / self._stageHeight * distY * -1;
15423					curX += ( destX - curX ) / self._options.imagePanSmoothness;
15424					curY += ( destY - curY ) / self._options.imagePanSmoothness;
15425
15426					position( distY, curY, 'Top' );
15427					position( distX, curX, 'Left' );
15428
15429				};
15430
15431			// we need to use scroll in IE8 to speed things up
15432			if ( IE === 8 ) {
15433
15434				img.parent().scrollTop( curY * -1 ).scrollLeft( curX * -1 );
15435				img.css({
15436					top: 0,
15437					left: 0
15438				});
15439
15440			}
15441
15442			// unbind and bind event
15443			this.$( 'stage' ).off( 'mousemove', calculate ).on( 'mousemove', calculate );
15444
15445			// loop the loop
15446			this.addTimer( 'pan' + self._id, loop, 50, true);
15447
15448			return this;
15449		},
15450
15451		/**
15452		 Brings the scope into any callback
15453
15454		 @param fn The callback to bring the scope into
15455		 @param [scope] Optional scope to bring
15456
15457		 @example $('#fullscreen').click( this.proxy(function() { this.enterFullscreen(); }) )
15458
15459		 @returns {Function} Return the callback with the gallery scope
15460		 */
15461
15462		proxy : function( fn, scope ) {
15463			if ( typeof fn !== 'function' ) {
15464				return F;
15465			}
15466			scope = scope || this;
15467			return function() {
15468				return fn.apply( scope, Utils.array( arguments ) );
15469			};
15470		},
15471
15472		/**
15473		 Tells you the theme name of the gallery
15474
15475		 @returns {String} theme name
15476		 */
15477
15478		getThemeName : function() {
15479			return this.theme.name;
15480		},
15481
15482		/**
15483		 Removes the panning effect set by addPan()
15484
15485		 @returns Instance
15486		 */
15487
15488		removePan: function() {
15489
15490			// todo: doublecheck IE8
15491
15492			this.$( 'stage' ).off( 'mousemove' );
15493
15494			this.clearTimer( 'pan' + this._id );
15495
15496			return this;
15497		},
15498
15499		/**
15500		 Adds an element to the Galleria DOM array.
15501		 When you add an element here, you can access it using element ID in many API calls
15502
15503		 @param {string} id The element ID you wish to use. You can add many elements by adding more arguments.
15504
15505		 @example addElement('mybutton');
15506		 @example addElement('mybutton','mylink');
15507
15508		 @returns Instance
15509		 */
15510
15511		addElement : function( id ) {
15512
15513			var dom = this._dom;
15514
15515			$.each( Utils.array(arguments), function( i, blueprint ) {
15516				dom[ blueprint ] = Utils.create( 'galleria-' + blueprint );
15517			});
15518
15519			return this;
15520		},
15521
15522		/**
15523		 Attach keyboard events to Galleria
15524
15525		 @param {Object} map The map object of events.
15526		 Possible keys are 'UP', 'DOWN', 'LEFT', 'RIGHT', 'RETURN', 'ESCAPE', 'BACKSPACE', and 'SPACE'.
15527
15528		 @example
15529
15530		 this.attachKeyboard({
15531    right: this.next,
15532    left: this.prev,
15533    up: function() {
15534        console.log( 'up key pressed' )
15535    }
15536});
15537
15538		 @returns Instance
15539		 */
15540
15541		attachKeyboard : function( map ) {
15542			this._keyboard.attach.apply( this._keyboard, Utils.array( arguments ) );
15543			return this;
15544		},
15545
15546		/**
15547		 Detach all keyboard events to Galleria
15548
15549		 @returns Instance
15550		 */
15551
15552		detachKeyboard : function() {
15553			this._keyboard.detach.apply( this._keyboard, Utils.array( arguments ) );
15554			return this;
15555		},
15556
15557		/**
15558		 Fast helper for appending galleria elements that you added using addElement()
15559
15560		 @param {string} parentID The parent element ID where the element will be appended
15561		 @param {string} childID the element ID that should be appended
15562
15563		 @example this.addElement('myElement');
15564		 this.appendChild( 'info', 'myElement' );
15565
15566		 @returns Instance
15567		 */
15568
15569		appendChild : function( parentID, childID ) {
15570			this.$( parentID ).append( this.get( childID ) || childID );
15571			return this;
15572		},
15573
15574		/**
15575		 Fast helper for prepending galleria elements that you added using addElement()
15576
15577		 @param {string} parentID The parent element ID where the element will be prepended
15578		 @param {string} childID the element ID that should be prepended
15579
15580		 @example
15581
15582		 this.addElement('myElement');
15583		 this.prependChild( 'info', 'myElement' );
15584
15585		 @returns Instance
15586		 */
15587
15588		prependChild : function( parentID, childID ) {
15589			this.$( parentID ).prepend( this.get( childID ) || childID );
15590			return this;
15591		},
15592
15593		/**
15594		 Remove an element by blueprint
15595
15596		 @param {string} elemID The element to be removed.
15597		 You can remove multiple elements by adding arguments.
15598
15599		 @returns Instance
15600		 */
15601
15602		remove : function( elemID ) {
15603			this.$( Utils.array( arguments ).join(',') ).remove();
15604			return this;
15605		},
15606
15607		// a fast helper for building dom structures
15608		// leave this out of the API for now
15609
15610		append : function( data ) {
15611			var i, j;
15612			for( i in data ) {
15613				if ( data.hasOwnProperty( i ) ) {
15614					if ( data[i].constructor === Array ) {
15615						for( j = 0; data[i][j]; j++ ) {
15616							this.appendChild( i, data[i][j] );
15617						}
15618					} else {
15619						this.appendChild( i, data[i] );
15620					}
15621				}
15622			}
15623			return this;
15624		},
15625
15626		// an internal helper for scaling according to options
15627		_scaleImage : function( image, options ) {
15628
15629			image = image || this._controls.getActive();
15630
15631			// janpub (JH) fix:
15632			// image might be unselected yet
15633			// e.g. when external logics rescales the gallery on window resize events
15634			if( !image ) {
15635				return;
15636			}
15637
15638			var complete,
15639
15640				scaleLayer = function( img ) {
15641					$( img.container ).children(':first').css({
15642						top: M.max(0, Utils.parseValue( img.image.style.top )),
15643						left: M.max(0, Utils.parseValue( img.image.style.left )),
15644						width: Utils.parseValue( img.image.width ),
15645						height: Utils.parseValue( img.image.height )
15646					});
15647				};
15648
15649			options = $.extend({
15650				width:       this._stageWidth,
15651				height:      this._stageHeight,
15652				crop:        this._options.imageCrop,
15653				max:         this._options.maxScaleRatio,
15654				min:         this._options.minScaleRatio,
15655				margin:      this._options.imageMargin,
15656				position:    this._options.imagePosition,
15657				iframelimit: this._options.maxVideoSize
15658			}, options );
15659
15660			if ( this._options.layerFollow && this._options.imageCrop !== true ) {
15661
15662				if ( typeof options.complete == 'function' ) {
15663					complete = options.complete;
15664					options.complete = function() {
15665						complete.call( image, image );
15666						scaleLayer( image );
15667					};
15668				} else {
15669					options.complete = scaleLayer;
15670				}
15671
15672			} else {
15673				$( image.container ).children(':first').css({ top: 0, left: 0 });
15674			}
15675
15676			image.scale( options );
15677			return this;
15678		},
15679
15680		/**
15681		 Updates the carousel,
15682		 useful if you resize the gallery and want to re-check if the carousel nav is needed.
15683
15684		 @returns Instance
15685		 */
15686
15687		updateCarousel : function() {
15688			this._carousel.update();
15689			return this;
15690		},
15691
15692		/**
15693		 Resize the entire gallery container
15694
15695		 @param {Object} [measures] Optional object with width/height specified
15696		 @param {Function} [complete] The callback to be called when the scaling is complete
15697
15698		 @returns Instance
15699		 */
15700
15701		resize : function( measures, complete ) {
15702
15703			if ( typeof measures == 'function' ) {
15704				complete = measures;
15705				measures = undef;
15706			}
15707
15708			measures = $.extend( { width:0, height:0 }, measures );
15709
15710			var self = this,
15711				$container = this.$( 'container' );
15712
15713			$.each( measures, function( m, val ) {
15714				if ( !val ) {
15715					$container[ m ]( 'auto' );
15716					measures[ m ] = self._getWH()[ m ];
15717				}
15718			});
15719
15720			$.each( measures, function( m, val ) {
15721				$container[ m ]( val );
15722			});
15723
15724			return this.rescale( complete );
15725
15726		},
15727
15728		/**
15729		 Rescales the gallery
15730
15731		 @param {number} width The target width
15732		 @param {number} height The target height
15733		 @param {Function} complete The callback to be called when the scaling is complete
15734
15735		 @returns Instance
15736		 */
15737
15738		rescale : function( width, height, complete ) {
15739
15740			var self = this;
15741
15742			// allow rescale(fn)
15743			if ( typeof width === 'function' ) {
15744				complete = width;
15745				width = undef;
15746			}
15747
15748			var scale = function() {
15749
15750				// set stagewidth
15751				self._stageWidth = width || self.$( 'stage' ).width();
15752				self._stageHeight = height || self.$( 'stage' ).height();
15753
15754				if ( self._options.swipe ) {
15755					$.each( self._controls.slides, function(i, img) {
15756						self._scaleImage( img );
15757						$( img.container ).css('left', self._stageWidth * i);
15758					});
15759					self.$('images').css('width', self._stageWidth * self.getDataLength());
15760				} else {
15761					// scale the active image
15762					self._scaleImage();
15763				}
15764
15765				if ( self._options.carousel ) {
15766					self.updateCarousel();
15767				}
15768
15769				var frame = self._controls.frames[ self._controls.active ];
15770
15771				if (frame) {
15772					self._controls.frames[ self._controls.active ].scale({
15773						width: self._stageWidth,
15774						height: self._stageHeight,
15775						iframelimit: self._options.maxVideoSize
15776					});
15777				}
15778
15779				self.trigger( Galleria.RESCALE );
15780
15781				if ( typeof complete === 'function' ) {
15782					complete.call( self );
15783				}
15784			};
15785
15786			scale.call( self );
15787
15788			return this;
15789		},
15790
15791		/**
15792		 Refreshes the gallery.
15793		 Useful if you change image options at runtime and want to apply the changes to the active image.
15794
15795		 @returns Instance
15796		 */
15797
15798		refreshImage : function() {
15799			this._scaleImage();
15800			if ( this._options.imagePan ) {
15801				this.addPan();
15802			}
15803			return this;
15804		},
15805
15806		_preload: function() {
15807			if ( this._options.preload ) {
15808				var p, i,
15809					n = this.getNext(),
15810					ndata;
15811				try {
15812					for ( i = this._options.preload; i > 0; i-- ) {
15813						p = new Galleria.Picture();
15814						ndata = this.getData( n );
15815						p.preload( this.isFullscreen() && ndata.big ? ndata.big : ndata.image );
15816						n = this.getNext( n );
15817					}
15818				} catch(e) {}
15819			}
15820		},
15821
15822		/**
15823		 Shows an image by index
15824
15825		 @param {number|boolean} index The index to show
15826		 @param {Boolean} rewind A boolean that should be true if you want the transition to go back
15827
15828		 @returns Instance
15829		 */
15830
15831		show : function( index, rewind, _history ) {
15832
15833			var swipe = this._options.swipe;
15834
15835			// do nothing queue is long || index is false || queue is false and transition is in progress
15836			if ( !swipe &&
15837				( this._queue.length > 3 || index === false || ( !this._options.queue && this._queue.stalled ) ) ) {
15838				return;
15839			}
15840
15841			index = M.max( 0, M.min( parseInt( index, 10 ), this.getDataLength() - 1 ) );
15842
15843			rewind = typeof rewind !== 'undefined' ? !!rewind : index < this.getIndex();
15844
15845			_history = _history || false;
15846
15847			// do the history thing and return
15848			if ( !_history && Galleria.History ) {
15849				Galleria.History.set( index.toString() );
15850				return;
15851			}
15852
15853			if ( this.finger && index !== this._active ) {
15854				this.finger.to = -( index*this.finger.width );
15855				this.finger.index = index;
15856			}
15857			this._active = index;
15858
15859			// we do things a bit simpler in swipe:
15860			if ( swipe ) {
15861
15862				var data = this.getData(index),
15863					self = this;
15864				if ( !data ) {
15865					return;
15866				}
15867
15868				var src = this.isFullscreen() && data.big ? data.big : ( data.image || data.iframe ),
15869					image = this._controls.slides[index],
15870					cached = image.isCached( src ),
15871					thumb = this._thumbnails[ index ];
15872
15873				var evObj = {
15874					cached: cached,
15875					index: index,
15876					rewind: rewind,
15877					imageTarget: image.image,
15878					thumbTarget: thumb.image,
15879					galleriaData: data
15880				};
15881
15882				this.trigger($.extend(evObj, {
15883					type: Galleria.LOADSTART
15884				}));
15885
15886				self.$('container').removeClass( 'videoplay' );
15887
15888				var complete = function() {
15889
15890					self._layers[index].innerHTML = self.getData().layer || '';
15891
15892					self.trigger($.extend(evObj, {
15893						type: Galleria.LOADFINISH
15894					}));
15895					self._playCheck();
15896				};
15897
15898				self._preload();
15899
15900				window.setTimeout(function() {
15901
15902					// load if not ready
15903					if ( !image.ready || $(image.image).attr('src') != src ) {
15904						if ( data.iframe && !data.image ) {
15905							image.isIframe = true;
15906						}
15907						image.load(src, function(image) {
15908							evObj.imageTarget = image.image;
15909							self._scaleImage(image, complete).trigger($.extend(evObj, {
15910								type: Galleria.IMAGE
15911							}));
15912							complete();
15913						});
15914					} else {
15915						self.trigger($.extend(evObj, {
15916							type: Galleria.IMAGE
15917						}));
15918						complete();
15919					}
15920				}, 100);
15921
15922			} else {
15923				protoArray.push.call( this._queue, {
15924					index : index,
15925					rewind : rewind
15926				});
15927				if ( !this._queue.stalled ) {
15928					this._show();
15929				}
15930			}
15931
15932			return this;
15933		},
15934
15935		// the internal _show method does the actual showing
15936		_show : function() {
15937
15938			// shortcuts
15939			var self = this,
15940				queue = this._queue[ 0 ],
15941				data = this.getData( queue.index );
15942
15943			if ( !data ) {
15944				return;
15945			}
15946
15947			var src = this.isFullscreen() && data.big ? data.big : ( data.image || data.iframe ),
15948				active = this._controls.getActive(),
15949				next = this._controls.getNext(),
15950				cached = next.isCached( src ),
15951				thumb = this._thumbnails[ queue.index ],
15952				mousetrigger = function() {
15953					$( next.image ).trigger( 'mouseup' );
15954				};
15955
15956			self.$('container').toggleClass('iframe', !!data.isIframe).removeClass( 'videoplay' );
15957
15958			// to be fired when loading & transition is complete:
15959			var complete = (function( data, next, active, queue, thumb ) {
15960
15961				return function() {
15962
15963					var win;
15964
15965					_transitions.active = false;
15966
15967					// optimize quality
15968					Utils.toggleQuality( next.image, self._options.imageQuality );
15969
15970					// remove old layer
15971					self._layers[ self._controls.active ].innerHTML = '';
15972
15973					// swap
15974					$( active.container ).css({
15975						zIndex: 0,
15976						opacity: 0
15977					}).show();
15978
15979					$( active.container ).find( 'iframe, .galleria-videoicon' ).remove();
15980					$( self._controls.frames[ self._controls.active ].container ).hide();
15981
15982					$( next.container ).css({
15983						zIndex: 1,
15984						left: 0,
15985						top: 0
15986					}).show();
15987
15988					self._controls.swap();
15989
15990					// add pan according to option
15991					if ( self._options.imagePan ) {
15992						self.addPan( next.image );
15993					}
15994
15995					// make the image clickable
15996					// order of precedence: iframe, link, lightbox, clicknext
15997					if ( ( data.iframe && data.image ) || data.link || self._options.lightbox || self._options.clicknext ) {
15998
15999						$( next.image ).css({
16000							cursor: 'pointer'
16001						}).on( 'mouseup', function( e ) {
16002
16003							// non-left click
16004							if ( typeof e.which == 'number' && e.which > 1 ) {
16005								return;
16006							}
16007
16008							// iframe / video
16009							if ( data.iframe ) {
16010
16011								if ( self.isPlaying() ) {
16012									self.pause();
16013								}
16014								var frame = self._controls.frames[ self._controls.active ],
16015									w = self._stageWidth,
16016									h = self._stageHeight;
16017
16018								$( frame.container ).css({
16019									width: w,
16020									height: h,
16021									opacity: 0
16022								}).show().animate({
16023									opacity: 1
16024								}, 200);
16025
16026								window.setTimeout(function() {
16027									frame.load( data.iframe + ( data.video ? '&autoplay=1' : '' ), {
16028										width: w,
16029										height: h
16030									}, function( frame ) {
16031										self.$( 'container' ).addClass( 'videoplay' );
16032										frame.scale({
16033											width: self._stageWidth,
16034											height: self._stageHeight,
16035											iframelimit: data.video ? self._options.maxVideoSize : undef
16036										});
16037									});
16038								}, 100);
16039
16040								return;
16041							}
16042
16043							// clicknext
16044							if ( self._options.clicknext && !Galleria.TOUCH ) {
16045								if ( self._options.pauseOnInteraction ) {
16046									self.pause();
16047								}
16048								self.next();
16049								return;
16050							}
16051
16052							// popup link
16053							if ( data.link ) {
16054								if ( self._options.popupLinks ) {
16055									win = window.open( data.link, '_blank' );
16056								} else {
16057									window.location.href = data.link;
16058								}
16059								return;
16060							}
16061
16062							if ( self._options.lightbox ) {
16063								self.openLightbox();
16064							}
16065
16066						});
16067					}
16068
16069					// check if we are playing
16070					self._playCheck();
16071
16072					// trigger IMAGE event
16073					self.trigger({
16074						type: Galleria.IMAGE,
16075						index: queue.index,
16076						imageTarget: next.image,
16077						thumbTarget: thumb.image,
16078						galleriaData: data
16079					});
16080
16081					// remove the queued image
16082					protoArray.shift.call( self._queue );
16083
16084					// remove stalled
16085					self._queue.stalled = false;
16086
16087					// if we still have images in the queue, show it
16088					if ( self._queue.length ) {
16089						self._show();
16090					}
16091
16092				};
16093			}( data, next, active, queue, thumb ));
16094
16095			// let the carousel follow
16096			if ( this._options.carousel && this._options.carouselFollow ) {
16097				this._carousel.follow( queue.index );
16098			}
16099
16100			// preload images
16101			self._preload();
16102
16103			// show the next image, just in case
16104			Utils.show( next.container );
16105
16106			next.isIframe = data.iframe && !data.image;
16107
16108			// add active classes
16109			$( self._thumbnails[ queue.index ].container )
16110				.addClass( 'active' )
16111				.siblings( '.active' )
16112				.removeClass( 'active' );
16113
16114			// trigger the LOADSTART event
16115			self.trigger( {
16116				type: Galleria.LOADSTART,
16117				cached: cached,
16118				index: queue.index,
16119				rewind: queue.rewind,
16120				imageTarget: next.image,
16121				thumbTarget: thumb.image,
16122				galleriaData: data
16123			});
16124
16125			// stall the queue
16126			self._queue.stalled = true;
16127
16128			// begin loading the next image
16129			next.load( src, function( next ) {
16130
16131				// add layer HTML
16132				var layer = $( self._layers[ 1-self._controls.active ] ).html( data.layer || '' ).hide();
16133
16134				self._scaleImage( next, {
16135
16136					complete: function( next ) {
16137
16138						// toggle low quality for IE
16139						if ( 'image' in active ) {
16140							Utils.toggleQuality( active.image, false );
16141						}
16142						Utils.toggleQuality( next.image, false );
16143
16144						// remove the image panning, if applied
16145						// TODO: rethink if this is necessary
16146						self.removePan();
16147
16148						// set the captions and counter
16149						self.setInfo( queue.index );
16150						self.setCounter( queue.index );
16151
16152						// show the layer now
16153						if ( data.layer ) {
16154							layer.show();
16155							// inherit click events set on image
16156							if ( ( data.iframe && data.image ) || data.link || self._options.lightbox || self._options.clicknext ) {
16157								layer.css( 'cursor', 'pointer' ).off( 'mouseup' ).mouseup( mousetrigger );
16158							}
16159						}
16160
16161						// add play icon
16162						if( data.video && data.image ) {
16163							_playIcon( next.container );
16164						}
16165
16166						var transition = self._options.transition;
16167
16168						// can JavaScript loop through objects in order? yes.
16169						$.each({
16170							initial: active.image === null,
16171							touch: Galleria.TOUCH,
16172							fullscreen: self.isFullscreen()
16173						}, function( type, arg ) {
16174							if ( arg && self._options[ type + 'Transition' ] !== undef ) {
16175								transition = self._options[ type + 'Transition' ];
16176								return false;
16177							}
16178						});
16179
16180						// validate the transition
16181						if ( transition in _transitions.effects === false ) {
16182							complete();
16183						} else {
16184							var params = {
16185								prev: active.container,
16186								next: next.container,
16187								rewind: queue.rewind,
16188								speed: self._options.transitionSpeed || 400
16189							};
16190
16191							_transitions.active = true;
16192
16193							// call the transition function and send some stuff
16194							_transitions.init.call( self, transition, params, complete );
16195
16196						}
16197
16198						// trigger the LOADFINISH event
16199						self.trigger({
16200							type: Galleria.LOADFINISH,
16201							cached: cached,
16202							index: queue.index,
16203							rewind: queue.rewind,
16204							imageTarget: next.image,
16205							thumbTarget: self._thumbnails[ queue.index ].image,
16206							galleriaData: self.getData( queue.index )
16207						});
16208					}
16209				});
16210			});
16211		},
16212
16213		/**
16214		 Gets the next index
16215
16216		 @param {number} [base] Optional starting point
16217
16218		 @returns {number} the next index, or the first if you are at the first (looping)
16219		 */
16220
16221		getNext : function( base ) {
16222			base = typeof base === 'number' ? base : this.getIndex();
16223			return base === this.getDataLength() - 1 ? 0 : base + 1;
16224		},
16225
16226		/**
16227		 Gets the previous index
16228
16229		 @param {number} [base] Optional starting point
16230
16231		 @returns {number} the previous index, or the last if you are at the first (looping)
16232		 */
16233
16234		getPrev : function( base ) {
16235			base = typeof base === 'number' ? base : this.getIndex();
16236			return base === 0 ? this.getDataLength() - 1 : base - 1;
16237		},
16238
16239		/**
16240		 Shows the next image in line
16241
16242		 @returns Instance
16243		 */
16244
16245		next : function() {
16246			if ( this.getDataLength() > 1 ) {
16247				this.show( this.getNext(), false );
16248			}
16249			return this;
16250		},
16251
16252		/**
16253		 Shows the previous image in line
16254
16255		 @returns Instance
16256		 */
16257
16258		prev : function() {
16259			if ( this.getDataLength() > 1 ) {
16260				this.show( this.getPrev(), true );
16261			}
16262			return this;
16263		},
16264
16265		/**
16266		 Retrieve a DOM element by element ID
16267
16268		 @param {string} elemId The delement ID to fetch
16269
16270		 @returns {HTMLElement} The elements DOM node or null if not found.
16271		 */
16272
16273		get : function( elemId ) {
16274			return elemId in this._dom ? this._dom[ elemId ] : null;
16275		},
16276
16277		/**
16278		 Retrieve a data object
16279
16280		 @param {number} index The data index to retrieve.
16281		 If no index specified it will take the currently active image
16282
16283		 @returns {Object} The data object
16284		 */
16285
16286		getData : function( index ) {
16287			return index in this._data ?
16288				this._data[ index ] : this._data[ this._active ];
16289		},
16290
16291		/**
16292		 Retrieve the number of data items
16293
16294		 @returns {number} The data length
16295		 */
16296		getDataLength : function() {
16297			return this._data.length;
16298		},
16299
16300		/**
16301		 Retrieve the currently active index
16302
16303		 @returns {number|boolean} The active index or false if none found
16304		 */
16305
16306		getIndex : function() {
16307			return typeof this._active === 'number' ? this._active : false;
16308		},
16309
16310		/**
16311		 Retrieve the stage height
16312
16313		 @returns {number} The stage height
16314		 */
16315
16316		getStageHeight : function() {
16317			return this._stageHeight;
16318		},
16319
16320		/**
16321		 Retrieve the stage width
16322
16323		 @returns {number} The stage width
16324		 */
16325
16326		getStageWidth : function() {
16327			return this._stageWidth;
16328		},
16329
16330		/**
16331		 Retrieve the option
16332
16333		 @param {string} key The option key to retrieve. If no key specified it will return all options in an object.
16334
16335		 @returns option or options
16336		 */
16337
16338		getOptions : function( key ) {
16339			return typeof key === 'undefined' ? this._options : this._options[ key ];
16340		},
16341
16342		/**
16343		 Set options to the instance.
16344		 You can set options using a key & value argument or a single object argument (see examples)
16345
16346		 @param {string} key The option key
16347		 @param {string} value the the options value
16348
16349		 @example setOptions( 'autoplay', true )
16350		 @example setOptions({ autoplay: true });
16351
16352		 @returns Instance
16353		 */
16354
16355		setOptions : function( key, value ) {
16356			if ( typeof key === 'object' ) {
16357				$.extend( this._options, key );
16358			} else {
16359				this._options[ key ] = value;
16360			}
16361			return this;
16362		},
16363
16364		/**
16365		 Starts playing the slideshow
16366
16367		 @param {number} delay Sets the slideshow interval in milliseconds.
16368		 If you set it once, you can just call play() and get the same interval the next time.
16369
16370		 @returns Instance
16371		 */
16372
16373		play : function( delay ) {
16374
16375			this._playing = true;
16376
16377			this._playtime = delay || this._playtime;
16378
16379			this._playCheck();
16380
16381			this.trigger( Galleria.PLAY );
16382
16383			return this;
16384		},
16385
16386		/**
16387		 Stops the slideshow if currently playing
16388
16389		 @returns Instance
16390		 */
16391
16392		pause : function() {
16393
16394			this._playing = false;
16395
16396			this.trigger( Galleria.PAUSE );
16397
16398			return this;
16399		},
16400
16401		/**
16402		 Toggle between play and pause events.
16403
16404		 @param {number} delay Sets the slideshow interval in milliseconds.
16405
16406		 @returns Instance
16407		 */
16408
16409		playToggle : function( delay ) {
16410			return ( this._playing ) ? this.pause() : this.play( delay );
16411		},
16412
16413		/**
16414		 Checks if the gallery is currently playing
16415
16416		 @returns {Boolean}
16417		 */
16418
16419		isPlaying : function() {
16420			return this._playing;
16421		},
16422
16423		/**
16424		 Checks if the gallery is currently in fullscreen mode
16425
16426		 @returns {Boolean}
16427		 */
16428
16429		isFullscreen : function() {
16430			return this._fullscreen.active;
16431		},
16432
16433		_playCheck : function() {
16434			var self = this,
16435				played = 0,
16436				interval = 20,
16437				now = Utils.timestamp(),
16438				timer_id = 'play' + this._id;
16439
16440			if ( this._playing ) {
16441
16442				this.clearTimer( timer_id );
16443
16444				var fn = function() {
16445
16446					played = Utils.timestamp() - now;
16447					if ( played >= self._playtime && self._playing ) {
16448						self.clearTimer( timer_id );
16449						self.next();
16450						return;
16451					}
16452					if ( self._playing ) {
16453
16454						// trigger the PROGRESS event
16455						self.trigger({
16456							type:         Galleria.PROGRESS,
16457							percent:      M.ceil( played / self._playtime * 100 ),
16458							seconds:      M.floor( played / 1000 ),
16459							milliseconds: played
16460						});
16461
16462						self.addTimer( timer_id, fn, interval );
16463					}
16464				};
16465				self.addTimer( timer_id, fn, interval );
16466			}
16467		},
16468
16469		/**
16470		 Modify the slideshow delay
16471
16472		 @param {number} delay the number of milliseconds between slides,
16473
16474		 @returns Instance
16475		 */
16476
16477		setPlaytime: function( delay ) {
16478			this._playtime = delay;
16479			return this;
16480		},
16481
16482		setIndex: function( val ) {
16483			this._active = val;
16484			return this;
16485		},
16486
16487		/**
16488		 Manually modify the counter
16489
16490		 @param {number} [index] Optional data index to fectch,
16491		 if no index found it assumes the currently active index
16492
16493		 @returns Instance
16494		 */
16495
16496		setCounter: function( index ) {
16497
16498			if ( typeof index === 'number' ) {
16499				index++;
16500			} else if ( typeof index === 'undefined' ) {
16501				index = this.getIndex()+1;
16502			}
16503
16504			this.get( 'current' ).innerHTML = index;
16505
16506			if ( IE ) { // weird IE bug
16507
16508				var count = this.$( 'counter' ),
16509					opacity = count.css( 'opacity' );
16510
16511				if ( parseInt( opacity, 10 ) === 1) {
16512					Utils.removeAlpha( count[0] );
16513				} else {
16514					this.$( 'counter' ).css( 'opacity', opacity );
16515				}
16516
16517			}
16518
16519			return this;
16520		},
16521
16522		/**
16523		 Manually set captions
16524
16525		 @param {number} [index] Optional data index to fectch and apply as caption,
16526		 if no index found it assumes the currently active index
16527
16528		 @returns Instance
16529		 */
16530
16531		setInfo : function( index ) {
16532
16533			var self = this,
16534				data = this.getData( index );
16535
16536			$.each( ['title','description'], function( i, type ) {
16537
16538				var elem = self.$( 'info-' + type );
16539
16540				if ( !!data[type] ) {
16541					elem[ data[ type ].length ? 'show' : 'hide' ]().html( data[ type ] );
16542				} else {
16543					elem.empty().hide();
16544				}
16545			});
16546
16547			return this;
16548		},
16549
16550		/**
16551		 Checks if the data contains any captions
16552
16553		 @param {number} [index] Optional data index to fectch,
16554		 if no index found it assumes the currently active index.
16555
16556		 @returns {boolean}
16557		 */
16558
16559		hasInfo : function( index ) {
16560
16561			var check = 'title description'.split(' '),
16562				i;
16563
16564			for ( i = 0; check[i]; i++ ) {
16565				if ( !!this.getData( index )[ check[i] ] ) {
16566					return true;
16567				}
16568			}
16569			return false;
16570
16571		},
16572
16573		jQuery : function( str ) {
16574
16575			var self = this,
16576				ret = [];
16577
16578			$.each( str.split(','), function( i, elemId ) {
16579				elemId = $.trim( elemId );
16580
16581				if ( self.get( elemId ) ) {
16582					ret.push( elemId );
16583				}
16584			});
16585
16586			var jQ = $( self.get( ret.shift() ) );
16587
16588			$.each( ret, function( i, elemId ) {
16589				jQ = jQ.add( self.get( elemId ) );
16590			});
16591
16592			return jQ;
16593
16594		},
16595
16596		/**
16597		 Converts element IDs into a jQuery collection
16598		 You can call for multiple IDs separated with commas.
16599
16600		 @param {string} str One or more element IDs (comma-separated)
16601
16602		 @returns jQuery
16603
16604		 @example this.$('info,container').hide();
16605		 */
16606
16607		$ : function( str ) {
16608			return this.jQuery.apply( this, Utils.array( arguments ) );
16609		}
16610
16611	};
16612
16613// End of Galleria prototype
16614
16615// Add events as static variables
16616	$.each( _events, function( i, ev ) {
16617
16618		// legacy events
16619		var type = /_/.test( ev ) ? ev.replace( /_/g, '' ) : ev;
16620
16621		Galleria[ ev.toUpperCase() ] = 'galleria.'+type;
16622
16623	} );
16624
16625	$.extend( Galleria, {
16626
16627		// Browser helpers
16628		IE9:     IE === 9,
16629		IE8:     IE === 8,
16630		IE7:     IE === 7,
16631		IE6:     IE === 6,
16632		IE:      IE,
16633		WEBKIT:  /webkit/.test( NAV ),
16634		CHROME:  /chrome/.test( NAV ),
16635		SAFARI:  /safari/.test( NAV ) && !(/chrome/.test( NAV )),
16636		QUIRK:   ( IE && doc.compatMode && doc.compatMode === "BackCompat" ),
16637		MAC:     /mac/.test( navigator.platform.toLowerCase() ),
16638		OPERA:   !!window.opera,
16639		IPHONE:  /iphone/.test( NAV ),
16640		IPAD:    /ipad/.test( NAV ),
16641		ANDROID: /android/.test( NAV ),
16642		TOUCH:   ( 'ontouchstart' in doc ) && MOBILE // rule out false positives on Win10
16643
16644	});
16645
16646// Galleria static methods
16647
16648	/**
16649	 Adds a theme that you can use for your Gallery
16650
16651	 @param {Object} theme Object that should contain all your theme settings.
16652	 <ul>
16653	 <li>name - name of the theme</li>
16654	 <li>author - name of the author</li>
16655	 <li>css - css file name (not path)</li>
16656	 <li>defaults - default options to apply, including theme-specific options</li>
16657	 <li>init - the init function</li>
16658	 </ul>
16659
16660	 @returns {Object} theme
16661	 */
16662
16663	Galleria.addTheme = function( theme ) {
16664
16665		// make sure we have a name
16666		if ( !theme.name ) {
16667			Galleria.raise('No theme name specified');
16668		}
16669
16670		// make sure it's compatible
16671		if ( !theme.version || parseInt(Galleria.version*10) > parseInt(theme.version*10) ) {
16672			Galleria.raise('This version of Galleria requires '+theme.name+' theme version '+parseInt(Galleria.version*10)/10+' or later', true);
16673		}
16674
16675		if ( typeof theme.defaults !== 'object' ) {
16676			theme.defaults = {};
16677		} else {
16678			theme.defaults = _legacyOptions( theme.defaults );
16679		}
16680
16681		var css = false,
16682			reg, reg2;
16683
16684		if ( typeof theme.css === 'string' ) {
16685
16686			// look for manually added CSS
16687			$('link').each(function( i, link ) {
16688				reg = new RegExp( theme.css );
16689				if ( reg.test( link.href ) ) {
16690
16691					// we found the css
16692					css = true;
16693
16694					// the themeload trigger
16695					_themeLoad( theme );
16696
16697					return false;
16698				}
16699			});
16700
16701			// else look for the absolute path and load the CSS dynamic
16702			if ( !css ) {
16703
16704
16705				$(function() {
16706					// Try to determine the css-path from the theme script.
16707					// In IE8/9, the script-dom-element seems to be not present
16708					// at once, if galleria itself is inserted into the dom
16709					// dynamically. We therefore try multiple times before raising
16710					// an error.
16711					var retryCount = 0;
16712					var tryLoadCss = function() {
16713						$('script').each(function (i, script) {
16714							// look for the theme script
16715							reg = new RegExp('galleria\\.' + theme.name.toLowerCase() + '\\.');
16716							reg2 = new RegExp('galleria\\.io\\/theme\\/' + theme.name.toLowerCase() + '\\/(\\d*\\.*)?(\\d*\\.*)?(\\d*\\/)?js');
16717							if (reg.test(script.src) || reg2.test(script.src)) {
16718								// we have a match
16719								css = script.src.replace(/[^\/]*$/, '') + theme.css;
16720
16721								window.setTimeout(function () {
16722									Utils.loadCSS(css, 'galleria-theme-'+theme.name, function () {
16723
16724										// run galleries with this theme
16725										_themeLoad(theme);
16726
16727									});
16728								}, 1);
16729							}
16730						});
16731						if (!css) {
16732							if (retryCount++ > 5) {
16733								Galleria.raise('No theme CSS loaded');
16734							} else {
16735								window.setTimeout(tryLoadCss, 500);
16736							}
16737						}
16738					};
16739					tryLoadCss();
16740				});
16741			}
16742
16743		} else {
16744
16745			// pass
16746			_themeLoad( theme );
16747		}
16748		return theme;
16749	};
16750
16751	/**
16752	 loadTheme loads a theme js file and attaches a load event to Galleria
16753
16754	 @param {string} src The relative path to the theme source file
16755
16756	 @param {Object} [options] Optional options you want to apply
16757
16758	 @returns Galleria
16759	 */
16760
16761	Galleria.loadTheme = function( src, options ) {
16762
16763		// Don't load if theme is already loaded
16764		if( $('script').filter(function() { return $(this).attr('src') == src; }).length ) {
16765			return;
16766		}
16767
16768		var loaded = false,
16769			err;
16770
16771		// start listening for the timeout onload
16772		$( window ).on('load', function() {
16773			if ( !loaded ) {
16774				// give it another 20 seconds
16775				err = window.setTimeout(function() {
16776					if ( !loaded ) {
16777						Galleria.raise( "Galleria had problems loading theme at " + src + ". Please check theme path or load manually.", true );
16778					}
16779				}, 20000);
16780			}
16781		});
16782
16783		// load the theme
16784		Utils.loadScript( src, function() {
16785			loaded = true;
16786			window.clearTimeout( err );
16787		});
16788
16789		return Galleria;
16790	};
16791
16792	/**
16793	 Retrieves a Galleria instance.
16794
16795	 @param {number} [index] Optional index to retrieve.
16796	 If no index is supplied, the method will return all instances in an array.
16797
16798	 @returns Instance or Array of instances
16799	 */
16800
16801	Galleria.get = function( index ) {
16802		if ( !!_instances[ index ] ) {
16803			return _instances[ index ];
16804		} else if ( typeof index !== 'number' ) {
16805			return _instances;
16806		} else {
16807			Galleria.raise('Gallery index ' + index + ' not found');
16808		}
16809	};
16810
16811	/**
16812
16813	 Configure Galleria options via a static function.
16814	 The options will be applied to all instances
16815
16816	 @param {string|object} key The options to apply or a key
16817
16818	 @param [value] If key is a string, this is the value
16819
16820	 @returns Galleria
16821
16822	 */
16823
16824	Galleria.configure = function( key, value ) {
16825
16826		var opts = {};
16827
16828		if( typeof key == 'string' && value ) {
16829			opts[key] = value;
16830			key = opts;
16831		} else {
16832			$.extend( opts, key );
16833		}
16834
16835		Galleria.configure.options = opts;
16836
16837		$.each( Galleria.get(), function(i, instance) {
16838			instance.setOptions( opts );
16839		});
16840
16841		return Galleria;
16842	};
16843
16844	Galleria.configure.options = {};
16845
16846	/**
16847
16848	 Bind a Galleria event to the gallery
16849
16850	 @param {string} type A string representing the galleria event
16851
16852	 @param {function} callback The function that should run when the event is triggered
16853
16854	 @returns Galleria
16855
16856	 */
16857
16858	Galleria.on = function( type, callback ) {
16859		if ( !type ) {
16860			return;
16861		}
16862
16863		callback = callback || F;
16864
16865		// hash the bind
16866		var hash = type + callback.toString().replace(/\s/g,'') + Utils.timestamp();
16867
16868		// for existing instances
16869		$.each( Galleria.get(), function(i, instance) {
16870			instance._binds.push( hash );
16871			instance.bind( type, callback );
16872		});
16873
16874		// for future instances
16875		Galleria.on.binds.push({
16876			type: type,
16877			callback: callback,
16878			hash: hash
16879		});
16880
16881		return Galleria;
16882	};
16883
16884	Galleria.on.binds = [];
16885
16886	/**
16887
16888	 Run Galleria
16889	 Alias for $(selector).galleria(options)
16890
16891	 @param {string} selector A selector of element(s) to intialize galleria to
16892
16893	 @param {object} options The options to apply
16894
16895	 @returns Galleria
16896
16897	 */
16898
16899	Galleria.run = function( selector, options ) {
16900		if ( $.isFunction( options ) ) {
16901			options = { extend: options };
16902		}
16903		$( selector || '#galleria' ).galleria( options );
16904		return Galleria;
16905	};
16906
16907	/**
16908	 Creates a transition to be used in your gallery
16909
16910	 @param {string} name The name of the transition that you will use as an option
16911
16912	 @param {Function} fn The function to be executed in the transition.
16913	 The function contains two arguments, params and complete.
16914	 Use the params Object to integrate the transition, and then call complete when you are done.
16915
16916	 @returns Galleria
16917
16918	 */
16919
16920	Galleria.addTransition = function( name, fn ) {
16921		_transitions.effects[name] = fn;
16922		return Galleria;
16923	};
16924
16925	/**
16926	 The Galleria utilites
16927	 */
16928
16929	Galleria.utils = Utils;
16930
16931	/**
16932	 A helper metod for cross-browser logging.
16933	 It uses the console log if available otherwise it falls back to alert
16934
16935	 @example Galleria.log("hello", document.body, [1,2,3]);
16936	 */
16937
16938	Galleria.log = function() {
16939		var args = Utils.array( arguments );
16940		if( 'console' in window && 'log' in window.console ) {
16941			try {
16942				return window.console.log.apply( window.console, args );
16943			} catch( e ) {
16944				$.each( args, function() {
16945					window.console.log(this);
16946				});
16947			}
16948		} else {
16949			return window.alert( args.join('<br>') );
16950		}
16951	};
16952
16953	/**
16954	 A ready method for adding callbacks when a gallery is ready
16955	 Each method is call before the extend option for every instance
16956
16957	 @param {function} callback The function to call
16958
16959	 @returns Galleria
16960	 */
16961
16962	Galleria.ready = function( fn ) {
16963		if ( typeof fn != 'function' ) {
16964			return Galleria;
16965		}
16966		$.each( _galleries, function( i, gallery ) {
16967			fn.call( gallery, gallery._options );
16968		});
16969		Galleria.ready.callbacks.push( fn );
16970		return Galleria;
16971	};
16972
16973	Galleria.ready.callbacks = [];
16974
16975	/**
16976	 Method for raising errors
16977
16978	 @param {string} msg The message to throw
16979
16980	 @param {boolean} [fatal] Set this to true to override debug settings and display a fatal error
16981	 */
16982
16983	Galleria.raise = function( msg, fatal ) {
16984
16985		var type = fatal ? 'Fatal error' : 'Error',
16986
16987			css = {
16988				color: '#fff',
16989				position: 'absolute',
16990				top: 0,
16991				left: 0,
16992				zIndex: 100000
16993			},
16994
16995			echo = function( msg ) {
16996
16997				var html = '<div style="padding:4px;margin:0 0 2px;background:#' +
16998					( fatal ? '811' : '222' ) + ';">' +
16999					( fatal ? '<strong>' + type + ': </strong>' : '' ) +
17000					msg + '</div>';
17001
17002				$.each( _instances, function() {
17003
17004					var cont = this.$( 'errors' ),
17005						target = this.$( 'target' );
17006
17007					if ( !cont.length ) {
17008
17009						target.css( 'position', 'relative' );
17010
17011						cont = this.addElement( 'errors' ).appendChild( 'target', 'errors' ).$( 'errors' ).css(css);
17012					}
17013					cont.append( html );
17014
17015				});
17016
17017				if ( !_instances.length ) {
17018					$('<div>').css( $.extend( css, { position: 'fixed' } ) ).append( html ).appendTo( DOM().body );
17019				}
17020			};
17021
17022		// if debug is on, display errors and throw exception if fatal
17023		if ( DEBUG ) {
17024			echo( msg );
17025			if ( fatal ) {
17026				throw new Error(type + ': ' + msg);
17027			}
17028
17029			// else just echo a silent generic error if fatal
17030		} else if ( fatal ) {
17031			if ( _hasError ) {
17032				return;
17033			}
17034			_hasError = true;
17035			fatal = false;
17036			echo( 'Gallery could not load.' );
17037		}
17038	};
17039
17040// Add the version
17041	Galleria.version = VERSION;
17042
17043	Galleria.getLoadedThemes = function() {
17044		return $.map(_loadedThemes, function(theme) {
17045			return theme.name;
17046		});
17047	};
17048
17049	/**
17050	 A method for checking what version of Galleria the user has installed and throws a readable error if the user needs to upgrade.
17051	 Useful when building plugins that requires a certain version to function.
17052
17053	 @param {number} version The minimum version required
17054
17055	 @param {string} [msg] Optional message to display. If not specified, Galleria will throw a generic error.
17056
17057	 @returns Galleria
17058	 */
17059
17060	Galleria.requires = function( version, msg ) {
17061		msg = msg || 'You need to upgrade Galleria to version ' + version + ' to use one or more components.';
17062		if ( Galleria.version < version ) {
17063			Galleria.raise(msg, true);
17064		}
17065		return Galleria;
17066	};
17067
17068	/**
17069	 Adds preload, cache, scale and crop functionality
17070
17071	 @constructor
17072
17073	 @requires jQuery
17074
17075	 @param {number} [id] Optional id to keep track of instances
17076	 */
17077
17078	Galleria.Picture = function( id ) {
17079
17080		// save the id
17081		this.id = id || null;
17082
17083		// the image should be null until loaded
17084		this.image = null;
17085
17086		// Create a new container
17087		this.container = Utils.create('galleria-image');
17088
17089		// add container styles
17090		$( this.container ).css({
17091			overflow: 'hidden',
17092			position: 'relative' // for IE Standards mode
17093		});
17094
17095		// saves the original measurements
17096		this.original = {
17097			width: 0,
17098			height: 0
17099		};
17100
17101		// flag when the image is ready
17102		this.ready = false;
17103
17104		// flag for iframe Picture
17105		this.isIframe = false;
17106
17107	};
17108
17109	Galleria.Picture.prototype = {
17110
17111		// the inherited cache object
17112		cache: {},
17113
17114		// show the image on stage
17115		show: function() {
17116			Utils.show( this.image );
17117		},
17118
17119		// hide the image
17120		hide: function() {
17121			Utils.moveOut( this.image );
17122		},
17123
17124		clear: function() {
17125			this.image = null;
17126		},
17127
17128		/**
17129		 Checks if an image is in cache
17130
17131		 @param {string} src The image source path, ex '/path/to/img.jpg'
17132
17133		 @returns {boolean}
17134		 */
17135
17136		isCached: function( src ) {
17137			return !!this.cache[src];
17138		},
17139
17140		/**
17141		 Preloads an image into the cache
17142
17143		 @param {string} src The image source path, ex '/path/to/img.jpg'
17144
17145		 @returns Galleria.Picture
17146		 */
17147
17148		preload: function( src ) {
17149			$( new Image() ).on( 'load', (function(src, cache) {
17150				return function() {
17151					cache[ src ] = src;
17152				};
17153			}( src, this.cache ))).attr( 'src', src );
17154		},
17155
17156		/**
17157		 Loads an image and call the callback when ready.
17158		 Will also add the image to cache.
17159
17160		 @param {string} src The image source path, ex '/path/to/img.jpg'
17161		 @param {Object} [size] The forced size of the image, defined as an object { width: xx, height:xx }
17162		 @param {Function} callback The function to be executed when the image is loaded & scaled
17163
17164		 @returns The image container (jQuery object)
17165		 */
17166
17167		load: function(src, size, callback) {
17168
17169			if ( typeof size == 'function' ) {
17170				callback = size;
17171				size = null;
17172			}
17173
17174			if( this.isIframe ) {
17175				var id = 'if'+new Date().getTime();
17176
17177				var iframe = this.image = $('<iframe>', {
17178					src: src,
17179					frameborder: 0,
17180					id: id,
17181					allowfullscreen: true,
17182					css: { visibility: 'hidden' }
17183				})[0];
17184
17185				if ( size ) {
17186					$( iframe ).css( size );
17187				}
17188
17189				$( this.container ).find( 'iframe,img' ).remove();
17190
17191				this.container.appendChild( this.image );
17192
17193				$('#'+id).on( 'load', (function( self, callback ) {
17194					return function() {
17195						window.setTimeout(function() {
17196							$( self.image ).css( 'visibility', 'visible' );
17197							if( typeof callback == 'function' ) {
17198								callback.call( self, self );
17199							}
17200						}, 10);
17201					};
17202				}( this, callback )));
17203
17204				return this.container;
17205			}
17206
17207			this.image = new Image();
17208
17209			// IE8 opacity inherit bug
17210			if ( Galleria.IE8 ) {
17211				$( this.image ).css( 'filter', 'inherit' );
17212			}
17213
17214			// FF shaking images bug:
17215			// http://support.galleria.io/discussions/problems/12245-shaking-photos
17216			if ( !Galleria.IE && !Galleria.CHROME && !Galleria.SAFARI ) {
17217				$( this.image ).css( 'image-rendering', 'optimizequality' );
17218			}
17219
17220			var reload = false,
17221				resort = false,
17222
17223				// some jquery cache
17224				$container = $( this.container ),
17225				$image = $( this.image ),
17226
17227				onerror = function() {
17228					if ( !reload ) {
17229						reload = true;
17230						// reload the image with a timestamp
17231						window.setTimeout((function(image, src) {
17232							return function() {
17233								image.attr('src', src + (src.indexOf('?') > -1 ? '&' : '?') + Utils.timestamp() );
17234							};
17235						}( $(this), src )), 50);
17236					} else {
17237						// apply the dummy image if it exists
17238						if ( DUMMY ) {
17239							$( this ).attr( 'src', DUMMY );
17240						} else {
17241							Galleria.raise('Image not found: ' + src);
17242						}
17243					}
17244				},
17245
17246				// the onload method
17247				onload = (function( self, callback, src ) {
17248
17249					return function() {
17250
17251						var complete = function() {
17252
17253							$( this ).off( 'load' );
17254
17255							// save the original size
17256							self.original = size || {
17257								height: this.height,
17258								width: this.width
17259							};
17260
17261							// translate3d if needed
17262							if ( Galleria.HAS3D ) {
17263								this.style.MozTransform = this.style.webkitTransform = 'translate3d(0,0,0)';
17264							}
17265
17266							$container.append( this );
17267
17268							self.cache[ src ] = src; // will override old cache
17269
17270							if (typeof callback == 'function' ) {
17271								window.setTimeout(function() {
17272									callback.call( self, self );
17273								},1);
17274							}
17275						};
17276
17277						// Delay the callback to "fix" the Adblock Bug
17278						// http://code.google.com/p/adblockforchrome/issues/detail?id=3701
17279						if ( ( !this.width || !this.height ) ) {
17280							(function( img ) {
17281								Utils.wait({
17282									until: function() {
17283										return img.width && img.height;
17284									},
17285									success: function() {
17286										complete.call( img );
17287									},
17288									error: function() {
17289										if ( !resort ) {
17290											$(new Image()).on( 'load', onload ).attr( 'src', img.src );
17291											resort = true;
17292										} else {
17293											Galleria.raise('Could not extract width/height from image: ' + img.src +
17294												'. Traced measures: width:' + img.width + 'px, height: ' + img.height + 'px.');
17295										}
17296									},
17297									timeout: 100
17298								});
17299							}( this ));
17300						} else {
17301							complete.call( this );
17302						}
17303					};
17304				}( this, callback, src ));
17305
17306			// remove any previous images
17307			$container.find( 'iframe,img' ).remove();
17308
17309			// append the image
17310			$image.css( 'display', 'block');
17311
17312			// hide it for now
17313			Utils.hide( this.image );
17314
17315			// remove any max/min scaling
17316			$.each('minWidth minHeight maxWidth maxHeight'.split(' '), function(i, prop) {
17317				$image.css(prop, (/min/.test(prop) ? '0' : 'none'));
17318			});
17319
17320			// begin load and insert in cache when done
17321			$image.on( 'load', onload ).on( 'error', onerror ).attr( 'src', src );
17322
17323			// return the container
17324			return this.container;
17325		},
17326
17327		/**
17328		 Scales and crops the image
17329
17330		 @param {Object} options The method takes an object with a number of options:
17331
17332		 <ul>
17333		 <li>width - width of the container</li>
17334		 <li>height - height of the container</li>
17335		 <li>min - minimum scale ratio</li>
17336		 <li>max - maximum scale ratio</li>
17337		 <li>margin - distance in pixels from the image border to the container</li>
17338		 <li>complete - a callback that fires when scaling is complete</li>
17339		 <li>position - positions the image, works like the css background-image property.</li>
17340		 <li>crop - defines how to crop. Can be true, false, 'width' or 'height'</li>
17341		 <li>canvas - set to true to try a canvas-based rescale</li>
17342		 </ul>
17343
17344		 @returns The image container object (jQuery)
17345		 */
17346
17347		scale: function( options ) {
17348
17349			var self = this;
17350
17351			// extend some defaults
17352			options = $.extend({
17353				width: 0,
17354				height: 0,
17355				min: undef,
17356				max: undef,
17357				margin: 0,
17358				complete: F,
17359				position: 'center',
17360				crop: false,
17361				canvas: false,
17362				iframelimit: undef
17363			}, options);
17364
17365			if( this.isIframe ) {
17366
17367				var cw = options.width,
17368					ch = options.height,
17369					nw, nh;
17370				if ( options.iframelimit ) {
17371					var r = M.min( options.iframelimit/cw, options.iframelimit/ch );
17372					if ( r < 1 ) {
17373						nw = cw * r;
17374						nh = ch * r;
17375
17376						$( this.image ).css({
17377							top: ch/2-nh/2,
17378							left: cw/2-nw/2,
17379							position: 'absolute'
17380						});
17381					} else {
17382						$( this.image ).css({
17383							top: 0,
17384							left: 0
17385						});
17386					}
17387				}
17388				$( this.image ).width( nw || cw ).height( nh || ch ).removeAttr( 'width' ).removeAttr( 'height' );
17389				$( this.container ).width( cw ).height( ch );
17390				options.complete.call(self, self);
17391				try {
17392					if( this.image.contentWindow ) {
17393						$( this.image.contentWindow ).trigger('resize');
17394					}
17395				} catch(e) {}
17396				return this.container;
17397
17398			}
17399
17400			// return the element if no image found
17401			if (!this.image) {
17402				return this.container;
17403			}
17404
17405			// store locale variables
17406			var width,
17407				height,
17408				$container = $( self.container ),
17409				data;
17410
17411			// wait for the width/height
17412			Utils.wait({
17413				until: function() {
17414					width  = options.width ||
17415						$container.width() ||
17416						Utils.parseValue( $container.css('width') );
17417
17418					height = options.height ||
17419						$container.height() ||
17420						Utils.parseValue( $container.css('height') );
17421
17422					return width && height;
17423				},
17424				success: function() {
17425
17426					// calculate some cropping
17427					var newWidth = ( width - options.margin * 2 ) / self.original.width,
17428						newHeight = ( height - options.margin * 2 ) / self.original.height,
17429						min = M.min( newWidth, newHeight ),
17430						max = M.max( newWidth, newHeight ),
17431						cropMap = {
17432							'true'  : max,
17433							'width' : newWidth,
17434							'height': newHeight,
17435							'false' : min,
17436							'landscape': self.original.width > self.original.height ? max : min,
17437							'portrait': self.original.width < self.original.height ? max : min
17438						},
17439						ratio = cropMap[ options.crop.toString() ],
17440						canvasKey = '';
17441
17442					// allow maxScaleRatio
17443					if ( options.max ) {
17444						ratio = M.min( options.max, ratio );
17445					}
17446
17447					// allow minScaleRatio
17448					if ( options.min ) {
17449						ratio = M.max( options.min, ratio );
17450					}
17451
17452					$.each( ['width','height'], function( i, m ) {
17453						$( self.image )[ m ]( self[ m ] = self.image[ m ] = M.round( self.original[ m ] * ratio ) );
17454					});
17455
17456					$( self.container ).width( width ).height( height );
17457
17458					if ( options.canvas && _canvas ) {
17459
17460						_canvas.elem.width = self.width;
17461						_canvas.elem.height = self.height;
17462
17463						canvasKey = self.image.src + ':' + self.width + 'x' + self.height;
17464
17465						self.image.src = _canvas.cache[ canvasKey ] || (function( key ) {
17466
17467							_canvas.context.drawImage(self.image, 0, 0, self.original.width*ratio, self.original.height*ratio);
17468
17469							try {
17470
17471								data = _canvas.elem.toDataURL();
17472								_canvas.length += data.length;
17473								_canvas.cache[ key ] = data;
17474								return data;
17475
17476							} catch( e ) {
17477								return self.image.src;
17478							}
17479
17480						}( canvasKey ) );
17481
17482					}
17483
17484					// calculate image_position
17485					var pos = {},
17486						mix = {},
17487						getPosition = function(value, measure, margin) {
17488							var result = 0;
17489							if (/\%/.test(value)) {
17490								var flt = parseInt( value, 10 ) / 100,
17491									m = self.image[ measure ] || $( self.image )[ measure ]();
17492
17493								result = M.ceil( m * -1 * flt + margin * flt );
17494							} else {
17495								result = Utils.parseValue( value );
17496							}
17497							return result;
17498						},
17499						positionMap = {
17500							'top': { top: 0 },
17501							'left': { left: 0 },
17502							'right': { left: '100%' },
17503							'bottom': { top: '100%' }
17504						};
17505
17506					$.each( options.position.toLowerCase().split(' '), function( i, value ) {
17507						if ( value === 'center' ) {
17508							value = '50%';
17509						}
17510						pos[i ? 'top' : 'left'] = value;
17511					});
17512
17513					$.each( pos, function( i, value ) {
17514						if ( positionMap.hasOwnProperty( value ) ) {
17515							$.extend( mix, positionMap[ value ] );
17516						}
17517					});
17518
17519					pos = pos.top ? $.extend( pos, mix ) : mix;
17520
17521					pos = $.extend({
17522						top: '50%',
17523						left: '50%'
17524					}, pos);
17525
17526					// apply position
17527					$( self.image ).css({
17528						position : 'absolute',
17529						top :  getPosition(pos.top, 'height', height),
17530						left : getPosition(pos.left, 'width', width)
17531					});
17532
17533					// show the image
17534					self.show();
17535
17536					// flag ready and call the callback
17537					self.ready = true;
17538					options.complete.call( self, self );
17539
17540				},
17541				error: function() {
17542					Galleria.raise('Could not scale image: '+self.image.src);
17543				},
17544				timeout: 1000
17545			});
17546			return this;
17547		}
17548	};
17549
17550// our own easings
17551	$.extend( $.easing, {
17552
17553		galleria: function (_, t, b, c, d) {
17554			if ((t/=d/2) < 1) {
17555				return c/2*t*t*t + b;
17556			}
17557			return c/2*((t-=2)*t*t + 2) + b;
17558		},
17559
17560		galleriaIn: function (_, t, b, c, d) {
17561			return c*(t/=d)*t + b;
17562		},
17563
17564		galleriaOut: function (_, t, b, c, d) {
17565			return -c *(t/=d)*(t-2) + b;
17566		}
17567
17568	});
17569
17570
17571// Forked version of Ainos Finger.js for native-style touch
17572
17573	Galleria.Finger = (function() {
17574
17575		var abs = M.abs;
17576
17577		// test for translate3d support
17578		var has3d = Galleria.HAS3D = (function() {
17579
17580			var el = doc.createElement('p'),
17581				has3d,
17582				t = ['webkit','O','ms','Moz',''],
17583				s,
17584				i=0,
17585				a = 'transform';
17586
17587			DOM().html.insertBefore(el, null);
17588
17589			for (; t[i]; i++) {
17590				s = t[i] ? t[i]+'Transform' : a;
17591				if (el.style[s] !== undefined) {
17592					el.style[s] = "translate3d(1px,1px,1px)";
17593					has3d = $(el).css(t[i] ? '-'+t[i].toLowerCase()+'-'+a : a);
17594				}
17595			}
17596
17597			DOM().html.removeChild(el);
17598			return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
17599		}());
17600
17601		// request animation shim
17602		var requestFrame = (function(){
17603			var r = 'RequestAnimationFrame';
17604			return window.requestAnimationFrame ||
17605				window['webkit'+r] ||
17606				window['moz'+r] ||
17607				window['o'+r] ||
17608				window['ms'+r] ||
17609				function( callback ) {
17610					window.setTimeout(callback, 1000 / 60);
17611				};
17612		}());
17613
17614		var Finger = function(elem, options) {
17615
17616			// default options
17617			this.config = {
17618				start: 0,
17619				duration: 500,
17620				onchange: function() {},
17621				oncomplete: function() {},
17622				easing: function(x,t,b,c,d) {
17623					return -c * ((t=t/d-1)*t*t*t - 1) + b; // easeOutQuart
17624				}
17625			};
17626
17627			this.easeout = function (x, t, b, c, d) {
17628				return c*((t=t/d-1)*t*t*t*t + 1) + b;
17629			};
17630
17631			if ( !elem.children.length ) {
17632				return;
17633			}
17634
17635			var self = this;
17636
17637			// extend options
17638			$.extend(this.config, options);
17639
17640			this.elem = elem;
17641			this.child = elem.children[0];
17642			this.to = this.pos = 0;
17643			this.touching = false;
17644			this.start = {};
17645			this.index = this.config.start;
17646			this.anim = 0;
17647			this.easing = this.config.easing;
17648
17649			if ( !has3d ) {
17650				this.child.style.position = 'absolute';
17651				this.elem.style.position = 'relative';
17652			}
17653
17654			// Bind event handlers to context
17655			$.each(['ontouchstart','ontouchmove','ontouchend','setup'], function(i, fn) {
17656				self[fn] = (function(caller) {
17657					return function() {
17658						caller.apply( self, arguments );
17659					};
17660				}(self[fn]));
17661			});
17662
17663			// the physical animator
17664			this.setX = function() {
17665
17666				var style = self.child.style;
17667
17668				if (!has3d) {
17669					// this is actually faster than CSS3 translate
17670					style.left = self.pos+'px';
17671					return;
17672				}
17673				style.MozTransform = style.webkitTransform = style.transform = 'translate3d(' + self.pos + 'px,0,0)';
17674				return;
17675			};
17676
17677			// bind events
17678			$(elem).on('touchstart', this.ontouchstart);
17679			$(window).on('resize', this.setup);
17680			$(window).on('orientationchange', this.setup);
17681
17682			// set up width
17683			this.setup();
17684
17685			// start the animations
17686			(function animloop(){
17687				requestFrame(animloop);
17688				self.loop.call( self );
17689			}());
17690
17691		};
17692
17693		Finger.prototype = {
17694
17695			constructor: Finger,
17696
17697			setup: function() {
17698				this.width = $( this.elem ).width();
17699				this.length = M.ceil( $(this.child).width() / this.width );
17700				if ( this.index !== 0 ) {
17701					this.index = M.max(0, M.min( this.index, this.length-1 ) );
17702					this.pos = this.to = -this.width*this.index;
17703				}
17704			},
17705
17706			setPosition: function(pos) {
17707				this.pos = pos;
17708				this.to = pos;
17709			},
17710
17711			ontouchstart: function(e) {
17712
17713				var touch = e.originalEvent.touches;
17714
17715				this.start = {
17716					pageX: touch[0].pageX,
17717					pageY: touch[0].pageY,
17718					time:  +new Date()
17719				};
17720
17721				this.isScrolling = null;
17722				this.touching = true;
17723				this.deltaX = 0;
17724
17725				$doc.on('touchmove', this.ontouchmove);
17726				$doc.on('touchend', this.ontouchend);
17727			},
17728
17729			ontouchmove: function(e) {
17730
17731				var touch = e.originalEvent.touches;
17732
17733				// ensure swiping with one touch and not pinching
17734				if( touch && touch.length > 1 || e.scale && e.scale !== 1 ) {
17735					return;
17736				}
17737
17738				this.deltaX = touch[0].pageX - this.start.pageX;
17739
17740				// determine if scrolling test has run - one time test
17741				if ( this.isScrolling === null ) {
17742					this.isScrolling = !!(
17743						this.isScrolling ||
17744						M.abs(this.deltaX) < M.abs(touch[0].pageY - this.start.pageY)
17745					);
17746				}
17747
17748				// if user is not trying to scroll vertically
17749				if (!this.isScrolling) {
17750
17751					// prevent native scrolling
17752					e.preventDefault();
17753
17754					// increase resistance if first or last slide
17755					this.deltaX /= ( (!this.index && this.deltaX > 0 || this.index == this.length - 1 && this.deltaX < 0 ) ?
17756						( M.abs(this.deltaX) / this.width + 1.8 )  : 1 );
17757					this.to = this.deltaX - this.index * this.width;
17758				}
17759				e.stopPropagation();
17760			},
17761
17762			ontouchend: function(e) {
17763
17764				this.touching = false;
17765
17766				// determine if slide attempt triggers next/prev slide
17767				var isValidSlide = +new Date() - this.start.time < 250 &&
17768					M.abs(this.deltaX) > 40 ||
17769					M.abs(this.deltaX) > this.width/2,
17770
17771					isPastBounds = !this.index && this.deltaX > 0 ||
17772						this.index == this.length - 1 && this.deltaX < 0;
17773
17774				// if not scrolling vertically
17775				if ( !this.isScrolling ) {
17776					this.show( this.index + ( isValidSlide && !isPastBounds ? (this.deltaX < 0 ? 1 : -1) : 0 ) );
17777				}
17778
17779				$doc.off('touchmove', this.ontouchmove);
17780				$doc.off('touchend', this.ontouchend);
17781			},
17782
17783			show: function( index ) {
17784				if ( index != this.index ) {
17785					this.config.onchange.call(this, index);
17786				} else {
17787					this.to = -( index*this.width );
17788				}
17789			},
17790
17791			moveTo: function( index ) {
17792				if ( index != this.index ) {
17793					this.pos = this.to = -( index*this.width );
17794					this.index = index;
17795				}
17796			},
17797
17798			loop: function() {
17799
17800				var distance = this.to - this.pos,
17801					factor = 1;
17802
17803				if ( this.width && distance ) {
17804					factor = M.max(0.5, M.min(1.5, M.abs(distance / this.width) ) );
17805				}
17806
17807				// if distance is short or the user is touching, do a 1-1 animation
17808				if ( this.touching || M.abs(distance) <= 1 ) {
17809					this.pos = this.to;
17810					distance = 0;
17811					if ( this.anim && !this.touching ) {
17812						this.config.oncomplete( this.index );
17813					}
17814					this.anim = 0;
17815					this.easing = this.config.easing;
17816				} else {
17817					if ( !this.anim ) {
17818						// save animation parameters
17819						this.anim = { start: this.pos, time: +new Date(), distance: distance, factor: factor, destination: this.to };
17820					}
17821					// check if to has changed or time has run out
17822					var elapsed = +new Date() - this.anim.time;
17823					var duration = this.config.duration*this.anim.factor;
17824
17825					if ( elapsed > duration || this.anim.destination != this.to ) {
17826						this.anim = 0;
17827						this.easing = this.easeout;
17828						return;
17829					}
17830					// apply easing
17831					this.pos = this.easing(
17832						null,
17833						elapsed,
17834						this.anim.start,
17835						this.anim.distance,
17836						duration
17837					);
17838				}
17839				this.setX();
17840			}
17841		};
17842
17843		return Finger;
17844
17845	}());
17846
17847// the plugin initializer
17848	$.fn.galleria = function( options ) {
17849
17850		var selector = this.selector;
17851
17852		// try domReady if element not found
17853		if ( !$(this).length ) {
17854
17855			$(function() {
17856				if ( $( selector ).length ) {
17857
17858					// if found on domReady, go ahead
17859					$( selector ).galleria( options );
17860
17861				} else {
17862
17863					// if not, try fetching the element for 5 secs, then raise a warning.
17864					Galleria.utils.wait({
17865						until: function() {
17866							return $( selector ).length;
17867						},
17868						success: function() {
17869							$( selector ).galleria( options );
17870						},
17871						error: function() {
17872							Galleria.raise('Init failed: Galleria could not find the element "'+selector+'".');
17873						},
17874						timeout: 5000
17875					});
17876
17877				}
17878			});
17879			return this;
17880		}
17881
17882		return this.each(function() {
17883
17884			// destroy previous instance and prepare for new load
17885			if ( $.data(this, 'galleria') ) {
17886				$.data( this, 'galleria' ).destroy();
17887				$( this ).find( '*' ).hide();
17888			}
17889
17890			// load the new gallery
17891			$.data( this, 'galleria', new Galleria().init( this, options ) );
17892		});
17893
17894	};
17895
17896// export as AMD or CommonJS
17897	if ( typeof module === "object" && module && typeof module.exports === "object" ) {
17898		module.exports = Galleria;
17899	} else {
17900		window.Galleria = Galleria;
17901		if ( typeof define === "function" && define.amd ) {
17902			define( "galleria", ['jquery'], function() { return Galleria; } );
17903		}
17904	}
17905
17906// phew
17907
17908}( jQuery, this ) );
17909//  requestAnimationFrame polyfill
17910
17911(function() {
17912	var lastTime = 0;
17913	var vendors = ['ms', 'moz', 'webkit', 'o'];
17914	for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
17915		window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
17916		window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
17917			|| window[vendors[x]+'CancelRequestAnimationFrame'];
17918	}
17919
17920	if (!window.requestAnimationFrame)
17921		window.requestAnimationFrame = function(callback, element) {
17922			var currTime = new Date().getTime();
17923			var timeToCall = Math.max(0, 16 - (currTime - lastTime));
17924			var id = window.setTimeout(function() { callback(currTime + timeToCall); },
17925				timeToCall);
17926			lastTime = currTime + timeToCall;
17927			return id;
17928		};
17929
17930	if (!window.cancelAnimationFrame)
17931		window.cancelAnimationFrame = function(id) {
17932			clearTimeout(id);
17933		};
17934}());
17935
17936// Simplified Mutation Observer wrapped into a new jQuery method
17937
17938(function($) {
17939	$.fn.observe = function(cb, e) {
17940		e = e || {subtree:true, childList:true, characterData:true, attributes:true};
17941		$(this).each(function() {
17942			function callback(changes) { cb.call(node, changes, this); }
17943			var node = this;
17944			(new MutationObserver(callback)).observe(node, e);
17945		});
17946	};
17947})(jQuery);
17948
17949// Placeholder support detection
17950
17951jQuery.support.placeholder = (function(){
17952	var i = document.createElement('input');
17953	return 'placeholder' in i;
17954})();
17955
17956// Leading zeroes
17957
17958function leadingZero(string){
17959	return string < 10 ? '0' + string : string;
17960}
17961
17962// Ordinal suffix for numbers
17963
17964function ordinal_suffix_of(i) {
17965	var j = i % 10,
17966		k = i % 100;
17967	if (j == 1 && k != 11) {
17968		return i + "st";
17969	}
17970	if (j == 2 && k != 12) {
17971		return i + "nd";
17972	}
17973	if (j == 3 && k != 13) {
17974		return i + "rd";
17975	}
17976	return i + "th";
17977}
17978var ERROR_CONTAINER_ID = 'form_module_container_errors';
17979var FIELD_ERROR_CLASS = 'form_module_field_error';
17980var SUCCESS_CONTAINER_ID = 'form_module_container_success';
17981/**
17982 * Handle form submissions with AJAX
17983 *
17984 * @param {HTMLFormElement} e
17985 * @param {string} formId
17986 * @param {string} successUrl
17987 * @param {string} successMessage
17988 */
17989function nxgFormSubmission(e, formId, successUrl, successMessage) {
17990    // console.log('forms_module');
17991    e.preventDefault();
17992    
17993    var formElement = document.getElementById("form_" + formId);
17994    /*
17995     * Can't find form element exit function
17996     */
17997    if (!formElement) {
17998        return;
17999    }
18000
18001    // console.log('formElement');
18002    
18003    if (!successMessage) {
18004        successMessage = 'Submission Successful';
18005    }
18006    var http = new XMLHttpRequest();
18007    /**
18008     * Prevent spamming submissions while awaiting response
18009     */
18010    nxgFormSubmission_disableSubmitButton(true);
18011    nxgFormSubmission_breakDownNotifications();
18012    http.onreadystatechange = function () {
18013        if (http.readyState === 4) {
18014            nxgFormSubmission_disableSubmitButton(false);
18015            switch (http.status) {
18016                case 200:
18017                    /**
18018                     * Handle successful form submission
18019                     */
18020                    nxgFormSubmission_submissionSuccessful(formElement, successMessage, successUrl);
18021                    break;
18022                case 400:
18023                    nxgFormSubmission_setUpErrors(formElement);
18024                    nxgFormSubmission_setErrorOnForm(JSON.parse(http.responseText));
18025                    break;
18026                default:
18027                    alert('Unknown');
18028                    break;
18029            }
18030        }
18031    };
18032    http.open("post", "/forms/submission/id/" + formId);
18033    http.setRequestHeader('X-REQUESTED-WITH', 'XMLHttpRequest');
18034    http.send(new FormData(formElement));
18035}
18036/**
18037 * Loop through errors and add them to the error container on the page
18038 *
18039 * @param {array} errors
18040 */
18041function nxgFormSubmission_setErrorOnForm(errors) {
18042    var errorContainer = document.getElementById(ERROR_CONTAINER_ID);
18043    var errorMessages = '';
18044    for (var fieldKey in errors) {
18045        if (errors.hasOwnProperty(fieldKey)) {
18046            var fieldErrors = errors[fieldKey];
18047            document.getElementById(fieldKey).classList.add(FIELD_ERROR_CLASS);
18048            for (var validatorKey in fieldErrors) {
18049                if (fieldErrors.hasOwnProperty(validatorKey)) {
18050                    var validatorError = fieldErrors[validatorKey];
18051                    errorMessages += "\n                        <li>\n                            " + validatorKey + ": " + validatorError.join(', ') + " (<span class=\"goTo\" onClick=\"nxgFormSubmission_scrollToError('" + fieldKey + "')\">go to</span>)\n                        </li>\n                    ";
18052                }
18053            }
18054        }
18055    }
18056    errorContainer.innerHTML = "\n        <h3>This form contains the following errors:</h3>\n        <ul>\n            " + errorMessages + "\n        </ul>\n    ";
18057}
18058/**
18059 * Create the container the error message will
18060 * be placed into
18061 *
18062 * @param {HTMLElement} formElement
18063 */
18064function nxgFormSubmission_setUpErrors(formElement) {
18065    var container = document.createElement('div');
18066    container.setAttribute('id', ERROR_CONTAINER_ID);
18067    formElement.prepend(container);
18068    if (!nxgFormSubmission_isElementInView(container)) {
18069        nxgFormSubmission_scrollToElement(container);
18070    }
18071}
18072function nxgFormSubmission_breakDownNotifications() {
18073    var errorContainer = document.getElementById(ERROR_CONTAINER_ID);
18074    var successContainer = document.getElementById(SUCCESS_CONTAINER_ID);
18075    var fieldsWithErrors = document.getElementsByClassName(FIELD_ERROR_CLASS);
18076    if (errorContainer) {
18077        errorContainer.parentNode.removeChild(errorContainer);
18078    }
18079    if (successContainer) {
18080        successContainer.parentNode.removeChild(successContainer);
18081    }
18082    for (var i = 0; i < fieldsWithErrors.length; i++) {
18083        fieldsWithErrors[i].classList.remove(FIELD_ERROR_CLASS);
18084    }
18085}
18086/**
18087 * Enable/Disable the submit button of the form
18088 * to prevent multiple clicks
18089 *
18090 * @param {boolean} disabled
18091 */
18092function nxgFormSubmission_disableSubmitButton(disabled) {
18093    if (disabled === void 0) { disabled = false; }
18094    var buttons = document.getElementsByName('Submit');
18095    for (var i = 0; i < buttons.length; i++) {
18096        buttons[i].disabled = disabled;
18097    }
18098}
18099/**
18100 * Handle successful submissions.
18101 * Display a message or redirect based off of
18102 * form configuration
18103 *
18104 * @param {HTMLElement} formElement
18105 * @param {string} message
18106 * @param {string} redirect
18107 */
18108function nxgFormSubmission_submissionSuccessful(formElement, message, redirect) {
18109    if (redirect !== 'null' && redirect !== '') {
18110        window.location.href = redirect;
18111        return;
18112    }
18113    var container = document.createElement('div');
18114    container.setAttribute('id', SUCCESS_CONTAINER_ID);
18115    container.innerHTML = message;
18116    formElement.prepend(container);
18117    formElement.reset();
18118    if (!nxgFormSubmission_isElementInView(container)) {
18119        nxgFormSubmission_scrollToElement(container);
18120    }
18121}
18122/**
18123 * Scroll the browser to the element throwing the
18124 * error and focus in on the element
18125 *
18126 * @param {string} elementId
18127 */
18128function nxgFormSubmission_scrollToError(elementId) {
18129    var element = document.getElementById(elementId);
18130    element.focus();
18131    if (!nxgFormSubmission_isElementInView(element)) {
18132        nxgFormSubmission_scrollToElement(element);
18133    }
18134}
18135/**
18136 * Checks if the element is already in view
18137 *
18138 * @param {HTMLElement} element
18139 * @returns {boolean}
18140 */
18141function nxgFormSubmission_isElementInView(element) {
18142    var docViewTop = (window.pageYOffset || document.documentElement.scrollTop) - (document.documentElement.clientTop || 0);
18143    var docViewBottom = docViewTop + window.innerHeight;
18144    var elementTop = offset(element);
18145    var elementBottom = elementTop + element.clientHeight;
18146    return ((elementBottom <= docViewBottom) && (elementTop >= docViewTop));
18147}
18148/**
18149 * Scroll to the specified element
18150 *
18151 * @param {HTMLElement} element
18152 */
18153function nxgFormSubmission_scrollToElement(element) {
18154    var scrollPosition = (offset(element) / 2) + 100;
18155    document.body.scrollTop = scrollPosition;
18156    document.documentElement.scrollTop = scrollPosition;
18157}
18158function isWindow(obj) {
18159    return obj != null && obj === obj.window;
18160}
18161function getWindow(elem) {
18162    return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;
18163}
18164function offset(elem) {
18165    var docElem, win, box = { top: 0, left: 0 }, doc = elem && elem.ownerDocument;
18166    docElem = doc.documentElement;
18167    if (typeof elem.getBoundingClientRect !== typeof undefined) {
18168        box = elem.getBoundingClientRect();
18169    }
18170    win = getWindow(doc);
18171    return box.top + win.pageYOffset - docElem.clientTop;
18172};
18173!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.svg4everybody=b()}):"object"==typeof module&&module.exports?module.exports=b():a.svg4everybody=b()}(this,function(){function a(a,b,c,d){if(c){var e=document.createDocumentFragment(),f=!b.hasAttribute("viewBox")&&c.getAttribute("viewBox");f&&b.setAttribute("viewBox",f);for(var g=document.importNode?document.importNode(c,!0):c.cloneNode(!0),h=document.createElementNS(b.namespaceURI||"http://www.w3.org/2000/svg","g");g.childNodes.length;)h.appendChild(g.firstChild);if(d)for(var i=0;d.attributes.length>i;i++){var j=d.attributes[i];"xlink:href"!==j.name&&"href"!==j.name&&h.setAttribute(j.name,j.value)}e.appendChild(h),a.appendChild(e)}}function b(b,c){b.onreadystatechange=function(){if(4===b.readyState){var d=b._cachedDocument;d||(d=b._cachedDocument=document.implementation.createHTMLDocument(""),d.body.innerHTML=b.responseText,b._cachedTarget={}),b._embeds.splice(0).map(function(e){var f=b._cachedTarget[e.id];f||(f=b._cachedTarget[e.id]=d.getElementById(e.id)),a(e.parent,e.svg,f,c)})}},b.onreadystatechange()}function c(c){function e(){for(var c=0;c<o.length;){var h=o[c],i=h.parentNode,j=d(i);if(j){var k=h.getAttribute("xlink:href")||h.getAttribute("href");if(f)if(!g.validate||g.validate(k,j,h)){i.removeChild(h);var l=k.split("#"),q=l.shift(),r=l.join("#");if(q.length){var s=m[q];
18173s||(s=m[q]=new XMLHttpRequest,s.open("GET",q),s.send(),s._embeds=[]),s._embeds.push({parent:i,svg:j,id:r}),b(s,h)}else a(i,j,document.getElementById(r),h)}else++c,++p}else++c}(!o.length||o.length-p>0)&&n(e,67)}var f,g=Object(c),h=/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/,i=/\bAppleWebKit\/(\d+)\b/,j=/\bEdge\/12\.(\d+)\b/,k=/\bEdge\/.(\d+)\b/,l=window.top!==window.self;f="polyfill"in g?g.polyfill:h.test(navigator.userAgent)||(navigator.userAgent.match(j)||[])[1]<10547||(navigator.userAgent.match(i)||[])[1]<537||k.test(navigator.userAgent)&&l;var m={},n=window.requestAnimationFrame||setTimeout,o=document.getElementsByTagName("use"),p=0;f&&e()}function d(a){for(var b=a;"svg"!==b.nodeName.toLowerCase()&&(b=b.parentNode););return b}return c});
18174/*! Select2 4.1.0-rc.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
18175!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(t){var e,n,s,p,r,o,h,f,g,m,y,v,i,a,_,s=(t&&t.fn&&t.fn.select2&&t.fn.select2.amd&&(u=t.fn.select2.amd),u&&u.requirejs||(u?n=u:u={},g={},m={},y={},v={},i=Object.prototype.hasOwnProperty,a=[].slice,_=/\.js$/,h=function(e,t){var n,s,i=c(e),r=i[0],t=t[1];return e=i[1],r&&(n=x(r=l(r,t))),r?e=n&&n.normalize?n.normalize(e,(s=t,function(e){return l(e,s)})):l(e,t):(r=(i=c(e=l(e,t)))[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},f={require:function(e){return w(e)},exports:function(e){var t=g[e];return void 0!==t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},r=function(e,t,n,s){var i,r,o,a,l,c=[],u=typeof n,d=A(s=s||e);if("undefined"==u||"function"==u){for(t=!t.length&&n.length?["require","exports","module"]:t,a=0;a<t.length;a+=1)if("require"===(r=(o=h(t[a],d)).f))c[a]=f.require(e);else if("exports"===r)c[a]=f.exports(e),l=!0;else if("module"===r)i=c[a]=f.module(e);else if(b(g,r)||b(m,r)||b(v,r))c[a]=x(r);else{if(!o.p)throw new Error(e+" missing "+r);o.p.load(o.n,w(s,!0),function(t){return function(e){g[t]=e}}(r),{}),c[a]=g[r]}u=n?n.apply(g[e],c):void 0,e&&(i&&i.exports!==p&&i.exports!==g[e]?g[e]=i.exports:u===p&&l||(g[e]=u))}else e&&(g[e]=n)},e=n=o=function(e,t,n,s,i){if("string"==typeof e)return f[e]?f[e](t):x(h(e,A(t)).f);if(!e.splice){if((y=e).deps&&o(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=s,s=i),s?r(p,e,t,n):setTimeout(function(){r(p,e,t,n)},4),o},o.config=function(e){return o(e)},e._defined=g,(s=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),b(g,e)||b(m,e)||(m[e]=[e,t,n])}).amd={jQuery:!0},u.requirejs=e,u.require=n,u.define=s),u.define("almond",function(){}),u.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),u.define("select2/utils",["jquery"],function(r){var s={};function c(e){var t,n=e.prototype,s=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&s.push(t);return s}s.Extend=function(e,t){var n,s={}.hasOwnProperty;function i(){this.constructor=e}for(n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},s.Decorate=function(s,i){var e=c(i),t=c(s);function r(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=s.prototype.constructor;0<t&&(e.call(arguments,s.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=s.displayName,r.prototype=new function(){this.constructor=r};for(var n=0;n<t.length;n++){var o=t[n];r.prototype[o]=s.prototype[o]}for(var a=0;a<e.length;a++){var l=e[a];r.prototype[l]=function(e){var t=function(){};e in r.prototype&&(t=r.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}(l)}return r};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1
vendor: 6,074 bytes, line 18175
18175);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,s=e.length;n<s;n++)e[n].apply(this,t)},s.Observable=e,s.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},s.bind=function(e,t){return function(){e.apply(t,arguments)}},s._convertData=function(e){for(var t in e){var n=t.split("-"),s=e;if(1!==n.length){for(var i=0;i<n.length;i++){var r=n[i];(r=r.substring(0,1).toLowerCase()+r.substring(1))in s||(s[r]={}),i==n.length-1&&(s[r]=e[t]),s=s[r]}delete e[t]}}return e},s.hasScroll=function(e,t){var n=r(t),s=t.style.overflowX,i=t.style.overflowY;return(s!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===s||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},s.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},s.__cache={};var n=0;return s.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null!=t||(t=e.id?"select2-data-"+e.id:"select2-data-"+(++n).toString()+"-"+s.generateChars(4),e.setAttribute("data-select2-id",t)),t},s.StoreData=function(e,t,n){e=s.GetUniqueElementId(e);s.__cache[e]||(s.__cache[e]={}),s.__cache[e][t]=n},s.GetData=function(e,t){var n=s.GetUniqueElementId(e);return t?s.__cache[n]&&null!=s.__cache[n][t]?s.__cache[n][t]:r(e).data(t):s.__cache[n]},s.RemoveData=function(e){var t=s.GetUniqueElementId(e);null!=s.__cache[t]&&delete s.__cache[t],e.removeAttribute("data-select2-id")},s.copyNonInternalCssClasses=function(e,t){var n=(n=e.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0===e.indexOf("select2-")}),t=(t=t.getAttribute("class").trim().split(/\s+/)).filter(function(e){return 0!==e.indexOf("select2-")}),t=n.concat(t);e.setAttribute("class",t.join(" "))},s}),u.define("select2/results",["jquery","./utils"],function(d,p){function s(e,t,n){this.$element=e,this.data=n,this.options=t,s.__super__.constructor.call(this)}return p.Extend(s,p.Observable),s.prototype.render=function(){var e=d('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=d('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),s=this.options.get("translations").get(e.message);n.append(t(s(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var s=e.results[n],s=this.option(s);t.push(s)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},s.prototype.position=function(e,t){t.find(".select2-results").append(e)},s.prototype.sort=function(e){return this.options.get("sorter")(e)},s.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");(0<t.length?t:e).first().trigger("mouseenter"),this.ensureHighlightVisible()},s.prototype.setClasses=function(){var t=this;this.data.current(function(e){var s=e.map(function(e){return e.id.toString()});t.$results.find(".select2-results__option--selectable").each(function(){var e=d(this),t=p.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<s.indexOf(n)?(this.classList.add("select2-results__option--selected"),e.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),e.attr("aria-selected","false"))})})},s.prototype.showLoading=function(e){this.hideLoading();e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},e=this.option(e);e.className+=" loading-results",this.$results.prepend(e)},s.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},s.prototype.option=function(e){var t=document.createElement("li");t.classList.add("select2-results__option"),t.classList.add("select2-results__option--selectable");var n,s={role:"option"},i=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(n in(null!=e.element&&i.call(e.element,":disabled")||null==e.element&&e.disabled)&&(s["aria-disabled"]="true",t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--disabled")),null==e.id&&t.classList.remove("select2-results__option--selectable"),null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(s.role="group",s["aria-label"]=e.text,t.classList.remove("select2-results__option--selectable"),t.classList.add("select2-results__option--group")),s){var r=s[n];t.setAttribute(n,r)}if(e.children){var o=d(t),a=document.createElement("strong");a.className="select2-results__group",this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],u=this.option(u);l.push(u)}i=d("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"});i.append(l),o.append(a),o.append(i)}else this.template(e,t);return p.StoreData(t,"data",e),t},s.prototype.bind=function(t,e){var i=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}
vendor: 4,998 bytes, line 18175
18175),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e,t=i.getHighlightedResults();0!==t.length&&(e=p.GetData(t[0],"data"),t.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:e}))}),t.on("results:previous",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t);s<=0||(e=s-1,0===t.length&&(e=0),(s=n.eq(e)).trigger("mouseenter"),t=i.$results.offset().top,n=s.offset().top,s=i.$results.scrollTop()+(n-t),0===e?i.$results.scrollTop(0):n-t<0&&i.$results.scrollTop(s))}),t.on("results:next",function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t)+1;s>=n.length||((e=n.eq(s)).trigger("mouseenter"),t=i.$results.offset().top+i.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=i.$results.scrollTop()+n-t,0===s?i.$results.scrollTop(0):t<n&&i.$results.scrollTop(e))}),t.on("results:focus",function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")}),t.on("results:message",function(e){i.displayMessage(e)}),d.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=i.$results.height();t?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option--selectable",function(e){var t=d(this),n=p.GetData(this,"data");t.hasClass("select2-results__option--selected")?i.options.get("multiple")?i.trigger("unselect",{originalEvent:e,data:n}):i.trigger("close",{}):i.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".select2-results__option--selectable",function(e){var t=p.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:t,element:d(this)})})},s.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},s.prototype.destroy=function(){this.$results.remove()},s.prototype.ensureHighlightVisible=function(){var e,t,n,s,i=this.getHighlightedResults();0!==i.length&&(e=this.$results.find(".select2-results__option--selectable").index(i),s=this.$results.offset().top,t=i.offset().top,n=this.$results.scrollTop()+(t-s),s=t-s,n-=2*i.outerHeight(!1),e<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(n))},s.prototype.template=function(e,t){var n=this.options.get("templateResult"),s=this.options.get("escapeMarkup"),e=n(e,t);null==e?t.style.display="none":"string"==typeof e?t.innerHTML=s(e):d(t).append(e)},s}),u.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),u.define("select2/selection/base",["jquery","../utils","../keys"],function(n,s,i){function r(e,t){this.$element=e,this.options=t,r.__super__.constructor.call(this)}return s.Extend(r,s.Observable),r.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=s.GetData(this.$element[0],"old-tabindex")?this._tabindex=s.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},r.prototype.bind=function(e,t){var n=this,s=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",s),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","fal
18175se"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},r.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},r.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&s.GetData(this,"element").select2("close")})})},r.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},r.prototype.position=function(e,t){t.find(".selection").append(e)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r}),u.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,s){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var s=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",s),this.$selection.attr("aria-controls",s),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){var t,n;0!==e.length?(n=e[0],t=this.$selection.find(".select2-selection__rendered"),e=this.display(n,t),t.empty().append(e),(n=n.title||n.text)?t.attr("title",n):t.removeAttr("title")):this.clear()},i}),u.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,c){function r(e,t){r.__super__.constructor.apply(this,arguments)}return c.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var s=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){var t;n.isDisabled()||(t=i(this).parent(),t=c.GetData(t[0],"data"),n.trigger("unselect",{originalEvent:e,data:t}))}),this.$selection.on("keydown",".select2-selection__choice__remove",function(e){n.isDisabled()||e.stopPropagation()})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">&times;</span></button><span class="select2-selection__choice__display"></span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",s=0;s<e.length;s++){var i=e[s],r=this.selectionContainer(),o=this.display(i,r),a=n+c.generateChars(4)+"-";
vendor: 4,796 bytes, line 18175
18175i.id?a+=i.id:a+=c.generateChars(4),r.find(".select2-selection__choice__display").append(o).attr("id",a);var l=i.title||i.text;l&&r.attr("title",l);o=this.options.get("translations").get("removeItem"),l=r.find(".select2-selection__choice__remove");l.attr("title",o()),l.attr("aria-label",o()),l.attr("aria-describedby",a),c.StoreData(r[0],"data",i),t.push(r)}this.$selection.find(".select2-selection__rendered").append(t)}},r}),u.define("select2/selection/placeholder",[],function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice");t=t.title||t.text||n.text();return this.$selection.find(".select2-selection__rendered").attr("title",t),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();t=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(t)},e}),u.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,s,a){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){s._handleClear(e)}),t.on("keypress",function(e){s._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var s=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var r={data:s};if(this.trigger("clear",r),r.prevented)this.$element.val(i);else{for(var o=0;o<s.length;o++)if(r={data:s[o]},this.trigger("unselect",r),r.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=s.DELETE&&t.which!=s.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){var n,s;e.call(this,t),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),0<this.$selection.find(".select2-selection__placeholder").length||0===t.length||(n=this.$selection.find(".select2-selection__rendered").attr("id"),s=this.options.get("translations").get("removeAllItems"),(e=i('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">&times;</span></button>')).attr("title",s()),e.attr("aria-label",s()),e.attr("aria-describedby",n),a.StoreData(e[0],"data",t),this.$selection.prepend(e),this.$selection[0].classList.add("select2-selection--clearable"))},e}),u.define("select2/selection/search",["jquery","../utils","../keys"],function(s,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=this.options.get("translations").get("search"),n=s('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');this.$searchContainer=n,this.$search=n.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",t());e=e.call(this);return this._transferTabIndex(),e.append(this.$searchContainer),e},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results",r=t.id+"-container";e.call(this,t,n),s.$search.attr("aria-describedby",r),t.on("open",function(){s.$search.attr("aria-controls",i),s.$search.trigger("focus")}),t.on("close",function(){s.$search.val(""),s.resizeSearch(),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.trigger("focus")}),t.on("enable",function(){s.$search.prop("disabled",!1),s._transferTabIndex()}),t.on("disable",function(){s.$search.prop("disabled",!0)}),t.on("focus",function(e){s.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){s.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){s._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){var t;
18175e.stopPropagation(),s.trigger("keypress",e),s._keyUpPrevented=e.isDefaultPrevented(),e.which!==l.BACKSPACE||""!==s.$search.val()||0<(t=s.$selection.find(".select2-selection__choice").last()).length&&(t=a.GetData(t[0],"data"),s.searchRemoveChoice(t),e.preventDefault())}),this.$selection.on("click",".select2-search--inline",function(e){s.$search.val()&&e.stopPropagation()});var t=document.documentMode,o=t&&t<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){o?s.$selection.off("input.search input.searchcheck"):s.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){var t;o&&"input"===e.type?s.$selection.off("input.search input.searchcheck"):(t=e.which)!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&s.handleSearch(e)})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},e}),u.define("select2/selection/selectionCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("selectionCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/selection/eventRelay",["jquery"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var s=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],r=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){var n;-1!==i.indexOf(e)&&(t=t||{},n=o.Event("select2:"+e,{params:t}),s.$element.trigger(n),-1!==r.indexOf(e)&&(t.prevented=n.isDefaultPrevented()))})},e}),u.define("select2/translation",["jquery","require"],function(t,n){function s(e){this.dict=e||{}}return s.prototype.all=function(){return this.dict},s.prototype.get=function(e){return this.dict[e]},s.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},s._cache={},s.loadPath=function(e){var t;
18175return e in s._cache||(t=n(e),s._cache[e]=t),new s(s._cache[e])},s}),u.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"
18175c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),u.define("select2/data/base",["../utils"],function(n){function s(e,t){s.__super__.constructor.call(this)}return n.Extend(s,n.Observable),s.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},s.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},s.prototype.bind=function(e,t){},s.prototype.destroy=function(){},s.prototype.generateResultId=function(e,t){e=e.id+"-result-";return e+=n.generateChars(4),null!=t.id?e+="-"+t.id.toString():e+="-"+n.generateChars(4),e},s}),u.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),function(e){return t.item(l(e))}))},n.prototype.select=function(i){var e,r=this;if(i.selected=!0,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var s=i[n].id;-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")}):(e=i.id,this.$element.val(e),this.$element.trigger("input").trigger("change"))},n.prototype.unselect=function(i){var r=this;if(this.$element.prop("multiple")){if(i.selected=!1,null!=i.element&&"option"===i.element.tagName.toLowerCase())return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var s=e[n].id;s!==i.id&&-1===t.indexOf(s)&&t.push(s)}r.$element.val(t),r.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(t,e){var n=[],s=this;this.$element.children().each(function(){var e;"option"!==this.tagName.toLowerCase()&&"optgroup"!==this.tagName.toLowerCase()||(e=l(this),e=s.item(e),null!==(e=s.matches(t,e))&&n.push(e))}),e({results:n})},n.prototype.addOptions=function(e){this.$element.append(e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);e=this._normalizeItem(e);return e.element=t,a.StoreData(t,"data",e),l(t)},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;var n=e[0];if("option"===n.tagName.toLowerCase())t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===n.tagName.toLowerCase()){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var s=e.children("option"),i=[],r=0;r<s.length;r++){var o=l(s[r]),o=this.item(o);i.push(o)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),u.define("select2/data/array",["./select","../utils","jquery"],function(e,t,c){function s(e,t){this._dataToConvert=t.get("data")||[],s.__super__.constructor.call(this,e,t)}return t.Extend(s,e),s.prototype.bind=function(e,t){s.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},s.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),s.__super__.select.call(this,n)},s.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),s=n.map(function(){return t.item(c(this)).id}).get(),i=[];for(var r=0;r<e.length;r++){var o,a,l=this._normalizeItem(e[r]);0<=s.indexOf(l.id)?(o=n.filter(function(e){return function(){return c(this).val()==e.id}}(l)),a=this.item(o),a=c.extend(!0,{},l,a),a=this.option(a),o.replaceWith(a)):(a=this.option(l),l.children&&(l=this.convertToOptions(l.children),a.append(l)),i.push(a))}return i},s}),u.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,r){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return r.extend({},e,{q:e.term})},transport:function(e,t,n){e=r.ajax(e);return e.then(t),e.fail(n),e}};return r.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(t,n){var s=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var i=r.extend({type:"GET"},this.ajaxOptions);function e(){var e=i.transport(i,function(e){e=s.processResults(e,t);s.options.get("debug")&&window.console&&console.error&&(e&&e.results&&Array.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){"status"in e&&(0===e.status||"0"===e.status)||s.trigger("results:message",{message:"errorLoading"})});s._request=e}"function"==typeof i.url&&(i.url=i.url.call(this.$element,t)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),u.define("select2/data/tags",["jquery"],function(t){function e(e,t,n){var s=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);i=n.get("insertTag");if(void 0!==i&&(this.insertTag=i),e.call(this,t,n),Array.isArray(s))for(var r=0;r<s.length;r++){var o=s[r],o=this._normalizeItem(o),o=this.option(o);this.$element.append(o)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var s=t.results,i=0;i<s.length;i++){var r=s[i],o=null!=r.children&&!e({results:r.children},!0);if((r.text||"").toUpperCase()===(c.term||"").toUpperCase()||o)return!n&&(t.data=s,void u(t))}if(n)return!0;var a,l=d.createTag(c);null!=l&&((a=d.option(l)).attr("data-select2-tag","true"),d.addOptions([a]),d.insertTag(s,l)),t.results=s,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){if(null==t.term)return null;t=t.term.trim();return""===t?null:{id:t,text:t}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||t(this).remove()})},e}),u.define("select2/data/tokenizer",["jquery"],function(c){function e(e,t,n){var s=n.get("tokenizer");void 0!==s&&(this.tokenizer=s),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var s=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=s._normalizeItem(e);s.$element.find("option").filter(function(){return c(this).val()===n.id}).length||((t=s.option(n)).attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([t])),t=n,s.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.trigger("focus")),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,s){for(var i=n.get("tokenSeparators")||[],r=t.term,o=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};o<r.length;){var l=r[o];-1!==i.indexOf(l)?(l=r.substr(0,o),null!=(l=a(c.extend({},t,{term:l})))?(s(l),r=r.substr(o+1)||"",o=0):o++):o++}return{term:r}},e}),u.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),u.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(){s._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var s=this;this._checkIfMaximumSelected(function(){e.call(s,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){e=null!=e?e.length:0;0<n.maximumSelectionLength&&e>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()})},e}),u.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),u.define("select2/dropdown/search",["jquery"],function(r){function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("translations").get("search"),e=r('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),t.prepend(e),t},e.prototype.bind=function(e,t,n){var s=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){s.trigger("keypress",e),s._
vendor: 4,581 bytes, line 18175
18175keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){s.handleSearch(e)}),t.on("open",function(){s.$search.attr("tabindex",0),s.$search.attr("aria-controls",i),s.$search.trigger("focus"),window.setTimeout(function(){s.$search.trigger("focus")},0)}),t.on("close",function(){s.$search.attr("tabindex",-1),s.$search.removeAttr("aria-controls"),s.$search.removeAttr("aria-activedescendant"),s.$search.val(""),s.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||s.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(s.showSearch(e)?s.$searchContainer[0].classList.remove("select2-search--hide"):s.$searchContainer[0].classList.add("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?s.$search.attr("aria-activedescendant",e.data._resultId):s.$search.removeAttr("aria-activedescendant")})},e.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},e.prototype.showSearch=function(e,t){return!0},e}),u.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,s){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,s)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),s=t.length-1;0<=s;s--){var i=t[s];this.placeholder.id===i.id&&n.splice(s,1)}return n},e}),u.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,s){this.lastParams={},e.call(this,t,n,s),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("query",function(e){s.lastParams=e,s.loading=!0}),t.on("query:append",function(e){s.lastParams=e,s.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&(e=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=e+50&&this.loadMore())},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),u.define("select2/dropdown/attachBody",["jquery","../utils"],function(u,o){function e(e,t,n){this.$dropdownParent=u(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("open",function(){s._showDropdown(),s._attachPositioningHandler(t),s._bindContainerResultHandlers(t)}),t.on("close",function(){s._hideDropdown(),s._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=u("<span></span>"),e=e.call(this);return t.append(e),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){var n;this._containerResultsHandlersBound||(n=this,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0)},e.prototype._attachPositioningHandler=function(e,t){var n=this,s="scroll.
18175select2."+t.id,i="resize.select2."+t.id,r="orientationchange.select2."+t.id,t=this.$container.parents().filter(o.hasScroll);t.each(function(){o.StoreData(this,"select2-scroll-position",{x:u(this).scrollLeft(),y:u(this).scrollTop()})}),t.on(s,function(e){var t=o.GetData(this,"select2-scroll-position");u(this).scrollTop(t.y)}),u(window).on(s+" "+i+" "+r,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,s="resize.select2."+t.id,t="orientationchange.select2."+t.id;this.$container.parents().filter(o.hasScroll).off(n),u(window).off(n+" "+s+" "+t)},e.prototype._positionDropdown=function(){var e=u(window),t=this.$dropdown[0].classList.contains("select2-dropdown--above"),n=this.$dropdown[0].classList.contains("select2-dropdown--below"),s=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=i.top,r.bottom=i.top+r.height;var o=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-o,e=l>i.bottom+o,a={left:i.left,top:r.bottom},l=this.$dropdownParent;"static"===l.css("position")&&(l=l.offsetParent());i={top:0,left:0};(u.contains(document.body,l[0])||l[0].isConnected)&&(i=l.offset()),a.top-=i.top,a.left-=i.left,t||n||(s="below"),e||!c||t?!c&&e&&t&&(s="below"):s="above",("above"==s||t&&"below"!==s)&&(a.top=r.top-i.top-o),null!=s&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+s),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+s)),this.$dropdownContainer.css(a)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),u.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,s){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,s)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,s=0;s<t.length;s++){var i=t[s];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),u.define("select2/dropdown/selectOnClose",["../utils"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("close",function(e){s._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}n=this.getHighlightedResults();n.length<1||(null!=(n=s.GetData(n[0],"data")).element&&n.element.selected||null==n.element&&n.selected||this.trigger("select",{data:n}))},e}),u.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",function(e){s._selectTriggered(e)}),t.on("unselect",function(e){s._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),u.define("select2/dropdown/dropdownCss",["../utils"],function(n){function e(){}return e.prototype.render=function(e){var t=e.call(this),e=this.options.get("dropdownCssClass")||"";return-1!==e.indexOf(":all:")&&(e=e.replace(":all:",""),n.copyNonInternalCssClasses(t[0],this.$element[0])),t.addClass(e),t},e}),u.define("select2/dropdown/tagsSearchHighlight",["../utils"],function(s){function e(){}return e.prototype.highlightFirstItem=function(e){var t=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)");if(0<t.length){var n=t.first(),t=s.GetData(n[0],"data").element;if(t&&t.getAttribute&&"true"===t.getAttribute("data-select2-tag"))return void n.trigger("mouseenter")}e.call(this)},e}),u.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,e="Please delete "+t+" character";return 1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}}),u.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],function(l,r,o,a,c,u,d,p,h,f,g,t,m,y,v,_,b,$,w,x,A,D,S,E,O,C,L,T,q,I,e){function n(){this.reset()}return n.prototype.apply=function(e){var t;null==(e=l.extend(!0,{},this.defaults,e)).dataAdapter&&(null!=e.ajax?e.dataAdapter=v:null!=e.data?e.dataAdapter=y:e.dataAdapter=m,0<e.minimumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,$)),0<e.maximumInputLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,w)),0<e.maximumSelectionLength&&(e.dataAdapter=f.Decorate(e.dataAdapter,x)),e.tags&&(e.dataAdapter=f.Decorate(e.dataAdapter,_)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=f.Decorate(e.dataAdapter,b))),null==e.resultsAdapter&&(e.resultsAdapter=r,
vendor: 1,369 bytes, line 18175
18175null!=e.ajax&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,E)),null!=e.placeholder&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,S)),e.selectOnClose&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,L)),e.tags&&(e.resultsAdapter=f.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter&&(e.multiple?e.dropdownAdapter=A:(t=f.Decorate(A,D),e.dropdownAdapter=t),0!==e.minimumResultsForSearch&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,C)),e.closeOnSelect&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,T)),null!=e.dropdownCssClass&&(e.dropdownAdapter=f.Decorate(e.dropdownAdapter,q)),e.dropdownAdapter=f.Decorate(e.dropdownAdapter,O)),null==e.selectionAdapter&&(e.multiple?e.selectionAdapter=a:e.selectionAdapter=o,null!=e.placeholder&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,c)),e.allowClear&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,u)),e.multiple&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,d)),null!=e.selectionCssClass&&(e.selectionAdapter=f.Decorate(e.selectionAdapter,p)),e.selectionAdapter=f.Decorate(e.selectionAdapter,h)),e.language=this._resolveLanguage(e.language),e.language.push("en");for(var n=[],s=0;s<e.language.length;s++){var i=e.language[s];-1===n.indexOf(i)&&n.push(i)}return e.language=n,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u
vendor: 13,820 bytes, line 18175
181750000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:f.escapeMarkup,language:{},matcher:function e(t,n){if(null==t.term||""===t.term.trim())return n;if(n.children&&0<n.children.length){for(var s=l.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&s.children.splice(i,1);return 0<s.children.length?s:e(t,s)}var r=a(n.text).toUpperCase(),o=a(t.term).toUpperCase();return-1<r.indexOf(o)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,s=this.defaults.language,i=t.prop("lang"),t=t.closest("[lang]").prop("lang"),t=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(s),this._resolveLanguage(t));return e.language=t,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(l.isEmptyObject(e))return[];if(l.isPlainObject(e))return[e];for(var t,n=Array.isArray(e)?e:[e],s=[],i=0;i<n.length;i++)s.push(n[i]),"string"==typeof n[i]&&0<n[i].indexOf("-")&&(t=n[i].split("-")[0],s.push(t));return s},n.prototype._processTranslations=function(e,t){for(var n=new g,s=0;s<e.length;s++){var i=new g,r=e[s];if("string"==typeof r)try{i=g.loadPath(r)}catch(e){try{r=this.defaults.amdLanguageBase+r,i=g.loadPath(r)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+r+'" could not be automatically loaded. A fallback will be used instead.')}}else i=l.isPlainObject(r)?new g(r):r;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[l.camelCase(e)]=t;n=f._convertData(n);l.extend(!0,this.defaults,n)},new n}),u.define("select2/options",["jquery","./defaults","./utils"],function(c,n,u){function e(e,t){this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=n.applyFromElement(this.options,t)),this.options=n.apply(this.options)}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.autocomplete&&e.prop("autocomplete")&&(this.options.autocomplete=e.prop("autocomplete")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),u.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),u.StoreData(e[0],"data",u.GetData(e[0],"select2Tags")),u.StoreData(e[0],"tags",!0)),u.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",u.GetData(e[0],"ajaxUrl")),u.StoreData(e[0],"ajax-Url",u.GetData(e[0],"ajaxUrl")));var n={};function s(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var r=e[0].attributes[i].name,o="data-";r.substr(0,o.length)==o&&(r=r.substring(o.length),o=u.GetData(e[0],r),n[r.replace(/-([a-z])/g,s)]=o)}c.fn.jquery&&"1."==c.fn.jquery.substr(0,2)&&e[0].dataset&&(n=c.extend(!0,{},e[0].dataset,n));var a,l=c.extend(!0,{},u.GetData(e[0]),n);for(a in l=u._convertData(l))-1<t.indexOf(a)||(c.isPlainObject(this.options[a])?c.extend(this.options[a],l[a]):this.options[a]=l[a]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),u.define("select2/core",["jquery","./options","./utils","./keys"],function(t,i,r,s){var o=function(e,t){null!=r.GetData(e[0],"select2")&&r.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new i(t,e),o.__super__.constructor.call(this);var n=e.attr("tabindex")||0;r.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");t=this.options.get("dataAdapter");this.dataAdapter=new t(e,this.options);n=this.render();this._placeContainer(n);t=this.options.get("selectionAdapter");this.selection=new t(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,n);t=this.options.get("dropdownAdapter");this.dropdown=new t(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,n);n=this.options.get("resultsAdapter");this.results=new n(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var s=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){s.trigger("selection:update",{data:e})}),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),r.StoreData(e[0],"select2",this),e.data("select2",this)};return r.Extend(o,r.Observable),o.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+r.generateChars(2):r.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var s=this._resolveWidth(e,"style");return null!=s?s:this._resolveWidth(e,"element")}if("element"==t){s=e.outerWidth(!1);return s<=0?"auto":s+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;e=e.attr("style");if("string"!=typeof e)return null;for(var i=e.split(";"),r=0,o=i.length;r<o;r+=1){var a=i[r].replace(/\s/g,"").match(n);if(null!==a&&1<=a.length)return a[1]}return null},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=r.bind(this._syncAttributes,this),this._syncS=r.bind(this._syncSubtree,this),this._observer=new window.MutationObserver(function(e){t._syncA(),t._syncS(e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},o.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerSelectionEvents=function(){var n=this,s=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===s.indexOf(e)&&n.trigger(e,t)})},o.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container[0].classList.add("select2-container--open")}),this.on("close",function(){n.$container[0].classList.remove("select2-container--open")}),this.on("enable",function(){n.$container[0].classList.remove("select2-container--disabled")}),this.on("disable",function(){n.$container[0].classList.add("select2-container--disabled")}),this.on("blur",function(){n.$container[0].classList.remove("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===s.ESC||t===s.UP&&e.altKey?(n.close(e),e.preventDefault()):t===s.ENTER||t===s.TAB?(n.trigger("results:select",{}),e.preventDefault()):t===s.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===s.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===s.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===s.ENTER||t===s.SPACE||t===s.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&0<e.addedNodes.length){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&0<e.removedNodes.length)return!0;if(Array.isArray(e))return e.some(function(e){return t._isChangeMutation(e)})}return!1},o.prototype._syncSubtree=function(e){var e=this._isChangeMutation(e),t=this;e&&this.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,s={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in s){var i=s[e],s={prevented:!1,name:e,args:t};if(n.call(this,i,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},o.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},o.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);e=!e[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();e=e[0];Array.isArray(e)&&(e=e.map(function(e){return e.toString()})),this.$element.val(e).trigger("input").trigger("change")},o.prototype.destroy=function(){r.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",r.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),r.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),r.StoreData(e[0],"element",this.$element),e},o}),u.define("jquery-mousewheel",["jquery"],function(e){return e}),u.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,r,t,o){var a;return null==i.fn.select2&&(a=["open","close","destroy"],i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new r(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,s)}),-1<a.indexOf(t)?this:n}),null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),r}),{define:u.define,require:u.require});function b(e,t){return i.call(e,t)}function l(e,t){var n,s,i,r,o,a,l,c,u,d,p=t&&t.split("/"),h=y.map,f=h&&h["*"]||{};if(e){for(t=(e=e.split("/")).length-1,y.nodeIdCompat&&_.test(e[t])&&(e[t]=e[t].replace(_,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),c=0;c<e.length;
18175c++)"."===(d=e[c])?(e.splice(c,1),--c):".."===d&&(0===c||1===c&&".."===e[2]||".."===e[c-1]||0<c&&(e.splice(c-1,2),c-=2));e=e.join("/")}if((p||f)&&h){for(c=(n=e.split("/")).length;0<c;--c){if(s=n.slice(0,c).join("/"),p)for(u=p.length;0<u;--u)if(i=h[p.slice(0,u).join("/")],i=i&&i[s]){r=i,o=c;break}if(r)break;!a&&f&&f[s]&&(a=f[s],l=c)}!r&&a&&(r=a,o=l),r&&(n.splice(0,o,r),e=n.join("/"))}return e}function w(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(p,e.concat([t,n]))}}function x(e){var t;if(b(m,e)&&(t=m[e],delete m[e],v[e]=!0,r.apply(p,t)),!b(g,e)&&!b(v,e))throw new Error("No "+e);return g[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function A(e){return e?c(e):[]}var u=s.require("jquery.select2");return t.fn.select2.amd=s,u});
18176/*
18177 * International Telephone Input v12.1.1
18178 * https://github.com/jackocnr/intl-tel-input.git
18179 * Licensed under the MIT license
18180 */
18181
18182// wrap in UMD - see https://github.com/umdjs/umd/blob/master/jqueryPluginCommonjs.js
18183(function(factory) {
18184    if (typeof define === "function" && define.amd) {
18185        define([ "jquery" ], function($) {
18186            factory($, window, document);
18187        });
18188    } else if (typeof module === "object" && module.exports) {
18189        module.exports = factory(require("jquery"), window, document);
18190    } else {
18191        factory(jQuery, window, document);
18192    }
18193})(function($, window, document, undefined) {
18194    "use strict";
18195    // these vars persist through all instances of the plugin
18196    var pluginName = "intlTelInput", id = 1, // give each instance it's own id for namespaced event handling
18197        defaults = {
18198            // whether or not to allow the dropdown
18199            allowDropdown: true,
18200            // if there is just a dial code in the input: remove it on blur, and re-add it on focus
18201            autoHideDialCode: true,
18202            // add a placeholder in the input with an example number for the selected country
18203            autoPlaceholder: "polite",
18204            // modify the auto placeholder
18205            customPlaceholder: null,
18206            // append menu to a specific element
18207            dropdownContainer: "",
18208            // don't display these countries
18209            excludeCountries: [],
18210            // format the input value during initialisation and on setNumber
18211            formatOnDisplay: true,
18212            // geoIp lookup function
18213            geoIpLookup: null,
18214            // inject a hidden input with this name, and on submit, populate it with the result of getNumber
18215            hiddenInput: "",
18216            // initial country
18217            initialCountry: "",
18218            // don't insert international dial codes
18219            nationalMode: true,
18220            // display only these countries
18221            onlyCountries: [],
18222            // number type to use for placeholders
18223            placeholderNumberType: "MOBILE",
18224            // the countries at the top of the list. defaults to united states and united kingdom
18225            preferredCountries: [ "us", "gb" ],
18226            // display the country dial code next to the selected flag so it's not part of the typed number
18227            separateDialCode: false,
18228            // specify the path to the libphonenumber script to enable validation/formatting
18229            utilsScript: ""
18230        }, keys = {
18231            UP: 38,
18232            DOWN: 40,
18233            ENTER: 13,
18234            ESC: 27,
18235            PLUS: 43,
18236            A: 65,
18237            Z: 90,
18238            SPACE: 32,
18239            TAB: 9
18240        }, // https://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes#Non-geographic_area_codes
18241        regionlessNanpNumbers = [ "800", "822", "833", "844", "855", "866", "877", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889" ];
18242    // keep track of if the window.load event has fired as impossible to check after the fact
18243    $(window).on("load", function() {
18244        // UPDATE: use a public static field so we can fudge it in the tests
18245        $.fn[pluginName].windowLoaded = true;
18246    });
18247    function Plugin(element, options) {
18248        this.telInput = $(element);
18249        this.options = $.extend({}, defaults, options);
18250        // event namespace
18251        this.ns = "." + pluginName + id++;
18252        // Chrome, FF, Safari, IE9+
18253        this.isGoodBrowser = Boolean(element.setSelectionRange);
18254        this.hadInitialPlaceholder = Boolean($(element).attr("placeholder"));
18255    }
18256    Plugin.prototype = {
18257        _init: function() {
18258            // if in nationalMode, disable options relating to dial codes
18259            if (this.options.nationalMode) {
18260                this.options.autoHideDialCode = false;
18261            }
18262            // if separateDialCode then doesn't make sense to A) insert dial code into input (autoHideDialCode), and B) display national numbers (because we're displaying the country dial code next to them)
18263            if (this.options.separateDialCode) {
18264                this.options.autoHideDialCode = this.options.nationalMode = false;
18265            }
18266            // we cannot just test screen size as some smartphones/website meta tags will report desktop resolutions
18267            // Note: for some reason jasmine breaks if you put this in the main Plugin function with the rest of these declarations
18268            // Note: to target Android Mobiles (and not Tablets), we must find "Android" and "Mobile"
18269            this.isMobile = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
18270            if (this.isMobile) {
18271                // trigger the mobile dropdown css
18272                $("body").addClass("iti-mobile");
18273                // on mobile, we want a full screen dropdown, so we must append it to the body
18274                if (!this.options.dropdownContainer) {
18275                    this.options.dropdownContainer = "body";
18276                }
18277            }
18278            // we return these deferred objects from the _init() call so they can be watched, and then we resolve them when each specific request returns
18279            // Note: again, jasmine breaks when I put these in the Plugin function
18280            this.autoCountryDeferred = new $.Deferred();
18281            this.utilsScriptDeferred = new $.Deferred();
18282            // in various situations there could be no country selected initially, but we need to be able to assume this variable exists
18283            this.selectedCountryData = {};
18284            // process all the data: onlyCountries, excludeCountries, preferredCountries etc
18285            this._processCountryData();
18286            // generate the markup
18287            this._generateMarkup();
18288            // set the initial state of the input value and the selected flag
18289            this._setInitialState();
18290            // start all of the event listeners: autoHideDialCode, input keydown, selectedFlag click
18291            this._initListeners();
18292            // utils script, and auto country
18293            this._initRequests();
18294            // return the deferreds
18295            return [ this.autoCountryDeferred, this.utilsScriptDeferred ];
18296        },
18297        /********************
18298         *  PRIVATE METHODS
18299         ********************/
18300        // prepare all of the country data, including onlyCountries, excludeCountries and preferredCountries options
18301        _processCountryData: function() {
18302            // process onlyCountries or excludeCountries array if present
18303            this._processAllCountries();
18304            // process the countryCodes map
18305            this._processCountryCodes();
18306            // process the preferredCountries
18307            this._processPreferredCountries();
18308        },
18309        // add a country code to this.countryCodes
18310        _addCountryCode: function(iso2, dialCode, priority) {
18311            if (!(dialCode in this.countryCodes)) {
18312                this.countryCodes[dialCode] = [];
18313            }
18314            var index = priority || 0;
18315            this.countryCodes[dialCode][index] = iso2;
18316        },
18317        // process onlyCountries or excludeCountries array if present
18318        _processAllCountries: function() {
18319            if (this.options.onlyCountries.length) {
18320                var lowerCaseOnlyCountries = this.options.onlyCountries.map(function(country) {
18321                    return country.toLowerCase();
18322                });
18323                this.countries = allCountries.filter(function(country) {
18324                    return lowerCaseOnlyCountries.indexOf(country.iso2) > -1;
18325                });
18326            } else if (this.options.excludeCountries.length) {
18327                var lowerCaseExcludeCountries = this.options.excludeCountries.map(function(country) {
18328                    return country.toLowerCase();
18329                });
18330                this.countries = allCountries.filter(function(country) {
18331                    return lowerCaseExcludeCountries.indexOf(country.iso2) === -1;
18332                });
18333            } else {
18334                this.countries = allCountries;
18335            }
18336        },
18337        // process the countryCodes map
18338        _processCountryCodes: function() {
18339            this.countryCodes = {};
18340            for (var i = 0; i < this.countries.length; i++) {
18341                var c = this.countries[i];
18342                this._addCountryCode(c.iso2, c.dialCode, c.priority);
18343                // area codes
18344                if (c.areaCodes) {
18345                    for (var j = 0; j < c.areaCodes.length; j++) {
18346                        // full dial code is country code + dial code
18347                        this._addCountryCode(c.iso2, c.dialCode + c.areaCodes[j]);
18348                    }
18349                }
18350            }
18351        },
18352        // process preferred countries - iterate through the preferences, fetching the country data for each one
18353        _processPreferredCountries: function() {
18354            this.preferredCountries = [];
18355            for (var i = 0; i < this.options.preferredCountries.length; i++) {
18356                var countryCode = this.options.preferredCountries[i].toLowerCase(), countryData = this._getCountryData(countryCode, false, true);
18357                if (countryData) {
18358                    this.preferredCountries.push(countryData);
18359                }
18360            }
18361        },
18362        // generate all of the markup for the plugin: the selected flag overlay, and the dropdown
18363        _generateMarkup: function() {
18364            // prevent autocomplete as there's no safe, cross-browser event we can react to, so it can easily put the plugin in an inconsistent state e.g. the wrong flag selected for the autocompleted number, which on submit c
18364ould mean the wrong number is saved (esp in nationalMode)
18365            this.telInput.attr("autocomplete", "off");
18366            // containers (mostly for positioning)
18367            var parentClass = "intl-tel-input";
18368            if (this.options.allowDropdown) {
18369                parentClass += " allow-dropdown";
18370            }
18371            if (this.options.separateDialCode) {
18372                parentClass += " separate-dial-code";
18373            }
18374            this.telInput.wrap($("<div>", {
18375                "class": parentClass
18376            }));
18377            this.flagsContainer = $("<div>", {
18378                "class": "flag-container"
18379            }).insertBefore(this.telInput);
18380            // currently selected flag (displayed to left of input)
18381            var selectedFlag = $("<div>", {
18382                "class": "selected-flag"
18383            });
18384            selectedFlag.appendTo(this.flagsContainer);
18385            this.selectedFlagInner = $("<div>", {
18386                "class": "iti-flag"
18387            }).appendTo(selectedFlag);
18388            if (this.options.separateDialCode) {
18389                this.selectedDialCode = $("<div>", {
18390                    "class": "selected-dial-code"
18391                }).appendTo(selectedFlag);
18392            }
18393            if (this.options.allowDropdown) {
18394                // make element focusable and tab naviagable
18395                selectedFlag.attr("tabindex", "0");
18396                // CSS triangle
18397                $("<div>", {
18398                    "class": "iti-arrow"
18399                }).appendTo(selectedFlag);
18400                // country dropdown: preferred countries, then divider, then all countries
18401                this.countryList = $("<ul>", {
18402                    "class": "country-list hide"
18403                });
18404                if (this.preferredCountries.length) {
18405                    this._appendListItems(this.preferredCountries, "preferred");
18406                    $("<li>", {
18407                        "class": "divider"
18408                    }).appendTo(this.countryList);
18409                }
18410                this._appendListItems(this.countries, "");
18411                // this is useful in lots of places
18412                this.countryListItems = this.countryList.children(".country");
18413                // create dropdownContainer markup
18414                if (this.options.dropdownContainer) {
18415                    this.dropdown = $("<div>", {
18416                        "class": "intl-tel-input iti-container"
18417                    }).append(this.countryList);
18418                } else {
18419                    this.countryList.appendTo(this.flagsContainer);
18420                }
18421            } else {
18422                // a little hack so we don't break anything
18423                this.countryListItems = $();
18424            }
18425            if (this.options.hiddenInput) {
18426                this.hiddenInput = $("<input>", {
18427                    type: "hidden",
18428                    name: this.options.hiddenInput
18429                }).insertBefore(this.telInput);
18430            }
18431        },
18432        // add a country <li> to the countryList <ul> container
18433        _appendListItems: function(countries, className) {
18434            // we create so many DOM elements, it is faster to build a temp string
18435            // and then add everything to the DOM in one go at the end
18436            var tmp = "";
18437            // for each country
18438            for (var i = 0; i < countries.length; i++) {
18439                var c = countries[i];
18440                // open the list item
18441                tmp += "<li class='country " + className + "' data-dial-code='" + c.dialCode + "' data-country-code='" + c.iso2 + "'>";
18442                // add the flag
18443                tmp += "<div class='flag-box'><div class='iti-flag " + c.iso2 + "'></div></div>";
18444                // and the country name and dial code
18445                tmp += "<span class='country-name'>" + c.name + "</span>";
18446                tmp += "<span class='dial-code'>+" + c.dialCode + "</span>";
18447                // close the list item
18448                tmp += "</li>";
18449            }
18450            this.countryList.append(tmp);
18451        },
18452        // set the initial state of the input value and the selected flag by:
18453        // 1. extracting a dial code from the given number
18454        // 2. using explicit initialCountry
18455        // 3. picking the first preferred country
18456        // 4. picking the first country
18457        _setInitialState: function() {
18458            var val = this.telInput.val();
18459            // if we already have a dial code, and it's not a regi
18459onlessNanp, we can go ahead and set the flag, else fall back to the default country
18460            // UPDATE: actually we do want to set the flag for a regionlessNanp in one situation: if we're in nationalMode and there's no initialCountry - otherwise we lose the +1 and we're left with an invalid number
18461            if (this._getDialCode(val) && (!this._isRegionlessNanp(val) || this.options.nationalMode && !this.options.initialCountry)) {
18462                this._updateFlagFromNumber(val);
18463            } else if (this.options.initialCountry !== "auto") {
18464                // see if we should select a flag
18465                if (this.options.initialCountry) {
18466                    this._setFlag(this.options.initialCountry.toLowerCase());
18467                } else {
18468                    // no dial code and no initialCountry, so default to first in list
18469                    this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2;
18470                    if (!val) {
18471                        this._setFlag(this.defaultCountry);
18472                    }
18473                }
18474                // if empty and no nationalMode and no autoHideDialCode then insert the default dial code
18475                if (!val && !this.options.nationalMode && !this.options.autoHideDialCode && !this.options.separateDialCode) {
18476                    this.telInput.val("+" + this.selectedCountryData.dialCode);
18477                }
18478            }
18479            // NOTE: if initialCountry is set to auto, that will be handled separately
18480            // format
18481            if (val) {
18482                // this wont be run after _updateDialCode as that's only called 
18482if no val
18483                this._updateValFromNumber(val);
18484            }
18485        },
18486        // initialise the main event listeners: input keyup, and click selected flag
18487        _initListeners: function() {
18488            this._initKeyListeners();
18489            if (this.options.autoHideDialCode) {
18490                this._initFocusListeners();
18491            }
18492            if (this.options.allowDropdown) {
18493                this._initDropdownListeners();
18494            }
18495            if (this.hiddenInput) {
18496                this._initHiddenInputListener();
18497            }
18498        },
18499        // update hidden input on form submit
18500        _initHiddenInputListener: function() {
18501            var that = this;
18502            var form = this.telInput.closest("form");
18503            if (form.length) {
18504                form.submit(function() {
18505                    that.hiddenInput.val(that.getNumber());
18506                });
18507            }
18508        },
18509        // initialise the dropdown listeners
18510        _initDropdownListeners: function() {
18511            var that = this;
18512            // hack for input nested inside label: clicking the selected-flag to open the dropdown would then automatically trigger a 2nd click on the input which would close it again
18513            var label = this.telInput.closest("label");
18514            if (label.length) {
18515                label.on("click" + this.ns, function(e) {
18516                    // if the dropdown is closed, then focus the input, else ignore the click
18517                    if (that.countryList.hasClass("hide")) {
18518                        that.telInput.focus();
18519                    } else {
18520                        e.preventDefault();
18521                    }
18522                });
18523            }
18524            // toggle country dropdown on click
18525            var selectedFlag = this.selectedFlagInner.parent();
18526            selectedFlag.on("click" + this.ns, function(e) {
18527                // only intercept this event if we're opening the dropdown
18528                // else let it bubble up to the top ("click-off-to-close" listener)
18529                // we cannot just stopPropagation as it may be needed to close another instance
18530                if (that.countryList.hasClass("hide") && !that.telInput.prop("disabled") && !that.telInput.prop("readonly")) {
18531                    that._showDropdown();
18532                }
18533            });
18534            // open dropdown list if currently focused
18535            this.flagsContainer.on("keydown" + that.ns, function(e) {
18536                var isDropdownHidden = that.countryList.hasClass("hide");
18537                if (isDropdownHidden && (e.which == keys.UP || e.which == keys.DOWN || e.which == keys.SPACE || e.which == keys.ENTER)) {
18538                    // prevent form from being submitted if "ENTER" was pressed
18539                    e.preventDefault();
18540                    // prevent event from being handled again by document
18541                    e.stopPropagation();
18542                    that._showDropdown();
18543                }
18544                // allow navigation from dropdown to input on TAB
18545                if (e.which == keys.TAB) {
18546                    that._closeDropdown();
18547                }
18548            });
18549        },
18550        // init many requests: utils script / geo ip lookup
18551        _initRequests: function() {
18552            var that = this;
18553            // if the user has specified the path to the utils script, fetch it on window.load, else resolve
18554            if (this.options.utilsScript) {
18555                // if the plugin is being initialised after the window.load event has already been fired
18556                if ($.fn[pluginName].windowLoaded) {
18557                    $.fn[pluginName].loadUtils(this.options.utilsScript, this.utilsScriptDeferred);
18558                } else {
18559                    // wait until the load event so we don't block any other requests e.g. the flags image
18560                    $(window).on("load", function() {
18561                        $.fn[pluginName].loadUtils(that.options.utilsScript, that.utilsScriptDeferred);
18562                    });
18563                }
18564            } else {
18565                this.utilsScriptDeferred.resolve();
18566            }
18567            if (this.options.initialCountry === "auto") {
18568                this._loadAutoCountry();
18569            } else {
18570                this.autoCountryDeferred.resolve();
18571            }
18572        },
18573        // perform the geo ip lookup
18574        _loadAutoCountry: function() {
18575            var that = this;
18576            // 3 options:
18577            // 1) already loaded (we're done)
18578            // 2) not already started loading (start)
18579            // 3) already started loading (do nothing - just wait for loading callback to fire)
18580            if ($.fn[pluginName].autoCountry) {
18581                this.handleAutoCountry();
18582            } else if (!$.fn[pluginName].startedLoadingAutoCountry) {
18583                // don't do this twice!
18584                $.fn[pluginName].startedLoadingAutoCountry = true;
18585                if (typeof this.options.geoIpLookup === "function") {
18586                    this.options.geoIpLookup(function(countryCode) {
18587                        $.fn[pluginName].autoCountry = countryCode.toLowerCase();
18588                        // tell all instances the auto country is ready
18589                        // TODO: this should just be the current instances
18590                        // UPDATE: use setTimeout in case their geoIpLookup function calls this callback straight away (e.g. if they have already done the geo ip lookup somewhere else). Using setTimeout means that the current thread of execution will finish before executing this, which allows the plugin to finish initialising.
18591                        setTimeout(function() {
18592                            $(".intl-tel-input input").intlTelInput("handleAutoCountry");
18593                        });
18594                    });
18595                }
18596            }
18597        },
18598        // initialize any key listeners
18599        _initKeyListeners: function() {
18600            var that = this;
18601            // update flag on keyup
18602            // (keep this listener separate otherwise the setTimeout breaks all the tests)
18603            this.telInput.on("keyup" + this.ns, function() {
18604                if (that._updateFlagFromNumber(that.telInput.val())) {
18605                    that._triggerCountryChange();
18606                }
18607            });
18608            // update flag on cut/paste events (now supported in all major browsers)
18609            this.telInput.on("cut" + this.ns + " paste" + this.ns, function() {
18610                // hack because "paste" event is fired before input is updated
18611                setTimeout(function() {
18612                    if (that._updateFlagFromNumber(that.telInput.val())) {
18613                        that._triggerCountryChange();
18614                    }
18615                });
18616            });
18617        },
18618        // adhere to the input's maxlength attr
18619        _cap: function(number) {
18620            var max = this.telInput.attr("maxlength");
18621            return max && number.length > max ? number.substr(0, max) : number;
18622        },
18623        // listen for mousedown, focus and blur
18624        _initFocusListeners: function() {
18625            var that = this;
18626            // mousedown decides where the cursor goes, so if we're focusing we must preventDefault as we'll be inserting the dial code, and we want the cursor to be at the end no matter where they click
18627            this.telInput.on("mousedown" + this.ns, function(e) {
18628                if (!that.telInput.is(":focus") && !that.telInput.val()) {
18629                    e.preventDefault();
18630                    // but this also cancels the focus, so we must trigger that manually
18631                    that.telInput.focus();
18632                }
18633            });
18634            // on focus: if empty, insert the dial code for the currently selected flag
18635            this.telInput.on("focus" + this.ns, function(e) {
18636                if (!that.telInput.val() && !that.telInput.prop("readonly") && that.selectedCountryData.dialCode) {
18637                    // insert the dial code
18638                    that.telInput.val("+" + that.selectedCountryData.dialCode);
18639                    // after auto-inserting a dial code, if the first key they hit is '+' then assume they are entering a new number, so remove the dial code. use keypress instead of keydown because keydown gets triggered for the shift key (required to hit the + key), and instead of keyup because that shows the new '+' before removing the old one
18640                    that.telInput.one("keypress.plus" + that.ns, function(e) {
18641                        if (e.which == keys.PLUS) {
18642                            that.telInput.val("");
18643                        }
18644                    });
18645                    // after tabbing in, make sure the cursor is at the end we must use setTimeout to get outside of the focus handler as it seems the selection happens after that
18646                    setTimeout(function() {
18647                        var input = that.telInput[0];
18648                        if (that.isGoodBrowser) {
18649                            var len = that.telInput.val().length;
18650                            input.setSelectionRange(len, len);
18651                        }
18652                    });
18653                }
18654            });
18655            // on blur or form submit: if just a dial code then remove it
18656            var form = this.telInput.prop("form");
18657            if (form) {
18658                $(form).on("submit" + this.ns, function() {
18659                    that._removeEmptyDialCode();
18660                });
18661            }
18662            this.telInput.on("blur" + this.ns, function() {
18663                that._removeEmptyDialCode();
18664            });
18665        },
18666        _removeEmptyDialCode: function() {
18667            var value = this.telInput.val(), startsPlus = value.charAt(0) == "+";
18668            if (startsPlus) {
18669                var numeric = this._getNumeric(value);
18670                // if just a plus, or if just a dial code
18671                if (!numeric || this.selectedCountryData.dialCode == numeric) {
18672                    this.telInput.val("");
18673                }
18674            }
18675            // remove the keypress listener we added on focus
18676            this.telInput.off("keypress.plus" + this.ns);
18677        },
18678        // extract the numeric digits from the given string
18679        _getNumeric: function(s) {
18680            return s.replace(/\D/g, "");
18681        },
18682        // show the dropdown
18683        _showDropdown: function() {
18684            this._setDropdownPosition();
18685            // update highlighting and scroll to active list item
18686            var activeListItem = this.countryList.children(".active");
18687            if (activeListItem.length) {
18688                this._highlightListItem(activeListItem);
18689                this._scrollTo(activeListItem);
18690            }
18691            // bind all the dropdown-related listeners: mouseover, click, click-off, keydown
18692            this._bindDropdownListeners();
18693            // update the arrow
18694            this.selectedFlagInner.children(".iti-arrow").addClass("up");
18695            this.telInput.trigger("open:countrydropdown");
18696        },
18697        // decide where to position dropdown (depends on position within viewport, and scroll)
18698        _setDropdownPosition: function() {
18699            var that = this;
18700            if (this.options.dropdownContainer) {
18701                this.dropdown.appendTo(this.options.dropdownContainer);
18702            }
18703            // show the menu and grab the dropdown height
18704            this.dropdownHeight = this.countryList.removeClass("hide").outerHeight();
18705            if (!this.isMobile) {
18706                var pos = this.telInput.offset(), inputTop = pos.top, windowTop = $(window).scrollTop(), // dropdownFitsBelow = (dropdownBottom < windowBottom)
18707                    dropdownFitsBelow = inputTop + this.telInput.outerHeight() + this.dropdownHeight < windowTop + $(window).height(), dropdownFitsAbove = inputTop - this.dropdownHeight > windowTop;
18708                // by default, the dropdown will be below the input. If we want to position it above the input, we add the dropup class.
18709                this.countryList.toggleClass("dropup", !dropdownFitsBelow && dropdownFitsAbove);
18710                // if dropdownContainer is enabled, calculate postion
18711                if (this.options.dropdownContainer) {
18712                    // by default the dropdown will be directly over the input because it's not in the flow. If we want to position it below, we need to add some extra top value.
18713                    var extraTop = !dropdownFitsBelow && dropdownFitsAbove ? 0 : this.telInput.innerHeight();
18714                    // calculate placement
18715                    this.dropdown.css({
18716                        top: inputTop + extraTop,
18717                        left: pos.left
18718                    });
18719                    // close menu on window scroll
18720                    $(window).on("scroll" + this.ns, function() {
18721                        that._closeDropdown();
18722                    });
18723                }
18724            }
18725        },
18726        // we only bind dropdown listeners when the dropdown is open
18727        _bindDropdownListeners: function() {
18728            var that = this;
18729            // when mouse over a list item, just highlight that one
18730            // we add the class "highlight", so if they hit "enter" we know which one to select
18731            this.countryList.on("mouseover" + this.ns, ".country", function(e) {
18732                that._highlightListItem($(this));
18733            });
18734            // listen for country selection
18735            this.countryList.on("click" + this.ns, ".country", function(e) {
18736                that._selectListItem($(this));
18737            });
18738            // click off to close
18739            // (except when this initial opening click is bubbling up)
18740            // we cannot just stopPropagation as it may be needed to close another instance
18741            var isOpening = true;
18742            $("html").on("click" + this.ns, function(e) {
18743                if (!isOpening) {
18744                    that._closeDropdown();
18745                }
18746                isOpening = false;
18747            });
18748            // listen for up/down scrolling, enter to select, or letters to jump to country name.
18749            // use keydown as keypress doesn't fire for non-char keys and we want to catch if they
18750            // just hit down and hold it to scroll down (no keyup event).
18751            // listen on the document because that's where key events are triggered if no input has focus
18752            var query = "", queryTimer = null;
18753            $(document).on("keydown" + this.ns, function(e) {
18754                // prevent down key from scrolling the whole page,
18755                // and enter key from submitting a form etc
18756                e.preventDefault();
18757                if (e.which == keys.UP || e.which == keys.DOWN) {
18758                    // up and down to navigate
18759                    that._handleUpDownKey(e.which);
18760                } else if (e.which == keys.ENTER) {
18761                    // enter to select
18762                    that._handleEnterKey();
18763                } else if (e.which == keys.ESC) {
18764                    // esc to close
18765                    that._closeDropdown();
18766                } else if (e.which >
18766= keys.A && e.which <= keys.Z || e.which == keys.SPACE) {
18767                    // upper case letters (note: keyup/keydown only return upper case letters)
18768                    // jump to countries that start with the query string
18769                    if (queryTimer) {
18770                        clearTimeout(queryTimer);
18771                    }
18772                    query += String.fromCharCode(e.which);
18773                    that._searchForCountry(query);
18774                    // if the timer hits 1 second, reset the query
18775                    queryTimer = setTimeout(function() {
18776                        query = "";
18777                    }, 1e3);
18778                }
18779            });
18780        },
18781        // highlight the next/prev item in the list (and ensure it is visible)
18782        _handleUpDownKey: function(key) {
18783            var current = this.countryList.children(".highlight").first();
18784            var next = key == keys.UP ? current.prev() : current.next();
18785            if (next.length) {
18786                // skip the divider
18787                if (next.hasClass("divider")) {
18788                    next = key == keys.UP ? next.prev() : next.next();
18789                }
18790                this._highlightListItem(next);
18791                this._scrollTo(next);
18792            }
18793        },
18794        // select the currently highlighted item
18795        _handleEnterKey: function() {
18796            var currentCountry = this.countryList.children(".highlight").first();
18797            if (currentCountry.length) {
18798                this._selectListItem(currentCountry);
18799            }
18800        },
18801        // find the first list item whose name starts with the query string
18802        _searchForCountry: function(query) {
18803            for (var i = 0; i < this.countries.length; i++) {
18804                if (this._startsWith(this.countries[i].name, query)) {
18805                    var listItem = this.countryList.children("[data-country-code=" + this.countries[i].iso2 + "]").not(".preferred");
18806                    // update highlighting and scroll
18807                    this._highlightListItem(listItem);
18808                    this._scrollTo(listItem, true);
18809                    break;
18810                }
18811            }
18812        },
18813        // check if (uppercase) string a starts with string b
18814        _startsWith: function(a, b) {
18815            return a.substr(0, b.length).toUpperCase() == b;
18816        },
18817        // update the input's value to the given val (format first if possible)
18818        // NOTE: this is called from _setInitialState, handleUtils and setNumber
18819        _updateValFromNumber: function(number) {
18820            if (this.options.formatOnDisplay && window.intlTelInputUtils && this.selectedCountryData) {
18821                var format = !this.options.separateDialCode && (this.options.nationalMode || number.charAt(0) != "+") ? intlTelInputUtils.numberFormat.NATIONAL : intlTelInputUtils.numberFormat.INTERNATIONAL;
18822                number = intlTelInputUtils.formatNumber(number, this.selectedCountryData.iso2, format);
18823            }
18824            number = this._beforeSetNumber(number);
18825            this.telInput.val(number);
18826        },
18827        // check if need to select a new flag based on the given number
18828        // Note: called from _setInitialState, keyup handler, setNumber
18829        _updateFlagFromNumber: function(number) {
18830            // if we're in nationalMode and we already have US/Canada selected, make sure the number starts with a +1 so _getDialCode will be able to extract the area code
18831            // update: if we dont yet have selectedCountryData, but we're here (trying to update the flag from the number), that means we're initialising the plugin with a number that already has a dial code, so fine to ignore this bit
18832            if (number && this.options.nationalMode && this.selectedCountryData.dialCode == "1" && number.charAt(0) != "+") {
18833                if (number.charAt(0) != "1") {
18834                    number = "1" + number;
18835                }
18836                number = "+" + number;
18837            }
18838            // try and extract valid dial code from input
18839            var dialCode = this._getDialCode(number), countryCode = null, numeric = this._getNumeric(number);
18840            if (dialCode) {
18841                // check if one of the matching countries is already selected
18842                var countryCodes = this.countryCodes[this._getNumeric(dialCode)], alreadySelected = $.inArray(this.selectedCountryData.iso2, countryCodes) > -1, // check if the given number contains a NANP area code i.e. the only dialCode that could be extracted was +1 (instead of say +1204) and the actual number's length is >=4
18843                    isNanpAreaCode = dialCode == "+1" && numeric.length >= 4, nanpSelected = this.selectedCountryData.dialCode == "1";
18844                // only update the flag if:
18845                // A) NOT (we currently have a NANP flag selected, and the number is a regionlessNanp)
18846                // AND
18847                // B) either a matching country is not already selected OR the number contains a NANP area code (ensure the flag is set to the first matching country)
18848                if (!(nanpSelected && this._isRegionlessNanp(numeric)) && (!alreadySelected || isNanpAreaCode)) {
18849                    // if using onlyCountries option, countryCodes[0] may be empty, so we must find the first non-empty index
18850                    for (var j = 0; j < countryCodes.length; j++) {
18851                        if (countryCodes[j]) {
18852                            countryCode = countryCodes[j];
18853                            break;
18854                        }
18855                    }
18856                }
18857            } else if (number.charAt(0) == "+" && numeric.length) {
18858                // invalid dial code, so empty
18859                // Note: use getNumeric here because the number has not been formatted yet, so could contain bad chars
18860                countryCode = "";
18861            } else if (!number || number == "+") {
18862                // empty, or just a plus, so default
18863                countryCode = this.defaultCountry;
18864            }
18865            if (countryCode !== null) {
18866                return this._setFlag(countryCode);
18867            }
18868            return false;
18869        },
18870        // check if the given number is a regionless NANP number (expects the number to contain an international dial code)
18871        _isRegionlessNanp: function(number) {
18872            var numeric = this._getNumeric(number);
18873            if (numeric.charAt(0) == "1") {
18874                var areaCode = numeric.substr(1, 3);
18875                return $.inArray(areaCode, regionlessNanpNumbers) > -1;
18876            }
18877            return false;
18878        },
18879        // remove highlighting from other list items and highlight the given item
18880        _highlightListItem: function(listItem) {
18881            this.countryListItems.removeClass("highlight");
18882            listItem.addClass("highlight");
18883        },
18884        // find the country data for the given country code
18885        // the ignoreOnlyCountriesOption is only used during init() while parsing the onlyCountries array
18886        _getCountryData: function(countryCode, ignoreOnlyCountriesOption, allowFail) {
18887            var countryList = ignoreOnlyCountriesOption ? allCountries : this.countries;
18888            for (var i = 0; i < countryList.length; i++) {
18889                if (countryList[i].iso2 == countryCode) {
18890                    return countryList[i];
18891                }
18892            }
18893            if (allowFail) {
18894                return null;
18895            } else {
18896                throw new Error("No country data for '" + countryCode + "'");
18897            }
18898        },
18899        // select the given flag, update the placeholder and the active list item
18900        // Note: called from _setInitialState, _updateFlagFromNumber, _selectListItem, setCountry
18901        _setFlag: function(countryCode) {
18902            var prevCountry = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
18903            // do this first as it will throw an error and stop if c
18903ountryCode is invalid
18904            this.selectedCountryData = countryCode ? this._getCountryData(countryCode, false, false) : {};
18905            // update the defaultCountry - we only need the iso2 from now on, so just store that
18906            if (this.selectedCountryData.iso2) {
18907                this.defaultCountry = this.selectedCountryData.iso2;
18908            }
18909            this.selectedFlagInner.attr("class", "iti-flag " + countryCode);
18910            // update the selected country's title attribute
18911            var title = countryCode ? this.selectedCountryData.name + ": +" + this.selectedCountryData.dialCode : "Unknown";
18912            this.selectedFlagInner.parent().attr("title", title);
18913            if (this.options.separateDialCode) {
18914                var dialCode = this.selectedCountryData.dialCode ? "+" + this.selectedCountryData.dialCode : "", parent = this.telInput.parent();
18915                if (prevCountry.dialCode) {
18916                    parent.removeClass("iti-sdc-" + (prevCountry.dialCode.length + 1));
18917                }
18918                if (dialCode) {
18919                    parent.addClass("iti-sdc-" + dialCode.length);
18920                }
18921                this.selectedDialCode.text(dialCode);
18922            }
18923            // and the input's placeholder
18924            this._updatePlaceholder();
18925            // update the active list item
18926            this.countryListItems.removeClass("active");
18927            if (countryCode) {
18928                this.countryListItems.find(".iti-flag." + countryCode).first().closest(".country").addClass("active");
18929            }
18930            // return if the flag has changed or not
18931            return prevCountry.iso2 !== countryCode;
18932        },
18933        // update the input placeholder to an example number from the currently selected country
18934        _updatePlaceholder: function() {
18935            var shouldSetPlaceholder = this.options.autoPlaceholder === "aggressive" || !this.hadInitialPlaceholder && (this.options.autoPlaceholder === true || this.options.autoPlaceholder === "polite");
18936            if (window.intlTelInputUtils && shouldSetPlaceholder) {
18937                var numberType = intlTelInputUtils.numberType[this.options.placeholderNumberType], placeholder = this.selectedCountryData.iso2 ? intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2, this.options.nationalMode, numberType) : "";
18938                placeholder = this._beforeSetNumber(placeholder);
18939                if (typeof this.options.customPlaceholder === "function") {
18940                    placeholder = this.options.customPlaceholder(placeholder, this.selectedCountryData);
18941                }
18942                this.telInput.attr("placeholder", placeholder);
18943            }
18944        },
18945        // called when the user selects a list item from the dropdown
18946        _selectListItem: function(listItem) {
18947            // update selected flag and active list item
18948            var flagChanged = this._setFlag(listItem.attr("data-country-code"));
18949            this._closeDropdown();
18950            this._updateDialCode(listItem.attr("data-dial-code"), true);
18951            // focus the input
18952            this.telInput.focus();
18953            // put cursor at end - this fix is required for FF and IE11 (with nationalMode=false i.e. auto inserting dial code), who try to put the cursor at the beginning the first time
18954            if (this.isGoodBrowser) {
18955                var len = this.telInput.val().length;
18956                this.telInput[0].setSelectionRange(len, len);
18957            }
18958            if (flagChanged) {
18959                this._triggerCountryChange();
18960            }
18961        },
18962        // close the dropdown and unbind any listeners
18963        _closeDropdown: function() {
18964            this.countryList.addClass("hide");
18965            // update the arrow
18966            this.selectedFlagInner.children(".iti-arrow").removeClass("up");
18967            // unbind key events
18968            $(document).off(this.ns);
18969            // unbind click-off-to-close
18970            $("html").off(this.ns);
18971            // unbind hover and click listeners
18972            this.countryList.off(this.ns);
18973            // remove menu from container
18974            if (this.options.dropdownContainer) {
18975                if (!this.isMobile) {
18976                    $(window).off("scroll" + this.ns);
18977                }
18978                this.dropdown.detach();
18979            }
18980            this.telInput.trigger("close:countrydropdown");
18981        },
18982        // check if an element is visible within it's container, else scroll until it is
18983        _scrollTo: function(element, middle) {
18984            var container = this.countryList, containerHeight = container.height(), containerTop = container.offset().top, containerBottom = containerTop + containerHeight, elementHeight = element.outerHeight(), elementTop = element.offset().top, elementBottom = elementTop + elementHeight, newScrollTop = elementTop - containerTop + container.scrollTop(), middleOffset = containerHeight / 2 - elementHeight / 2;
18985            if (elementTop < containerTop) {
18986                // scroll up
18987                if (middle) {
18988                    newScrollTop -= middleOffset;
18989                }
18990                container.scrollTop(newScrollTop);
18991            } else if (elementBottom > containerBottom) {
18992                // scroll down
18993                if (middle) {
18994                    newScrollTop += middleOffset;
18995                }
18996                var heightDifference = containerHeight - elementHeight;
18997                container.scrollTop(newScrollTop - heightDifference);
18998            }
18999        },
19000        // replace any existing dial code with the new one
19001        // Note: called from _selectListItem and setCountry
19002        _updateDialCode: function(newDialCode, hasSelectedListItem) {
19003            var inputVal = this.telInput.val(), newNumber;
19004            // save having to pass this every time
19005            newDialCode = "+" + newDialCode;
19006            if (inputVal.charAt(0) == "+") {
19007                // there's a plus so we're dealing with a replacement (doesn't matter if nationalMode or not)
19008                var prevDialCode = this._getDialCode(inputVal);
19009                if (prevDialCode) {
19010                    // current number contains a valid dial code, so replace it
19011                    newNumber = inputVal.replace(prevDialCode, newDialCode);
19012                } else {
19013                    // current number contains an invalid dial code, so ditch it
19014                    // (no way to determine where the invalid dial code ends and the rest of the number begins)
19015                    newNumber = newDialCode;
19016                }
19017            } else if (this.options.nationalMode || this.options.separateDialCode) {
19018                // don't do anything
19019                return;
19020            } else {
19021                // nationalMode is disabled
19022                if (inputVal) {
19023                    // there is an existing value with no dial code: prefix the new dial code
19024                    newNumber = newDialCode + inputVal;
19025                } else if (hasSelectedListItem || !this.options.autoHideDialCode) {
19026                    // no existing value and either they've just selected a list item, or autoHideDialCode is disabled: insert new dial code
19027                    newNumber = newDialCode;
19028                } else {
19029                    return;
19030                }
19031            }
19032            this.telInput.val(newNumber);
19033        },
19034        // try and extract a valid international dial code from a full telephone number
19035        // Note: returns the raw string inc plus character and any whitespace/dots etc
19036        _getDialCode: function(number) {
19037            var dialCode = "";
19038            // only interested in international numbers (starting with a plus)
19039            if (number.charAt(0) == "+") {
19040                var numericChars = "";
19041                // iterate over chars
19042                for (var i = 0; i < number.length; i++) {
19043                    var c = number.charAt(i);
19044                    // if char is number
19045                    if ($.isNumeric(c)) {
19046                        numericChars += c;
19047                        // if current numericChars make a valid dial code
19048                        if (this.countryCodes[numericChars]) {
19049                            // store the actual raw string (useful for matching later)
19050                            dialCode = number.substr(0, i + 1);
19051                        }
19052                        // longest dial code is 4 chars
19053                        if (numericChars.length == 4) {
19054                            break;
19055                        }
19056                    }
19057                }
19058            }
19059            return dialCode;
19060        },
19061        // get the input val, adding the dial code if separateDialCode is enabled
19062        _getFullNumber: function() {
19063            var val = $.trim(this.telInput.val()), dialCode = this.selectedCountryData.dialCode, prefix, numericVal = this._getNumeric(val), // normalized means ensure starts with a 1, so we can match against the full dial code
19064                normalizedVal = numericVal.charAt(0) == "1" ? numericVal : "1" + numericVal;
19065            if (this.options.separateDialCode) {
19066                prefix = "+" + dialCode;
19067            } else if (val.charAt(0) != "+" && val.charAt(0) != "1" && dialCode && dialCode.charAt(0) == "1" && dialCode.length == 4 && dialCode != normalizedVal.substr(0, 4)) {
19068                // if the user has entered a national NANP number, then ensure it includes the full dial code / area code
19069                prefix = dialCode.substr(1);
19070            } else {
19071                prefix = "";
19072            }
19073            return prefix + val;
19074        },
19075        // remove the dial code if separateDialCode is enabled
19076        _beforeSetNumber: function(number) {
19077            if (this.options.separateDialCode) {
19078                var dialCode = this._getDialCode(number);
19079                if (dialCode) {
19080                    // US dialCode is "+1", which is what we want
19081                    // CA dialCode is "+1 123", which is wrong - should be "+1" (as it has multiple area codes)
19082                    // AS dialCode is "+1 684", which is what we want
19083                    // Solution: if the country has area codes, then revert to just the dial code
19084                    if (this.selectedCountryData.areaCodes !== null) {
19085                        dialCode = "+" + this.selectedCountryData.dialCode;
19086                    }
19087                    // a lot of numbers will have a space separating the dial code and the main number, and some NANP numbers will have a hyphen e.g. +1 684-733-1234 - in both cases we want to get rid of it
19088                    // NOTE: don't just trim all non-numerics as may want to preserve an open parenthesis etc
19089                    var start = number[dialCode.length] === " " || number[dialCode.length] === "-" ? dialCode.length + 1 : dialCode.length;
19090                    number = number.substr(start);
19091                }
19092            }
19093            return this._cap(number);
19094        },
19095        // trigger the 'countrychange' event
19096        _triggerCountryChange: function() {
19097            this.telInput.trigger("countrychange", this.selectedCountryData);
19098        },
19099        /**************************
19100         *  SECRET PUBLIC METHODS
19101         **************************/
19102        // this is called when the geoip call returns
19103        handleAutoCountry: function() {
19104            if (this.options.initialCountry === "auto") {
19105                // we must set this even if there is an initial val in the input: in case the initial val is invali
19105d and they delete it - they should see their auto country
19106                this.defaultCountry = $.fn[pluginName].autoCountry;
19107                // if there's no initial value in the input, then update the flag
19108                if (!this.telInput.val()) {
19109                    this.setCountry(this.defaultCountry);
19110                }
19111                this.autoCountryDeferred.resolve();
19112            }
19113        },
19114        // this is called when the utils request completes
19115        handleUtils: function() {
19116            // if the request was successful
19117            if (window.intlTelInputUtils) {
19118                // if there's an initial value in the input, then format it
19119                if (this.telInput.val()) {
19120                    this._updateValFromNumber(this.telInput.val());
19121                }
19122                this._updatePlaceholder();
19123            }
19124            this.utilsScriptDeferred.resolve();
19125        },
19126        /********************
19127         *  PUBLIC METHODS
19128         ********************/
19129        // remove plugin
19130        destroy: function() {
19131            if (this.allowDropdown) {
19132                // make sure the dropdown is closed (and unbind listeners)
19133                this._closeDropdown();
19134                // click event to open dropdown
19135                this.selectedFlagInner.parent().off(this.ns);
19136                // label click hack
19137                this.telInput.closest("label").off(this.ns);
19138            }
19139            // unbind submit event handler on form
19140            if (this.options.autoHideDialCode) {
19141                var form = this.telInput.prop("form");
19142                if (form) {
19143                    $(form).off(this.ns);
19144                }
19145            }
19146            // unbind all events: key events, and focus/blur events if autoHideDialCode=true
19147            this.telInput.off(this.ns);
19148            // remove markup (but leave the original input)
19149            var container = this.telInput.parent();
19150            container.before(this.telInput).remove();
19151        },
19152        // get the extension from the current number
19153        getExtension: function() {
19154            if (window.intlTelInputUtils) {
19155                return intlTelInputUtils.getExtension(this._getFullNumber(), this.selectedCountryData.iso2);
19156            }
19157            return "";
19158        },
19159        // format the number to the given format
19160        getNumber: function(format) {
19161            if (window.intlTelInputUtils) {
19162                return intlTelInputUtils.formatNumber(this._getFullNumber(), this.selectedCountryData.iso2, format);
19163            }
19164            return "";
19165        },
19166        // get the type of the entered number e.g. landline/mobile
19167        getNumberType: function() {
19168            if (window.intlTelInputUtils) {
19169                return intlTelInputUtils.getNumberType(this._getFullNumber(), this.selectedCountryData.iso2);
19170            }
19171            return -99;
19172        },
19173        // get the country data for the currently selected flag
19174        getSelectedCountryData: function() {
19175            return this.selectedCountryData;
19176        },
19177        // get the validation error
19178        getValidationError: function() {
19179            if (window.intlTelInputUtils) {
19180                return intlTelInputUtils.getValidationError(this._getFullNumber(), this.selectedCountryData.iso2);
19181            }
19182            return -99;
19183        },
19184        // validate the input val - assumes the global function isValidNumber (from utilsScript)
19185        isValidNumber: function() {
19186            var val = $.trim(this._getFullNumber()), countryCode = this.options.nationalMode ? this.selectedCountryData.iso2 : "";
19187            return window.intlTelInputUtils ? intlTelInputUtils.isValidNumber(val, countryCode) : null;
19188        },
19189        // update the selected flag, and update the input val accordingly
19190        setCountry: function(countryCode) {
19191            countryCode = countryCode.toLowerCase();
19192            // check if already selected
19193            if (!this.selectedFlagInner.hasClass(countryCode)) {
19194                this._setFlag(countryCode);
19195                this._updateDialCode(this.selectedCountryData.dialCode, false);
19196                this._triggerCountryChange();
19197            }
19198        },
19199        // set the input value and update the flag
19200        setNumber: function(number) {
19201            // we must update the flag first, which updates this.selectedCountryData, which is used for formatting the number before displaying it
19202            var flagChanged = this._updateFlagFromNumber(number);
19203            this._updateValFromNumber(number);
19204            if (flagChanged) {
19205                this._triggerCountryChange();
19206            }
19207        },
19208        // set the placeholder number typ
19209        setPlaceholderNumberType: function(type) {
19210            this.options.placeholderNumberType = type;
19211            this._updatePlaceholder();
19212        }
19213    };
19214    // using https://github.com/jquery-boilerplate/jquery-boilerplate/wiki/Extending-jQuery-Boilerplate
19215    // (adapted to allow public functions)
19216    $.fn[pluginName] = function(options) {
19217        var args = arguments;
19218        // Is the first parameter an object (options), or was omitted,
19219        // instantiate a new instance of the plugin.
19220        if (options === undefined || typeof options === "object") {
19221            // collect all of the deferred objects for all instances created with this selector
19222            var deferreds = [];
19223            this.each(function() {
19224                if (!$.data(this, "plugin_" + pluginName)) {
19225                    var instance = new Plugin(this, options);
19226                    var instanceDeferreds = instance._init();
19227                    // we now have 2 deffereds: 1 for auto country, 1 for utils script
19228                    deferreds.push(instanceDeferreds[0]);
19229                    deferreds.push(instanceDeferreds[1]);
19230                    $.data(this, "plugin_" + pluginName, instance);
19231                }
19232            });
19233            // return the promise from the "master" deferred object that tracks all the others
19234            return $.when.apply(null, deferreds);
19235        } else if (typeof options === "string" && options[0] !== "_") {
19236            // If the first parameter is a string and it doesn't start
19237            // with an underscore or "contains" the `init`-function,
19238            // treat this as a call to a public method.
19239            // Cache the method call to make it possible to return a value
19240            var returns;
19241            this.each(function() {
19242                var instance = $.data(this, "plugin_" + pluginName);
19243                // Tests that there's already a plugin-instance
19244                // and checks that the requested public method exists
19245                if (instance instanceof Plugin && typeof instance[options] === "function") {
19246                    // Call the method of our plugin instance,
19247                    // and pass it the supplied arguments.
19248                    returns = instance[options].apply(instance, Array.prototype.slice.call(args, 1));
19249                }
19250                // Allow instances to be destroyed via the 'destroy' method
19251                if (options === "destroy") {
19252                    $.data(this, "plugin_" + pluginName, null);
19253                }
19254            });
19255            // If the earlier cached method gives a value back return the value,
19256            // otherwise return this to preserve chainability.
19257            return returns !== undefined ? returns : this;
19258        }
19259    };
19260    /********************
19261     *  STATIC METHODS
19262     ********************/
19263    // get the country data object
19264    $.fn[pluginName].getCountryData = function() {
19265        return allCountries;
19266    };
19267    // load the utils script
19268    $.fn[pluginName].loadUtils = function(path, utilsScriptDeferred) {
19269        if (!$.fn[pluginName].loadedUtilsScript) {
19270            // don't do this twice! (dont just check if window.intlTelInputUtils exists as if init plugin multiple times in quick succession, it may not have finished loading yet)
19271            $.fn[pluginName].loadedUtilsScript = true;
19272            // dont use $.getScript as it prevents caching
19273            $.ajax({
19274                type: "GET",
19275                url: path,
19276                complete: function() {
19277                    // tell all instances that the utils request is complete
19278                    $(".intl-tel-input input").intlTelInput("handleUtils");
19279                },
19280                dataType: "script",
19281                cache: true
19282            });
19283        } else if (utilsScriptDeferred) {
19284            utilsScriptDeferred.resolve();
19285        }
19286    };
19287    // default options
19288    $.fn[pluginName].defaults = defaults;
19289    // version
19290    $.fn[pluginName].version = "12.1.1";
19291    // Array of country objects for the flag dropdown.
19292    // Here is the criteria for the plugin to support a given country/territory
19293    // - It has an iso2 code: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
19294    // - It has it's own country calling code (it is not a sub-region of another country): https://en.wikipedia.org/wiki/List_of_country_calling_codes
19295    // - It has a flag in the region-flags project: https://github.com/behdad/region-flags/tree/gh-pages/png
19296    // - It is supported by libphonenumber (it must be listed on this page): https://github.com/googlei18n/libphonenumber/blob/master/resources/ShortNumberMetadata.xml
19297    // Each country array has the following information:
19298    // [
19299    //    Country name,
19300    //    iso2 code,
19301    //    International dial code,
19302    //    Order (if >1 country with same dial code),
19303    //    Area codes
19304    // ]
19305    var allCountries = [ [ "Afghanistan (‫افغانستان‬‎)", "af", "93" ], [ "Albania (Shqipëri)", "al", "355" ], [ "Algeria (‫الجزائر‬‎)", "dz", "213" ], [ "American Samoa", "as", "1684" ], [ "Andorra", "ad", "376" ], [ "Angola", "ao", "244" ], [ "Anguilla", "ai", "1264" ], [ "Antigua and Barbuda", "ag", "1268" ], [ "Argentina", "ar", "54" ], [ "Armenia (Հայաստան)", "am", "374" ], [ "Aruba", "aw", "297" ], [ "Australia", "au", "61", 0 ], [ "Austria (Österreich)", "at", "43" ], [ "Azerbaijan (Azərbaycan)", "az", "994" ], [ "Bahamas", "bs", "1242" ], [ "Bahrain (‫البحرين‬‎)", "bh", "973" ], [ "Bangladesh (বাংলাদেশ)", "bd", "880" ], [ "Barbados", "bb", "1246" ], [ "Belarus (Беларусь)", "by", "375" ], [ "Belgium (België)", "be", "32" ], [ "Belize", "bz", "501" ], [ "Benin (Bénin)", "bj", "229" ], [ "Bermuda", "bm", "1441" ], [ "Bhutan (འབྲུག)", "bt", "975" ], [ "Bolivia", "bo", "591" ], [ "Bosnia and Herzegovina (Босна и Херцеговина)", "ba", "387" ], [ "Botswana", "bw", "267" ], [ "Brazil (Brasil)", "br", "55" ], [ "British Indian Ocean Territory", "io", "246" ], [ "British Virgin Islands", "vg", "1284" ], [ "Brunei", "bn", "673" ], [ "Bulgaria (България)", "bg", "359" ], [ "Burkina Faso", "bf", "226" ], [ "Burundi (Uburundi)", "bi", "257" ], [ "Cambodia (កម្ពុជា)", "kh", "855" ], [ "Cameroon (Cameroun)", "cm", "237" ], [ "Canada", "ca", "1", 1, [ "204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", "418", "431", "437", "438", "450", "506", "514", "519", "548", "579", "581", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905" ] ], [ "Cape Verde (Kabu Verdi)", "cv", "238" ], [ "Caribbean Netherlands", "bq", "599", 1 ], [ "Cayman Islands", "ky", "1345" ], [ "Central African Republic (République centrafricaine)", "cf", "236" ], [ "Chad (Tchad)", "td", "235" ], [ "Chile", "cl", "56" ], [ "China (中国)", "cn", "86" ], [ "Christmas Island", "cx", "61", 2 ], [ "Cocos (Keeling) Islands", "cc", "61", 1 ], [ "Colombia", "co", "57" ], [ "Comoros (‫جزر القمر‬‎)", "km", "269" ], [ "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)", "cd", "243" ], [ "Congo (Republic) (Congo-Brazzaville)", "cg", "242" ], [ "Cook Islands", "ck", "682" ], [ "Costa Rica", "cr", "506" ], [ "Côte d’Ivoire", "ci", "225" ], [ "Croatia (Hrvatska)", "hr", "385" ], [ "Cuba", "cu", "53" ], [ "Curaçao", "cw", "599", 0 ], [ "Cyprus (Κύπρος)", "cy", "357" ], [ "Czech Republic (Česká republika)", "cz", "420" ], [ "Denmark (Danmark)", "dk", "45" ], [ "Djibouti", "dj", "253" ], [ "Dominica", "dm", "1767" ], [ "Dominican Republic (República Dominicana)", "do", "1", 2, [ "809", "829", "849" ] ], [ "Ecuador", "ec", "593" ], [ "Egypt (‫مصر‬‎)", "eg", "20" ], [ "El Salvador", "sv", "503" ], [ "Equatorial Guinea (Guinea Ecuatorial)", "gq", "240" ], [ "Eritrea", "er", "291" ], [ "Estonia (Eesti)", "ee", "372" ], [ "Ethiopia", "et", "251" ], [ "Falkland Islands (Islas Malvinas)", "fk", "500" ], [ "Faroe Islands (Føroyar)", "fo", "298" ], [ "Fiji", "fj", "679" ], [ "Finland (Suomi)", "fi", "358", 0 ], [ "France", "fr", "33" ], [ "French Guiana (Guyane française)", "gf", "594" ], [ "French Polynesia (Polynésie française)", "pf", "689" ], [ "Gabon", "ga", "241" ], [ "Gambia", "gm", "220" ], [ "Georgia (საქართველო)", "ge", "995" ], [ "Germany (Deutschland)", "de", "49" ], [ "Ghana (Gaana)", "gh", "233" ], [ "Gibraltar", "gi", "350" ], [ "Greece (Ελλάδα)", "gr", "30" ], [ "Greenland (Kalaallit Nun
19305aat)", "gl", "299" ], [ "Grenada", "gd", "1473" ], [ "Guadeloupe", "gp", "590", 0 ], [ "Guam", "gu", "1671" ], [ "Guatemala", "gt", "502" ], [ "Guernsey", "gg", "44", 1 ], [ "Guinea (Guinée)", "gn", "224" ], [ "Guinea-Bissau (Guiné Bissau)", "gw", "245" ], [ "Guyana", "gy", "592" ], [ "Haiti", "ht", "509" ], [ "Honduras", "hn", "504" ], [ "Hong Kong (香港)", "hk", "852" ], [ "Hungary (Magyarország)", "hu", "36" ], [ "Iceland (Ísland)", "is", "354" ], [ "India (भारत)", "in", "91" ], [ "Indonesia", "id", "62" ], [ "Iran (‫ایران‬‎)", "ir", "98" ], [ "Iraq (‫العراق‬‎)", "iq", "964" ], [ "Ireland", "ie", "353" ], [ "Isle of Man", "im", "44", 2 ], [ "Israel (‫ישראל‬‎)", "il", "972" ], [ "Italy (Italia)", "it", "39", 0 ], [ "Jamaica", "jm", "1876" ], [ "Japan (日本)", "jp", "81" ], [ "Jersey", "je", "44", 3 ], [ "Jordan (‫الأردن‬‎)", "jo", "962" ], [ "Kazakhstan (Казахстан)", "kz", "7", 1 ], [ "Kenya", "ke", "254" ], [ "Kiribati", "ki", "686" ], [ "Kosovo", "xk", "383" ], [ "Kuwait (‫الكويت‬‎)", "kw", "965" ], [ "Kyrgyzstan (Кыргызстан)", "kg", "996" ], [ "Laos (ລາວ)", "la", "856" ], [ "Latvia (Latvija)", "lv", "371" ], [ "Lebanon (‫لبنان‬‎)", "lb", "961" ], [ "Lesotho", "ls", "266" ], [ "Liberia", "lr", "231" ], [ "Libya (‫ليبيا‬‎)", "ly", "218" ], [ "Liechtenstein", "li", "423" ], [ "Lithuania (Lietuva)", "lt", "370" ], [ "Luxembourg", "lu", "352" ], [ "Macau (澳門)", "mo", "853" ], [ "Macedonia (FYROM) (Македонија)", "mk", "389" ], [ "Madagascar (Madagasikara)", "mg", "261" ], [ "Malawi", "mw", "265" ], [ "Malaysia", "my", "60" ], [ "Maldives", "mv", "960" ], [ "Mali", "ml", "223" ], [ "Malta", "mt", "356" ], [ "Marshall Islands", "mh", "692" ], [ "Martinique", "mq", "596" ], [ "Mauritania (‫موريتانيا‬‎)", "mr", "222" ], [ "Mauritius (Moris)", "mu", "230" ], [ "Mayotte", "yt", "262", 1 ], [ "Mexico (México)", "mx", "52" ], [ "Micronesia", "fm", "691" ], [ "Moldova (Republica Moldova)", "md", "373" ], [ "Monaco", "mc", "377" ], [ "Mongolia (Монгол)", "mn", "976" ], [ "Montenegro (Crna Gora)", "me", "382" ], [ "Montserrat", "ms", "1664" ], [ "Morocco (‫المغرب‬‎)", "ma", "212", 0 ], [ "Mozambique (Moçambique)", "mz", "258" ], [ "Myanmar (Burma) (မြန်မာ)", "mm", "95" ], [ "Namibia (Namibië)", "na", "264" ], [ "Nauru", "nr", "674" ], [ "Nepal (नेपाल)", "np", "977" ], [ "Netherlands (Nederland)", "nl", "31" ], [ "New Caledonia (Nouvelle-Calédonie)", "nc", "687" ], [ "New Zealand", "nz", "64" ], [ "Nicaragua", "ni", "505" ], [ "Niger (Nijar)", "ne", "227" ], [ "Nigeria", "ng", "234" ], [ "Niue", "nu", "683" ], [ "Norfolk Island", "nf", "672" ], [ "North Korea (조선 민주주의 인민 공화국)", "kp", "850" ], [ "Northern Mariana Islands", "mp", "1670" ], [ "Norway (Norge)", "no", "47", 0 ], [ "Oman (‫عُمان‬‎)", "om", "968" ], [ "Pakistan (‫پاکستان‬‎)", "pk", "92" ], [ "Palau", "pw", "680" ], [ "Palestine (‫فلسطين‬‎)", "ps", "970" ], [ "Panama (Panamá)", "pa", "507" ], [ "Papua New Guinea", "pg", "675" ], [ "Paraguay", "py", "595" ], [ "Peru (Perú)", "pe", "51" ], [ "Philippines", "ph", "63" ], [ "Poland (Polska)", "pl", "48" ], [ "Portugal", "pt", "351" ], [ "Puerto Rico", "pr", "1", 3, [ "787", "939" ] ], [ "Qatar (‫قطر‬‎)", "qa", "974" ], [ "Réunion (La Réunion)", "re", "262", 0 ], [ "Romania (România)", "ro", "40" ], [ "Russia (Россия)", "ru", "7", 0 ], [ "Rwanda", "rw", "250" ], [ "Saint Barthélemy", "bl", "590", 1 ], [ "Saint Helena", "sh", "290" ], [ "Saint Kitts and Nevis", "kn", "1869" ], [ "Saint Lucia", "lc", "1758" ], [ "Saint Martin (Saint-Martin (partie française))", "mf", "590", 2 ], [ "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)", "pm", "508" ], [ "Saint Vincent and the Grenadines", "vc", "1784" ], [ "Samoa", "ws", "685" ], [ "San Marino", "sm", "378" ], [ "São Tomé and Príncipe (São Tomé e Príncipe)", "st", "239" ], [ "Saudi Arabia (‫المملكة العربية السعودية‬‎)", "sa", "966" ], [ "Senegal (Sénégal)", "sn", "221" ], [ "Serbia (Србија)", "rs", "381" ], [ "Seychelles", "sc", "248" ], [ "Sierra Leone", "sl", "232" ], [ "Singapore", "sg", "65" ], [ "Sint Maarten", "sx", "1721" ], [ "Slovakia (Slovensko)", "sk", "421" ], [ "Slovenia (Slovenija)", "si", "386" ], [ "Solomon Islands", "sb", "677" ], [ "Somalia (Soomaaliya)", "so", "252" ], [ "South Africa", "za", "27" ], [ "South Korea (대한민국)", "kr", "82" ], [ "South Sudan (‫جنوب السودان‬‎)", "ss", "211" ], [ "Spain (España)", "es", "34" ], [ "Sri Lanka (ශ්‍රී ලංකාව)", "lk", "94" ], [ "Sudan (‫السودان‬‎)", "sd", "249" ], [ "Suriname", "sr", "597" ], [ "Svalbard and Jan Mayen", "sj", "47", 1 ], [ "Swaziland", "sz", "268" ], [ "Sweden (Sverige)", "se", "46" ], [ "Switzerland (Schweiz)", "ch", "41" ], [ "Syria (‫سوريا‬‎)", "sy", "963" ], [ "Taiwan (台灣)", "tw", "886" ], [ "Tajikistan", "tj", "992" ], [ "Tanzania", "tz", "255" ], [ "Thailand (ไทย)", "th", "66" ], [ "Timor-Leste", "tl", "670" ], [ "Togo", "tg", "228" ], [ "Tokelau", "tk", "690" ], [ "Tonga", "to", "676" ], [ "Trinidad and Tobago", "tt", "1868" ], [ "Tunisia (‫تونس‬‎)", "tn", "216" ], [ "Turkey (Türkiye)", "tr", "90" ], [ "Turkmenistan", "tm", "993" ], [ "Turks and Caicos Islands", "tc", "1649" ], [ "Tuvalu", "tv", "688" ], [ "U.S. Virgin Islands", "vi", "1340" ], [ "Uganda", "ug", "256" ], [ "Ukraine (Україна)", "ua", "380" ], [ "United Arab Emirates (‫الإمارات العربية المتحدة‬‎)", "ae", "971" ], [ "United Kingdom", "gb", "44", 0 ], [ "United States", "us", "1", 0 ], [ "Uruguay", "uy", "598" ], [ "Uzbekistan (Oʻzbekiston)", "uz", "998" ], [ "Vanuatu", "vu", "678" ], [ "Vatican City (Città del Vaticano)", "va", "39", 1 ], [ "Venezuela", "ve", "58" ], [ "Vietnam (Việt Nam)", "vn", "84" ], [ "Wallis and Futuna (Wallis-et-Futuna)", "wf", "681" ], [ "Western Sahara (‫الصحراء الغربية‬‎)", "eh", "212", 1 ], [ "Yemen (‫اليمن‬‎)", "ye", "967" ], [ "Zambia", "zm", "260" ], [ "Zimbabwe", "zw", "263" ], [ "Åland Islands", "ax", "358", 1 ] ];
19306    // loop over all of the countries above
19307    for (var i = 0; i < allCountries.length; i++) {
19308        var c = allCountries[i];
19309        allCountries[i] = {
19310            name: c[0],
19311            iso2: c[1],
19312            dialCode: c[2],
19313            priority: c[3] || 0,
19314            areaCodes: c[4] || null
19315        };
19316    }
19317});
19318
19319(function(){for(var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},l="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,m=["String","prototype","repeat"],n=0;n<m.length-1;n++){var p=m[n];p in l||(l[p]={});l=l[p]}
19320    var ba=m[m.length-1],r=l[ba],t=r?r:function(a){var b;if(null==this)throw new TypeError("The 'this' value for String.prototype.repeat must not be null or undefined");b=this+"";if(0>a||1342177279<a)throw new RangeError("Invalid count value");a|=0;for(var c="";a;)if(a&1&&(c+=b),a>>>=1)b+=b;return c};t!=r&&null!=t&&aa(l,ba,{configurable:!0,writable:!0,value:t});var ca=this;function u(a){return"string"==typeof a}
19321    function v(a,b){var c=a.split("."),d=ca;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]?d=d[e]:d=d[e]={}:d[e]=b}function w(a,b){function c(){}c.prototype=b.prototype;a.aa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.$=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var x=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(u(a))return u(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};function y(a,b){a.sort(b||da)}function da(a,b){return a>b?1:a<b?-1:0};function ea(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};function fa(a,b){this.a=a;this.h=!!b.i;this.b=b.c;this.m=b.type;this.l=!1;switch(this.b){case ga:case ha:case ia:case ja:case ka:case la:case ma:this.l=!0}this.g=b.defaultValue}var ma=1,la=2,ga=3,ha=4,ia=6,ja=16,ka=18;
19321function na(a,b){this.b=a;this.a={};for(var c=0;c<b.length;c++){var d=b[c];this.a[d.a]=d}}function oa(a){a=ea(a.a);y(a,function(a,c){return a.a-c.a});return a};function A(){this.a={};this.g=this.f().a;this.b=this.h=null}A.prototype.has=function(a){return null!=this.a[a.a]};A.prototype.get=function(a,b){return B(this,a.a,b)};A.prototype.set=function(a,b){C(this,a.a,b)};
19322    function pa(a,b){for(var c=oa(a.f()),d=0;d<c.length;d++){var e=c[d],f=e.a;if(null!=b.a[f]){a.b&&delete a.b[e.a];var g=11==e.b||10==e.b;if(e.h)for(var e=D(b,f),h=0;h<e.length;h++){var k=a,q=f,z=g?e[h].clone():e[h];k.a[q]||(k.a[q]=[]);k.a[q].push(z);k.b&&delete k.b[q]}else e=E(b,f),g?(g=E(a,f))?pa(g,e):C(a,f,e.clone()):C(a,f,e)}}}A.prototype.clone=function(){var a=new this.constructor;a!=this&&(a.a={},a.b&&(a.b={}),pa(a,this));return a};
19323    function E(a,b){var c=a.a[b];if(null==c)return null;if(a.h){if(!(b in a.b)){var d=a.h,e=a.g[b];if(null!=c)if(e.h){for(var f=[],g=0;g<c.length;g++)f[g]=d.a(e,c[g]);c=f}else c=d.a(e,c);return a.b[b]=c}return a.b[b]}return c}function B(a,b,c){var d=E(a,b);return a.g[b].h?d[c||0]:d}function F(a,b){var c;if(null!=a.a[b])c=B(a,b,void 0);else a:{c=a.g[b];if(void 0===c.g){var d=c.m;if(d===Boolean)c.g=!1;else if(d===Number)c.g=0;else if(d===String)c.g=c.l?"0":"";else{c=new d;break a}}c=c.g}return c}
19324    function D(a,b){return E(a,b)||[]}function G(a,b){return a.g[b].h?null!=a.a[b]?a.a[b].length:0:null!=a.a[b]?1:0}function C(a,b,c){a.a[b]=c;a.b&&(a.b[b]=c)}function H(a,b){var c=[],d;for(d in b)0!=d&&c.push(new fa(d,b[d]));return new na(a,c)};function I(){}I.prototype.b=function(a){new a.b;throw Error("Unimplemented");};I.prototype.a=function(a,b){if(11==a.b||10==a.b)return b instanceof A?b:this.b(a.m.prototype.f(),b);if(14==a.b){if(u(b)&&qa.test(b)){var c=Number(b);if(0<c)return c}return b}if(!a.l)return b;c=a.m;if(c===String){if("number"==typeof b)return String(b)}else if(c===Number&&u(b)&&("Infinity"===b||"-Infinity"===b||"NaN"===b||qa.test(b)))return Number(b);return b};var qa=/^-?[0-9]+$/;function J(){}w(J,I);J.prototype.b=function(a,b){var c=new a.b;c.h=this;c.a=b;c.b={};return c};function ra(){}w(ra,J);ra.prototype.a=function(a,b){return 8==a.b?!!b:I.prototype.a.apply(this,arguments)};function K(a,b){null!=a&&this.a.apply(this,arguments)}K.prototype.b="";K.prototype.set=function(a){this.b=""+a};K.prototype.a=function(a,b,c){this.b+=String(a);if(null!=b)for(var d=1;d<arguments.length;d++)this.b+=arguments[d];return this};K.prototype.toString=function(){return this.b};/*
19325
19326 Protocol Buffer 2 Copyright 2008 Google Inc.
19327 All other code copyright its respective owners.
19328 Copyright (C) 2010 The Libphonenumber Authors
19329
19330 Licensed under the Apache License, Version 2.0 (the "License");
19331 you may not use this file except in compliance with the License.
19332 You may obtain a copy of the License at
19333
19334 http://www.apache.org/licenses/LICENSE-2.0
19335
19336 Unless required by applicable law or agreed to in writing, software
19337 distributed under the License is distributed on an "AS IS" BASIS,
19338 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19339 See the License for the specific language governing permissions and
19340 limitations under the License.
19341*/
19342    function L(){A.call(this)}w(L,A);var sa=null;function M(){A.call(this)}w(M,A);var ta=null;function N(){A.call(this)}w(N,A);var ua=null;
19343    L.prototype.f=function(){var a=sa;a||(sa=a=H(L,{0:{name:"NumberFormat",j:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",i:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,defaultValue:!1,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}}));return a};L.f=L.prototype.f;
19344    M.prototype.f=function(){var a=ta;a||(ta=a=H(M,{0:{name:"PhoneNumberDesc",j:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},9:{name:"possible_length",i:!0,c:5,type:Number},10:{name:"possible_length_local_only",i:!0,c:5,type:Number},6:{name:"example_number",c:9,type:String}}));return a};M.f=M.prototype.f;
19345    N.prototype.f=function(){var a=ua;a||(ua=a=H(N,{0:{name:"PhoneMetadata",j:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:M},2:{name:"fixed_line",c:11,type:M},3:{name:"mobile",c:11,type:M},4:{name:"toll_free",c:11,type:M},5:{name:"premium_rate",c:11,type:M},6:{name:"shared_cost",c:11,type:M},7:{name:"personal_number",c:11,type:M},8:{name:"voip",c:11,type:M},21:{name:"pager",c:11,type:M},25:{name:"uan",c:11,type:M},27:{name:"emergency",c:11,type:M},28:{name:"voicemail",c:11,type:M},
19346        24:{name:"no_international_dialling",c:11,type:M},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,
19347            type:Boolean},19:{name:"number_format",i:!0,c:11,type:L},20:{name:"intl_number_format",i:!0,c:11,type:L},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}}));return a};N.f=N.prototype.f;function O(){A.call(this)}w(O,A);var va=null,wa={w:0,v:1,u:5,s:10,o:20};
19348    O.prototype.f=function(){var a=va;a||(va=a=H(O,{0:{name:"PhoneNumber",j:"i18n.phonenumbers.PhoneNumber"},1:{name:"country_code",required:!0,c:5,type:Number},2:{name:"national_number",required:!0,c:4,type:Number},3:{name:"extension",c:9,type:String},4:{name:"italian_leading_zero",c:8,type:Boolean},8:{name:"number_of_leading_zeros",c:5,defaultValue:1,type:Number},5:{name:"raw_input",c:9,type:String},6:{name:"country_code_source",c:14,defaultValue:0,type:wa},7:{name:"preferred_domestic_carrier_code",
19349        c:9,type:String}}));return a};O.ctor=O;O.ctor.f=O.prototype.f;/*
19350 Copyright (C) 2010 The Libphonenumber Authors
19351 Licensed under the Apache License, Version 2.0 (the "License");
19352 you may not use this file except in compliance with the License.
19353 You may obtain a copy of the License at
19354 http://www.apache.org/licenses/LICENSE-2.0
19355 Unless required by applicable law or agreed to in writing, software
19356 distributed under the License is distributed on an "AS IS" BASIS,
19357 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19358 See the License for the specific language governing permissions and
19359 limitations under the License.
19360*/
19361    var P={1:"US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],
19362        86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],
19363        253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],385:["HR"],386:["SI"],
19364        387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],
19365        692:["MH"],800:["001"],808:["001"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],870:["001"],878:["001"],880:["BD"],881:["001"],882:["001"],883:["001"],886:["TW"],888:["001"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],979:["001"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},xa={AC:[,[,,"[46]\\d{4}|[01589]\\d{5}",,,,,,,[5,6]],
19366        [,,"6[2-467]\\d{3}",,,,"62889",,,[5]],[,,"4\\d{4}",,,,"40123",,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AC",247,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"[01589]\\d{5}",,,,"542011",,,[6]],,,[,,,,,,,,,[-1]]],AD:[,[,,"[16]\\d{5,8}|[37-9]\\d{5}",,,,,,,[6,8,9]],[,,"[78]\\d{5}",,,,"712345",,,[6]],[,,"(?:3\\d|6(?:[0-8]|90\\d{2}))\\d{4}",,,,"312345",,,[6,9]],[,,"180[02]\\d{4}",,,,"18001234",,,[8]],[,,"[19]\\d{5}",,,,"912345",,,[6]],[,,,,,,,,,[-1]],
19367        [,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AD",376,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[137-9]|6[0-8]"]],[,"(\\d{4})(\\d{4})","$1 $2",["180","180[02]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["690"]]],,[,,,,,,,,,[-1]],,,[,,"1800\\d{4}",,,,"18000000",,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AE:[,[,,"[2-79]\\d{7,8}|800\\d{2,9}",,,,,,,[5,6,7,8,9,10,11,12]],[,,"[2-4679][2-8]\\d{6}",,,,"22345678",,,[8],[7]],[,,"5[024-68]\\d{7}",,,,"501234567",,,[9]],[,,"400\\d{6}|800\\d{2,9}",,,,"800123456"],[,,"900[02]\\d{5}",
19368        ,,,"900234567",,,[9]],[,,"700[05]\\d{5}",,,,"700012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AE",971,"00","0",,,"0",,,,[[,"([2-4679])(\\d{3})(\\d{4}
19368)","$1 $2 $3",["[2-4679][2-8]"],"0$1"],[,"(5\\d)(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],[,"([479]00)(\\d)(\\d{5})","$1 $2 $3",["[479]0"],"$1"],[,"([68]00)(\\d{2,9})","$1 $2",["60|8"],"$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"600[25]\\d{5}",,,,"600212345",,,[9]],,,[,,,,,,,,,[-1]]],AF:[,[,,"[2-7]\\d{8}",,,,,,,[9],[7]],[,,"(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}",
19369        ,,,"234567890",,,,[7]],[,,"7(?:[014-9]\\d|2[89]|30)\\d{6}",,,,"701234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AF",93,"00","0",,,"0",,,,[[,"([2-7]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AG:[,[,,"[2589]\\d{9}",,,,,,,[10],[7]],[,,"268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}",,,,"2684601234",,,,[7]],[,,"268(?:464|7(?:1[3-9]|2\\d|3[246]|64|7[0-689]|8[02-68]))\\d{4}",,,,"2684641234",,
19370        ,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,"26848[01]\\d{4}",,,,"2684801234",,,,[7]],"AG",1,"011","1",,,"1",,,,,,[,,"26840[69]\\d{4}",,,,"2684061234",,,,[7]],,"268",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AI:[,[,,"[2589]\\d{9}",,,,,,,[10],[7]],[,,"2644(?:6[12]|9[78])\\d{4}",,,,"2644612345",,,,[7]],[,,"264(?:235|476|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}",
19371        ,,,"2642351234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"AI",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"264",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AL:[,[,,"[2-57]\\d{7}|6\\d{8}|8\\d{5,7}|9\\d{5}",,,,,,,[6,7,8,9],[5]],[,,"(?:2(?:1(?:0[2-9]|[1-9]\\d)|[247]\\d{2}|[35][2-9]\\d|[68](?:0[2-9]|[1-9]\\d)|9(?:[089][2-9]|[1-7]\\d))|3(?:1(?:[04-9][2-9]|[1-3]\\d)|[2-6]\\d{2}|[79](?:[09][2-9]|[1-8]\\d)|8(?:0[2-9]|[1-9]\\d))|4\\d{3}|5(?:1(?:[05-9][2-9]|[1-4]\\d)|[2-578]\\d{2}|6(?:[06-9][2-9]|[1-5]\\d)|9(?:[089][2-9]|[1-7]\\d))|8(?:[19](?:[06-9][2-9]|[1-5]\\d)|[2-6]\\d{2}|[78](?:[089][2-9]|[1-7]\\d)))\\d{4}",
19372        ,,,"22345678",,,[8],[5,6,7]],[,,"6(?:[689][2-9]|7[2-6])\\d{6}",,,,"662123456",,,[9]],[,,"800\\d{4}",,,,"8001234",,,[7]],[,,"900[1-9]\\d{2}",,,,"900123",,,[6]],[,,"808[1-9]\\d{2}",,,,"808123",,,[6]],[,,"700[2-9]\\d{4}",,,,"70021234",,,[8]],[,,,,,,,,,[-1]],"AL",355,"00","0",,,"0",,,,[[,"(4)(\\d{3})(\\d{4})","$1 $2 $3",["4[0-6]"],"0$1"],[,"(6\\d)(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4[7-9]"],"0$1"],[,"(\\d{3})(\\d{3,5})","$1 $2",["[235][16-9]|[79]|8[016-9]"],
19373        "0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AM:[,[,,"[1-9]\\d{7}",,,,,,,[8],[5,6]],[,,"(?:1[0-2]\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2|47\\d)\\d{5}",,,,"10123456",,,,[5,6]],[,,"(?:4[1349]|55|77|88|9[1-9])\\d{6}",,,,"77123456"],[,,"800\\d{5}",,,,"80012345"],[,,"90[016]\\d{5}",,,,"90012345"],[,,"80[1-4]\\d{5}",,,,"80112345"],[,,,,,,,,,[-1]],[,,"60(?:2[078]|[3-7]\\d|8[0-5])\\d{4}",,,,"60271234"],"AM",374,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{6})","$1 $2",
19374        ["1|47"],"(0$1)"],[,"(\\d{2})(\\d{6})","$1 $2",["4[1349]|[5-7]|88|9[1-9]"],"0$1"],[,"(\\d{3})(\\d{5})","$1 $2",["[23]"],"(0$1)"],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8|90"],"0 $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AO:[,[,,"[29]\\d{8}",,,,,,,[9]],[,,"2\\d(?:[26-9]\\d|\\d[26-9])\\d{5}",,,,"222123456"],[,,"9[1-49]\\d{7}",,,,"923123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AO",244,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})",
19375        "$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AR:[,[,,"11\\d{8}|[2368]\\d{9}|9\\d{10}",,,,,,,[10,11],[6,7,8]],[,,"11\\d{8}|(?:2(?:2(?:[013]\\d|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[067]\\d)|4(?:7[3-8]|9\\d)|6(?:[01346]\\d|2[24-6]|5[15-8])|80\\d|9(?:[0124789]\\d|3[1-6]|5[234]|6[2-46]))|3(?:3(?:2[79]|6\\d|8[2578])|4(?:[78]\\d|0[0124-9]|[1-35]\\d|4[24-7]|6[02-9]|9[123678])|5(?:[138]\\d|2[1245]|4[1-9]|6[2-4]|7[1-6])|6[24]\\d|7(?:[
vendor: 23,834 bytes, lines 19375-19417
193750469]\\d|1[1568]|2[013-9]|3[145]|5[14-8]|7[2-57]|8[0-24-9])|8(?:[013578]\\d|2[15-7]|4[13-6]|6[1-357-9]|9[124]))|670\\d)\\d{6}",
19376        ,,,"1123456789",,,[10],[6,7,8]],[,,"675\\d{7}|9(?:11[2-9]\\d{7}|(?:2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[12358]|5[138]|6[24]|7[069]|8[013578]))[2-9]\\d{6}|\\d{4}[2-9]\\d{5})",,,,"91123456789",,,,[6,7,8]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,"60[04579]\\d{7}",,,,"6001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AR",54,"00","0",,,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))?15)?",
19377        "9$1",,,[[,"([68]\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],[,"(\\d{2})(\\d{4})","$1-$2",["[2-9]"],"$1"],[,"(\\d{3})(\\d{4})","$1-$2",["[2-9]"],"$1"],[,"(\\d{4})(\\d{4})","$1-$2",["[2-9]"],"$1"],[,"(9)(11)(\\d{4})(\\d{4})","$2 15-$3-$4",["911"],"0$1"],[,"(9)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9(?:2[2-4689]|3[3-8])","9(?:2(?:2[013]|3[067]|49|6[01346]|8|9[147-9])|3(?:36|4[1-358]|5[138]|6|7[069]|8[013578]))","9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[4-6]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))",
19378            "9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1-39])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))"],"0$1"],[,"(9)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9[23]"],"0$1"],[,"(11)(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["2(?:2[013]|3[067]|49|6[01346]|8|9[147-9])|3(?:36|4[1-358]|5[138]|6|7[069]|8[013578])","2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[4-6]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))",
19379            "2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1-39])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))"],"0$1",,1],[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["[23]"],"0$1",,1],[,"(\\d{3})","$1",["1[0-2]|911"],"$1"]],[[,"([68]\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],[,"(9)(11)(\\d{4})(\\d{4})","$1 $2 $3-$4",["911"]],[,"(9)(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3-$4",["9(?:2[2-4689]|3[3-8])","9(?:2(?:2[013]|3[067]|49|6[01346]|8|9[147-9])|3(?:36|4[1-358]|5[138]|6|7[069]|8[013578]))",
19380            "9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[4-6]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))","9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1-39])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))"]],[,"(9)(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3-$4",["9[23]"]],[,"(11)(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",
19381            ,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["2(?:2[013]|3[067]|49|6[01346]|8|9[147-9])|3(?:36|4[1-358]|5[138]|6|7[069]|8[013578])","2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[4-6]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))","2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1-39])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))"],
19382            "0$1",,1],[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["[23]"],"0$1",,1]],[,,,,,,,,,[-1]],,,[,,"810\\d{7}",,,,"8101234567",,,[10]],[,,"810\\d{7}",,,,"8101234567",,,[10]],,,[,,,,,,,,,[-1]]],AS:[,[,,"[5689]\\d{9}",,,,,,,[10],[7]],[,,"6846(?:22|33|44|55|77|88|9[19])\\d{4}",,,,"6846221234",,,,[7]],[,,"684(?:2(?:5[2468]|72)|7(?:3[13]|70))\\d{4}",,,,"6847331234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",
19383        ,,,"5002345678"],[,,,,,,,,,[-1]],"AS",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"684",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AT:[,[,,"[1-9]\\d{3,12}",,,,,,,[4,5,6,7,8,9,10,11,12,13],[3]],[,,"1\\d{3,12}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-8]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|63|7[1368]|8[2457])|5(?:12|2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[1-35-8]|5[468]|62)|7(?:2[1-8]|3[25]|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{3,10}",
19384        ,,,"1234567890",,,,[3]],[,,"6(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d{4,10}",,,,"664123456",,,[7,8,9,10,11,12,13]],[,,"800\\d{6,10}",,,,"800123456",,,[9,10,11,12,13]],[,,"9(?:0[01]|3[019])\\d{6,10}",,,,"900123456",,,[9,10,11,12,13]],[,,"8(?:10\\d|2(?:[01]\\d|8\\d?))\\d{5,9}",,,,"810123456",,,[8,9,10,11,12,13]],[,,,,,,,,,[-1]],[,,"780\\d{6,10}",,,,"780123456",,,[9,10,11,12,13]],"AT",43,"00","0",,,"0",,,,[[,"(116\\d{3})","$1",["116"],"$1"],[,"(1)(\\d{3,12})","$1 $2",["1"],"0$1"],[,"(5\\d)(\\d{3,5})","$1 $2",
19385        ["5[079]"],"0$1"],[,"(5\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["5[079]"],"0$1"],[,"(5\\d)(\\d{4})(\\d{4,7})","$1 $2 $3",["5[079]"],"0$1"],[,"(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:[28]0|32)|[89]"],"0$1"],[,"(\\d{4})(\\d{3,9})","$1 $2",["2|3(?:1[1-578]|[3-8])|4[2378]|5[2-6]|6(?:[12]|4[1-9]|5[468])|7(?:[24][1-8]|35|[5-79])"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"5(?:(?:0[1-9]|17)\\d{2,10}|[79]\\d{3,11})|720\\d{6,10}",,,,"50123",,,[5,6,7,8,9,10,11,12,13]],,,[,,,,,,
19386        ,,,[-1]]],AU:[,[,,"1\\d{4,9}|[2-578]\\d{8}",,,,,,,[5,6,7,8,9,10]],[,,"[237]\\d{8}|8(?:[6-8]\\d{3}|9(?:[02-9]\\d{2}|1(?:[0-57-9]\\d|6[0135-9])))\\d{4}",,,,"212345678",,,[9],[8]],[,,"14(?:5\\d|71)\\d{5}|4(?:[0-3]\\d|4[47-9]|5[0-25-9]|6[6-9]|7[02-9]|8[147-9]|9[017-9])\\d{6}",,,,"412345678",,,[9]],[,,"180(?:0\\d{3}|2)\\d{3}",,,,"1800123456",,,[7,10]],[,,"19(?:0[0126]\\d|[679])\\d{5}",,,,"1900123456",,,[8,10]],[,,"13(?:00\\d{3}|45[0-4]|\\d)\\d{3}",,,,"1300123456",,,[6,8,10]],[,,"500\\d{6}",,,,"500123456",
19387        ,,[9]],[,,"550\\d{6}",,,,"550123456",,,[9]],"AU",61,"(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011)|001[14-689]","0",,,"0",,"0011",,[[,"([2378])(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|[45]"],"0$1"],[,"(16)(\\d{3,4})","$1 $2",["16"],"0$1"],[,"(16)(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],[,"(1[389]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["1[389]0","1(?:[38]0|9)0"],"$1"],[,"(180)(2\\d{3})","$1 $2",["180","1802"],"$1"],[,"(19\\d)(\\d{3})","$1 $2",["19[13]"],
19388        "$1"],[,"(19\\d{2})(\\d{4})","$1 $2",["19[679]"],"$1"],[,"(13)(\\d{2})(\\d{2})","$1 $2 $3",["13[1-9]"],"$1"]],,[,,"16\\d{3,7}",,,,"1612345",,,[5,6,7,8,9]],1,,[,,"1(?:3(?:00\\d{3}|45[0-4]|\\d)\\d{3}|80(?:0\\d{6}|2\\d{3}))",,,,"1300123456",,,[6,7,8,10]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AW:[,[,,"[25-9]\\d{6}",,,,,,,[7]],[,,"5(?:2\\d|8[1-9])\\d{4}",,,,"5212345"],[,,"(?:5(?:6\\d|9[2-478])|6(?:[039]0|22|4[01]|6[0-2])|7[34]\\d|9(?:6[45]|9[4-8]))\\d{4}",,,,"5601234"],[,,"800\\d{4}",,,,"8001234"],[,,"900\\d{4}",
19389        ,,,"9001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"28\\d{5}|501\\d{4}",,,,"5011234"],"AW",297,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AX:[,[,,"[15]\\d{6,9}|2\\d{4,9}|3\\d{5,9}|4\\d{7,10}|[67]\\d{7,9}|8\\d{7,8}",,,,,,,[5,6,7,8,9,10,11]],[,,"18[1-8]\\d{4,6}",,,,"181234567",,,[7,8,9]],[,,"4(?:[0-8]\\d{6,8}|9\\d{9})|50\\d{6,8}",,,,"412345678",,,[8,9,10,11]],[,,"800\\d{5,6}",,,,"800123456",,,[8,9]],[,,"[67]00\\d{5,6}",,,,"600123456",
19390        ,,[8,9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AX",358,"00|99(?:[02469]|5(?:11|33|5[59]|88|9[09]))","0",,,"0",,"00",,,,[,,,,,,,,,[-1]],,,[,,"100\\d{4,6}|20(?:0\\d{4,6}|2[023]\\d{4,5}|9[89]\\d{1,6})|300\\d{3,7}|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{5,6})",,,,"1001234",,,[5,6,7,8,9,10]],[,,"10(?:0\\d{4,6}|[1-46-9]\\d{5,7}|5\\d{4,7})|2(?:0(?:0\\d{4,6}|[1346-8]\\d{5,7}|2(?:[023]\\d{4,5}|[14-9]\\d{4,6})|5(?:\\d{3}|\\d{5,7})|9(?:[0-7]\\d{4,6}|[89]\\d{1,6}))|9\\d{5,8})|3(?:0(?:0\\d{3,7}|[1-57-9]\\d{5,7}|6(?:\\d{3}|\\d{5,7}))|44\\d{3}|93\\d{5,7})|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{5,6})",
19391        ,,,"10112345",,,[5,6,7,8,9,10]],,,[,,,,,,,,,[-1]]],AZ:[,[,,"[1-9]\\d{8}",,,,,,,[9],[7]],[,,"(?:1[28]\\d{3}|2(?:02|1[24]|2[2-4]|33|[45]2|6[23])\\d{2}|365(?:[0-46-9]\\d|5[0-35-9]))\\d{4}",,,,"123123456",,,,[7]],[,,"(?:36554|(?:4[04]|5[015]|60|7[07])\\d{3})\\d{4}",,,,"401234567"],[,,"88\\d{7}",,,,"881234567"],[,,"900200\\d{3}",,,,"900200123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AZ",994,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2(?:[0-36]|[45]2)|365"],
19392        "(0$1)"],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[4-8]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BA:[,[,,"[3-9]\\d{7,8}",,,,,,,[8,9],[6]],[,,"(?:[35]\\d|49)\\d{6}",,,,"30123456",,,[8],[6]],[,,"6(?:0(?:3\\d|40)|[1-356]\\d|44[0-6]|71[137])\\d{5}",,,,"61123456"],[,,"8[08]\\d{6}",,,,"80123456",,,[8]],[,,"9[0246]\\d{6}",,,,"90123456",,,[8]],[,,"8[12]\\d{6}",,,,"82123456",,,[8]],[,,,,,,,,,
19393        [-1]],[,,,,,,,,,[-1]],"BA",387,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-356]|[7-9]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6[047]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"70[23]\\d{5}",,,,"70223456",,,[8]],,,[,,,,,,,,,[-1]]],BB:[,[,,"[2589]\\d{9}",,,,,,,[10],[7]],[,,"246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7(?:37|57)|9(?:1[89]|63))\\d{4}",
19394        ,,,"2464123456",,,,[7]],[,,"246(?:2(?:[356]\\d|4[0-57-9]|8[0-79])|45\\d|8(?:[2-5]\\d|83))\\d{4}",,,,"2462501234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900\\d{7}|246976\\d{4}",,,,"9002123456",,,,[7]],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,"24631\\d{5}",,,,"2463101234",,,,[7]],"BB",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"246",[,,,,,,,,,[-1]],[,,"246(?:292|367|4(?:1[7-9]|3[01]|44|67)|736)\\d{4}",,,,"2464301234",,,,[7]],,,[,,,,,
19395        ,,,,[-1]]],BD:[,[,,"[2-79]\\d{5,9}|1\\d{9}|8[0-7]\\d{4,8}",,,,,,,[6,7,8,9,10]],[,,"2(?:[45]\\d{3}|7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|[139][1-6]|2[0157-9]|41|6[1-35]|7[1-5]|8[1-8]|90)|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0167]|7[15]|8[0146-9]))\\d{4}|3(?:12?[5-7]\\d{2}|0(?:2(?:[025-79]\\d|[348]\\d{1,2})|3(?:[2-4]\\d|[56]\\d?))|2(?:1\\d{2}|2(?:[12]\\d|[35]\\d{1,2}|4\\d?))|3(?:1\\d{2}|2(?:[2356]\\d|4\\d{1,2}))|4(?:1\\d{2}|2(?:2\\d{1,2}|[47]|5\\d{2}))|5(?:1\\d{2}|29)|[67]1\\d{2}|8(?:1\\d{2}|2(?:2\\d{2}|3|4\\d)))\\d{3}|4(?:0(?:2(?:[09]\\d|7)|33\\d{2})|1\\d{3}|2(?:1\\d{2}|2(?:[25]\\d?|[348]\\d|[67]\\d{1,2}))|3(?:1\\d{2}(?:\\d{2})?|2(?:[045]\\d|[236-9]\\d{1,2})|32\\d{2})|4(?:[18]\\d{2}|2(?:[2-46]\\d{2}|3)|5[25]\\d{2})|5(?:1\\d{2}|2(?:3\\d|5))|6(?:[18]\\d{2}|2(?:3(?:\\d{2})?|[46]\\d{1,2}|5\\d{2}|7\\d)|5(?:3\\d?|4\\d|[57]\\d{1,2}|6\\d{2}|8))|71\\d{2}|8(?:[18]\\d{2}|23\\d{2}|54\\d{2})|9(?:[18]\\d{2}|2[2-5]\\d{2}|53\\d{1,2}))\\d{3}|5(?:02[03489]\\d{2}|1\\d{2}|2(?:1\\d{2}|2(?:2(?:\\d{2})?|[457]\\d{2}))|3(?:1\\d{2}|2(?:[37](?:\\d{2})?|[569]\\d{2}))|4(?:1\\d{2}|2[46]\\d{2})|5(?:1\\d{2}|26\\d{1,2})|6(?:[18]\\d{2}|2|53\\d{2})|7(?:1|24)\\d{2}|8(?:1|26)\\d{2}|91\\d{2})\\d{3}|6(?:0(?:1\\d{2}|2(?:3\\d{2}|4\\d{1,2}))|2(?:2[2-5]\\d{2}|5(?:[3-5]\\d{2}|7)|8\\d{2})|3(?:1|2[3478])\\d{2}|4(?:1|2[34])\\d{2}|5(?:1|2[47])\\d{2}|6(?:[18]\\d{2}|6(?:2(?:2\\d|[34]\\d{2})|5(?:[24]\\d{2}|3\\d|5\\d{1,2})))|72[2-5]\\d{2}|8(?:1\\d{2}|2[2-5]\\d{2})|9(?:1\\d{2}|2[2-6]\\d{2}))\\d{3}|7(?:(?:02|[3-589]1|6[12]|72[24])\\d{2}|21\\d{3}|32)\\d{3}|8(?:(?:4[12]|[5-7]2|1\\d?)|(?:0|3[12]|[5-7]1|217)\\d)\\d{4}|9(?:[35]1|(?:[024]2|81)\\d|(?:1|[24]1)\\d{2})\\d{3}",
19396        ,,,"27111234",,,[6,7,8,9]],[,,"(?:1[13-9]\\d|(?:3[78]|44)[02-9]|6(?:44|6[02-9]))\\d{7}",,,,"1812345678",,,[10]],[,,"80[03]\\d{7}",,,,"8001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"96(?:0[49]|1[0-4]|6[69])\\d{6}",,,,"9604123456",,,[10]],"BD",880,"00","0",,,"0",,,,[[,"(2)(\\d{7,8})","$1-$2",["2"],"0$1"],[,"(\\d{2})(\\d{4,6})","$1-$2",["[3-79]1"],"0$1"],[,"(\\d{4})(\\d{3,6})","$1-$2",["1|3(?:0|[2-58]2)|4(?:0|[25]2|3[23]|[4689][25])|5(?:[02-578]2|6[25])|6(?:[0347-9]2|[26][25])|7[02-9]2|8(?:[023][23]|[4-7]2)|9(?:[02][23]|[458]2|6[016])"],
19397        "0$1"],[,"(\\d{3})(\\d{3,7})","$1-$2",["[3-79][2-9]|8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BE:[,[,,"[1-9]\\d{7,8}",,,,,,,[8,9]],[,,"(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}|80[2-8]\\d{5}",,,,"12345678",,,[8]],[,,"4(?:6[0135-8]|[79]\\d|8[3-9])\\d{6}",,,,"470123456",,,[9]],[,,"800\\d{5}",,,,"80012345",,,[8]],[,,"(?:70[2-467]|90[0-79])\\d{5}",,,,"90123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BE",32,"00","0",,,
19398        "0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4[6-9]"],"0$1"],[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[23]|4[23]|9[2-4]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[156]|7[018]|8(?:0[1-9]|[1-79])"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"78\\d{6}",,,,"78123456",,,[8]],,,[,,,,,,,,,[-1]]],BF:[,[,,"[25-7]\\d{7}",,,,,,,[8]],[,,"2(?:0(?:49|5[23]|6[56]|9[016-9])|4(?:4[569]|5[4-6]|6[56]|7[0179])|5(?:[34]\\d|50|6[5-7]))\\d{4}",
19399        ,,,"20491234"],[,,"(?:5[15-8]|[67]\\d)\\d{6}",,,,"70123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BF",226,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BG:[,[,,"[23567]\\d{5,7}|[489]\\d{6,8}",,,,,,,[6,7,8,9],[4,5]],[,,"2\\d{5,7}|(?:[36]\\d|5[1-9]|8[1-6]|9[1-7])\\d{5,6}|(?:4(?:[124-7]\\d|3[1-6])|7(?:0[1-9]|[1-9]\\d))\\d{4,5}",,,,"2123456",,,[6,7,8],[4,5]],[,,"(?:8[7-9]\\d|9(?:8\\d|9[69]))\\d{6}|4(?:3[0789]|8\\d)\\d{5}",
19400        ,,,"48123456",,,[8,9]],[,,"800\\d{5}",,,,"80012345",,,[8]],[,,"90\\d{6}",,,,"90123456",,,[8]],[,,,,,,,,,[-1]],[,,"700\\d{5}",,,,"70012345",,,[8]],[,,,,,,,,,[-1]],"BG",359,"00","0",,,"0",,,,[[,"(2)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],[,"(2)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],[,"(\\d{3})(\\d{4})","$1 $2",["43[124-7]|70[1-9]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[124-7]|70[1-9]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[78]00"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})",
19401        "$1 $2 $3",["99[69]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["48|8[7-9]|9[08]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BH:[,[,,"[136-9]\\d{7}",,,,,,,[8]],[,,"(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|7[7-9])|9[69][69])|7(?:1(?:11|78)|7\\d{2}))\\d{4}",,,,"17001234"],[,,"(?:3(?:[1-4679]\\d|5[013-69]|8[0-47-9])\\d|6(?:3(?:00|33|6[16])|6(?:[69]\\d|3[03-9]|7[0-6])))\\d{4}",
19402        ,,,"36001234"],[,,"80\\d{6}",,,,"80123456"],[,,"(?:87|9[014578])\\d{6}",,,,"90123456"],[,,"84\\d{6}",,,,"84123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BH",973,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BI:[,[,,"[267]\\d{7}",,,,,,,[8]],[,,"22\\d{6}",,,,"22201234"],[,,"(?:29|6[189]|7[124-9])\\d{6}",,,,"79561234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BI",257,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
19403        "$1 $2 $3 $4"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BJ:[,[,,"[2689]\\d{7}",,,,,,,[8]],[,,"2(?:02|1[037]|2[45]|3[68])\\d{5}",,,,"20211234"],[,,"(?:6[1-8]|9[03-9])\\d{6}",,,,"90011234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"857[58]\\d{4}",,,,"85751234"],"BJ",229,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"81\\d{6}",,,,"81123456"],,,[,,,,,,,,,[-1]]],BL:[,[,,"[56]\\d{8}",
19404        ,,,,,,[9]],[,,"590(?:2[7-9]|5[12]|87)\\d{4}",,,,"590271234"],[,,"690(?:0[05-9]|[1-9]\\d)\\d{4}",,,,"690001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BL",590,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BM:[,[,,"[4589]\\d{9}",,,,,,,[10],[7]],[,,"441(?:2(?:02|23|61|[3479]\\d)|[46]\\d{2}|5(?:4\\d|60|89)|824)\\d{4}",,,,"4412345678",,,,[7]],[,,"441(?:[37]\\d|5[0-39])\\d{5}",,,,"4413701234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",
19405        ,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"BM",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"441",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BN:[,[,,"[2-578]\\d{6}",,,,,,,[7]],[,,"2(?:[013-9]\\d|2[0-7])\\d{4}|[3-5]\\d{6}",,,,"2345678"],[,,"22[89]\\d{4}|[78]\\d{6}",,,,"7123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BN",673,"00",,,,,,,,[[,"([2-578]\\d{2})(\\d{4})",
19406        "$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BO:[,[,,"[23467]\\d{7}|8\\d{8}",,,,,,,[8,9],[7]],[,,"(?:2(?:2\\d{2}|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d{2}|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:2\\d|3[234]|4[248]|5[24]|6[2-6]|7\\d))|4(?:4\\d{2}|6(?:11|[24689]\\d|72)))\\d{4}",,,,"22123456",,,[8],[7]],[,,"[67]\\d{7}",,,,"71234567",,,[8]],[,,"80017\\d{4}",,,,"800171234",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,
19407        ,,,,,,,[-1]],"BO",591,"00(1\\d)?","0",,,"0(1\\d)?",,,,[[,"([234])(\\d{7})","$1 $2",["[2-4]"],,"0$CC $1"],[,"([67]\\d{7})","$1",["[67]"],,"0$CC $1"],[,"(800)(\\d{2})(\\d{4})","$1 $2 $3",["800"],,"0$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BQ:[,[,,"[347]\\d{6}",,,,,,,[7]],[,,"(?:318[023]|41(?:6[023]|70)|7(?:1[578]|50)\\d)\\d{3}",,,,"7151234"],[,,"(?:31(?:8[14-8]|9[14578])|416[145-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}",,,,"3181234"],[,,,,,,,,,[-1]],[,,,,,,,,
19408        ,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BQ",599,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BR:[,[,,"[1-46-9]\\d{7,10}|5(?:[0-4]\\d{7,9}|5(?:[2-8]\\d{7}|9\\d{7,8}))",,,,,,,[8,9,10,11]],[,,"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}",,,,"1123456789",,,[10],[8]],[,,"(?:[189][1-9]|2[12478])(?:7|9\\d)\\d{7}|(?:3[1-578]|[46][1-9]|5[13-5]|7[13-579])(?:[6-8]|9\\d?)\\d{7}",,,,"11961234567",,,[10,11],[8]],[,,"800\\d{6,7}",,,,"800123456",
19409        ,,[9,10]],[,,"(?:300|[59]00\\d?)\\d{6}",,,,"300123456",,,[9,10]],[,,"(?:300\\d(?:\\d{2})?|40(?:0\\d|20))\\d{4}",,,,"40041234",,,[8,10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BR",55,"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","0",,,"0(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2",,,[[,"(\\d{4})(\\d{4})","$1-$2",["300|40[02]","300|40(?:0|20)"]],[,"([3589]00)(\\d{2,3})(\\d{4})","$1 $2 $3",["[3589]00"],"0$1"],[,"(\\d{3,5})","$1",["1[125689]"],"$1"],[,"(\\d{4})(\\d{4})","$1-$2",["[2-9](?:0[1-9]|[1-9])"],
19410        "$1"],[,"(\\d{5})(\\d{4})","$1-$2",["9(?:0[1-9]|[1-9])"],"$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["[1-9][1-9]"],"($1)","0 $CC ($1)"],[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[1-9][1-9]9"],"($1)","0 $CC ($1)"]],[[,"(\\d{4})(\\d{4})","$1-$2",["300|40[02]","300|40(?:0|20)"]],[,"([3589]00)(\\d{2,3})(\\d{4})","$1 $2 $3",["[3589]00"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["[1-9][1-9]"],"($1)","0 $CC ($1)"],[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[1-9][1-9]9"],"($1)","0 $CC ($1)"]],[,,
19411        ,,,,,,,[-1]],,,[,,"(?:300\\d|40(?:0\\d|20))\\d{4}",,,,"40041234",,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BS:[,[,,"[2589]\\d{9}",,,,,,,[10],[7]],[,,"242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[3467]|8[0-4]|9[2-467])|461|502|6(?:0[1-4]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}",,,,"2423456789",,,,[7]],[,,"242(?:3(?:5[79]|[79]5)|4(?:[2-4][1-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|[89]9))\\d{4}",,,,"2423591234",,,,[7]],[,,"242300\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",
19412        ,,,"8002123456",,,,[7]],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"BS",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"242",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BT:[,[,,"[1-8]\\d{6,7}",,,,,,,[7,8],[6]],[,,"(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}",,,,"2345678",,,[7],[6]],[,,"(?:1[67]|77)\\d{6}",,,,"17123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
19413        "BT",975,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1|77"]],[,"([2-8])(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BW:[,[,,"[2-79]\\d{6,7}",,,,,,,[7,8]],[,,"(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[01])|4(?:6[03]|7[1267]|9[0-5])|5(?:3[0389]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[067]))\\d{4}",,,,"2401234",,,[7]],[,,"7(?:[1-6]\\d|7[014-8])\\d{5}",,,,"71123456",,,[8]],[,,,,,,
19414        ,,,[-1]],[,,"90\\d{5}",,,,"9012345",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"79[12][01]\\d{4}",,,,"79101234",,,[8]],"BW",267,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-6]"]],[,"(7\\d)(\\d{3})(\\d{3})","$1 $2 $3",["7"]],[,"(90)(\\d{5})","$1 $2",["9"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BY:[,[,,"[1-4]\\d{8}|800\\d{3,7}|[89]\\d{9,10}",,,,,,,[6,7,8,9,10,11],[5]],[,,"(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d{2})|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}",
19415        ,,,"152450911",,,[9],[5,6,7]],[,,"(?:2(?:5[5679]|9[1-9])|33\\d|44\\d)\\d{6}",,,,"294911911",,,[9]],[,,"8(?:0[13]|20\\d)\\d{7}|800\\d{3,7}",,,,"8011234567"],[,,"(?:810|902)\\d{7}",,,,"9021234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"249\\d{6}",,,,"249123456",,,[9]],"BY",375,"810","8",,,"8?0?",,"8~10",,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["17[0-3589]|2[4-9]|[34]","17(?:[02358]|1[0-2]|9[0189])|2[4-9]|[34]"],"8 0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:5[24]|6[235]|7[467])|2(?:1[246]|2[25]|3[26])",
19416        "1(?:5[24]|6(?:2|3[04-9]|5[0346-9])|7(?:[46]|7[37-9]))|2(?:1[246]|2[25]|3[26])"],"8 0$1"],[,"(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],[,"([89]\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8[01]|9"],"8 $1"],[,"(82\\d)(\\d{4})(\\d{4})","$1 $2 $3",["82"],"8 $1"],[,"(800)(\\d{3})","$1 $2",["800"],"8 $1"],[,"(800)(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"]],,[,,
19417        ,,,,,,,[-1]],,,[,,"8(?:0[13]|10|20\\d)\\d{7}|800\\d{3,7}|902\\d{7}",,,,"82012345678"],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],BZ:[,[,,"[2-8]\\d{6}|0\\d{10}
vendor: 8,956 bytes, lines 19417-19433
19417",,,,,,,[7,11]],[,,"(?:2(?:[02]\\d|36)|[3-58][02]\\d|7(?:[02]\\d|32))\\d{4}",,,,"2221234",,,[7]],[,,"6[0-35-7]\\d{5}",,,,"6221234",,,[7]],[,,"0800\\d{7}",,,,"08001234123",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"BZ",501,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],[,"(0)(800)(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]],
19418        ,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CA:[,[,,"[2-9]\\d{9}|3\\d{6}",,,,,,,[7,10]],[,,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|65)|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:0[04]|13|22|39|47)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",,,,"2042345678",,,[10],[7]],[,,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|65)|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:0[04]|13|22|39|47)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",,,,"2042345678",
19419        ,,[10],[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}|310\\d{4}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456",,,[10]],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678",,,[10]],[,,,,,,,,,[-1]],"CA",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CC:[,[,,"[1458]\\d{5,9}",,,,,,,[6,7,9,10],[8]],[,,"89162\\d{4}",,,,"891621234",,,[9],[8]],[,,"14(?:5\\d|71)\\d{5}|4(?:[0-2]\\d|3[0-57-9]|4[47-9]|5[0-25-9]|6[6-9]|7[02-9]|8[147-9]|9[017-9])\\d{6}",
19420        ,,,"412345678",,,[9]],[,,"180(?:0\\d{3}|2)\\d{3}",,,,"1800123456",,,[7,10]],[,,"190[0126]\\d{6}",,,,"1900123456",,,[10]],[,,"13(?:00\\d{2})?\\d{4}",,,,"1300123456",,,[6,10]],[,,"500\\d{6}",,,,"500123456",,,[9]],[,,"550\\d{6}",,,,"550123456",,,[9]],"CC",61,"(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]","0",,,"0",,"0011",,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CD:[,[,,"[2-6]\\d{6}|[18]\\d{6,8}|9\\d{8}",,,,,,,[7,9]],[,,"1(?:2\\d{7}|\\d{6})|[2-6]\\d{6}",,,,"1234567"],
19421        [,,"8(?:[0-2459]\\d{2}|8)\\d{5}|9[017-9]\\d{7}",,,,"991234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CD",243,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["12"],"0$1"],[,"([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8[0-2459]|9"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],[,"(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CF:[,[,,"[278]\\d{7}",,,,,,,[8]],[,,"2[12]\\d{6}",
19422        ,,,"21612345"],[,,"7[0257]\\d{6}",,,,"70012345"],[,,,,,,,,,[-1]],[,,"8776\\d{4}",,,,"87761234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CF",236,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CG:[,[,,"[028]\\d{8}",,,,,,,[9]],[,,"222[1-589]\\d{5}",,,,"222123456"],[,,"0[14-6]\\d{7}",,,,"061234567"],[,,,,,,,,,[-1]],[,,"80(?:0\\d{2}|11[01])\\d{4}",,,,"800123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,
19423        [-1]],"CG",242,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["801"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]],[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["800"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CH:[,[,,"[2-9]\\d{8}|860\\d{9}",,,,,,,[9,12]],[,,"(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}",,,,"212345678",,,[9]],[,,"7[5-9]\\d{7}",,,,"781234567",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"90[016]\\d{6}",,,,"900123456",,,[9]],[,
19424        ,"84[0248]\\d{6}",,,,"840123456",,,[9]],[,,"878\\d{6}",,,,"878123456",,,[9]],[,,,,,,,,,[-1]],"CH",41,"00","0",,,"0",,,,[[,"([2-9]\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]|[89]1"],"0$1"],[,"([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["860"],"0$1"]],,[,,"74[0248]\\d{6}",,,,"740123456",,,[9]],,,[,,,,,,,,,[-1]],[,,"5[18]\\d{7}",,,,"581234567",,,[9]],,,[,,"860\\d{9}",,,,"860123456789",,,[12]]],CI:[,[,,"[02-8]\\d{7}",
19425        ,,,,,,[8]],[,,"(?:2(?:0[023]|1[02357]|[23][045]|4[03-5])|3(?:0[06]|1[069]|[2-4][07]|5[09]|6[08]))\\d{5}",,,,"21234567"],[,,"(?:0[1-9]|4\\d|5[14-9]|6[015-79]|[78][4-9])\\d{6}",,,,"01234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CI",225,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CK:[,[,,"[2-8]\\d{4}",,,,,,,[5]],[,,"(?:2\\d|3[13-7]|4[1-5])\\d{3}",,,,"21234"],[,,"[5-8]\\d{4}",
19426        ,,,"71234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CK",682,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CL:[,[,,"(?:[2-9]|600|123)\\d{7,8}",,,,,,,[9,10,11],[7,8]],[,,"2(?:1962\\d{4}|2\\d{7}|32[0-467]\\d{5})|(?:3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|9[3-9])\\d{7}",,,,"221234567",,,[9],[7,8]],[,,"2(?:1962\\d{4}|2\\d{7}|32[0-467]\\d{5})|(?:3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|9[3-9])\\d{7}",,
19427        ,,"961234567",,,[9],[8]],[,,"800\\d{6}|1230\\d{7}",,,,"800123456",,,[9,11]],[,,,,,,,,,[-1]],[,,"600\\d{7,8}",,,,"6001234567",,,[10,11]],[,,,,,,,,,[-1]],[,,"44\\d{7}",,,,"441234567",,,[9]],"CL",56,"(?:0|1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))0","0",,,"0|(1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))",,,1,[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[23]"],"($1)","$CC ($1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[357]|4[1-35]|6[13-57]"],"($1)","$CC ($1)"],[,"(9)(\\d{4})(\\d{4})","$1 $2 $3",
19428        ["9"],"0$1"],[,"(44)(\\d{3})(\\d{4})","$1 $2 $3",["44"],"0$1"],[,"([68]00)(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"],"$1"],[,"(600)(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"],"$1"],[,"(1230)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"$1"],[,"(\\d{5})(\\d{4})","$1 $2",["219"],"($1)","$CC ($1)"],[,"(\\d{4,5})","$1",["[1-9]"],"$1"]],[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[23]"],"($1)","$CC ($1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[357]|4[1-35]|6[13-57]"],"($1)","$CC ($1)"],[,"(9)(\\d{4})(\\d{4})",
19429        "$1 $2 $3",["9"],"0$1"],[,"(44)(\\d{3})(\\d{4})","$1 $2 $3",["44"],"0$1"],[,"([68]00)(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"],"$1"],[,"(600)(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"],"$1"],[,"(1230)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"$1"],[,"(\\d{5})(\\d{4})","$1 $2",["219"],"($1)","$CC ($1)"]],[,,,,,,,,,[-1]],,,[,,"600\\d{7,8}",,,,"6001234567",,,[10,11]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CM:[,[,,"[2368]\\d{7,8}",,,,,,,[8,9]],[,,"2(?:22|33|4[23])\\d{6}",,,,"222123456",,,[9]],[,,"6[5-9]\\d{7}",
19430        ,,,"671234567",,,[9]],[,,"88\\d{6}",,,,"88012345",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CM",237,"00",,,,,,,,[[,"([26])(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]"]],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[23]|88"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CN:[,[,,"[1-7]\\d{6,11}|8[0-357-9]\\d{6,9}|9\\d{7,10}",,,,,,,[7,8,9,10,11,12],[5,6]],[,,"21(?:100\\d{2}|95\\d{3,4}|\\d{8,10})|(?:10|2[02-57-9]|3(?:11|7[179])|4(?:[15]1|3[1-35])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:[57]1|98))(?:100\\d{2}|95\\d{3,4}|\\d{8})|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|3[3-9]|5[2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-4689]|6[2368]|9[02-9])|8(?:078|1[236-8]|2[5-7]|3\\d|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100\\d{2}|95\\d{3,4}|\\d{7})|80(?:29|6[03578]|7[018]|81)\\d{4}",
19431        ,,,"1012345678",,,,[5,6]],[,,"1(?:[38]\\d|4[57]|5[0-35-9]|7[0-35-8])\\d{8}",,,,"13123456789",,,[11]],[,,"(?:10)?800\\d{7}",,,,"8001234567",,,[10,12]],[,,"16[08]\\d{5}",,,,"16812345",,,[8]],[,,"400\\d{7}|950\\d{7,8}|(?:10|2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[4789]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[3678]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}",
19432        ,,,"4001234567",,,[7,8,9,10,11],[5,6]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CN",86,"(1(?:[129]\\d{3}|79\\d{2}))?00","0",,,"(1(?:[129]\\d{3}|79\\d{2}))|0",,"00",,[[,"(80\\d{2})(\\d{4})","$1 $2",["80[26-8]"],"0$1","$CC $1",1],[,"([48]00)(\\d{3})(\\d{4})","$1 $2 $3",["[48]00"]],[,"(\\d{5,6})","$1",["100|95"]],[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2\\d)[19]","(?:10|2\\d)(?:10|9[56])","(?:10|2\\d)(?:100|9[56])"],"0$1","$CC $1"],[,"(\\d{3})(\\d{5,6})","$1 $2",["[3-9]","[3-9]\\d\\d[19]","[3-9]\\d\\d(?:10|9[56])"],
19433        "0$1","$CC $1"],[,"(\\d{3,4})(\\d{4})","$1 $2",["[2-9]"]],[,"(21)(\\d{4})(\\d{4,6})","$1 $2 $3",["21"],"0$1","$CC $1",1],[,"([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:0[1-9]|[1-9]))|2[02-9]"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{3})(\\d{4}
19433)","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[47-9]|7|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"],
19434        "0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[1-35])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[457]|6[09])|8(?:[57]1|98)"],"0$1","$CC $1",1],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["807","8078"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-578]"],,"$CC $1"],[,"(10800)(\\d{3})(\\d{4})","$1 $2 $3",["108","1080","10800"]],[,"(\\d{3})(\\d{7,8})","$1 $2",["950"]]],[[,"(80\\d{2})(\\d{4})","$1 $2",["80[26-8]"],"0$1","$CC $1",1],[,"([48]00)(\\d{3})(\\d{4})",
19435        "$1 $2 $3",["[48]00"]],[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2\\d)[19]","(?:10|2\\d)(?:10|9[56])","(?:10|2\\d)(?:100|9[56])"],"0$1","$CC $1"],[,"(\\d{3})(\\d{5,6})","$1 $2",["[3-9]","[3-9]\\d\\d[19]","[3-9]\\d\\d(?:10|9[56])"],"0$1","$CC $1"],[,"(21)(\\d{4})(\\d{4,6})","$1 $2 $3",["21"],"0$1","$CC $1",1],[,"([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["10[1-9]|2[02-9]","10[1-9]|2[02-9]","10(?:[1-79]|8(?:0[1-9]|[1-9]))|2[02-9]"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[47-9]|7|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"],
19436        "0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3(?:11|7[179])|4(?:[15]1|3[1-35])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[457]|6[09])|8(?:[57]1|98)"],"0$1","$CC $1",1],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["807","8078"],"0$1","$CC $1",1],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-578]"],,"$CC $1"],[,"(10800)(\\d{3})(\\d{4})","$1 $2 $3",["108","1080","10800"]],[,"(\\d{3})(\\d{7,8})","$1 $2",["950"]]],[,,,,,,,,,[-1]],,,[,,"(?:4|(?:10)?8)00\\d{7}|950\\d{7,8}",,,,"4001234567",
19437        ,,[10,11,12]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CO:[,[,,"(?:[13]\\d{0,3}|[24-8])\\d{7}",,,,,,,[8,10,11],[7]],[,,"[124-8][2-9]\\d{6}",,,,"12345678",,,[8],[7]],[,,"3(?:0[0-5]|1\\d|2[0-3]|5[01])\\d{7}",,,,"3211234567",,,[10]],[,,"1800\\d{7}",,,,"18001234567",,,[11]],[,,"19(?:0[01]|4[78])\\d{7}",,,,"19001234567",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CO",57,"00(?:4(?:[14]4|56)|[579])","0",,,"0([3579]|4(?:44|56))?",,,,[[,"(\\d)(\\d{7})","$1 $2",["1(?:[2-7]|8[2-9]|9[0-3])|[24-8]","1(?:[2-7]|8[2-9]|9(?:09|[1-3]))|[24-8]"],
19438        "($1)","0$CC $1"],[,"(\\d{3})(\\d{7})","$1 $2",["3"],,"0$CC $1"],[,"(1)(\\d{3})(\\d{7})","$1-$2-$3",["1(?:80|9[04])","1(?:800|9(?:0[01]|4[78]))"],"0$1"]],[[,"(\\d)(\\d{7})","$1 $2",["1(?:[2-7]|8[2-9]|9[0-3])|[24-8]","1(?:[2-7]|8[2-9]|9(?:09|[1-3]))|[24-8]"],"($1)","0$CC $1"],[,"(\\d{3})(\\d{7})","$1 $2",["3"],,"0$CC $1"],[,"(1)(\\d{3})(\\d{7})","$1 $2 $3",["1(?:80|9[04])","1(?:800|9(?:0[01]|4[78]))"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CR:[,[,,"[24-9]\\d{7,9}",,
19439        ,,,,,[8,10]],[,,"2(?:[024-7]\\d{2}|1(?:0[7-9]|[1-9]\\d))\\d{4}",,,,"22123456",,,[8]],[,,"5(?:0[01]|7[0-3])\\d{5}|6(?:[0-4]\\d{3}|500[01])\\d{3}|(?:7[0-3]|8[3-9])\\d{6}",,,,"83123456",,,[8]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,"90[059]\\d{7}",,,,"9001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"210[0-6]\\d{4}|4\\d{7}|5100\\d{4}",,,,"40001234",,,[8]],"CR",506,"00",,,,"(19(?:0[012468]|1[09]|20|66|77|99))",,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[24-7]|8[3-9]"],,"$CC $1"],[,"(\\d{3})(\\d{3})(\\d{4})",
19440        "$1-$2-$3",["[89]0"],,"$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CU:[,[,,"[2-57]\\d{5,7}",,,,,,,[6,7,8],[4,5]],[,,"2[1-4]\\d{5,6}|3(?:1\\d{6}|[23]\\d{4,6})|4(?:[125]\\d{5,6}|[36]\\d{6}|[78]\\d{4,6})|7\\d{6,7}",,,,"71234567",,,,[4,5]],[,,"5\\d{7}",,,,"51234567",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CU",53,"119","0",,,"0",,,,[[,"(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],[,"(\\d{2})(\\d{4,6})","$1 $2",["[2-4]"],"(0$1)"],
19441        [,"(\\d)(\\d{7})","$1 $2",["5"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CV:[,[,,"[259]\\d{6}",,,,,,,[7]],[,,"2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}",,,,"2211234"],[,,"(?:9\\d|59)\\d{5}",,,,"9911234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CV",238,"0",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CW:[,[,,"[169]\\d{6,7}",,,,,,,[7,
19442        8]],[,,"9(?:[48]\\d{2}|50\\d|7(?:2[0-24]|[34]\\d|6[35-7]|77|8[7-9]))\\d{4}",,,,"94151234",,,[8]],[,,"9(?:5(?:[12467]\\d|3[01])|6(?:[15-9]\\d|3[01]))\\d{4}",,,,"95181234",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"60[0-2]\\d{4}",,,,"6001234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"CW",599,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[13-7]"]],[,"(9)(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],,[,,"955\\d{5}",,,,"95581234",,,[8]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CX:[,[,,"[1458]\\d{5,9}",
19443        ,,,,,,[6,7,8,9,10]],[,,"89164\\d{4}",,,,"891641234",,,[9],[8]],[,,"14(?:5\\d|71)\\d{5}|4(?:[0-2]\\d|3[0-57-9]|4[47-9]|5[0-25-9]|6[6-9]|7[02-9]|8[147-9]|9[017-9])\\d{6}",,,,"412345678",,,[9]],[,,"180(?:0\\d{3}|2)\\d{3}",,,,"1800123456",,,[7,10]],[,,"190[0126]\\d{6}",,,,"1900123456",,,[10]],[,,"13(?:00\\d{2})?\\d{4}",,,,"1300123456",,,[6,8,10]],[,,"500\\d{6}",,,,"500123456",,,[9]],[,,"550\\d{6}",,,,"550123456",,,[9]],"CX",61,"(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]","0",,,"0",,"0011",,,
19444        ,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],CY:[,[,,"[257-9]\\d{7}",,,,,,,[8]],[,,"2[2-6]\\d{6}",,,,"22345678"],[,,"9[4-79]\\d{6}",,,,"96123456"],[,,"800\\d{5}",,,,"80001234"],[,,"90[09]\\d{5}",,,,"90012345"],[,,"80[1-9]\\d{5}",,,,"80112345"],[,,"700\\d{5}",,,,"70012345"],[,,,,,,,,,[-1]],"CY",357,"00",,,,,,,,[[,"(\\d{2})(\\d{6})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"(?:50|77)\\d{6}",,,,"77123456"],,,[,,,,,,,,,[-1]]],CZ:[,[,,"[2-8]\\d{8}|9\\d{8,11}",,,,,,,[9,10,
19445        11,12]],[,,"2\\d{8}|(?:3[1257-9]|4[16-9]|5[13-9])\\d{7}",,,,"212345678",,,[9]],[,,"(?:60[1-8]|7(?:0[2-5]|[2379]\\d))\\d{6}",,,,"601123456",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"9(?:0[05689]|76)\\d{6}",,,,"900123456",,,[9]],[,,"8[134]\\d{7}",,,,"811234567",,,[9]],[,,"70[01]\\d{6}",,,,"700123456",,,[9]],[,,"9[17]0\\d{6}",,,,"910123456",,,[9]],"CZ",420,"00",,,,,,,,[[,"([2-9]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],[,"(96\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["96"]],[,"(9\\d)(\\d{3})(\\d{3})(\\d{3})",
19446        "$1 $2 $3 $4",["9[36]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"9(?:5\\d|7[234])\\d{6}",,,,"972123456",,,[9]],,,[,,"9(?:3\\d{9}|6\\d{7,10})",,,,"93123456789"]],DE:[,[,,"[1-35-9]\\d{3,14}|4(?:[0-8]\\d{3,12}|9(?:[0-37]\\d|4(?:[1-35-8]|4\\d?)|5\\d{1,2}|6[1-8]\\d?)\\d{2,8})",,,,,,,[4,5,6,7,8,9,10,11,12,13,14,15],[3]],[,,"2\\d{5,13}|3(?:0\\d{3,13}|2\\d{9}|[3-9]\\d{4,13})|4(?:0\\d{3,12}|\\d{5,13})|5(?:0[2-8]|[1256]\\d|[38][0-8]|4\\d{0,2}|[79][0-7])\\d{3,11}|6(?:\\d{5,13}|9\\d{3,12})|7(?:0[2-8]|[1-9]\\d)\\d{3,10}|8(?:0[2-9]|[1-8]\\d|9\\d?)\\d{3,10}|9(?:0[6-9]\\d{3,10}|1\\d{4,12}|[2-9]\\d{4,11})",
19447        ,,,"30123456",,,[5,6,7,8,9,10,11,12,13,14,15],[3,4]],[,,"1(?:5[0-25-9]\\d{8}|6[023]\\d{7,8}|7\\d{8,9})",,,,"15123456789",,,[10,11]],[,,"800\\d{7,12}",,,,"8001234567890",,,[10,11,12,13,14,15]],[,,"137[7-9]\\d{6}|900(?:[135]\\d{6}|9\\d{7})",,,,"9001234567",,,[10,11]],[,,"1(?:3(?:7[1-6]\\d{6}|8\\d{4})|80\\d{5,11})",,,,"18012345",,,[7,8,9,10,11,12,13,14]],[,,"700\\d{8}",,,,"70012345678",,,[11]],[,,,,,,,,,[-1]],"DE",49,"00","0",,,"0",,,,[[,"(1\\d{2})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],[,"(15\\d{3})(\\d{6})",
19448        "$1 $2",["15[0568]"],"0$1"],[,"(1\\d{3})(\\d{7})","$1 $2",["15"],"0$1"],[,"(\\d{2})(\\d{3,11})","$1 $2",["3[02]|40|[68]9"],"0$1"],[,"(\\d{3})(\\d{3,11})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14]|[4-9]1)|3(?:[35-9][15]|4[015])|[4-8][1-9]1|9(?:06|[1-9]1)"],"0$1"],[,"(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|[7-9](?:0[1-9]|[1-9])","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|[46][1246]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|3[1357]|4[13578]|6[1246]|7[1356]|9[1346])|5(?:0[14]|2[1-3589]|3[1357]|[49][1246]|6[1-4]|7[1346]|8[13568])|6(?:0[356]|2[1-489]|3[124-6]|4[1347]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|3[1357]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|4[1347]|6[0135-9]|7[1467]|8[136])|9(?:0[12479]|2[1358]|3[1357]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|[7-9](?:0[1-9]|[1-9])"],
19449        "0$1"],[,"(3\\d{4})(\\d{1,10})","$1 $2",["3"],"0$1"],[,"(800)(\\d{7,12})","$1 $2",["800"],"0$1"],[,"(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:37|80)|900","1(?:37|80)|900[1359]"],"0$1"],[,"(1\\d{2})(\\d{5,11})","$1 $2",["181"],"0$1"],[,"(18\\d{3})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],[,"(18\\d{2})(\\d{7})","$1 $2",["18[68]"],"0$1"],[,"(18\\d)(\\d{8})","$1 $2",["18[2-579]"],"0$1"],[,"(700)(\\d{4})(\\d{4})","$1 $2 $3",["700"],"0$1"],[,"(138)(\\d{4})","$1 $2",["138"],"0$1"],[,"(15[013-68])(\\d{2})(\\d{8})",
19450        "$1 $2 $3",["15[013-68]"],"0$1"],[,"(15[279]\\d)(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],[,"(1[67]\\d)(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"]],,[,,"16(?:4\\d{1,10}|[89]\\d{1,11})",,,,"16412345",,,[4,5,6,7,8,9,10,11,12,13,14]],,,[,,,,,,,,,[-1]],[,,"18(?:1\\d{5,11}|[2-9]\\d{8})",,,,"18500123456",,,[8,9,10,11,12,13,14]],,,[,,"1(?:5(?:(?:2\\d55|7\\d99|9\\d33)\\d{7}|(?:[034568]00|113)\\d{8})|6(?:013|255|399)\\d{7,8}
vendor: 6,957 bytes, lines 19450-19463
19450|7(?:[015]13|[234]55|[69]33|[78]99)\\d{7,8})",,,,"177991234567",
19451        ,,[12,13]]],DJ:[,[,,"[27]\\d{7}",,,,,,,[8]],[,,"2(?:1[2-5]|7[45])\\d{5}",,,,"21360003"],[,,"77\\d{6}",,,,"77831001"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"DJ",253,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],DK:[,[,,"[2-9]\\d{7}",,,,,,,[8]],[,,"(?:[2-7]\\d|8[126-9]|9[1-36-9])\\d{6}",,,,"32123456"],[,,"(?:[2-7]\\d|8[126-9]|9[1-36-9])\\d{6}",,,,"20123456"],[,,"80\\d{6}",
19452        ,,,"80123456"],[,,"90\\d{6}",,,,"90123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"DK",45,"00",,,,,,,1,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],DM:[,[,,"[57-9]\\d{9}",,,,,,,[10],[7]],[,,"767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4]|70[1-3])\\d{4}",,,,"7674201234",,,,[7]],[,,"767(?:2(?:[234689]5|7[5-7])|31[5-7]|61[1-7])\\d{4}",,,,"7672251234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],
19453        [,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"DM",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"767",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],DO:[,[,,"[589]\\d{9}",,,,,,,[10],[7]],[,,"8(?:[04]9[2-9]\\d{6}|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d{2}|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9]))\\d{4})",
19454        ,,,"8092345678",,,,[7]],[,,"8[024]9[2-9]\\d{6}",,,,"8092345678",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"DO",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"8[024]9",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],DZ:[,[,,"(?:[1-4]|[5-9]\\d)\\d{7}",,,,,,,[8,9]],[,,"(?:1\\d|2[013-79]|3[0-8]|4[0135689])\\d{6}|9619\\d{5}",,,,"12345678"],[,,"(?:5[4-6]|7[7-9])\\d{7}|6(?:[569]\\d|7[0-6])\\d{6}",
19455        ,,,"551234567",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"80[3-689]1\\d{5}",,,,"808123456",,,[9]],[,,"80[12]1\\d{5}",,,,"801123456",,,[9]],[,,,,,,,,,[-1]],[,,"98[23]\\d{6}",,,,"983123456",,,[9]],"DZ",213,"00","0",,,"0",,,,[[,"([1-4]\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],[,"([5-8]\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"],[,"(9\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],
19456        EC:[,[,,"1\\d{9,10}|[2-8]\\d{7}|9\\d{8}",,,,,,,[8,9,10,11],[7]],[,,"[2-7][2-7]\\d{6}",,,,"22123456",,,[8],[7]],[,,"9(?:(?:39|[45][89]|7[7-9]|[89]\\d)\\d|6(?:[017-9]\\d|2[0-4]))\\d{5}",,,,"991234567",,,[9]],[,,"1800\\d{6,7}",,,,"18001234567",,,[10,11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"[2-7]890\\d{4}",,,,"28901234",,,[8]],"EC",593,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[247]|[356][2-8]"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],[,"(1800)(\\d{3})(\\d{3,4})",
19457            "$1 $2 $3",["1"],"$1"]],[[,"(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[247]|[356][2-8]"]],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],[,"(1800)(\\d{3})(\\d{3,4})","$1 $2 $3",["1"],"$1"]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],EE:[,[,,"[3-9]\\d{6,7}|800\\d{6,7}",,,,,,,[7,8,10]],[,,"(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}",,,,"3212345",,,[7]],[,,"(?:5\\d|8[1-5])\\d{6}|5(?:[02]\\d{2}|1(?:[0-8]\\d|95)|5[0-478]\\d|64[0-4]|65[1-589])\\d{3}",,,,"51234567",,,[7,8]],[,,"800(?:0\\d{3}|1\\d|[2-9])\\d{3}",
19458            ,,,"80012345"],[,,"(?:40\\d{2}|900)\\d{4}",,,,"9001234",,,[7,8]],[,,,,,,,,,[-1]],[,,"70[0-2]\\d{5}",,,,"70012345",,,[8]],[,,,,,,,,,[-1]],"EE",372,"00",,,,,,,,[[,"([3-79]\\d{2})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]"]],[,"(70)(\\d{2})(\\d{4})","$1 $2 $3",["70"]],[,"(8000)(\\d{3})(\\d{3})","$1 $2 $3",["800","8000"]],[,"([458]\\d{3})(\\d{3,4})","$1 $2",["40|5|8(?:00|[1-5])","40|5|8(?:00[1-9]|[1-5])"]]],
19459            ,[,,,,,,,,,[-1]],,,[,,"800[2-9]\\d{3}",,,,"8002123",,,[7]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],EG:[,[,,"1\\d{4,9}|[2456]\\d{8}|3\\d{7}|[89]\\d{8,9}",,,,,,,[8,9,10],[7]],[,,"(?:1(?:3[23]\\d|5(?:[23]|9\\d))|2[2-4]\\d{2}|3\\d{2}|4(?:0[2-5]|[578][23]|64)\\d|5(?:0[2-7]|[57][23])\\d|6[24-689]3\\d|8(?:2[2-57]|4[26]|6[237]|8[2-4])\\d|9(?:2[27]|3[24]|52|6[2356]|7[2-4])\\d)\\d{5}",,,,"234567890",,,[8,9],[7]],[,,"1(?:0[0-269]|1[0-245]|2[0-278]|5\\d)\\d{7}",,,,"1001234567",,,[10]],[,,"800\\d{7}",,,,"8001234567",
19460            ,,[10]],[,,"900\\d{7}",,,,"9001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"EG",20,"00","0",,,"0",,,,[[,"(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],[,"(\\d{2})(\\d{6,7})","$1 $2",["1(?:3|5[239])|[4-6]|[89][2-9]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1[0-25]|[89]00"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],EH:[,[,,"[5-9]\\d{8}",,,,,,,[9]],[,,"528[89]\\d{5}",,,,"528812345"],[,,"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[07][07]|6[12]))\\d{6}",
19461            ,,,"650123456"],[,,"80\\d{7}",,,,"801234567"],[,,"89\\d{7}",,,,"891234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"5924[01]\\d{4}",,,,"592401234"],"EH",212,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,"528[89]",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ER:[,[,,"[178]\\d{6}",,,,,,,[7],[6]],[,,"1(?:1[12568]|20|40|55|6[146])\\d{4}|8\\d{6}",,,,"8370362",,,,[6]],[,,"17[1-3]\\d{4}|7\\d{6}",,,,"7123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ER",291,"00","0",,,"0",
19462            ,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",,"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ES:[,[,,"[5-9]\\d{8}",,,,,,,[9]],[,,"8(?:[1356]\\d|[28][0-8]|[47][1-9])\\d{6}|9(?:[135]\\d{7}|[28][0-8]\\d{6}|4[1-9]\\d{6}|6(?:[0-8]\\d{6}|9(?:0(?:[0-57-9]\\d{4}|6(?:0[0-8]|1[1-9]|[2-9]\\d)\\d{2})|[1-9]\\d{5}))|7(?:[124-9]\\d{2}|3(?:[0-8]\\d|9[1-9]))\\d{4})",,,,"810123456"],[,,"(?:6\\d{6}|7[1-48]\\d{5}|9(?:6906(?:09|10)|7390\\d{2}))\\d{2}",,,,"612345678"],[,,"[89]00\\d{6}",,,,"800123456"],
19463            [,,"80[367]\\d{6}",,,,"803123456"],[,,"90[12]\\d{6}",,,,"901123456"],[,,"70\\d{7}",,,,"701234567"],[,,,,,,,,,[-1]],"ES",34,"00",,,,,,,,[[,"([89]00)(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],[,"([5-9]\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[568]|[79][0-8]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"51\\d{7}",,,,"511234567"],,,[,,,,,,,,,[-1]]],ET:[,[,,"[1-59]\\d{8}",,,,,,,[9],[7]],[,,"(?:11(?:1(?:1[124]|2[2-57]|3[1-5]|5[5-8]|8[6-8])|2(?:13|3[6-8]|5[89]|7[05-9]|8[2-6])|3(?:2[01
19463]|3[0-289]|4[1289]|7[1-4]|87)|4(?:1[69]|3[2-49]|4[0-3]|6[5-8])|5(?:1[578]|44|5[0-4])|6(?:18|2[69]|39|4[5-7]|5[1-5]|6[0-59]|8[015-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|22[0-6]|33[0134689]|44[04]|55[0-6]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:11[1-9]|22[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}",
19464            ,,,"111112345",,,,[7]],[,,"9(?:[1-46-8]\\d|5[89])\\d{6}",,,,"911234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ET",251,"00","0",,,"0",,,,[[,"([1-59]\\d)(\\d{3})(\\d{4})","$1 $2 $3",,"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],FI:[,[,,"[16]\\d{6,9}|2\\d{4,9}|[35]\\d{5,9}|4\\d{7,10}|7\\d{7,9}|8\\d{6,8}|9\\d{4,8}",,,,,,,[5,6,7,8,9,10,11]],[,,"1[3-79][1-8]\\d{4,6}|[23568][1-8]\\d{5,7}|9[1-8]\\d{3,7}",,,,"131234567",,,[5,6,7,
19465            8,9]],[,,"4[0-8]\\d{6,8}|50\\d{4,8}",,,,"412345678",,,[6,7,8,9,10,11]],[,,"800\\d{5,6}",,,,"800123456",,,[8,9]],[,,"[67]00\\d{5,6}",,,,"600123456",,,[8,9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"FI",358,"00|99(?:[02469]|5(?:11|33|5[59]|88|9[09]))","0",,,"0",,"00",,[[,"(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[6-8])0"],"0$1"],[,"(116\\d{3})","$1",["116"],"$1"],[,"(\\d{2})(\\d{3,9})","$1 $2",["1(?:0[1-9]|[3-9])|2(?:0[1-9]|9)|30[1-9]|4|50|7(?:[13]|5[03-9])"],"0$1"],[,"(75\\d{3})","$1",["75[12]"],
19466            "0$1"],[,"(\\d)(\\d{4})","$1 $2",["9[1-8]"],"0$1"],[,"(\\d)(\\d{5,9})","$1 $2",["[235689][1-8]"],"0$1"],[,"(39\\d)(\\d{3})(\\d{3})","$1 $2 $3",["39"],"0$1"]],[[,"(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[6-8])0"],"0$1"],[,"(116\\d{3})","$1",["116"],"$1"],[,"(\\d{2})(\\d{3,9})","$1 $2",["1(?:0[1-9]|[3-9])|2(?:0[1-9]|9)|30[1-9]|4|50|7(?:[13]|5[03-9])"],"0$1"],[,"(\\d)(\\d{4})","$1 $2",["9[1-8]"],"0$1"],[,"(\\d)(\\d{5,9})","$1 $2",["[235689][1-8]"],"0$1"],[,"(39\\d)(\\d{3})(\\d{3})","$1 $2 $3",["39"],
19467            "0$1"]],[,,,,,,,,,[-1]],1,,[,,"100\\d{4,6}|20(?:0\\d{4,6}|2[023]\\d{4,5}|9[89]\\d{1,6})|300\\d{3,7}|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{5,6})",,,,"1001234",,,[5,6,7,8,9,10]],[,,"10(?:0\\d{4,6}|[1-46-9]\\d{5,7}|5\\d{4,7})|2(?:0(?:0\\d{4,6}|[1346-8]\\d{5,7}|2(?:[023]\\d{4,5}|[14-9]\\d{4,6})|5(?:\\d{3}|\\d{5,7})|9(?:[0-7]\\d{4,6}|[89]\\d{1,6}))|9\\d{5,8})|3(?:0(?:0\\d{3,7}|[1-57-9]\\d{5,7}|6(?:\\d{3}|\\d{5,7}))|44\\d{3}|93\\d{5,7})|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{5,6})",
19468            ,,,"10112345",,,[5,6,7,8,9,10]],,,[,,,,,,,,,[-1]]],FJ:[,[,,"[235-9]\\d{6}|0\\d{10}",,,,,,,[7,11]],[,,"(?:3[0-5]|6[25-7]|8[58])\\d{5}",,,,"3212345",,,[7]],[,,"(?:[279]\\d|5[01568]|8[034679])\\d{5}",,,,"7012345",,,[7]],[,,"0800\\d{7}",,,,"08001234567",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"FJ",679,"0(?:0|52)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["[235-9]"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,
19469            ,,,,,,,[-1]]],FK:[,[,,"[2-7]\\d{4}",,,,,,,[5]],[,,"[2-47]\\d{4}",,,,"31234"],[,,"[56]\\d{4}",,,,"51234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"FK",500,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],FM:[,[,,"[39]\\d{6}",,,,,,,[7]],[,,"3[2357]0[1-9]\\d{3}|9[2-6]\\d{5}",,,,"3201234"],[,,"3[2357]0[1-9]\\d{3}|9[2-7]\\d{5}",,,,"3501234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"FM",691,
19470            "00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],FO:[,[,,"[2-9]\\d{5}",,,,,,,[6]],[,,"(?:20|[3-4]\\d|8[19])\\d{4}",,,,"201234"],[,,"(?:[27][1-9]|5\\d)\\d{4}",,,,"211234"],[,,"80[257-9]\\d{3}",,,,"802123"],[,,"90(?:[1345][15-7]|2[125-7]|99)\\d{2}",,,,"901123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:6[0-36]|88)\\d{4}",,,,"601234"],"FO",298,"00",,,,"(10(?:01|[12]0|88))",,,,[[,"(\\d{6})","$1",,,"$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],
19471            [,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],FR:[,[,,"[1-9]\\d{8}",,,,,,,[9]],[,,"[1-5]\\d{8}",,,,"123456789"],[,,"(?:6\\d|7[3-9])\\d{7}",,,,"612345678"],[,,"80[0-5]\\d{6}",,,,"801234567"],[,,"89[1-37-9]\\d{6}",,,,"891123456"],[,,"8(?:1[0-29]|2[0156]|84|90)\\d{6}",,,,"810123456"],[,,,,,,,,,[-1]],[,,"9\\d{8}",,,,"912345678"],"FR",33,"00","0",,,"0",,,,[[,"([1-79])(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"],[,"(1\\d{2})(\\d{3})","$1 $2",["11"],"$1"],[,"(8\\d{2})(\\d{2})(\\d{2})(\\d{2})",
19472            "$1 $2 $3 $4",["8"],"0 $1"]],[[,"([1-79])(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"],[,"(8\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"80[6-9]\\d{6}",,,,"806123456"],,,[,,,,,,,,,[-1]]],GA:[,[,,"0?\\d{7}",,,,,,,[7,8]],[,,"01\\d{6}",,,,"01441234",,,[8]],[,,"0?[2-7]\\d{6}",,,,"06031234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GA",241,"00",,,,,,,,[[,"(\\d)(\\d{2})(\\d{2})(\\d{2})",
19473            "$1 $2 $3 $4",["[2-7]"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GB:[,[,,"\\d{7,10}",,,,,,,[7,9,10],[4,5,6,8]],[,,"2(?:0[01378]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{7}|1(?:1(?:3[0-48]|[46][0-4]|5[0-26-9]|[78][0-49])|21[0-7]|31[0-8]|[4-69]1\\d)\\d{6}|1(?:2(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)|3(?:0\\d|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[28][02-57-9]|[37]\\d|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|2[024-9]|3[015689]|4[02-9]|5[03-9]|6\\d|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0124578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|8\\d|9[2-57]))\\d{6}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[345])))|3(?:638[2-5]|647[23]|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2
19473-57]|6[1-8]|7[2-8])|140)|8(?:052|87[123]))|5(?:24(?:3[2-79]|6\\d)|276\\d|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[567]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|955[0-4])|7(?:26(?:6[13-9]|7[0-7])|442\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|84(?:3[2-58]))|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}|176888[2-46-8]\\d{2}|16977[23]\\d{3}",
19474            ,,,"1212345678",,,[9,10],[4,5,6,7,8]],[,,"7(?:[1-3]\\d{3}|4(?:[0-46-9]\\d{2}|5(?:[0-689]\\d|7[0-57-9]))|5(?:0[0-8]|[13-9]\\d|2[0-35-9])\\d|7(?:0(?:0[01]|[1-9]\\d)|[1-7]\\d{2}|8[02-9]\\d|9[0-689]\\d)|8(?:[014-9]\\d|[23][0-8])\\d|9(?:[024-9]\\d{2}|1(?:[02-9]\\d|1[028])|3[0-689]\\d))\\d{5}",,,,"7400123456",,,[10]],[,,"80(?:0(?:1111|\\d{6,7})|8\\d{7})|500\\d{6}",,,,"8001234567"],[,,"(?:87[123]|9(?:[01]\\d|8[2349]))\\d{7}",,,,"9012345678",,,[10]],[,,"8(?:4(?:5464\\d|[2-5]\\d{7})|70\\d{7})",,,,"8431234567",
19475            ,,[7,10]],[,,"70\\d{8}",,,,"7012345678",,,[10]],[,,"56\\d{8}",,,,"5612345678",,,[10]],"GB",44,"00","0"," x",,"0",,,,[[,"(7\\d{3})(\\d{6})","$1 $2",["7(?:[1-57-9]|62)","7(?:[1-57-9]|624)"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2|5[56]|7[06]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:[02-9]1|1)|3|9[018]"],"0$1"],[,"(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],[,"(1\\d{3})(\\d{5,6})",
19476            "$1 $2",["1"],"0$1"],[,"(800)(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],[,"(845)(46)(4\\d)","$1 $2 $3",["845","8454","84546","845464"],"0$1"],[,"(8\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8(?:4[2-5]|7[0-3])"],"0$1"],[,"(80\\d)(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1"],[,"([58]00)(\\d{6})","$1 $2",["[58]00"],"0$1"]],,[,,"76(?:0[012]|2[356]|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}",,,,"7640123456",,,[10]],1,,[,,,,,,,,,[-1]],[,,"(?:3[0347]|55)\\d{8}",,,,"5512345678",,,[10]],,,[,
19477            ,,,,,,,,[-1]]],GD:[,[,,"[4589]\\d{9}",,,,,,,[10],[7]],[,,"473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-49]|5[5-79]|68|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}",,,,"4732691234",,,,[7]],[,,"473(?:4(?:0[2-79]|1[04-9]|2[0-5]|58)|5(?:2[01]|3[3-8])|901)\\d{4}",,,,"4734031234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"GD",1,"011","1",,,"1",,,
19478            ,,,[,,,,,,,,,[-1]],,"473",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GE:[,[,,"[34578]\\d{8}",,,,,,,[9],[6]],[,,"(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}",,,,"322123456",,,,[6]],[,,"5(?:[14]4|5[0157-9]|68|7[0147-9]|9[0-35-9])\\d{6}",,,,"555123456"],[,,"800\\d{6}",,,,"800123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"706\\d{6}",,,,"706123456"],"GE",995,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"],
19479            [,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5"],"$1"]],,[,,,,,,,,,[-1]],,,[,,"706\\d{6}",,,,"706123456"],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GF:[,[,,"[56]\\d{8}",,,,,,,[9]],[,,"594(?:10|2[012457-9]|3[0-57-9]|4[3-9]|5[7-9]|6[0-3]|9[014])\\d{4}",,,,"594101234"],[,,"694(?:[0249]\\d|1[2-9]|3[0-48])\\d{4}",,,,"694201234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GF",594,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})",
19480            "$1 $2 $3 $4",,"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GG:[,[,,"[135789]\\d{6,9}",,,,,,,[7,9,10],[6]],[,,"1481[25-9]\\d{5}",,,,"1481256789",,,[10],[6]],[,,"7(?:781\\d|839\\d|911[17])\\d{5}",,,,"7781123456",,,[10]],[,,"80(?:0(?:1111|\\d{6,7})|8\\d{7})|500\\d{6}",,,,"8001234567"],[,,"(?:87[123]|9(?:[01]\\d|8[0-3]))\\d{7}",,,,"9012345678",,,[10]],[,,"8(?:4(?:5464\\d|[2-5]\\d{7})|70\\d{7})",,,,"8431234567",,,[7,10]],[,,"70\\d{8}",,,,"7012345678",,,[10]],[,,"56\\d{8}",
19481            ,,,"5612345678",,,[10]],"GG",44,"00","0",,,"0",,,,,,[,,"76(?:0[012]|2[356]|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}",,,,"7640123456",,,[10]],,,[,,,,,,,,,[-1]],[,,"(?:3[0347]|55)\\d{8}",,,,"5512345678",,,[10]],,,[,,,,,,,,,[-1]]],GH:[,[,,"[235]\\d{8}|8\\d{7}
19481",,,,,,,[8,9],[7]],[,,"3(?:0(?:[237]\\d|80)|[167](?:2[0-6]|7\\d|80)|2(?:2[0-5]|7\\d|80)|3(?:2[0-3]|7\\d|80)|4(?:2[013-9]|3[01]|7\\d|80)|5(?:2[0-7]|7\\d|80)|8(?:2[0-2]|7\\d|80)|9(?:[28]0|7\\d))\\d{5}",,,,"302345678",,,[9],[7]],[,,"(?:2[034678]\\d|5(?:[0457]\\d|6[01]))\\d{6}",
19482            ,,,"231234567",,,[9]],[,,"800\\d{5}",,,,"80012345",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GH",233,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"],[,"(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"800\\d{5}",,,,"80012345",,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GI:[,[,,"[256]\\d{7}",,,,,,,[8]],[,,"2(?:00\\d{2}|1(?:6[24-7]\\d|90[0-2])|2(?:2[2457]\\d|50[0-2]))\\d{3}",,,,"20012345"],[,,"(?:5[46-8]|62)\\d{6}",,,,"57123456"],
19483            [,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GI",350,"00",,,,,,,,[[,"(\\d{3})(\\d{5})","$1 $2",["2"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GL:[,[,,"[1-689]\\d{5}",,,,,,,[6]],[,,"(?:19|3[1-7]|6[14689]|8[14-79]|9\\d)\\d{4}",,,,"321000"],[,,"(?:[25][1-9]|4[2-9])\\d{4}",,,,"221234"],[,,"80\\d{4}",,,,"801234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"3[89]\\d{4}",,,,"381234"],"GL",299,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})",
19484            "$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GM:[,[,,"[2-9]\\d{6}",,,,,,,[7]],[,,"(?:4(?:[23]\\d{2}|4(?:1[024679]|[6-9]\\d))|5(?:54[0-7]|6(?:[67]\\d)|7(?:1[04]|2[035]|3[58]|48))|8\\d{3})\\d{3}",,,,"5661234"],[,,"[23679]\\d{6}",,,,"3012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GM",220,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GN:[,[,,"[367]\\d{7,8}",
19485            ,,,,,,[8,9]],[,,"30(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])\\d{4}",,,,"30241234",,,[8]],[,,"6[02356]\\d{7}",,,,"601123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"722\\d{6}",,,,"722123456",,,[9]],"GN",224,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GP:[,[,,"[56]\\d{8}",,,,,,,[9]],[,,"590(?:0[13468]|1[012]|2[0-68]|3[28]|4[0-8]|5[579]|6[0189]|70|8[0-689]|9\\d)\\d{4}",
19486            ,,,"590201234"],[,,"690(?:0[05-9]|[1-9]\\d)\\d{4}",,,,"690001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GP",590,"00","0",,,"0",,,,[[,"([56]90)(\\d{2})(\\d{4})","$1 $2-$3",,"0$1"]],,[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GQ:[,[,,"[23589]\\d{8}",,,,,,,[9]],[,,"3(?:3(?:3\\d[7-9]|[0-24-9]\\d[46])|5\\d{2}[7-9])\\d{4}",,,,"333091234"],[,,"(?:222|55[15])\\d{6}",,,,"222123456"],[,,"80\\d[1-9]\\d{5}",,,,"800123456"],[,,"90\\d[1-9]\\d{5}",
19487            ,,,"900123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GQ",240,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],[,"(\\d{3})(\\d{6})","$1 $2",["[89]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GR:[,[,,"[26-9]\\d{9}",,,,,,,[10]],[,,"2(?:1\\d{2}|2(?:2[1-46-9]|3[1-8]|4[1-7]|5[1-4]|6[1-8]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|3[1245]|4[1-7]|5[13-9]|[269][1-6]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}",
19488            ,,,"2123456789"],[,,"69\\d{8}",,,,"6912345678"],[,,"800\\d{7}",,,,"8001234567"],[,,"90[19]\\d{7}",,,,"9091234567"],[,,"8(?:0[16]|12|25)\\d{7}",,,,"8011234567"],[,,"70\\d{8}",,,,"7012345678"],[,,,,,,,,,[-1]],"GR",30,"00",,,,,,,,[[,"([27]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["2[2-9]1|[689]"]],[,"(2\\d{3})(\\d{6})","$1 $2",["2[2-9][02-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GT:[,[,,"[2-7]\\d{7}|1[89]\\d{9}",,,,,,,[8,11]],
19489            [,,"[267][2-9]\\d{6}",,,,"22456789",,,[8]],[,,"[345]\\d{7}",,,,"51234567",,,[8]],[,,"18[01]\\d{8}",,,,"18001112222",,,[11]],[,,"19\\d{9}",,,,"19001112222",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GT",502,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]"]],[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GU:[,[,,"[5689]\\d{9}",,,,,,,[10],[7]],[,,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:56|7[1-9]|8[0236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[5-9])|7(?:[079]7|2[0167]|3[45]|47|8[789])|8
vendor: 1,256 bytes, lines 19489-19492
19489(?:[2-5789]8|6[48])|9(?:2[29]|6[79]|7[179]|8[789]|9[78]))\\d{4}",
19490            ,,,"6713001234",,,,[7]],[,,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:56|7[1-9]|8[0236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[5-9])|7(?:[079]7|2[0167]|3[45]|47|8[789])|8(?:[2-5789]8|6[48])|9(?:2[29]|6[79]|7[179]|8[789]|9[78]))\\d{4}",,,,"6713001234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"GU",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]],
19491            ,"671",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],GW:[,[,,"(?:4(?:0\\d{5}|4\\d{7})|9\\d{8})",,,,,,,[7,9]],[,,"443\\d{6}",,,,"443201234",,,[9]],[,,"9(?:5(?:5\\d|6[0-2])|6(?:5[0-2]|6\\d|9[012])|77\\d)\\d{5}",,,,"955012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"40\\d{5}",,,,"4012345",,,[7]],"GW",245,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["44|9[5-7]"]],[,"(\\d{3})(\\d{4})","$1 $2",["40"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,
19492            ,[,,,,,,,,,[-1]]],GY:[,[,,"[2-46-9]\\d{6}",,,,,,,[7]],[,,"(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-24-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56]
vendor: 10,683 bytes, lines 19492-19509
19492)|77[1-57])\\d{4}",,,,"2201234"],[,,"6\\d{6}",,,,"6091234"],[,,"(?:289|862)\\d{4}",,,,"2891234"],[,,"9008\\d{3}",,,,"9008123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"GY",592,"001",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],HK:[,[,,"[235-7]\\d{7}|8\\d{7,8}|9\\d{4,10}",,,,,,,[5,
19493            6,7,8,9,11]],[,,"(?:2(?:[13-8]\\d|2[013-9]|9[0-24-9])|3(?:[1569][0-24-9]|4[0-246-9]|7[0-24-69]|89)|58[01])\\d{5}",,,,"21234567",,,[8]],[,,"(?:5(?:[1-59][0-46-9]|6[0-4689]|7[0-469])|6(?:0[1-9]|[1459]\\d|[2368][0-57-9]|7[0-79])|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}",,,,"51234567",,,[8]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"900(?:[0-24-9]\\d{7}|3\\d{1,4})",,,,"90012345678",,,[5,6,7,8,11]],[,,,,,,,,,[-1]],[,,"8(?:1[1-4679]|2[0-367]|3[02-47])\\d{5}",,,,"81123456",,,[8]],[,,,,,,,,,[-1]],"HK",
19494            852,"00(?:[126-9]|30|5[09])?",,,,,,"00",,[[,"(\\d{4})(\\d{4})","$1 $2",["[235-7]|[89](?:0[1-9]|[1-9])"]],[,"(800)(\\d{3})(\\d{3})","$1 $2 $3",["800"]],[,"(900)(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["900"]],[,"(900)(\\d{2,5})","$1 $2",["900"]]],,[,,"7(?:1[0-369]|[23][0-37-9]|47|5[1578]|6[0235]|7[278]|8[236-9]|9[025-9])\\d{5}",,,,"71234567",,,[8]],,,[,,,,,,,,,[-1]],[,,"30(?:0[1-9]|[15-7]\\d|2[047]|89)\\d{4}",,,,"30161234",,,[8]],,,[,,,,,,,,,[-1]]],HN:[,[,,"[237-9]\\d{7}",,,,,,,[8]],[,,"2(?:2(?:0[019]|1[1-36]|[23]\\d|4[04-6]|5[57]|7[013689]|8[0146-9]|9[012])|4(?:07|2[3-59]|3[13-689]|4[0-68]|5[1-35])|5(?:16|4[03-5]|5\\d|6[4-6]|74)|6(?:[056]\\d|17|3[04]|4[0-378]|[78][0-8]|9[01])|7(?:6[46-9]|7[02-9]|8[034])|8(?:79|8[0-35789]|9[1-57-9]))\\d{4}",
19495            ,,,"22123456"],[,,"[37-9]\\d{7}",,,,"91234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"HN",504,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1-$2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],HR:[,[,,"[1-7]\\d{5,8}|[89]\\d{6,8}",,,,,,,[6,7,8,9]],[,,"1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}",,,,"12345678",,,[8,9],[6,7]],[,,"9(?:01\\d|[1259]\\d{2}|7(?:[0679]\\d|51)|8\\d{1,2})\\d{5}",,,,"921234567",,,[8,9]],[,,"80[01]\\d{4,6}",,,,
19496            "800123456",,,[7,8,9]],[,,"6(?:[01]\\d{0,2}|[459]\\d{2})\\d{4}",,,,"611234",,,[6,7,8]],[,,,,,,,,,[-1]],[,,"7[45]\\d{6}",,,,"74123456",,,[8]],[,,,,,,,,,[-1]],"HR",385,"00","0",,,"0",,,,[[,"(1)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],[,"([2-5]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"],"0$1"],[,"(9\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],[,"(6[01])(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],[,"([67]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]"],"0$1"],[,"(80[01])(\\d{2})(\\d{2,3})","$1 $2 $3",
19497            ["8"],"0$1"],[,"(80[01])(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"(?:62\\d?|72)\\d{6}",,,,"62123456",,,[8,9]],,,[,,,,,,,,,[-1]]],HT:[,[,,"[2-489]\\d{7}",,,,,,,[8]],[,,"2(?:2\\d|5[1-5]|81|9[149])\\d{5}",,,,"22453300"],[,,"[34]\\d{7}",,,,"34101234"],[,,"8\\d{7}",,,,"80012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:9(?:[67][0-4]|8[0-3589]|9\\d))\\d{5}",,,,"98901234"],"HT",509,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3"]],,[,,,,,,,,,[-1]],
19498            ,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],HU:[,[,,"[1-9]\\d{7,8}",,,,,,,[8,9],[6]],[,,"(?:1\\d|2[2-9]|3[2-7]|4[24-9]|5[2-79]|6[23689]|7[2-9]|8[2-57-9]|9[2-69])\\d{6}",,,,"12345678",,,[8],[6]],[,,"(?:[257]0|3[01])\\d{7}",,,,"201234567",,,[9]],[,,"[48]0\\d{6}",,,,"80123456",,,[8]],[,,"9[01]\\d{6}",,,,"90123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"21\\d{7}",,,,"211234567",,,[9]],"HU",36,"00","06",,,"06",,,,[[,"(1)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"($1)"],[,"(\\d{2})(\\d{3})(\\d{3,4})",
19499            "$1 $2 $3",["[2-9]"],"($1)"]],,[,,,,,,,,,[-1]],,,[,,"[48]0\\d{6}",,,,"80123456",,,[8]],[,,"38\\d{7}",,,,"381234567",,,[9]],,,[,,,,,,,,,[-1]]],ID:[,[,,"(?:[1-79]\\d{6,10}|8\\d{7,11})",,,,,,,[7,8,9,10,11,12],[5,6]],[,,"2(?:1(?:14\\d{3}|[0-8]\\d{6,7}|500\\d{3}|9\\d{6})|2\\d{6,8}|4\\d{7,8})|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:19?|[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}",
19500            ,,,"612345678",,,[7,8,9,10,11],[5,6]],[,,"(?:2(?:1(?:3[145]|4[01]|5[1-469]|60|8[0359]|9\\d)|2(?:88|9[1256])|3[1-4]9|4(?:36|91)|5(?:1[349]|[2-4]9)|6[0-7]9|7(?:[1-36]9|4[39])|8[1-5]9|9[1-48]9)|3(?:19[1-3]|2[12]9|3[13]9|4(?:1[69]|39)|5[14]9|6(?:1[69]|2[89])|709)|4[13]19|5(?:1(?:19|8[39])|4[129]9|6[12]9)|6(?:19[12]|2(?:[23]9|77))|7(?:1[13]9|2[15]9|419|5(?:1[89]|29)|6[15]9|7[178]9))\\d{5,6}|8[1-35-9]\\d{7,10}",,,,"812345678",,,[9,10,11,12]],[,,"177\\d{6,8}|800\\d{5,7}",,,,"8001234567",,,[8,9,10,11]],[,
19501            ,"809\\d{7}",,,,"8091234567",,,[10]],[,,"804\\d{7}",,,,"8041234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ID",62,"0(?:0[1789]|10(?:00|1[67]))","0",,,"0",,,,[[,"(\\d{2})(\\d{5,8})","$1 $2",["2[124]|[36]1"],"(0$1)"],[,"(\\d{3})(\\d{5,8})","$1 $2",["2[035-9]|[36][02-9]|[4579]"],"(0$1)"],[,"(8\\d{2})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],[,"(8\\d{2})(\\d{4})(\\d{4,5})","$1-$2-$3",["8[1-35-9]"],"0$1"],[,"(1)(500)(\\d{3})","$1 $2 $3",["15"],"$1"],[,"(177)(\\d{6,8})","$1 $2",["17"],"0$1"],
19502            [,"(800)(\\d{5,7})","$1 $2",["800"],"0$1"],[,"(804)(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],[,"(80\\d)(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80[79]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"8071\\d{6}",,,,"8071123456",,,[10]],[,,"1500\\d{3}|8071\\d{6}",,,,"8071123456",,,[7,10]],,,[,,,,,,,,,[-1]]],IE:[,[,,"[124-9]\\d{6,9}",,,,,,,[7,8,9,10],[5,6]],[,,"1\\d{7,8}|2(?:1\\d{6,7}|3\\d{7}|[24-9]\\d{5})|4(?:0[24]\\d{5}|[1-469]\\d{7}|5\\d{6}|7\\d{5}|8[0-46-9]\\d{7})|5(?:0[45]\\d{5}|1\\d{6}|[23679]\\d{7}|8\\d{5})|6(?:1\\d{6}|[237-9]\\d{5}|[4-6]\\d{7})|7[14]\\d{7}|9(?:1\\d{6}|[04]\\d{7}|[35-9]\\d{5})",
19503            ,,,"2212345",,,,[5,6]],[,,"8(?:22\\d{6}|[35-9]\\d{7})",,,,"850123456",,,[9]],[,,"1800\\d{6}",,,,"1800123456",,,[10]],[,,"15(?:1[2-8]|[2-8]0|9[089])\\d{6}",,,,"1520123456",,,[10]],[,,"18[59]0\\d{6}",,,,"1850123456",,,[10]],[,,"700\\d{6}",,,,"700123456",,,[9]],[,,"76\\d{7}",,,,"761234567",,,[9]],"IE",353,"00","0",,,"0",,,,[[,"(1)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],[,"(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],[,"(\\d{3})(\\d{5})","$1 $2",["40[24]|50[45]"],"(0$1)"],
19504            [,"(48)(\\d{4})(\\d{4})","$1 $2 $3",["48"],"(0$1)"],[,"(818)(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[24-69]|7[14]"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["76|8[35-9]"],"0$1"],[,"(8\\d)(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8[35-9]5"],"0$1"],[,"(700)(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:5|8[059])","1(?:5|8[059]0)"],"$1"]],,[,,,,,,,,,[-1]],,,[,,"18[59]0\\d{6}",,,,"1850123456",,,[10]],[,,"818\\d{6}",
19505            ,,,"818123456",,,[9]],,,[,,"8[35-9]5\\d{7}",,,,"8551234567",,,[10]]],IL:[,[,,"1\\d{6,11}|[2-589]\\d{3}(?:\\d{3,6})?|6\\d{3}|7\\d{6,9}",,,,,,,[4,7,8,9,10,11,12]],[,,"(?:153\\d{1,2}|[2-489])\\d{7}",,,,"21234567",,,[8,11,12],[7]],[,,"5(?:[0-47-9]\\d{2}|5(?:01|2[23]|3[2-4]|4[45]|5[5689]|6[6-8]|7[0178]|8[6-9]|9[2-9])|6[2-9]\\d)\\d{5}",,,,"501234567",,,[9]],[,,"1(?:80[019]\\d{3}|255)\\d{3}",,,,"1800123456",,,[7,10]],[,,"1(?:212|(?:9(?:0[01]|19)|200)\\d{2})\\d{4}",,,,"1919123456",,,[8,9,10]],[,,"1700\\d{6}",
19506            ,,,"1700123456",,,[10]],[,,,,,,,,,[-1]],[,,"7(?:18\\d|2[23]\\d|3[237]\\d|47\\d|6[58]\\d|7\\d{2}|8(?:2\\d|33|55|77|81)|9[2579]\\d)\\d{5}",,,,"771234567",,,[9]],"IL",972,"0(?:0|1[2-9])","0",,,"0",,,,[[,"([2-489])(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],[,"([57]\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],[,"(153)(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["153"],"$1"],[,"(1)([7-9]\\d{2})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"],"$1"],[,"(1255)(\\d{3})","$1-$2",["125"],"$1"],[,"(1200)(\\d{3})(\\d{3})",
19507            "$1-$2-$3",["120"],"$1"],[,"(1212)(\\d{2})(\\d{2})","$1-$2-$3",["121"],"$1"],[,"(1599)(\\d{6})","$1-$2",["159","1599"],"$1"],[,"(151)(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["151"],"$1"],[,"(\\d{4})","*$1",["[2-689]"],"$1"]],,[,,,,,,,,,[-1]],,,[,,"1700\\d{6}|[2-689]\\d{3}",,,,"1700123456",,,[4,10]],[,,"[2-689]\\d{3}|1599\\d{6}",,,,"1599123456",,,[4,10]],,,[,,"151\\d{8,9}",,,,"15112340000",,,[11,12]]],IM:[,[,,"[135789]\\d{6,9}",,,,,,,[10],[6]],[,,"1624[5-8]\\d{5}",,,,"1624756789",,,,[6]],[,,"7(?:4576|[59]24\\d|624[0-4689])\\d{5}",
19508            ,,,"7924123456"],[,,"808162\\d{4}",,,,"8081624567"],[,,"(?:872299|90[0167]624)\\d{4}",,,,"9016247890"],[,,"8(?:4(?:40[49]06|5624\\d)|70624\\d)\\d{3}",,,,"8456247890"],[,,"70\\d{8}",,,,"7012345678"],[,,"56\\d{8}",,,,"5612345678"],"IM",44,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"3(?:08162\\d|3\\d{5}|4(?:40[49]06|5624\\d)|7(?:0624\\d|2299\\d))\\d{3}|55\\d{8}",,,,"5512345678"],,,[,,,,,,,,,[-1]]],IN:[,[,,"008\\d{9}|1\\d{7,12}|[2-9]\\d{9,10}",,,,,,,[8,9,10,11,12,13],[6,7]],[,,"(?:11|2[02]|33|4[04]|79)[2-7]\\d{7}|3880\\d{6}|80[2-467]\\d{7}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|[36][25]|22|4[28]|5[12]|[78]1|9[15])|6(?:12|[2345]1|57|6[13]|7[14]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[13-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1-5]|4[25-8]|5[125689]|6[235-7]|7[157-9]|8[2-467])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|[57][2-689]|6[24-578]|8[1-6])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d|7(?:(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|9\\d)\\d|8(?:2[0-6]|[013-8]\\d)))[2-7]\\d{5}",
19509            ,,,"1123456789",,,[10],[6,7,8]],[,,"(?:600[1-3]\\d|7(?:0\\d{3}|19[0-5]\\d|2(?:[0235679]\\d{2}|[14][017-9]\\d|8(?:[0-59]\\d|[678][089]))|3(?:[05-8]\\d{2}|1(?:[089]\\d|11|7[5-8])|2(?:[0-49][089]|[5-8]\\d)|3[017-9]\\d|4(?:[07-9]\\d|11)|9(?:[016-9]\\d|[2-5][089]))|4(?:0\\d{2}|1(?:[015-9]\\d|[23][089]|4[089])|2(?:0[089]|[1-7][089]|[89]\\d)|3(?:[0-8][089]|9\\d)|4(?:[089]\\d|11|7[02-8])|[56]\\d[089]|7(?:[
19509089]\\d|11|7[02-8])|8(?:[0-24-7][089]|[389]\\d)|9(?:[0-6][089]|7[089]|[89]\\d))|5(?:[0346-8]\\d{2}|1(?:[07-9]\\d|11)|2(?:[04-9]\\d|[123][089])|5[017-9]\\d|9(?:[0-6][089]|[7-9]\\d))|6(?:0(?:[0-47]\\d|[5689][089])|(?:1[0-257-9]|[6-9]\\d)\\d|2(?:[0-4]\\d|[5-9][089])|3(?:[02-8][089]|[19]\\d)|4\\d[089]|5(?:[0-367][089]|[4589]\\d))|7(?:0(?:0[02-9]|[13-6][089]|[289]\\d|7[89])|[1-9]\\d{2})|8(?:[0-79]\\d{2}|8(?:[089]\\d|11|7[02-9]))|9(?:[089]\\d{2}|313|7(?:[02-8]\\d|9[07-9])))|8(?:0(?:[01589]\\d{2}|6[67]\\d|7(?:[02-8]\\d|9[05-9]))|1(?:[02-57-9]\\d{2}|1(?:[0-35-9]\\d|4[0-46-9])|6(?:[089]\\d|7[02-8]))|2(?:0(?:[089]\\d|7[02])|[14](?:[089]\\d|7[02-8])|[235-9]\\d{2})|3(?:[0357-9]\\d{2}|1(?:[089]\\d|7[02-6])|2(?:[09]\\d|77|8[0-689])|4(?:0[1-7]|[1-9]\\d)|6(?:[089]\\d|7[02-7]))|[45]\\d{3}|6(?:[02457-9]\\d{2}|1(?:[089]\\d|7[02-8])|3(?:[089]\\d|7[02-8])|6(?:[08]\\d|7[02-8]|9\\d))|7(?:0[07-9]\\d|[1-69]\\d{2}|[78](?:[089]\\d|7[02-8]))|8(?:[0-25-9]\\d{2}|3(?:[089]\\d|7[02-8])|4(?:[0489]\\d|7[02-68]))|9(?:[02-9]\\d{2}|1(?:[0289]\\d|7[2-6])))|9\\d{4})\\d{5}",
19510            ,,,"8123456789",,,[10]],[,,"00800\\d{7}|1(?:600\\d{6}|80(?:0\\d{4,9}|3\\d{9}))",,,,"1800123456"],[,,"186[12]\\d{9}",,,,"1861123456789",,,[13]],[,,"1860\\d{7}",,,,"18603451234",,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"IN",91,"00","0",,,"0",,,,[[,"(\\d{8})","$1",["561","5616","56161"],"$1",,1],[,"(\\d{5})(\\d{5})","$1 $2",["600|7(?:[02-8]|19|9[037-9])|8(?:0[015-9]|[1-9])|9","600|7(?:[07]|19[0-5]|2(?:[0235-9]|[14][017-9])|3(?:[025-9]|[134][017-9])|4(?:[0-35689]|[47][017-9])|5(?:[02-46-9]|[15][017-9])|6(?:[02-9]|1[0-257-9])|8(?:[0-79]|8[0189])|9(?:[089]|31|7[02-9]))|8(?:0(?:[01589]|6[67]|7[02-9])|1(?:[0-57-9]|6[07-9])|2(?:[014][07-9]|[235-9])|3(?:[03-57-9]|[126][07-9])|[45]|6(?:[02457-9]|[136][07-9])|7(?:[078][07-9]|[1-69])|8(?:[0-25-9]|3[07-9]|4[047-9])|9(?:[02-9]|1[027-9]))|9",
19511            "600|7(?:0|19[0-5]|2(?:[0235-79]|[14][017-9]|8(?:[0-69]|[78][089]))|3(?:[05-8]|1(?:[0189]|7[5-9])|2(?:[0-49][089]|[5-8])|3[017-9]|4(?:[07-9]|11)|9(?:[01689]|[2-5][089]|7[0189]))|4(?:[056]|1(?:[0135-9]|[24][089])|[29](?:[0-7][089]|[89])|3(?:[0-8][089]|9)|[47](?:[089]|11|7[02-8])|8(?:[0-24-7][089]|[389]))|5(?:[0346-9]|[15][017-9]|2(?:[03-9]|[12][089]))|6(?:[0346-9]|1[0-257-9]|2(?:[0-4]|[5-9][089])|5(?:[0-367][089]|[4589]))|7(?:0(?:[02-9]|1[089])|[1-9])|8(?:[0-79]|8(?:0[0189]|11|8[013-9]|9))|9(?:[089]|313|7(?:[02-8]|9[07-9])))|8(?:0(?:[01589]|6[67]|7(?:[02-8]|9[05-9]))|1(?:[02-57-9]|1(?:[0-35-9]|4[0-46-9])|6(?:[089]|7[02-8]))|2(?:0(?:[089]|7[02])|[14](?:[089]|7[02-8])|[235-9])|3(?:[0357-9]|1(?:[089]|7[02-6])|2(?:[09]|77|8[0-689])|4(?:0[1-7]|[1-9])|6(?:[089]|7[02-7]))|[45]|6(?:[02457-9]|[136](?:[089]|7[02-8]))|7(?:0[07-9]|[1-69]|[78](?:[089]|7[02-8]))|8(?:[0-25-9]|3(?:[089]|7[02-8])|4(?:[0489]|7[02-68]))|9(?:[02-9]|1(?:[0289]|7[2-6])))|9"],
19512            "0$1",,1],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-9]|80[2-46]"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[59][14]|[68][1-9]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1|9[15])|6(?:12|[2-4]1|5[17]|6[13]|7[14]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)"],
19513            "0$1",,1],[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[23579]|[468][1-9])|[2-8]"],"0$1",,1],[,"(\\d{2})(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3 $4",["008"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],"$1",,1],[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["160","1600"],"$1",,1],[,"(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],"$1",,1],[,"(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["180","1800"],"$1",,1],[,"(\\d{4})(\\d{3,4})(\\d{4})","$1 $2 $3",["186","1860"],"$1",,1],[,"(\\d{4})(\\d{3})(\\d{3})(\\d{3})",
19514            "$1 $2 $3 $4",["18[06]"],"$1",,1]],,[,,,,,,,,,[-1]],,,[,,"00800\\d{7}|1(?:600\\d{6}|8(?:0(?:0\\d{4,9}|3\\d{9})|6(?:0\\d{7}|[12]\\d{9})))",,,,"1800123456"],[,,"140\\d{7}",,,,"1409305260",,,[10]],,,[,,,,,,,,,[-1]]],IO:[,[,,"3\\d{6}",,,,,,,[7]],[,,"37\\d{5}",,,,"3709100"],[,,"38\\d{5}",,,,"3801234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"IO",246,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],
19515        IQ:[,[,,"[1-7]\\d{7,9}",,,,,,,[8,9,10],[6,7]],[,,"1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}",,,,"12345678",,,[8,9],[6,7]],[,,"7[3-9]\\d{8}",,,,"7912345678",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"IQ",964,"00","0",,,"0",,,,[[,"(1)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],[,"([2-6]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],[,"(7\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
19516            ,,[,,,,,,,,,[-1]]],IR:[,[,,"[1-8]\\d{5,9}|9(?:[0-4]\\d{8}|9\\d{8})",,,,,,,[6,7,10],[4,5,8]],[,,"(?:(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])(?:\\d{8}|(?:[16]|[289]\\d?)\\d{3}))|94(?:000\\d|11[0-7]\\d|2\\d{3}|3016|440\\d)\\d{4}",,,,"2123456789",,,,[4,5,8]],[,,"9(?:0(?:[1-3]\\d{2}|44\\d)|[13]\\d{3}|2[0-2]\\d{2}|9(?:0\\d{2}|44\\d|810|9(?:00|1[13]|9[89])))\\d{5}",,,,"9123456789",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:[2-6]0\\d|993)\\d{7}",
19517            ,,,"9932123456",,,[10]],"IR",98,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"],[,"(\\d{2})(\\d{4,5})","$1 $2",["[1-8]"],"0$1"],[,"(\\d{4,5})","$1",["96"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"(?:9411[1-7]|94440)\\d{5}",,,,"9411110000",,,[10]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],IS:[,[,,"[4-9]\\d{6}|38\\d{7}",,,,,,,[7,9]],[,,"(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-245]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-79]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|87[23])\\d{4}",
19518            ,,,"4101234",,,[7]],[,,"38[589]\\d{6}|(?:6(?:1[1-8]|2[0-6]|3[027-9]|4[014679]|5[0159]|[67][0-69]|9\\d)|7(?:5[057]|[6-8]\\d)|8(?:2[0-59]|3[0-4]|[469]\\d|5[1-9]|88))\\d{4}",,,,"6111234"],[,,"800\\d{4}",,,,"8001234",,,[7]],[,,"90\\d{5}",,,,"9011234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"49\\d{5}",,,,"4921234",,,[7]],"IS",354,"1(?:0(?:01|10|20)|100)|00",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],[,"(3\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"809\\d{4}",
19519            ,,,"8091234",,,[7]],,,[,,"(?:6(?:2[78]|8\\d)|8(?:7[0189]|80)|95[48])\\d{4}",,,,"6271234",,,[7]]],IT:[,[,,"[01589]\\d{5,10}|3(?:[12457-9]\\d{8}|[36]\\d{7,9})",,,,,,,[6,7,8,9,10,11]],[,,"0(?:[26]\\d{4,9}|(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2346]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[34578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7})",
19520            ,,,"0212345678"],[,,"3(?:[12457-9]\\d{8}|6\\d{7,8}|3\\d{7,9})",,,,"3123456789",,,[9,10,11]],[,,"80(?:0\\d{6}|3\\d{3})",,,,"800123456",,,[6,9]],[,,"0878\\d{5}|1(?:44|6[346])\\d{6}|89(?:2\\d{3}|4(?:[0-4]\\d{2}|[5-9]\\d{4}
19520)|5(?:[0-4]\\d{2}|[5-9]\\d{6})|9\\d{6})",,,,"899123456",,,[6,8,9,10]],[,,"84(?:[08]\\d{6}|[17]\\d{3})",,,,"848123456",,,[6,9]],[,,"1(?:78\\d|99)\\d{6}",,,,"1781234567",,,[9,10]],[,,"55\\d{8}",,,,"5512345678",,,[10]],"IT",39,"00",,,,,,,,[[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|55"]],
19521            [,"(0[26])(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],[,"(0[26])(\\d{4,6})","$1 $2",["0[26]"]],[,"(0\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]"]],[,"(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[245])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|[45][0-4]))"]],[,"(0\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["0[13-57-9][2-46-8]"]],[,"(0\\d{3})(\\d{2,6})","$1 $2",["0[13-57-9][2-46-8]"]],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13]|8(?:00|4[08]|9[59])","[13]|8(?:00|4[08]|9(?:5[5-9]|9))"]],
19522            [,"(\\d{4})(\\d{4})","$1 $2",["894","894[5-9]"]],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["3"]]],,[,,,,,,,,,[-1]],1,,[,,"848\\d{6}",,,,"848123456",,,[9]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],JE:[,[,,"[135789]\\d{6,9}",,,,,,,[10],[6]],[,,"1534[0-24-8]\\d{5}",,,,"1534456789",,,,[6]],[,,"7(?:509\\d|7(?:00[378]|97[7-9])|829\\d|937\\d)\\d{5}",,,,"7797712345"],[,,"80(?:07(?:35|81)|8901)\\d{4}",,,,"8007354567"],[,,"(?:871206|90(?:066[59]|1810|71(?:07|55)))\\d{4}",,,,"9018105678"],[,,"8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|70002)\\d{4}",
19523            ,,,"8447034567"],[,,"701511\\d{4}",,,,"7015115678"],[,,"56\\d{8}",,,,"5612345678"],"JE",44,"00","0",,,"0",,,,,,[,,"76(?:0[012]|2[356]|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}",,,,"7640123456"],,,[,,,,,,,,,[-1]],[,,"3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))\\d{4}|55\\d{8}",,,,"5512345678"],,,[,,,,,,,,,[-1]]],JM:[,[,,"[589]\\d{9}",,,,,,,[10],[7]],[,,"876(?:5(?:0[12]|1[0-468]|2[35]|63)|6(?:0[1-3579]|1[027-9]|[23]\\d|40|5[06]|6[2-589]|7[05]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468]))\\d{4}",
19524            ,,,"8765123456",,,,[7]],[,,"876(?:2[14-9]\\d|[348]\\d{2}|5(?:0[3-9]|[2-57-9]\\d|6[0-24-9])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579]))\\d{4}",,,,"8762101234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"JM",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"876",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],JO:[,[,,"[235-9]\\d{7,8}",,,,,,,[8,
19525            9]],[,,"(?:2(?:6(?:2[0-35-9]|3[0-57-8]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[57][023]|6[03])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2[50]0|3(?:00|33)|4(?:0[0125]|1[2-7]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[17-8]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[02-39]))|87(?:[02]0|7[08]|90))\\d{4}",,,,"62001234",,,[8]],[,,"7(?:55|7[025-9]|8[0-25-9]|9[0-25-9])\\d{6}",
19526            ,,,"790123456",,,[9]],[,,"80\\d{6}",,,,"80012345",,,[8]],[,,"900\\d{5}",,,,"90012345",,,[8]],[,,"85\\d{6}",,,,"85012345",,,[8]],[,,"70\\d{7}",,,,"700123456",,,[9]],[,,,,,,,,,[-1]],"JO",962,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],[,"(7)(\\d{4})(\\d{4})","$1 $2 $3",["7[457-9]"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],[,"(\\d{3})(\\d{5,6})","$1 $2",["8[0158]|9"],"0$1"]],,[,,"74(?:66|77)\\d{5}",,,,"746612345",,,[9]],,,[,,,,,,,,,[-1]],[,,"8(?:10|8\\d)\\d{5}",
19527            ,,,"88101234",,,[8]],,,[,,,,,,,,,[-1]]],JP:[,[,,"[1-9]\\d{8,9}|00(?:[36]\\d{7,14}|7\\d{5,7}|8\\d{7})",,,,,,,[8,9,10,11,12,13,14,15,16,17]],[,,"(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|2[2-9]\\d|[36][1-9]\\d|4(?:6[02-8]|[2-578]\\d|9[2-59])|5(?:6[1-9]|7[2-8]|[2-589]\\d)|7(?:3[4-9]|4[02-9]|[25-9]\\d)|8(?:3[2-9]|4[5-9]|5[1-9]|8[03-9]|[2679]\\d)|9(?:[679][1-9]|[2-58]\\d))\\d{6}",,,,"312345678",,,[9]],[,,"[7-9]0[1-9]\\d{7}",,,,"9012345678",,,[10]],[,,"120\\d{6}|800\\d{7}|00(?:37\\d{6,13}|66\\d{6,13}|777(?:[01]\\d{2}|5\\d{3}|8\\d{4})|882[1245]\\d{4})",
19528            ,,,"120123456"],[,,"990\\d{6}",,,,"990123456",,,[9]],[,,,,,,,,,[-1]],[,,"60\\d{7}",,,,"601234567",,,[9]],[,,"50[1-9]\\d{7}",,,,"5012345678",,,[10]],"JP",81,"010","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],[,"(\\d{4})(\\d{4})","$1-$2",["007","0077"],"$1"],[,"(\\d{4})(\\d{2})(\\d{3,4})","$1-$2-$3",["007","0077"],"$1"],[,"(\\d{4})(\\d{2})(\\d{4})","$1-$2-$3",["008","0088"],"$1"],[,"(\\d{4})(\\d{3})(\\d{3,4})",
19529            "$1-$2-$3",["00[36]","00(?:37|66)"],"$1"],[,"(\\d{4})(\\d{4})(\\d{4,5})","$1-$2-$3",["00[36]","00(?:37|66)"],"$1"],[,"(\\d{4})(\\d{5})(\\d{5,6})","$1-$2-$3",["00[36]","00(?:37|66)"],"$1"],[,"(\\d{4})(\\d{6})(\\d{6,7})","$1-$2-$3",["00[36]","00(?:37|66)"],"$1"],[,"(\\d{2})(\\d{4})(\\d{4}
19529)","$1-$2-$3",["[2579]0|80[1-9]"],"0$1"],[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:49|80|9[16])","1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[78]|96)|477|51[24]|636)|9(?:496|802|9(?:1[23]|69))",
19530            "1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[78]|96[2457-9])|477|51[24]|636[2-57-9])|9(?:496|802|9(?:1[23]|69))"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["1(?:2[3-6]|3[3-9]|4[2-6]|5[2-8]|[68][2-7]|7[2-689]|9[1-578])|2(?:2[03-689]|3[3-58]|4[0-468]|5[04-8]|6[013-8]|7[06-9]|8[02-57-9]|9[13])|4(?:2[28]|3[689]|6[035-7]|7[05689]|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9[4-9])|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9[014-9])|8(?:2[49]|3[3-8]|4[5-8]|5[2-9]|6[35-9]|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9[3-7])",
19531            "1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:[0468][2-9]|5[78]|7[2-4])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[4-7]|[89][2-8]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9[2-8])|3(?:[3-6][2-9]|7[2-6]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5[4-7]|6[2-9]|8[2-8]|9[236-9])|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3[34]|4[2-69]|[5-7]))",
19532            "1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:[0468][2-9]|5[78]|7[2-4])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[4-7]|[89][2-8]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:20|[3578]|4[04-9]|6[56]))|3(?:[3-6][2-9]|7(?:[2-5]|6[0-59])|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))",
19533            "1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:[0468][2-9]|5[78]|7[2-4])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[4-7]|[89][2-8]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:20|[3578]|4[04-9]|6(?:5[25]|60)))|3(?:[3-6][2-9]|7(?:[2-5]|6[0-59])|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))"],
19534            "0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1|2(?:2[37]|5[5-9]|64|78|8[39]|91)|4(?:2[2689]|64|7[347])|5[2-589]|60|8(?:2[124589]|3[279]|[46-9])|9(?:[235-8]|93)","1|2(?:2[37]|5(?:[57]|[68]0|9[19])|64|78|8[39]|917)|4(?:2(?:20|[68]|9[178])|64|7[347])|5[2-589]|60|8(?:2[124589]|3[279]|[46-9])|9(?:[235-8]|93[34])","1|2(?:2[37]|5(?:[57]|[68]0|9(?:17|99))|64|78|8[39]|917)|4(?:2(?:20|[68]|9[178])|64|7[347])|5[2-589]|60|8(?:2[124589]|3[279]|[46-9])|9(?:[235-8]|93(?:31|4))"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{4})",
19535            "$1-$2-$3",["2(?:[34]7|[56]9|74|9[14-79])|82|993"],"0$1"],[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[2479][1-9]"],"0$1"]],[[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],[,"(\\d{2})(\\d{4})(\\d{4}
19535)","$1-$2-$3",["[2579]0|80[1-9]"],"0$1"],[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:49|80|9[16])",
19536            "1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[78]|96)|477|51[24]|636)|9(?:496|802|9(?:1[23]|69))","1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[78]|96[2457-9])|477|51[24]|636[2-57-9])|9(?:496|802|9(?:1[23]|69))"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["1(?:2[3-6]|3[3-9]|4[2-6]|5[2-8]|[68][2-7]|7[2-689]|9[1-578])|2(?:2[03-689]|3[3-58]|4[0-468]|5[04-8]|6[013-8]|7[06-9]|8[02-57-9]|9[13])|4(?:2[28]|3[689]|6[035-7]|7[05689]|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9[4-9])|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9[014-9])|8(?:2[49]|3[3-8]|4[5-8]|5[2-9]|6[35-9]|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9[3-7])",
19537            "1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:[0468][2-9]|5[78]|7[2-4])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[4-7]|[89][2-8]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9[2-8])|3(?:[3-6][2-9]|7[2-6]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5[4-7]|6[2-9]|8[2-8]|9[236-9])|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3[34]|4[2-69]|[5-7]))",
19538            "1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:[0468][2-9]|5[78]|7[2-4])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[4-7]|[89][2-8]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:20|[3578]|4[04-9]|6[56]))|3(?:[3-6][2-9]|7(?:[2-5]|6[0-59])|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))",
19539            "1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:[0468][2-9]|5[78]|7[2-4])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[4-7]|[89][2-8]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:20|[3578]|4[04-9]|6(?:5[25]|60)))|3(?:[3-6][2-9]|7(?:[2-5]|6[0-59])|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))"],
19540            "0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1|2(?:2[37]|5[5-9]|64|78|8[39]|91)|4(?:2[2689]|64|7[347])|5[2-589]|60|8(?:2[124589]|3[279]|[46-9])|9(?:[235-8]|93)","1|2(?:2[37]|5(?:[57]|[68]0|9[19])|64|78|8[39]|917)|4(?:2(?:20|[68]|9[178])|64|7[347])|5[2-589]|60|8(?:2[124589]|3[279]|[46-9])|9(?:[235-8]|93[34])","1|2(?:2[37]|5(?:[57]|[68]0|9(?:17|99))|64|78|8[39]|917)|4(?:2(?:20|[68]|9[178])|64|7[347])|5[2-589]|60|8(?:2[124589]|3[279]|[46-9])|9(?:[235-8]|93(?:31|4))"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{4})",
19541            "$1-$2-$3",["2(?:[34]7|[56]9|74|9[14-79])|82|993"],"0$1"],[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[2479][1-9]"],"0$1"]],[,,"20\\d{8}",,,,"2012345678",,,[10]],,,[,,"00(?:37\\d{6,13}|66\\d{6,13}|777(?:[01]\\d{2}|5\\d{3}|8\\d{4})|882[1245]\\d{4})",,,,"00777012"],[,,"570\\d{6}",,,,"570123456",,,[9]],,,[,,,,,,,,,[-1]]],KE:[,[,,"20\\d{6,7}|[4-9]\\d{6,9}",,,,,,,[7,8,9,10]],[,,"20\\d{6,7}|4(?:0\\d{6,7}|[136]\\d{7}|[245]\\d{5,7})|5(?:[08]\\d{7}|[1-79]\\d{5,7})|6(?:[01457-9]\\d{5,7}|2\\d{7}|6\\d{6,7})",
vendor: 7,130 bytes, lines 19542-19555
19542            ,,,"202012345",,,[7,8,9]],[,,"7(?:[0-3679]\\d|4[0-46-9]|5[0-6]|8[0-25-9])\\d{6}",,,,"712123456",,,[9]],[,,"800[24-8]\\d{5,6}",,,,"800223456",,,[9,10]],[,,"900[02-9]\\d{5}",,,,"900223456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KE",254,"000","0",,,"005|0",,,,[[,"(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],[,"(\\d{3})(\\d{6})","$1 $2",["7"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KG:[,[,
19543            ,"[235-8]\\d{8,9}",,,,,,,[9,10],[5,6]],[,,"(?:3(?:1(?:[256]\\d|3[1-9]|47)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}",,,,"312123456",,,[9],[5,6]],[,,"(?:20[0-35]|5[0-24-7]\\d|7[07]\\d)\\d{6}",,,,"700123456",,,[9]],[,,"800\\d{6,7}",,,,"800123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KG",996,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",
19544            ["[25-7]|31[25]"],"0$1"],[,"(\\d{4})(\\d{5})","$1 $2",["3(?:1[36]|[2-9])"],"0$1"],[,"(\\d{3})(\\d{3})(\\d)(\\d{3})","$1 $2 $3 $4",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KH:[,[,,"[1-9]\\d{7,9}",,,,,,,[8,9,10],[6,7]],[,,"(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:[237-9]|4[56]|5\\d|6\\d?)\\d{5}|23(?:4[234]|8\\d{2})\\d{4}",,,,"23756789",,,[8,9],[6,7]],[,,"(?:1(?:[013-79]\\d|[28]\\d{1,2})|2[3-6]48|3(?:[18]\\d{2}|[2-6]48)|4[2-4]48|5[2-5]48|6(?:[016-9]\\d|[2-5]48)|7(?:[07-9]\\d|[16]\\d{2}|[2-5]48)|8(?:[013-79]\\d|8\\d{2})|9(?:6\\d{2}|7\\d{1,2}|[0-589]\\d))\\d{5}",
19545            ,,,"91234567",,,[8,9]],[,,"1800(?:1\\d|2[019])\\d{4}",,,,"1800123456",,,[10]],[,,"1900(?:1\\d|2[09])\\d{4}",,,,"1900123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KH",855,"00[14-9]","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["1\\d[1-9]|[2-9]"],"0$1"],[,"(1[89]00)(\\d{3})(\\d{3})","$1 $2 $3",["1[89]0"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KI:[,[,,"[2458]\\d{4}|3\\d{4,7}|[67]\\d{7}",,,,,,,[5,8]],[,,"(?:[24]\\d|3[1-9]|50|8[0-5])\\d{3}|(?:65(?:02[12]|12[56]|22[89]|[3-5]00)|7(?:27\\d{2}|3100|5(?:02[12]|12[56]|22[89]|[34](?:00|81)|500)))\\d{3}",
19546            ,,,"31234"],[,,"(?:6(?:200[01]|30[01]\\d)|7(?:200[01]|3(?:0[0-5]\\d|140)))\\d{3}",,,,"72001234",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"30(?:0[01]\\d{2}|12(?:11|20))\\d{2}",,,,"30010000",,,[8]],"KI",686,"00",,,,"0",,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KM:[,[,,"[3478]\\d{6}",,,,,,,[7]],[,,"7[4-7]\\d{5}",,,,"7712345"],[,,"[34]\\d{6}",,,,"3212345"],[,,,,,,,,,[-1]],[,,"8\\d{6}",,,,"8001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,
19547            ,,,,[-1]],"KM",269,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KN:[,[,,"[589]\\d{9}",,,,,,,[10],[7]],[,,"869(?:2(?:29|36)|302|4(?:6[015-9]|70))\\d{4}",,,,"8692361234",,,,[7]],[,,"869(?:5(?:5[6-8]|6[5-7])|66\\d|76[02-7])\\d{4}",,,,"8697652917",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],
19548            [,,,,,,,,,[-1]],"KN",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"869",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KP:[,[,,"1\\d{9}|[28]\\d{7}",,,,,,,[8,10],[6,7]],[,,"2\\d{7}|85\\d{6}",,,,"21234567",,,[8],[6,7]],[,,"19[123]\\d{7}",,,,"1921234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KP",850,"00|99","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})",
19549            "$1 $2 $3",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"2(?:[0-24-9]\\d{2}|3(?:[0-79]\\d|8[02-9]))\\d{4}",,,,"23821234",,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KR:[,[,,"00(?:3\\d{8,9}|7\\d{9,11})|[1-7]\\d{4,9}|8\\d{8}",,,,,,,[5,6,8,9,10,11,12,13,14],[3,7]],[,,"2[1-9]\\d{6,7}|(?:3[1-3]|[46][1-4]|5[1-5])(?:1\\d{2,3}|[1-9]\\d{6,7})",,,,"22123456",,,[5,6,8,9,10],[3,7]],[,,"1[0-26-9]\\d{7,8}",,,,"1000000000",,,[9,10]],[,,"(?:00(?:3(?:08|68\\d)|798\\d{1,3})|80\\d)\\d{6}",,,,"801234567",,,[9,11,12,13,14]],[,,
19550            "60[2-9]\\d{6}",,,,"602345678",,,[9]],[,,,,,,,,,[-1]],[,,"50\\d{8}",,,,"5012345678",,,[10]],[,,"70\\d{8}",,,,"7012345678",,,[10]],"KR",82,"00(?:[1259]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","0",,,"0(8[1-46-8]|85\\d{2})?",,,,[[,"(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1","0$CC-$1"],[,"(\\d{4})(\\d{4})","$1-$2",["1(?:5[246-9]|6[046-8]|8[03579])","1(?:5(?:22|44|66|77|88|99)|6(?:[07]0|44|6[16]|88)|8(?:00|33|55|77|99))"],"$1","0$CC-$1"],[,"(\\d{5})","$1",["1[016-9]1","1[016-9]11",
19551            "1[016-9]114"],"0$1","0$CC-$1"],[,"(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2[1-9]"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60[2-9]|80"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["1[0-25-9]|(?:3[1-3]|[46][1-4]|5[1-5])[1-9]"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]0"],"0$1","0$CC-$1"],[,"(\\d{5})(\\d{3})(\\d{3})","$1 $2 $3",["003","0030","00308"],"$1","0$CC-$1"],[,"(\\d{5})(\\d{3,4})(\\d{4})","$1 $2 $3",["00[37]","00(?:36|79)","00(?:36|79)8"],
19552            "$1","0$CC-$1"],[,"(\\d{5})(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["007","0079","00798"],"$1","0$CC-$1"]],[[,"(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1","0$CC-$1"],[,"(\\d{4})(\\d{4})","$1-$2",["1(?:5[246-9]|6[046-8]|8[03579])","1(?:5(?:22|44|66|77|88|99)|6(?:[07]0|44|6[16]|88)|8(?:00|33|55|77|99))"],"$1","0$CC-$1"],[,"(\\d{5})","$1",["1[016-9]1","1[016-9]11","1[016-9]114"],"0$1","0$CC-$1"],[,"(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2[1-9]"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{3})(\\d{4})",
19553            "$1-$2-$3",["60[2-9]|80"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["1[0-25-9]|(?:3[1-3]|[46][1-4]|5[1-5])[1-9]"],"0$1","0$CC-$1"],[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]0"],"0$1","0$CC-$1"]],[,,"15\\d{7,8}",,,,"1523456789",,,[9,10]],,,[,,"00(?:3(?:08|68\\d)|798\\d{1,3})\\d{6}",,,,"007981234567",,,[11,12,13,14]],[,,"1(?:5(?:22|44|66|77|88|99)|6(?:00|44|6[16]|70|88)|8(?:00|33|55|77|99))\\d{4}",,,,"15441234",,,[8]],,,[,,,,,,,,,[-1]]],KW:[,[,,"[12569]\\d{6,7}",,,,,,,[7,8]],[,
19554            ,"(?:18\\d|2(?:[23]\\d{2}|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7])))\\d{4}",,,,"22345678"],[,,"(?:5(?:[05]\\d{2}|1[0-7]\\d|2(?:22|5[25])|6[56]\\d)|6(?:0[034679]\\d|222|5[015-9]\\d|6\\d{2}|7(?:0[013-9]|[67]\\d)|9(?:[069]\\d|3[039]))|9(?:0[09]\\d|22\\d|4[01479]\\d|55\\d|6[0679]\\d|7(?:02|[1-9]\\d)|8[057-9]\\d|9\\d{2}))\\d{4}",,,,"50012345",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"KW",965,"00",,,,,,,,[[,"(\\d{4})(\\d{3,4})","$1 $2",["[16]|2(?:[0-35-9]|4[0-35-9])|52[25]|9[024-9]"]],
19555            [,"(\\d{3})(\\d{5})","$1 $2",["244|5(?:[015]|6[56])"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KY:[,[,,"[3589]\\d{9}
19555",,,,,,,[10],[7]],[,,"345(?:2(?:22|44)|444|6(?:23|38|40)|7(?:4[35-79]|6[6-9]|77)|8(?:00|1[45]|25|[48]8)|9(?:14|4[035-9]))\\d{4}",,,,"3452221234",,,,[7]],[,,"345(?:32[1-9]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|9(?:1[67]|2[2-9]|3[689]))\\d{4}",,,,"3453231234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}|345976\\d{4}",
19556            ,,,"9002345678"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"KY",1,"011","1",,,"1",,,,,,[,,"345849\\d{4}",,,,"3458491234"],,"345",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],KZ:[,[,,"(?:33\\d|7\\d{2}|80[089])\\d{7}",,,,,,,[10]],[,,"33622\\d{5}|7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9])|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[234]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[234]\\d|5[139])|4(?:2\\d|3[1235-9]|59)|5(?:[23]\\d|4[01246-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59)))\\d{5}",
19557            ,,,"7123456789"],[,,"7(?:0[012578]|47|6[02-4]|7[15-8]|85)\\d{7}",,,,"7710009998"],[,,"800\\d{7}",,,,"8001234567"],[,,"809\\d{7}",,,,"8091234567"],[,,,,,,,,,[-1]],[,,"808\\d{7}",,,,"8081234567"],[,,"751\\d{7}",,,,"7511234567"],"KZ",7,"810","8",,,"8",,"8~10",,,,[,,,,,,,,,[-1]],,,[,,"751\\d{7}",,,,"7511234567"],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LA:[,[,,"[2-8]\\d{7,9}",,,,,,,[8,9,10],[6]],[,,"(?:2[13]|3(?:0\\d|[14])|[5-7][14]|41|8[1468])\\d{6}",,,,"21212862",,,[8,9],[6]],[,,"20(?:2[2389]|5[24-689]|7[6-8]|9[125-9])\\d{6}",
19558            ,,,"2023123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LA",856,"00","0",,,"0",,,,[[,"(20)(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["20"],"0$1"],[,"([2-8]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],[,"(30)(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LB:[,[,,"[13-9]\\d{6,7}",,,,,,,[7,8]],[,,"(?:[14-6]\\d{2}|7(?:[2-57]\\d|62|8[0-7]|9[04-9])|8[02-9]\\d|9\\d{2})\\d{4}",
19559            ,,,"1123456",,,[7]],[,,"(?:3\\d|7(?:[01]\\d|6[013-9]|8[89]|9[1-3])|81\\d)\\d{5}",,,,"71123456"],[,,,,,,,,,[-1]],[,,"9[01]\\d{6}",,,,"90123456",,,[8]],[,,"80\\d{6}",,,,"80123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LB",961,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],[,"([7-9]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["7(?:[01]|6[013-9]|8[89]|9[1-3])|[89][01]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LC:[,
19560            [,,"[5789]\\d{9}",,,,,,,[10],[7]],[,,"758(?:4(?:30|5[0-9]|6[2-9]|8[0-2])|57[0-2]|638)\\d{4}",,,,"7584305678",,,,[7]],[,,"758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[01]))\\d{4}",,,,"7582845678",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"LC",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"758",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,
19561            [,,,,,,,,,[-1]]],LI:[,[,,"6\\d{8}|[23789]\\d{6}",,,,,,,[7,9]],[,,"(?:2(?:01|1[27]|3\\d|6[02-578]|96)|3(?:7[0135-7]|8[048]|9[0269]))\\d{4}",,,,"2345678",,,[7]],[,,"6(?:5(?:09|1\\d|20)|6(?:0[0-6]|10|2[06-9]|39))\\d{5}|7(?:[37-9]\\d|42|56)\\d{4}",,,,"660234567"],[,,"80(?:02[28]|9\\d{2})\\d{2}",,,,"8002222",,,[7]],[,,"90(?:02[258]|1(?:23|3[14])|66[136])\\d{2}",,,,"9002222",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LI",423,"00","0",,,"0|10(?:01|20|66)",,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",
19562            ["[237-9]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[56]"]],[,"(69)(7\\d{2})(\\d{4})","$1 $2 $3",["697"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"870(?:28|87)\\d{2}",,,,"8702812",,,[7]],,,[,,"697(?:42|56|[78]\\d)\\d{4}",,,,"697861234",,,[9]]],LK:[,[,,"[1-9]\\d{8}",,,,,,,[9],[7]],[,,"1(?:1[2-57]\\d{6}|973\\d{5})|(?:2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7]|[89]1)[2-57]\\d{6}",,,,"112345678",,,,[7]],[,,"7[0125-8]\\d{7}",,,,"712345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
19563            [,,,,,,,,,[-1]],"LK",94,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{1})(\\d{6})","$1 $2 $3",["[1-689]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LR:[,[,,"2\\d{7,8}|[378]\\d{8}|4\\d{6}|5\\d{6,8}",,,,,,,[7,8,9]],[,,"(?:2\\d{3}|33333)\\d{4}",,,,"21234567",,,[8,9]],[,,"(?:20\\d{2}|330\\d|4[67]|5(?:55)?\\d|77\\d{2}|88\\d{2})\\d{5}",,,,"770123456",,,[7,9]],[,,,,,,,,,[-1]],[,,"332(?:02|[2-5]\\d)\\d{4}",,,,"332021234",,,[9]],
19564            [,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LR",231,"00","0",,,"0",,,,[[,"(2\\d)(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],[,"([4-5])(\\d{3})(\\d{3})","$1 $2 $3",["[45]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23578]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LS:[,[,,"[2568]\\d{7}",,,,,,,[8]],[,,"2\\d{7}",,,,"22123456"],[,,"[56]\\d{7}",,,,"50123456"],[,,"800[256]\\d{4}",,,,"80021234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
19565            "LS",266,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LT:[,[,,"[3-9]\\d{7}",,,,,,,[8]],[,,"(?:3[1478]|4[124-6]|52)\\d{6}",,,,"31234567"],[,,"6\\d{7}",,,,"61234567"],[,,"800\\d{5}",,,,"80012345"],[,,"9(?:0[0239]|10)\\d{5}",,,,"90012345"],[,,"808\\d{5}
19565",,,,"80812345"],[,,"700\\d{5}",,,,"70012345"],[,,,,,,,,,[-1]],"LT",370,"00","8",,,"[08]",,,,[[,"([34]\\d)(\\d{6})","$1 $2",["37|4(?:1|5[45]|6[2-4])"],"(8-$1)",,1],[,"([3-6]\\d{2})(\\d{5})",
19566            "$1 $2",["3[148]|4(?:[24]|6[09])|528|6"],"(8-$1)",,1],[,"([7-9]\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",,1],[,"(5)(2\\d{2})(\\d{4})","$1 $2 $3",["52[0-79]"],"(8-$1)",,1]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"70[67]\\d{5}",,,,"70712345"],,,[,,,,,,,,,[-1]]],LU:[,[,,"[24-9]\\d{3,10}|3(?:[0-46-9]\\d{2,9}|5[013-9]\\d{1,8})",,,,,,,[4,5,6,7,8,9,10,11]],[,,"(?:2[2-9]\\d{2,9}|(?:[3457]\\d{2}|8(?:0[2-9]|[13-9]\\d)|9(?:0[89]|[2-579]\\d))\\d{1,8})",,,,"27123456"],[,,"6[25-79][18]\\d{6}",,,,"628123456",
19567            ,,[9]],[,,"800\\d{5}",,,,"80012345",,,[8]],[,,"90[015]\\d{5}",,,,"90012345",,,[8]],[,,"801\\d{5}",,,,"80112345",,,[8]],[,,,,,,,,,[-1]],[,,"20(?:1\\d{5}|[2-689]\\d{1,7})",,,,"20201234",,,[4,5,6,7,8,9,10]],"LU",352,"00",,,,"(15(?:0[06]|1[12]|35|4[04]|55|6[26]|77|88|99)\\d)",,,,[[,"(\\d{2})(\\d{3})","$1 $2",["[2-5]|7[1-9]|[89](?:0[2-9]|[1-9])"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-5]|7[1-9]|[89](?:0[2-9]|[1-9])"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20"],,"$CC $1"],
19568            [,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"],,"$CC $1"],[,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,4})","$1 $2 $3 $4",["2(?:[12589]|4[12])|[3-5]|7[1-9]|8(?:0[2-9]|[1-9])|9(?:0[2-46-9]|[1-9])"],,"$CC $1"],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["70|80[01]|90[015]"],,"$CC $1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",
19569                ["6"],,"$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LV:[,[,,"[2689]\\d{7}",,,,,,,[8]],[,,"6\\d{7}",,,,"63123456"],[,,"2\\d{7}",,,,"21234567"],[,,"80\\d{6}",,,,"80123456"],[,,"90\\d{6}",,,,"90123456"],[,,"81\\d{6}",,,,"81123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LV",371,"00",,,,,,,,[[,"([2689]\\d)(\\d{3})(\\d{3})","$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],LY:[,[,,"[25679]\\d{8}",,,,,,,[9],[7]],[,,"(?:2[1345]|5[1347]|6[123479]|71)\\d{7}",
19570            ,,,"212345678",,,,[7]],[,,"9[1-6]\\d{7}",,,,"912345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"LY",218,"00","0",,,"0",,,,[[,"([25679]\\d)(\\d{7})","$1-$2",,"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MA:[,[,,"[5-9]\\d{8}",,,,,,,[9]],[,,"5(?:2(?:[015-79]\\d|2[02-9]|3[2-57]|4[2-8]|8[235-7])\\d|3(?:[0-48]\\d|[57][2-9]|6[2-8]|9[3-9])\\d|4[067]\\d{2}|5[03]\\d{2})\\d{4}",,,,"520123456"],[,,"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[07][07]|6[12]))\\d{6}",
19571            ,,,"650123456"],[,,"80\\d{7}",,,,"801234567"],[,,"89\\d{7}",,,,"891234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"5924[01]\\d{4}",,,,"592401234"],"MA",212,"00","0",,,"0",,,,[[,"([5-7]\\d{2})(\\d{6})","$1-$2",["5(?:2[015-7]|3[0-4])|[67]"],"0$1"],[,"([58]\\d{3})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|92)|892","5(?:2(?:[2-48]|9[0-7])|3(?:[5-79]|8[0-7])|924)|892"],"0$1"],[,"(5\\d{4})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29|38)[89]"],"0$1"],[,"([5]\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:4[067]|5[03])"],
19572            "0$1"],[,"(8[09])(\\d{7})","$1-$2",["8(?:0|9[013-9])"],"0$1"]],,[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MC:[,[,,"[34689]\\d{7,8}",,,,,,,[8,9]],[,,"870\\d{5}|9[2-47-9]\\d{6}",,,,"99123456",,,[8]],[,,"3\\d{7}|4(?:4\\d|5[1-9])\\d{5}|6\\d{8}",,,,"612345678"],[,,"90\\d{6}",,,,"90123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MC",377,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[39]"],"$1"],[,"(\\d{2})(\\d{3})(\\d{3})",
19573            "$1 $2 $3",["4"],"0$1"],[,"(6)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["8"],"$1"]],,[,,,,,,,,,[-1]],,,[,,"870\\d{5}",,,,"87012345",,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MD:[,[,,"[235-9]\\d{7}",,,,,,,[8]],[,,"(?:2[1-9]\\d|3[1-79]\\d|5(?:33|5[257]))\\d{5}",,,,"22212345"],[,,"(?:562|6\\d{2}|7(?:[189]\\d|6[07]|7[457-9]))\\d{5}",,,,"62112345"],[,,"800\\d{5}",,,,"80012345"],[,,"90[056]\\d{5}",,,,"90012345"],[,,"808\\d{5}
vendor: 12,717 bytes, lines 19573-19597
19573",,,,"80812345"],
19574            [,,,,,,,,,[-1]],[,,"3[08]\\d{6}",,,,"30123456"],"MD",373,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],[,"([25-7]\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["2[13-9]|[5-7]"],"0$1"],[,"([89]\\d{2})(\\d{5})","$1 $2",["[89]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"803\\d{5}",,,,"80312345"],,,[,,,,,,,,,[-1]]],ME:[,[,,"[2-9]\\d{7,8}",,,,,,,[8],[6]],[,,"(?:20[2-8]|3(?:0[2-7]|[12][235-7]|3[24-7])|4(?:0[2-467]|1[267])|5(?:0[2467]|1[267]|2[2367]))\\d{5}",,,,"30234567",,,,[6]],
19575            [,,"6(?:00\\d|3[024]\\d|6[0-25]\\d|[7-9]\\d{2})\\d{4}",,,,"67622901"],[,,"80[0-258]\\d{5}",,,,"80080002"],[,,"(?:9(?:4[1568]|5[178]))\\d{5}",,,,"94515151"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"78[1-49]\\d{5}",,,,"78108780"],"ME",382,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]|6[036-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"77[1-9]\\d{5}",,,,"77273012"],,,[,,,,,,,,,[-1]]],MF:[,[,,"[56]\\d{8}",,,,,,,[9]],[,,"590(?:[02][79]|13|5[0-268]|[78]7)\\d{4}",,,,"590271234"],
19576            [,,"690(?:0[05-9]|[1-9]\\d)\\d{4}",,,,"690001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MF",590,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MG:[,[,,"[23]\\d{8}",,,,,,,[9],[7]],[,,"20(?:2\\d{2}|4[47]\\d|5[3467]\\d|6[279]\\d|7(?:2[29]|[35]\\d)|8[268]\\d|9[245]\\d)\\d{4}",,,,"202123456",,,,[7]],[,,"3[2-49]\\d{7}",,,,"321234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"22\\d{7}",,,,"221234567"],
19577            "MG",261,"00","0",,,"0",,,,[[,"([23]\\d)(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",,"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MH:[,[,,"[2-6]\\d{6}",,,,,,,[7]],[,,"(?:247|528|625)\\d{4}",,,,"2471234"],[,,"(?:235|329|45[56]|545)\\d{4}",,,,"2351234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"635\\d{4}",,,,"6351234"],"MH",692,"011","1",,,"1",,,,[[,"(\\d{3})(\\d{4})","$1-$2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],
19578        MK:[,[,,"[2-578]\\d{7}",,,,,,,[8],[6,7]],[,,"(?:2(?:[23]\\d|5[124578]|6[01])|3(?:1[3-6]|[23][2-6]|4[2356])|4(?:[23][2-6]|4[3-6]|5[256]|6[25-8]|7[24-6]|8[4-6]))\\d{5}",,,,"22212345",,,,[6,7]],[,,"7(?:[0-25-8]\\d{2}|32\\d|421|9[23]\\d)\\d{4}",,,,"72345678"],[,,"800\\d{5}",,,,"80012345"],[,,"5[02-9]\\d{6}",,,,"50012345"],[,,"8(?:0[1-9]|[1-9]\\d)\\d{5}",,,,"80123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MK",389,"00","0",,,"0",,,,[[,"(2)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],[,"([347]\\d)(\\d{3})(\\d{3})",
19579            "$1 $2 $3",["[347]"],"0$1"],[,"([58]\\d{2})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ML:[,[,,"[246-9]\\d{7}",,,,,,,[8]],[,,"(?:2(?:0(?:2\\d|7[0-8])|1(?:2[5-7]|[3-689]\\d))|44[1239]\\d)\\d{4}",,,,"20212345"],[,,"(?:2(?:079|17\\d)|[679]\\d{3}|8[239]\\d{2})\\d{4}",,,,"65012345"],[,,"80\\d{6}",,,,"80012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ML",223,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
19580            "$1 $2 $3 $4",["[246-9]"]],[,"(\\d{4})","$1",["67|74"]]],[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[246-9]"]]],[,,,,,,,,,[-1]],,,[,,"80\\d{6}",,,,"80012345"],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MM:[,[,,"[178]\\d{5,7}|[24-6]\\d{5,8}|9(?:[279]\\d{0,2}|5|[34]\\d{1,2}|6(?:\\d{1,2})?|8(?:\\d{2})?)\\d{6}",,,,,,,[6,7,8,9,10],[5]],[,,"1(?:2\\d{1,2}|[35]\\d|4(?:\\d|2[236]|39)|6\\d?|[89][0-6]\\d)\\d{4}|2(?:2(?:000\\d{3}|\\d{4})|3\\d{4}|4(?:0\\d{5}|26\\d{4}|39\\d{4}|\\d{4})|5(?:1\\d{3,6}|[02-9]\\d{3,5})|[6-9]\\d{4})|4(?:2[245-8]|3(?:2(?:02)?|[346]|56?)|[46][2-6]|5[3-5])\\d{4}|5(?:2(?:2(?:\\d{1,2})?|[3-8])|3[2-68]|4(?:21?|[4-8])|5[23]|6[2-4]|7[2-8]|8[24-7]|9[2-7])\\d{4}|6(?:0[23]|1(?:2(?:0|4\\d)?|[356])|2[2-6]|3[24-6]|4(?:2(?:4\\d)?|[3-6])|5[2-4]|6[2-8]|7(?:[2367]|4(?:\\d|39)|5\\d?|8[145]\\d)|8[245]|9(?:20?|4))\\d{4}|7(?:[04][24-8]|1(?:20?|[3-7])|22|3[2-4]|5[2-7])\\d{4}|8(?:1(?:2\\d{1,2}|[3-689]\\d)|2(?:2\\d|3(?:\\d|20)|[4-8]\\d)|3[24]\\d|4[24-7]\\d|5[245]\\d|6[23]\\d)\\d{3}",
19581            ,,,"1234567",,,[6,7,8,9],[5]],[,,"17[01]\\d{4}|9(?:2(?:[0-4]|5\\d{2}|6[0-5]\\d)|3(?:[0-36]|4[069])\\d|4(?:0[0-4]\\d|[1379]\\d|2\\d{2}|4[0-589]\\d|5\\d{2}|88)|5[0-6]|6(?:1\\d|9\\d{2}|\\d)|7(?:3\\d|[6-9]\\d{2})|8(?:\\d|9\\d{2})|9(?:1\\d|[5-7]\\d{2}|[089]))\\d{5}",,,,"92123456",,,[7,8,9,10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"1333\\d{4}",,,,"13331234",,,[8]],"MM",95,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["1|2[245]"],"0$1"],[,"(2)(\\d{4})(\\d{4})",
19582            "$1 $2 $3",["251"],"0$1"],[,"(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["432|67|81"],"0$1"],[,"(\\d{2})(\\d{2})(\\d{3,4})","$1 $2 $3",["[4-8]"],"0$1"],[,"(9)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],[,"(9)([34]\\d{4})(\\d{4})","$1 $2 $3",["9(?:3[0-36]|4[0-57-9])"],"0$1"],[,"(9)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92[56]"],"0$1"],[,"(9)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["93"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,
19583            ,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MN:[,[,,"[12]\\d{7,9}|[57-9]\\d{7}",,,,,,,[8,9,10],[6,7]],[,,"[12](?:1\\d|2(?:[1-3]\\d?|7\\d)|3[2-8]\\d{1,2}|4[2-68]\\d{1,2}|5[1-4689]\\d{1,2})\\d{5}|5[0568]\\d{6}",,,,"50123456",,,,[6,7]],[,,"(?:8(?:[05689]\\d|3[01])|9[013-9]\\d)\\d{5}",,,,"88123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"7[05-8]\\d{6}",,,,"75123456",,,[8]],"MN",976,"001","0",,,"0",,,,[[,"([12]\\d)(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],[,"([12]2\\d)(\\d{5,6})",
19584            "$1 $2",["[12]2[1-3]"],"0$1"],[,"([12]\\d{3})(\\d{5})","$1 $2",["[12](?:27|[3-5])","[12](?:27|[3-5]\\d)2"],"0$1"],[,"(\\d{4})(\\d{4})","$1 $2",["[57-9]"],"$1"],[,"([12]\\d{4})(\\d{4,5})","$1 $2",["[12](?:27|[3-5])","[12](?:27|[3-5]\\d)[4-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MO:[,[,,"[268]\\d{7}",,,,,,,[8]],[,,"(?:28[2-57-9]|8[2-57-9]\\d)\\d{5}",,,,"28212345"],[,,"6(?:[2356]\\d|8[158])\\d{5}",,,,"66123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
19585            [,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MO",853,"00",,,,,,,,[[,"([268]\\d{3})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MP:[,[,,"[5689]\\d{9}",,,,,,,[10],[7]],[,,"670(?:2(?:3[3-7]|56|8[5-8])|32[1238]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",,,,"6702345678",,,,[7]],[,,"670(?:2(?:3[3-7]|56|8[5-8])|32[1238]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",,,,"6702345678",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",
19586            ,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"MP",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]],,"670",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MQ:[,[,,"[56]\\d{8}",,,,,,,[9]],[,,"596(?:0[2-5]|[12]0|3[05-9]|4[024-8]|[5-7]\\d|89|9[4-8])\\d{4}",,,,"596301234"],[,,"696(?:[0-47-9]\\d|5[0-6]|6[0-4])\\d{4}",,,,"696201234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
19587            "MQ",596,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MR:[,[,,"[2-48]\\d{7}",,,,,,,[8]],[,,"25[08]\\d{5}|35\\d{6}|45[1-7]\\d{5}",,,,"35123456"],[,,"[234][0-46-9]\\d{6}",,,,"22123456"],[,,"800\\d{5}",,,,"80012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MR",222,"00",,,,,,,,[[,"([2-48]\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,
19588            ,,,,[-1]],,,[,,,,,,,,,[-1]]],MS:[,[,,"[5689]\\d{9}",,,,,,,[10],[7]],[,,"664491\\d{4}",,,,"6644912345",,,,[7]],[,,"66449[2-6]\\d{4}",,,,"6644923456",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"MS",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"664",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MT:[,[,,"[2357-9]\\d{7}",,,,,,,[8]],[,,"2(?:0(?:[169]\\d|3[1-4])|[1-357]\\d{2})\\d{4}",
19589            ,,,"21001234"],[,,"(?:7(?:210|[79]\\d{2})|9(?:2(?:1[01]|31)|69[67]|8(?:1[1-3]|89|97)|9\\d{2}))\\d{4}",,,,"96961234"],[,,"800[3467]\\d{4}",,,,"80071234"],[,,"5(?:0(?:0(?:37|43)|6\\d{2}|70\\d|9[0168]\\d)|[12]\\d0[1-5])\\d{3}",,,,"50037123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"3550\\d{4}",,,,"35501234"],"MT",356,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2"]],,[,,"7117\\d{4}",,,,"71171234"],,,[,,,,,,,,,[-1]],[,,"501\\d{5}",,,,"50112345"],,,[,,,,,,,,,[-1]]],MU:[,[,,"[2-9]\\d{6,7}",,,,,,,[7,8]],[,,"(?:2(?:[03478]\\d|1[0-7]|6[1-69])|4(?:[013568]\\d|2[4-7])|5(?:44\\d|471)|6\\d{2}|8(?:14|3[129]))\\d{4}",
19590            ,,,"2012345"],[,,"5(?:2[59]\\d|4(?:2[1-389]|4\\d|7[1-9]|9\\d)|7\\d{2}|8(?:[0-25689]\\d|4[3479]|7[15-8])|9[0-8]\\d)\\d{4}",,,,"52512345",,,[8]],[,,"80[012]\\d{4}",,,,"8001234",,,[7]],[,,"30\\d{5}",,,,"3012345",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"3(?:20|9\\d)\\d{4}",,,,"3201234",,,[7]],"MU",230,"0(?:0|[2-7]0|33)",,,,,,"020",,[[,"([2-46-9]\\d{2})(\\d{4})","$1 $2",["[2-46-9]"]],[,"(5\\d{3})(\\d{4})","$1 $2",["5"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MV:[,[,,"[346-8]\\d{6,9}|9(?:00\\d{7}|\\d{6})",
19591            ,,,,,,[7,10]],[,,"(?:3(?:0[0-3]|3[0-59])|6(?:[57][02468]|6[024568]|8[024689]|90))\\d{4}",,,,"6701234",,,[7]],[,,"(?:46[46]|7[3-9]\\d|9[15-9]\\d)\\d{4}",,,,"7712345",,,[7]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,"900\\d{7}",,,,"9001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MV",960,"0(?:0|19)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1-$2",["[3467]|9(?:0[1-9]|[1-9])"]],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]00"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"4[05]0\\d{4}",,,,"4001234",
19592            ,,[7]],,,[,,,,,,,,,[-1]]],MW:[,[,,"(?:1(?:\\d{2})?|[2789]\\d{2})\\d{6}",,,,,,,[7,9]],[,,"(?:1[2-9]|21\\d{2})\\d{5}",,,,"1234567"],[,,"(?:111|77\\d|88\\d|99\\d)\\d{6}",,,,"991234567",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"MW",265,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1"],"0$1"],[,"(2\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[17-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],
19593            [,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MX:[,[,,"[1-9]\\d{9,10}",,,,,,,[10,11],[7,8]],[,,"(?:33|55|81)\\d{8}|(?:2(?:0[01]|2[1-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-6][1-9]|[37][1-8]|8[1-35-9]|9[2-689])|5(?:88|9[1-79])|6(?:1[2-68]|[234][1-9]|5[1-3689]|6[12457-9]|7[1-7]|8[67]|9[4-8])|7(?:[13467][1-9]|2[1-8]|5[13-9]|8[1-69]|9[17])|8(?:2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7}",
19594            ,,,"2221234567",,,[10],[7,8]],[,,"1(?:(?:33|55|81)\\d{8}|(?:2(?:2[1-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-6][1-9]|[37][1-8]|8[1-35-9]|9[2-689])|5(?:88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[12457-9]|7[1-7]|8[67]|9[4-8])|7(?:[13467][1-9]|2[1-8]|5[13-9]|8[1-69]|9[17])|8(?:2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7})",,,,"12221234567",,,[11]],[,,"8(?:00|88)\\d{7}",
19595            ,,,"8001234567",,,[10]],[,,"900\\d{7}",,,,"9001234567",,,[10]],[,,"300\\d{7}",,,,"3001234567",,,[10]],[,,"500\\d{7}",,,,"5001234567",,,[10]],[,,,,,,,,,[-1]],"MX",52,"0[09]","01",,,"0[12]|04[45](\\d{10})","1$1",,,[[,"([358]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["33|55|81"],"01 $1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2467]|3[0-2457-9]|5[089]|8[02-9]|9[0-35-9]"],"01 $1",,1],[,"(1)([358]\\d)(\\d{4})(\\d{4})","044 $2 $3 $4",["1(?:33|55|81)"],"$1",,1],[,"(1)(\\d{3})(\\d{3})(\\d{4})","044 $2 $3 $4",
19596            ["1(?:[2467]|3[0-2457-9]|5[089]|8[2-9]|9[1-35-9])"],"$1",,1]],[[,"([358]\\d)(\\d{4})(\\d{4})","$1 $2 $3",["33|55|81"],"01 $1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2467]|3[0-2457-9]|5[089]|8[02-9]|9[0-35-9]"],"01 $1",,1],[,"(1)([358]\\d)(\\d{4})(\\d{4})","$1 $2 $3 $4",["1(?:33|55|81)"]],[,"(1)(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1(?:[2467]|3[0-2457-9]|5[089]|8[2-9]|9[1-35-9])"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MY:[,[,,"[13-9]\\d{7,9}",,,,,,,[8,9,
19597            10],[6,7]],[,,"(?:3[2-9]\\d|[4-9][2-9])\\d{6}",,,,"323456789",,,[8,9],[6,7]],[,,"1(?:1[1-6]\\d{2}
19597|[02-4679][2-9]\\d|59\\d{2}|8(?:1[23]|[2-9]\\d))\\d{5}",,,,"123456789",,,[9,10]],[,,"1[378]00\\d{6}",,,,"1300123456",,,[10]],[,,"1600\\d{6}",,,,"1600123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"154\\d{7}",,,,"1541234567",,,[10]],"MY",60,"00","0",,,"0",,,,[[,"([4-79])(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],[,"(3)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],[,"([18]\\d)(\\d{3})(\\d{3,4})","$1-$2 $3",
19598            ["1[02-46-9][1-9]|8"],"0$1"],[,"(1)([36-8]00)(\\d{2})(\\d{4})","$1-$2-$3-$4",["1[36-8]0"]],[,"(11)(\\d{4})(\\d{4})","$1-$2 $3",["11"],"0$1"],[,"(15[49])(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],MZ:[,[,,"[28]\\d{7,8}",,,,,,,[8,9]],[,,"2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}",,,,"21123456",,,[8]],[,,"8[2-7]\\d{7}",,,,"821234567",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,
19599            ,,[-1]],"MZ",258,"00",,,,,,,,[[,"([28]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-7]"]],[,"(80\\d)(\\d{3})(\\d{3})","$1 $2 $3",["80"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NA:[,[,,"[68]\\d{7,8}",,,,,,,[8,9]],[,,"6(?:1(?:17|2(?:[0189]\\d|[2-6]|7\\d?)|3(?:[01378]|2\\d)|4(?:[024]|10?|3[15]?)|69|7[014])|2(?:17|5(?:[0-36-8]|4\\d?)|69|70)|3(?:17|2(?:[0237]\\d?|[14-689])|34|6[289]|7[01]|81)|4(?:17|2(?:[012]|7\\d?)|4(?:[06]|1\\d?)|5(?:[01357]|[25]\\d?)|69|7[01])|5(?:17|2(?:[0459]|[23678]\\d?)|69|7[01])|6(?:17|2(?:5|6\\d?)|38|42|69|7[01])|7(?:17|2(?:[569]|[234]\\d?)|3(?:0\\d?|[13])|6[89]|7[01]))\\d{4}",
19600            ,,,"61221234"],[,,"(?:60|8[125])\\d{7}",,,,"811234567",,,[9]],[,,,,,,,,,[-1]],[,,"8701\\d{5}",,,,"870123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"8(?:3\\d{2}|86)\\d{5}",,,,"88612345"],"NA",264,"00","0",,,"0",,,,[[,"(8\\d)(\\d{3})(\\d{4})","$1 $2 $3",["8[1-35]"],"0$1"],[,"(6\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],[,"(88)(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],[,"(870)(\\d{3})(\\d{3})","$1 $2 $3",["870"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],
19601        NC:[,[,,"[2-57-9]\\d{5}",,,,,,,[6]],[,,"(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}",,,,"201234"],[,,"(?:5[0-4]|[79]\\d|8[0-79])\\d{4}",,,,"751234"],[,,,,,,,,,[-1]],[,,"36\\d{4}",,,,"366711"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NC",687,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[2-46-9]|5[0-4]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NE:[,[,,"[0289]\\d{7}",,,,,,,[8]],[,,"2(?:0(?:20|3[1-7]|4[134]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}",
19602            ,,,"20201234"],[,,"(?:8[089]|9\\d)\\d{6}",,,,"93123456"],[,,"08\\d{6}",,,,"08123456"],[,,"09\\d{6}",,,,"09123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NE",227,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["09|[289]"]],[,"(08)(\\d{3})(\\d{3})","$1 $2 $3",["08"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NF:[,[,,"[13]\\d{5}",,,,,,,[6],[5]],[,,"(?:1(?:06|17|28|39)|3[012]\\d)\\d{3}",,,,"106609",,,,[5]],[,,"3[58]\\d{4}",,,,"381234",,,,[5]],[,
19603            ,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NF",672,"00",,,,,,,,[[,"(\\d{2})(\\d{4})","$1 $2",["1"]],[,"(\\d)(\\d{5})","$1 $2",["3"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NG:[,[,,"[1-6]\\d{5,8}|9\\d{5,9}|[78]\\d{5,13}",,,,,,,[7,8,10,11,12,13,14],[5,6]],[,,"[12]\\d{6,7}|9(?:0[3-9]|[1-9]\\d)\\d{5}|(?:3\\d|4[023568]|5[02368]|6[02-469]|7[4-69]|8[2-9])\\d{6}|(?:4[47]|5[14579]|6[1578]|7[0-357])\\d{5,6}|(?:78|41)\\d{5}",,,,"12345678",,
19604            ,[7,8],[5,6]],[,,"(?:1(?:7[34]\\d|8(?:04|[124579]\\d|8[0-3])|95\\d)|287[0-7]|3(?:18[1-8]|88[0-7]|9(?:8[5-9]|6[1-5]))|4(?:28[0-2]|6(?:7[1-9]|8[02-47])|88[0-2])|5(?:2(?:7[7-9]|8\\d)|38[1-79]|48[0-7]|68[4-7])|6(?:2(?:7[7-9]|8\\d)|4(?:3[7-9]|[68][129]|7[04-69]|9[1-8])|58[0-2]|98[7-9])|7(?:38[0-7]|69[1-8]|78[2-4])|8(?:28[3-9]|38[0-2]|4(?:2[12]|3[147-9]|5[346]|7[4-9]|8[014-689]|90)|58[1-8]|78[2-9]|88[5-7])|98[07]\\d)\\d{4}|(?:70(?:[1-689]\\d|7[0-3])|8(?:0(?:1[01]|[2-9]\\d)|1(?:[0-8]\\d|9[01]))|90[235-9]\\d)\\d{6}",
19605            ,,,"8021234567",,,[8,10]],[,,"800\\d{7,11}",,,,"80017591759",,,[10,11,12,13,14]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NG",234,"009","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[1-9]|[1-79])|8[2-9]"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["70|8[01]|90[235-9]"],"0$1"],[,"([78]00)(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]00"],"0$1"],[,"([78]00)(\\d{5})(\\d{5,6})","$1 $2 $3",
19606            ["[78]00"],"0$1"],[,"(78)(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"700\\d{7,11}",,,,"7001234567",,,[10,11,12,13,14]],,,[,,,,,,,,,[-1]]],NI:[,[,,"[125-8]\\d{7}",,,,,,,[8]],[,,"2\\d{7}",,,,"21234567"],[,,"(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|7[5-8]\\d|8\\d{2})\\d{5}",,,,"81234567"],[,,"1800\\d{4}",,,,"18001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NI",505,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2"]],
19607            ,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NL:[,[,,"1\\d{4,8}|[2-7]\\d{8}|[89]\\d{6,9}",,,,,,,[5,6,7,8,9,10]],[,,"(?:1[0135-8]|2[02-69]|3[0-68]|4[0135-9]|[57]\\d|8[478])\\d{7}",,,,"101234567",,,[9]],[,,"6[1-58]\\d{7}",,,,"612345678",,,[9]],[,,"800\\d{4,7}",,,,"8001234",,,[7,8,9,10]],[,,"90[069]\\d{4,7}",,,,"9061234",,,[7,8,9,10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:6760|85\\d{2})\\d{5}",,,,"851234567",,,[9]],"NL",31,"00","0",,,"0",,,,[[,"([1-578]\\d)(\\d{3})(\\d{4})",
19608            "$1 $2 $3",["1[035]|2[0346]|3[03568]|4[0356]|5[0358]|7|8[4578]"],"0$1"],[,"([1-
196085]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],[,"(6)(\\d{8})","$1 $2",["6[0-57-9]"],"0$1"],[,"(66)(\\d{7})","$1 $2",["66"],"0$1"],[,"(14)(\\d{3,4})","$1 $2",["14"],"$1"],[,"([89]0\\d)(\\d{4,7})","$1 $2",["80|9"],"0$1"]],,[,,"66\\d{7}",,,,"662345678",,,[9]],,,[,,"14\\d{3,4}",,,,"14123",,,[5,6]],[,,"140(?:1(?:[035]|[16-8]\\d)|2(?:[0346]|[259]\\d)|3(?:[03568]|[124]\\d)|4(?:[0356]|[17-9]\\d)|5(?:[0358]|[124679]\\d)|7\\d|8[458])",
19609            ,,,"14020",,,[5,6]],,,[,,,,,,,,,[-1]]],NO:[,[,,"0\\d{4}|[2-9]\\d{7}",,,,,,,[5,8]],[,,"(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}",,,,"21234567",,,[8]],[,,"(?:4[015-8]|5[89]|87|9\\d)\\d{6}",,,,"40612345",,,[8]],[,,"80[01]\\d{5}",,,,"80012345",,,[8]],[,,"82[09]\\d{5}",,,,"82012345",,,[8]],[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}",,,,"81021234",,,[8]],[,,"880\\d{5}",,,,"88012345",,,[8]],[,,"85[0-5]\\d{5}",,,,"85012345",,,[8]],"NO",47,"00",,,,,,,,[[,"([489]\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[489]"]],
19610            [,"([235-7]\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-7]"]]],,[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,"0\\d{4}|81(?:0(?:0[7-9]|1\\d)|5\\d{2})\\d{3}",,,,"01234"],,,[,,"81[23]\\d{5}",,,,"81212345",,,[8]]],NP:[,[,,"[1-8]\\d{7}|9(?:[1-69]\\d{6,8}|7[2-6]\\d{5,7}|8\\d{8})",,,,,,,[8,10],[6,7]],[,,"(?:1[0-6]\\d|2[13-79][2-6]|3[135-8][2-6]|4[146-9][2-6]|5[135-7][2-6]|6[13-9][2-6]|7[15-9][2-6]|8[1-46-9][2-6]|9[1-79][2-6])\\d{5}",,,,"14567890",,,[8],[6,7]],[,,"9(?:6[013]|7[245]|8[0-24-6])\\d{7}",,,,"9841234567",
19611            ,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NP",977,"00","0",,,"0",,,,[[,"(1)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],[,"(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-69]|7[15-9])"],"0$1"],[,"(9\\d{2})(\\d{7})","$1-$2",["9(?:6[013]|7[245]|8)"],"$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NR:[,[,,"[458]\\d{6}",,,,,,,[7]],[,,"(?:444|888)\\d{4}",,,,"4441234"],[,,"55[5-9]\\d{4}",,,,"5551234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,
19612            ,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NR",674,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NU:[,[,,"[1-5]\\d{3}",,,,,,,[4]],[,,"[34]\\d{3}",,,,"4002"],[,,"[125]\\d{3}",,,,"1234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"NU",683,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],NZ:[,[,,"6[235-9]\\d{6}|[2-57-9]\\d{7,9}",,,,,,,[8,9,10],[7]],[,,"(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}|24099\\d{3}",
19613            ,,,"32345678",,,[8],[7]],[,,"2(?:[028]\\d{7,8}|1(?:[03]\\d{5,7}|[12457]\\d{5,6}|[689]\\d{5})|[79]\\d{7})",,,,"211234567"],[,,"508\\d{6,7}|80\\d{6,8}",,,,"800123456"],[,,"90\\d{6,7}",,,,"900123456",,,[8,9]],[,,,,,,,,,[-1]],[,,"70\\d{7}",,,,"701234567",,,[9]],[,,,,,,,,,[-1]],"NZ",64,"0(?:0|161)","0",,,"0",,"00",,[[,"(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["240|[346]|7[2-57-9]|9[1-9]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["21"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:1[1-9]|[69]|7[0-35-9])|70|86"],
19614            "0$1"],[,"(2\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["2[028]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["90"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|5|[89]0"],"0$1"]],,[,,"[28]6\\d{6,7}",,,,"26123456",,,[8,9]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],OM:[,[,,"(?:5|[279]\\d)\\d{6}|800\\d{5,6}",,,,,,,[7,8,9]],[,,"2[2-6]\\d{6}",,,,"23123456",,,[8]],[,,"7[19]\\d{6}|9(?:0[1-9]|[1-9]\\d)\\d{5}",,,,"92123456",,,[8]],[,,"8007\\d{4,5}|500\\d{4}",,,,"80071234"],[,,"900\\d{5}",
19615            ,,,"90012345",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"OM",968,"00",,,,,,,,[[,"(2\\d)(\\d{6})","$1 $2",["2"]],[,"([79]\\d{3})(\\d{4})","$1 $2",["[79]"]],[,"([58]00)(\\d{4,6})","$1 $2",["[58]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PA:[,[,,"[1-9]\\d{6,7}",,,,,,,[7,8]],[,,"(?:1(?:0[0-8]|1[49]|2[37]|3[0137]|4[147]|5[05]|6[58]|7[0167]|8[58]|9[139])|2(?:[0235679]\\d|1[0-7]|4[04-9]|8[028])|3(?:[09]\\d|1[014-7]|2[0-3]|3[03]|4[03-57]|55|6[068]|7[06-8]|8[06-9])|4(?:3[013-69]|4\\d|7[0-589])|5(?:[
1961501]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-267]|3[06]|[469]0|5[06-9]|7[0-24-79]|8[7-9])|8(?:09|[34]\\d|5[0134]|8[02])|9(?:0[6-9]|1[016-8]|2[036-8]|3[3679]|40|5[0489]|6[06-9]|7[046-9]|8[36-8]|9[1-9]))\\d{4}",
19616            ,,,"2001234",,,[7]],[,,"(?:1[16]1|21[89]|8(?:1[01]|7[23]))\\d{4}|6(?:[024-9]\\d|1[0-5]|3[0-24-9])\\d{5}",,,,"61234567"],[,,"800\\d{4}",,,,"8001234",,,[7]],[,,"(?:8(?:55|60|7[78])|9(?:00|81))\\d{4}",,,,"8601234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PA",507,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],[,"(\\d{4})(\\d{4})","$1-$2",["6"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PE:[,[,,"[14-9]\\d{7,8}",,,,,,,[8,9],[6,7]],[,,"(?:1\\d|4[1-4]|5[1-46]|6[1-7]|7[2-46]|8[2-4])\\d{6}",
19617            ,,,"11234567",,,[8],[6,7]],[,,"9\\d{8}",,,,"912345678",,,[9]],[,,"800\\d{5}",,,,"80012345",,,[8]],[,,"805\\d{5}",,,,"80512345",,,[8]],[,,"801\\d{5}",,,,"80112345",,,[8]],[,,"80[24]\\d{5}",,,,"80212345",,,[8]],[,,,,,,,,,[-1]],"PE",51,"19(?:1[124]|77|90)00","0"," Anexo ",,"0",,,,[[,"(1)(\\d{7})","$1 $2",["1"],"(0$1)"],[,"([4-8]\\d)(\\d{6})","$1 $2",["[4-7]|8[2-4]"],"(0$1)"],[,"(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],[,"(9\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,
19618            ,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PF:[,[,,"4\\d{5,7}|8\\d{7}",,,,,,,[6,8]],[,,"4(?:[09][45689]\\d|4)\\d{4}",,,,"40412345"],[,,"8[79]\\d{6}",,,,"87123456",,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PF",689,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4[09]|8[79]"]],[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]]],,[,,,,,,,,,[-1]],,,[,,"44\\d{4}",,,,"441234",,,[6]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PG:[,[,,"[1-9]\\d{6,7}",,
19619            ,,,,,[7,8]],[,,"(?:3[0-2]\\d|4[257]\\d|5[34]\\d|64[1-9]|77(?:[0-24]\\d|30)|85[02-46-9]|9[78]\\d)\\d{4}",,,,"3123456",,,[7]],[,,"7(?:[0-689]\\d|75)\\d{5}",,,,"70123456",,,[8]],[,,"180\\d{4}",,,,"1801234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"2(?:0[0-47]|7[568])\\d{4}",,,,"2751234",,,[7]],"PG",675,"140[1-3]|00",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["[13-689]|27"]],[,"(\\d{4})(\\d{4})","$1 $2",["20|7"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PH:[,
19620            [,,"2\\d{5,7}|[3-9]\\d{7,9}|1800\\d{7,9}",,,,,,,[6,8,9,10,11,12,13],[5,7]],[,,"2\\d{5}(?:\\d{2})?|(?:3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578]|8[2-8])\\d{7}|88(?:22\\d{6}|42\\d{4})",,,,"21234567",,,[6,8,9,10],[5,7]],[,,"(?:81[37]|9(?:0[5-9]|1[024-9]|2[0-35-9]|3[02-9]|4[235-9]|5[056]|6[5-7]|7[34-79]|89|9[4-9]))\\d{7}",,,,"9051234567",,,[10]],[,,"1800\\d{7,9}",,,,"180012345678",,,[11,12,13]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PH",63,"00","0",,,"0",,,,[[,"(2)(\\d{3})(\\d{4})",
19621                "$1 $2 $3",["2"],"(0$1)"],[,"(2)(\\d{5})","$1 $2",["2"],"(0$1)"],[,"(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|5(?:22|44)|642|8(?:62|8[245])","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],[,"(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],[,"([3-8]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[3-8]"],"(0$1)"],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["81|9"],
19622                "0$1"],[,"(1800)(\\d{3})(\\d{4})","$1 $2 $3",["1"]],[,"(1800)(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PK:[,[,,"1\\d{8}|[2-8]\\d{5,11}|9(?:[013-9]\\d{4,9}|2\\d(?:111\\d{6}|\\d{3,7}))",,,,,,,[8,9,10,11,12],[6,7]],[,,"(?:21|42)[2-9]\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6}|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}|58[126]\\d{7}",
19623            ,,,"2123456789",,,[9,10],[6,7,8]],[,,"3(?:[014]\\d|2[0-5]|3[0-7]|55|64)\\d{7}",,,,"3012345678",,,[10]],[,,"800\\d{5}",,,,"80012345",,,[8]],[,,"900\\d{5}",,,,"90012345",,,[8]],[,,,,,,,,,[-1]],[,,"122\\d{6}",,,,"122044444",,,[9]],[,,,,,,,,,[-1]],"PK",92,"00","0",,,"0",,,,[[,"([89]00)(\\d{3})(\\d{2})","$1 $2 $3",["[89]00"],"0$1"],[,"(1\\d{3})(\\d{5})","$1 $2",["1"],"$1"],[,"(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],[,"(\\d{3})(\\d{6,7})","$1 $2",
19624            ["2[349]|45|54|60|72|8[2-5]|9[2-469]","(?:2[349]|45|54|60|72|8[2-5]|9[2-469])\\d[2-9]"],"(0$1)"],[,"(58\\d{3})(\\d{5})","$1 $2",["58[126]"],"(0$1)"],[,"(3\\d{2})(\\d{7})","$1 $2",["3"],"0$1"],[,"(\\d{2})(111)(\\d{3})(\\d{3})","$1 $2 $3 $4",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)1","(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)11","(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)111"],"(0$1)"],[,"(\\d{3})(111)(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[349]|45|54|60|72|8[2-5]|9[2-9]",
19625            "(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d1","(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d11","(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d111"],"(0$1)"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:[1-8]|0[468])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}",,,,"21111825888",,,[11,12]],,,[,,,,,,,,,[-1]]],PL:[,[,,"[1-57-9]\\d{6,8}|6\\d{5,8}",,,,,,,[6,7,8,9]],[,,"(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])(?:\\d{7}|19\\d{3})",
19626            ,,,"123456789",,,[7,9]],[,,"(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}",,,,"512345678",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"70[01346-8]\\d{6}",,,,"701234567",,,[9]],[,,"801\\d{6}",,,,"801234567",,,[9]],[,,,,,,,,,[-1]],[,,"39\\d{7}",,,,"391234567",,,[9]],"PL",48,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["11[68]|64"]],[,"(\\d{5})","$1",["19"]],[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145]"]],[,"(\\d{3})(\\d{2})(\\d{2,3})",
19627            "$1 $2 $3",["64"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["26|39|45|5[0137]|6[0469]|7[02389]|8[08]"]],[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2}
19627)","$1 $2 $3 $4",["[14]|2[0-57-9]|3[2-4]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145]"]]],,[,,"64\\d{4,7}",,,,"641234567"],,,[,,,,,,,,,[-1]],[,,"804\\d{6}",,,,"804123456",,,[9]],,,[,,,,,,,,,[-1]]],PM:[,[,,"[45]\\d{5}",,,,,,,[6]],[,,"41\\d{4}",,,,"411234"],[,,"(?:40|55)\\d{4}",,,,"551234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
19628            "PM",508,"00","0",,,"0",,,,[[,"([45]\\d)(\\d{2})(\\d{2})","$1 $2 $3",,"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PR:[,[,,"[5789]\\d{9}",,,,,,,[10],[7]],[,,"(?:787|939)[2-9]\\d{6}",,,,"7872345678",,,,[7]],[,,"(?:787|939)[2-9]\\d{6}",,,,"7872345678",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"PR",1,"011","1",,,"1",
19629            ,,1,,,[,,,,,,,,,[-1]],,"787|939",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PS:[,[,,"1\\d{9}|[24589]\\d{7,8}",,,,,,,[8,9,10],[7]],[,,"(?:22[234789]|42[45]|82[01458]|92[369])\\d{5}",,,,"22234567",,,[8],[7]],[,,"5[69]\\d{7}",,,,"599123456",,,[9]],[,,"1800\\d{6}",,,,"1800123456",,,[10]],[,,,,,,,,,[-1]],[,,"1700\\d{6}",,,,"1700123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PS",970,"00","0",,,"0",,,,[[,"([2489])(2\\d{2})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],[,"(5[69]\\d)(\\d{3})(\\d{3})","$1 $2 $3",
19630            ["5"],"0$1"],[,"(1[78]00)(\\d{3})(\\d{3})","$1 $2 $3",["1"],"$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PT:[,[,,"[2-46-9]\\d{8}",,,,,,,[9]],[,,"2(?:[12]\\d|[35][1-689]|4[1-59]|6[1-35689]|7[1-9]|8[1-69]|9[1256])\\d{6}",,,,"212345678"],[,,"9(?:[1236]\\d{2}|480)\\d{5}",,,,"912345678"],[,,"80[02]\\d{6}",,,,"800123456"],[,,"6(?:0[178]|4[68])\\d{6}|76(?:0[1-57]|1[2-47]|2[237])\\d{5}",,,,"760123456"],[,,"80(?:8\\d|9[1579])\\d{5}",,,,"808123456"],[,,"884[0-4689]\\d{5}",,,
19631            ,"884123456"],[,,"30\\d{7}",,,,"301234567"],"PT",351,"00",,,,,,,,[[,"(2\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],[,"([2-46-9]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[3-9]|[346-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"7(?:0(?:7\\d|8[17]))\\d{5}",,,,"707123456"],,,[,,"600\\d{6}",,,,"600110000"]],PW:[,[,,"[2-8]\\d{6}",,,,,,,[7]],[,,"2552255|(?:277|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76))\\d{4}",,,,"2771234"],[,,"(?:6[234689]0|77[45789])\\d{4}",,,,"6201234"],[,,,,,,,,,[-1]],
19632            [,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"PW",680,"01[12]",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],PY:[,[,,"5[0-5]\\d{4,7}|[2-46-9]\\d{5,8}",,,,,,,[6,7,8,9],[5]],[,,"(?:[26]1|3[289]|4[124678]|7[123]|8[1236])\\d{5,7}|(?:2(?:2[4568]|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51)|4(?:18|2[45]|3[12]|5[13]|64|71|9[1-47])|5(?:[1-4]\\d|5[0234])|6(?:3[1-3]|44|7[1-4678])|7(?:17|4[0-4]|6[1-578]|75|8[0-8])|858)\\d{5,6}",,,,
19633            "212345678",,,[7,8,9],[5,6]],[,,"9(?:6[12]|[78][1-6]|9[1-5])\\d{6}",,,,"961456789",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"8700[0-4]\\d{4}",,,,"870012345",,,[9]],"PY",595,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],[,"(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],[,"(\\d{3})(\\d{6})","$1 $2",["9[1-9]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})",
19634            "$1 $2 $3",["870","8700"]],[,"(\\d{3})(\\d{4,5})","$1 $2",["[2-8][1-9]"],"(0$1)"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8][1-9]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"[2-9]0\\d{4,7}",,,,"201234567"],,,[,,,,,,,,,[-1]]],QA:[,[,,"[2-8]\\d{6,7}",,,,,,,[7,8]],[,,"4[04]\\d{6}",,,,"44123456",,,[8]],[,,"[3567]\\d{7}",,,,"33123456",,,[8]],[,,"800\\d{4}",,,,"8001234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"QA",974,"00",,,,,,,,[[,"([28]\\d{2})(\\d{4})","$1 $2",
19635            ["[28]"]],[,"([3-7]\\d{3})(\\d{4})","$1 $2",["[3-7]"]]],,[,,"2(?:[12]\\d|61)\\d{4}",,,,"2123456",,,[7]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],RE:[,[,,"[268]\\d{8}",,,,,,,[9]],[,,"262\\d{6}",,,,"262161234"],[,,"69(?:2\\d{2}|3(?:0[0-46]|1[013]|2[0-2]|3[039]|4[0-7]|5[05]|6[06]|7[07]|8[0-38]|9[0-479]))\\d{4}",,,,"692123456"],[,,"80\\d{7}",,,,"801234567"],[,,"89[1-37-9]\\d{6}",,,,"891123456"],[,,"8(?:1[019]|2[0156]|84|90)\\d{6}",,,,"810123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"RE",262,"00",
19636            "0",,,"0",,,,[[,"([268]\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"0$1"]],,[,,,,,,,,,[-1]],1,"262|69|8",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],RO:[,[,,"[23]\\d{5,8}|[7-9]\\d{8}",,,,,,,[6,9]],[,,"2(?:1(?:\\d{7}|9\\d{3}
19636)|[3-6](?:\\d{7}|\\d9\\d{2}))|3(?:1\\d{4}(?:\\d{3})?|[3-6]\\d{7})",,,,"211234567"],[,,"7(?:[0-8]\\d{2}|99\\d)\\d{5}",,,,"712345678",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"90[036]\\d{6}",,,,"900123456",,,[9]],[,,"801\\d{6}",,,,"801123456",,,[9]],[,,,,,,,,,[-1]],
19637            [,,,,,,,,,[-1]],"RO",40,"00","0"," int ",,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],[,"(\\d{2})(\\d{4})","$1 $2",["[23]1"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23][3-7]|[7-9]"],"0$1"],[,"(2\\d{2})(\\d{3})","$1 $2",["2[3-6]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"37\\d{7}",,,,"372123456",,,[9]],,,[,,,,,,,,,[-1]]],RS:[,[,,"[126-9]\\d{4,11}|3(?:[0-79]\\d{3,10}|8[2-9]\\d{2,9})",,,,,,,[6,7,8,9,10,11,12],[5]],[,,"(?:1(?:[02-9][2-9]|1[1-9])\\d|2(?:[0-24-7][2-9]\\d|[389](?:0[2-9]|[2-9]\\d))|3(?:[0-8][2-9]\\d|9(?:[2-9]\\d|0[2-9])))\\d{3,8}",
19638            ,,,"10234567",,,[7,8,9,10,11,12],[5,6]],[,,"6(?:[0-689]|7\\d)\\d{6,7}",,,,"601234567",,,[8,9,10]],[,,"800\\d{3,9}",,,,"80012345"],[,,"(?:90[0169]|78\\d)\\d{3,7}",,,,"90012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"RS",381,"00","0",,,"0",,,,[[,"([23]\\d{2})(\\d{4,9})","$1 $2",["(?:2[389]|39)0"],"0$1"],[,"([1-3]\\d)(\\d{5,10})","$1 $2",["1|2(?:[0-24-7]|[389][1-9])|3(?:[0-8]|9[1-9])"],"0$1"],[,"(6\\d)(\\d{6,8})","$1 $2",["6"],"0$1"],[,"([89]\\d{2})(\\d{3,9})","$1 $2",["[89]"],"0$1"],[,"(7[26])(\\d{4,9})",
19639            "$1 $2",["7[26]"],"0$1"],[,"(7[08]\\d)(\\d{4,9})","$1 $2",["7[08]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"7[06]\\d{4,10}",,,,"700123456"],,,[,,,,,,,,,[-1]]],RU:[,[,,"[3489]\\d{9}",,,,,,,[10]],[,,"(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15]|6[1-35-79]|7[1-37-9]))\\d{7}",,,,"3011234567"],[,,"9\\d{9}",,,,"9123456789"],[,,"80[04]\\d{7}",,,,"8001234567"],[,,"80[39]\\d{7}",,,,"8091234567"],[,,,,,,,,,[-1]],
19640            [,,"808\\d{7}",,,,"8081234567"],[,,,,,,,,,[-1]],"RU",7,"810","8",,,"8",,"8~10",,[[,"(\\d{3})(\\d{2})(\\d{2})","$1-$2-$3",["[1-79]"],"$1",,1],[,"([3489]\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[34689]"],"8 ($1)",,1],[,"(7\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",,1]],[[,"([3489]\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[34689]"],"8 ($1)",,1],[,"(7\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",,1]],[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],RW:[,
19641            [,,"[027-9]\\d{7,8}",,,,,,,[8,9]],[,,"2[258]\\d{7}|06\\d{6}",,,,"250123456"],[,,"7[238]\\d{7}",,,,"720123456",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"900\\d{6}",,,,"900123456",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"RW",250,"00","0",,,"0",,,,[[,"(2\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"$1"],[,"([7-9]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"],[,"(0\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,
19642                ,[-1]]],SA:[,[,,"1\\d{7,8}|(?:[2-467]|92)\\d{7}|5\\d{8}|8\\d{9}",,,,,,,[8,9,10],[7]],[,,"11\\d{7}|1?(?:2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}",,,,"112345678",,,[8,9],[7]],[,,"(?:5(?:[013-689]\\d|7[0-36-8])|811\\d)\\d{6}",,,,"512345678",,,[9,10]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,,,,,,,,[-1]],[,,"92[05]\\d{6}",,,,"920012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SA",966,"00","0",,,"0",,,,[[,"([1-467])(\\d{3})(\\d{4})","$1 $2 $3",["[1-467]"],"0$1"],[,"(1\\d)(\\d{3})(\\d{4})","$1 $2 $3",
19643            ["1[1-467]"],"0$1"],[,"(5\\d)(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],[,"(92\\d{2})(\\d{5})","$1 $2",["92"],"$1"],[,"(800)(\\d{3})(\\d{4})","$1 $2 $3",["80"],"$1"],[,"(811)(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SB:[,[,,"[1-9]\\d{4,6}",,,,,,,[5,7]],[,,"(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}",,,,"40123",,,[5]],[,,"48\\d{3}|7(?:30|[46-8]\\d|5[025-9]|9[0-5])\\d{4}|8[4-9]\\d{5}|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8])\\d{4}",
19644            ,,,"7421234"],[,,"1[38]\\d{3}",,,,"18123",,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"5[12]\\d{3}",,,,"51123",,,[5]],"SB",677,"0[01]",,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["[7-9]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SC:[,[,,"[24689]\\d{5,6}",,,,,,,[7]],[,,"4[2-46]\\d{5}",,,,"4217123"],[,,"2[5-8]\\d{5}",,,,"2510123"],[,,"8000\\d{3}",,,,"8000000"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:64\\d|971)\\d{4}",,,,"6412345"],"SC",248,"0(?:[02]|10?)",
19645            ,,,,,"00",,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SD:[,[,,"[19]\\d{8}",,,,,,,[9]],[,,"1(?:[125]\\d|8[3567])\\d{6}",,,,"121231234"],[,,"9[0-3569]\\d{7}",,,,"911231234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SD",249,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",,"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SE:[,[,,"[1-35-9]\\d{5,11}|4\\d{6,8}",
19646            ,,,,,,[6,7,8,9,10,12]],[,,"1(?:0[1-8]\\d{6}|[136]\\d{5,7}|(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)\\d{5,6})|2(?:[136]\\d{5,7}|(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])\\d{5,6})|3(?:[356]\\d{5,7}|(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])\\d{5,6})|4(?:[0246]\\d{5,7}|(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])\\d{5,6})|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])\\d{5,6}|6(?:[03]\\d{5,7}|(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])\\d{5,6})|8\\d{6,8}|9(?:0[1-9]\\d{4,6}|(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8])\\d{5,6})",
19647            ,,,"8123456",,,[7,8,9]],[,,"7[02369]\\d{7}",,,,"701234567",,,[9]],[,,"20\\d{4,7}",,,,"20123456",,,[6,7,8,9]],[,,"649\\d{6}|9(?:00|39|44)[1-8]\\d{3,6}",,,,"9001234567",,,[7,8,9,10]],[,,"77(?:0\\d{3}(?:\\d{3})?|[1-7]\\d{6})",,,,"771234567",,,[6,9]],[,,"75[1-8]\\d{6}",,,,"751234567",,,[9]],[,,,,,,,,,[-1]],"SE",46,"00","0",,,"0",,,,[[,"(8)(\\d{2,3})(\\d{2,3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1"],[,"([1-69]\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[013689]|2[0136]|3[1356]|4[0246]|54|6[03]|90"],"0$1"],
19648            [,"([1-469]\\d)(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])"],"0$1"],[,"(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])"],"0$1"],[,"(7\\d)(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["7"],"0$1"],[,"(77)(\\d{2})(\\d{2})",
19649                "$1-$2$3",["7"],"0$1"],[,"(20)(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1"],[,"(9[034]\\d)(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9[034]"],"0$1"],[,"(9[034]\\d)(\\d{4})","$1-$2",["9[034]"],"0$1"],[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["25[245]|67[3-6]"],"0$1"]],[[,"(8)(\\d{2,3})(\\d{2,3})(\\d{2})","$1 $2 $3 $4",["8"]],[,"([1-69]\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[013689]|2[0136]|3[1356]|4[0246]|54|6[03]|90"]],[,"([1-469]\\d)(\\d{3})(\\d{2})","$1 $2 $3",["[12][136]|3[356]|4[0246]|6[03]|90"]],
19650            [,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])"]],[,"(\\d{3})(\\d{2,3})(\\d{2})","$1 $2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])"]],[,"(7\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7"]],[,"(77)(\\d{2})(\\d{2})","$1 $2 $3",["7"]],[,"(20)(\\d{2,3})(\\d{2})","$1 $2 $3",["20"]],[,"(9[034]\\d)(\\d{2})(\\d{2})(\\d{3})",
19651                "$1 $2 $3 $4",["9[034]"]],[,"(9[034]\\d)(\\d{4})","$1 $2",["9[034]"]],[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["25[245]|67[3-6]"]]],[,,"74[02-9]\\d{6}",,,,"740123456",,,[9]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,"(?:25[245]|67[3-6])\\d{9}
19651",,,,"254123456789",,,[12]]],SG:[,[,,"[36]\\d{7}|[17-9]\\d{7,10}",,,,,,,[8,10,11]],[,,"6[1-9]\\d{6}",,,,"61234567",,,[8]],[,,"(?:8[1-8]|9[0-8])\\d{6}",,,,"81234567",,,[8]],[,,"1?800\\d{7}",,,,"18001234567",,,[10,11]],[,,"1900\\d{7}",,,,"19001234567",
19652            ,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"3[12]\\d{6}",,,,"31234567",,,[8]],"SG",65,"0[0-3]\\d",,,,,,,,[[,"([3689]\\d{3})(\\d{4})","$1 $2",["[369]|8[1-9]"]],[,"(1[89]00)(\\d{3})(\\d{4})","$1 $2 $3",["1[89]"]],[,"(7000)(\\d{4})(\\d{3})","$1 $2 $3",["70"]],[,"(800)(\\d{3})(\\d{4})","$1 $2 $3",["80"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"7000\\d{7}",,,,"70001234567",,,[11]],,,[,,,,,,,,,[-1]]],SH:[,[,,"[256]\\d{4}",,,,,,,[4,5]],[,,"2(?:[0-57-9]\\d|6[4-9])\\d{2}",,,,"22158"],[,,"[56]\\d{4}",,,,"51234",
19653            ,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"262\\d{2}",,,,"26212",,,[5]],"SH",290,"00",,,,,,,,,,[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SI:[,[,,"[1-7]\\d{6,7}|[89]\\d{4,7}",,,,,,,[5,6,7,8]],[,,"(?:1\\d|[25][2-8]|3[24-8]|4[24-8]|7[3-8])\\d{6}",,,,"11234567",,,[8],[7]],[,,"(?:[37][01]\\d|4[0139]\\d|51\\d|6(?:[48]\\d|9[69]))\\d{5}",,,,"31234567",,,[8]],[,,"80\\d{4,6}",,,,"80123456",,,[6,7,8]],[,,"90\\d{4,6}|89[1-3]\\d{2,5}",,,,"90123456"],
19654            [,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"(?:59|8[1-3])\\d{6}",,,,"59012345",,,[8]],"SI",386,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[12]|[34][24-8]|5[2-8]|7[3-8]"],"(0$1)"],[,"([3-7]\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],[,"([89][09])(\\d{3,6})","$1 $2",["[89][09]"],"0$1"],[,"([58]\\d{2})(\\d{5})","$1 $2",["59|8[1-3]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SJ:[,[,,"0\\d{4}|[45789]\\d{7}",,,,,,,[5,8]],[,,"79\\d{6}",
19655            ,,,"79123456",,,[8]],[,,"(?:4[015-8]|5[89]|9\\d)\\d{6}",,,,"41234567",,,[8]],[,,"80[01]\\d{5}",,,,"80012345",,,[8]],[,,"82[09]\\d{5}",,,,"82012345",,,[8]],[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}",,,,"81021234",,,[8]],[,,"880\\d{5}",,,,"88012345",,,[8]],[,,"85[0-5]\\d{5}",,,,"85012345",,,[8]],"SJ",47,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"0\\d{4}|81(?:0(?:0[7-9]|1\\d)|5\\d{2})\\d{3}",,,,"01234"],,,[,,"81[23]\\d{5}",,,,"81212345",,,[8]]],SK:[,[,,"(?:[2-68]\\d{5,8}|9\\d{6,8})",,,,,,,[6,7,9]],[,
19656            ,"2(?:1(?:6\\d{3,4}|7\\d{3})|[2-9]\\d{7})|[3-5][1-8](?:1(?:6\\d{2,3}|7\\d{3})|\\d{7})",,,,"221234567"],[,,"9(?:0(?:[1-8]\\d|9[1-9])|(?:1[0-24-9]|[45]\\d)\\d)\\d{5}",,,,"912123456",,,[9]],[,,"800\\d{6}",,,,"800123456",,,[9]],[,,"9(?:[78]\\d{7}|00\\d{6})",,,,"900123456",,,[9]],[,,"8[5-9]\\d{7}",,,,"850123456",,,[9]],[,,,,,,,,,[-1]],[,,"6(?:02|5[0-4]|9[0-6])\\d{6}",,,,"690123456",,,[9]],"SK",421,"00","0",,,"0",,,,[[,"(2)(1[67])(\\d{3,4})","$1 $2 $3",["21[67]"],"0$1"],[,"([3-5]\\d)(1[67])(\\d{2,3})",
19657            "$1 $2 $3",["[3-5]"],"0$1"],[,"(2)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],[,"([3-5]\\d)(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"],[,"([689]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],[,"(9090)(\\d{3})","$1 $2",["909","9090"],"0$1"]],,[,,"9090\\d{3}",,,,"9090123",,,[7]],,,[,,"(?:602|8(?:00|[5-9]\\d)|9(?:00|[78]\\d))\\d{6}|9090\\d{3}",,,,"800123456",,,[7,9]],[,,"96\\d{7}",,,,"961234567",,,[9]],,,[,,,,,,,,,[-1]]],SL:[,[,,"[2-9]\\d{7}",,,,,,,[8],[6]],[,,"[235]2[2-4][2-9]\\d{4}",
19658            ,,,"22221234",,,,[6]],[,,"(?:2[15]|3[03-5]|4[04]|5[05]|66|7[6-9]|8[08]|99)\\d{6}",,,,"25123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SL",232,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{6})","$1 $2",,"(0$1)"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SM:[,[,,"[05-7]\\d{7,9}",,,,,,,[8,10],[6]],[,,"0549(?:8[0157-9]|9\\d)\\d{4}",,,,"0549886377",,,[10],[6]],[,,"6[16]\\d{6}",,,,"66661212",,,[8]],[,,,,,,,,,[-1]],[,,"7[178]\\d{6}",,,,"71123456",
19659            ,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"5[158]\\d{6}",,,,"58001110",,,[8]],"SM",378,"00",,,,"(?:0549)?([89]\\d{5})","0549$1",,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],[,"(0549)(\\d{6})","$1 $2",["0"]],[,"(\\d{6})","0549 $1",["[89]"]]],[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],[,"(0549)(\\d{6})","($1) $2",["0"]],[,"(\\d{6})","(0549) $1",["[89]"]]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SN:[,[,,"[3789]\\d{8}",,,,,,,[9]],[,
19660            ,"3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}
vendor: 12,445 bytes, lines 19660-19683
19660",,,,"301012345"],[,,"7(?:[06-8]\\d|21|90)\\d{6}",,,,"701234567"],[,,"800\\d{6}",,,,"800123456"],[,,"88[4689]\\d{6}",,,,"884123456"],[,,"81[02468]\\d{6}",,,,"810123456"],[,,,,,,,,,[-1]],[,,"39[01]\\d{6}|3392\\d{5}|93330\\d{4}",,,,"933301234"],"SN",221,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]],[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,
19661            ,,[-1]]],SO:[,[,,"[1-9]\\d{5,8}",,,,,,,[6,7,8,9]],[,,"(?:1\\d{1,2}|2[0-79]\\d|3[0-46-8]?\\d|4[0-7]?\\d|59\\d|8[125])\\d{4}",,,,"4012345",,,[6,7]],[,,"(?:15\\d|2(?:4\\d|8)|3[59]\\d{2}|4[89]\\d{2}|6[1-9]?\\d{2}|7(?:[1-8]\\d|9\\d{1,2})|8[08]\\d{2}|9(?:0[67]|[2-9])\\d)\\d{5}",,,,"71123456",,,[7,8,9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SO",252,"00","0",,,"0",,,,[[,"(\\d{6})","$1",["[134]"]],[,"(\\d)(\\d{6})","$1 $2",["[13-5]|2[0-79]"]],[,"(\\d)(\\d{7})","$1 $2",
19662            ["24|[67]"]],[,"(\\d{2})(\\d{4})","$1 $2",["8[125]"]],[,"(\\d{2})(\\d{5,7})","$1 $2",["15|28|6[1-35-9]|799|9[2-9]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3[59]|4[89]|6[24-6]|79|8[08]|90"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SR:[,[,,"[2-8]\\d{5,6}",,,,,,,[6,7]],[,,"(?:2[1-3]|3[0-7]|4\\d|5[2-58]|68\\d)\\d{4}",,,,"211234"],[,,"(?:7[124-7]|8[125-9])\\d{5}",,,,"7412345",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"56\\d{4}",,,,"561234",
19663            ,,[6]],"SR",597,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1-$2",["[2-4]|5[2-58]"]],[,"(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],[,"(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SS:[,[,,"[19]\\d{8}",,,,,,,[9]],[,,"18\\d{7}",,,,"181234567"],[,,"(?:12|9[1257])\\d{7}",,,,"977123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SS",211,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",,"0$1"]],,[,,
19664            ,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ST:[,[,,"[29]\\d{6}",,,,,,,[7]],[,,"22\\d{5}",,,,"2221234"],[,,"9(?:0(?:0[5-9]|[1-9]\\d)|[89]\\d{2})\\d{3}",,,,"9812345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ST",239,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SV:[,[,,"[267]\\d{7}|[89]\\d{6}(?:\\d{4})?",,,,,,,[7,8,11]],[,,"2[1-6]\\d{6}",,,,"21234567",,,[8]],[,,"[67]\\d{7}",
19665            ,,,"70123456",,,[8]],[,,"800\\d{4}(?:\\d{4})?",,,,"8001234",,,[7,11]],[,,"900\\d{4}(?:\\d{4})?",,,,"9001234",,,[7,11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SV",503,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[267]"]],[,"(\\d{3})(\\d{4})","$1 $2",["[89]"]],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SX:[,[,,"[5789]\\d{9}",,,,,,,[10],[7]],[,,"7215(?:4[2-8]|8[239]|9[056])\\d{4}",,,,"7215425678",,,,[7]],[,,"7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}",
19666            ,,,"7215205678",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"],[,,"900[2-9]\\d{6}",,,,"9002123456"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"SX",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"721",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SY:[,[,,"[1-59]\\d{7,8}",,,,,,,[8,9],[6,7]],[,,"(?:1(?:1\\d?|4\\d|[2356])|2(?:1\\d?|[235])|3(?:[13]\\d|4)|4[13]|5[1-3])\\d{6}",,,,"112345678",,,,[6,7]],[,,"9(?:22|[3-589]\\d|6[024-9])\\d{6}",
19667            ,,,"944567890",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"SY",963,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",,1],[,"(9\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",,1]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],SZ:[,[,,"[027]\\d{7}",,,,,,,[8]],[,,"2[2-9]\\d{6}",,,,"22171234"],[,,"7[6-9]\\d{6}",,,,"76123456"],[,,"0800\\d{4}",,,,"08001234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,
19668            ,,,,,,,[-1]],"SZ",268,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[027]"]]],,[,,,,,,,,,[-1]],,,[,,"0800\\d{4}",,,,"08001234"],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TA:[,[,,"8\\d{3}",,,,,,,[4]],[,,"8\\d{3}",,,,"8999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TA",290,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TC:[,[,,"[5689]\\d{9}",,,,,,,[10],[7]],[,,"649(?:712|9(?:4\\d|50))\\d{4}",,,,"6497121234",,,,[7]],[,
19669            ,"649(?:2(?:3[129]|4[1-7])|3(?:3[1-389]|4[1-8])|4[34][1-3])\\d{4}",,,,"6492311234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,"64971[01]\\d{4}",,,,"6497101234",,,,[7]],"TC",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"649",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TD:[,[,,"[2679]\\d{7}",,,,,,,[8]],[,,"22(?:[3789]0|5[0-5]|6[89])\\d{4}",,,,"22501234"],[,,"(?:6[023568]\\d|77\\d|9\\d{2})\\d{5}",
19670            ,,,"63012345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TD",235,"00|16",,,,,,"00",,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TG:[,[,,"[29]\\d{7}",,,,,,,[8]],[,,"2(?:2[2-7]|3[23]|44|55|66|77)\\d{5}",,,,"22212345"],[,,"9[0-36-9]\\d{6}",,,,"90112345"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TG",228,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
19671            "$1 $2 $3 $4",["[29]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TH:[,[,,"1\\d{8,9}|[2-9]\\d{7,8}",,,,,,,[8,9,10]],[,,"(?:2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}",,,,"21234567",,,[8]],[,,"(?:14|6[1-6]|[89]\\d)\\d{7}",,,,"812345678",,,[9]],[,,"1800\\d{6}",,,,"1800123456",,,[10]],[,,"1900\\d{6}",,,,"1900123456",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"6[08]\\d{7}",,,,"601234567",,,[9]],"TH",66,"00","0",,,"0",,,,[[,"(2)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],[,"([13-9]\\d)(\\d{3})(\\d{3,4})",
19672            "$1 $2 $3",["14|[3-9]"],"0$1"],[,"(1[89]00)(\\d{3})(\\d{3})","$1 $2 $3",["1"],"$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TJ:[,[,,"[3-57-9]\\d{8}",,,,,,,[9],[3,5,7]],[,,"(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}",,,,"372123456",,,,[3,5,7]],[,,"(?:41[18]|(?:5[05]|77|88|9[0-35-9])\\d)\\d{6}",,,,"917123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TJ",992,"810","8",,,"8",,"8~10",,[[,"([349]\\d{2})(\\d{2})(\\d{4})",
19673            "$1 $2 $3",["[34]7|91[78]"],"$1",,1],[,"([457-9]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[148]|[578]|9(?:[0235-9]|1[59])"],"$1",,1],[,"(331700)(\\d)(\\d{2})","$1 $2 $3",["331","3317","33170","331700"],"$1",,1],[,"(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]","3(?:[1245]|3(?:[02-9]|1[0-589]))"],"$1",,1]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TK:[,[,,"[2-47]\\d{3,6}",,,,,,,[4,5,6,7]],[,,"(?:2[2-4]|[34]\\d)\\d{2,5}",,,,"3101"],[,,"7[2-4]\\d{2,5}",,,,"7290"],[,,,,,,,,,[-1]],[,
19674            ,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TK",690,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TL:[,[,,"[2-489]\\d{6}|7\\d{6,7}",,,,,,,[7,8]],[,,"(?:2[1-5]|3[1-9]|4[1-4])\\d{5}",,,,"2112345",,,[7]],[,,"7[3-8]\\d{6}",,,,"77212345",,,[8]],[,,"80\\d{5}",,,,"8012345",,,[7]],[,,"90\\d{5}",,,,"9012345",,,[7]],[,,,,,,,,,[-1]],[,,"70\\d{5}",,,,"7012345",,,[7]],[,,,,,,,,,[-1]],"TL",670,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],[,"(\\d{4})(\\d{4})",
19675            "$1 $2",["7[3-8]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TM:[,[,,"[1-6]\\d{7}",,,,,,,[8]],[,,"(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}",,,,"12345678"],[,,"6[1-9]\\d{6}",,,,"66123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TM",993,"810","8",,,"8",,"8~10",,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],[,"(\\d{2})(\\d{6})","$1 $2",
19676            ["6"],"8 $1"],[,"(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["13|[2-5]"],"(8 $1)"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TN:[,[,,"[2-57-9]\\d{7}",,,,,,,[8]],[,,"3(?:[012]\\d|6[0-4]|91)\\d{5}|7\\d{7}|81200\\d{3}",,,,"71234567"],[,,"(?:[259]\\d|4[0-6])\\d{6}",,,,"20123456"],[,,"8010\\d{4}",,,,"80101234"],[,,"88\\d{6}",,,,"88123456"],[,,"8[12]10\\d{4}",,,,"81101234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TN",216,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3"]],,[,
19677            ,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TO:[,[,,"[02-8]\\d{4,6}",,,,,,,[5,7]],[,,"(?:2\\d|3[1-8]|4[1-4]|[56]0|7[0149]|8[05])\\d{3}",,,,"20123",,,[5]],[,,"(?:7[578]|8[47-9])\\d{5}",,,,"7715123",,,[7]],[,,"0800\\d{3}",,,,"0800222",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TO",676,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1-$2",["[1-6]|7[0-4]|8[05]"]],[,"(\\d{3})(\\d{4})","$1 $2",["7[5-9]|8[47-9]"]],[,"(\\d{4})(\\d{3})","$1 $2",["0"]]],,[,,,,,,,,,[-1]],
19678            ,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TR:[,[,,"[2-589]\\d{9}|444\\d{4}",,,,,,,[7,10]],[,,"(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}",,,,"2123456789",,,[10]],[,,"5(?:(?:0[1-7]|22|[34]\\d|5[1-59]|9[246])\\d{2}|6161)\\d{5}",,,,"5012345678",,,[10]],[,,"800\\d{7}",,,,"8001234567",,,[10]],[,,"900\\d{7}",,,,"9001234567",,,[10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TR",90,"00","0",,,"0",,,
19679            ,[[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[23]|4(?:[0-35-9]|4[0-35-9])"],"(0$1)",,1],[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[02-69]"],"0$1",,1],[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["51|[89]"],"0$1",,1],[,"(444)(\\d{1})(\\d{3})","$1 $2 $3",["444"]]],,[,,"512\\d{7}",,,,"5123456789",,,[10]],,,[,,"444\\d{4}",,,,"4441444",,,[7]],[,,"444\\d{4}|850\\d{7}",,,,"4441444"],,,[,,,,,,,,,[-1]]],TT:[,[,,"[589]\\d{9}",,,,,,,[10],[7]],[,,"868(?:2(?:01|[23]\\d)|6(?:0[79]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}",
19680            ,,,"8682211234",,,,[7]],[,,"868(?:2(?:6[6-9]|[789]\\d)|3(?:0[1-9]|1[02-9]|[2-9]\\d)|4[6-9]\\d|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}",,,,"8682911234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"TT",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"868",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,"868619\\d{4}",,,,"8686191234",,,,[7]]],TV:[,[,,"[279]\\d{4,6}",
19681            ,,,,,,[5,6,7]],[,,"2[02-9]\\d{3}",,,,"20123",,,[5]],[,,"(?:70\\d|90)\\d{4}",,,,"901234",,,[6,7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"TV",688,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],TW:[,[,,"2\\d{6,8}|[3-689]\\d{7,8}|7\\d{7,9}",,,,,,,[7,8,9,10]],[,,"(?:2(?:[235-8]\\d{3}|4\\d{2,3})|3[2-9]\\d{2}|4(?:[239]\\d|[78])\\d{2}|5[2-8]\\d{2}|6[235-79]\\d{2}|7[1-9]\\d{2}|8(?:2(?:3\\d|66)|[7-9]\\d{2}))\\d{4}",,,,"221234567",
19682            ,,[8,9]],[,,"9[0-8]\\d{7}",,,,"912345678",,,[9]],[,,"80[0-79]\\d{6}",,,,"800123456",,,[9]],[,,"20(?:2|[013-9]\\d{2})\\d{4}",,,,"203123456",,,[7,9]],[,,,,,,,,,[-1]],[,,"99\\d{7}",,,,"990123456",,,[9]],[,,"70\\d{8}",,,,"7012345678",,,[10]],"TW",886,"0(?:0[25679]|19)","0","#",,"0",,,,[[,"(20)(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],[,"([258]0)(\\d{3})(\\d{4})","$1 $2 $3",["20[013-9]|50[0-46-9]|80[0-79]"],"0$1"],[,"([2-8])(\\d{3,4})(\\d{4})","$1 $2 $3",["[25][2-8]|[346]|[78][1-9]"],"0$1"],[,"(9\\d{2})(\\d{3})(\\d{3})",
19683            "$1 $2 $3",["9"],"0$1"],[,"(70)(\\d{4})(\\d{4})","$1 $2 $3",["70"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"50[0-46-9]\\d{6}",,,,"500123456",,,[9]],,,[,,,,,,,,,[-1]]],TZ:[,[,,"\\d{9}",,,,,,,[7,9]],[,,"2[2-8]\\d{7}",,,,"222345678"],[,,"(?:6[2-9]|7[13-9])\\d{7}",,,,"621234567",,,[9]],[,,"80[08]\\d{6}",,,,"800123456",,,[9]],[,,"90\\d{7}",,,,"900123456",,,[9]],[,,"8(?:40|6[01])\\d{6}",,,,"840123456",,,[9]],[,,,,,,,,,[-1]],[,,"41\\d{7}
vendor: 5,066 bytes, lines 19683-19692
19683",,,,"412345678",,,[9]],"TZ",255,"00[056]","0",,,"0",,,,[[,"([24]\\d)(\\d{3})(\\d{4})",
19684            "$1 $2 $3",["[24]"],"0$1"],[,"([67]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"],[,"([89]\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,"(?:8(?:[04]0|6[01])|90\\d)\\d{6}",,,,"800123456",,,[9]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],UA:[,[,,"[3-9]\\d{8}",,,,,,,[9],[5,6,7]],[,,"(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}",,,,"311234567",,,,[5,6,7]],[,,"(?:39|50|6[36-8]|7[1-3]|9[1-9])\\d{7}",,,,"391234567"],[,,"800\\d{6}",,,,"800123456"],[,,"900[2-49]\\d{5}",,,,"900212345"],
19685            [,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"89[1-579]\\d{6}",,,,"891234567"],"UA",380,"00","0",,,"0",,"0~0",,[[,"([3-9]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[38]9|4(?:[45][0-5]|87)|5(?:0|[67][37])|6[36-8]|7|9[1-9]","[38]9|4(?:[45][0-5]|87)|5(?:0|6(?:3[14-7]|7)|7[37])|6[36-8]|7|9[1-9]"],"0$1"],[,"([3-689]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["(?:3[1-8]|4[136-8])2|5(?:[12457]2|6[24])|6(?:[12][29]|[49]2|5[24])|8[0-8]|90","3(?:[1-46-8]2[013-9]|52)|4(?:[1378]2|62[013-9])|5(?:[12457]2|6[24])|6(?:[12][29]|[49]2|5[24])|8[0-8]|90"],
19686                "0$1"],[,"([3-6]\\d{3})(\\d{5})","$1 $2",["3(?:[1-46-8]|5[013-9])|4(?:[137][013-9]|[45][6-9]|6|8[4-6])|5(?:[1245][013-9]|3|6[0135689]|7[4-6])|6(?:[12][13-8]|[49][013-9]|5[0135-9])","3(?:[1-46-8](?:[013-9]|22)|5[013-9])|4(?:[137][013-9]|[45][6-9]|6(?:[013-9]|22)|8[4-6])|5(?:[1245][013-9]|3|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][13-8]|[49][013-9]|5[0135-9])"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],UG:[,[,,"\\d{9}",,,,,,,[9],[5,6,7]],[,,"20(?:[0147]\\d{2}|2(?:40|[5-9]\\d)|3(?:0[0-4]|[2367]\\d)|5[0-4]\\d|6[0135-9]\\d|8[0-2]\\d)\\d{4}|[34]\\d{8}",
19687            ,,,"312345678",,,,[5,6,7]],[,,"7(?:(?:0[0-7]|[15789]\\d|30|4[0-4])\\d|2(?:[03]\\d|60))\\d{5}",,,,"712345678"],[,,"800[123]\\d{5}",,,,"800123456"],[,,"90[123]\\d{6}",,,,"901123456"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"UG",256,"00[057]","0",,,"0",,,,[[,"(\\d{3})(\\d{6})","$1 $2",["20[0-8]|4(?:6[45]|[7-9])|[7-9]","20(?:[013-8]|2[5-9])|4(?:6[45]|[7-9])|[7-9]"],"0$1"],[,"(\\d{2})(\\d{7})","$1 $2",["3|4(?:[1-5]|6[0-36-9])"],"0$1"],[,"(2024)(\\d{5})","$1 $2",["202","2024"],"0$1"]],,[,,,,,,,
19688            ,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],US:[,[,,"[2-9]\\d{9}",,,,,,,[10],[7]],[,,"(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[026]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[0-24679]|4[67]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[16]|5[017]|6[0-279]|78|8[012])|7(?:0[1-46-8]|1[02-9]|2[0457]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|28|3[0-258]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[014678]|4[0179]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}",
19689            ,,,"2015550123",,,,[7]],[,,"(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[026]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[0-24679]|4[67]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[16]|5[017]|6[0-279]|78|8[012])|7(?:0[1-46-8]|1[02-9]|2[0457]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|28|3[0-258]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[014678]|4[0179]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}",
19690            ,,,"2015550123",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"US",1,"011","1",,,"1",,,1,[[,"(\\d{3})(\\d{4})","$1-$2",,,,1],[,"(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",,,,1]],[[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3"]],[,,,,,,,,,[-1]],1,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],UY:[,[,,"[2489]\\d{6,7}",,,,,,,[7,8]],[,,"2\\d{7}|4[2-7]\\d{6}",,
19691            ,,"21231234",,,[8],[7]],[,,"9[1-9]\\d{6}",,,,"94231234",,,[8]],[,,"80[05]\\d{4}",,,,"8001234",,,[7]],[,,"90[0-8]\\d{4}",,,,"9001234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"UY",598,"0(?:1[3-9]\\d|0)","0"," int. ",,"0",,"00",,[[,"(\\d{4})(\\d{4})","$1 $2",["[24]"]],[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9[1-9]"],"0$1"],[,"(\\d{3})(\\d{4})","$1 $2",["[89]0"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],UZ:[,[,,"[679]\\d{8}",,,,,,,[9],[7]],[,,"(?:6(?:1(?:22|3[124]|4[1-4]|5[123578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|6\\d{2}|7(?:[23]\\d|7[69])|9(?:22|4[1-8]|6[135]))|7(?:0(?:5[4-9]|6[0146]|7[12456]|9[135-8])|1[12]\\d|2(?:22|3[1345789]|4[123579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|6(?:22|3[12457]|4[13-8])|9(?:22|5[1-9])))\\d{5}",
19692            ,,,"662345678",,,,[7]],[,,"6(?:1(?:2(?:98|2[01])|35[0-4]|50\\d|61[23]|7(?:[
1969201][017]|4\\d|55|9[5-9]))|2(?:11\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4])|7\\d{2})|5(?:19[01]|2(?:27|9[26])|30\\d|59\\d|7\\d{2})|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|3[79]\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79])|9[0-3]\\d)|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079]))|9(?:2(?:1[1267]|5\\d|3[01]|7[0-4])|5[67]\\d|6(?:2[0-26]|8\\d)|7\\d{2}))\\d{4}|7(?:0\\d{3}|1(?:13[01]|6(?:0[47]|1[67]|66)|71[3-69]|98\\d)|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|33\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078])|9[4-6]\\d)|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0127]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|6(?:2(?:2[1245]|4[2-4])|39\\d|41[179]|5(?:[349]\\d|5[0-2])|7(?:0[017]|[13]\\d|22|44|55|67|88))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[05629]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07])))\\d{4}|9[0-57-9]\\d{7}",
19693            ,,,"912345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"UZ",998,"810","8",,,"8",,"8~10",,[[,"([679]\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"8 $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VA:[,[,,"(?:0(?:878\\d{5}|6698\\d{5})|[1589]\\d{5,10}|3(?:[12457-9]\\d{8}|[36]\\d{7,9}))",,,,,,,[6,8,9,10,11]],[,,"06698\\d{5}",,,,"0669812345",,,[10]],[,,"3(?:[12457-9]\\d{8}|6\\d{7,8}|3\\d{7,9})",,,,"3123456789",,,[9,10,11]],[,,"80(?:0\\d{6}|3\\d{3})",
19694            ,,,"800123456",,,[6,9]],[,,"0878\\d{5}|1(?:44|6[346])\\d{6}|89(?:2\\d{3}|4(?:[0-4]\\d{2}|[5-9]\\d{4})|5(?:[0-4]\\d{2}|[5-9]\\d{6})|9\\d{6})",,,,"899123456",,,[6,8,9,10]],[,,"84(?:[08]\\d{6}|[17]\\d{3})",,,,"848123456",,,[6,9]],[,,"1(?:78\\d|99)\\d{6}",,,,"1781234567",,,[9,10]],[,,"55\\d{8}",,,,"5512345678",,,[10]],"VA",39,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,"848\\d{6}",,,,"848123456",,,[9]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VC:[,[,,"[5789]\\d{9}",,,,,,,[10],[7]],[,,"784(?:266|3(?:6[6-9]|7\\d|8[0-24-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}",
19695            ,,,"7842661234",,,,[7]],[,,"784(?:4(?:3[0-5]|5[45]|89|9[0-58])|5(?:2[6-9]|3[0-4]))\\d{4}",,,,"7844301234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"VC",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"784",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VE:[,[,,"[24589]\\d{9}",,,,,,,[10],[7]],[,,"(?:2(?:12|3[457-9]|[58][1-9]|[467]\\d|9[1-6])|50[01])\\d{7}",
19696            ,,,"2121234567",,,,[7]],[,,"4(?:1[24-8]|2[46])\\d{7}",,,,"4121234567"],[,,"800\\d{7}",,,,"8001234567"],[,,"900\\d{7}",,,,"9001234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"VE",58,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{7})","$1-$2",,"0$1","$CC $1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VG:[,[,,"[2589]\\d{9}",,,,,,,[10],[7]],[,,"284(?:(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}|496[0-5]\\d{3})",,,,"2842291234",,,,[7]],[,,"284(?:(?:3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|99)|54[0-57])\\d{4}|496[6-9]\\d{3})",
19697            ,,,"2843001234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"VG",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]],,"284",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VI:[,[,,"[3589]\\d{9}",,,,,,,[10],[7]],[,,"340(?:2(?:01|2[0678]|44|77)|3(?:32|44)|4(?:22|7[34])|5(?:1[34]|55)|6(?:26|4[23]|77|9[023])|7(?:1[2-589]|27|7\\d)|884|998)\\d{4}",,,,"3406421234",
19698            ,,,[7]],[,,"340(?:2(?:01|2[0678]|44|77)|3(?:32|44)|4(?:22|7[34])|5(?:1[34]|55)|6(?:26|4[23]|77|9[023])|7(?:1[2-589]|27|7\\d)|884|998)\\d{4}",,,,"3406421234",,,,[7]],[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"],[,,"900[2-9]\\d{6}",,,,"9002345678"],[,,,,,,,,,[-1]],[,,"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"],[,,,,,,,,,[-1]],"VI",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]],,"340",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],VN:[,[,,"1\\d{6,9}|2\\d{9}|6\\d{6,7}|7\\d{6}|8\\d{6,8}|9\\d{8}",
19699            ,,,,,,[7,8,9,10]],[,,"2(?:0[3-9]|1[0-689]|2[0-25-9]|3[2-9]|4[2-8]|5[124-9]|6[0-39]|7[0-7]|8[2-7]|9[0-4679])\\d{7}",,,,"2101234567",,,[10]],[,,"(?:9\\d|1(?:2\\d|6[2-9]|8[68]|99))\\d{7}|8(?:6[89]|8\\d|9[89])\\d{6}",,,,"912345678",,,[9,10]],[,,"1800\\d{4,6}",,,,"1800123456",,,[8,9,10]],[,,"1900\\d{4,6}",,,,"1900123456",,,[8,9,10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"VN",84,"00","0",,,"0",,,,[[,"([17]99)(\\d{4})","$1 $2",["[17]99"],"0$1",,1],[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],
19700            "0$1",,1],[,"(80)(\\d{5})","$1 $2",["80"],"0$1",,1],[,"(69\\d)(\\d{4,5})","$1 $2",["69"],"0$1",,1],[,"(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2[0-35-79]"],"0$1",,1],[,"([89]\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8(?:8|9[89])|9"],"0$1",,1],[,"(1[2689]\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1(?:[26]|8[68]|99)"],"0$1",,1],[,"(86[89])(\\d{3})(\\d{3})","$1 $2 $3",["86[89]"],"0$1",,1],[,"(1[89]00)(\\d{4,6})","$1 $2",["1[89]0"],"$1",,1]],,[,,,,,,,,,[-1]],,,[,,"[17]99\\d{4}|69\\d{5,6}",,,,"1992000",,,[7,
19701            8]],[,,"[17]99\\d{4}|69\\d{5,6}|80\\d{5}",,,,"1992000",,,[7,8]],,,[,,,,,,,,,[-1]]],VU:[,[,,"[2-57-9]\\d{4,6}",,,,,,,[5,7]],[,,"(?:2[02-9]\\d|3(?:[5-7]\\d|8[0-8])|48[4-9]|88\\d)\\d{2}",,,,"22123",,,[5]],[,,"(?:5(?:7[2-5]|[0-689]\\d)|7[013-7]\\d)\\d{4}",,,,"5912345",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"VU",678,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[579]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"3[03]\\d{3}|900\\d{4}",,,,"30123"],,,[,,,,,,,,,
19702            [-1]]],WF:[,[,,"[4-8]\\d{5}",,,,,,,[6]],[,,"(?:50|68|72)\\d{4}",,,,"501234"],[,,"(?:50|68|72|8[23])\\d{4}",,,,"501234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"WF",681,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,"[48]0\\d{4}",,,,"401234"]],WS:[,[,,"[2-8]\\d{4,6}",,,,,,,[5,6,7]],[,,"(?:[2-5]\\d|6[1-9]|84\\d{2})\\d{3}",,,,"22123",,,[5,7]],[,,"(?:60|7[25-7]\\d)\\d{4}",,,,"601234",,,[6,7]],[,,"800\\d{3}",
19703            ,,,"800123",,,[6]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"WS",685,"0",,,,,,,,[[,"(8\\d{2})(\\d{3,4})","$1 $2",["8"]],[,"(7\\d)(\\d{5})","$1 $2",["7"]],[,"(\\d{5})","$1",["[2-6]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],YE:[,[,,"[1-7]\\d{6,8}",,,,,,,[7,8,9],[6]],[,,"(?:1(?:7\\d|[2-68])|2[2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-68])\\d{5}",,,,"1234567",,,[7,8],[6]],[,,"7[0137]\\d{7}",,,,"712345678",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,
19704            ,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"YE",967,"00","0",,,"0",,,,[[,"([1-7])(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7[24-68]"],"0$1"],[,"(7\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["7[0137]"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],YT:[,[,,"[268]\\d{8}",,,,,,,[9]],[,,"269(?:6[0-4]|50)\\d{4}",,,,"269601234"],[,,"639(?:0[0-79]|1[019]|[26]\\d|3[09]|[45]0|7[06]|9[04-79])\\d{4}",,,,"639012345"],[,,"80\\d{7}",,,,"801234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,
19705            ,,,,[-1]],[,,,,,,,,,[-1]],"YT",262,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]],,"269|63",[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ZA:[,[,,"[1-79]\\d{8}|8\\d{4,8}",,,,,,,[5,6,7,8,9]],[,,"(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}",,,,"101234567",,,[9]],[,,"(?:6\\d|7[0-46-9])\\d{7}|8(?:[1-4]\\d{1,5}|5\\d{5})\\d{2}",,,,"711234567"],[,,"80\\d{7}",,,,"801234567",,,[9]],[,,"86[2-9]\\d{6}|9[0-2]\\d{7}",,,,"862345678",,,[9]],[,,"860\\d{6}",,,,"860123456",,,[9]],[,,,,,,,,,[-1]],[,,"87\\d{7}",,,,"871234567",
19706            ,,[9]],"ZA",27,"00","0",,,"0",,,,[[,"(860)(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],[,"(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-79]|8(?:[0-57]|6[1-9])"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"861\\d{6}",,,,"861123456",,,[9]],,,[,,,,,,,,,[-1]]],ZM:[,[,,"[289]\\d{8}",,,,,,,[9]],[,,"21[1-8]\\d{6}",,,,"211234567"],[,,"9(?:5[034589]|[67]\\d)\\d{6}",,,,"955123456"],[,,"800\\d{6}",,,,"800123456"],
19707            [,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"ZM",260,"00","0",,,"0",,,,[[,"([29]\\d)(\\d{7})","$1 $2",["[29]"],"0$1"],[,"(800)(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],ZW:[,[,,"2(?:[0-2457-9]\\d{3,8}|6(?:[14]\\d{7}|\\d{4}))|[13-79]\\d{4,9}|8[06]\\d{5,8}",,,,,,,[5,6,7,8,9,10],[3,4]],[,,"(?:2(?:0(?:4\\d|5\\d{2})|2[278]\\d|48\\d|7(?:[1-7]\\d|[089]\\d{2})|8(?:[2-57-9]|[146]\\d{2})|98)|3(?:08|17|3[78]|7(?:[19]|[56]\\d)|8[37]|98)|5[15][78]|6(?:28\\d{2}|37|6[78]|75\\d|98|8(?:7\\d|8)))\\d{3}|(?:2(?:1[39]|2[0157]|31|[56][14]|7[35]|84)|329)\\d{7}|(?:1(?:3\\d{2}|[4-8]|9\\d)|2(?:0\\d{2}|12|292|[569]\\d)|3(?:[26]|[013459]\\d)|5(?:0|1[2-4]|26|[37]2|5\\d{2}|[689]\\d)|6(?:[39]|[01246]\\d|[78]\\d{2}))\\d{3}|(?:29\\d|39|54)\\d{6}|(?:(?:25|54)83\\d|2582\\d{2}|65[2-8])\\d{2}|(?:4\\d{6,7}|9[2-9]\\d{4,5})",
19708            ,,,"1312345",,,,[3,4]],[,,"(?:7(?:1[2-8]|3[2-9]|7[1-9]|8[2-5])|8644)\\d{6}",,,,"712345678",,,[9,10]],[,,"80(?:[01]\\d|20|8[0-8])\\d{3}",,,,"8001234",,,[7]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"86(?:1[12]|30|55|77|8[368])\\d{6}",,,,"8686123456",,,[10]],"ZW",263,"00","0",,,"0",,,,[[,"([49])(\\d{3})(\\d{2,4})","$1 $2 $3",["4|9[2-9]"],"0$1"],[,"(7\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["7"],"0$1"],[,"(86\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["86[24]"],"0$1"],[,"([2356]\\d{2})(\\d{3,5})","$1 $2",
19709            ["2(?:0[45]|2[278]|[49]8|[78])|3(?:[09]8|17|3[78]|7[1569]|8[37])|5[15][78]|6(?:[29]8|37|[68][78]|75)"],"0$1"],[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|31|[56][14]|7[35]|84)|329"],"0$1"],[,"([1-356]\\d)(\\d{3,5})","$1 $2",["1[3-9]|2[02569]|3[0-69]|5[05689]|6"],"0$1"],[,"([235]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[23]9|54"],"0$1"],[,"([25]\\d{3})(\\d{3,5})","$1 $2",["(?:25|54)8","258[23]|5483"],"0$1"],[,"(8\\d{3})(\\d{6})","$1 $2",["86"],"0$1"],[,"(80\\d)(\\d{4})","$1 $2",["80"],
19710            "0$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],800:[,[,,"\\d{8}",,,,,,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"\\d{8}",,,,"12345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",800,,,,,,,,1,[[,"(\\d{4})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],808:[,[,,"\\d{8}",,,,,,,[8]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"\\d{8}",,,,"12345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
19711            "001",808,,,,,,,,1,[[,"(\\d{4})(\\d{4})","$1 $2"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],870:[,[,,"[35-7]\\d{8}",,,,,,,[9]],[,,,,,,,,,[-1]],[,,"(?:[356]\\d|7[6-8])\\d{7}",,,,"301234567"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",870,,,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],878:[,[,,"1\\d{11}",,,,,,,[12]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,
19712            ,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"10\\d{10}",,,,"101234567890"],"001",878,,,,,,,,1,[[,"(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],881:[,[,,"[67]\\d{8}",,,,,,,[9]],[,,,,,,,,,[-1]],[,,"[67]\\d{8}",,,,"612345678"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",881,,,,,,,,,[[,"(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[67]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
19713            ,,[,,,,,,,,,[-1]]],882:[,[,,"[13]\\d{6,11}",,,,,,,[7,8,9,10,11,12]],[,,,,,,,,,[-1]],[,,"3(?:2\\d{3}|37\\d{2}|4(?:2|7\\d{3}))\\d{4}",,,,"3421234",,,[7,9,10]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15678]|9[0689])\\d{4}|6\\d{5,10})|3(?:45|9\\d{3})\\d{7}",,,,"390123456789"],"001",882,,,,,,,,,[[,"(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],[,"(\\d{2})(\\d{5})","$1 $2",["16|342"]],[,"(\\d{2})(\\d{4})(\\d{4})",
19714            "$1 $2 $3",["34[57]"]],[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["348"]],[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1"]],[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],[,"(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["16|39"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,"348[57]\\d{7}",,,,"34851234567",,,[11]]],883:[,[,,"51\\d{7}(?:\\d{3})?",,,,,,,[9,12]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"51(?:00\\d{5}
vendor: 6,153 bytes, lines 19714-19738
19714(?:\\d{3})?|[13]0\\d{8})",
19715            ,,,"510012345"],"001",883,,,,,,,,1,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["510"]],[,"(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],888:[,[,,"\\d{11}",,,,,,,[11]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",888,,,,,,,,1,[[,"(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,
19716            ,[-1]],[,,"\\d{11}",,,,"12345678901"],,,[,,,,,,,,,[-1]]],979:[,[,,"\\d{9}",,,,,,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,"\\d{9}",,,,"123456789"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"001",979,,,,,,,,1,[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]]};/*
19717 Copyright (C) 2010 The Libphonenumber Authors.
19718 Licensed under the Apache License, Version 2.0 (the "License");
19719 you may not use this file except in compliance with the License.
19720 You may obtain a copy of the License at
19721 http://www.apache.org/licenses/LICENSE-2.0
19722 Unless required by applicable law or agreed to in writing, software
19723 distributed under the License is distributed on an "AS IS" BASIS,
19724 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19725 See the License for the specific language governing permissions and
19726 limitations under the License.
19727*/
19728    function Q(){this.a={}}Q.a=function(){return Q.b?Q.b:Q.b=new Q};
19729    var ya={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9"},Aa={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",
19730        7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9",A:"2",B:"2",C:"2",D:"3",E:"3",F:"3",G:"4",H:"4",I:"4",J:"5",K:"5",L:"5",M:"6",N:"6",O:"6",P:"7",
19731        Q:"7",R:"7",S:"7",T:"8",U:"8",V:"8",W:"9",X:"9",Y:"9",Z:"9"},R=RegExp("^[+\uff0b]+"),Ba=RegExp("([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9])"),Ca=RegExp("[+\uff0b0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]"),Da=/[\\\/] *x/,Ea=RegExp("[^0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9A-Za-z#]+$"),Fa=/(?:.*?[A-Za-z]){3}.*/,Ga=RegExp("(?:;ext=([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})|[ \u00a0\\t,]*(?:e?xt(?:ensi(?:o\u0301?|\u00f3))?n?|\uff45?\uff58\uff54\uff4e?|[;,x\uff58#\uff03~\uff5e]|int|anexo|\uff49\uff4e\uff54)[:\\.\uff0e]?[ \u00a0\\t,-]*([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})#?|[- ]+([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,5})#)$",
19732        "i"),Ha=RegExp("^[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{2}$|^[+\uff0b]*(?:[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e*]*[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]){3,}[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e*A-Za-z0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]*(?:;ext=([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})|[ \u00a0\\t,]*(?:e?xt(?:ensi(?:o\u0301?|\u00f3))?n?|\uff45?\uff58\uff54\uff4e?|[;,x\uff58#\uff03~\uff5e]|int|anexo|\uff49\uff4e\uff54)[:\\.\uff0e]?[ \u00a0\\t,-]*([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})#?|[- ]+([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,5})#)?$",
19733        "i"),Ia=/(\$\d)/;function Ja(a){var b=a.search(Ca);0<=b?(a=a.substring(b),a=a.replace(Ea,""),b=a.search(Da),0<=b&&(a=a.substring(0,b))):a="";return a}function Ka(a){return 2>a.length?!1:S(Ha,a)}function La(a){return S(Fa,a)?Ma(a,Aa):Ma(a,ya)}function Na(a){var b=La(a.toString());a.b="";a.a(b)}function Oa(a){return!!a&&(1!=G(a,9)||-1!=D(a,9)[0])}function Ma(a,b){for(var c=new K,d,e=a.length,f=0;f<e;++f)d=a.charAt(f),d=b[d.toUpperCase()],null!=d&&c.a(d);return c.toString()}
19734    function Pa(a){return null!=a&&isNaN(a)&&a.toUpperCase()in xa}
19735    function Qa(a,b,c){if(0==B(b,2)&&null!=b.a[5]){var d=F(b,5);if(0<d.length)return d}var d=F(b,1),e=T(b);if(0==c)return Ra(d,0,e,"");if(!(d in P))return e;a=U(a,d,Sa(d));b=null!=b.a[3]&&B(b,3).length?3==c?";ext="+B(b,3):null!=a.a[13]?B(a,13)+F(b,3):" ext. "+F(b,3):"";a:{a=D(a,20).length&&2!=c?D(a,20):D(a,19);for(var f,g=a.length,h=0;h<g;++h){f=a[h];var k=G(f,3);if(!k||!e.search(B(f,3,k-1)))if(k=new RegExp(B(f,1)),S(k,e)){a=f;break a}}a=null}a&&(g=a,a=F(g,2),f=new RegExp(B(g,1)),F(g,5),g=F(g,4),e=2==
19736    c&&null!=g&&0<g.length?e.replace(f,a.replace(Ia,g)):e.replace(f,a),3==c&&(e=e.replace(RegExp("^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+"),""),e=e.replace(RegExp("[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+","g"),"-")));return Ra(d,c,e,b)}function U(a,b,c){return"001"==c?V(a,""+b):V(a,c)}
19737    function T(a){if(null==a.a[2])return"";var b=""+B(a,2);return null!=a.a[4]&&B(a,4)&&0<F(a,8)?Array(F(a,8)+1).join("0")+b:b}function Ra(a,b,c,d){switch(b){case 0:return"+"+a+c+d;case 1:return"+"+a+" "+c+d;case 3:return"tel:+"+a+"-"+c+d;default:return c+d}}
19738    function W(a,b){switch(b){case 4:return B(a,5);case 3:return B(a,4);case 1:return B(a,3);case 0:case 2:return B(a,2);case 5:return B(a,6);case 6:return B(a,8);case 7:return B(a,7);case 8:return B(a,21);case 9:return B(a,25);case 10:return B(a,28);default:return B(a,1)}}function Ta(a,b){return X(a,B(b,1))?X(a,B(b,5))?4:X(a,B(b,4))?3:X(a,B(b,6)
19738)?5:X(a,B(b,8))?6:X(a,B(b,7))?7:X(a,B(b,21))?8:X(a,B(b,25))?9:X(a,B(b,28))?10:X(a,B(b,2))?B(b,18)||X(a,B(b,3))?2:0:!B(b,18)&&X(a,B(b,3))?1:-1:-1}
19739    function V(a,b){if(null==b)return null;b=b.toUpperCase();var c=a.a[b];if(!c){c=xa[b];if(!c)return null;c=(new ra).b(N.f(),c);a.a[b]=c}return c}function X(a,b){var c=a.length;return 0<G(b,9)&&-1==x(D(b,9),c)?!1:S(F(b,2),a)}function Ua(a,b){if(!b)return null;var c=F(b,1);if(c=P[c])if(1==c.length)c=c[0];else a:{for(var d=T(b),e,f=c.length,g=0;g<f;g++){e=c[g];var h=V(a,e);if(null!=h.a[23]){if(!d.search(B(h,23))){c=e;break a}}else if(-1!=Ta(d,h)){c=e;break a}}c=null}else c=null;return c}
19740    function Sa(a){return(a=P[a])?a[0]:"ZZ"}function Y(a,b,c,d){var e=W(c,d),f=G(e,9)?D(e,9):D(B(c,1),9),e=D(e,10);if(2==d)if(Oa(W(c,0)))a=W(c,1),Oa(a)&&(f=f.concat(G(a,9)?D(a,9):D(B(c,1),9)),y(f),e.length?(e=e.concat(D(a,10)),y(e)):e=D(a,10));else return Y(a,b,c,1);if(-1==f[0])return 5;b=b.length;if(-1<x(e,b))return 4;c=f[0];return c==b?0:c>b?2:f[f.length-1]<b?3:-1<x(f,b,1)?0:5}
19741    function Va(a,b,c,d,e,f){if(!b.length)return 0;b=new K(b);var g;c&&(g=B(c,11));null==g&&(g="NonMatch");var h=b.toString();if(h.length)if(R.test(h))h=h.replace(R,""),b.b="",b.a(La(h)),g=1;else{h=new RegExp(g);Na(b);g=b.toString();if(g.search(h))g=!1;else{var h=g.match(h)[0].length,k=g.substring(h).match(Ba);k&&null!=k[1]&&0<k[1].length&&"0"==Ma(k[1],ya)?g=!1:(b.b="",b.a(g.substring(h)),g=!0)}g=g?5:20}else g=20;e&&C(f,6,g);if(20!=g){if(2>=b.b.length)throw Error("Phone number too short after IDD");a:{a=
19742        b.toString();if(a.length&&"0"!=a.charAt(0))for(e=a.length,b=1;3>=b&&b<=e;++b)if(c=parseInt(a.substring(0,b),10),c in P){d.a(a.substring(b));d=c;break a}d=0}if(d)return C(f,1,d),d;throw Error("Invalid country calling code");}if(c&&(g=F(c,10),h=""+g,k=b.toString(),!k.lastIndexOf(h,0)&&(h=new K(k.substring(h.length)),k=B(c,1),k=new RegExp(F(k,2)),Wa(h,c,null),h=h.toString(),!S(k,b.toString())&&S(k,h)||3==Y(a,b.toString(),c,-1))))return d.a(h),e&&C(f,6,10),C(f,1,g),g;C(f,1,0);return 0}
19743    function Wa(a,b,c){var d=a.toString(),e=d.length,f=B(b,15);if(e&&null!=f&&f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){var f=new RegExp(F(B(b,1),2)),h=S(f,d),k=e.length-1;b=B(b,16);if(null!=b&&b.length&&null!=e[k]&&e[k].length){if(d=d.replace(g,b),!h||S(f,d))c&&0<k&&c.a(e[1]),a.set(d)}else if(!h||S(f,d.substring(e[0].length)))c&&0<k&&null!=e[k]&&c.a(e[1]),a.set(d.substring(e[0].length))}}}
19744    function Z(a,b,c){if(!Pa(c)&&0<b.length&&"+"!=b.charAt(0))throw Error("Invalid country calling code");return Xa(a,b,c,!0)}
19745    function Xa(a,b,c,d){if(null==b)throw Error("The string supplied did not seem to be a phone number");if(250<b.length)throw Error("The string supplied is too long to be a phone number");var e=new K,f=b.indexOf(";phone-context=");if(0<=f){var g=f+15;if("+"==b.charAt(g)){var h=b.indexOf(";",g);0<h?e.a(b.substring(g,h)):e.a(b.substring(g))}g=b.indexOf("tel:");e.a(b.substring(0<=g?g+4:0,f))}else e.a(Ja(b));f=e.toString();g=f.indexOf(";isub=");0<g&&(e.b="",e.a(f.substring(0,g)));if(!Ka(e.toString()))throw Error("The string supplied did not seem to be a phone number");
19746        f=e.toString();if(!(Pa(c)||null!=f&&0<f.length&&R.test(f)))throw Error("Invalid country calling code");f=new O;d&&C(f,5,b);a:{b=e.toString();g=b.search(Ga);if(0<=g&&Ka(b.substring(0,g)))for(var h=b.match(Ga),k=h.length,q=1;q<k;++q)if(null!=h[q]&&0<h[q].length){e.b="";e.a(b.substring(0,g));b=h[q];break a}b=""}0<b.length&&C(f,3,b);g=V(a,c);b=new K;h=0;k=e.toString();try{h=Va(a,k,g,b,d,f)}catch(z){if("Invalid country calling code"==z.message&&R.test(k)){if(k=k.replace(R,""),h=Va(a,k,g,b,d,f),!h)throw z;
19747        }else throw z;}h?(e=Sa(h),e!=c&&(g=U(a,h,e))):(Na(e),b.a(e.toString()),null!=c?(h=F(g,10),C(f,1,h)):d&&(delete f.a[6],f.b&&delete f.b[6]));if(2>b.b.length)throw Error("The string supplied is too short to be a phone number");g&&(c=new K,e=new K(b.toString()),Wa(e,g,c),a=Y(a,e.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=e,d&&0<c.toString().length&&C(f,7,c.toString())));d=b.toString();a=d.length;if(2>a)throw Error("The string supplied is too short to be a phone number");if(17<a)throw Error("The string supplied is too long to be a phone number");
19748        if(1<d.length&&"0"==d.charAt(0)){C(f,4,!0);for(a=1;a<d.length-1&&"0"==d.charAt(a);)a++;1!=a&&C(f,8,a)}C(f,2,parseInt(d,10));return f}function S(a,b){var c="string"==typeof a?b.match("^(?:"+a+")$"):b.match(a);return c&&c[0].length==b.length?!0:!1};v("intlTelInputUtils",{});v("intlTelInputUtils.formatNumber",function(a,b,c){try{var d=Q.a(),e=Z(d,a,b);return Qa(d,e,"undefined"==typeof c?0:c)}catch(f){return a}});v("intlTelInputUtils.getExampleNumber",function(a,b,c){try{var d=Q.a(),e;a:{if(Pa(a)){var f=W(V(d,a),c);try{if(null!=f.a[6]){var g=B(f,6);e=Xa(d,g,a,!1);break a}}catch(h){}}e=null}return Qa(d,e,b?2:1)}catch(h){return""}});v("intlTelInputUtils.getExtension",function(a,b){try{return B(Z(Q.a(),a,b),3)}catch(c){return""}});
19749    v("intlTelInputUtils.getNumberType",function(a,b){try{var c=Q.a(),d;var e=Z(c,a,b),f=Ua(c,e),g=U(c,F(e,1),f);if(g){var h=T(e);d=Ta(h,g)}else d=-1;return d}catch(k){return-99}});
19750    v("intlTelInputUtils.getValidationError",function(a,b){try{var c=Q.a(),d;var e=Z(c,a,b),f=T(e),g=F(e,1);
19750if(g in P){var h=U(c,g,Sa(g));d=Y(c,f,h,-1)}else d=1;return d}catch(k){return"Invalid country calling code"==k.message?1:"The string supplied did not seem to be a phone number"==k.message?4:"Phone number too short after IDD"==k.message||"The string supplied is too short to be a phone number"==k?2:"The string supplied is too long to be a phone number"==k.message?3:-99}});
19751    v("intlTelInputUtils.isValidNumber",function(a,b){try{var c=Q.a(),d=Z(c,a,b),e;var f=Ua(c,d),g=F(d,1),h=U(c,g,f),k;if(!(k=!h)){var q;if(q="001"!=f){var z,za=V(c,f);if(!za)throw Error("Invalid region code: "+f);z=F(za,10);q=g!=z}k=q}if(k)e=!1;else{var Ya=T(d);e=-1!=Ta(Ya,h)}return e}catch(Za){return!1}});v("intlTelInputUtils.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3});
19752    v("intlTelInputUtils.numberType",{FIXED_LINE:0,MOBILE:1,FIXED_LINE_OR_MOBILE:2,TOLL_FREE:3,PREMIUM_RATE:4,SHARED_COST:5,VOIP:6,PERSONAL_NUMBER:7,PAGER:8,UAN:9,VOICEMAIL:10,UNKNOWN:-1});v("intlTelInputUtils.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,NOT_A_NUMBER:4});})();
19753
19754"use strict";
19755var defaultParent = typeof document !== 'undefined' ? document.body : null;
19756var counterMap = new WeakMap();
19757var uncontrolledNodes = new WeakMap();
19758var markerMap = {};
19759var lockCount = 0;
19760var hideOthers = function (originalTarget, parentNode, markerName) {
19761    if (parentNode === void 0) { parentNode = defaultParent; }
19762    if (markerName === void 0) { markerName = "data-aria-hidden"; }
19763    var targets = Array.isArray(originalTarget) ? originalTarget : [originalTarget];
19764    if (!markerMap[markerName]) {
19765        markerMap[markerName] = new WeakMap();
19766    }
19767    var markerCounter = markerMap[markerName];
19768    var hiddenNodes = [];
19769    var deep = function (parent) {
19770        if (!parent || targets.indexOf(parent) >= 0) {
19771            return;
19772        }
19773        Array.prototype.forEach.call(parent.children, function (node) {
19774            if (targets.some(function (target) { return node.contains(target); })) {
19775                deep(node);
19776            }
19777            else {
19778                var attr = node.getAttribute('aria-hidden');
19779                var alreadyHidden = attr !== null && attr !== 'false';
19780                var counterValue = (counterMap.get(node) || 0) + 1;
19781                var markerValue = (markerCounter.get(node) || 0) + 1;
19782                counterMap.set(node, counterValue);
19783                markerCounter.set(node, markerValue);
19784                hiddenNodes.push(node);
19785                if (counterValue === 1 && alreadyHidden) {
19786                    uncontrolledNodes.set(node, true);
19787                }
19788                if (markerValue === 1) {
19789                    node.setAttribute(markerName, 'true');
19790                }
19791                if (!alreadyHidden) {
19792                    node.setAttribute('aria-hidden', 'true');
19793                }
19794            }
19795        });
19796    };
19797    deep(parentNode);
19798    lockCount++;
19799    return function () {
19800        hiddenNodes.forEach(function (node) {
19801            var counterValue = counterMap.get(node) - 1;
19802            var markerValue = markerCounter.get(node) - 1;
19803            counterMap.set(node, counterValue);
19804            markerCounter.set(node, markerValue);
19805            if (!counterValue) {
19806                if (!uncontrolledNodes.has(node)) {
19807                    node.removeAttribute('aria-hidden');
19808                }
19809                uncontrolledNodes.delete(node);
19810            }
19811            if (!markerValue) {
19812                node.removeAttribute(markerName);
19813            }
19814        });
19815        lockCount--;
19816        if (!lockCount) {
19817            counterMap = new WeakMap();
19818            counterMap = new WeakMap();
19819            uncontrolledNodes = new WeakMap();
19820            markerMap = {};
19821        }
19822    };
19823};
19824
19825(function (global, factory) {
19826  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
19827  typeof define === 'function' && define.amd ? define(factory) :
19828  (global = global || self, global.focusLock = factory());
19829}(this, function () { 'use strict';
19830
19831  var toArray = function toArray(a) {
19832    var ret = Array(a.length);
19833    for (var i = 0; i < a.length; ++i) {
19834      ret[i] = a[i];
19835    }
19836    return ret;
19837  };
19838
19839  var arrayFind = function arrayFind(array, search) {
19840    return array.filter(function (a) {
19841      return a === search;
19842    })[0];
19843  };
19844
19845  var asArray = function asArray(a) {
19846    return Array.isArray(a) ? a : [a];
19847  };
19848
19849  var tabSort = function tabSort(a, b) {
19850    var tabDiff = a.tabIndex - b.tabIndex;
19851    var indexDiff = a.index - b.index;
19852
19853    if (tabDiff) {
19854      if (!a.tabIndex) return 1;
19855      if (!b.tabIndex) return -1;
19856    }
19857
19858    return tabDiff || indexDiff;
19859  };
19860
19861  var orderByTabIndex = function orderByTabIndex(nodes, filterNegative, keepGuards) {
19862    return toArray(nodes).map(function (node, index) {
19863      return {
19864        node: node,
19865        index: index,
19866        tabIndex: keepGuards && node.tabIndex === -1 ? (node.dataset || {}).focusGuard ? 0 : -1 : node.tabIndex
19867      };
19868    }).filter(function (data) {
19869      return !filterNegative || data.tabIndex >= 0;
19870    }).sort(tabSort);
19871  };
19872
19873  var tabbables = ['button:enabled:not([readonly])', 'select:enabled:not([readonly])', 'textarea:enabled:not([readonly])', 'input:enabled:not([readonly])', 'a[href]', 'area[href]', 'iframe', 'object', 'embed', '[tabindex]', '[contenteditable]', '[autofocus]'];
19874
19875  var FOCUS_GROUP = 'data-focus-lock';
19876  var FOCUS_DISABLED = 'data-focus-lock-disabled';
19877  var FOCUS_ALLOW = 'data-no-focus-lock';
19878  var FOCUS_AUTO = 'data-autofocus-inside';
19879
19880  var queryTabbables = tabbables.join(',');
19881  var queryGuardTabbables = queryTabbables + ', [data-focus-guard]';
19882
19883  var getFocusables = function getFocusables(parents, withGuards) {
19884    return parents.reduce(function (acc, parent) {
19885      return acc.concat(
19886      // add all tabbables inside
19887      toArray(parent.querySelectorAll(withGuards ? queryGuardTabbables : queryTabbables)),
19888      // add if node is tabble itself
19889      parent.parentNode ? toArray(parent.parentNode.querySelectorAll(tabbables.join(','))).filter(function (node) {
19890        return node === parent;
19891      }) : []);
19892    }, []);
19893  };
19894
19895  var getParentAutofocusables = function getParentAutofocusables(parent) {
19896    var parentFocus = parent.querySelectorAll('[' + FOCUS_AUTO + ']');
19897    return toArray(parentFocus).map(function (node) {
19898      return getFocusables([node]);
19899    }).reduce(function (acc, nodes) {
19900      return acc.concat(nodes);
19901    }, []);
19902  };
19903
19904  var isElementHidden = function isElementHidden(computedStyle) {
19905    if (!computedStyle || !computedStyle.getPropertyValue) {
19906      return false;
vendor: 10,184 bytes, lines 19907-20225
19907    }
19908    return computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden';
19909  };
19910
19911  var isVisible = function isVisible(node) {
19912    return !node || node === document || !isElementHidden(window.getComputedStyle(node, null)) && isVisible(node.parentNode);
19913  };
19914
19915  var notHiddenInput = function notHiddenInput(node) {
19916    return !((node.tagName === 'INPUT' || node.tagName === 'BUTTON') && (node.type === 'hidden' || node.disabled));
19917  };
19918
19919  var getParents = function getParents(node) {
19920    var parents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
19921
19922    parents.push(node);
19923    if (node.parentNode) {
19924      getParents(node.parentNode, parents);
19925    }
19926    return parents;
19927  };
19928
19929  var getCommonParent = function getCommonParent(nodea, nodeb) {
19930    var parentsA = getParents(nodea);
19931    var parentsB = getParents(nodeb);
19932
19933    for (var i = 0; i < parentsA.length; i += 1) {
19934      var currentParent = parentsA[i];
19935      if (parentsB.indexOf(currentParent) >= 0) {
19936        return currentParent;
19937      }
19938    }
19939    return false;
19940  };
19941
19942  var filterFocusable = function filterFocusable(nodes) {
19943    return toArray(nodes).filter(function (node) {
19944      return isVisible(node);
19945    }).filter(function (node) {
19946      return notHiddenInput(node);
19947    });
19948  };
19949
19950  var getTabbableNodes = function getTabbableNodes(topNodes, withGuards) {
19951    return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards)), true, withGuards);
19952  };
19953
19954  var getAllTabbableNodes = function getAllTabbableNodes(topNodes) {
19955    return orderByTabIndex(filterFocusable(getFocusables(topNodes)), false);
19956  };
19957
19958  var parentAutofocusables = function parentAutofocusables(topNode) {
19959    return filterFocusable(getParentAutofocusables(topNode));
19960  };
19961
19962  var isRadio = function isRadio(node) {
19963    return node.tagName === 'INPUT' && node.type === 'radio';
19964  };
19965
19966  var findSelectedRadio = function findSelectedRadio(node, nodes) {
19967    return nodes.filter(isRadio).filter(function (el) {
19968      return el.name === node.name;
19969    }).filter(function (el) {
19970      return el.checked;
19971    })[0] || node;
19972  };
19973
19974  var pickFirstFocus = function pickFirstFocus(nodes) {
19975    if (nodes[0] && nodes.length > 1) {
19976      if (isRadio(nodes[0]) && nodes[0].name) {
19977        return findSelectedRadio(nodes[0], nodes);
19978      }
19979    }
19980    return nodes[0];
19981  };
19982
19983  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
19984
19985  var filterNested = function filterNested(nodes) {
19986    var l = nodes.length;
19987    for (var i = 0; i < l; i += 1) {
19988      var _loop = function _loop(j) {
19989        if (i !== j) {
19990          if (nodes[i].contains(nodes[j])) {
19991            return {
19992              v: filterNested(nodes.filter(function (x) {
19993                return x !== nodes[j];
19994              }))
19995            };
19996          }
19997        }
19998      };
19999
20000      for (var j = 0; j < l; j += 1) {
20001        var _ret = _loop(j);
20002
20003        if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
20004      }
20005    }
20006    return nodes;
20007  };
20008
20009  var getTopParent = function getTopParent(node) {
20010    return node.parentNode ? getTopParent(node.parentNode) : node;
20011  };
20012
20013  var getAllAffectedNodes = function getAllAffectedNodes(node) {
20014    var nodes = asArray(node);
20015    return nodes.filter(Boolean).reduce(function (acc, currentNode) {
20016      var group = currentNode.getAttribute(FOCUS_GROUP);
20017      acc.push.apply(acc, group ? filterNested(toArray(getTopParent(currentNode).querySelectorAll('[' + FOCUS_GROUP + '="' + group + '"]:not([' + FOCUS_DISABLED + '="disabled"])'))) : [currentNode]);
20018      return acc;
20019    }, []);
20020  };
20021
20022  var findAutoFocused = function findAutoFocused(autoFocusables) {
20023    return function (node) {
20024      return !!node.autofocus || node.dataset && !!node.dataset.autofocus || autoFocusables.indexOf(node) >= 0;
20025    };
20026  };
20027
20028  var newFocus = function newFocus(innerNodes, outerNodes, activeElement, lastNode, autoFocused) {
20029    var cnt = innerNodes.length;
20030    var firstFocus = innerNodes[0];
20031    var lastFocus = innerNodes[cnt - 1];
20032
20033    // focus is inside
20034    if (innerNodes.indexOf(activeElement) >= 0) {
20035      return undefined;
20036    }
20037
20038    var activeIndex = outerNodes.indexOf(activeElement);
20039    var lastIndex = outerNodes.indexOf(lastNode || activeIndex);
20040    var lastNodeInside = innerNodes.indexOf(lastNode);
20041    var indexDiff = activeIndex - lastIndex;
20042    var firstNodeIndex = outerNodes.indexOf(firstFocus);
20043    var lastNodeIndex = outerNodes.indexOf(lastFocus);
20044
20045    // new focus
20046    if (activeIndex === -1 || lastNodeInside === -1) {
20047      return innerNodes.indexOf(autoFocused.length ? pickFirstFocus(autoFocused) : pickFirstFocus(innerNodes));
20048    }
20049    // old focus
20050    if (!indexDiff && lastNodeInside >= 0) {
20051      return lastNodeInside;
20052    }
20053    // jump out
20054    if (indexDiff && Math.abs(indexDiff) > 1) {
20055      return lastNodeInside;
20056    }
20057    // focus above lock
20058    if (activeIndex <= firstNodeIndex) {
20059      return cnt - 1;
20060    }
20061    // focus below lock
20062    if (activeIndex > lastNodeIndex) {
20063      return 0;
20064    }
20065    // index is inside tab order, but outside Lock
20066    if (indexDiff) {
20067      if (Math.abs(indexDiff) > 1) {
20068        return lastNodeInside;
20069      }
20070      return (cnt + lastNodeInside + indexDiff) % cnt;
20071    }
20072    // do nothing
20073    return undefined;
20074  };
20075
20076  var getTopCommonParent = function getTopCommonParent(baseActiveElement, leftEntry, rightEntries) {
20077    var activeElements = asArray(baseActiveElement);
20078    var leftEntries = asArray(leftEntry);
20079    var activeElement = activeElements[0];
20080    var topCommon = null;
20081    leftEntries.filter(Boolean).forEach(function (entry) {
20082      topCommon = getCommonParent(topCommon || entry, entry) || topCommon;
20083      rightEntries.filter(Boolean).forEach(function (subEntry) {
20084        var common = getCommonParent(activeElement, subEntry);
20085        if (common) {
20086          if (!topCommon || common.contains(topCommon)) {
20087            topCommon = common;
20088          } else {
20089            topCommon = getCommonParent(common, topCommon);
20090          }
20091        }
20092      });
20093    });
20094    return topCommon;
20095  };
20096
20097  var allParentAutofocusables = function allParentAutofocusables(entries) {
20098    return entries.reduce(function (acc, node) {
20099      return acc.concat(parentAutofocusables(node));
20100    }, []);
20101  };
20102
20103  var notAGuard = function notAGuard(node) {
20104    return !(node.dataset && node.dataset.focusGuard);
20105  };
20106
20107  var reorderNodes = function reorderNodes(srcNodes, dstNodes) {
20108    return srcNodes.map(function (dnode) {
20109      return dstNodes.find(function (_ref) {
20110        var node = _ref.node;
20111        return dnode === node;
20112      });
20113    }).filter(Boolean);
20114  };
20115
20116  var getFocusMerge = function getFocusMerge(topNode, lastNode) {
20117    var activeElement = document && document.activeElement;
20118    var entries = getAllAffectedNodes(topNode).filter(notAGuard);
20119
20120    var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);
20121
20122    var innerElements = getTabbableNodes(entries).filter(function (_ref5) {
20123      var node = _ref5.node;
20124      return notAGuard(node);
20125    });
20126
20127    if (!innerElements[0]) {
20128      innerElements = getAllTabbableNodes(entries).filter(function (_ref6) {
20129        var node = _ref6.node;
20130        return notAGuard(node);
20131      });
20132      if (!innerElements[0]) {
20133        return undefined;
20134      }
20135    }
20136
20137    var outerNodes = getTabbableNodes([commonParent]).map(function (_ref7) {
20138      var node = _ref7.node;
20139      return node;
20140    });
20141    var orderedInnerElements = reorderNodes(outerNodes, innerElements);
20142    var innerNodes = orderedInnerElements.map(function (_ref8) {
20143      var node = _ref8.node;
20144      return node;
20145    });
20146
20147    var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode, innerNodes.filter(findAutoFocused(allParentAutofocusables(entries))));
20148
20149    if (newId === undefined) {
20150      return newId;
20151    }
20152    return orderedInnerElements[newId];
20153  };
20154
20155  var focusInFrame = function focusInFrame(frame) {
20156    return frame === document.activeElement;
20157  };
20158
20159  var focusInsideIframe = function focusInsideIframe(topNode) {
20160    return !!arrayFind(toArray(topNode.querySelectorAll('iframe')), focusInFrame);
20161  };
20162
20163  var focusInside = function focusInside(topNode) {
20164    var activeElement = document && document.activeElement;
20165
20166    if (!activeElement || activeElement.dataset && activeElement.dataset.focusGuard) {
20167      return false;
20168    }
20169    return getAllAffectedNodes(topNode).reduce(function (result, node) {
20170      return result || node.contains(activeElement) || focusInsideIframe(node);
20171    }, false);
20172  };
20173
20174  var focusIsHidden = function focusIsHidden() {
20175    return document && toArray(document.querySelectorAll('[' + FOCUS_ALLOW + ']')).some(function (node) {
20176      return node.contains(document.activeElement);
20177    });
20178  };
20179
20180  var focusOn = function focusOn(target) {
20181    target.focus();
20182    if (target.contentWindow) {
20183      target.contentWindow.focus();
20184    }
20185  };
20186
20187  var guardCount = 0;
20188  var lockDisabled = false;
20189
20190  var setFocus = (function (topNode, lastNode) {
20191    var focusable = getFocusMerge(topNode, lastNode);
20192
20193    if (lockDisabled) {
20194      return;
20195    }
20196
20197    if (focusable) {
20198      if (guardCount > 2) {
20199        // eslint-disable-next-line no-console
20200        console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' + 'See https://github.com/theKashey/focus-lock/#focus-fighting');
20201        lockDisabled = true;
20202        setTimeout(function () {
20203          lockDisabled = false;
20204        }, 1);
20205        return;
20206      }
20207      guardCount++;
20208      focusOn(focusable.node);
20209      guardCount--;
20210    }
20211  });
20212
20213  var lastActiveTrap = 0;
20214  var lastActiveFocus = null;
20215
20216  var focusOnBody = function focusOnBody() {
20217    return document && document.activeElement === document.body;
20218  };
20219
20220  var isFreeFocus = function isFreeFocus() {
20221    return focusOnBody() || focusIsHidden();
20222  };
20223
20224  var activateTrap = function activateTrap() {
20225    var result = false;
vendor: 19,120 bytes, lines 20226-20394
20226
20227    if (lastActiveTrap) {
20228      var observed = lastActiveTrap;
20229
20230      if (!isFreeFocus()) {
20231        if (observed && !focusInside(observed)) {
20232          result = setFocus(observed, lastActiveFocus);
20233        }
20234
20235        lastActiveFocus = document.activeElement;
20236      }
20237    }
20238
20239    return result;
20240  };
20241
20242  var reducePropsToState = function reducePropsToState(propsList) {
20243    return propsList.filter(function (node) {
20244      return node;
20245    }).slice(-1)[0];
20246  };
20247
20248  var handleStateChangeOnClient = function handleStateChangeOnClient(trap) {
20249    lastActiveTrap = trap;
20250
20251    if (trap) {
20252      activateTrap();
20253    }
20254  };
20255
20256  var instances = [];
20257
20258  var emitChange = function emitChange(event) {
20259    if (handleStateChangeOnClient(reducePropsToState(instances))) {
20260      event && event.preventDefault();
20261      return true;
20262    }
20263
20264    return false;
20265  };
20266
20267  var attachHandler = function attachHandler() {
20268    document.addEventListener('focusin', emitChange);
20269  };
20270
20271  var detachHandler = function detachHandler() {
20272    document.removeEventListener('focusin', emitChange);
20273  };
20274
20275  var focusLock = {
20276    on: function on(domNode) {
20277      if (instances.length === 0) {
20278        attachHandler();
20279      }
20280
20281      if (instances.indexOf(domNode) < 0) {
20282        instances.push(domNode);
20283        emitChange();
20284      }
20285    },
20286    off: function off(domNode) {
20287      instances = instances.filter(function (node) {
20288        return node !== domNode;
20289      });
20290      emitChange();
20291
20292      if (instances.length === 0) {
20293        detachHandler();
20294      }
20295    }
20296  };
20297
20298  return focusLock;
20299
20300}));
20301
20302!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.scrollLock=t():e.scrollLock=t()}(this,function(){return function(l){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return l[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=l,o.c=r,o.d=function(e,t,l){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var l=Object.create(null);if(o.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(l,r,function(e){return t[e]}.bind(null,r));return l},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,l){"use strict";l.r(t);var r=function(e){return Array.isArray(e)?e:[e]},a=function(e){return e instanceof Node},o=function(e,t){if(e&&t){e=e instanceof NodeList?e:[e];for(var l=0;l<e.length&&!0!==t(e[l],l,e.length);l++);}},n=function(e){return console.error("[scroll-lock] ".concat(e))},b=function(e){if(Array.isArray(e))return e.join(", ")},c=function(e){var t=[];return o(e,function(e){return t.push(e)}),t},h=function(e,t){var l=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:document;if(l&&-1!==c(r.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===c(r.querySelectorAll(t)).indexOf(e););return e},v=function(e,t){var l=2<arguments.length&&void 0!==arguments[2]?arguments[2]:document;return-1!==c(l.querySelectorAll(t)).indexOf(e)},i=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},m=function(e){if(e)return!!i(e)||e.scrollTop<=0},S=function(e){if(e){if(i(e))return!0;var t=e.scrollTop;return e.scrollHeight<=t+e.offsetHeight}},y=function(e){if(e)return!!i(e)||e.scrollLeft<=0},k=function(e){if(e){if(i(e))return!0;var t=e.scrollLeft;return e.scrollWidth<=t+e.offsetWidth}};l.d(t,"disablePageScroll",function(){return d}),l.d(t,"enablePageScroll",function(){return s}),l.d(t,"getScrollState",function(){return f}),l.d(t,"clearQueueScrollLocks",function(){return p}),l.d(t,"getTargetScrollBarWidth",function(){return g}),l.d(t,"getCurrentTargetScrollBarWidth",function(){return A}),l.d(t,"getPageScrollBarWidth",function(){return G}),l.d(t,"getCurrentPageScrollBarWidth",function(){return T}),l.d(t,"addScrollableTarget",function(){return L}),l.d(t,"removeScrollableTarget",function(){return W}),l.d(t,"addScrollableSelector",function(){return x}),l.d(t,"removeScrollableSelector",function(){return F}),l.d(t,"addLockableTarget",function(){return Y}),l.d(t,"addLockableSelector",function(){return E}),l.d(t,"setFillGapMethod",function(){return O}),l.d(t,"addFillGapTarget",function(){return P}),l.d(t,"removeFillGapTarget",function(){return j}),l.d(t,"addFillGapSelector",function(){return q}),l.d(t,"removeFillGapSelector",function(){return M}),l.d(t,"refillGaps",function(){return N});var u=["padding","margin","width","max-width","none"],w={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:u[0],startTouchY:0,startTouchX:0},d=function(e){w.queue<=0&&(w.scroll=!1,B(),X()),L(e),w.queue++},s=function(e){0<w.queue&&w.queue--,w.queue<=0&&(w.scroll=!0,C(),Q()),W(e)},f=function(){return w.scroll},p=function(){w.queue=0},g=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(a(e)){var l=e.style.overflowY;t?f()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var r=A(e);return e.style.overflowY=l,r}return 0},A=function(e){if(a(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var l=e.style.borderLeftWidth,r=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var o=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=l,e.style.borderRightWidth=r,o}return 0},G=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return g(document.body,e)},T=function(){return A(document.body)},L=function(e){e&&r(e).map(function(e){o(e,function(e){a(e)?e.setAttribute("data-scroll-lock-scrollable",""):n('"'.concat(e,'" is not a Element.'))})})},W=function(e){e&&r(e).map(function(e){o(e,function(e){a(e)?e.removeAttribute("data-scroll-lock-scrollable"):n('"'.concat(e,'" is not a Element.'))})})},x=function(e){e&&r(e).map(function(e){w.scrollableSelectors.push(e)})},F=function(e){e&&r(e).map(function(t){w.scrollableSelectors=w.scrollableSelectors.filter(function(e){return e!==t})})},Y=function(e){e&&(r(e).map(function(e){o(e,function(e){a(e)?e.setAttribute("data-scroll-lock-lockable",""):n('"'.concat(e,'" is not a Element.'))})}),f()||B())},E=function(e){e&&(r(e).map(function(e){w.lockableSelectors.push(e)}),f()||B(),q(e))},O=function(e){if(e)if(-1!==u.indexOf(e))w.fillGapMethod=e,N();else{var t=u.join(", ");n('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},P=function(e){e&&r(e).map(function(e){o(e,function(e){a(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),w.scroll||H(e)):n('"'.concat(e,'" is not a Element.'))})})},j=function(e){e&&r(e).map(function(e){o(e,function(e){a(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),w.scroll||I(e)):n('"'.concat(e,'" is not a Element.'))})})},q=function(e){e&&r(e).map(function(e){-1===w.fillGapSelectors.indexOf(e)&&(w.fillGapSelectors.push(e),w.scroll||D(e))})},M=function(e){e&&r(e).map(function(t){w.fillGapSelectors=w.fillGapSelectors.filter(function(e){return e!==t}),w.scroll||z(t)})},N=function(){w.scroll||X()},B=function(){var e=b(w.lockableSelectors);K(e)},C=function(){var e=b(w.lockableSelectors);R(e)},K=function(e){var t=document.querySelectorAll(e);o(t,function(e){U(e)})},R=function(e){var t=document.querySelectorAll(e);o(t,function(e){_(e)})},U=function(e){if(a(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},_=function(e){a(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},X=function(){w.fillGapSelectors.map(function(e){D(e)})},Q=function(){w.fillGapSelectors.map(function(e){z(e)})},D=function(e){var t=document.querySelectorAll(e),l=-1!==w.lockableSelectors.indexOf(e);o(t,function(e){H(e,l)})},H=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(a(e)){var l;if(""===e.getAttribute("data-scroll-lock-lockable")||t)l=g(e,!0);else{var r=h(e,b(w.lockableSelectors));l=g(r,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&I(e);var o=window.getComputedStyle(e);if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",w.fillGapMethod),"margin"===w.fillGapMethod){var n=parseFloat(o.marginRight);e.style.marginRight="".concat(n+l,"px")}else if("width"===w.fillGapMethod)e.style.width="calc(100% - ".concat(l,"px)");else if("max-width"===w.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(l,"px)");else if("padding"===w.fillGapMethod){var c=parseFloat(o.paddingRight);e.style.paddingRight="".concat(c+l,"px")}}},z=function(e){var t=document.querySelectorAll(e);o(t,function(e){I(e)})},I=function(e){if(a(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",function(e){N()}),"undefined"!=typeof document&&(document.addEventListener("touchstart",function(e){w.scroll||(w.startTouchY=e.touches[0].clientY,w.startTouchX=e.touches[0].clientX)}),document.addEventListener("touchmove",function(n){if(!w.scroll){var e=w.startTouchY,t=w.startTouchX,l=n.touches[0].clientY,r=n.touches[0].clientX;if(n.touches.length<2){var c=b(w.scrollableSelectors),a=e<l,i=l<e,u=t<r,d=r<t,s=e+3<l,f=l<e-3,p=t+3<r,g=r<t-3;!function e(t){var l=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(t){var r=h(t,c,!1);if(v(t,'input[type="range"]'))return!1;if(l||v(t,'textarea, [contenteditable="true"]')&&h(t,c)||v(t,c)){var o=!1;y(t)&&k(t)?(a&&m(t)||i&&S(t))&&(o=!0):m(t)&&S(t)?(u&&y(t)||d&&k(t))&&(o=!0):(s&&m(t)||f&&S(t)||p&&y(t)||g&&k(t))&&(o=!0),o&&(r?e(r,!0):n.preventDefault())}else e(r)}else n.preventDefault()}(n.target)}}},{passive:!1}),document.addEventListener("touchend",function(e){w.scroll||(w.startTouchY=0,w.startTouchX=0)}));var J={hide:function(e){n('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),d(e)},show:function(e){n('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),s(e)},toggle:function(e){n('"toggle" is deprecated! Do not use it.'),f()?d():s(e)},getState:function(){return n('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),f()},getWidth:function(){return n('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),G()},getCurrentWidth:function(){return n('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),T()},setScrollableTargets:function(e){n('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),L(e)},setFillGapSelectors:function(e){n('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),q(e)},setFillGapTargets:function(e){n('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),P(e)},clearQueue:function(){n('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),p()}},V=function(o){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},t=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.forEach(function(e){var t,l,r;t=o,r=n[l=e],l in t?Object.defineProperty(t,l,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[l]=r})}return o}({disablePageScroll:d,enablePageScroll:s,getScrollState:f,clearQueueScrollLocks:p,getTargetScrollBarWidth:g,getCurrentTargetScrollBarWidth:A,getPageScrollBarWidth:G,getCurrentPageScrollBarWidth:T,addScrollableSelector:x,removeScrollableSelector:F,addScrollableTarget:L,removeScrollableTarget:W,addLockableSelector:E,addLockableTarget:Y,addFillGapSelector:q,removeFillGapSelector:M,addFillGapTarget:P,removeFillGapTarget:j,setFillGapMethod:O,refillGaps:N,_state:w},J);t.default=V}]).default});
20303(function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){
20304/*! TableSorter (FORK) v2.31.3 *//*
20305* Client-side table sorting with ease!
20306* @requires jQuery v1.2.6+
20307*
20308* Copyright (c) 2007 Christian Bach
20309* fork maintained by Rob Garrison
20310*
20311* Examples and original docs at: http://tablesorter.com
20312* Dual licensed under the MIT and GPL licenses:
20313* http://www.opensource.org/licenses/mit-license.php
20314* http://www.gnu.org/licenses/gpl.html
20315*
20316* @type jQuery
20317* @name tablesorter (FORK)
20318* @cat Plugins/Tablesorter
20319* @author Christian Bach - [email protected]
20320* @contributor Rob Garrison - https://github.com/Mottie/tablesorter
20321* @docs (fork) - https://mottie.github.io/tablesorter/docs/
20322*/
20323/*jshint browser:true, jquery:true, unused:false, expr: true */
20324;( function( $ ) {
20325	'use strict';
20326	var ts = $.tablesorter = {
20327
20328		version : '2.31.3',
20329
20330		parsers : [],
20331		widgets : [],
20332		defaults : {
20333
20334			// *** appearance
20335			theme            : 'default',  // adds tablesorter-{theme} to the table for styling
20336			widthFixed       : false,      // adds colgroup to fix widths of columns
20337			showProcessing   : false,      // show an indeterminate timer icon in the header when the table is sorted or filtered.
20338
20339			headerTemplate   : '{content}',// header layout template (HTML ok); {content} = innerHTML, {icon} = <i></i> // class from cssIcon
20340			onRenderTemplate : null,       // function( index, template ) { return template; }, // template is a string
20341			onRenderHeader   : null,       // function( index ) {}, // nothing to return
20342
20343			// *** functionality
20344			cancelSelection  : true,       // prevent text selection in the header
20345			tabIndex         : true,       // add tabindex to header for keyboard accessibility
20346			dateFormat       : 'mmddyyyy', // other options: 'ddmmyyy' or 'yyyymmdd'
20347			sortMultiSortKey : 'shiftKey', // key used to select additional columns
20348			sortResetKey     : 'ctrlKey',  // key used to remove sorting on a column
20349			usNumberFormat   : true,       // false for German '1.234.567,89' or French '1 234 567,89'
20350			delayInit        : false,      // if false, the parsed table contents will not update until the first sort
20351			serverSideSorting: false,      // if true, server-side sorting should be performed because client-side sorting will be disabled, but the ui and events will still be used.
20352			resort           : true,       // default setting to trigger a resort after an 'update', 'addRows', 'updateCell', etc has completed
20353
20354			// *** sort options
20355			headers          : {},         // set sorter, string, empty, locked order, sortInitialOrder, filter, etc.
20356			ignoreCase       : true,       // ignore case while sorting
20357			sortForce        : null,       // column(s) first sorted; always applied
20358			sortList         : [],         // Initial sort order; applied initially; updated when manually sorted
20359			sortAppend       : null,       // column(s) sorted last; always applied
20360			sortStable       : false,      // when sorting two rows with exactly the same content, the original sort order is maintained
20361
20362			sortInitialOrder : 'asc',      // sort direction on first click
20363			sortLocaleCompare: false,      // replace equivalent character (accented characters)
20364			sortReset        : false,      // third click on the header will reset column to default - unsorted
20365			sortRestart      : false,      // restart sort to 'sortInitialOrder' when clicking on previously unsorted columns
20366
20367			emptyTo          : 'bottom',   // sort empty cell to bottom, top, none, zero, emptyMax, emptyMin
20368			stringTo         : 'max',      // sort strings in numerical column as max, min, top, bottom, zero
20369			duplicateSpan    : true,       // colspan cells in the tbody will have duplicated content in the cache for each spanned column
20370			textExtraction   : 'basic',    // text extraction method/function - function( node, table, cellIndex ) {}
20371			textAttribute    : 'data-text',// data-attribute that contains alternate cell text (used in default textExtraction function)
20372			textSorter       : null,       // choose overall or specific column sorter function( a, b, direction, table, columnIndex ) [alt: ts.sortText]
20373			numberSorter     : null,       // choose overall numeric sorter function( a, b, direction, maxColumnValue )
20374
20375			// *** widget options
20376			initWidgets      : true,       // apply widgets on tablesorter initialization
20377			widgetClass      : 'widget-{name}', // table class name template to match to include a widget
20378			widgets          : [],         // method to add widgets, e.g. widgets: ['zebra']
20379			widgetOptions    : {
20380				zebra : [ 'even', 'odd' ]  // zebra widget alternating row class names
20381			},
20382
20383			// *** callbacks
20384			initialized      : null,       // function( table ) {},
20385
20386			// *** extra css class names
20387			tableClass       : '',
20388			cssAsc           : '',
20389			cssDesc          : '',
20390			cssNone          : '',
20391			cssHeader        : '',
20392			cssHeaderRow     : '',
20393			cssProcessing    : '', // processing icon applied to header during sort/filter
20394
vendor: 103,110 bytes, lines 20395-23226
20395			cssChildRow      : 'tablesorter-childRow', // class name indiciating that a row is to be attached to its parent
20396			cssInfoBlock     : 'tablesorter-infoOnly', // don't sort tbody with this class name (only one class name allowed here!)
20397			cssNoSort        : 'tablesorter-noSort',   // class name added to element inside header; clicking on it won't cause a sort
20398			cssIgnoreRow     : 'tablesorter-ignoreRow',// header row to ignore; cells within this row will not be added to c.$headers
20399
20400			cssIcon          : 'tablesorter-icon', // if this class does not exist, the {icon} will not be added from the headerTemplate
20401			cssIconNone      : '', // class name added to the icon when there is no column sort
20402			cssIconAsc       : '', // class name added to the icon when the column has an ascending sort
20403			cssIconDesc      : '', // class name added to the icon when the column has a descending sort
20404			cssIconDisabled  : '', // class name added to the icon when the column has a disabled sort
20405
20406			// *** events
20407			pointerClick     : 'click',
20408			pointerDown      : 'mousedown',
20409			pointerUp        : 'mouseup',
20410
20411			// *** selectors
20412			selectorHeaders  : '> thead th, > thead td',
20413			selectorSort     : 'th, td', // jQuery selector of content within selectorHeaders that is clickable to trigger a sort
20414			selectorRemove   : '.remove-me',
20415
20416			// *** advanced
20417			debug            : false,
20418
20419			// *** Internal variables
20420			headerList: [],
20421			empties: {},
20422			strings: {},
20423			parsers: [],
20424
20425			// *** parser options for validator; values must be falsy!
20426			globalize: 0,
20427			imgAttr: 0
20428
20429			// removed: widgetZebra: { css: ['even', 'odd'] }
20430
20431		},
20432
20433		// internal css classes - these will ALWAYS be added to
20434		// the table and MUST only contain one class name - fixes #381
20435		css : {
20436			table      : 'tablesorter',
20437			cssHasChild: 'tablesorter-hasChildRow',
20438			childRow   : 'tablesorter-childRow',
20439			colgroup   : 'tablesorter-colgroup',
20440			header     : 'tablesorter-header',
20441			headerRow  : 'tablesorter-headerRow',
20442			headerIn   : 'tablesorter-header-inner',
20443			icon       : 'tablesorter-icon',
20444			processing : 'tablesorter-processing',
20445			sortAsc    : 'tablesorter-headerAsc',
20446			sortDesc   : 'tablesorter-headerDesc',
20447			sortNone   : 'tablesorter-headerUnSorted'
20448		},
20449
20450		// labels applied to sortable headers for accessibility (aria) support
20451		language : {
20452			sortAsc      : 'Ascending sort applied, ',
20453			sortDesc     : 'Descending sort applied, ',
20454			sortNone     : 'No sort applied, ',
20455			sortDisabled : 'sorting is disabled',
20456			nextAsc      : 'activate to apply an ascending sort',
20457			nextDesc     : 'activate to apply a descending sort',
20458			nextNone     : 'activate to remove the sort'
20459		},
20460
20461		regex : {
20462			templateContent : /\{content\}/g,
20463			templateIcon    : /\{icon\}/g,
20464			templateName    : /\{name\}/i,
20465			spaces          : /\s+/g,
20466			nonWord         : /\W/g,
20467			formElements    : /(input|select|button|textarea)/i,
20468
20469			// *** sort functions ***
20470			// regex used in natural sort
20471			// chunk/tokenize numbers & letters
20472			chunk  : /(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,
20473			// replace chunks @ ends
20474			chunks : /(^\\0|\\0$)/,
20475			hex    : /^0x[0-9a-f]+$/i,
20476
20477			// *** formatFloat ***
20478			comma                : /,/g,
20479			digitNonUS           : /[\s|\.]/g,
20480			digitNegativeTest    : /^\s*\([.\d]+\)/,
20481			digitNegativeReplace : /^\s*\(([.\d]+)\)/,
20482
20483			// *** isDigit ***
20484			digitTest    : /^[\-+(]?\d+[)]?$/,
20485			digitReplace : /[,.'"\s]/g
20486
20487		},
20488
20489		// digit sort, text location
20490		string : {
20491			max      : 1,
20492			min      : -1,
20493			emptymin : 1,
20494			emptymax : -1,
20495			zero     : 0,
20496			none     : 0,
20497			'null'   : 0,
20498			top      : true,
20499			bottom   : false
20500		},
20501
20502		keyCodes : {
20503			enter : 13
20504		},
20505
20506		// placeholder date parser data (globalize)
20507		dates : {},
20508
20509		// These methods can be applied on table.config instance
20510		instanceMethods : {},
20511
20512		/*
20513		▄█████ ██████ ██████ ██  ██ █████▄
20514		▀█▄    ██▄▄     ██   ██  ██ ██▄▄██
20515		   ▀█▄ ██▀▀     ██   ██  ██ ██▀▀▀
20516		█████▀ ██████   ██   ▀████▀ ██
20517		*/
20518
20519		setup : function( table, c ) {
20520			// if no thead or tbody, or tablesorter is already present, quit
20521			if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
20522				if ( ts.debug(c, 'core') ) {
20523					if ( table.hasInitialized ) {
20524						console.warn( 'Stopping initialization. Tablesorter has already been initialized' );
20525					} else {
20526						console.error( 'Stopping initialization! No table, thead or tbody', table );
20527					}
20528				}
20529				return;
20530			}
20531
20532			var tmp = '',
20533				$table = $( table ),
20534				meta = $.metadata;
20535			// initialization flag
20536			table.hasInitialized = false;
20537			// table is being processed flag
20538			table.isProcessing = true;
20539			// make sure to store the config object
20540			table.config = c;
20541			// save the settings where they read
20542			$.data( table, 'tablesorter', c );
20543			if ( ts.debug(c, 'core') ) {
20544				console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
20545				$.data( table, 'startoveralltimer', new Date() );
20546			}
20547
20548			// removing this in version 3 (only supports jQuery 1.7+)
20549			c.supportsDataObject = ( function( version ) {
20550				version[ 0 ] = parseInt( version[ 0 ], 10 );
20551				return ( version[ 0 ] > 1 ) || ( version[ 0 ] === 1 && parseInt( version[ 1 ], 10 ) >= 4 );
20552			})( $.fn.jquery.split( '.' ) );
20553			// ensure case insensitivity
20554			c.emptyTo = c.emptyTo.toLowerCase();
20555			c.stringTo = c.stringTo.toLowerCase();
20556			c.last = { sortList : [], clickedIndex : -1 };
20557			// add table theme class only if there isn't already one there
20558			if ( !/tablesorter\-/.test( $table.attr( 'class' ) ) ) {
20559				tmp = ( c.theme !== '' ? ' tablesorter-' + c.theme : '' );
20560			}
20561
20562			// give the table a unique id, which will be used in namespace binding
20563			if ( !c.namespace ) {
20564				c.namespace = '.tablesorter' + Math.random().toString( 16 ).slice( 2 );
20565			} else {
20566				// make sure namespace starts with a period & doesn't have weird characters
20567				c.namespace = '.' + c.namespace.replace( ts.regex.nonWord, '' );
20568			}
20569
20570			c.table = table;
20571			c.$table = $table
20572				// add namespace to table to allow bindings on extra elements to target
20573				// the parent table (e.g. parser-input-select)
20574				.addClass( ts.css.table + ' ' + c.tableClass + tmp + ' ' + c.namespace.slice(1) )
20575				.attr( 'role', 'grid' );
20576			c.$headers = $table.find( c.selectorHeaders );
20577
20578			c.$table.children().children( 'tr' ).attr( 'role', 'row' );
20579			c.$tbodies = $table.children( 'tbody:not(.' + c.cssInfoBlock + ')' ).attr({
20580				'aria-live' : 'polite',
20581				'aria-relevant' : 'all'
20582			});
20583			if ( c.$table.children( 'caption' ).length ) {
20584				tmp = c.$table.children( 'caption' )[ 0 ];
20585				if ( !tmp.id ) { tmp.id = c.namespace.slice( 1 ) + 'caption'; }
20586				c.$table.attr( 'aria-labelledby', tmp.id );
20587			}
20588			c.widgetInit = {}; // keep a list of initialized widgets
20589			// change textExtraction via data-attribute
20590			c.textExtraction = c.$table.attr( 'data-text-extraction' ) || c.textExtraction || 'basic';
20591			// build headers
20592			ts.buildHeaders( c );
20593			// fixate columns if the users supplies the fixedWidth option
20594			// do this after theme has been applied
20595			ts.fixColumnWidth( table );
20596			// add widgets from class name
20597			ts.addWidgetFromClass( table );
20598			// add widget options before parsing (e.g. grouping widget has parser settings)
20599			ts.applyWidgetOptions( table );
20600			// try to auto detect column type, and store in tables config
20601			ts.setupParsers( c );
20602			// start total row count at zero
20603			c.totalRows = 0;
20604			// only validate options while debugging. See #1528
20605			if (c.debug) {
20606				ts.validateOptions( c );
20607			}
20608			// build the cache for the tbody cells
20609			// delayInit will delay building the cache until the user starts a sort
20610			if ( !c.delayInit ) { ts.buildCache( c ); }
20611			// bind all header events and methods
20612			ts.bindEvents( table, c.$headers, true );
20613			ts.bindMethods( c );
20614			// get sort list from jQuery data or metadata
20615			// in jQuery < 1.4, an error occurs when calling $table.data()
20616			if ( c.supportsDataObject && typeof $table.data().sortlist !== 'undefined' ) {
20617				c.sortList = $table.data().sortlist;
20618			} else if ( meta && ( $table.metadata() && $table.metadata().sortlist ) ) {
20619				c.sortList = $table.metadata().sortlist;
20620			}
20621			// apply widget init code
20622			ts.applyWidget( table, true );
20623			// if user has supplied a sort list to constructor
20624			if ( c.sortList.length > 0 ) {
20625				// save sortList before any sortAppend is added
20626				c.last.sortList = c.sortList;
20627				ts.sortOn( c, c.sortList, {}, !c.initWidgets );
20628			} else {
20629				ts.setHeadersCss( c );
20630				if ( c.initWidgets ) {
20631					// apply widget format
20632					ts.applyWidget( table, false );
20633				}
20634			}
20635
20636			// show processesing icon
20637			if ( c.showProcessing ) {
20638				$table
20639				.unbind( 'sortBegin' + c.namespace + ' sortEnd' + c.namespace )
20640				.bind( 'sortBegin' + c.namespace + ' sortEnd' + c.namespace, function( e ) {
20641					clearTimeout( c.timerProcessing );
20642					ts.isProcessing( table );
20643					if ( e.type === 'sortBegin' ) {
20644						c.timerProcessing = setTimeout( function() {
20645							ts.isProcessing( table, true );
20646						}, 500 );
20647					}
20648				});
20649			}
20650
20651			// initialized
20652			table.hasInitialized = true;
20653			table.isProcessing = false;
20654			if ( ts.debug(c, 'core') ) {
20655				console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
20656				if ( ts.debug(c, 'core') && console.groupEnd ) { console.groupEnd(); }
20657			}
20658			$table.triggerHandler( 'tablesorter-initialized', table );
20659			if ( typeof c.initialized === 'function' ) {
20660				c.initialized( table );
20661			}
20662		},
20663
20664		bindMethods : function( c ) {
20665			var $table = c.$table,
20666				namespace = c.namespace,
20667				events = ( 'sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete ' +
20668					'sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup ' +
20669					'mouseleave ' ).split( ' ' )
20670					.join( namespace + ' ' );
20671			// apply easy methods that trigger bound events
20672			$table
20673			.unbind( events.replace( ts.regex.spaces, ' ' ) )
20674			.bind( 'sortReset' + namespace, function( e, callback ) {
20675				e.stopPropagation();
20676				// using this.config to ensure functions are getting a non-cached version of the config
20677				ts.sortReset( this.config, function( table ) {
20678					if (table.isApplyingWidgets) {
20679						// multiple triggers in a row... filterReset, then sortReset - see #1361
20680						// wait to update widgets
20681						setTimeout( function() {
20682							ts.applyWidget( table, '', callback );
20683						}, 100 );
20684					} else {
20685						ts.applyWidget( table, '', callback );
20686					}
20687				});
20688			})
20689			.bind( 'updateAll' + namespace, function( e, resort, callback ) {
20690				e.stopPropagation();
20691				ts.updateAll( this.config, resort, callback );
20692			})
20693			.bind( 'update' + namespace + ' updateRows' + namespace, function( e, resort, callback ) {
20694				e.stopPropagation();
20695				ts.update( this.config, resort, callback );
20696			})
20697			.bind( 'updateHeaders' + namespace, function( e, callback ) {
20698				e.stopPropagation();
20699				ts.updateHeaders( this.config, callback );
20700			})
20701			.bind( 'updateCell' + namespace, function( e, cell, resort, callback ) {
20702				e.stopPropagation();
20703				ts.updateCell( this.config, cell, resort, callback );
20704			})
20705			.bind( 'addRows' + namespace, function( e, $row, resort, callback ) {
20706				e.stopPropagation();
20707				ts.addRows( this.config, $row, resort, callback );
20708			})
20709			.bind( 'updateComplete' + namespace, function() {
20710				this.isUpdating = false;
20711			})
20712			.bind( 'sorton' + namespace, function( e, list, callback, init ) {
20713				e.stopPropagation();
20714				ts.sortOn( this.config, list, callback, init );
20715			})
20716			.bind( 'appendCache' + namespace, function( e, callback, init ) {
20717				e.stopPropagation();
20718				ts.appendCache( this.config, init );
20719				if ( $.isFunction( callback ) ) {
20720					callback( this );
20721				}
20722			})
20723			// $tbodies variable is used by the tbody sorting widget
20724			.bind( 'updateCache' + namespace, function( e, callback, $tbodies ) {
20725				e.stopPropagation();
20726				ts.updateCache( this.config, callback, $tbodies );
20727			})
20728			.bind( 'applyWidgetId' + namespace, function( e, id ) {
20729				e.stopPropagation();
20730				ts.applyWidgetId( this, id );
20731			})
20732			.bind( 'applyWidgets' + namespace, function( e, callback ) {
20733				e.stopPropagation();
20734				// apply widgets (false = not initializing)
20735				ts.applyWidget( this, false, callback );
20736			})
20737			.bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) {
20738				e.stopPropagation();
20739				ts.refreshWidgets( this, all, dontapply );
20740			})
20741			.bind( 'removeWidget' + namespace, function( e, name, refreshing ) {
20742				e.stopPropagation();
20743				ts.removeWidget( this, name, refreshing );
20744			})
20745			.bind( 'destroy' + namespace, function( e, removeClasses, callback ) {
20746				e.stopPropagation();
20747				ts.destroy( this, removeClasses, callback );
20748			})
20749			.bind( 'resetToLoadState' + namespace, function( e ) {
20750				e.stopPropagation();
20751				// remove all widgets
20752				ts.removeWidget( this, true, false );
20753				var tmp = $.extend( true, {}, c.originalSettings );
20754				// restore original settings; this clears out current settings, but does not clear
20755				// values saved to storage.
20756				c = $.extend( true, {}, ts.defaults, tmp );
20757				c.originalSettings = tmp;
20758				this.hasInitialized = false;
20759				// setup the entire table again
20760				ts.setup( this, c );
20761			});
20762		},
20763
20764		bindEvents : function( table, $headers, core ) {
20765			table = $( table )[ 0 ];
20766			var tmp,
20767				c = table.config,
20768				namespace = c.namespace,
20769				downTarget = null;
20770			if ( core !== true ) {
20771				$headers.addClass( namespace.slice( 1 ) + '_extra_headers' );
20772				tmp = ts.getClosest( $headers, 'table' );
20773				if ( tmp.length && tmp[ 0 ].nodeName === 'TABLE' && tmp[ 0 ] !== table ) {
20774					$( tmp[ 0 ] ).addClass( namespace.slice( 1 ) + '_extra_table' );
20775				}
20776			}
20777			tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' )
20778				.replace( ts.regex.spaces, ' ' )
20779				.split( ' ' )
20780				.join( namespace + ' ' );
20781			// apply event handling to headers and/or additional headers (stickyheaders, scroller, etc)
20782			$headers
20783			// http://stackoverflow.com/questions/5312849/jquery-find-self;
20784			.find( c.selectorSort )
20785			.add( $headers.filter( c.selectorSort ) )
20786			.unbind( tmp )
20787			.bind( tmp, function( e, external ) {
20788				var $cell, cell, temp,
20789					$target = $( e.target ),
20790					// wrap event type in spaces, so the match doesn't trigger on inner words
20791					type = ' ' + e.type + ' ';
20792				// only recognize left clicks
20793				if ( ( ( e.which || e.button ) !== 1 && !type.match( ' ' + c.pointerClick + ' | sort | keyup ' ) ) ||
20794					// allow pressing enter
20795					( type === ' keyup ' && e.which !== ts.keyCodes.enter ) ||
20796					// allow triggering a click event (e.which is undefined) & ignore physical clicks
20797					( type.match( ' ' + c.pointerClick + ' ' ) && typeof e.which !== 'undefined' ) ) {
20798					return;
20799				}
20800				// ignore mouseup if mousedown wasn't on the same target
20801				if ( type.match( ' ' + c.pointerUp + ' ' ) && downTarget !== e.target && external !== true ) {
20802					return;
20803				}
20804				// set target on mousedown
20805				if ( type.match( ' ' + c.pointerDown + ' ' ) ) {
20806					downTarget = e.target;
20807					// preventDefault needed or jQuery v1.3.2 and older throws an
20808					// "Uncaught TypeError: handler.apply is not a function" error
20809					temp = $target.jquery.split( '.' );
20810					if ( temp[ 0 ] === '1' && temp[ 1 ] < 4 ) { e.preventDefault(); }
20811					return;
20812				}
20813				downTarget = null;
20814				$cell = ts.getClosest( $( this ), '.' + ts.css.header );
20815				// prevent sort being triggered on form elements
20816				if ( ts.regex.formElements.test( e.target.nodeName ) ||
20817					// nosort class name, or elements within a nosort container
20818					$target.hasClass( c.cssNoSort ) || $target.parents( '.' + c.cssNoSort ).length > 0 ||
20819					// disabled cell directly clicked
20820					$cell.hasClass( 'sorter-false' ) ||
20821					// elements within a button
20822					$target.parents( 'button' ).length > 0 ) {
20823					return !c.cancelSelection;
20824				}
20825				if ( c.delayInit && ts.isEmptyObject( c.cache ) ) {
20826					ts.buildCache( c );
20827				}
20828				// use column index from data-attribute or index of current row; fixes #1116
20829				c.last.clickedIndex = $cell.attr( 'data-column' ) || $cell.index();
20830				cell = c.$headerIndexed[ c.last.clickedIndex ][0];
20831				if ( cell && !cell.sortDisabled ) {
20832					ts.initSort( c, cell, e );
20833				}
20834			});
20835			if ( c.cancelSelection ) {
20836				// cancel selection
20837				$headers
20838					.attr( 'unselectable', 'on' )
20839					.bind( 'selectstart', false )
20840					.css({
20841						'user-select' : 'none',
20842						'MozUserSelect' : 'none' // not needed for jQuery 1.8+
20843					});
20844			}
20845		},
20846
20847		buildHeaders : function( c ) {
20848			var $temp, icon, timer, indx;
20849			c.headerList = [];
20850			c.headerContent = [];
20851			c.sortVars = [];
20852			if ( ts.debug(c, 'core') ) {
20853				timer = new Date();
20854			}
20855			// children tr in tfoot - see issue #196 & #547
20856			// don't pass table.config to computeColumnIndex here - widgets (math) pass it to "quickly" index tbody cells
20857			c.columns = ts.computeColumnIndex( c.$table.children( 'thead, tfoot' ).children( 'tr' ) );
20858			// add icon if cssIcon option exists
20859			icon = c.cssIcon ?
20860				'<i class="' + ( c.cssIcon === ts.css.icon ? ts.css.icon : c.cssIcon + ' ' + ts.css.icon ) + '"></i>' :
20861				'';
20862			// redefine c.$headers here in case of an updateAll that replaces or adds an entire header cell - see #683
20863			c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) {
20864				var configHeaders, header, column, template, tmp,
20865					$elem = $( elem );
20866				// ignore cell (don't add it to c.$headers) if row has ignoreRow class
20867				if ( ts.getClosest( $elem, 'tr' ).hasClass( c.cssIgnoreRow ) ) { return; }
20868				// transfer data-column to element if not th/td - #1459
20869				if ( !/(th|td)/i.test( elem.nodeName ) ) {
20870					tmp = ts.getClosest( $elem, 'th, td' );
20871					$elem.attr( 'data-column', tmp.attr( 'data-column' ) );
20872				}
20873				// make sure to get header cell & not column indexed cell
20874				configHeaders = ts.getColumnData( c.table, c.headers, index, true );
20875				// save original header content
20876				c.headerContent[ index ] = $elem.html();
20877				// if headerTemplate is empty, don't reformat the header cell
20878				if ( c.headerTemplate !== '' && !$elem.find( '.' + ts.css.headerIn ).length ) {
20879					// set up header template
20880					template = c.headerTemplate
20881						.replace( ts.regex.templateContent, $elem.html() )
20882						.replace( ts.regex.templateIcon, $elem.find( '.' + ts.css.icon ).length ? '' : icon );
20883					if ( c.onRenderTemplate ) {
20884						header = c.onRenderTemplate.apply( $elem, [ index, template ] );
20885						// only change t if something is returned
20886						if ( header && typeof header === 'string' ) {
20887							template = header;
20888						}
20889					}
20890					$elem.html( '<div class="' + ts.css.headerIn + '">' + template + '</div>' ); // faster than wrapInner
20891				}
20892				if ( c.onRenderHeader ) {
20893					c.onRenderHeader.apply( $elem, [ index, c, c.$table ] );
20894				}
20895				column = parseInt( $elem.attr( 'data-column' ), 10 );
20896				elem.column = column;
20897				tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder );
20898				// this may get updated numerous times if there are multiple rows
20899				c.sortVars[ column ] = {
20900					count : -1, // set to -1 because clicking on the header automatically adds one
20901					order : tmp ?
20902						( c.sortReset ? [ 1, 0, 2 ] : [ 1, 0 ] ) : // desc, asc, unsorted
20903						( c.sortReset ? [ 0, 1, 2 ] : [ 0, 1 ] ),  // asc, desc, unsorted
20904					lockedOrder : false,
20905					sortedBy : ''
20906				};
20907				tmp = ts.getData( $elem, configHeaders, 'lockedOrder' ) || false;
20908				if ( typeof tmp !== 'undefined' && tmp !== false ) {
20909					c.sortVars[ column ].lockedOrder = true;
20910					c.sortVars[ column ].order = ts.getOrder( tmp ) ? [ 1, 1 ] : [ 0, 0 ];
20911				}
20912				// add cell to headerList
20913				c.headerList[ index ] = elem;
20914				$elem.addClass( ts.css.header + ' ' + c.cssHeader );
20915				// add to parent in case there are multiple rows
20916				ts.getClosest( $elem, 'tr' )
20917					.addClass( ts.css.headerRow + ' ' + c.cssHeaderRow )
20918					.attr( 'role', 'row' );
20919				// allow keyboard cursor to focus on element
20920				if ( c.tabIndex ) {
20921					$elem.attr( 'tabindex', 0 );
20922				}
20923				return elem;
20924			}) );
20925			// cache headers per column
20926			c.$headerIndexed = [];
20927			for ( indx = 0; indx < c.columns; indx++ ) {
20928				// colspan in header making a column undefined
20929				if ( ts.isEmptyObject( c.sortVars[ indx ] ) ) {
20930					c.sortVars[ indx ] = {};
20931				}
20932				// Use c.$headers.parent() in case selectorHeaders doesn't point to the th/td
20933				$temp = c.$headers.filter( '[data-column="' + indx + '"]' );
20934				// target sortable column cells, unless there are none, then use non-sortable cells
20935				// .last() added in jQuery 1.4; use .filter(':last') to maintain compatibility with jQuery v1.2.6
20936				c.$headerIndexed[ indx ] = $temp.length ?
20937					$temp.not( '.sorter-false' ).length ?
20938						$temp.not( '.sorter-false' ).filter( ':last' ) :
20939						$temp.filter( ':last' ) :
20940					$();
20941			}
20942			c.$table.find( c.selectorHeaders ).attr({
20943				scope: 'col',
20944				role : 'columnheader'
20945			});
20946			// enable/disable sorting
20947			ts.updateHeader( c );
20948			if ( ts.debug(c, 'core') ) {
20949				console.log( 'Built headers:' + ts.benchmark( timer ) );
20950				console.log( c.$headers );
20951			}
20952		},
20953
20954		// Use it to add a set of methods to table.config which will be available for all tables.
20955		// This should be done before table initialization
20956		addInstanceMethods : function( methods ) {
20957			$.extend( ts.instanceMethods, methods );
20958		},
20959
20960		/*
20961		█████▄ ▄████▄ █████▄ ▄█████ ██████ █████▄ ▄█████
20962		██▄▄██ ██▄▄██ ██▄▄██ ▀█▄    ██▄▄   ██▄▄██ ▀█▄
20963		██▀▀▀  ██▀▀██ ██▀██     ▀█▄ ██▀▀   ██▀██     ▀█▄
20964		██     ██  ██ ██  ██ █████▀ ██████ ██  ██ █████▀
20965		*/
20966		setupParsers : function( c, $tbodies ) {
20967			var rows, list, span, max, colIndex, indx, header, configHeaders,
20968				noParser, parser, extractor, time, tbody, len,
20969				table = c.table,
20970				tbodyIndex = 0,
20971				debug = ts.debug(c, 'core'),
20972				debugOutput = {};
20973			// update table bodies in case we start with an empty table
20974			c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
20975			tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies;
20976			len = tbody.length;
20977			if ( len === 0 ) {
20978				return debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : '';
20979			} else if ( debug ) {
20980				time = new Date();
20981				console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' );
20982			}
20983			list = {
20984				extractors: [],
20985				parsers: []
20986			};
20987			while ( tbodyIndex < len ) {
20988				rows = tbody[ tbodyIndex ].rows;
20989				if ( rows.length ) {
20990					colIndex = 0;
20991					max = c.columns;
20992					for ( indx = 0; indx < max; indx++ ) {
20993						header = c.$headerIndexed[ colIndex ];
20994						if ( header && header.length ) {
20995							// get column indexed table cell; adding true parameter fixes #1362 but
20996							// it would break backwards compatibility...
20997							configHeaders = ts.getColumnData( table, c.headers, colIndex ); // , true );
20998							// get column parser/extractor
20999							extractor = ts.getParserById( ts.getData( header, configHeaders, 'extractor' ) );
21000							parser = ts.getParserById( ts.getData( header, configHeaders, 'sorter' ) );
21001							noParser = ts.getData( header, configHeaders, 'parser' ) === 'false';
21002							// empty cells behaviour - keeping emptyToBottom for backwards compatibility
21003							c.empties[colIndex] = (
21004								ts.getData( header, configHeaders, 'empty' ) ||
21005								c.emptyTo || ( c.emptyToBottom ? 'bottom' : 'top' ) ).toLowerCase();
21006							// text strings behaviour in numerical sorts
21007							c.strings[colIndex] = (
21008								ts.getData( header, configHeaders, 'string' ) ||
21009								c.stringTo ||
21010								'max' ).toLowerCase();
21011							if ( noParser ) {
21012								parser = ts.getParserById( 'no-parser' );
21013							}
21014							if ( !extractor ) {
21015								// For now, maybe detect someday
21016								extractor = false;
21017							}
21018							if ( !parser ) {
21019								parser = ts.detectParserForColumn( c, rows, -1, colIndex );
21020							}
21021							if ( debug ) {
21022								debugOutput[ '(' + colIndex + ') ' + header.text() ] = {
21023									parser : parser.id,
21024									extractor : extractor ? extractor.id : 'none',
21025									string : c.strings[ colIndex ],
21026									empty  : c.empties[ colIndex ]
21027								};
21028							}
21029							list.parsers[ colIndex ] = parser;
21030							list.extractors[ colIndex ] = extractor;
21031							span = header[ 0 ].colSpan - 1;
21032							if ( span > 0 ) {
21033								colIndex += span;
21034								max += span;
21035								while ( span + 1 > 0 ) {
21036									// set colspan columns to use the same parsers & extractors
21037									list.parsers[ colIndex - span ] = parser;
21038									list.extractors[ colIndex - span ] = extractor;
21039									span--;
21040								}
21041							}
21042						}
21043						colIndex++;
21044					}
21045				}
21046				tbodyIndex += ( list.parsers.length ) ? len : 1;
21047			}
21048			if ( debug ) {
21049				if ( !ts.isEmptyObject( debugOutput ) ) {
21050					console[ console.table ? 'table' : 'log' ]( debugOutput );
21051				} else {
21052					console.warn( '  No parsers detected!' );
21053				}
21054				console.log( 'Completed detecting parsers' + ts.benchmark( time ) );
21055				if ( console.groupEnd ) { console.groupEnd(); }
21056			}
21057			c.parsers = list.parsers;
21058			c.extractors = list.extractors;
21059		},
21060
21061		addParser : function( parser ) {
21062			var indx,
21063				len = ts.parsers.length,
21064				add = true;
21065			for ( indx = 0; indx < len; indx++ ) {
21066				if ( ts.parsers[ indx ].id.toLowerCase() === parser.id.toLowerCase() ) {
21067					add = false;
21068				}
21069			}
21070			if ( add ) {
21071				ts.parsers[ ts.parsers.length ] = parser;
21072			}
21073		},
21074
21075		getParserById : function( name ) {
21076			/*jshint eqeqeq:false */ // eslint-disable-next-line eqeqeq
21077			if ( name == 'false' ) { return false; }
21078			var indx,
21079				len = ts.parsers.length;
21080			for ( indx = 0; indx < len; indx++ ) {
21081				if ( ts.parsers[ indx ].id.toLowerCase() === ( name.toString() ).toLowerCase() ) {
21082					return ts.parsers[ indx ];
21083				}
21084			}
21085			return false;
21086		},
21087
21088		detectParserForColumn : function( c, rows, rowIndex, cellIndex ) {
21089			var cur, $node, row,
21090				indx = ts.parsers.length,
21091				node = false,
21092				nodeValue = '',
21093				debug = ts.debug(c, 'core'),
21094				keepLooking = true;
21095			while ( nodeValue === '' && keepLooking ) {
21096				rowIndex++;
21097				row = rows[ rowIndex ];
21098				// stop looking after 50 empty rows
21099				if ( row && rowIndex < 50 ) {
21100					if ( row.className.indexOf( ts.cssIgnoreRow ) < 0 ) {
21101						node = rows[ rowIndex ].cells[ cellIndex ];
21102						nodeValue = ts.getElementText( c, node, cellIndex );
21103						$node = $( node );
21104						if ( debug ) {
21105							console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
21106								cellIndex + ': "' + nodeValue + '"' );
21107						}
21108					}
21109				} else {
21110					keepLooking = false;
21111				}
21112			}
21113			while ( --indx >= 0 ) {
21114				cur = ts.parsers[ indx ];
21115				// ignore the default text parser because it will always be true
21116				if ( cur && cur.id !== 'text' && cur.is && cur.is( nodeValue, c.table, node, $node ) ) {
21117					return cur;
21118				}
21119			}
21120			// nothing found, return the generic parser (text)
21121			return ts.getParserById( 'text' );
21122		},
21123
21124		getElementText : function( c, node, cellIndex ) {
21125			if ( !node ) { return ''; }
21126			var tmp,
21127				extract = c.textExtraction || '',
21128				// node could be a jquery object
21129				// http://jsperf.com/jquery-vs-instanceof-jquery/2
21130				$node = node.jquery ? node : $( node );
21131			if ( typeof extract === 'string' ) {
21132				// check data-attribute first when set to 'basic'; don't use node.innerText - it's really slow!
21133				// http://www.kellegous.com/j/2013/02/27/innertext-vs-textcontent/
21134				if ( extract === 'basic' && typeof ( tmp = $node.attr( c.textAttribute ) ) !== 'undefined' ) {
21135					return $.trim( tmp );
21136				}
21137				return $.trim( node.textContent || $node.text() );
21138			} else {
21139				if ( typeof extract === 'function' ) {
21140					return $.trim( extract( $node[ 0 ], c.table, cellIndex ) );
21141				} else if ( typeof ( tmp = ts.getColumnData( c.table, extract, cellIndex ) ) === 'function' ) {
21142					return $.trim( tmp( $node[ 0 ], c.table, cellIndex ) );
21143				}
21144			}
21145			// fallback
21146			return $.trim( $node[ 0 ].textContent || $node.text() );
21147		},
21148
21149		// centralized function to extract/parse cell contents
21150		getParsedText : function( c, cell, colIndex, txt ) {
21151			if ( typeof txt === 'undefined' ) {
21152				txt = ts.getElementText( c, cell, colIndex );
21153			}
21154			// if no parser, make sure to return the txt
21155			var val = '' + txt,
21156				parser = c.parsers[ colIndex ],
21157				extractor = c.extractors[ colIndex ];
21158			if ( parser ) {
21159				// do extract before parsing, if there is one
21160				if ( extractor && typeof extractor.format === 'function' ) {
21161					txt = extractor.format( txt, c.table, cell, colIndex );
21162				}
21163				// allow parsing if the string is empty, previously parsing would change it to zero,
21164				// in case the parser needs to extract data from the table cell attributes
21165				val = parser.id === 'no-parser' ? '' :
21166					// make sure txt is a string (extractor may have converted it)
21167					parser.format( '' + txt, c.table, cell, colIndex );
21168				if ( c.ignoreCase && typeof val === 'string' ) {
21169					val = val.toLowerCase();
21170				}
21171			}
21172			return val;
21173		},
21174
21175		/*
21176		▄████▄ ▄████▄ ▄████▄ ██  ██ ██████
21177		██  ▀▀ ██▄▄██ ██  ▀▀ ██▄▄██ ██▄▄
21178		██  ▄▄ ██▀▀██ ██  ▄▄ ██▀▀██ ██▀▀
21179		▀████▀ ██  ██ ▀████▀ ██  ██ ██████
21180		*/
21181		buildCache : function( c, callback, $tbodies ) {
21182			var cache, val, txt, rowIndex, colIndex, tbodyIndex, $tbody, $row,
21183				cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
21184				colMax, span, cacheIndex, hasParser, max, len, index,
21185				table = c.table,
21186				parsers = c.parsers,
21187				debug = ts.debug(c, 'core');
21188			// update tbody variable
21189			c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
21190			$tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies,
21191			c.cache = {};
21192			c.totalRows = 0;
21193			// if no parsers found, return - it's an empty table.
21194			if ( !parsers ) {
21195				return debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : '';
21196			}
21197			if ( debug ) {
21198				cacheTime = new Date();
21199			}
21200			// processing icon
21201			if ( c.showProcessing ) {
21202				ts.isProcessing( table, true );
21203			}
21204			for ( tbodyIndex = 0; tbodyIndex < $tbody.length; tbodyIndex++ ) {
21205				colMax = []; // column max value per tbody
21206				cache = c.cache[ tbodyIndex ] = {
21207					normalized: [] // array of normalized row data; last entry contains 'rowData' above
21208					// colMax: #   // added at the end
21209				};
21210
21211				totalRows = ( $tbody[ tbodyIndex ] && $tbody[ tbodyIndex ].rows.length ) || 0;
21212				for ( rowIndex = 0; rowIndex < totalRows; ++rowIndex ) {
21213					rowData = {
21214						// order: original row order #
21215						// $row : jQuery Object[]
21216						child: [], // child row text (filter widget)
21217						raw: []    // original row text
21218					};
21219					/** Add the table data to main data array */
21220					$row = $( $tbody[ tbodyIndex ].rows[ rowIndex ] );
21221					cols = [];
21222					// ignore "remove-me" rows
21223					if ( $row.hasClass( c.selectorRemove.slice(1) ) ) {
21224						continue;
21225					}
21226					// if this is a child row, add it to the last row's children and continue to the next row
21227					// ignore child row class, if it is the first row
21228					if ( $row.hasClass( c.cssChildRow ) && rowIndex !== 0 ) {
21229						len = cache.normalized.length - 1;
21230						prevRowData = cache.normalized[ len ][ c.columns ];
21231						prevRowData.$row = prevRowData.$row.add( $row );
21232						// add 'hasChild' class name to parent row
21233						if ( !$row.prev().hasClass( c.cssChildRow ) ) {
21234							$row.prev().addClass( ts.css.cssHasChild );
21235						}
21236						// save child row content (un-parsed!)
21237						$cells = $row.children( 'th, td' );
21238						len = prevRowData.child.length;
21239						prevRowData.child[ len ] = [];
21240						// child row content does not account for colspans/rowspans; so indexing may be off
21241						cacheIndex = 0;
21242						max = c.columns;
21243						for ( colIndex = 0; colIndex < max; colIndex++ ) {
21244							cell = $cells[ colIndex ];
21245							if ( cell ) {
21246								prevRowData.child[ len ][ colIndex ] = ts.getParsedText( c, cell, colIndex );
21247								span = $cells[ colIndex ].colSpan - 1;
21248								if ( span > 0 ) {
21249									cacheIndex += span;
21250									max += span;
21251								}
21252							}
21253							cacheIndex++;
21254						}
21255						// go to the next for loop
21256						continue;
21257					}
21258					rowData.$row = $row;
21259					rowData.order = rowIndex; // add original row position to rowCache
21260					cacheIndex = 0;
21261					max = c.columns;
21262					for ( colIndex = 0; colIndex < max; ++colIndex ) {
21263						cell = $row[ 0 ].cells[ colIndex ];
21264						if ( cell && cacheIndex < c.columns ) {
21265							hasParser = typeof parsers[ cacheIndex ] !== 'undefined';
21266							if ( !hasParser && debug ) {
21267								console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
21268									'; cell containing: "' + $(cell).text() + '"; does it have a header?' );
21269							}
21270							val = ts.getElementText( c, cell, cacheIndex );
21271							rowData.raw[ cacheIndex ] = val; // save original row text
21272							// save raw column text even if there is no parser set
21273							txt = ts.getParsedText( c, cell, cacheIndex, val );
21274							cols[ cacheIndex ] = txt;
21275							if ( hasParser && ( parsers[ cacheIndex ].type || '' ).toLowerCase() === 'numeric' ) {
21276								// determine column max value (ignore sign)
21277								colMax[ cacheIndex ] = Math.max( Math.abs( txt ) || 0, colMax[ cacheIndex ] || 0 );
21278							}
21279							// allow colSpan in tbody
21280							span = cell.colSpan - 1;
21281							if ( span > 0 ) {
21282								index = 0;
21283								while ( index <= span ) {
21284									// duplicate text (or not) to spanned columns
21285									// instead of setting duplicate span to empty string, use textExtraction to try to get a value
21286									// see http://stackoverflow.com/q/36449711/145346
21287									txt = c.duplicateSpan || index === 0 ?
21288										txt :
21289										typeof c.textExtraction !== 'string' ?
21290											ts.getElementText( c, cell, cacheIndex + index ) || '' :
21291											'';
21292									rowData.raw[ cacheIndex + index ] = txt;
21293									cols[ cacheIndex + index ] = txt;
21294									index++;
21295								}
21296								cacheIndex += span;
21297								max += span;
21298							}
21299						}
21300						cacheIndex++;
21301					}
21302					// ensure rowData is always in the same location (after the last column)
21303					cols[ c.columns ] = rowData;
21304					cache.normalized[ cache.normalized.length ] = cols;
21305				}
21306				cache.colMax = colMax;
21307				// total up rows, not including child rows
21308				c.totalRows += cache.normalized.length;
21309
21310			}
21311			if ( c.showProcessing ) {
21312				ts.isProcessing( table ); // remove processing icon
21313			}
21314			if ( debug ) {
21315				len = Math.min( 5, c.cache[ 0 ].normalized.length );
21316				console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
21317					' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' +
21318					ts.benchmark( cacheTime ) );
21319				val = {};
21320				for ( colIndex = 0; colIndex < c.columns; colIndex++ ) {
21321					for ( cacheIndex = 0; cacheIndex < len; cacheIndex++ ) {
21322						if ( !val[ 'row: ' + cacheIndex ] ) {
21323							val[ 'row: ' + cacheIndex ] = {};
21324						}
21325						val[ 'row: ' + cacheIndex ][ c.$headerIndexed[ colIndex ].text() ] =
21326							c.cache[ 0 ].normalized[ cacheIndex ][ colIndex ];
21327					}
21328				}
21329				console[ console.table ? 'table' : 'log' ]( val );
21330				if ( console.groupEnd ) { console.groupEnd(); }
21331			}
21332			if ( $.isFunction( callback ) ) {
21333				callback( table );
21334			}
21335		},
21336
21337		getColumnText : function( table, column, callback, rowFilter ) {
21338			table = $( table )[0];
21339			var tbodyIndex, rowIndex, cache, row, tbodyLen, rowLen, raw, parsed, $cell, result,
21340				hasCallback = typeof callback === 'function',
21341				allColumns = column === 'all',
21342				data = { raw : [], parsed: [], $cell: [] },
21343				c = table.config;
21344			if ( ts.isEmptyObject( c ) ) {
21345				if ( ts.debug(c, 'core') ) {
21346					console.warn( 'No cache found - aborting getColumnText function!' );
21347				}
21348			} else {
21349				tbodyLen = c.$tbodies.length;
21350				for ( tbodyIndex = 0; tbodyIndex < tbodyLen; tbodyIndex++ ) {
21351					cache = c.cache[ tbodyIndex ].normalized;
21352					rowLen = cache.length;
21353					for ( rowIndex = 0; rowIndex < rowLen; rowIndex++ ) {
21354						row = cache[ rowIndex ];
21355						if ( rowFilter && !row[ c.columns ].$row.is( rowFilter ) ) {
21356							continue;
21357						}
21358						result = true;
21359						parsed = ( allColumns ) ? row.slice( 0, c.columns ) : row[ column ];
21360						row = row[ c.columns ];
21361						raw = ( allColumns ) ? row.raw : row.raw[ column ];
21362						$cell = ( allColumns ) ? row.$row.children() : row.$row.children().eq( column );
21363						if ( hasCallback ) {
21364							result = callback({
21365								tbodyIndex : tbodyIndex,
21366								rowIndex : rowIndex,
21367								parsed : parsed,
21368								raw : raw,
21369								$row : row.$row,
21370								$cell : $cell
21371							});
21372						}
21373						if ( result !== false ) {
21374							data.parsed[ data.parsed.length ] = parsed;
21375							data.raw[ data.raw.length ] = raw;
21376							data.$cell[ data.$cell.length ] = $cell;
21377						}
21378					}
21379				}
21380				// return everything
21381				return data;
21382			}
21383		},
21384
21385		/*
21386		██  ██ █████▄ █████▄ ▄████▄ ██████ ██████
21387		██  ██ ██▄▄██ ██  ██ ██▄▄██   ██   ██▄▄
21388		██  ██ ██▀▀▀  ██  ██ ██▀▀██   ██   ██▀▀
21389		▀████▀ ██     █████▀ ██  ██   ██   ██████
21390		*/
21391		setHeadersCss : function( c ) {
21392			var indx, column,
21393				list = c.sortList,
21394				len = list.length,
21395				none = ts.css.sortNone + ' ' + c.cssNone,
21396				css = [ ts.css.sortAsc + ' ' + c.cssAsc, ts.css.sortDesc + ' ' + c.cssDesc ],
21397				cssIcon = [ c.cssIconAsc, c.cssIconDesc, c.cssIconNone ],
21398				aria = [ 'ascending', 'descending' ],
21399				updateColumnSort = function($el, index) {
21400					$el
21401						.removeClass( none )
21402						.addClass( css[ index ] )
21403						.attr( 'aria-sort', aria[ index ] )
21404						.find( '.' + ts.css.icon )
21405						.removeClass( cssIcon[ 2 ] )
21406						.addClass( cssIcon[ index ] );
21407				},
21408				// find the footer
21409				$extras = c.$table
21410					.find( 'tfoot tr' )
21411					.children( 'td, th' )
21412					.add( $( c.namespace + '_extra_headers' ) )
21413					.removeClass( css.join( ' ' ) ),
21414				// remove all header information
21415				$sorted = c.$headers
21416					.add( $( 'thead ' + c.namespace + '_extra_headers' ) )
21417					.removeClass( css.join( ' ' ) )
21418					.addClass( none )
21419					.attr( 'aria-sort', 'none' )
21420					.find( '.' + ts.css.icon )
21421					.removeClass( cssIcon.join( ' ' ) )
21422					.end();
21423			// add css none to all sortable headers
21424			$sorted
21425				.not( '.sorter-false' )
21426				.find( '.' + ts.css.icon )
21427				.addClass( cssIcon[ 2 ] );
21428			// add disabled css icon class
21429			if ( c.cssIconDisabled ) {
21430				$sorted
21431					.filter( '.sorter-false' )
21432					.find( '.' + ts.css.icon )
21433					.addClass( c.cssIconDisabled );
21434			}
21435			for ( indx = 0; indx < len; indx++ ) {
21436				// direction = 2 means reset!
21437				if ( list[ indx ][ 1 ] !== 2 ) {
21438					// multicolumn sorting updating - see #1005
21439					// .not(function() {}) needs jQuery 1.4
21440					// filter(function(i, el) {}) <- el is undefined in jQuery v1.2.6
21441					$sorted = c.$headers.filter( function( i ) {
21442						// only include headers that are in the sortList (this includes colspans)
21443						var include = true,
21444							$el = c.$headers.eq( i ),
21445							col = parseInt( $el.attr( 'data-column' ), 10 ),
21446							end = col + ts.getClosest( $el, 'th, td' )[0].colSpan;
21447						for ( ; col < end; col++ ) {
21448							include = include ? include || ts.isValueInArray( col, c.sortList ) > -1 : false;
21449						}
21450						return include;
21451					});
21452
21453					// choose the :last in case there are nested columns
21454					$sorted = $sorted
21455						.not( '.sorter-false' )
21456						.filter( '[data-column="' + list[ indx ][ 0 ] + '"]' + ( len === 1 ? ':last' : '' ) );
21457					if ( $sorted.length ) {
21458						for ( column = 0; column < $sorted.length; column++ ) {
21459							if ( !$sorted[ column ].sortDisabled ) {
21460								updateColumnSort( $sorted.eq( column ), list[ indx ][ 1 ] );
21461							}
21462						}
21463					}
21464					// add sorted class to footer & extra headers, if they exist
21465					if ( $extras.length ) {
21466						updateColumnSort( $extras.filter( '[data-column="' + list[ indx ][ 0 ] + '"]' ), list[ indx ][ 1 ] );
21467					}
21468				}
21469			}
21470			// add verbose aria labels
21471			len = c.$headers.length;
21472			for ( indx = 0; indx < len; indx++ ) {
21473				ts.setColumnAriaLabel( c, c.$headers.eq( indx ) );
21474			}
21475		},
21476
21477		getClosest : function( $el, selector ) {
21478			// jQuery v1.2.6 doesn't have closest()
21479			if ( $.fn.closest ) {
21480				return $el.closest( selector );
21481			}
21482			return $el.is( selector ) ?
21483				$el :
21484				$el.parents( selector ).filter( ':first' );
21485		},
21486
21487		// nextSort (optional), lets you disable next sort text
21488		setColumnAriaLabel : function( c, $header, nextSort ) {
21489			if ( $header.length ) {
21490				var column = parseInt( $header.attr( 'data-column' ), 10 ),
21491					vars = c.sortVars[ column ],
21492					tmp = $header.hasClass( ts.css.sortAsc ) ?
21493						'sortAsc' :
21494						$header.hasClass( ts.css.sortDesc ) ? 'sortDesc' : 'sortNone',
21495					txt = $.trim( $header.text() ) + ': ' + ts.language[ tmp ];
21496				if ( $header.hasClass( 'sorter-false' ) || nextSort === false ) {
21497					txt += ts.language.sortDisabled;
21498				} else {
21499					tmp = ( vars.count + 1 ) % vars.order.length;
21500					nextSort = vars.order[ tmp ];
21501					// if nextSort
21502					txt += ts.language[ nextSort === 0 ? 'nextAsc' : nextSort === 1 ? 'nextDesc' : 'nextNone' ];
21503				}
21504				$header.attr( 'aria-label', txt );
21505				if (vars.sortedBy) {
21506					$header.attr( 'data-sortedBy', vars.sortedBy );
21507				} else {
21508					$header.removeAttr('data-sortedBy');
21509				}
21510			}
21511		},
21512
21513		updateHeader : function( c ) {
21514			var index, isDisabled, $header, col,
21515				table = c.table,
21516				len = c.$headers.length;
21517			for ( index = 0; index < len; index++ ) {
21518				$header = c.$headers.eq( index );
21519				col = ts.getColumnData( table, c.headers, index, true );
21520				// add 'sorter-false' class if 'parser-false' is set
21521				isDisabled = ts.getData( $header, col, 'sorter' ) === 'false' || ts.getData( $header, col, 'parser' ) === 'false';
21522				ts.setColumnSort( c, $header, isDisabled );
21523			}
21524		},
21525
21526		setColumnSort : function( c, $header, isDisabled ) {
21527			var id = c.table.id;
21528			$header[ 0 ].sortDisabled = isDisabled;
21529			$header[ isDisabled ? 'addClass' : 'removeClass' ]( 'sorter-false' )
21530				.attr( 'aria-disabled', '' + isDisabled );
21531			// disable tab index on disabled cells
21532			if ( c.tabIndex ) {
21533				if ( isDisabled ) {
21534					$header.removeAttr( 'tabindex' );
21535				} else {
21536					$header.attr( 'tabindex', '0' );
21537				}
21538			}
21539			// aria-controls - requires table ID
21540			if ( id ) {
21541				if ( isDisabled ) {
21542					$header.removeAttr( 'aria-controls' );
21543				} else {
21544					$header.attr( 'aria-controls', id );
21545				}
21546			}
21547		},
21548
21549		updateHeaderSortCount : function( c, list ) {
21550			var col, dir, group, indx, primary, temp, val, order,
21551				sortList = list || c.sortList,
21552				len = sortList.length;
21553			c.sortList = [];
21554			for ( indx = 0; indx < len; indx++ ) {
21555				val = sortList[ indx ];
21556				// ensure all sortList values are numeric - fixes #127
21557				col = parseInt( val[ 0 ], 10 );
21558				// prevents error if sorton array is wrong
21559				if ( col < c.columns ) {
21560
21561					// set order if not already defined - due to colspan header without associated header cell
21562					// adding this check prevents a javascript error
21563					if ( !c.sortVars[ col ].order ) {
21564						if ( ts.getOrder( c.sortInitialOrder ) ) {
21565							order = c.sortReset ? [ 1, 0, 2 ] : [ 1, 0 ];
21566						} else {
21567							order = c.sortReset ? [ 0, 1, 2 ] : [ 0, 1 ];
21568						}
21569						c.sortVars[ col ].order = order;
21570						c.sortVars[ col ].count = 0;
21571					}
21572
21573					order = c.sortVars[ col ].order;
21574					dir = ( '' + val[ 1 ] ).match( /^(1|d|s|o|n)/ );
21575					dir = dir ? dir[ 0 ] : '';
21576					// 0/(a)sc (default), 1/(d)esc, (s)ame, (o)pposite, (n)ext
21577					switch ( dir ) {
21578						case '1' : case 'd' : // descending
21579							dir = 1;
21580							break;
21581						case 's' : // same direction (as primary column)
21582							// if primary sort is set to 's', make it ascending
21583							dir = primary || 0;
21584							break;
21585						case 'o' :
21586							temp = order[ ( primary || 0 ) % order.length ];
21587							// opposite of primary column; but resets if primary resets
21588							dir = temp === 0 ? 1 : temp === 1 ? 0 : 2;
21589							break;
21590						case 'n' :
21591							dir = order[ ( ++c.sortVars[ col ].count ) % order.length ];
21592							break;
21593						default : // ascending
21594							dir = 0;
21595							break;
21596					}
21597					primary = indx === 0 ? dir : primary;
21598					group = [ col, parseInt( dir, 10 ) || 0 ];
21599					c.sortList[ c.sortList.length ] = group;
21600					dir = $.inArray( group[ 1 ], order ); // fixes issue #167
21601					c.sortVars[ col ].count = dir >= 0 ? dir : group[ 1 ] % order.length;
21602				}
21603			}
21604		},
21605
21606		updateAll : function( c, resort, callback ) {
21607			var table = c.table;
21608			table.isUpdating = true;
21609			ts.refreshWidgets( table, true, true );
21610			ts.buildHeaders( c );
21611			ts.bindEvents( table, c.$headers, true );
21612			ts.bindMethods( c );
21613			ts.commonUpdate( c, resort, callback );
21614		},
21615
21616		update : function( c, resort, callback ) {
21617			var table = c.table;
21618			table.isUpdating = true;
21619			// update sorting (if enabled/disabled)
21620			ts.updateHeader( c );
21621			ts.commonUpdate( c, resort, callback );
21622		},
21623
21624		// simple header update - see #989
21625		updateHeaders : function( c, callback ) {
21626			c.table.isUpdating = true;
21627			ts.buildHeaders( c );
21628			ts.bindEvents( c.table, c.$headers, true );
21629			ts.resortComplete( c, callback );
21630		},
21631
21632		updateCell : function( c, cell, resort, callback ) {
21633			// updateCell for child rows is a mess - we'll ignore them for now
21634			// eventually I'll break out the "update" row cache code to make everything consistent
21635			if ( $( cell ).closest( 'tr' ).hasClass( c.cssChildRow ) ) {
21636				console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead');
21637				return;
21638			}
21639			if ( ts.isEmptyObject( c.cache ) ) {
21640				// empty table, do an update instead - fixes #1099
21641				ts.updateHeader( c );
21642				ts.commonUpdate( c, resort, callback );
21643				return;
21644			}
21645			c.table.isUpdating = true;
21646			c.$table.find( c.selectorRemove ).remove();
21647			// get position from the dom
21648			var tmp, indx, row, icell, cache, len,
21649				$tbodies = c.$tbodies,
21650				$cell = $( cell ),
21651				// update cache - format: function( s, table, cell, cellIndex )
21652				// no closest in jQuery v1.2.6
21653				tbodyIndex = $tbodies.index( ts.getClosest( $cell, 'tbody' ) ),
21654				tbcache = c.cache[ tbodyIndex ],
21655				$row = ts.getClosest( $cell, 'tr' );
21656			cell = $cell[ 0 ]; // in case cell is a jQuery object
21657			// tbody may not exist if update is initialized while tbody is removed for processing
21658			if ( $tbodies.length && tbodyIndex >= 0 ) {
21659				row = $tbodies.eq( tbodyIndex ).find( 'tr' ).not( '.' + c.cssChildRow ).index( $row );
21660				cache = tbcache.normalized[ row ];
21661				len = $row[ 0 ].cells.length;
21662				if ( len !== c.columns ) {
21663					// colspan in here somewhere!
21664					icell = 0;
21665					tmp = false;
21666					for ( indx = 0; indx < len; indx++ ) {
21667						if ( !tmp && $row[ 0 ].cells[ indx ] !== cell ) {
21668							icell += $row[ 0 ].cells[ indx ].colSpan;
21669						} else {
21670							tmp = true;
21671						}
21672					}
21673				} else {
21674					icell = $cell.index();
21675				}
21676				tmp = ts.getElementText( c, cell, icell ); // raw
21677				cache[ c.columns ].raw[ icell ] = tmp;
21678				tmp = ts.getParsedText( c, cell, icell, tmp );
21679				cache[ icell ] = tmp; // parsed
21680				if ( ( c.parsers[ icell ].type || '' ).toLowerCase() === 'numeric' ) {
21681					// update column max value (ignore sign)
21682					tbcache.colMax[ icell ] = Math.max( Math.abs( tmp ) || 0, tbcache.colMax[ icell ] || 0 );
21683				}
21684				tmp = resort !== 'undefined' ? resort : c.resort;
21685				if ( tmp !== false ) {
21686					// widgets will be reapplied
21687					ts.checkResort( c, tmp, callback );
21688				} else {
21689					// don't reapply widgets is resort is false, just in case it causes
21690					// problems with element focus
21691					ts.resortComplete( c, callback );
21692				}
21693			} else {
21694				if ( ts.debug(c, 'core') ) {
21695					console.error( 'updateCell aborted, tbody missing or not within the indicated table' );
21696				}
21697				c.table.isUpdating = false;
21698			}
21699		},
21700
21701		addRows : function( c, $row, resort, callback ) {
21702			var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len, order,
21703				cacheIndex, rowData, cells, cell, span,
21704				// allow passing a row string if only one non-info tbody exists in the table
21705				valid = typeof $row === 'string' && c.$tbodies.length === 1 && /<tr/.test( $row || '' ),
21706				table = c.table;
21707			if ( valid ) {
21708				$row = $( $row );
21709				c.$tbodies.append( $row );
21710			} else if (
21711				!$row ||
21712				// row is a jQuery object?
21713				!( $row instanceof $ ) ||
21714				// row contained in the table?
21715				( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
21716			) {
21717				if ( ts.debug(c, 'core') ) {
21718					console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
21719						'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
21720				}
21721				return false;
21722			}
21723			table.isUpdating = true;
21724			if ( ts.isEmptyObject( c.cache ) ) {
21725				// empty table, do an update instead - fixes #450
21726				ts.updateHeader( c );
21727				ts.commonUpdate( c, resort, callback );
21728			} else {
21729				rows = $row.filter( 'tr' ).attr( 'role', 'row' ).length;
21730				tbodyIndex = c.$tbodies.index( $row.parents( 'tbody' ).filter( ':first' ) );
21731				// fixes adding rows to an empty table - see issue #179
21732				if ( !( c.parsers && c.parsers.length ) ) {
21733					ts.setupParsers( c );
21734				}
21735				// add each row
21736				for ( rowIndex = 0; rowIndex < rows; rowIndex++ ) {
21737					cacheIndex = 0;
21738					len = $row[ rowIndex ].cells.length;
21739					order = c.cache[ tbodyIndex ].normalized.length;
21740					cells = [];
21741					rowData = {
21742						child : [],
21743						raw : [],
21744						$row : $row.eq( rowIndex ),
21745						order : order
21746					};
21747					// add each cell
21748					for ( cellIndex = 0; cellIndex < len; cellIndex++ ) {
21749						cell = $row[ rowIndex ].cells[ cellIndex ];
21750						txt = ts.getElementText( c, cell, cacheIndex );
21751						rowData.raw[ cacheIndex ] = txt;
21752						val = ts.getParsedText( c, cell, cacheIndex, txt );
21753						cells[ cacheIndex ] = val;
21754						if ( ( c.parsers[ cacheIndex ].type || '' ).toLowerCase() === 'numeric' ) {
21755							// update column max value (ignore sign)
21756							c.cache[ tbodyIndex ].colMax[ cacheIndex ] =
21757								Math.max( Math.abs( val ) || 0, c.cache[ tbodyIndex ].colMax[ cacheIndex ] || 0 );
21758						}
21759						span = cell.colSpan - 1;
21760						if ( span > 0 ) {
21761							cacheIndex += span;
21762						}
21763						cacheIndex++;
21764					}
21765					// add the row data to the end
21766					cells[ c.columns ] = rowData;
21767					// update cache
21768					c.cache[ tbodyIndex ].normalized[ order ] = cells;
21769				}
21770				// resort using current settings
21771				ts.checkResort( c, resort, callback );
21772			}
21773		},
21774
21775		updateCache : function( c, callback, $tbodies ) {
21776			// rebuild parsers
21777			if ( !( c.parsers && c.parsers.length ) ) {
21778				ts.setupParsers( c, $tbodies );
21779			}
21780			// rebuild the cache map
21781			ts.buildCache( c, callback, $tbodies );
21782		},
21783
21784		// init flag (true) used by pager plugin to prevent widget application
21785		// renamed from appendToTable
21786		appendCache : function( c, init ) {
21787			var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
21788				table = c.table,
21789				$tbodies = c.$tbodies,
21790				rows = [],
21791				cache = c.cache;
21792			// empty table - fixes #206/#346
21793			if ( ts.isEmptyObject( cache ) ) {
21794				// run pager appender in case the table was just emptied
21795				return c.appender ? c.appender( table, rows ) :
21796					table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532
21797			}
21798			if ( ts.debug(c, 'core') ) {
21799				appendTime = new Date();
21800			}
21801			for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
21802				$tbody = $tbodies.eq( tbodyIndex );
21803				if ( $tbody.length ) {
21804					// detach tbody for manipulation
21805					$curTbody = ts.processTbody( table, $tbody, true );
21806					parsed = cache[ tbodyIndex ].normalized;
21807					totalRows = parsed.length;
21808					for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
21809						rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
21810						// removeRows used by the pager plugin; don't render if using ajax - fixes #411
21811						if ( !c.appender || ( c.pager && !c.pager.removeRows && !c.pager.ajax ) ) {
21812							$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
21813						}
21814					}
21815					// restore tbody
21816					ts.processTbody( table, $curTbody, false );
21817				}
21818			}
21819			if ( c.appender ) {
21820				c.appender( table, rows );
21821			}
21822			if ( ts.debug(c, 'core') ) {
21823				console.log( 'Rebuilt table' + ts.benchmark( appendTime ) );
21824			}
21825			// apply table widgets; but not before ajax completes
21826			if ( !init && !c.appender ) {
21827				ts.applyWidget( table );
21828			}
21829			if ( table.isUpdating ) {
21830				c.$table.triggerHandler( 'updateComplete', table );
21831			}
21832		},
21833
21834		commonUpdate : function( c, resort, callback ) {
21835			// remove rows/elements before update
21836			c.$table.find( c.selectorRemove ).remove();
21837			// rebuild parsers
21838			ts.setupParsers( c );
21839			// rebuild the cache map
21840			ts.buildCache( c );
21841			ts.checkResort( c, resort, callback );
21842		},
21843
21844		/*
21845		▄█████ ▄████▄ █████▄ ██████ ██ █████▄ ▄████▄
21846		▀█▄    ██  ██ ██▄▄██   ██   ██ ██  ██ ██ ▄▄▄
21847		   ▀█▄ ██  ██ ██▀██    ██   ██ ██  ██ ██ ▀██
21848		█████▀ ▀████▀ ██  ██   ██   ██ ██  ██ ▀████▀
21849		*/
21850		initSort : function( c, cell, event ) {
21851			if ( c.table.isUpdating ) {
21852				// let any updates complete before initializing a sort
21853				return setTimeout( function() {
21854					ts.initSort( c, cell, event );
21855				}, 50 );
21856			}
21857
21858			var arry, indx, headerIndx, dir, temp, tmp, $header,
21859				notMultiSort = !event[ c.sortMultiSortKey ],
21860				table = c.table,
21861				len = c.$headers.length,
21862				th = ts.getClosest( $( cell ), 'th, td' ),
21863				col = parseInt( th.attr( 'data-column' ), 10 ),
21864				sortedBy = event.type === 'mouseup' ? 'user' : event.type,
21865				order = c.sortVars[ col ].order;
21866			th = th[0];
21867			// Only call sortStart if sorting is enabled
21868			c.$table.triggerHandler( 'sortStart', table );
21869			// get current column sort order
21870			tmp = ( c.sortVars[ col ].count + 1 ) % order.length;
21871			c.sortVars[ col ].count = event[ c.sortResetKey ] ? 2 : tmp;
21872			// reset all sorts on non-current column - issue #30
21873			if ( c.sortRestart ) {
21874				for ( headerIndx = 0; headerIndx < len; headerIndx++ ) {
21875					$header = c.$headers.eq( headerIndx );
21876					tmp = parseInt( $header.attr( 'data-column' ), 10 );
21877					// only reset counts on columns that weren't just clicked on and if not included in a multisort
21878					if ( col !== tmp && ( notMultiSort || $header.hasClass( ts.css.sortNone ) ) ) {
21879						c.sortVars[ tmp ].count = -1;
21880					}
21881				}
21882			}
21883			// user only wants to sort on one column
21884			if ( notMultiSort ) {
21885				$.each( c.sortVars, function( i ) {
21886					c.sortVars[ i ].sortedBy = '';
21887				});
21888				// flush the sort list
21889				c.sortList = [];
21890				c.last.sortList = [];
21891				if ( c.sortForce !== null ) {
21892					arry = c.sortForce;
21893					for ( indx = 0; indx < arry.length; indx++ ) {
21894						if ( arry[ indx ][ 0 ] !== col ) {
21895							c.sortList[ c.sortList.length ] = arry[ indx ];
21896							c.sortVars[ arry[ indx ][ 0 ] ].sortedBy = 'sortForce';
21897						}
21898					}
21899				}
21900				// add column to sort list
21901				dir = order[ c.sortVars[ col ].count ];
21902				if ( dir < 2 ) {
21903					c.sortList[ c.sortList.length ] = [ col, dir ];
21904					c.sortVars[ col ].sortedBy = sortedBy;
21905					// add other columns if header spans across multiple
21906					if ( th.colSpan > 1 ) {
21907						for ( indx = 1; indx < th.colSpan; indx++ ) {
21908							c.sortList[ c.sortList.length ] = [ col + indx, dir ];
21909							// update count on columns in colSpan
21910							c.sortVars[ col + indx ].count = $.inArray( dir, order );
21911							c.sortVars[ col + indx ].sortedBy = sortedBy;
21912						}
21913					}
21914				}
21915				// multi column sorting
21916			} else {
21917				// get rid of the sortAppend before adding more - fixes issue #115 & #523
21918				c.sortList = $.extend( [], c.last.sortList );
21919
21920				// the user has clicked on an already sorted column
21921				if ( ts.isValueInArray( col, c.sortList ) >= 0 ) {
21922					// reverse the sorting direction
21923					c.sortVars[ col ].sortedBy = sortedBy;
21924					for ( indx = 0; indx < c.sortList.length; indx++ ) {
21925						tmp = c.sortList[ indx ];
21926						if ( tmp[ 0 ] === col ) {
21927							// order.count seems to be incorrect when compared to cell.count
21928							tmp[ 1 ] = order[ c.sortVars[ col ].count ];
21929							if ( tmp[1] === 2 ) {
21930								c.sortList.splice( indx, 1 );
21931								c.sortVars[ col ].count = -1;
21932							}
21933						}
21934					}
21935				} else {
21936					// add column to sort list array
21937					dir = order[ c.sortVars[ col ].count ];
21938					c.sortVars[ col ].sortedBy = sortedBy;
21939					if ( dir < 2 ) {
21940						c.sortList[ c.sortList.length ] = [ col, dir ];
21941						// add other columns if header spans across multiple
21942						if ( th.colSpan > 1 ) {
21943							for ( indx = 1; indx < th.colSpan; indx++ ) {
21944								c.sortList[ c.sortList.length ] = [ col + indx, dir ];
21945								// update count on columns in colSpan
21946								c.sortVars[ col + indx ].count = $.inArray( dir, order );
21947								c.sortVars[ col + indx ].sortedBy = sortedBy;
21948							}
21949						}
21950					}
21951				}
21952			}
21953			// save sort before applying sortAppend
21954			c.last.sortList = $.extend( [], c.sortList );
21955			if ( c.sortList.length && c.sortAppend ) {
21956				arry = $.isArray( c.sortAppend ) ? c.sortAppend : c.sortAppend[ c.sortList[ 0 ][ 0 ] ];
21957				if ( !ts.isEmptyObject( arry ) ) {
21958					for ( indx = 0; indx < arry.length; indx++ ) {
21959						if ( arry[ indx ][ 0 ] !== col && ts.isValueInArray( arry[ indx ][ 0 ], c.sortList ) < 0 ) {
21960							dir = arry[ indx ][ 1 ];
21961							temp = ( '' + dir ).match( /^(a|d|s|o|n)/ );
21962							if ( temp ) {
21963								tmp = c.sortList[ 0 ][ 1 ];
21964								switch ( temp[ 0 ] ) {
21965									case 'd' :
21966										dir = 1;
21967										break;
21968									case 's' :
21969										dir = tmp;
21970										break;
21971									case 'o' :
21972										dir = tmp === 0 ? 1 : 0;
21973										break;
21974									case 'n' :
21975										dir = ( tmp + 1 ) % order.length;
21976										break;
21977									default:
21978										dir = 0;
21979										break;
21980								}
21981							}
21982							c.sortList[ c.sortList.length ] = [ arry[ indx ][ 0 ], dir ];
21983							c.sortVars[ arry[ indx ][ 0 ] ].sortedBy = 'sortAppend';
21984						}
21985					}
21986				}
21987			}
21988			// sortBegin event triggered immediately before the sort
21989			c.$table.triggerHandler( 'sortBegin', table );
21990			// setTimeout needed so the processing icon shows up
21991			setTimeout( function() {
21992				// set css for headers
21993				ts.setHeadersCss( c );
21994				ts.multisort( c );
21995				ts.appendCache( c );
21996				c.$table.triggerHandler( 'sortBeforeEnd', table );
21997				c.$table.triggerHandler( 'sortEnd', table );
21998			}, 1 );
21999		},
22000
22001		// sort multiple columns
22002		multisort : function( c ) { /*jshint loopfunc:true */
22003			var tbodyIndex, sortTime, colMax, rows, tmp,
22004				table = c.table,
22005				sorter = [],
22006				dir = 0,
22007				textSorter = c.textSorter || '',
22008				sortList = c.sortList,
22009				sortLen = sortList.length,
22010				len = c.$tbodies.length;
22011			if ( c.serverSideSorting || ts.isEmptyObject( c.cache ) ) {
22012				// empty table - fixes #206/#346
22013				return;
22014			}
22015			if ( ts.debug(c, 'core') ) { sortTime = new Date(); }
22016			// cache textSorter to optimize speed
22017			if ( typeof textSorter === 'object' ) {
22018				colMax = c.columns;
22019				while ( colMax-- ) {
22020					tmp = ts.getColumnData( table, textSorter, colMax );
22021					if ( typeof tmp === 'function' ) {
22022						sorter[ colMax ] = tmp;
22023					}
22024				}
22025			}
22026			for ( tbodyIndex = 0; tbodyIndex < len; tbodyIndex++ ) {
22027				colMax = c.cache[ tbodyIndex ].colMax;
22028				rows = c.cache[ tbodyIndex ].normalized;
22029
22030				rows.sort( function( a, b ) {
22031					var sortIndex, num, col, order, sort, x, y;
22032					// rows is undefined here in IE, so don't use it!
22033					for ( sortIndex = 0; sortIndex < sortLen; sortIndex++ ) {
22034						col = sortList[ sortIndex ][ 0 ];
22035						order = sortList[ sortIndex ][ 1 ];
22036						// sort direction, true = asc, false = desc
22037						dir = order === 0;
22038
22039						if ( c.sortStable && a[ col ] === b[ col ] && sortLen === 1 ) {
22040							return a[ c.columns ].order - b[ c.columns ].order;
22041						}
22042
22043						// fallback to natural sort since it is more robust
22044						num = /n/i.test( ts.getSortType( c.parsers, col ) );
22045						if ( num && c.strings[ col ] ) {
22046							// sort strings in numerical columns
22047							if ( typeof ( ts.string[ c.strings[ col ] ] ) === 'boolean' ) {
22048								num = ( dir ? 1 : -1 ) * ( ts.string[ c.strings[ col ] ] ? -1 : 1 );
22049							} else {
22050								num = ( c.strings[ col ] ) ? ts.string[ c.strings[ col ] ] || 0 : 0;
22051							}
22052							// fall back to built-in numeric sort
22053							// var sort = $.tablesorter['sort' + s]( a[col], b[col], dir, colMax[col], table );
22054							sort = c.numberSorter ? c.numberSorter( a[ col ], b[ col ], dir, colMax[ col ], table ) :
22055								ts[ 'sortNumeric' + ( dir ? 'Asc' : 'Desc' ) ]( a[ col ], b[ col ], num, colMax[ col ], col, c );
22056						} else {
22057							// set a & b depending on sort direction
22058							x = dir ? a : b;
22059							y = dir ? b : a;
22060							// text sort function
22061							if ( typeof textSorter === 'function' ) {
22062								// custom OVERALL text sorter
22063								sort = textSorter( x[ col ], y[ col ], dir, col, table );
22064							} else if ( typeof sorter[ col ] === 'function' ) {
22065								// custom text sorter for a SPECIFIC COLUMN
22066								sort = sorter[ col ]( x[ col ], y[ col ], dir, col, table );
22067							} else {
22068								// fall back to natural sort
22069								sort = ts[ 'sortNatural' + ( dir ? 'Asc' : 'Desc' ) ]( a[ col ] || '', b[ col ] || '', col, c );
22070							}
22071						}
22072						if ( sort ) { return sort; }
22073					}
22074					return a[ c.columns ].order - b[ c.columns ].order;
22075				});
22076			}
22077			if ( ts.debug(c, 'core') ) {
22078				console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) );
22079			}
22080		},
22081
22082		resortComplete : function( c, callback ) {
22083			if ( c.table.isUpdating ) {
22084				c.$table.triggerHandler( 'updateComplete', c.table );
22085			}
22086			if ( $.isFunction( callback ) ) {
22087				callback( c.table );
22088			}
22089		},
22090
22091		checkResort : function( c, resort, callback ) {
22092			var sortList = $.isArray( resort ) ? resort : c.sortList,
22093				// if no resort parameter is passed, fallback to config.resort (true by default)
22094				resrt = typeof resort === 'undefined' ? c.resort : resort;
22095			// don't try to resort if the table is still processing
22096			// this will catch spamming of the updateCell method
22097			if ( resrt !== false && !c.serverSideSorting && !c.table.isProcessing ) {
22098				if ( sortList.length ) {
22099					ts.sortOn( c, sortList, function() {
22100						ts.resortComplete( c, callback );
22101					}, true );
22102				} else {
22103					ts.sortReset( c, function() {
22104						ts.resortComplete( c, callback );
22105						ts.applyWidget( c.table, false );
22106					} );
22107				}
22108			} else {
22109				ts.resortComplete( c, callback );
22110				ts.applyWidget( c.table, false );
22111			}
22112		},
22113
22114		sortOn : function( c, list, callback, init ) {
22115			var indx,
22116				table = c.table;
22117			c.$table.triggerHandler( 'sortStart', table );
22118			for (indx = 0; indx < c.columns; indx++) {
22119				c.sortVars[ indx ].sortedBy = ts.isValueInArray( indx, list ) > -1 ? 'sorton' : '';
22120			}
22121			// update header count index
22122			ts.updateHeaderSortCount( c, list );
22123			// set css for headers
22124			ts.setHeadersCss( c );
22125			// fixes #346
22126			if ( c.delayInit && ts.isEmptyObject( c.cache ) ) {
22127				ts.buildCache( c );
22128			}
22129			c.$table.triggerHandler( 'sortBegin', table );
22130			// sort the table and append it to the dom
22131			ts.multisort( c );
22132			ts.appendCache( c, init );
22133			c.$table.triggerHandler( 'sortBeforeEnd', table );
22134			c.$table.triggerHandler( 'sortEnd', table );
22135			ts.applyWidget( table );
22136			if ( $.isFunction( callback ) ) {
22137				callback( table );
22138			}
22139		},
22140
22141		sortReset : function( c, callback ) {
22142			c.sortList = [];
22143			var indx;
22144			for (indx = 0; indx < c.columns; indx++) {
22145				c.sortVars[ indx ].count = -1;
22146				c.sortVars[ indx ].sortedBy = '';
22147			}
22148			ts.setHeadersCss( c );
22149			ts.multisort( c );
22150			ts.appendCache( c );
22151			if ( $.isFunction( callback ) ) {
22152				callback( c.table );
22153			}
22154		},
22155
22156		getSortType : function( parsers, column ) {
22157			return ( parsers && parsers[ column ] ) ? parsers[ column ].type || '' : '';
22158		},
22159
22160		getOrder : function( val ) {
22161			// look for 'd' in 'desc' order; return true
22162			return ( /^d/i.test( val ) || val === 1 );
22163		},
22164
22165		// Natural sort - https://github.com/overset/javascript-natural-sort (date sorting removed)
22166		sortNatural : function( a, b ) {
22167			if ( a === b ) { return 0; }
22168			a = ( a || '' ).toString();
22169			b = ( b || '' ).toString();
22170			var aNum, bNum, aFloat, bFloat, indx, max,
22171				regex = ts.regex;
22172			// first try and sort Hex codes
22173			if ( regex.hex.test( b ) ) {
22174				aNum = parseInt( a.match( regex.hex ), 16 );
22175				bNum = parseInt( b.match( regex.hex ), 16 );
22176				if ( aNum < bNum ) { return -1; }
22177				if ( aNum > bNum ) { return 1; }
22178			}
22179			// chunk/tokenize
22180			aNum = a.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
22181			bNum = b.replace( regex.chunk, '\\0$1\\0' ).replace( regex.chunks, '' ).split( '\\0' );
22182			max = Math.max( aNum.length, bNum.length );
22183			// natural sorting through split numeric strings and default strings
22184			for ( indx = 0; indx < max; indx++ ) {
22185				// find floats not starting with '0', string or 0 if not defined
22186				aFloat = isNaN( aNum[ indx ] ) ? aNum[ indx ] || 0 : parseFloat( aNum[ indx ] ) || 0;
22187				bFloat = isNaN( bNum[ indx ] ) ? bNum[ indx ] || 0 : parseFloat( bNum[ indx ] ) || 0;
22188				// handle numeric vs string comparison - number < string - (Kyle Adams)
22189				if ( isNaN( aFloat ) !== isNaN( bFloat ) ) { return isNaN( aFloat ) ? 1 : -1; }
22190				// rely on string comparison if different types - i.e. '02' < 2 != '02' < '2'
22191				if ( typeof aFloat !== typeof bFloat ) {
22192					aFloat += '';
22193					bFloat += '';
22194				}
22195				if ( aFloat < bFloat ) { return -1; }
22196				if ( aFloat > bFloat ) { return 1; }
22197			}
22198			return 0;
22199		},
22200
22201		sortNaturalAsc : function( a, b, col, c ) {
22202			if ( a === b ) { return 0; }
22203			var empty = ts.string[ ( c.empties[ col ] || c.emptyTo ) ];
22204			if ( a === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? -1 : 1 ) : -empty || -1; }
22205			if ( b === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? 1 : -1 ) : empty || 1; }
22206			return ts.sortNatural( a, b );
22207		},
22208
22209		sortNaturalDesc : function( a, b, col, c ) {
22210			if ( a === b ) { return 0; }
22211			var empty = ts.string[ ( c.empties[ col ] || c.emptyTo ) ];
22212			if ( a === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? -1 : 1 ) : empty || 1; }
22213			if ( b === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? 1 : -1 ) : -empty || -1; }
22214			return ts.sortNatural( b, a );
22215		},
22216
22217		// basic alphabetical sort
22218		sortText : function( a, b ) {
22219			return a > b ? 1 : ( a < b ? -1 : 0 );
22220		},
22221
22222		// return text string value by adding up ascii value
22223		// so the text is somewhat sorted when using a digital sort
22224		// this is NOT an alphanumeric sort
22225		getTextValue : function( val, num, max ) {
22226			if ( max ) {
22227				// make sure the text value is greater than the max numerical value (max)
22228				var indx,
22229					len = val ? val.length : 0,
22230					n = max + num;
22231				for ( indx = 0; indx < len; indx++ ) {
22232					n += val.charCodeAt( indx );
22233				}
22234				return num * n;
22235			}
22236			return 0;
22237		},
22238
22239		sortNumericAsc : function( a, b, num, max, col, c ) {
22240			if ( a === b ) { return 0; }
22241			var empty = ts.string[ ( c.empties[ col ] || c.emptyTo ) ];
22242			if ( a === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? -1 : 1 ) : -empty || -1; }
22243			if ( b === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? 1 : -1 ) : empty || 1; }
22244			if ( isNaN( a ) ) { a = ts.getTextValue( a, num, max ); }
22245			if ( isNaN( b ) ) { b = ts.getTextValue( b, num, max ); }
22246			return a - b;
22247		},
22248
22249		sortNumericDesc : function( a, b, num, max, col, c ) {
22250			if ( a === b ) { return 0; }
22251			var empty = ts.string[ ( c.empties[ col ] || c.emptyTo ) ];
22252			if ( a === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? -1 : 1 ) : empty || 1; }
22253			if ( b === '' && empty !== 0 ) { return typeof empty === 'boolean' ? ( empty ? 1 : -1 ) : -empty || -1; }
22254			if ( isNaN( a ) ) { a = ts.getTextValue( a, num, max ); }
22255			if ( isNaN( b ) ) { b = ts.getTextValue( b, num, max ); }
22256			return b - a;
22257		},
22258
22259		sortNumeric : function( a, b ) {
22260			return a - b;
22261		},
22262
22263		/*
22264		██ ██ ██ ██ █████▄ ▄████▄ ██████ ██████ ▄█████
22265		██ ██ ██ ██ ██  ██ ██ ▄▄▄ ██▄▄     ██   ▀█▄
22266		██ ██ ██ ██ ██  ██ ██ ▀██ ██▀▀     ██      ▀█▄
22267		███████▀ ██ █████▀ ▀████▀ ██████   ██   █████▀
22268		*/
22269		addWidget : function( widget ) {
22270			if ( widget.id && !ts.isEmptyObject( ts.getWidgetById( widget.id ) ) ) {
22271				console.warn( '"' + widget.id + '" widget was loaded more than once!' );
22272			}
22273			ts.widgets[ ts.widgets.length ] = widget;
22274		},
22275
22276		hasWidget : function( $table, name ) {
22277			$table = $( $table );
22278			return $table.length && $table[ 0 ].config && $table[ 0 ].config.widgetInit[ name ] || false;
22279		},
22280
22281		getWidgetById : function( name ) {
22282			var indx, widget,
22283				len = ts.widgets.length;
22284			for ( indx = 0; indx < len; indx++ ) {
22285				widget = ts.widgets[ indx ];
22286				if ( widget && widget.id && widget.id.toLowerCase() === name.toLowerCase() ) {
22287					return widget;
22288				}
22289			}
22290		},
22291
22292		applyWidgetOptions : function( table ) {
22293			var indx, widget, wo,
22294				c = table.config,
22295				len = c.widgets.length;
22296			if ( len ) {
22297				for ( indx = 0; indx < len; indx++ ) {
22298					widget = ts.getWidgetById( c.widgets[ indx ] );
22299					if ( widget && widget.options ) {
22300						wo = $.extend( true, {}, widget.options );
22301						c.widgetOptions = $.extend( true, wo, c.widgetOptions );
22302						// add widgetOptions to defaults for option validator
22303						$.extend( true, ts.defaults.widgetOptions, widget.options );
22304					}
22305				}
22306			}
22307		},
22308
22309		addWidgetFromClass : function( table ) {
22310			var len, indx,
22311				c = table.config,
22312				// look for widgets to apply from table class
22313				// don't match from 'ui-widget-content'; use \S instead of \w to include widgets
22314				// with dashes in the name, e.g. "widget-test-2" extracts out "test-2"
22315				regex = '^' + c.widgetClass.replace( ts.regex.templateName, '(\\S+)+' ) + '$',
22316				widgetClass = new RegExp( regex, 'g' ),
22317				// split up table class (widget id's can include dashes) - stop using match
22318				// otherwise only one widget gets extracted, see #1109
22319				widgets = ( table.className || '' ).split( ts.regex.spaces );
22320			if ( widgets.length ) {
22321				len = widgets.length;
22322				for ( indx = 0; indx < len; indx++ ) {
22323					if ( widgets[ indx ].match( widgetClass ) ) {
22324						c.widgets[ c.widgets.length ] = widgets[ indx ].replace( widgetClass, '$1' );
22325					}
22326				}
22327			}
22328		},
22329
22330		applyWidgetId : function( table, id, init ) {
22331			table = $(table)[0];
22332			var applied, time, name,
22333				c = table.config,
22334				wo = c.widgetOptions,
22335				debug = ts.debug(c, 'core'),
22336				widget = ts.getWidgetById( id );
22337			if ( widget ) {
22338				name = widget.id;
22339				applied = false;
22340				// add widget name to option list so it gets reapplied after sorting, filtering, etc
22341				if ( $.inArray( name, c.widgets ) < 0 ) {
22342					c.widgets[ c.widgets.length ] = name;
22343				}
22344				if ( debug ) { time = new Date(); }
22345
22346				if ( init || !( c.widgetInit[ name ] ) ) {
22347					// set init flag first to prevent calling init more than once (e.g. pager)
22348					c.widgetInit[ name ] = true;
22349					if ( table.hasInitialized ) {
22350						// don't reapply widget options on tablesorter init
22351						ts.applyWidgetOptions( table );
22352					}
22353					if ( typeof widget.init === 'function' ) {
22354						applied = true;
22355						if ( debug ) {
22356							console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
22357						}
22358						widget.init( table, widget, c, wo );
22359					}
22360				}
22361				if ( !init && typeof widget.format === 'function' ) {
22362					applied = true;
22363					if ( debug ) {
22364						console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
22365					}
22366					widget.format( table, c, wo, false );
22367				}
22368				if ( debug ) {
22369					if ( applied ) {
22370						console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) );
22371						if ( console.groupEnd ) { console.groupEnd(); }
22372					}
22373				}
22374			}
22375		},
22376
22377		applyWidget : function( table, init, callback ) {
22378			table = $( table )[ 0 ]; // in case this is called externally
22379			var indx, len, names, widget, time,
22380				c = table.config,
22381				debug = ts.debug(c, 'core'),
22382				widgets = [];
22383			// prevent numerous consecutive widget applications
22384			if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) {
22385				return;
22386			}
22387			if ( debug ) { time = new Date(); }
22388			ts.addWidgetFromClass( table );
22389			// prevent "tablesorter-ready" from firing multiple times in a row
22390			clearTimeout( c.timerReady );
22391			if ( c.widgets.length ) {
22392				table.isApplyingWidgets = true;
22393				// ensure unique widget ids
22394				c.widgets = $.grep( c.widgets, function( val, index ) {
22395					return $.inArray( val, c.widgets ) === index;
22396				});
22397				names = c.widgets || [];
22398				len = names.length;
22399				// build widget array & add priority as needed
22400				for ( indx = 0; indx < len; indx++ ) {
22401					widget = ts.getWidgetById( names[ indx ] );
22402					if ( widget && widget.id ) {
22403						// set priority to 10 if not defined
22404						if ( !widget.priority ) { widget.priority = 10; }
22405						widgets[ indx ] = widget;
22406					} else if ( debug ) {
22407						console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
22408					}
22409				}
22410				// sort widgets by priority
22411				widgets.sort( function( a, b ) {
22412					return a.priority < b.priority ? -1 : a.priority === b.priority ? 0 : 1;
22413				});
22414				// add/update selected widgets
22415				len = widgets.length;
22416				if ( debug ) {
22417					console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' );
22418				}
22419				for ( indx = 0; indx < len; indx++ ) {
22420					widget = widgets[ indx ];
22421					if ( widget && widget.id ) {
22422						ts.applyWidgetId( table, widget.id, init );
22423					}
22424				}
22425				if ( debug && console.groupEnd ) { console.groupEnd(); }
22426			}
22427			c.timerReady = setTimeout( function() {
22428				table.isApplyingWidgets = false;
22429				$.data( table, 'lastWidgetApplication', new Date() );
22430				c.$table.triggerHandler( 'tablesorter-ready' );
22431				// callback executed on init only
22432				if ( !init && typeof callback === 'function' ) {
22433					callback( table );
22434				}
22435				if ( debug ) {
22436					widget = c.widgets.length;
22437					console.log( 'Completed ' +
22438						( init === true ? 'initializing ' : 'applying ' ) + widget +
22439						' widget' + ( widget !== 1 ? 's' : '' ) + ts.benchmark( time ) );
22440				}
22441			}, 10 );
22442		},
22443
22444		removeWidget : function( table, name, refreshing ) {
22445			table = $( table )[ 0 ];
22446			var index, widget, indx, len,
22447				c = table.config;
22448			// if name === true, add all widgets from $.tablesorter.widgets
22449			if ( name === true ) {
22450				name = [];
22451				len = ts.widgets.length;
22452				for ( indx = 0; indx < len; indx++ ) {
22453					widget = ts.widgets[ indx ];
22454					if ( widget && widget.id ) {
22455						name[ name.length ] = widget.id;
22456					}
22457				}
22458			} else {
22459				// name can be either an array of widgets names,
22460				// or a space/comma separated list of widget names
22461				name = ( $.isArray( name ) ? name.join( ',' ) : name || '' ).toLowerCase().split( /[\s,]+/ );
22462			}
22463			len = name.length;
22464			for ( index = 0; index < len; index++ ) {
22465				widget = ts.getWidgetById( name[ index ] );
22466				indx = $.inArray( name[ index ], c.widgets );
22467				// don't remove the widget from config.widget if refreshing
22468				if ( indx >= 0 && refreshing !== true ) {
22469					c.widgets.splice( indx, 1 );
22470				}
22471				if ( widget && widget.remove ) {
22472					if ( ts.debug(c, 'core') ) {
22473						console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
22474					}
22475					widget.remove( table, c, c.widgetOptions, refreshing );
22476					c.widgetInit[ name[ index ] ] = false;
22477				}
22478			}
22479			c.$table.triggerHandler( 'widgetRemoveEnd', table );
22480		},
22481
22482		refreshWidgets : function( table, doAll, dontapply ) {
22483			table = $( table )[ 0 ]; // see issue #243
22484			var indx, widget,
22485				c = table.config,
22486				curWidgets = c.widgets,
22487				widgets = ts.widgets,
22488				len = widgets.length,
22489				list = [],
22490				callback = function( table ) {
22491					$( table ).triggerHandler( 'refreshComplete' );
22492				};
22493			// remove widgets not defined in config.widgets, unless doAll is true
22494			for ( indx = 0; indx < len; indx++ ) {
22495				widget = widgets[ indx ];
22496				if ( widget && widget.id && ( doAll || $.inArray( widget.id, curWidgets ) < 0 ) ) {
22497					list[ list.length ] = widget.id;
22498				}
22499			}
22500			ts.removeWidget( table, list.join( ',' ), true );
22501			if ( dontapply !== true ) {
22502				// call widget init if
22503				ts.applyWidget( table, doAll || false, callback );
22504				if ( doAll ) {
22505					// apply widget format
22506					ts.applyWidget( table, false, callback );
22507				}
22508			} else {
22509				callback( table );
22510			}
22511		},
22512
22513		/*
22514		██  ██ ██████ ██ ██     ██ ██████ ██ ██████ ▄█████
22515		██  ██   ██   ██ ██     ██   ██   ██ ██▄▄   ▀█▄
22516		██  ██   ██   ██ ██     ██   ██   ██ ██▀▀      ▀█▄
22517		▀████▀   ██   ██ ██████ ██   ██   ██ ██████ █████▀
22518		*/
22519		benchmark : function( diff ) {
22520			return ( ' (' + ( new Date().getTime() - diff.getTime() ) + ' ms)' );
22521		},
22522		// deprecated ts.log
22523		log : function() {
22524			console.log( arguments );
22525		},
22526		debug : function(c, name) {
22527			return c && (
22528				c.debug === true ||
22529				typeof c.debug === 'string' && c.debug.indexOf(name) > -1
22530			);
22531		},
22532
22533		// $.isEmptyObject from jQuery v1.4
22534		isEmptyObject : function( obj ) {
22535			/*jshint forin: false */
22536			for ( var name in obj ) {
22537				return false;
22538			}
22539			return true;
22540		},
22541
22542		isValueInArray : function( column, arry ) {
22543			var indx,
22544				len = arry && arry.length || 0;
22545			for ( indx = 0; indx < len; indx++ ) {
22546				if ( arry[ indx ][ 0 ] === column ) {
22547					return indx;
22548				}
22549			}
22550			return -1;
22551		},
22552
22553		formatFloat : function( str, table ) {
22554			if ( typeof str !== 'string' || str === '' ) { return str; }
22555			// allow using formatFloat without a table; defaults to US number format
22556			var num,
22557				usFormat = table && table.config ? table.config.usNumberFormat !== false :
22558					typeof table !== 'undefined' ? table : true;
22559			if ( usFormat ) {
22560				// US Format - 1,234,567.89 -> 1234567.89
22561				str = str.replace( ts.regex.comma, '' );
22562			} else {
22563				// German Format = 1.234.567,89 -> 1234567.89
22564				// French Format = 1 234 567,89 -> 1234567.89
22565				str = str.replace( ts.regex.digitNonUS, '' ).replace( ts.regex.comma, '.' );
22566			}
22567			if ( ts.regex.digitNegativeTest.test( str ) ) {
22568				// make (#) into a negative number -> (10) = -10
22569				str = str.replace( ts.regex.digitNegativeReplace, '-$1' );
22570			}
22571			num = parseFloat( str );
22572			// return the text instead of zero
22573			return isNaN( num ) ? $.trim( str ) : num;
22574		},
22575
22576		isDigit : function( str ) {
22577			// replace all unwanted chars and match
22578			return isNaN( str ) ?
22579				ts.regex.digitTest.test( str.toString().replace( ts.regex.digitReplace, '' ) ) :
22580				str !== '';
22581		},
22582
22583		// computeTableHeaderCellIndexes from:
22584		// http://www.javascripttoolbox.com/lib/table/examples.php
22585		// http://www.javascripttoolbox.com/temp/table_cellindex.html
22586		computeColumnIndex : function( $rows, c ) {
22587			var i, j, k, l, cell, cells, rowIndex, rowSpan, colSpan, firstAvailCol,
22588				// total columns has been calculated, use it to set the matrixrow
22589				columns = c && c.columns || 0,
22590				matrix = [],
22591				matrixrow = new Array( columns );
22592			for ( i = 0; i < $rows.length; i++ ) {
22593				cells = $rows[ i ].cells;
22594				for ( j = 0; j < cells.length; j++ ) {
22595					cell = cells[ j ];
22596					rowIndex = i;
22597					rowSpan = cell.rowSpan || 1;
22598					colSpan = cell.colSpan || 1;
22599					if ( typeof matrix[ rowIndex ] === 'undefined' ) {
22600						matrix[ rowIndex ] = [];
22601					}
22602					// Find first available column in the first row
22603					for ( k = 0; k < matrix[ rowIndex ].length + 1; k++ ) {
22604						if ( typeof matrix[ rowIndex ][ k ] === 'undefined' ) {
22605							firstAvailCol = k;
22606							break;
22607						}
22608					}
22609					// jscs:disable disallowEmptyBlocks
22610					if ( columns && cell.cellIndex === firstAvailCol ) {
22611						// don't to anything
22612					} else if ( cell.setAttribute ) {
22613						// jscs:enable disallowEmptyBlocks
22614						// add data-column (setAttribute = IE8+)
22615						cell.setAttribute( 'data-column', firstAvailCol );
22616					} else {
22617						// remove once we drop support for IE7 - 1/12/2016
22618						$( cell ).attr( 'data-column', firstAvailCol );
22619					}
22620					for ( k = rowIndex; k < rowIndex + rowSpan; k++ ) {
22621						if ( typeof matrix[ k ] === 'undefined' ) {
22622							matrix[ k ] = [];
22623						}
22624						matrixrow = matrix[ k ];
22625						for ( l = firstAvailCol; l < firstAvailCol + colSpan; l++ ) {
22626							matrixrow[ l ] = 'x';
22627						}
22628					}
22629				}
22630			}
22631			ts.checkColumnCount($rows, matrix, matrixrow.length);
22632			return matrixrow.length;
22633		},
22634
22635		checkColumnCount : function($rows, matrix, columns) {
22636			// this DOES NOT report any tbody column issues, except for the math and
22637			// and column selector widgets
22638			var i, len,
22639				valid = true,
22640				cells = [];
22641			for ( i = 0; i < matrix.length; i++ ) {
22642				// some matrix entries are undefined when testing the footer because
22643				// it is using the rowIndex property
22644				if ( matrix[i] ) {
22645					len = matrix[i].length;
22646					if ( matrix[i].length !== columns ) {
22647						valid = false;
22648						break;
22649					}
22650				}
22651			}
22652			if ( !valid ) {
22653				$rows.each( function( indx, el ) {
22654					var cell = el.parentElement.nodeName;
22655					if ( cells.indexOf( cell ) < 0 ) {
22656						cells.push( cell );
22657					}
22658				});
22659				console.error(
22660					'Invalid or incorrect number of columns in the ' +
22661					cells.join( ' or ' ) + '; expected ' + columns +
22662					', but found ' + len + ' columns'
22663				);
22664			}
22665		},
22666
22667		// automatically add a colgroup with col elements set to a percentage width
22668		fixColumnWidth : function( table ) {
22669			table = $( table )[ 0 ];
22670			var overallWidth, percent, $tbodies, len, index,
22671				c = table.config,
22672				$colgroup = c.$table.children( 'colgroup' );
22673			// remove plugin-added colgroup, in case we need to refresh the widths
22674			if ( $colgroup.length && $colgroup.hasClass( ts.css.colgroup ) ) {
22675				$colgroup.remove();
22676			}
22677			if ( c.widthFixed && c.$table.children( 'colgroup' ).length === 0 ) {
22678				$colgroup = $( '<colgroup class="' + ts.css.colgroup + '">' );
22679				overallWidth = c.$table.width();
22680				// only add col for visible columns - fixes #371
22681				$tbodies = c.$tbodies.find( 'tr:first' ).children( ':visible' );
22682				len = $tbodies.length;
22683				for ( index = 0; index < len; index++ ) {
22684					percent = parseInt( ( $tbodies.eq( index ).width() / overallWidth ) * 1000, 10 ) / 10 + '%';
22685					$colgroup.append( $( '<col>' ).css( 'width', percent ) );
22686				}
22687				c.$table.prepend( $colgroup );
22688			}
22689		},
22690
22691		// get sorter, string, empty, etc options for each column from
22692		// jQuery data, metadata, header option or header class name ('sorter-false')
22693		// priority = jQuery data > meta > headers option > header class name
22694		getData : function( header, configHeader, key ) {
22695			var meta, cl4ss,
22696				val = '',
22697				$header = $( header );
22698			if ( !$header.length ) { return ''; }
22699			meta = $.metadata ? $header.metadata() : false;
22700			cl4ss = ' ' + ( $header.attr( 'class' ) || '' );
22701			if ( typeof $header.data( key ) !== 'undefined' ||
22702				typeof $header.data( key.toLowerCase() ) !== 'undefined' ) {
22703				// 'data-lockedOrder' is assigned to 'lockedorder'; but 'data-locked-order' is assigned to 'lockedOrder'
22704				// 'data-sort-initial-order' is assigned to 'sortInitialOrder'
22705				val += $header.data( key ) || $header.data( key.toLowerCase() );
22706			} else if ( meta && typeof meta[ key ] !== 'undefined' ) {
22707				val += meta[ key ];
22708			} else if ( configHeader && typeof configHeader[ key ] !== 'undefined' ) {
22709				val += configHeader[ key ];
22710			} else if ( cl4ss !== ' ' && cl4ss.match( ' ' + key + '-' ) ) {
22711				// include sorter class name 'sorter-text', etc; now works with 'sorter-my-custom-parser'
22712				val = cl4ss.match( new RegExp( '\\s' + key + '-([\\w-]+)' ) )[ 1 ] || '';
22713			}
22714			return $.trim( val );
22715		},
22716
22717		getColumnData : function( table, obj, indx, getCell, $headers ) {
22718			if ( typeof obj !== 'object' || obj === null ) {
22719				return obj;
22720			}
22721			table = $( table )[ 0 ];
22722			var $header, key,
22723				c = table.config,
22724				$cells = ( $headers || c.$headers ),
22725				// c.$headerIndexed is not defined initially
22726				$cell = c.$headerIndexed && c.$headerIndexed[ indx ] ||
22727					$cells.find( '[data-column="' + indx + '"]:last' );
22728			if ( typeof obj[ indx ] !== 'undefined' ) {
22729				return getCell ? obj[ indx ] : obj[ $cells.index( $cell ) ];
22730			}
22731			for ( key in obj ) {
22732				if ( typeof key === 'string' ) {
22733					$header = $cell
22734						// header cell with class/id
22735						.filter( key )
22736						// find elements within the header cell with cell/id
22737						.add( $cell.find( key ) );
22738					if ( $header.length ) {
22739						return obj[ key ];
22740					}
22741				}
22742			}
22743			return;
22744		},
22745
22746		// *** Process table ***
22747		// add processing indicator
22748		isProcessing : function( $table, toggle, $headers ) {
22749			$table = $( $table );
22750			var c = $table[ 0 ].config,
22751				// default to all headers
22752				$header = $headers || $table.find( '.' + ts.css.header );
22753			if ( toggle ) {
22754				// don't use sortList if custom $headers used
22755				if ( typeof $headers !== 'undefined' && c.sortList.length > 0 ) {
22756					// get headers from the sortList
22757					$header = $header.filter( function() {
22758						// get data-column from attr to keep compatibility with jQuery 1.2.6
22759						return this.sortDisabled ?
22760							false :
22761							ts.isValueInArray( parseFloat( $( this ).attr( 'data-column' ) ), c.sortList ) >= 0;
22762					});
22763				}
22764				$table.add( $header ).addClass( ts.css.processing + ' ' + c.cssProcessing );
22765			} else {
22766				$table.add( $header ).removeClass( ts.css.processing + ' ' + c.cssProcessing );
22767			}
22768		},
22769
22770		// detach tbody but save the position
22771		// don't use tbody because there are portions that look for a tbody index (updateCell)
22772		processTbody : function( table, $tb, getIt ) {
22773			table = $( table )[ 0 ];
22774			if ( getIt ) {
22775				table.isProcessing = true;
22776				$tb.before( '<colgroup class="tablesorter-savemyplace"/>' );
22777				return $.fn.detach ? $tb.detach() : $tb.remove();
22778			}
22779			var holdr = $( table ).find( 'colgroup.tablesorter-savemyplace' );
22780			$tb.insertAfter( holdr );
22781			holdr.remove();
22782			table.isProcessing = false;
22783		},
22784
22785		clearTableBody : function( table ) {
22786			$( table )[ 0 ].config.$tbodies.children().detach();
22787		},
22788
22789		// used when replacing accented characters during sorting
22790		characterEquivalents : {
22791			'a' : '\u00e1\u00e0\u00e2\u00e3\u00e4\u0105\u00e5', // áàâãäąå
22792			'A' : '\u00c1\u00c0\u00c2\u00c3\u00c4\u0104\u00c5', // ÁÀÂÃÄĄÅ
22793			'c' : '\u00e7\u0107\u010d', // çćč
22794			'C' : '\u00c7\u0106\u010c', // ÇĆČ
22795			'e' : '\u00e9\u00e8\u00ea\u00eb\u011b\u0119', // éèêëěę
22796			'E' : '\u00c9\u00c8\u00ca\u00cb\u011a\u0118', // ÉÈÊËĚĘ
22797			'i' : '\u00ed\u00ec\u0130\u00ee\u00ef\u0131', // íìİîïı
22798			'I' : '\u00cd\u00cc\u0130\u00ce\u00cf', // ÍÌİÎÏ
22799			'o' : '\u00f3\u00f2\u00f4\u00f5\u00f6\u014d', // óòôõöō
22800			'O' : '\u00d3\u00d2\u00d4\u00d5\u00d6\u014c', // ÓÒÔÕÖŌ
22801			'ss': '\u00df', // ß (s sharp)
22802			'SS': '\u1e9e', // ẞ (Capital sharp s)
22803			'u' : '\u00fa\u00f9\u00fb\u00fc\u016f', // úùûüů
22804			'U' : '\u00da\u00d9\u00db\u00dc\u016e' // ÚÙÛÜŮ
22805		},
22806
22807		replaceAccents : function( str ) {
22808			var chr,
22809				acc = '[',
22810				eq = ts.characterEquivalents;
22811			if ( !ts.characterRegex ) {
22812				ts.characterRegexArray = {};
22813				for ( chr in eq ) {
22814					if ( typeof chr === 'string' ) {
22815						acc += eq[ chr ];
22816						ts.characterRegexArray[ chr ] = new RegExp( '[' + eq[ chr ] + ']', 'g' );
22817					}
22818				}
22819				ts.characterRegex = new RegExp( acc + ']' );
22820			}
22821			if ( ts.characterRegex.test( str ) ) {
22822				for ( chr in eq ) {
22823					if ( typeof chr === 'string' ) {
22824						str = str.replace( ts.characterRegexArray[ chr ], chr );
22825					}
22826				}
22827			}
22828			return str;
22829		},
22830
22831		validateOptions : function( c ) {
22832			var setting, setting2, typ, timer,
22833				// ignore options containing an array
22834				ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
22835				orig = c.originalSettings;
22836			if ( orig ) {
22837				if ( ts.debug(c, 'core') ) {
22838					timer = new Date();
22839				}
22840				for ( setting in orig ) {
22841					typ = typeof ts.defaults[setting];
22842					if ( typ === 'undefined' ) {
22843						console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' );
22844					} else if ( typ === 'object' ) {
22845						for ( setting2 in orig[setting] ) {
22846							typ = ts.defaults[setting] && typeof ts.defaults[setting][setting2];
22847							if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
22848								console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
22849							}
22850						}
22851					}
22852				}
22853				if ( ts.debug(c, 'core') ) {
22854					console.log( 'validate options time:' + ts.benchmark( timer ) );
22855				}
22856			}
22857		},
22858
22859		// restore headers
22860		restoreHeaders : function( table ) {
22861			var index, $cell,
22862				c = $( table )[ 0 ].config,
22863				$headers = c.$table.find( c.selectorHeaders ),
22864				len = $headers.length;
22865			// don't use c.$headers here in case header cells were swapped
22866			for ( index = 0; index < len; index++ ) {
22867				$cell = $headers.eq( index );
22868				// only restore header cells if it is wrapped
22869				// because this is also used by the updateAll method
22870				if ( $cell.find( '.' + ts.css.headerIn ).length ) {
22871					$cell.html( c.headerContent[ index ] );
22872				}
22873			}
22874		},
22875
22876		destroy : function( table, removeClasses, callback ) {
22877			table = $( table )[ 0 ];
22878			if ( !table.hasInitialized ) { return; }
22879			// remove all widgets
22880			ts.removeWidget( table, true, false );
22881			var events,
22882				$t = $( table ),
22883				c = table.config,
22884				$h = $t.find( 'thead:first' ),
22885				$r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ),
22886				$f = $t.find( 'tfoot:first > tr' ).children( 'th, td' );
22887			if ( removeClasses === false && $.inArray( 'uitheme', c.widgets ) >= 0 ) {
22888				// reapply uitheme classes, in case we want to maintain appearance
22889				$t.triggerHandler( 'applyWidgetId', [ 'uitheme' ] );
22890				$t.triggerHandler( 'applyWidgetId', [ 'zebra' ] );
22891			}
22892			// remove widget added rows, just in case
22893			$h.find( 'tr' ).not( $r ).remove();
22894			// disable tablesorter - not using .unbind( namespace ) because namespacing was
22895			// added in jQuery v1.4.3 - see http://api.jquery.com/event.namespace/
22896			events = 'sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton ' +
22897				'appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave ' +
22898				'keypress sortBegin sortEnd resetToLoadState '.split( ' ' )
22899				.join( c.namespace + ' ' );
22900			$t
22901				.removeData( 'tablesorter' )
22902				.unbind( events.replace( ts.regex.spaces, ' ' ) );
22903			c.$headers
22904				.add( $f )
22905				.removeClass( [ ts.css.header, c.cssHeader, c.cssAsc, c.cssDesc, ts.css.sortAsc, ts.css.sortDesc, ts.css.sortNone ].join( ' ' ) )
22906				.removeAttr( 'data-column' )
22907				.removeAttr( 'aria-label' )
22908				.attr( 'aria-disabled', 'true' );
22909			$r
22910				.find( c.selectorSort )
22911				.unbind( ( 'mousedown mouseup keypress '.split( ' ' ).join( c.namespace + ' ' ) ).replace( ts.regex.spaces, ' ' ) );
22912			ts.restoreHeaders( table );
22913			$t.toggleClass( ts.css.table + ' ' + c.tableClass + ' tablesorter-' + c.theme, removeClasses === false );
22914			$t.removeClass(c.namespace.slice(1));
22915			// clear flag in case the plugin is initialized again
22916			table.hasInitialized = false;
22917			delete table.config.cache;
22918			if ( typeof callback === 'function' ) {
22919				callback( table );
22920			}
22921			if ( ts.debug(c, 'core') ) {
22922				console.log( 'tablesorter has been removed' );
22923			}
22924		}
22925
22926	};
22927
22928	$.fn.tablesorter = function( settings ) {
22929		return this.each( function() {
22930			var table = this,
22931			// merge & extend config options
22932			c = $.extend( true, {}, ts.defaults, settings, ts.instanceMethods );
22933			// save initial settings
22934			c.originalSettings = settings;
22935			// create a table from data (build table widget)
22936			if ( !table.hasInitialized && ts.buildTable && this.nodeName !== 'TABLE' ) {
22937				// return the table (in case the original target is the table's container)
22938				ts.buildTable( table, c );
22939			} else {
22940				ts.setup( table, c );
22941			}
22942		});
22943	};
22944
22945	// set up debug logs
22946	if ( !( window.console && window.console.log ) ) {
22947		// access $.tablesorter.logs for browsers that don't have a console...
22948		ts.logs = [];
22949		/*jshint -W020 */
22950		console = {};
22951		console.log = console.warn = console.error = console.table = function() {
22952			var arg = arguments.length > 1 ? arguments : arguments[0];
22953			ts.logs[ ts.logs.length ] = { date: Date.now(), log: arg };
22954		};
22955	}
22956
22957	// add default parsers
22958	ts.addParser({
22959		id : 'no-parser',
22960		is : function() {
22961			return false;
22962		},
22963		format : function() {
22964			return '';
22965		},
22966		type : 'text'
22967	});
22968
22969	ts.addParser({
22970		id : 'text',
22971		is : function() {
22972			return true;
22973		},
22974		format : function( str, table ) {
22975			var c = table.config;
22976			if ( str ) {
22977				str = $.trim( c.ignoreCase ? str.toLocaleLowerCase() : str );
22978				str = c.sortLocaleCompare ? ts.replaceAccents( str ) : str;
22979			}
22980			return str;
22981		},
22982		type : 'text'
22983	});
22984
22985	ts.regex.nondigit = /[^\w,. \-()]/g;
22986	ts.addParser({
22987		id : 'digit',
22988		is : function( str ) {
22989			return ts.isDigit( str );
22990		},
22991		format : function( str, table ) {
22992			var num = ts.formatFloat( ( str || '' ).replace( ts.regex.nondigit, '' ), table );
22993			return str && typeof num === 'number' ? num :
22994				str ? $.trim( str && table.config.ignoreCase ? str.toLocaleLowerCase() : str ) : str;
22995		},
22996		type : 'numeric'
22997	});
22998
22999	ts.regex.currencyReplace = /[+\-,. ]/g;
23000	ts.regex.currencyTest = /^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/;
23001	ts.addParser({
23002		id : 'currency',
23003		is : function( str ) {
23004			str = ( str || '' ).replace( ts.regex.currencyReplace, '' );
23005			// test for £$€¤¥¢
23006			return ts.regex.currencyTest.test( str );
23007		},
23008		format : function( str, table ) {
23009			var num = ts.formatFloat( ( str || '' ).replace( ts.regex.nondigit, '' ), table );
23010			return str && typeof num === 'number' ? num :
23011				str ? $.trim( str && table.config.ignoreCase ? str.toLocaleLowerCase() : str ) : str;
23012		},
23013		type : 'numeric'
23014	});
23015
23016	// too many protocols to add them all https://en.wikipedia.org/wiki/URI_scheme
23017	// now, this regex can be updated before initialization
23018	ts.regex.urlProtocolTest = /^(https?|ftp|file):\/\//;
23019	ts.regex.urlProtocolReplace = /(https?|ftp|file):\/\/(www\.)?/;
23020	ts.addParser({
23021		id : 'url',
23022		is : function( str ) {
23023			return ts.regex.urlProtocolTest.test( str );
23024		},
23025		format : function( str ) {
23026			return str ? $.trim( str.replace( ts.regex.urlProtocolReplace, '' ) ) : str;
23027		},
23028		type : 'text'
23029	});
23030
23031	ts.regex.dash = /-/g;
23032	ts.regex.isoDate = /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/;
23033	ts.addParser({
23034		id : 'isoDate',
23035		is : function( str ) {
23036			return ts.regex.isoDate.test( str );
23037		},
23038		format : function( str ) {
23039			var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str;
23040			return date instanceof Date && isFinite( date ) ? date.getTime() : str;
23041		},
23042		type : 'numeric'
23043	});
23044
23045	ts.regex.percent = /%/g;
23046	ts.regex.percentTest = /(\d\s*?%|%\s*?\d)/;
23047	ts.addParser({
23048		id : 'percent',
23049		is : function( str ) {
23050			return ts.regex.percentTest.test( str ) && str.length < 15;
23051		},
23052		format : function( str, table ) {
23053			return str ? ts.formatFloat( str.replace( ts.regex.percent, '' ), table ) : str;
23054		},
23055		type : 'numeric'
23056	});
23057
23058	// added image parser to core v2.17.9
23059	ts.addParser({
23060		id : 'image',
23061		is : function( str, table, node, $node ) {
23062			return $node.find( 'img' ).length > 0;
23063		},
23064		format : function( str, table, cell ) {
23065			return $( cell ).find( 'img' ).attr( table.config.imgAttr || 'alt' ) || str;
23066		},
23067		parsed : true, // filter widget flag
23068		type : 'text'
23069	});
23070
23071	ts.regex.dateReplace = /(\S)([AP]M)$/i; // used by usLongDate & time parser
23072	ts.regex.usLongDateTest1 = /^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i;
23073	ts.regex.usLongDateTest2 = /^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i;
23074	ts.addParser({
23075		id : 'usLongDate',
23076		is : function( str ) {
23077			// two digit years are not allowed cross-browser
23078			// Jan 01, 2013 12:34:56 PM or 01 Jan 2013
23079			return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str );
23080		},
23081		format : function( str ) {
23082			var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str;
23083			return date instanceof Date && isFinite( date ) ? date.getTime() : str;
23084		},
23085		type : 'numeric'
23086	});
23087
23088	// testing for ##-##-#### or ####-##-##, so it's not perfect; time can be included
23089	ts.regex.shortDateTest = /(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/;
23090	// escaped "-" because JSHint in Firefox was showing it as an error
23091	ts.regex.shortDateReplace = /[\-.,]/g;
23092	// XXY covers MDY & DMY formats
23093	ts.regex.shortDateXXY = /(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/;
23094	ts.regex.shortDateYMD = /(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/;
23095	ts.convertFormat = function( dateString, format ) {
23096		dateString = ( dateString || '' )
23097			.replace( ts.regex.spaces, ' ' )
23098			.replace( ts.regex.shortDateReplace, '/' );
23099		if ( format === 'mmddyyyy' ) {
23100			dateString = dateString.replace( ts.regex.shortDateXXY, '$3/$1/$2' );
23101		} else if ( format === 'ddmmyyyy' ) {
23102			dateString = dateString.replace( ts.regex.shortDateXXY, '$3/$2/$1' );
23103		} else if ( format === 'yyyymmdd' ) {
23104			dateString = dateString.replace( ts.regex.shortDateYMD, '$1/$2/$3' );
23105		}
23106		var date = new Date( dateString );
23107		return date instanceof Date && isFinite( date ) ? date.getTime() : '';
23108	};
23109
23110	ts.addParser({
23111		id : 'shortDate', // 'mmddyyyy', 'ddmmyyyy' or 'yyyymmdd'
23112		is : function( str ) {
23113			str = ( str || '' ).replace( ts.regex.spaces, ' ' ).replace( ts.regex.shortDateReplace, '/' );
23114			return ts.regex.shortDateTest.test( str );
23115		},
23116		format : function( str, table, cell, cellIndex ) {
23117			if ( str ) {
23118				var c = table.config,
23119					$header = c.$headerIndexed[ cellIndex ],
23120					format = $header.length && $header.data( 'dateFormat' ) ||
23121						ts.getData( $header, ts.getColumnData( table, c.headers, cellIndex ), 'dateFormat' ) ||
23122						c.dateFormat;
23123				// save format because getData can be slow...
23124				if ( $header.length ) {
23125					$header.data( 'dateFormat', format );
23126				}
23127				return ts.convertFormat( str, format ) || str;
23128			}
23129			return str;
23130		},
23131		type : 'numeric'
23132	});
23133
23134	// match 24 hour time & 12 hours time + am/pm - see http://regexr.com/3c3tk
23135	ts.regex.timeTest = /^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
23136	ts.regex.timeMatch = /(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
23137	ts.addParser({
23138		id : 'time',
23139		is : function( str ) {
23140			return ts.regex.timeTest.test( str );
23141		},
23142		format : function( str ) {
23143			// isolate time... ignore month, day and year
23144			var temp,
23145				timePart = ( str || '' ).match( ts.regex.timeMatch ),
23146				orig = new Date( str ),
23147				// no time component? default to 00:00 by leaving it out, but only if str is defined
23148				time = str && ( timePart !== null ? timePart[ 0 ] : '00:00 AM' ),
23149				date = time ? new Date( '2000/01/01 ' + time.replace( ts.regex.dateReplace, '$1 $2' ) ) : time;
23150			if ( date instanceof Date && isFinite( date ) ) {
23151				temp = orig instanceof Date && isFinite( orig ) ? orig.getTime() : 0;
23152				// if original string was a valid date, add it to the decimal so the column sorts in some kind of order
23153				// luckily new Date() ignores the decimals
23154				return temp ? parseFloat( date.getTime() + '.' + orig.getTime() ) : date.getTime();
23155			}
23156			return str;
23157		},
23158		type : 'numeric'
23159	});
23160
23161	ts.addParser({
23162		id : 'metadata',
23163		is : function() {
23164			return false;
23165		},
23166		format : function( str, table, cell ) {
23167			var c = table.config,
23168			p = ( !c.parserMetadataName ) ? 'sortValue' : c.parserMetadataName;
23169			return $( cell ).metadata()[ p ];
23170		},
23171		type : 'numeric'
23172	});
23173
23174	/*
23175		██████ ██████ █████▄ █████▄ ▄████▄
23176		  ▄█▀  ██▄▄   ██▄▄██ ██▄▄██ ██▄▄██
23177		▄█▀    ██▀▀   ██▀▀██ ██▀▀█  ██▀▀██
23178		██████ ██████ █████▀ ██  ██ ██  ██
23179		*/
23180	// add default widgets
23181	ts.addWidget({
23182		id : 'zebra',
23183		priority : 90,
23184		format : function( table, c, wo ) {
23185			var $visibleRows, $row, count, isEven, tbodyIndex, rowIndex, len,
23186				child = new RegExp( c.cssChildRow, 'i' ),
23187				$tbodies = c.$tbodies.add( $( c.namespace + '_extra_table' ).children( 'tbody:not(.' + c.cssInfoBlock + ')' ) );
23188			for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
23189				// loop through the visible rows
23190				count = 0;
23191				$visibleRows = $tbodies.eq( tbodyIndex ).children( 'tr:visible' ).not( c.selectorRemove );
23192				len = $visibleRows.length;
23193				for ( rowIndex = 0; rowIndex < len; rowIndex++ ) {
23194					$row = $visibleRows.eq( rowIndex );
23195					// style child rows the same way the parent row was styled
23196					if ( !child.test( $row[ 0 ].className ) ) { count++; }
23197					isEven = ( count % 2 === 0 );
23198					$row
23199						.removeClass( wo.zebra[ isEven ? 1 : 0 ] )
23200						.addClass( wo.zebra[ isEven ? 0 : 1 ] );
23201				}
23202			}
23203		},
23204		remove : function( table, c, wo, refreshing ) {
23205			if ( refreshing ) { return; }
23206			var tbodyIndex, $tbody,
23207				$tbodies = c.$tbodies,
23208				toRemove = ( wo.zebra || [ 'even', 'odd' ] ).join( ' ' );
23209			for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
23210				$tbody = ts.processTbody( table, $tbodies.eq( tbodyIndex ), true ); // remove tbody
23211				$tbody.children().removeClass( toRemove );
23212				ts.processTbody( table, $tbody, false ); // restore tbody
23213			}
23214		}
23215	});
23216
23217})( jQuery );
23218return jQuery.tablesorter;}));
23219
23220"use strict";
23221
23222// Objects cache / Global variables & settings
23223
23224var windowObject = $(window),
23225  windowWidth = windowObject.width(),
23226  windowHeight = windowObject.height(),
23227  windowCurrentScroll = windowObject.scrollTop(),
23228  documentObject = $(document),
23229  rootObject = $("html"),
23230  bodyObject = $("body"),
23231  header = $("#header"),
23232  headerHeight = header.height(),
23233  headerMainMenu = $(".main-menu", header),
23234  booking = $("#booking"),
23235  photos = $("#photos"),
23236  hamburgerNavigation = $("#hamburger-navigation"),
23237  hamburgerNavigationParent = $("li.parent", hamburgerNavigation),
23238  hamburgerNavigationTrigger = $("#hamburger-navigation-trigger"),
23239  blogHamburgerNavigation = $("#blog-hamburger-navigation"),
23240  bloghamburgerNavigationParent = $("li.parent", blogHamburgerNavigation),
23241  blogHamburgerNavigationTrigger = $("#blog-navigation-trigger"),
23242  events = $("#events"),
23243  googleApiKey = "AIzaSyCX9QcG_eeRKQbTdpOW-xqgXRiLZv7kP18",
23244  googleApiReady = $.Deferred(),
23245  reviews = $(".reviews-slideshow"),
23246  slideshows = {},
23247  keyboardNavigation = false,
23248  fadeOnScrollElements = $(".fade-on-scroll"),
23249  transitionEndEvent =
23250    "webkitTransitionEnd MSTransitionEnd oTransitionEnd otransitionend transitionend",
23251  currentScreen = "",
23252  isMobileDevice = navigator.userAgent
23253    ? navigator.userAgent.match(
23254        /(iphone|ipad|ipod|android|webos|blackberry|windows phone)/gi
23255      )
23256    : false,
23257  fadeOnScrollSupport = !isMobileDevice;
23258
23259// "Fix body height" function for mobile devices (prevents 100% height elements from resizing on scroll)
23260
23261var fixBodyHeight = function () {
23262  if (!isMobileDevice) return;
23263
23264  if (currentScreen == "mobile" || currentScreen == "tablet") {
23265    bodyObject.css("height", windowHeight);
23266  } else {
23267    bodyObject.removeAttr("style");
23268  }
23269};
23270
23271//LOZAD - Lazy load for any image
23272
23273var lozadObserver = lozad('[loading="lazy"]', {
23274  rootMargin: "0px 0px",
23275});
23276
23277lozadObserver.observe();
23278
23279// Window handlers
23280
23281if (isMobileDevice) {
23282  rootObject.addClass("mobile-device");
23283}
23284
23285windowObject
23286  .on(
23287    "scroll.globalScrollHandler load.globalScrollHandler init.globalScrollHandler",
23288    function () {
23289      windowCurrentScroll = windowObject.scrollTop();
23290
23291      requestAnimationFrame(function () {
23292        rootObject.toggleClass(
23293          "booking-datepicker-under",
23294          windowCurrentScroll > windowHeight - headerHeight - 380
23295        ); // 380 - is a random number that works good in our case
23296
23297        if (fadeOnScrollSupport == true) {
23298          if (typeof checkVisibleElements == "function") checkVisibleElements();
23299        }
23300      });
23301    }
23302  )
23303  .trigger("init.globalScrollHandler");
23304
23305windowObject
23306  .on("resize.globalResizeHandler init.globalResizeHandler", function () {
23307    windowWidth = windowObject.width();
23308    windowHeight = windowObject.height();
23309    headerHeight = header.height();
23310
23311    var newScreen;
23312
23313    if (matchMedia("only screen and (max-width: 767px)").matches)
23314      newScreen = "mobile";
23315    if (
23316      matchMedia("only screen and (min-width: 768px) and (max-width: 999px)")
23317        .matches
23318    )
23319      newScreen = "tablet";
23320    if (matchMedia("only screen and (min-width: 1000px)").matches)
23321      newScreen = "desktop";
23322
23323    if (newScreen != currentScreen) {
23324      currentScreen = newScreen;
23325
23326      requestAnimationFrame(function () {
23327        rootObject.removeClass("mobile tablet desktop").addClass(currentScreen);
23328
23329        fixBodyHeight();
23330      });
23331    }
23332  })
23333  .trigger("init.globalResizeHandler");
23334
23335windowObject.on("orientationchange.globalOrientationHandler", function () {
23336  fixBodyHeight();
23337
23338  setTimeout(function () {
23339    fixBodyHeight();
23340  }, 500); // Wait for orientation change animation to complete (takes ~ 500ms)
23341});
23342
23343// Fade on Scroll
23344
23345var checkVisibleElements = function () {
23346  fadeOnScrollElements.each(function () {
23347    var element = $(this);
23348
23349    if (
23350      element.offset().top + windowHeight / 10 <
23351      windowCurrentScroll + windowHeight
23352    ) {
23353      if (!element.data("visible") && !element.data("delayedFadeActive")) {
23354        var delay = parseInt(element.data("delay"));
23355        if (delay) {
23356          element.data("delayedFadeActive", true);
23357          element.data(
23358            "delayedFadeTimer",
23359            setTimeout(function () {
23360              element
23361                .addClass("visible")
23362                .data("visible", true)
23363                .data("delayedFadeActive", false);
23364            }, delay)
23365          );
23366        } else {
23367          element.addClass("visible").data("visible", true);
23368        }
23369      }
23370    } else {
23371      clearTimeout(element.data("delayedFadeTimer"));
23372      element
23373        .removeClass("visible")
23374        .data("visible", false)
23375        .data("delayedFadeActive", false);
23376    }
23377  });
23378};
23379if (fadeOnScrollSupport == false) {
23380  fadeOnScrollElements.each(function () {
23381    $(this).removeClass("fade-on-scroll").removeData("delay");
23382  });
23383}
23384
23385// Automated ADA Alt tags v1.2
23386
23387function searchForText(ele, originalIMG) {
23388  var parent = ele.parent(),
23389    originalIMG = originalIMG || ele,
23390    randomNum = parseInt(Math.random() * 1000);
23391  //  if we cant find any related text
23392  if (!!parent.attr("id")) {
23393    var parentName =
23394      parent.attr("id").charAt(0).toUpperCase() + parent.attr("id").slice(1);
23395    $(originalIMG).attr(
23396      "alt",
23397      siteSettings.name + " " + parentName + " Section Image " + randomNum
23398    );
23399    return false;
23400  }
23401  if (originalIMG.parent().prop("tagName") == "BODY") {
23402    $(originalIMG).attr("alt", "Tracking Pixel " + randomNum);
23403  } else if (ele.text().replace(/\s/g, "").length == "") {
23404    searchForText(parent, originalIMG);
23405  } else {
23406    $(originalIMG).attr(
23407      "alt",
23408      ele
23409        .text()
23410        .trim()
23411        .replace(/\n.*/g, "")
23412        .split(/\. |\! |\? /)[0]
23413    );
23414  }
23415}
23416
23417windowObject.on("load", function () {
23418  $("body img").each(function (i, v) {
23419    var img = $(this);
23420    if (!img.attr("alt")) {
23421      searchForText(img);
23422    }
23423  });
23424});
23425
23426// ADA Skip to Content
23427
23428var skipToContentButton = $("#skip-to-content");
23429
23430if (skipToContentButton.length) {
23431  var skipToTarget = $("#content").length ? $("#content") : photos.next(["id"]);
23432
23433  skipToContentButton.attr("href", "#" + skipToTarget.attr("id"));
23434  skipToTarget.attr("tabindex", "-1");
23435
23436  skipToContentButton.on("click", function (event) {
23437    $("html, body")
23438      .stop()
23439      .animate(
23440        {
23441          scrollTop:
23442            $(skipToContentButton.attr("href")).offset().top - headerHeight,
23443        },
23444        400
23445      );
23446
23447    skipToTarget.focus();
23448    event.preventDefault();
23449  });
23450}
23451
23452// Main menu keyboard navigation
23453
23454$("> ul > li", headerMainMenu)
23455  .on("mouseenter", function () {
23456    $(this).siblings().addBack().removeClass("expanded");
23457    documentObject.off("mousedown.headerMainMenu");
23458  })
23459  .children("a")
23460  .on("focus", function () {
23461    if (keyboardNavigation) {
23462      $(this)
23463        .parents("li")
23464        .addClass("expanded")
23465        .siblings()
23466        .removeClass("expanded");
23467
23468      documentObject.on("mousedown.headerMainMenu", function () {
23469        $(".expanded", headerMainMenu).removeClass("expanded");
23470        documentObject.off("mousedown.headerMainMenu");
23471      });
23472    }
23473  });
23474
23475// Main menu (mobile navigation)
23476
23477hamburgerNavigationTrigger.on("click", function () {
23478  var _this = $(this);
23479
23480  rootObject.toggleClass("hamburger-navigation-visible");
23481
23482  // ADA
23483  _this.attr("aria-expanded") === "false"
23484    ? _this.attr("aria-expanded", "true")
23485    : _this.attr("aria-expanded", "false");
23486});
23487
23488var hamburgerNavigationExpandSubmenu = function (target) {
23489  target
23490    .addClass("expanded")
23491    .siblings()
23492    .each(function () {
23493      hamburgerNavigationCollapseSubmenu($(this));
23494    });
23495};
23496
23497var hamburgerNavigationCollapseSubmenu = function (target) {
23498  target.removeClass("expanded").find(".expanded").removeClass("expanded");
23499};
23500
23501hamburgerNavigationParent.each(function () {
23502  var target = $(this);
23503
23504  $("> .plus", target).on("click", function (event) {
23505    if (target.hasClass("expanded")) {
23506      hamburgerNavigationCollapseSubmenu(target);
23507    } else {
23508      hamburgerNavigationExpandSubmenu(target);
23509    }
23510
23511    event.preventDefault();
23512  });
23513});
23514
23515// Scroll To Explore
23516
23517$(".scroll-to-explore", photos).click(function (event) {
23518  event.preventDefault();
23519  $("html, body")
23520    .stop()
23521    .animate({ scrollTop: photos.height() - headerHeight }, 400);
23522});
23523
23524// My preferences FORM multiply selects
23525
23526var multiSelect = $(".select-multiple");
23527
23528multiSelect.each(function () {
23529  $(this).select2();
23530});
23531
23532$("#login-form").submit(function () {
23533  if ($(this).validationEngine("validate")) {
23534    $(".loading-overlay").addClass("visible");
23535  }
23536});
23537
23538$("#profile-info-form, form.preferences").submit(function () {
23539  if ($(this).validationEngine("validate")) {
23540    $(".loading-overlay").addClass("visible");
23541  }
23542});
23543
23544// Format date input on profile page
23545function formatDate(e) {
23546  var input = e.target;
23547  var key = e.keyCode || e.charCode;
23548  if (key < 48 || key > 57) {
23549    e.preventDefault();
23550    return;
23551  }
23552  var value = input.value.replace(/\D/g, "").substring(0, 8);
23553  var day = value.substring(0, 2);
23554  var month = value.substring(2, 4);
23555  var year = value.substring(4);
23556  if (value.length > 4) {
23557    input.value = day + "/" + month + "/" + year;
23558  } else if (value.length > 2) {
23559    input.value = day + "/" + month;
23560  } else {
23561    input.value = day;
23562  }
23563}
23564
23565//  On submit gcaptcha
23566// function inviteFriendSubmit() {
23567//     grecaptcha.ready(function() {
23568//         grecaptcha.execute('6LdNSaYlAAAAAN4Jg6PFVUsnTsXh160Oeat3yx34', { action: 'submit'}).then(function(token) {
23569//             console.log('token', token);
23570//             $('#invite-friend-form').submit();
23571//         });
23572//     });
23573// }
23574
23575// on Join form submit gcaptcha
23576// function joinFormSubmit() {
23577//     grecaptcha.ready(function() {
23578//         grecaptcha.execute('6LdNSaYlAAAAAN4Jg6PFVUsnTsXh160Oeat3yx34', { action: 'submit'}).then(function(token) {
23579//             console.log('token', token);
23580//             $("#captchaForm").submit();
23581//         });
23582//     });
23583// }
23584
23585// offers page tabs
23586// $('#offer-tabs li a:not(:first)').addClass('inactive');
23587// $('.tabs-wrapper').hide();
23588// $('.tabs-wrapper:first').show();
23589// $('#offer-tabs li a').click(function(){
23590// 	var item = $(this).attr('id');
23591//   if($(this).hasClass('inactive')){ //this is the start of our condition
23592// 	$('#offer-tabs li a').addClass('inactive');
23593// 	$(this).removeClass('inactive');
23594
23595// 	$('.tabs-wrapper').hide();
23596// 	$('#'+ item + 'C').fadeIn('slow');
23597//  }
23598// });
23599
23600if ($(".specials-content").length) {
23601  var offerTile = $(".offer-tile");
23602
23603  $("#offer-tabs a").click(function () {
23604    $("#offer-tabs a").removeClass("active");
23605    $(this).addClass("active");
23606
23607    $(".specials-content .tab").removeClass("active");
23608
23609    $(".specials-content .tabs-wrapper").removeClass("active");
23610
23611    $(
23612      '.specials-content .tabs-wrapper[data-tab="' + $(this).data("tab") + '"]'
23613    ).addClass("active");
23614
23615    $(
23616      '.specials-content .tab[data-tab="' + $(this).data("tab") + '"]'
23617    ).addClass("active");
23618  });
23619
23620  // var offerTab = $("#offer-tabs a").removeClass("active");
23621}
23622
23623
23624if ($(".offers-wrapper .offer-tile").length) {
23625  // alert("hi");
23626  $(".no-offers").removeClass("active");
23627}
23628else {
23629  $(".no-offers").addClass("active");
23630}
23631
23632
23633
23634
23635
23636
23637// $(".offer-region").delegate('input:checkbox', 'change', function() {
23638// 	var filters = $.map($(".offer-region").val().toArray(), function(e){
23639// 		return $(e).val();
23640// 	}).join(".");
23641// 	alert(filters);
23642// 	$("div.FilterContainer").find(".offer-tile").hide();
23643// 	$("div.FilterContainer").find("div." + filters).show();
23644// });
23645
23646// $('.tabs-wrapper').delegate('input:checkbox', 'change', function()
23647// {
23648//      var $lis = $('.FilterContainer .offer-tile').show();
23649//      //For each one checked
23650//      $('input:checked').each(function()
23651//      {
23652// 		$('.FilterContainer .offer-tile').hide();
23653//           $lis.filter('.' + $(this).attr('rel')).show();
23654//      });
23655// }).find('input:checkbox').change();
23656
23657window.onload = function () {
23658  setTimeout(() => {
23659    const birthdayDisplayField = document.querySelector("#birthday_display");
23660    const originalBirthdayField = document.querySelector("#birthday");
23661    if (birthdayDisplayField) {
23662      birthdayDisplayField.addEventListener("change", () => {
23663        let originalBirthday = "";
23664        let birthdayDisplay = birthdayDisplayField.value;
23665        let birthdayDisplayArray = birthdayDisplay.split("/");
23666        originalBirthday = `${birthdayDisplayArray[0]}/${birthdayDisplayArray[1]}/${birthdayDisplayArray[2]}`;
23667        originalBirthdayField.value = originalBirthday;
23668      });
23669    }
23670  }, 1000);
23671
23672  if (!$('#hamburger-navigation .main-menu .menu.level-1 li').length) {
23673    $('#hamburger-navigation-trigger').addClass('nav-hide');
23674  }
23675};
23676
23677
23678$(document).ready(function() {
23679  $('.loyalty-offers-tabs li input[type="radio"]').each(function() {
23680      const categoryName = $(this).data('category-name');
23681      const hasSpecials = $(`#offers .offer-tile[data-category-name*="${categoryName}"]`).length > 0;
23682      if (!hasSpecials) {
23683          $(this).closest('li').hide();
23684      }
23685  });
23686  if ($('.loyalty-offers-tabs li:visible').length === 0) {
23687      $('.loyalty-offers-tabs').hide();
23688  }
23689});
23690
23691$("body").on("click", ".avaliable-rewards a.btns-custom", function (e) {
23692  e.preventDefault();
23693  $(this).closest('tr').toggleClass('activeCard');
23694  $(this).closest('tr').find('.awards-description').slideToggle();
23695});
23696
23697$("body").on("click", ".mobile-voucher-container a.btns-custom" , function(e){
23698  e.preventDefault();
23699  $(this).closest('.mobile-voucher-container').toggleClass('activeCard');
23700  $(this).closest('.mobile-voucher-container').find('.awards-description').slideToggle();
23701});
23702
23703// // Initializing Data Tables
23704// $(document).ready(function () {
23705//   $('#avalibaleRewards').DataTable({
23706//     columns: [
23707//       { data: 'image', orderable: false },
23708//       { data: 'award', orderable: true },
23709//       { data: 'points', orderable: true },
23710//       { data: 'status', orderable: false }
23711//     ],
23712//     order: [[2, 'asc']],
23713//     responsive: true
23714//   });
23715
23716//   $('#redeemRewards').DataTable({
23717//     columns: [
23718//       { data: 'award', orderable: true },
23719//       { data: 'points', orderable: true },
23720//       { data: 'issued', orderable: true },
23721//       { data: 'expire', orderable: true },
23722//       { data: 'status', orderable: true }
23723//     ],
23724//     order: [[2, 'asc']],
23725//     responsive: true
23726//   });
23727
23728
23729//   // Reedem Awards
23730//   const avaliableRewards = $('#avalibaleRewards_wrapper');
23731//   const avaliableRewardsBtn = $('.btn', avaliableRewards);
23732//   const rewardErrorMessage = $(".my-rewards .error-message");
23733//   const notAvaliableRewardsBtn = $('.btn.noenough-balance', avaliableRewards);
23734
23735//   notAvaliableRewardsBtn.on("click", function (e) {
23736//     return false;
23737//   });
23738
23739//   avaliableRewardsBtn.on("click", function (e) {
23740//     e.preventDefault();
23741//     if (!confirm('Are you sure want to redeem this award ?')) {
23742//       rewardErrorMessage.html(`You have cancelled the redeem request.`).show();
23743//     } else {
23744//       $(".loading-overlay").addClass("visible");
23745//       const productCode = $(this).attr('data-reward');
23746//       const points = $(this).attr('data-points');
23747//       if (productCode && points) {
23748//         $.ajax({
23749//           type: "POST",
23750//           url: "/json/redeempoint.json",
23751//           data: { productCode: productCode, points: points },
23752//           success: function (data) {
23753//             if (data.code == 200) {
23754//               rewardErrorMessage.html(data.text).show();
23755//               window.location.reload();
23756//             } else {
23757//               rewardErrorMessage.html(data.text).show();
23758//             }
23759//             $(".loading-overlay").removeClass("visible");
23760//           }
23761//         });
23762//       }
23763//     }
23764//     $(window).scrollTop(0);
23765//     setTimeout(() => {
23766//       rewardErrorMessage.html(' ').hide();
23767//     }, 5000);
23768//   });
23769// });
23770
23771
23772
23773$(document).ready(function () {
23774  // Initialize DataTables
23775  $('#avalibaleRewards').DataTable({
23776    columns: [
23777      // { data: 'image', orderable: false },
23778      { data: 'award', orderable: true },
23779      { data: 'points', orderable: true },
23780      { data: 'status', orderable: false }
23781    ],
23782    order: [[2, 'asc']],
23783    responsive: true
23784  });
23785
23786  // Delegated event handler for redeem buttons (including paginated rows)
23787  $('#avalibaleRewards, .mobile_awards_wrapper').on("click", ".redeem-button:not(.noenough-balance)", function (e) {
23788    e.preventDefault();
23789
23790    const rewardErrorMessage = $(".my-rewards .error-message");
23791
23792    if (!confirm('Are you sure want to redeem this award ?')) {
23793      rewardErrorMessage.html(`You have cancelled the redeem request.`).show();
23794    } else {
23795      $(".loading-overlay").addClass("visible");
23796
23797      const productCode = $(this).attr('data-reward');
23798      const points = $(this).attr('data-points');
23799
23800      if (productCode && points) {
23801        $.ajax({
23802          type: "POST",
23803          url: "/json/redeempoint.json",
23804          data: { productCode: productCode, points: points },
23805          success: function (data) {
23806            rewardErrorMessage.html(data.text).show();
23807            if (data.code == 200) {
23808              window.location.reload();
23809            }
23810            $(".loading-overlay").removeClass("visible");
23811          }
23812        });
23813      }
23814    }
23815
23816    $(window).scrollTop(0);
23817    setTimeout(() => {
23818      rewardErrorMessage.html(' ').hide();
23819    }, 5000);
23820  });
23821});
23822
23823
23824
23825
23826$(function () {
23827  var $form = $('#login-form');
23828  if (!$form.length) return;
23829
23830  var $target = $('#login-form-errors-custom-unique');
23831  if (!$target.length) return; // ensure your unique container
23832
23833  // Attach normally; we will relocate + filter prompts
23834  $form.validationEngine('detach').validationEngine('attach', {
23835    autoPositionUpdate: true
23836  });
23837
23838  var classFlag = 'parentForm' + $form.attr('id');
23839  var $activeField = $(); // track last interacted/validated field
23840
23841  // Track focus and validation events to know which field is "active"
23842  $form.on('focusin', '[data-validation-engine*="validate"], .validate', function () {
23843    $activeField = $(this);
23844    sweepAndFilter();
23845  });
23846
23847  // When a field finishes validation, prefer that as active
23848  $form.on('jqv.field.result', function (e, $field /*, isError, msg */) {
23849    $activeField = $field;
23850    sweepAndFilter();
23851  });
23852
23853  // Also sweep after overall form validation
23854  $form.on('jqv.form.result', sweepAndFilter);
23855
23856  function sweepAndFilter() {
23857    // Move all prompts for this form into the target
23858    $('.formError.' + classFlag).each(function () {
23859      var $p = $(this);
23860      $p.appendTo($target).css({
23861        position: 'static',
23862        left: '', top: '', right: '', bottom: ''
23863      });
23864      $p.find('.formErrorArrow').hide();
23865    });
23866
23867    // If we have an active field, only show its prompt; hide the rest
23868    if ($activeField && $activeField.length) {
23869      var activeKey = normalizeKey($activeField.attr('name') || $activeField.attr('id') || '');
23870      $('.formError.' + classFlag, $target).each(function () {
23871        var $p = $(this);
23872        var isForActive = promptMatchesField($p, activeKey);
23873        $p.toggle(isForActive);
23874      });
23875    } else {
23876      // No active field yet: optionally hide all
23877      $('.formError.' + classFlag, $target).hide();
23878    }
23879  }
23880
23881  // Heuristic: plugin names prompts like "{fieldName}formError" or uses id
23882  function promptMatchesField($prompt, activeKey) {
23883    if (!activeKey) return false;
23884    var cls = $prompt.attr('class') || '';
23885    // Match against "... passwordformError ..." or "... password_confirmformError ..."
23886    if (cls.indexOf(activeKey + 'formError') !== -1) return true;
23887
23888    // Fallback: store/link the field id into data on creation? Not available; try data-rel attributes if present:
23889    var rel = $prompt.attr('data-rel') || '';
23890    if (rel && rel.indexOf(activeKey) !== -1) return true;
23891
23892    return false;
23893  }
23894
23895  function normalizeKey(s) {
23896    // plugin often uses the field name verbatim; keep underscores. Remove [] from array names
23897    return (s || '').replace(/\[\]$/, '');
23898  }
23899
23900  // Initial sweep
23901  sweepAndFilter();
23902});
23903
23904if ($("#content .change-password-wrapper").length) {
23905  $("#photos").hide(); // hides #photos even if it comes before #content
23906}
23907
23908// // Inquiry Form Hotel alphabetical order
23909document.addEventListener("DOMContentLoaded", function () {
23910    const select = document.getElementById("properties_qyzBFcJ5iiGlZoz9znbY");
23911
23912    let options = Array.from(select.options).slice(1); // keep first option
23913
23914    options.sort((a, b) => a.text.localeCompare(b.text));
23915
23916    options.forEach(option => select.add(option));
23917});
23918;(function($){
23919    $.fn.extend({
23920        dob: function(options) {
23921
23922            var settings = $.extend({}, {
23923                separator: '/'
23924            }, options);
23925
23926            return this.each(function() {
23927                var minYear     = (new Date()).getFullYear();
23928                var minMonth    = (new Date()).getMonth() + 1;
23929                var minDay      = (new Date()).getDate();
23930
23931                if (typeof settings.minAge != 'undefined') {
23932                    minYear = minYear - settings.minAge;
23933                }
23934
23935                function isValidDate(day, month, year) {
23936                    // Check the ranges of month and year
23937                    if (year < 1000 || year > 3000 || month == 0 || month > 12) {
23938                        return false;
23939                    }
23940
23941                    var monthLength = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
23942
23943                    // Adjust for leap years
23944                    if(year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)) {
23945                        monthLength[1] = 29;
23946                    }
23947
23948                    // Check the range of the day
23949                    return day > 0 && day <= monthLength[month - 1];
23950                }
23951
23952                // Reference to original context
23953                var $this = $(this),
23954                    $this_date_array = $this.val().split(settings.separator);
23955
23956                // Define storage for UI elements
23957                var $days, $months, $years;
23958
23959                // Build new UI elements
23960                $days = $('<select>', {'class':'days'}).append($('<option>').val('').html('Day'));
23961                $months = $('<select>', {'class':'months'}).append($('<option>').val('').html('Month'));
23962                $years = $('<select>', {'class':'years'}).append($('<option>').val('').html('Year'));
23963
23964                // Construct days
23965                for(var i=1;i<=31;i++){
23966                    $days.append(
23967                        $('<option>').attr({
23968                            value: i,
23969                            selected: ($this_date_array[1] && parseInt($this_date_array[1],10) == i) ? true : false
23970                        }).html(i)
23971                    );
23972                }
23973
23974                // Construct months
23975                var months = ['Jan','Feb','Mar','Apr','May','June','July','Aug','Sept','Oct','Nov','Dec'];
23976                $.each(months, function(k,v){
23977                    $months.append(
23978                        $('<option>').attr({
23979                            value: k+1,
23980                            selected: ($this_date_array[0] && parseInt($this_date_array[0],10) == (k+1)) ? true : false
23981                        }).html(v)
23982                    );
23983                });
23984
23985                // Construct years
23986                for(var i=-1;i++ < 100;){
23987                    var year = minYear - i;
23988                    $years.append(
23989                        $('<option>').attr({
23990                            value: year,
23991                            selected: ($this_date_array[2] && parseInt($this_date_array[2],10) == year) ? true : false
23992                        }).html(year)
23993                    );
23994                }
23995
23996                // Bind events
23997                $days.bind("change", function(){
23998                    if ($years.val() !== '' && $years.val() == minYear
23999                        && $months.val() != '' && $months.val() >= minMonth
24000                        && $days.val() != '' && $days.val() > minDay) {
24001
24002                        $days.val('');
24003                        if ($.validationEngine) {
24004                            $days.validationEngine('validate');
24005                        }
24006                    }
24007
24008                    if ($months.val() && $days.val() && $years.val()) {
24009                        if ($.validationEngine) {
24010                            if (!isValidDate($days.val(), $months.val(), $years.val())) {
24011                                $days.val('');
24012                                $days.validationEngine('validate');
24013                            }
24014                        }
24015                        $this.val($months.val() + settings.separator + $days.val() + settings.separator + $years.val());
24016                    } else {
24017                        $this.val('');
24018                    }
24019                });
24020                $months.bind("change", function(){
24021                    if ($years.val() !== '' && $years.val() == minYear
24022                        && $months.val() != '' && $months.val() > minMonth) {
24023
24024                        $months.val('');
24025                        if ($.validationEngine) {
24026                            $months.validationEngine('validate');
24027                        }
24028                    }
24029
24030                    if ($months.val() && $days.val() && $years.val()) {
24031                        if ($.validationEngine) {
24032                            if (!isValidDate($days.val(), $months.val(), $years.val())) {
24033                                $months.val('');
24034                                $months.validationEngine('validate');
24035                            }
24036                        }
24037                        $this.val($months.val() + settings.separator + $days.val() + settings.separator + $years.val());
24038                    } else {
24039                        $this.val('');
24040                    }
24041                });
24042                $years.bind("change", function(){
24043                    if ($years.val() !== '' && $years.val() == minYear
24044                        && (($months.val() != '' && $months.val() > minMonth)
24045                            || ($days.val() != '' && $days.val() > minDay))) {
24046
24047                        $years.val('');
24048                        if ($.validationEngine) {
24049                            $years.validationEngine('validate');
24050                        }
24051                    }
24052
24053                    if ($months.val() && $days.val() && $years.val()) {
24054                        if ($.validationEngine) {
24055                            if (!isValidDate($days.val(), $months.val(), $years.val())) {
24056                                $years.val('');
24057                                $years.validationEngine('validate');
24058                            }
24059                        }
24060                        $this.val($months.val() + settings.separator + $days.val() + settings.separator + $years.val());
24061                    } else {
24062                        $this.val('');
24063                    }
24064                });
24065
24066                // Hide original UI element
24067                $this.hide();
24068
24069                if (!$.isEmptyObject(settings.tabIndex)) {
24070                    var index = settings.tabIndex;
24071                    $years.attr('tabindex', index.years);
24072                    $months.attr('tabindex', index.months);
24073                    $days.attr('tabindex', index.days);
24074                }
24075
24076                var elementClass = $this.attr('class');
24077                // Inject new UI into DOM
24078                if (settings.wrapperElement.length) {
24079                    var tag     = settings.wrapperElement;
24080                    var $yearsWrapped      = $('<'+ tag +'>').append($years);
24081                    var $monthsWrapped     = $('<'+ tag +'>').append($months);
24082                    var $daysWrapped       = $('<'+ tag +'>').append($days);
24083
24084                    if (elementClass != 'undefined') {
24085                        $yearsWrapped.addClass(elementClass);
24086                        $monthsWrapped.addClass(elementClass);
24087                        $daysWrapped.addClass(elementClass);
24088                    }
24089
24090                    $this.after($yearsWrapped).after($daysWrapped).after($monthsWrapped);
24091                } else {
24092                    if (elementClass != 'undefined') {
24093                        $years.addClass(elementClass);
24094                        $months.addClass(elementClass);
24095                        $days.addClass(elementClass);
24096                    }
24097
24098                    $this.after($years).after($days).after($months);
24099                }
24100            });
24101        }
24102    });
24103})(jQuery);
24104
24105/*
24106 This file contains validations that are too specific to be part of the core
24107 Please reference the file AFTER the translation file or the rules will be overwritten
24108 Use at your own risk. We can't provide support for most of the validations
24109 */
24110(function($) {
24111    if ($.validationEngineLanguage == undefined || $.validationEngineLanguage.allRules == undefined)
24112        alert("Please include other-validations.js AFTER the translation file");
24113    else {
24114        // US postcode
24115        $.validationEngineLanguage.allRules["postcodeUS"] = {
24116            // US zip codes | Accepts 12345 and 12345-1234 format zipcodes
24117            "regex": /^\d{5}
24117(-\d{4})?$/,
24118            "alertText": "* Invalid zipcode"
24119        };
24120
24121        $.validationEngineLanguage.allRules['minLowerAlphaChars'] = {
24122            // requires at least one lower case alpha character
24123            "regex": /^(.*[a-z].*)/,
24124            "alertText": "* Must include 1 lowercase character"
24125        };
24126
24127        $.validationEngineLanguage.allRules['minUpperAlphaChars'] = {
24128            // requires at least one UPPER case alpha character
24129            "regex": /^(.*[A-Z].*)/,
24130            "alertText": "* Must include 1 uppercase character"
24131        };
24132
24133        $.validationEngineLanguage.allRules['minNumberChars'] = {
24134                // requires at least one NUMERIC
24135                "regex": /^(?=.*\d)/,
24136                "alertText": "* Must include 1 numberic"
24137        };
24138
24139        // letter numeric only
24140        $.validationEngineLanguage.allRules["onlyLetNumSpec"] = {
24141            // Good for database fields
24142            "regex": /^[0-9a-zA-Z_-]+$/,
24143            "alertText": "* Only Letters, Numbers, hyphen(-) and underscore(_) allowed"
24144        };
24145    }
24146})(jQuery);
24147
24148(function () {
24149  if (!$(".loyalty-unauthenticated").length) {
24150    return;
24151  }
24152
24153  const forms = $(".loyalty-simple-form");
24154  const highlightErrorForms = forms.filter(":not(.form-signup)"); // There's already a functionality like this for Sign Up form here - assets/loyalty/scripts/register.js
24155  const togglePassword = $(".toggle-password", forms);
24156
24157  // Validation
24158
24159  forms
24160    .validationEngine({
24161      promptPosition: "bottomLeft",
24162      autoPositionUpdate: true,
24163      scroll: false,
24164      showArrow: false,
24165      focusFirstField: false,
24166      autoHidePrompt: false,
24167      autoHideDelay: 5000,
24168      showOneMessage: true,
24169    })
24170    .on("click", '[class*="validate[required"]', function () {
24171      $(this).siblings(".formError").fadeOut();
24172    });
24173
24174  const checkInput = (input) => {
24175    const valid = input.validationEngine("validate");
24176
24177    if (valid === false) {
24178      input.parent().addClass("error-here");
24179
24180      setTimeout(function () {
24181        input.parent().removeClass("error-here");
24182      }, 2000);
24183    }
24184
24185    return valid;
24186  };
24187
24188  highlightErrorForms.each(function () {
24189    const form = $(this);
24190    const inputs = $("input", form);
24191
24192    inputs.on("change", function () {
24193      checkInput($(this));
24194    });
24195
24196    form.on("submit", function () {
24197      inputs.each(function () {
24198        if (checkInput($(this)) === false) {
24199          return false;
24200        }
24201      });
24202    });
24203  });
24204
24205  // Reveal/mask password
24206
24207  togglePassword.on("click", function () {
24208    const button = $(this);
24209    const input = button.siblings("input");
24210
24211    if (input.attr("type") === "password") {
24212      button.addClass("revealed");
24213      input.attr("type", "text");
24214    } else {
24215      button.removeClass("revealed");
24216      input.attr("type", "password");
24217    }
24218  });
24219})();
24220
24221// Language selector scripts
24222
24223(function() {
24224
24225    var langSel = $('.language_selector');
24226
24227    if (langSel.length) {
24228        var langTrigger = $('button', langSel);
24229
24230        langTrigger.on('click', function (e) {
24231            e.preventDefault();
24232
24233            langSel.toggleClass('open');
24234        });
24235    }
24236
24237})();
24238
24239(function() {
24240    function getCharacterLength(str) {
24241        return [...str].length;
24242    }
24243
24244    function getSpacesLength(str) {
24245        return str.split(" ").length - 1;
24246    }
24247
24248    const headerEl = $('#header');
24249
24250    if (!headerEl.length) {
24251        return;
24252    }
24253
24254    const headerLogoEl = $('.logo', headerEl),
24255          headerSideControlsEl = $('.side-controls', headerEl),
24256          headerMainMenuEl = $('.main-menu', headerEl),
24257          headerMainMenuElWidth = headerMainMenuEl.outerWidth(),
24258          leftBounds = Math.round(headerLogoEl.outerWidth() + headerLogoEl.offset().left),
24259          rightBounds = Math.round(windowWidth - (headerSideControlsEl.length ? headerSideControlsEl.offset().left : $(window).width()));
24260
24261    let menuElCount = 0;
24262    let menuCharCount = 0;
24263
24264    $('li a', headerMainMenuEl).each(function(){
24265        menuElCount++;
24266        menuCharCount = menuCharCount + getCharacterLength($(this).text()) + getSpacesLength($(this).text());
24267    });
24268
24269    const defaultMenuMaxWidth = ((menuElCount * 2 - 2) * 10) + (menuElCount * 2 * 28) + (menuCharCount * 11);
24270    const defaultMenuMaxWidthHamburger = (menuElCount * 2 * 20) + (menuCharCount * 11);
24271
24272    let windowBreakpointMenuSize = null;
24273    let windowBreakpointMenuHamburger = null;
24274
24275    windowObject.on('resize.globalResizeHandler init.globalResizeHandler', function(e){
24276        let windowWidth = $(window).width();
24277        let menuWidth = headerMainMenuEl.outerWidth();
24278
24279        // For menu not fitting
24280        let menuBounds = Math.round((windowWidth - menuWidth) / 2 );
24281
24282        if (e.type == 'init') {
24283            if (menuBounds > leftBounds && menuBounds > rightBounds) {
24284                windowBreakpointMenuSize = headerMainMenuElWidth + rightBounds * 2;
24285            } else {
24286                windowBreakpointMenuSize = defaultMenuMaxWidth + rightBounds * 2;
24287            }
24288        }
24289
24290        if (menuBounds < leftBounds || menuBounds < rightBounds) {
24291            rootObject.addClass('smaller-menu-text');
24292        } else if (windowBreakpointMenuSize != null && windowWidth > windowBreakpointMenuSize) {
24293            rootObject.removeClass('smaller-menu-text');
24294        }
24295
24296
24297        // For early hamburger
24298        let spaceForMenuAvailable = Math.round( windowWidth - (leftBounds + rightBounds) );
24299
24300        if (e.type == 'resize' && windowBreakpointMenuHamburger === null && menuWidth > spaceForMenuAvailable) {
24301            windowBreakpointMenuHamburger = windowWidth;
24302        } else if (e.type = 'init' && menuWidth < spaceForMenuAvailable) {
24303            windowBreakpointMenuHamburger = defaultMenuMaxWidthHamburger;
24304        }
24305
24306        if (menuWidth > spaceForMenuAvailable) {
24307            rootObject.addClass('menu-to-hamburger');
24308        } else if (windowBreakpointMenuHamburger != null && windowWidth > windowBreakpointMenuHamburger ) {
24309            rootObject.removeClass('menu-to-hamburger');
24310        }
24311
24312        headerMainMenuEl.addClass('visible');
24313    }).trigger('init.globalResizeHandler');
24314
24315})();
24316
24317// Loyalty person info in header scripts
24318
24319(function() {
24320
24321    var profileControls = $('#profile_controls');
24322
24323    if (profileControls.length) {
24324        var profileTrigger = $('button', profileControls);
24325
24326        profileTrigger.on('click', function (e) {
24327            e.preventDefault();
24328
24329            profileControls.toggleClass('open');
24330            profileControls.parent().toggleClass('open');
24331        });
24332    }
24333
24334})();
24335
24336// Register section scripts
24337
24338/**
24339 * reCAPTCHA v2 invisible callback - triggered after captcha verification
24340 * This is called by the g-recaptcha data-callback attribute on the submit button
24341 */
24342function onSubmitRegister(token) {
24343  if (token) {
24344    registrationFormSubmit();
24345  }
24346}
24347
24348function registrationFormSubmit() {
24349  let registerForm = $("#registrationForm");
24350  let jsErrorContainer = $(".js-error-container");
24351
24352  // Clear previous errors
24353  jsErrorContainer.empty();
24354
24355    // Bot autofill detection: silently block if honeypot field is filled
24356    var hpField = registerForm.find('input[name="hp_data"]');
24357    if (hpField.length && hpField.val() !== "") {
24358        jsErrorContainer.append(
24359            "<p class='error'>Registration could not be completed. Please try again.</p>"
24360        );
24361        return;
24362    }
24363
24364  // Check validity
24365  var formValid = registerForm.validationEngine("validate");
24366
24367  if (!formValid) return;
24368
24369  $(".loading-overlay").addClass("visible");
24370
24371  $.ajax({
24372    type: "POST",
24373    url: registerForm.attr("action"),
24374    data: registerForm.serialize(),
24375    success: function (data) {
24376      $(".loading-overlay").removeClass("visible");
24377
24378      $("html, body").animate(
24379        {
24380          scrollTop: $(".loyalty-unauthenticated__registration").offset().top,
24381        },
24382        300
24383      );
24384
24385      if (data.code == 200) {
24386        if (data.message && typeof data.message === "string") {
24387          let msg = data.message;
24388          if (msg.toLowerCase().indexOf("your email") > -1) {
24389            msg =
24390              "An activation email has been sent to your email. Kindly activate your account before sign in.";
24391            $(
24392              ".register-section .row .form-field-group--full.submit-container .button"
24393            ).addClass("disabled");
24394          }
24395          jsErrorContainer.append("<p class='success'>" + msg + "</p>");
24396        }
24397      } else {
24398        // There was an error
24399        if (data.message && typeof data.message === "string") {
24400          let msg = data.message;
24401          jsErrorContainer.append("<p class='error'>" + msg + "</p>");
24402        } else if (data.message && typeof data.message === "object") {
24403          var msg = [];
24404          for (var i in data.message) {
24405            if (typeof data.message[i] === "string") {
24406              msg.push(data.message[i]);
24407            } else {
24408              for (var c in data.message[i]) {
24409                msg.push(data.message[i][c]);
24410              }
24411            }
24412          }
24413          jsErrorContainer.append("<p class='error'>" + msg.join("<br>") + "</p>");
24414        }
24415
24416        jsErrorContainer.on("click", function () {
24417          jsErrorContainer.empty();
24418        });
24419
24420        // Reset reCAPTCHA so user can try again
24421        if (typeof grecaptcha !== "undefined") {
24422          grecaptcha.reset();
24423        }
24424      }
24425    },
24426    error: function (err) {
24427      $(".loading-overlay").removeClass("visible");
24428
24429      var errorMsg = "An error occurred. Please try again later.";
24430      if (err.responseJSON && err.responseJSON.message) {
24431        errorMsg = err.responseJSON.message;
24432      }
24433
24434      jsErrorContainer.append("<p class='error'>" + errorMsg + "</p>");
24435
24436      // Reset reCAPTCHA on error
24437      if (typeof grecaptcha !== "undefined") {
24438        grecaptcha.reset();
24439      }
24440    },
24441  });
24442}
24443
24444// Register section scripts
24445
24446function passwordFormSubmit() {
24447  let registerForm = $("#passwordForm");
24448
24449  let jsErrorContainer = $(".js-error-container");
24450
24451  // Js error div clear
24452  jsErrorContainer.empty();
24453
24454  // Check validity
24455
24456  var formValid = registerForm.validationEngine("validate");
24457
24458  if (!formValid) return;
24459
24460  $(".loading-overlay").addClass("visible");
24461
24462  // Trigger form submit
24463  // registerForm.submit();
24464
24465  $.ajax({
24466    type: "POST",
24467    url: registerForm.attr("action"),
24468    data: registerForm.serialize(), // serializes the form's elements.
24469    success: function (data) {
24470      console.log("Register Form results", data);
24471
24472      $(".loading-overlay").removeClass("visible");
24473
24474      if (data.code == 200) {
24475        // Show next fieldset
24476        // if (currentStepID != regFieldsets.length - 1) {
24477        //   regFieldsets
24478        //     .removeClass("visible")
24479        //     .eq(currentStepID + 1)
24480        //     .addClass("visible");
24481        // }
24482
24483        if (data.message && typeof data.message === "string") {
24484          let msg = data.message;
24485          jsErrorContainer.append("<p>" + msg + "</p>");
24486        }
24487      } else {
24488        // there was an error;
24489        //console.log("data.message ", data.message);
24490        if (data.message && typeof data.message === "string") {
24491          let msg = data.message;
24492          jsErrorContainer.append("<p>" + msg + "</p>");
24493        } else {
24494          var msg = [];
24495          for (var i in data.message) {
24496            for (var c in data.message[i]) {
24497              msg.push(data.message[i][c]);
24498            }
24499          }
24500
24501          jsErrorContainer.append("<p>" + msg.join("\r\n") + "</p>");
24502        }
24503
24504        $(document).on("click", function () {
24505          jsErrorContainer.empty();
24506        });
24507      }
24508    },
24509    error: function (err) {
24510      $(".loading-overlay").removeClass("visible");
24511      console.log("err", err);
24512    },
24513  });
24514}
24515
24516if ($(".close-login-popup").length) {
24517	$(".close-login-popup").click(() => {
24518	  if ($(".login-popup").length) {
24519		$(".login-popup").addClass("hidden");
24520	  }
24521	});
24522  }
24523  
24524  if ($(".open-signin-popup").length) {
24525	$(".open-signin-popup").click(() => {
24526	  if ($(".login-popup").length) {
24527		$(".login-popup").removeClass("hidden");
24528	  }
24529	});
24530  }
24531  
24532  if ($(".show-registration-btn").length) {
24533	$(".show-registration-btn").click(() => {
24534	  $(".registration-form").slideDown(500);
24535	  $(".loyalty-unauthenticated__cta-container").slideUp(500);
24536	});
24537  }
24538  
24539  if ($(".close-registration-btn").length) {
24540	$(".close-registration-btn").click(() => {
24541	  $(".registration-form").slideUp(500);
24542	  $(".loyalty-unauthenticated__cta-container").slideDown(500);
24543	});
24544  }
24545
24546  $(document).ready(() => {
24547	let loc = window.location.href;
24548	if (loc.indexOf("/members/register") > -1) {
24549	  $("html, body").animate(
24550		{
24551		  scrollTop: $(".loyalty-unauthenticated__intro").offset().top,
24552		},
24553		500
24554	  );
24555	} else if (loc.indexOf("/members/password") > -1) {
24556		$("html, body").animate(
24557			{
24558				scrollTop: $(".loyalty-unauthenticated__hero").offset().top + 250,
24559			},
24560			500
24561		);
24562	}
24563  });
24564  
24565// Forms security
24566
24567if ($('#ping').length) $('#ping').after($('<input>').attr({
24568	'name': 'pong',
24569	'value': $('#ping').val(),
24570	'class': 'hide',
24571	'aria-label': 'Security Check (do not modify)'
24572}));
24573
24574// target="_blank" for external links
24575
24576$('a[rel="external"], form.form-external, a[href^="http"][href*="://"]:not([href*="' + window.location.host + '"]), a[href*=".pdf"]').attr('target', '_blank');
24577
24578// ADA Current input method detection
24579
24580var slideshowsStopped = false;
24581
24582windowObject.on('keydown', function(event) {
24583	if(event.keyCode == 9) { // Tab
24584		rootObject.addClass('keyboard-navigation');
24585		keyboardNavigation = true;
24586
24587		// Disable automatic slideshows on page when keyboard navigation is detected
24588		if (!slideshowsStopped) {
24589			$.each(slideshows, function(index, slideshow){
24590				slideshow.autoplay.stop();
24591			});
24592		}
24593	}
24594});
24595
24596whatInput.registerOnChange(function(type){
24597	if (type != 'keyboard') {
24598		rootObject.removeClass('keyboard-navigation');
24599		keyboardNavigation = false;
24600	}
24601});
24602
24603// Forms validation
24604
24605if ($.validationEngine) {
24606	$(".page-content .form, form[id*='form_form_'], #newsletter form, #blog-footer-newsletter form, header form, #invite-friend-form").validationEngine({
24607		promptPosition: "topLeft",
24608		autoPositionUpdate: true,
24609		scroll: false,
24610		showArrow: false,
24611		focusFirstField : false,
24612	}).on('click', '[class*="validate[required"]', function(){
24613		$(this).siblings('.formError').fadeOut();
24614	});
24615}
24616
24617// Datepickers
24618
24619$.datepicker.setDefaults({
24620	dateFormat: 'mm/dd/yy',
24621	showOtherMonths: true,
24622	minDate: 0,
24623	showAnim: '',
24624	onSelect: function(date, instance){
24625		instance.input.blur();
24626	}
24627});
24628
24629$.datepicker._shouldFocusInput = function(){ // Prevent datepicker from focusing on input
24630	return false;
24631};
24632
24633// Forms module on submit validation check
24634
24635$("form[id*='form_form_']").on('submit', function (event) {
24636	var formElement = $(this),
24637		captcha = $('.g-recaptcha > div', formElement),
24638		captchaResponse = $('[name="g-recaptcha-response"]', formElement);
24639
24640	if ($ && $.validationEngine && formElement.validationEngine('validate')) {
24641		// console.log('formElement validated');
24642
24643		if (captcha.length && captchaResponse.length && !captchaResponse.val()) {
24644			requestAnimationFrame(function () {
24645				captcha.addClass('error');
24646				requestAnimationFrame(function () {
24647					captcha.removeClass('error');
24648				});
24649			});
24650
24651			return false;
24652		}
24653
24654		// Send data to server and process server validation only if form passed primary validation
24655		nxgFormSubmission(event, formElement.data('element-id'), formElement.data('redirect'), formElement.data('message'));
24656	}
24657});
24658
24659// RFP Datepickers
24660
24661$(".date-picker, .date-pick, [id*='form_form_'] input[type='datepicker']").each(function(){
24662	var input = $(this),
24663		parent = input.parent();
24664
24665	input
24666		.datepicker({
24667			showOn: 'both',
24668			minDate: input.hasClass('no-min-date') ? null : $.datepicker._defaults.minDate
24669		})
24670		.wrap('<div class="datepicker-input-wrapper" />')
24671		.after('<div class="input-overlay" />');
24672
24673	parent.on('click', 'label, .input-overlay', function(event){
24674		input.datepicker('show');
24675
24676		event.preventDefault();
24677	});
24678});
24679
24680// "Checkin/Checkout connection" function
24681
24682var processCheckinCheckoutInputs = function (checkin, checkout, prefill, interval) {
24683	prefill = prefill || false;
24684	interval = interval || 1;
24685
24686	if (prefill) {
24687		var currentDate = new Date(),
24688			defaultCheckoutDate = new Date();
24689
24690		defaultCheckoutDate.setDate(defaultCheckoutDate.getDate() + interval);
24691		checkin.val($.datepicker.formatDate($.datepicker._defaults.dateFormat, currentDate)).datepicker("setDate", currentDate);
24692		checkout.val($.datepicker.formatDate($.datepicker._defaults.dateFormat, defaultCheckoutDate)).datepicker("setDate", defaultCheckoutDate);
24693	}
24694
24695	checkin.datepicker("option", "onSelect", function (selectedDate) {
24696
24697		var checkOutMinDate = new Date($.datepicker.parseDate($.datepicker._defaults.dateFormat, selectedDate));
24698
24699		checkOutMinDate.setDate(checkOutMinDate.getDate() + interval);
24700		checkout.datepicker("option", "minDate", checkOutMinDate);
24701		checkout.datepicker("setDate", checkOutMinDate);
24702	});
24703};
24704
24705// "Checkin/Checkout" connection for RFP
24706
24707processCheckinCheckoutInputs($('input[name="arrival_date"]'), $('input[name="departure_date"]'), true);
24708
24709// Responsive scrollable tables
24710
24711$('.page-content table').wrap('<div class="table-wrapper" />');
24712
24713// Even/odd rows to table
24714
24715$(".page-content table tr:nth-child(even)").removeClass('odd').addClass('even');
24716$(".page-content table tr:nth-child(odd)").removeClass('even').addClass("odd");
24717
24718// Category selector
24719
24720var processCategorySelectors = function(){
24721	$('.category-selector').each(function(){
24722		var target = $(this),
24723			buttons = $('.button', target);
24724
24725		if (!buttons.length) return;
24726
24727		if (!buttons.filter('.active').length) buttons.eq(0).addClass('active');
24728
24729		buttons.off('click.categorySelector').on('click.categorySelector', function(){
24730			var button = $(this);
24731			button.addClass('active').siblings().removeClass('active');
24732			$('select', target).prop('selectedIndex', button.index());
24733		});
24734
24735		// Select for mobile devices
24736
24737		if (!target.find('select').length) {
24738			target.append('<select aria-label="Category" />');
24739
24740			$('select', target).on('change.categorySelector', function(){
24741				buttons.eq($(this).val())[0].click();
24742			});
24743		}
24744
24745		buttons.each(function(index){
24746			var button = $(this),
24747				select = $('select', target);
24748
24749			if (!$('option', select).filter(function(){ return $(this).text() == button.text() }).length) {
24750				select.append('<option value="' + index + '" ' + (button.hasClass('active') ? 'selected' : '') + '>
24750' + button.text() + '</option>');
24751			}
24752		});
24753	});
24754
24755	if (typeof processSelects == 'function') processSelects();
24756};
24757
24758processCategorySelectors();
24759
24760// Select icons
24761
24762var processSelects = function(){
24763	$('select').each(function(){
24764		var select = $(this);
24765
24766		if(!select.hasClass('select-multiple') && !select.hasClass('no-wrapper')){
24767			if (select.parent('.select-wrapper').length) return;
24768			select.wrap('<div class="select-wrapper" data-select-class="' + select.attr('class') + '" />').after('<div class="select-icon" />');
24769		}
24770	});
24771};
24772
24773processSelects();
24774
24775// ADA functions
24776
24777var disableKeyboardNavigation = function(target){
24778	if (!target) return;
24779	var target = $(target);
24780
24781	target.find(':focusable').addBack().each(function(){
24782		var focusable = $(this);
24783		if (focusable.attr('tabindex')) focusable.data('original-tabindex', focusable.attr('tabindex'));
24784		focusable.attr('tabindex', '-1');
24785	});
24786};
24787
24788var restoreKeyboardNavigation = function(target, ignoreOriginalTabindex){
24789	if (!target) return;
24790
24791	var target = $(target),
24792		ignoreOriginalTabindex = typeof ignoreOriginalTabindex !== 'undefined' ?  ignoreOriginalTabindex : false;
24793
24794	target.find(':focusable').addBack().each(function(){
24795		var focusable = $(this);
24796		if (focusable.data('original-tabindex') && !ignoreOriginalTabindex) focusable.attr('tabindex', focusable.data('original-tabindex')).removeData('original-tabindex');
24797		else focusable.removeAttr('tabindex');
24798	});
24799};
24800
24801// ADA - assigning aria-state on load and changing it on click
24802var buttonStates = function(wrapperClass) {
24803    if (!wrapperClass) return;
24804
24805    var wrapperClass = $(wrapperClass);
24806
24807    wrapperClass.each(function(){
24808        var buttonsWrapper = $(this),
24809            buttons = $('button, .button', buttonsWrapper);
24810
24811        buttons.each(function(){
24812            var _this = $(this);
24813
24814            _this.hasClass('active') ? _this.attr('aria-pressed','true') : _this.attr('aria-pressed','false');
24815        });
24816
24817        buttons.on('click', function(){
24818            var _this = $(this);
24819
24820            buttons.attr('aria-pressed','false');
24821            _this.attr('aria-pressed','true');
24822        });
24823    });
24824};
24825
24826buttonStates('.category-selector');
24827
24828// Content "Read More"
24829
24830var contentReadMore = $('.content-read-more');
24831
24832contentReadMore.each(function(){
24833	var target = $(this),
24834		parent = target.parent();
24835
24836	if (parent.is('p')) {
24837		target.insertBefore(parent);
24838		if (parent.is(':empty')) parent.remove();
24839	}
24840
24841	target.nextAll().wrapAll('<div class="content-read-more-wrapper" />');
24842
24843	var wrapper = target.next('.content-read-more-wrapper');
24844
24845	target.insertAfter(wrapper);
24846
24847	function toggleHiddenContent(collapse){
24848
24849		if(collapse) {
24850			wrapper.css({
24851				height:0
24852			});
24853
24854		}else {
24855			wrapper.show(500);
24856		}
24857
24858	}
24859
24860	target.on("click", function(e){
24861		wrapper.css({
24862			height:target.hasClass('collapsed') ? wrapper[0].scrollHeight : 0
24863		});
24864
24865		target.toggleClass('collapsed');
24866	});
24867});
24868
24869// Form Checkboxes (Standard)
24870
24871if ($('.form, .loyalty-simple-form').length) {
24872
24873	$('input[type="checkbox"], input[type="radio"]').each(function(){
24874		var button = $(this),
24875			label = button.parents('label'),
24876			type = button.attr('type'),
24877			name = button.attr('name');
24878
24879		if (label.length) {
24880			label.addClass('custom-' + type).attr({
24881				'role': type,
24882				'tabindex': '0',
24883				'aria-checked': 'false'
24884			});
24885
24886			if (button.is(':checked')) label.addClass('checked').attr('aria-checked', 'true');
24887			if (button.is(':checked')) label.addClass('active').attr('aria-checked', 'true');
24888
24889			button.click(function () {
24890				if (type == 'radio' && typeof name != 'undefined') $('input[name="' + name + '"]').parents('label').removeClass('checked').attr('aria-checked','false').removeClass('active');
24891
24892				label.toggleClass('checked', this.checked);
24893				label.toggleClass('active', this.checked);
24894
24895				if (label.hasClass('checked')){
24896					label.attr('aria-checked','true');
24897				} else{
24898					label.attr('aria-checked','false');
24899				}
24900			});
24901		}
24902	});
24903
24904}
24905
24906// Form Checkboxes
24907
24908if ($('.custom-checkbox-form').length) {
24909
24910	$('.custom-checkbox-form fieldset').each(function(){
24911		var thisFieldset = $(this),
24912			selectAllOptions = $('.select-all', thisFieldset),
24913			selectAllOptionsInput = $('input[type="checkbox"]', selectAllOptions);
24914
24915		$('input[type="checkbox"], input[type="radio"]', thisFieldset).each(function(){
24916			var button = $(this),
24917				label = button.parents('label'),
24918				type = button.attr('type'),
24919				name = button.attr('name');
24920
24921			if (label.length && !label.hasClass('select-all')) {
24922				label.addClass('custom-' + type).attr({
24923					'role': type,
24924					'tabindex': '0',
24925					'aria-checked': 'false'
24926				});
24927
24928				if (button.is(':checked')) label.addClass('checked').attr('aria-checked', 'true');
24929				if (button.is(':checked')) label.addClass('active').attr('aria-checked', 'true');
24930
24931				button.click(function () {
24932					if (type == 'radio' && typeof name != 'undefined') $('input[name="' + name + '"]').parents('label').removeClass('checked').attr('aria-checked','false').removeClass('active');
24933
24934					selectAllOptions.attr('aria-checked', false);
24935					selectAllOptions.removeClass('checked');
24936					selectAllOptions.removeClass('active');
24937					selectAllOptionsInput.prop('checked', false);
24938
24939					label.toggleClass('checked', this.checked);
24940					label.toggleClass('active', this.checked);
24941
24942					if (label.hasClass('checked')){
24943						label.attr('aria-checked','true');
24944					} else{
24945						label.attr('aria-checked','false');
24946					}
24947
24948				});
24949			}
24950		});
24951
24952		selectAllOptions.on('click', function () {
24953			var thisAllButton = $(this),
24954				thisInput = $('input[type="checkbox"]', thisAllButton),
24955				allButtons = $('input[type="checkbox"], input[type="radio"]', thisFieldset);
24956
24957			if (thisInput.is(':checked')) thisAllButton.addClass('checked').attr('aria-checked', true);
24958			if (thisInput.is(':checked')) thisAllButton.addClass('active').attr('aria-checked', true);
24959
24960			thisInput.click(function () {
24961				thisAllButton.addClass('checked', this.checked);
24962				thisAllButton.addClass('active', this.checked);
24963
24964				if (thisAllButton.hasClass('checked')){
24965					$('label', thisFieldset).attr('aria-checked', true);
24966					$('label', thisFieldset).addClass('checked');
24967					$('label', thisFieldset).addClass('active');
24968					allButtons.prop('checked', true);
24969				}
24970
24971			});
24972		});
24973	});
24974}
24975
24976// SVG sprite for IE
24977
24978svg4everybody();
24979
24980$.fn.addFocusLock = function(settings) {
24981    if (this.data('focusLockAdded')) return this;
24982
24983    var target = this,
24984        namespace = 'focusLock_' + Math.random().toString(36).substr(2, 9),
24985        focusLockActive = false,
24986        ariaHiddenUndo = null,
24987        settings = $.extend({
24988            trigger: null,
24989            onEscapeCallback: function(){},
24990            onClickOutsideCallback: function(){}
24991        }, settings);
24992
24993    target.data('focusLockAdded', true);
24994
24995    // Private methods
24996
24997    var escape = function(event){
24998        if (typeof settings.onEscapeCallback === 'function') {
24999            settings.onEscapeCallback(event);
25000        }
25001    };
25002
25003    var clickOutside = function(event){
25004        if (typeof settings.onClickOutsideCallback === 'function') {
25005            settings.onClickOutsideCallback(event);
25006        }
25007    };
25008
25009    var addEvents = function(){
25010        target.on('keydown.' + namespace, function (event) {
25011            if (!event.isDefaultPrevented()) {
25012                if (event.code === 'Escape' || event.key === 'Escape' || event.keyCode === 27) {
25013                    escape(event);
25014                    event.preventDefault();
25015                }
25016            }
25017        });
25018
25019        documentObject.on('click.' + namespace, function (event) {
25020            if (!event.isDefaultPrevented()) {
25021                if ((settings.trigger && settings.trigger.toArray().indexOf(event.target) === -1 && $(event.target).closest(settings.trigger).length < 1) && $(event.target).closest(target).length < 1) {
25022                    clickOutside(event);
25023                }
25024            }
25025        });
25026    };
25027
25028    var removeEvents = function(){
25029        target.off('keydown.' + namespace);
25030        documentObject.off('click.' + namespace);
25031    };
25032
25033    var createGuards = function(){
25034        target.before(
25035            '<div data-focus-guard tabIndex="0" />' +
25036            '<div data-focus-guard tabIndex="1" />'
25037        );
25038        target.after('<div data-focus-guard tabIndex="0" />');
25039    };
25040
25041    var removeGuards = function(){
25042        target.siblings('[data-focus-guard]').remove();
25043    };
25044
25045    // Public methods
25046
25047    target.focusLockOn = function(){
25048        addEvents();
25049        createGuards();
25050
25051        focusLock.on(target[0]);
25052        ariaHiddenUndo = hideOthers(target[0]);
25053
25054        focusLockActive = true;
25055    };
25056
25057    target.focusLockOff = function(){
25058        removeEvents();
25059        removeGuards();
25060
25061        focusLock.off(target[0]);
25062        if (ariaHiddenUndo) {
25063            ariaHiddenUndo();
25064            ariaHiddenUndo = null;
25065        }
25066
25067        focusLockActive = false;
25068
25069        if (settings.trigger) {
25070            settings.trigger.focus();
25071        }
25072    };
25073
25074    return target;
25075};
25076
25077(function () {
25078  if (booking.length) {
25079    // Lightbox
25080
25081    var bookingTriggers = $(".booking-trigger"),
25082      bookingCloseButton = $(".booking-close-button", booking);
25083
25084    booking.addFocusLock({
25085      trigger: bookingTriggers.eq(0),
25086      onEscapeCallback: function () {
25087        closeBooking();
25088      },
25089      onClickOutsideCallback: function () {
25090        closeBooking();
25091      },
25092    });
25093
25094    var openBooking = function () {
25095      rootObject.addClass("booking-visible");
25096
25097      booking.focusLockOn();
25098
25099      bookingTriggers.attr("aria-expanded", "true");
25100    };
25101
25102    var closeBooking = function () {
25103      booking.focusLockOff();
25104
25105      rootObject.removeClass("booking-visible");
25106
25107      bookingTriggers.attr("aria-expanded", "false");
25108    };
25109
25110    bookingCloseButton.on("click", function () {
25111      closeBooking();
25112    });
25113
25114    bookingTriggers.on("click", function (event) {
25115      if (rootObject.hasClass("booking-visible")) {
25116        closeBooking();
25117      } else {
25118        openBooking();
25119      }
25120
25121      event.preventDefault();
25122    });
25123
25124    // Destinations
25125
25126    var destinationsSelector = $(".destinations-selector", booking);
25127
25128    $("select", destinationsSelector).select2({
25129      width: "100%",
25130      dropdownParent: destinationsSelector,
25131      placeholder: $("select", destinationsSelector).data("placeholder"),
25132      sorter: function(data) {
25133        return data.sort(function(a, b) {
25134          return a.text.localeCompare(b.text);
25135        });
25136      },
25137      matcher: function (params, data) {
25138          // If no search term, show all
25139          if ($.trim(params.term) === '') {
25140              return data;
25141          }
25142
25143          if (!data.element) {
25144              return null;
25145          }
25146
25147          var term = params.term.toLowerCase();
25148
25149          var text = (data.text || '').toLowerCase();
25150          var address = ($(data.element).data('address') || '').toLowerCase();
25151
25152          // Match against visible text OR hidden address
25153          if (text.indexOf(term) > -1 || address.indexOf(term) > -1) {
25154              return data;
25155          }
25156
25157          return null;
25158      }
25159    });
25160
25161    // Dates
25162
25163    var bookingDatepicker = {
25164      container: $("#booking-datepicker"),
25165      dateFormat: $.datepicker._defaults.dateFormat,
25166      dates: [null, null],
25167      inputs: {
25168        checkin: $("#booking-checkin"),
25169        checkout: $("#booking-checkout"),
25170      },
25171      triggers: {
25172        checkin: $(".date-button.checkin", booking),
25173        checkout: $(".date-button.checkout", booking),
25174      },
25175      steps: {
25176        checkinStep: "checkin-step",
25177        checkoutStep: "checkout-step",
25178        currentStep: "checkin-step",
25179      },
25180      buttons: {},
25181      initial: true,
25182    };
25183
25184    processCheckinCheckoutInputs(
25185      bookingDatepicker.inputs.checkin,
25186      bookingDatepicker.inputs.checkout,
25187      true
25188    );
25189
25190    bookingDatepicker.triggers.checkin
25191      .find(".date")
25192      .text(bookingDatepicker.inputs.checkin.val());
25193    bookingDatepicker.triggers.checkout
25194      .find(".date")
25195      .text(bookingDatepicker.inputs.checkout.val());
25196    bookingDatepicker.dates[0] = $.datepicker
25197      .parseDate(
25198        bookingDatepicker.dateFormat,
25199        bookingDatepicker.inputs.checkin.val()
25200      )
25201      .getTime();
25202    bookingDatepicker.dates[1] = $.datepicker
25203      .parseDate(
25204        bookingDatepicker.dateFormat,
25205        bookingDatepicker.inputs.checkout.val()
25206      )
25207      .getTime();
25208
25209    var setBookingDatepickerDates = function (step) {
25210      $.each(bookingDatepicker.inputs, function () {
25211        $(this).val("");
25212      });
25213
25214      if (bookingDatepicker.dates[0] != null && step == "checkin") {
25215        // First step, checkin is selected
25216
25217        bookingDatepicker.inputs.checkin.val(
25218          $.datepicker.formatDate(
25219            bookingDatepicker.dateFormat,
25220            $.datepicker.parseDate("@", bookingDatepicker.dates[0])
25221          )
25222        );
25223        bookingDatepicker.triggers.checkin
25224          .find(".date")
25225          .text(bookingDatepicker.inputs.checkin.val());
25226        bookingDatepicker.triggers.checkout.find(".date").text("");
25227      } else if (
25228        bookingDatepicker.dates[0] != null &&
25229        bookingDatepicker.dates[1] != null
25230      ) {
25231        // Second step, checkin and chechout are selected
25232
25233        bookingDatepicker.inputs.checkin
25234          .val(
25235            $.datepicker.formatDate(
25236              bookingDatepicker.dateFormat,
25237              $.datepicker.parseDate("@", bookingDatepicker.dates[0])
25238            )
25239          )
25240          .trigger("change");
25241        bookingDatepicker.inputs.checkout
25242          .val(
25243            $.datepicker.formatDate(
25244              bookingDatepicker.dateFormat,
25245              $.datepicker.parseDate("@", bookingDatepicker.dates[1])
25246            )
25247          )
25248          .trigger("change");
25249        bookingDatepicker.triggers.checkin
25250          .find(".date")
25251          .text(bookingDatepicker.inputs.checkin.val());
25252        bookingDatepicker.triggers.checkout
25253          .find(".date")
25254          .text(bookingDatepicker.inputs.checkout.val());
25255      } else if (
25256        bookingDatepicker.dates[0] != null &&
25257        bookingDatepicker.dates[1] == null
25258      ) {
25259        // In case user will close the datepicker before selecting the checkout date
25260
25261        var checkoutDate = bookingDatepicker.container.datepicker(
25262          "getDate",
25263          "+1d"
25264        );
25265
25266        checkoutDate.setDate(checkoutDate.getDate() + 1);
25267        bookingDatepicker.dates[1] = $.datepicker
25268          .parseDate(
25269            bookingDatepicker.dateFormat,
25270            $.datepicker.formatDate(bookingDatepicker.dateFormat, checkoutDate)
25271          )
25272          .getTime();
25273
25274        bookingDatepicker.container.datepicker("refresh");
25275
25276        bookingDatepicker.inputs.checkin
25277          .val(
25278            $.datepicker.formatDate(
25279              bookingDatepicker.dateFormat,
25280              $.datepicker.parseDate("@", bookingDatepicker.dates[0])
25281            )
25282          )
25283          .trigger("change");
25284        bookingDatepicker.inputs.checkout
25285          .val(
25286            $.datepicker.formatDate(
25287              bookingDatepicker.dateFormat,
25288              $.datepicker.parseDate("@", bookingDatepicker.dates[1])
25289            )
25290          )
25291          .trigger("change");
25292        bookingDatepicker.triggers.checkin
25293          .find(".date")
25294          .text(bookingDatepicker.inputs.checkin.val());
25295        bookingDatepicker.triggers.checkout
25296          .find(".date")
25297          .text(bookingDatepicker.inputs.checkout.val());
25298      }
25299    };
25300
25301    var showBookingDatepicker = function () {
25302      if (bookingDatepicker.initial === true) {
25303        initDatepicker();
25304        bookingDatepicker.initial = false;
25305      }
25306      bookingDatepicker.steps.currentStep = bookingDatepicker.steps.checkinStep;
25307      bookingDatepicker.container
25308        .removeClass(
25309          bookingDatepicker.steps.checkinStep +
25310            " " +
25311            bookingDatepicker.steps.checkoutStep
25312        )
25313        .addClass(bookingDatepicker.steps.currentStep);
25314
25315      bookingDatepicker.container.addClass("visible");
25316
25317      documentObject
25318        .on("mousedown.bookingDatepicker", function (event) {
25319          if (
25320            event.target !== bookingDatepicker.triggers.checkin[0] &&
25321            event.target !== bookingDatepicker.triggers.checkout[0] &&
25322            $(event.target).closest(bookingDatepicker.container).length < 1
25323          ) {
25324            closeBookingDatepicker();
25325          }
25326        })
25327        .on("keydown", function (event) {
25328          if (event.keyCode == 27) {
25329            // escape
25330            bookingDatepicker.triggers.checkin.focus();
25331            closeBookingDatepicker();
25332          }
25333        });
25334    };
25335
25336    var closeBookingDatepicker = function () {
25337      bookingDatepicker.container.removeClass("visible");
25338
25339      setBookingDatepickerDates("close");
25340
25341      documentObject.off("mousedown.bookingDatepicker");
25342    };
25343
25344    function initDatepicker() {
25345      bookingDatepicker.container.datepicker({
25346        numberOfMonths: 2,
25347        dateFormat: bookingDatepicker.dateFormat,
25348        beforeShowDay: function (date) {
25349          var highlight = false,
25350            currentTime = date.getTime(),
25351            selectedTime = bookingDatepicker.dates,
25352            addClass = "ui-datepicker-highlight";
25353
25354          if (currentTime == selectedTime[0]) {
25355            addClass += " checkin-date";
25356          } else if (currentTime == selectedTime[1]) {
25357            addClass += " checkout-date";
25358          }
25359
25360          if (
25361            (selectedTime[0] && selectedTime[0] == currentTime) ||
25362            (selectedTime[1] &&
25363              currentTime >= selectedTime[0] &&
25364              currentTime <= selectedTime[1])
25365          )
25366            highlight = true;
25367
25368          return [true, highlight ? addClass : ""];
25369        },
25370        onSelect: function (dateText) {
25371          if (
25372            bookingDatepicker.dates[0] == null ||
25373            bookingDatepicker.dates[1] != null
25374          ) {
25375            // Check-in date
25376            bookingDatepicker.dates[0] = $.datepicker
25377              .parseDate(bookingDatepicker.dateFormat, dateText)
25378              .getTime();
25379            bookingDatepicker.dates[1] = null;
25380
25381            setBookingDatepickerDates("checkin");
25382
25383            bookingDatepicker.steps.currentStep =
25384              bookingDatepicker.steps.checkoutStep;
25385            bookingDatepicker.container
25386              .removeClass(
25387                bookingDatepicker.steps.checkinStep +
25388                  " " +
25389                  bookingDatepicker.steps.checkoutStep
25390              )
25391              .addClass(bookingDatepicker.steps.currentStep);
25392          } else {
25393            // Check out date
25394            if (
25395              bookingDatepicker.dates[0] ==
25396              $.datepicker
25397                .parseDate(bookingDatepicker.dateFormat, dateText)
25398                .getTime()
25399            )
25400              return false;
25401
25402            bookingDatepicker.dates[1] = $.datepicker
25403              .parseDate(bookingDatepicker.dateFormat, dateText)
25404              .getTime();
25405            bookingDatepicker.dates.sort();
25406
25407            setBookingDatepickerDates("checkout");
25408
25409            closeBookingDatepicker();
25410
25411            if (keyboardNavigation) {
25412              bookingDatepicker.triggers.checkout.focus();
25413            }
25414          }
25415        },
25416      });
25417    }
25418
25419    $([
25420      bookingDatepicker.triggers.checkin[0],
25421      bookingDatepicker.triggers.checkout[0],
25422    ]).on("click", function (event) {
25423      if (bookingDatepicker.container.hasClass("visible")) {
25424        closeBookingDatepicker();
25425      } else {
25426        showBookingDatepicker();
25427      }
25428
25429      event.preventDefault();
25430    });
25431
25432    // Visually highlight date range
25433
25434    bookingDatepicker.container.on("mouseover", "td", function () {
25435      var target = $(this);
25436
25437      if (
25438        !bookingDatepicker.container.hasClass("visible") ||
25439        typeof target.data("year") == "undefined" ||
25440        bookingDatepicker.steps.currentStep ==
25441          bookingDatepicker.steps.checkinStep
25442      )
25443        return;
25444
25445      var cells = $("td", bookingDatepicker.container),
25446        indexes = [
25447          cells.index(target),
25448          cells.index(cells.filter(".ui-datepicker-current-day")),
25449        ]; // [currently hovered cell, previously selected cell]
25450
25451      indexes.sort(function (a, b) {
25452        return a - b;
25453      });
25454
25455      $("td", bookingDatepicker.container).each(function (index, element) {
25456        var target = $(element);
25457        if (index >= indexes[0] && index <= indexes[1])
25458          target.addClass("ui-datepicker-highlight");
25459        else target.removeClass("ui-datepicker-highlight");
25460      });
25461    });
25462
25463    // Custom arrows
25464
25465    $(
25466      ".ui-datepicker-prev, .ui-datepicker-next",
25467      bookingDatepicker.container
25468    ).on("click", function (event) {
25469      $(
25470        ".ui-datepicker-header ." + $(this).data("target"),
25471        bookingDatepicker.container
25472      ).trigger("click");
25473
25474      event.preventDefault();
25475    });
25476
25477    // Booking datepicker ADA
25478
25479    bookingDatepicker.buttons = $("a, button", bookingDatepicker.container);
25480
25481    $([
25482      bookingDatepicker.triggers.checkin[0],
25483      bookingDatepicker.triggers.checkout[0],
25484    ]).on("keydown", function (event) {
25485      if (!keyboardNavigation) return;
25486
25487      if (
25488        keyboardNavigation &&
25489        (event.keyCode == 13 ||
25490          event.keyCode == 32 ||
25491          event.keyCode == 38 ||
25492          event.keyCode == 40 ||
25493          event.keyCode == 37 ||
25494          event.keyCode == 39)
25495      ) {
25496        // enter || space || up || down || left || right
25497        showBookingDatepicker();
25498        bookingDatepicker.buttons
25499          .filter(function () {
25500            return $(this).parent().hasClass("checkout-date");
25501          })
25502          .focus();
25503
25504        event.preventDefault();
25505      }
25506    });
25507
25508    bookingDatepicker.container.on("keydown", "a, button", function (event) {
25509      if (!keyboardNavigation) return;
25510
25511      var target = $(this),
25512        dateButtons = bookingDatepicker.buttons.filter("a.ui-state-default"),
25513        targetIndex = dateButtons.index(target),
25514        leftTarget = targetIndex - 1,
25515        upTarget = targetIndex - 7,
25516        rightTarget = targetIndex + 1,
25517        bottomTarget = targetIndex + 7;
25518
25519      if (event.keyCode == 27) {
25520        // escape
25521        bookingDatepicker.triggers.checkin.focus();
25522        closeBookingDatepicker();
25523      } else if (
25524        event.keyCode == 37 ||
25525        (event.shiftKey && event.keyCode == 9)
25526      ) {
25527        // Left
25528        if (target.hasClass("ui-datepicker-next"))
25529          dateButtons.eq(dateButtons.length - 1).focus();
25530        else if (leftTarget < 0 || target.hasClass("ui-datepicker-prev"))
25531          bookingDatepicker.buttons.filter(".ui-datepicker-prev").focus();
25532        else dateButtons.eq(leftTarget).focus();
25533      } else if (event.keyCode == 38) {
25534        // Up
25535        if (target.hasClass("ui-datepicker-next"))
25536          dateButtons.eq(dateButtons.length - 1).focus();
25537        else if (upTarget < 0 || target.hasClass("ui-datepicker-prev"))
25538          bookingDatepicker.buttons.filter(".ui-datepicker-prev").focus();
25539        else dateButtons.eq(upTarget).focus();
25540      } else if (event.keyCode == 39 || event.keyCode == 9) {
25541        // Right
25542        if (target.hasClass("ui-datepicker-prev")) dateButtons.eq(0).focus();
25543        else if (
25544          rightTarget > dateButtons.length - 1 ||
25545          target.hasClass("ui-datepicker-next")
25546        )
25547          bookingDatepicker.buttons.filter(".ui-datepicker-next").focus();
25548        else dateButtons.eq(rightTarget).focus();
25549      } else if (event.keyCode == 40) {
25550        // Down
25551        if (target.hasClass("ui-datepicker-prev")) dateButtons.eq(0).focus();
25552        else if (
25553          bottomTarget > dateButtons.length - 1 ||
25554          target.hasClass("ui-datepicker-next")
25555        )
25556          bookingDatepicker.buttons.filter(".ui-datepicker-next").focus();
25557        else dateButtons.eq(bottomTarget).focus();
25558      }
25559
25560      if (
25561        event.keyCode == 9 ||
25562        event.keyCode == 27 ||
25563        event.keyCode == 37 ||
25564        event.keyCode == 38 ||
25565        event.keyCode == 39 ||
25566        event.keyCode == 40
25567      ) {
25568        event.preventDefault();
25569      }
25570    });
25571
25572    var bookingDatepickerObserverDebouncer;
25573
25574    bookingDatepicker.container.observe(
25575      function () {
25576        if (bookingDatepickerObserverDebouncer)
25577          clearTimeout(bookingDatepickerObserverDebouncer);
25578
25579        bookingDatepickerObserverDebouncer = setTimeout(function () {
25580          bookingDatepicker.buttons = $(
25581            "a, button",
25582            bookingDatepicker.container
25583          );
25584          bookingDatepicker.buttons.each(function () {
25585            var button = $(this),
25586              parent = button.parent(),
25587              parentGroup = button.parents(".ui-datepicker-group");
25588
25589            button
25590              .attr({
25591                role: "button",
25592                "aria-pressed":
25593                  parent.hasClass("ui-checkin") ||
25594                  parent.hasClass("ui-checkout")
25595                    ? "true"
25596                    : "false",
25597              })
25598              .on("click", function (event) {
25599                event.preventDefault();
25600              })
25601              .on("keydown", function (event) {
25602                if (event.keyCode == "32") button.trigger("click"); // Imitate Click on space
25603              });
25604
25605            if (button.hasClass("ui-state-disabled"))
25606              button.attr("aria-disabled", "true");
25607
25608            // Format: Check In, Tuesday, February 18th, 1986
25609
25610            if (button.hasClass("ui-state-default")) {
25611              button.attr({
25612                "aria-label":
25613                  (!bookingDatepicker.dates[0] ||
25614                  (bookingDatepicker.dates[0] &&
25615                    bookingDatepicker.dates[1] &&
25616                    !parent.hasClass("ui-checkout")) ||
25617                  (bookingDatepicker.dates[0] && parent.hasClass("ui-checkin"))
25618                    ? "Check In"
25619                    : "Check Out") +
25620                  ", " +
25621                  $("th", parentGroup)
25622                    .eq(button.parent().index())
25623                    .children("span")
25624                    .attr("title") +
25625                  ", " +
25626                  $(".ui-datepicker-month", parentGroup).text() +
25627                  " " +
25628                  ordinal_suffix_of(button.text()) +
25629                  ", " +
25630                  parent.data("year"),
25631              });
25632            }
25633          });
25634
25635          if (keyboardNavigation) {
25636            if (bookingDatepicker.dates[0] && bookingDatepicker.dates[1])
25637              bookingDatepicker.buttons
25638                .filter(".ui-state-default")
25639                .eq(0)
25640                .focus();
25641            if (bookingDatepicker.dates[0] && !bookingDatepicker.dates[1])
25642              bookingDatepicker.buttons.filter(".ui-state-active").focus();
25643          }
25644
25645          $(".ui-datepicker-prev", bookingDatepicker.container).toggleClass(
25646            "ui-state-disabled",
25647            $(
25648              ".ui-datepicker-header .ui-datepicker-prev",
25649              bookingDatepicker.container
25650            ).hasClass("ui-state-disabled")
25651          );
25652        }, 5);
25653      },
25654      {
25655        subtree: true,
25656        childList: true,
25657        characterData: false,
25658        attributes: false,
25659      }
25660    );
25661
25662    // Stepper controls
25663
25664    $(".stepper-control", booking).each(function () {
25665      var control = $(this),
25666        buttons = $("button", control),
25667        number = $(".number", control),
25668        input = $("input", control),
25669        notification = $("[aria-live]", control);
25670
25671      var updateValue = function (value) {
25672        input.val(value).trigger("change", true);
25673        number.text(leadingZero(value));
25674        notification.text(
25675          value +
25676            " " +
25677            (value > 1 || value === 0
25678              ? notification.data("plural-form")
25679              : notification.data("singular-form"))
25680        );
25681      };
25682
25683      buttons.on("click", function () {
25684        var button = $(this),
25685          action = button.data("action"),
25686          min = button.data("min"),
25687          max = button.data("max");
25688
25689        var value = parseInt(input.val()) + (action === "decrease" ? -1 : 1);
25690
25691        if (value < min) value = min;
25692        if (value > max) value = max;
25693
25694        updateValue(value);
25695      });
25696
25697      input.on("change", function (event, internal) {
25698        if (!internal) {
25699          updateValue($(this).val());
25700        }
25701      });
25702    });
25703
25704    // SMART BOOKING
25705
25706    $("form", booking).hebsBP({
25707      checkIn: "#booking-checkin",
25708      checkOut: "#booking-checkout",
25709      extraFields: {
25710        "#booking-destination": "change",
25711        "#booking-adults": "change",
25712        "#booking-children": "change",
25713        "#booking-rooms": "change",
25714        "#booking-rates": "change",
25715      },
25716      singleCookie: true,
25717
25718      onComplete: function (booking) {
25719        if (booking) {
25720          // Dates
25721
25722          var checkin_date = new Date(booking.checkin_date);
25723
25724          checkin_date.setHours(0);
25725          checkin_date.setMinutes(0);
25726          checkin_date.setSeconds(0);
25727          checkin_date.setMilliseconds(0);
25728          var checkin_timestamp = checkin_date.getTime();
25729
25730          var checkout_date = new Date(booking.checkout_date);
25731
25732          checkout_date.setHours(0);
25733          checkout_date.setMinutes(0);
25734          checkout_date.setSeconds(0);
25735          checkout_date.setMilliseconds(0);
25736          var checkout_timestamp = checkout_date.getTime();
25737
25738          bookingDatepicker.dates = [checkin_timestamp, checkout_timestamp];
25739          bookingDatepicker.inputs.checkin.val(
25740            $.datepicker.formatDate(bookingDatepicker.dateFormat, checkin_date)
25741          );
25742          bookingDatepicker.inputs.checkout.val(
25743            $.datepicker.formatDate(bookingDatepicker.dateFormat, checkout_date)
25744          );
25745          // bookingDatepicker.triggers.checkin
25746          //   .find(".date")
25747          //   .text(bookingDatepicker.inputs.checkin.val());
25748          // bookingDatepicker.triggers.checkout
25749          //   .find(".date")
25750          //   .text(bookingDatepicker.inputs.checkout.val());
25751
25752          bookingDatepicker.container.datepicker("refresh");
25753          bookingDatepicker.container.datepicker(
25754            "setDate",
25755            bookingDatepicker.inputs.checkin.val()
25756          );
25757
25758          // Trigger change on remaining items
25759
25760          $(
25761            "#booking-destination, #booking-adults, #booking-children, #booking-rooms"
25762          ).trigger("change");
25763        }
25764      },
25765    });
25766  }
25767
25768  {
25769    const bookingCheckin = $("#booking-checkin");
25770    const bookingCheckinActual = $("#booking-checkin-actual");
25771    const bookingCheckout = $("#booking-checkout");
25772    const bookingCheckoutActual = $("#booking-checkout-actual");
25773    if (bookingCheckin) {
25774      bookingCheckin.on("change", function () {
25775        // Keep MM/DD/YYYY format as-is for PHP strtotime compatibility
25776        bookingCheckinActual.val($(this).val());
25777      });
25778    }
25779    if (bookingCheckout) {
25780      bookingCheckout.on("change", function () {
25781        // Keep MM/DD/YYYY format as-is for PHP strtotime compatibility
25782        bookingCheckoutActual.val($(this).val());
25783      });
25784    }
25785  }
25786})();
25787
25788// Top images
25789
25790(function() {
25791
25792	if ($('.slide', photos).length > 1) {
25793
25794		slideshows['photos'] = new Swiper($('.slideshow', photos), {
25795			loop:true,
25796			autoplay: {
25797				delay: 6000,
25798			},
25799			preloadImages: false,
25800			lazy: {
25801				loadPrevNext: true,
25802				loadOnTransitionStart: true
25803			},
25804			navigation: {
25805				prevEl: $('.slideshow-button.previous', photos),
25806				nextEl: $('.slideshow-button.next', photos)
25807			},
25808			on: {
25809				init: function(){
25810					var swiper = this;
25811					disableKeyboardNavigation(swiper.wrapperEl);
25812					$('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
25813						restoreKeyboardNavigation(this, true);
25814					});
25815
25816					// ADA
25817                    $('.swiper-slide', swiper.wrapperEl).each(function(){
25818                        var _this = $(this);
25819                        _this.hasClass('swiper-slide-active') ? _this.attr('aria-hidden','false') : _this.attr('aria-hidden','true');
25820                    });
25821				},
25822				slideChangeTransitionStart: function(){
25823					var swiper = this;
25824					disableKeyboardNavigation(swiper.wrapperEl);
25825
25826                    // ADA
25827                    $('.swiper-slide', swiper.wrapperEl).each(function(){
25828                        var _this = $(this);
25829                        _this.hasClass('swiper-slide-active') ? _this.attr('aria-hidden','false') : _this.attr('aria-hidden','true');
25830                    });
25831                },
25832				slideChangeTransitionEnd: function(){
25833					var swiper = this;
25834					$('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
25835						restoreKeyboardNavigation(this, true);
25836					});
25837				}
25838			}
25839		});
25840	} else {
25841		windowObject.on('load', function(){
25842			$('.loading', photos).remove();
25843		});
25844	}
25845
25846})();
25847
25848// Upcoming events
25849
25850(function() {
25851
25852	if ($('.event', events).length > 1) {
25853
25854		$('.slideshow-wrapper', events).addClass('swiper-wrapper');
25855		$('.event', events).addClass('swiper-slide');
25856		$('.thumbnail', events).each(function(){
25857			if ($(this).data('background')) $(this).addClass('swiper-lazy').append('<div class="loading swiper-lazy-preloader" />');
25858		});
25859
25860		slideshows['events'] = new Swiper($('.slideshow', events), {
25861			loop: true,
25862			slidesPerView: "auto",
25863			preloadImages: false,
25864			lazy: {
25865				loadPrevNext: true,
25866				loadOnTransitionStart: true
25867			},
25868			pagination: {
25869				el: $('.slideshow-pagination', events),
25870				clickable: true,
25871				bulletActiveClass: 'active',
25872				renderBullet: function (index, className) {
25873					return '<button class="' + className + '">' + (index + 1) + '</button>';
25874				}
25875			},
25876			on: {
25877				init: function(){
25878					var swiper = this;
25879					disableKeyboardNavigation(swiper.wrapperEl);
25880					$('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
25881						restoreKeyboardNavigation(this, true);
25882					});
25883
25884					lozadObserver.observe();
25885
25886                    // ADA
25887                    var slides = $('.swiper-slide', swiper.wrapperEl);
25888                    var activeSlide = $('.swiper-slide.swiper-slide-active', swiper.wrapperEl);
25889
25890                    slides.attr('aria-hidden','true');
25891                    activeSlide.attr('aria-hidden','false');
25892
25893                    if (windowWidth > 980) {
25894                        activeSlide.next().attr('aria-hidden', 'false');
25895                        activeSlide.next().next().attr('aria-hidden', 'false');
25896                    } else if (windowWidth < 980 && windowWidth > 768) {
25897                        activeSlide.next().attr('aria-hidden', 'false');
25898                    }
25899                },
25900				slideChangeTransitionStart: function(){
25901					var swiper = this;
25902					disableKeyboardNavigation(swiper.wrapperEl);
25903
25904					lozadObserver.observe();
25905
25906                    // ADA
25907                    var slides = $('.swiper-slide', swiper.wrapperEl);
25908                    var activeSlide = $('.swiper-slide.swiper-slide-active', swiper.wrapperEl);
25909
25910                    slides.attr('aria-hidden','true');
25911                    activeSlide.attr('aria-hidden','false');
25912
25913                    if (windowWidth > 980) {
25914                        activeSlide.next().attr('aria-hidden', 'false');
25915                        activeSlide.next().next().attr('aria-hidden', 'false');
25916                    } else if (windowWidth < 980 && windowWidth > 768) {
25917                        activeSlide.next().attr('aria-hidden', 'false');
25918                    }
25919                },
25920				slideChangeTransitionEnd: function(){
25921					var swiper = this;
25922					$('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
25923						restoreKeyboardNavigation(this, true);
25924					});
25925				}
25926			}
25927		});
25928	}
25929
25930})();
25931
25932// Offers scripts
25933
25934(function () {
25935  // Offers popup - custom offers
25936
25937  var specOffersPopup = $(".special-offers-popup"),
25938    specOffersClose = $(".close", specOffersPopup),
25939    specOffersSliders = $(".specials-slider");
25940
25941  if (specOffersPopup.length) {
25942    if (!$.cookie("loyalty-specials-popup")) {
25943      specOffersPopup.addFocusLock({
25944        onEscapeCallback: function () {
25945          closeOffersPopup();
25946        },
25947        onClickOutsideCallback: function () {
25948          closeOffersPopup();
25949        },
25950      });
25951
25952      var openOffersPopup = function () {
25953        specOffersPopup.focusLockOn();
25954        specOffersPopup.addClass("open");
25955      };
25956
25957      var closeOffersPopup = function () {
25958        specOffersPopup.focusLockOff();
25959        specOffersPopup.removeClass("open");
25960        $.cookie("loyalty-specials-popup", "hidden");
25961      };
25962
25963      specOffersClose.on("click", function (e) {
25964        e.preventDefault();
25965
25966        closeOffersPopup();
25967      });
25968
25969      openOffersPopup();
25970    }
25971  }
25972
25973  // Offers popup slider
25974
25975  if ($(".offer", specOffersPopup).length > 1) {
25976    $(".slideshow-wrapper", specOffersPopup).addClass("swiper-wrapper");
25977    $(".offer", specOffersPopup).addClass("swiper-slide");
25978    $(".thumbnail", specOffersPopup).each(function () {
25979      if ($(this).data("background"))
25980        $(this)
25981          .addClass("swiper-lazy")
25982          .append('<div class="loading swiper-lazy-preloader" />');
25983    });
25984
25985    slideshows["specOffersPopup"] = new Swiper(
25986      $(".slideshow", specOffersPopup),
25987      {
25988        loop: true,
25989        slidesPerView: "auto",
25990        preloadImages: false,
25991        lazy: {
25992          loadPrevNext: true,
25993          loadOnTransitionStart: true,
25994        },
25995        navigation: {
25996          prevEl: $(".slideshow-button.previous", specOffersPopup),
25997          nextEl: $(".slideshow-button.next", specOffersPopup),
25998        },
25999        on: {
26000          init: function () {
26001            var swiper = this;
26002            disableKeyboardNavigation(swiper.wrapperEl);
26003            $(".swiper-slide-active", swiper.wrapperEl)
26004              .nextAll()
26005              .addBack()
26006              .slice(0, swiper.params.slidesPerView)
26007              .each(function () {
26008                restoreKeyboardNavigation(this, true);
26009              });
26010
26011            lozadObserver.observe();
26012
26013            // ADA
26014            var slides = $(".swiper-slide", swiper.wrapperEl),
26015              activeSlide = $(
26016                ".swiper-slide.swiper-slide-active",
26017                swiper.wrapperEl
26018              );
26019
26020            slides.attr("aria-hidden", "true");
26021            activeSlide.attr("aria-hidden", "false");
26022            $(".button", activeSlide).attr("tabindex", "0");
26023          },
26024          slideChangeTransitionStart: function () {
26025            var swiper = this;
26026            disableKeyboardNavigation(swiper.wrapperEl);
26027
26028            lozadObserver.observe();
26029
26030            // ADA
26031            var slides = $(".swiper-slide", swiper.wrapperEl),
26032              activeSlide = $(
26033                ".swiper-slide.swiper-slide-active",
26034                swiper.wrapperEl
26035              ),
26036              buttons = $(".button", specOffersPopup);
26037
26038            slides.attr("aria-hidden", "true");
26039            activeSlide.attr("aria-hidden", "false");
26040            buttons.attr("tabindex", "-1");
26041            $(".button", activeSlide).attr("tabindex", "0");
26042          },
26043          slideChangeTransitionEnd: function () {
26044            var swiper = this;
26045            $(".swiper-slide-active", swiper.wrapperEl)
26046              .nextAll()
26047              .addBack()
26048              .slice(0, swiper.params.slidesPerView)
26049              .each(function () {
26050                restoreKeyboardNavigation(this, true);
26051              });
26052          },
26053        },
26054      }
26055    );
26056  }
26057
26058  // Offer details button popup
26059
26060  var specDetailsPopup = $(".special-offers-details-popup"),
26061    specDetailsClose = $(".close", specDetailsPopup),
26062    offerTile = $(".offer-tile"),
26063    detailsButton = $(".readmore", offerTile);
26064
26065  if (specDetailsPopup.length) {
26066    var offerThumb = $(".thumbnail", specDetailsPopup),
26067      offerImage = $(".thumbnail img", specDetailsPopup),
26068      offerTitle = $("h3", specDetailsPopup),
26069      offerLink = $("a", specDetailsPopup),
26070      offerPrice = $(".price", specDetailsPopup),
26071      offerDescr = $("p", specDetailsPopup);
26072
26073    specDetailsPopup.addFocusLock({
26074      onEscapeCallback: function () {
26075        closeDetailsPopup();
26076      },
26077      onClickOutsideCallback: function () {
26078        closeDetailsPopup();
26079      },
26080    });
26081
26082    var openDetailsPopup = function () {
26083      specDetailsPopup.focusLockOn();
26084      specDetailsPopup.addClass("open");
26085    };
26086
26087    var closeDetailsPopup = function () {
26088      specDetailsPopup.focusLockOff();
26089      specDetailsPopup.removeClass("open");
26090    };
26091
26092    specDetailsClose.on("click", function (e) {
26093      e.preventDefault();
26094      closeDetailsPopup();
26095    });
26096
26097    detailsButton.on("click", function (e) {
26098      e.preventDefault();
26099
26100      var thisButton = $(this);
26101
26102      if (specDataJSON[thisButton.data("slug")].image != "") {
26103        offerImage.attr("src", specDataJSON[thisButton.data("slug")].image);
26104        offerThumb.removeClass("no-thumbnail");
26105        offerImage.show();
26106      } else {
26107        offerThumb.addClass("no-thumbnail");
26108        offerImage.hide();
26109      }
26110
26111      if (specDataJSON[thisButton.data("slug")].title != "") {
26112        offerTitle.text(specDataJSON[thisButton.data("slug")].title);
26113        offerTitle.show();
26114      } else {
26115        offerTitle.hide();
26116      }
26117
26118      if (specDataJSON[thisButton.data("slug")].link != "") {
26119        offerLink.attr("href", specDataJSON[thisButton.data("slug")].link);
26120        offerLink.show();
26121      } else {
26122        offerLink.hide();
26123      }
26124
26125      if (specDataJSON[thisButton.data("slug")].price != "") {
26126        $(".prefix", offerPrice).empty();
26127        $("b", offerPrice).empty();
26128        $(".suffix", offerPrice).empty();
26129        $(".prefix", offerPrice).text(
26130          specDataJSON[thisButton.data("slug")].price_prefix
26131        );
26132        $("b", offerPrice).text(specDataJSON[thisButton.data("slug")].price);
26133        $(".suffix", offerPrice).html(
26134          specDataJSON[thisButton.data("slug")].price_currency +
26135            "<br>" +
26136            specDataJSON[thisButton.data("slug")].price_suffix
26137        );
26138      } else {
26139        offerPrice.hide();
26140      }
26141
26142      if (specDataJSON[thisButton.data("slug")].text != "") {
26143        offerDescr.text(specDataJSON[thisButton.data("slug")].text);
26144        offerDescr.show();
26145      } else {
26146        offerDescr.hide();
26147      }
26148
26149      openDetailsPopup();
26150    });
26151  }
26152
26153  // Other offer sliders
26154
26155  specOffersSliders.each(function (i) {
26156    var _this = $(this);
26157
26158    if ($(".offer-tile", _this).length > 1) {
26159      $(".slideshow-wrapper", _this).addClass("swiper-wrapper");
26160      $(".offer-tile", _this).addClass("swiper-slide");
26161      $(".thumbnail", _this).each(function () {
26162        if ($(this).data("background"))
26163          $(this)
26164            .addClass("swiper-lazy")
26165            .append('<div class="loading swiper-lazy-preloader" />');
26166      });
26167
26168      slideshows["specOffersSliders" + i] = new Swiper($(".slideshow", _this), {
26169        loop: false,
26170        slidesPerView: "auto",
26171        preloadImages: false,
26172        lazy: {
26173          loadPrevNext: true,
26174          loadOnTransitionStart: true,
26175        },
26176        navigation: {
26177          prevEl: $(".slideshow-button.previous", _this),
26178          nextEl: $(".slideshow-button.next", _this),
26179        },
26180        breakpoints: {
26181          // when window width is >= 320px
26182          550: {
26183            slidesPerView: 1,
26184          },
26185        },
26186        pagination: {
26187          el: $(".swiper-pagination", _this),
26188          type: "fraction",
26189        },
26190        on: {
26191          init: function () {
26192            var swiper = this;
26193            disableKeyboardNavigation(swiper.wrapperEl);
26194            $(".swiper-slide-active", swiper.wrapperEl)
26195              .nextAll()
26196              .addBack()
26197              .slice(0, swiper.params.slidesPerView)
26198              .each(function () {
26199                restoreKeyboardNavigation(this, true);
26200              });
26201
26202            lozadObserver.observe();
26203
26204            // ADA
26205            var slides = $(".swiper-slide", swiper.wrapperEl),
26206              activeSlide = $(
26207                ".swiper-slide.swiper-slide-active",
26208                swiper.wrapperEl
26209              );
26210
26211            slides.attr("aria-hidden", "true");
26212            $(".button", activeSlide).attr("tabindex", "0");
26213
26214            if (windowWidth > 768) {
26215              activeSlide.next().attr("aria-hidden", "false");
26216              $(".button", activeSlide.next()).attr("tabindex", "0");
26217
26218              activeSlide.next().next().attr("aria-hidden", "false");
26219              $(".button", activeSlide.next().next()).attr("tabindex", "0");
26220            } else if (windowWidth < 768 && windowWidth > 550) {
26221              activeSlide.next().attr("aria-hidden", "false");
26222              $(".button", activeSlide.next()).attr("tabindex", "0");
26223            }
26224          },
26225          slideChangeTransitionStart: function () {
26226            var swiper = this;
26227            disableKeyboardNavigation(swiper.wrapperEl);
26228
26229            lozadObserver.observe();
26230
26231            // ADA
26232            var slides = $(".swiper-slide", swiper.wrapperEl),
26233              activeSlide = $(
26234                ".swiper-slide.swiper-slide-active",
26235                swiper.wrapperEl
26236              ),
26237              buttons = $(".button", _this);
26238
26239            slides.attr("aria-hidden", "true");
26240            buttons.attr("tabindex", "-1");
26241            $(".button", activeSlide).attr("tabindex", "0");
26242
26243            if (windowWidth > 768) {
26244              activeSlide.next().attr("aria-hidden", "false");
26245              $(".button", activeSlide.next()).attr("tabindex", "0");
26246
26247              activeSlide.next().next().attr("aria-hidden", "false");
26248              $(".button", activeSlide.next().next()).attr("tabindex", "0");
26249            } else if (windowWidth < 768 && windowWidth > 550) {
26250              activeSlide.next().attr("aria-hidden", "false");
26251              $(".button", activeSlide.next()).attr("tabindex", "0");
26252            }
26253          },
26254          slideChangeTransitionEnd: function () {
26255            var swiper = this;
26256            $(".swiper-slide-active", swiper.wrapperEl)
26257              .nextAll()
26258              .addBack()
26259              .slice(0, swiper.params.slidesPerView)
26260              .each(function () {
26261                restoreKeyboardNavigation(this, true);
26262              });
26263          },
26264        },
26265      });
26266    }
26267  });
26268
26269  // Loyalty special offers module functionality
26270
26271  var moduleOffers = $(".custom-offers"),
26272    moduleOffersTile = $(".offers-tile", moduleOffers),
26273    moduleOffersDetails = $(".details-popup", moduleOffers),
26274    moduleOffersPopup = $("#specials-module-popup"),
26275    closeModuleOffersPopup = $(".close-button", moduleOffersPopup);
26276
26277  // Close awards popup
26278  closeModuleOffersPopup.on("click", function (e) {
26279    e.preventDefault();
26280
26281    moduleOffersPopup.removeClass("visible");
26282  });
26283
26284  moduleOffersDetails.on("click", function (e) {
26285    e.preventDefault();
26286
26287    var _this = $(this),
26288      _thisParent = _this.parent(),
26289      imageStatusData = _this.data("no-image"),
26290      imageData = _this.data("image"),
26291      propData = _this.data("prop-name"),
26292      titleData = _this.data("title"),
26293      noLinkData = _this.data("nolink"),
26294      linkData = _this.data("link"),
26295      linkDataTitle = _this.data("link-title"),
26296      linkDataTarget = _this.closest('.content').find('.controls-wrapper .button').attr('target');
26297
26298    var price = _this.data("price"),
26299      priceCurrency = _this.data("price-currency"),
26300      pricePrefix = _this.data("price-prefix"),
26301      priceSuffix = _this.data("price-suffix"),
26302      textData = $(".right-text .full-description", _thisParent).text(),
26303      acmData = $(".right-text .acm-block", _thisParent).html();
26304
26305    // Update award popup values
26306    updateSpecialsPopupValues(
26307      moduleOffersPopup,
26308      imageStatusData,
26309      imageData,
26310      propData,
26311      titleData,
26312      noLinkData,
26313      linkData,
26314      linkDataTitle,
26315      price,
26316      priceCurrency,
26317      pricePrefix,
26318      priceSuffix,
26319      linkDataTarget,
26320      textData,
26321      acmData
26322    );
26323
26324    moduleOffersPopup.addClass("visible");
26325  });
26326
26327  // Awards Popup
26328  var updateSpecialsPopupValues = function (
26329    specialsPopup,
26330    imageStatus,
26331    image,
26332    propertyTitle,
26333    title,
26334    noLink,
26335    link,
26336    linkTitle,
26337    price,
26338    currency,
26339    prefix,
26340    suffix,
26341    linkTarget,
26342    text,
26343    acm
26344  ) {
26345    var imageEl = $("img", specialsPopup),
26346      propEl = $(".small-title", specialsPopup),
26347      titleEl = $(".big-title", specialsPopup),
26348      buttonEl = $(".button", specialsPopup);
26349
26350    var priceEl = $(".price", specialsPopup),
26351      pricePrice = $("b", priceEl),
26352      priceCurrency = $(".price-currency", priceEl),
26353      pricePrefix = $(".price-prefix", priceEl),
26354      priceSuffix = $(".price-suffix-span", priceEl);
26355      textEl = $("p", specialsPopup),
26356      acmEl = $(".acm-block", specialsPopup);
26357
26358    if (imageStatus) {
26359      imageEl.addClass("no-image");
26360    } else {
26361      imageEl.removeClass("no-image");
26362    }
26363
26364    // reset Button
26365    buttonEl.attr("href", "").text("Book Now").show();
26366
26367    imageEl.attr("src", image);
26368    propEl.html(propertyTitle);
26369    titleEl.html(title);
26370    if (link.length) {
26371      buttonEl.attr("href", link).text(linkTitle);
26372      buttonEl.attr("target", linkTarget).text(linkTitle);
26373    } else if (!link.length || noLink === 1) {
26374      buttonEl.hide();
26375    }
26376    pricePrice.html(price);
26377    priceCurrency.html(currency);
26378    pricePrefix.html(prefix);
26379    priceSuffix.html(suffix);
26380    textEl.html(text);
26381    acmEl.html(acm);
26382  };
26383})();
26384
26385// GALLERIA INITIALIZATION
26386
26387Galleria.addTheme({
26388	name: 'HeBS',
26389	version: 1.5,
26390	defaults: {
26391		autoplay: false,
26392		debug: false,
26393		fullscreenDoubleTap: false,
26394		imageCrop: false,
26395		imagePan: false,
26396		initialTransition: 'fade',
26397		layerFollow: false,
26398		maxScaleRatio: 1,
26399		preload: 3,
26400		queue: true,
26401		showCounter: false,
26402		thumbCrop: true,
26403		thumbQuality: 'auto',
26404		transition: 'fade',
26405		transitionSpeed: 300,
26406		trueFullscreen: false,
26407		videoPoster: false,
26408		popupLinks: true,
26409		youtube: {
26410			controls: 0,
26411			modestbranding: 1,
26412			color: 'red'
26413		}
26414	},
26415	init: function(options) {
26416
26417		var gallery = this;
26418
26419		gallery.bind('loadstart', function() {
26420			gallery.$('loader').fadeIn(200);
26421		});
26422
26423		gallery.bind('loadfinish', function() {
26424			gallery.$('loader').fadeOut(200);
26425		});
26426
26427	}
26428});
26429
26430function initGallery(options) {
26431
26432	var settings = $.extend({
26433			'data': null,
26434			'id': null,
26435			'jsonKey': null,
26436			'categories': false,
26437			'startingImage': 0
26438		}, options);
26439
26440	if (!settings.data || !settings.id) return false;
26441
26442	var rootObject = $('html'),
26443		galleryContainer = $('<div />', {'id': 'hebs-gallery'}),
26444		gallery = $('<div />', {'class': 'galleria'}),
26445		closeButton = $('<a />', {'class': 'close-button'}),
26446		photos,
26447		currentDataIndex = 0,
26448		categorySelector = $('<select />', {'class': 'category-selector'});
26449
26450	if (settings.jsonKey) {
26451		$.each(settings.data[settings.jsonKey], function(index, value) {
26452			if (value.id == settings.id) {
26453				photos = value.images;
26454				currentDataIndex = index;
26455				return;
26456			}
26457		});
26458	} else {
26459		photos = settings.data[settings.id].images;
26460	}
26461
26462	rootObject.addClass('selection-disabled');
26463
26464	$('body').append(
26465		galleryContainer
26466			.append(gallery)
26467			.append(closeButton)
26468	);
26469
26470	if(settings.categories == true && settings.jsonKey){
26471
26472		$.each(settings.data[settings.jsonKey], function(index, value) { categorySelector.append($('<option />', {'value': index, 'text': value.name})) });
26473
26474		if ($('option', categorySelector).length > 1) {
26475			categorySelector.val(currentDataIndex);
26476			categorySelector.appendTo(galleryContainer);
26477			processSelects();
26478		}
26479
26480	}
26481
26482	if (photos.length == 1) {
26483		galleryContainer.addClass('no-controls');
26484	}
26485
26486	galleryContainer.fadeIn(200, function(){
26487		Galleria.run('#hebs-gallery .galleria', {dataSource: photos, show: settings.startingImage});
26488	});
26489
26490	Galleria.ready(function(){
26491		var gallery = this;
26492
26493		windowObject.on('orientationchange.galleryLightbox', function() {
26494			gallery.resize();
26495
26496			setTimeout(function(){
26497				gallery.resize();
26498			}, 1000);
26499		});
26500
26501		closeButton.click(function(){
26502			gallery.pause();
26503			galleryContainer.fadeOut(200, function(){
26504				gallery.destroy();
26505				windowObject.off('orientationchange.galleryLightbox');
26506				rootObject.removeClass('selection-disabled');
26507				$(this).remove();
26508			})
26509		});
26510
26511		//KEYBOARD ARROWS CONTROL
26512		gallery.attachKeyboard({
26513			right: this.next,
26514			left: this.prev
26515		});
26516
26517		if (settings.categories == true && settings.jsonKey){
26518			categorySelector.change(function(){
26519				var photos = settings.data[settings.jsonKey][$(this).val()].images;
26520				if (photos.length == 1) galleryContainer.addClass('no-controls');
26521				else galleryContainer.removeClass('no-controls');
26522				gallery.load(photos);
26523
26524				setTimeout(function(){
26525					gallery.resize();
26526				}, 1000);
26527			});
26528		}
26529
26530	});
26531
26532}
26533
26534// GALLERY
26535
26536$(function() { // Document ready event
26537
26538	if (typeof galleryJSON != 'undefined' && !$.isEmptyObject(galleryJSON)) {
26539		$(".gallery button").click(function() {
26540
26541			initGallery({
26542				'data': galleryJSON,
26543				'id': $(this).data('gallery-id'),
26544				'jsonKey': $(this).data('gallery-json-key'),
26545				'categories': true,
26546				'startingImage': $(this).data('image-index') ? $(this).data('image-index') : 0
26547			});
26548
26549			return false;
26550		});
26551	}
26552
26553});
26554(function() {
26555
26556    if('objectFit' in document.documentElement.style === false) {
26557
26558        var objectFitImgs = $('img.object-fit');
26559
26560        $.each(objectFitImgs, function(){
26561
26562            var image = $(this);
26563
26564            image.parent().css({
26565                backgroundSize: 'cover',
26566                backgroundImage: 'url(' + (image.attr("src") ? image.attr("src") : image.attr("data-src")) + ')',
26567                backgroundPosition: image.css( "object-position" )
26568            });
26569
26570            image.css({
26571                display:"none"
26572            });
26573        });
26574    }
26575})();
26576
26577$(function(){
26578    if (typeof signUpFormCountryId != 'undefined' && typeof signUpFormStateId != 'undefined') {
26579        var $stateSelector   = $(signUpFormStateId),
26580            $countrySelector = $(signUpFormCountryId),
26581            stateValue       = $stateSelector.data('original_value');
26582
26583        if ($stateSelector.val() == '' || !$stateSelector.val()) {
26584            selectStates($stateSelector, $countrySelector.val());
26585        }
26586
26587        if ($countrySelector.val() && stateValue) {
26588            if (countryHasRegions($countrySelector.val())) {
26589                $(signUpFormStateId + '-input').prop('disabled', true).hide();
26590                $stateSelector.val(stateValue);
26591            } else {
26592                $(signUpFormStateId + '-input').val(stateValue);
26593                $(signUpFormStateId ).prop('disabled', true);
26594                $(signUpFormStateId).hide();
26595            }
26596        }
26597
26598        $countrySelector.on('change', function(e) {
26599            selectStates($stateSelector, $(this).val());
26600        });
26601    }
26602});
26603
26604function selectStates($stateSelector, selectedCountry) {
26605    if (countryHasRegions(selectedCountry)) {
26606        var states = countriesWithRegions[selectedCountry];
26607
26608        $stateSelector.empty();
26609        $stateSelector.append('<option value="" selected="selected">Select Your State</option>');
26610
26611        $.each(states, function (index, item) {
26612            $stateSelector.append(
26613                $('<option>', {value: index, text: item})
26614            );
26615        });
26616
26617        $(signUpFormStateId + '-input').prop('disabled', true).hide();
26618        $(signUpFormStateId).prop('disabled', false);
26619        $(signUpFormStateId).parent().show();
26620    } else if (selectedCountry) {
26621        $(signUpFormStateId ).prop('disabled', true);
26622        $(signUpFormStateId).parent().hide();
26623        $(signUpFormStateId  + '-input').prop('disabled', false).show();
26624    }
26625}
26626
26627// Business Information
26628
26629$(function(){
26630    if (typeof signUpFormStateIdAlt != 'undefined' && typeof signUpFormCountryIdAlt != 'undefined') {
26631        var $stateSelector   = $(signUpFormStateIdAlt),
26632            $countrySelector = $(signUpFormCountryIdAlt),
26633            stateValue       = $stateSelector.data('original_value');
26634
26635        if ($stateSelector.val() == '' || !$stateSelector.val()) {
26636            selectStates($stateSelector, $countrySelector.val());
26637        }
26638
26639        if ($countrySelector.val() && stateValue) {
26640            if (countryHasRegions($countrySelector.val())) {
26641                $(signUpFormStateIdAlt + '-input').prop('disabled', true).hide();
26642                $stateSelector.val(stateValue);
26643            } else {
26644                $(signUpFormStateIdAlt + '-input').val(stateValue);
26645                $(signUpFormStateIdAlt ).prop('disabled', true);
26646                $(signUpFormStateIdAlt).hide();
26647            }
26648        }
26649
26650        $countrySelector.on('change', function(e) {
26651            selectStates($stateSelector, $(this).val());
26652        });
26653    }
26654});
26655
26656function selectStatesAlt($stateSelector, selectedCountry) {
26657    if (countryHasRegions(selectedCountry)) {
26658        var states = countriesWithRegions[selectedCountry];
26659
26660        $stateSelector.empty();
26661        $stateSelector.append('<option value="" selected="selected">Select Your State</option>');
26662
26663        $.each(states, function (index, item) {
26664            $stateSelector.append(
26665                $('<option>', {value: index, text: item})
26666            );
26667        });
26668
26669        $(signUpFormStateIdAlt + '-input').prop('disabled', true).hide();
26670        $(signUpFormStateIdAlt).prop('disabled', false);
26671        $(signUpFormStateIdAlt).parent().show();
26672    } else if (selectedCountry) {
26673        $(signUpFormStateIdAlt ).prop('disabled', true);
26674        $(signUpFormStateIdAlt).parent().hide();
26675        $(signUpFormStateIdAlt  + '-input').prop('disabled', false).show();
26676    }
26677}
26678
26679function countryHasRegions(country) {
26680    var result = false;
26681
26682    if (typeof countriesWithRegions != 'undefined' && typeof countriesWithRegions[country] === 'object'
26683        && countriesWithRegions[country] !== null && Object.keys(countriesWithRegions[country]).length) {
26684        result = true;
26685    }
26686
26687    return result;
26688}
26689
26690// Main Site Loyalty Scripts
26691
26692(function() {
26693
26694    var myStays = $('.my-stays'),
26695        myPriceBreakdowns = $('.my-price-breakdowns'),
26696        upcomingStaysWrapper = $('.upcoming-stays-wrapper', myStays),
26697        stayHistoryWrapper = $('.stay-history-wrapper', myStays),
26698        bigStaysWrapper = $('.stays-big-wrapper', myStays);
26699        myRewards = $('.my-rewards'),
26700        avaliableRewardsWrapper = $('.avalibale-rewards-wrapper', myRewards),
26701        redeemRewardsWrapper = $('.redeem-awards-wrapper', myRewards);
26702
26703    // Rewards Section
26704    $('.control-tabs button', myRewards).each(function(){
26705        var thisButton = $(this);
26706
26707        thisButton.on('click', function () {
26708            $('.control-tabs button', myRewards).removeClass('active');
26709            thisButton.addClass('active');
26710
26711            if(thisButton.hasClass('avaliable-rewards')){
26712                redeemRewardsWrapper.hide();
26713                avaliableRewardsWrapper.show(400);
26714            } else {
26715                avaliableRewardsWrapper.hide();
26716                redeemRewardsWrapper.show(400);
26717            }
26718        });
26719    }); 
26720
26721    $('.control-tabs button', myStays).each(function(){
26722        var thisButton = $(this);
26723
26724        thisButton.on('click', function () {
26725            $('.control-tabs button', myStays).removeClass('active');
26726            thisButton.addClass('active');
26727
26728            if(thisButton.hasClass('upcoming-stays')){
26729                stayHistoryWrapper.slideUp(300);
26730                upcomingStaysWrapper.slideDown(300);
26731            } else {
26732                upcomingStaysWrapper.slideUp(300);
26733                stayHistoryWrapper.slideDown(300);
26734            }
26735        });
26736    });
26737
26738    // Price Breakdown popup
26739
26740    $('.price-breakdown').on('click', function(e){
26741        e.preventDefault();
26742
26743        var _this = $(this),
26744            _thisConfNum = _this.data('confirmation-number');
26745
26746        $('.loyalty-popup', myPriceBreakdowns).each(function(){
26747            var thisPopup = $(this),
26748                thisPopupID = thisPopup.data('conf-num');
26749
26750            if(thisPopupID === _thisConfNum){
26751                $('.my-benefits-temporary').append(thisPopup.clone());
26752
26753                $('.my-benefits .close-popup').on('click', function(){
26754                    $(this).closest('.loyalty-popup').remove();
26755                });
26756            }
26757        });
26758    });
26759
26760
26761    // End
26762
26763    bigStaysWrapper.each(function(){
26764       var thisbigStaysWrapper = $(this);
26765
26766       $('.my-stay', thisbigStaysWrapper).each(function(){
26767           var thisMyStay = $(this),
26768               selectBenefits = $('.select-benefits', thisMyStay),
26769               seeDetails = $('.see-details', thisMyStay),
26770               benefitsInfoBlock = $('.benefits-wrapper', thisMyStay),
26771               seeDetailsBlock = $('.see-details-wrapper', thisMyStay),
26772               benefitsBoxes = $('.box-wrapper .box');
26773
26774           selectBenefits.on('click', function(){
26775               seeDetails.removeClass('active');
26776
26777               if(!$(this).hasClass('active')){
26778                   $(this).addClass('active');
26779                   seeDetailsBlock.slideUp(200);
26780                   benefitsInfoBlock.slideDown(200);
26781               } else {
26782                   $(this).removeClass('active');
26783                   benefitsInfoBlock.slideUp(200);
26784               }
26785           });
26786
26787           seeDetails.on('click', function(){
26788               selectBenefits.removeClass('active');
26789
26790               if(!$(this).hasClass('active')){
26791                   $(this).addClass('active');
26792                   benefitsInfoBlock.slideUp(200);
26793                   seeDetailsBlock.slideDown(200);
26794               } else {
26795                   $(this).removeClass('active');
26796                   seeDetailsBlock.slideUp(200);
26797               }
26798           });
26799
26800           // Benefits confirm popup functionality
26801
26802           benefitsBoxes.each(function(){
26803               var thisBox = $(this),
26804                   thisBoxButton = $('button', thisBox),
26805                   thisBoxID = thisBoxButton.data('box-id');
26806
26807               thisBoxButton.on('click', function(){
26808                   $('.popups-list .loyalty-popup', myStays).each(function(){
26809                       var thisPopup = $(this),
26810                           thisPopupID = thisPopup.data('box-id');
26811
26812                       if(thisPopupID === thisBoxID){
26813                           $(thisPopup).appendTo('.my-benefits-temporary');
26814                       }
26815                   });
26816               });
26817           });
26818
26819       });
26820    });
26821
26822    $('.my-benefits .close-popup').on('click', function(){
26823        $('.popups-list .loyalty-popup').removeClass('visible');
26824        $('.my-benefits-temporary .loyalty-popup').appendTo('.my-stays .my-benefits.popups-list');
26825    });
26826
26827    stayHistoryWrapper.each(function(){
26828        var thisStayHistoryWrapper = $(this),
26829            triggerYearWrapper = $('.years', thisStayHistoryWrapper),
26830            singleYearButton = $('button', triggerYearWrapper),
26831            allYearEntries = $('.all-year-entries', thisStayHistoryWrapper),
26832            entriesSingleYear = $('.year-of-stay', allYearEntries);
26833
26834        singleYearButton.on('click', function(){
26835           var thisYearButton = $(this);
26836
26837            singleYearButton.removeClass('active');
26838            thisYearButton.addClass('active');
26839
26840           if(!thisYearButton.hasClass('all-stays')){
26841               var thisYearButtonAttr = $(this).data('year');
26842
26843               entriesSingleYear.each(function(){
26844                  var thisYearEntries = $(this),
26845                      thisYearEntriesAttr = thisYearEntries.data('year'),
26846                      thisYearAllMonthEntries = $('.month-wrapper', thisYearEntries),
26847                      thisYearFirstMonthEntries = $('.month-wrapper', thisYearEntries).first();
26848
26849                  if(thisYearEntriesAttr === thisYearButtonAttr){
26850                      entriesSingleYear.hide();
26851                      thisYearEntries.show();
26852
26853                      $('.month-trigger', thisYearAllMonthEntries).removeClass('active');
26854                      $('.entries-wrapper', thisYearAllMonthEntries).hide();
26855
26856                      $('.month-trigger', thisYearFirstMonthEntries).addClass('active');
26857                      $('.entries-wrapper', thisYearFirstMonthEntries).show();
26858                  }
26859               });
26860           } else {
26861               $('.month-trigger', entriesSingleYear).removeClass('active');
26862               $('.entries-wrapper', entriesSingleYear).hide();
26863               entriesSingleYear.show();
26864               $('.year-of-stay:first .month-wrapper:first .month-trigger', allYearEntries).addClass('active');
26865               $('.year-of-stay:first .month-wrapper:first .entries-wrapper', allYearEntries).show();
26866           }
26867        });
26868
26869        entriesSingleYear.each(function(){
26870           var thisYearBlock = $(this),
26871               eachMonthInThisYear = $('.month-wrapper', thisYearBlock);
26872
26873            eachMonthInThisYear.each(function(){
26874               var thisMonth = $(this),
26875                   thisMonthTrigger = $('.month-trigger', thisMonth),
26876                   thisMonthEntries = $('.entries-wrapper', thisMonth);
26877
26878                thisMonthTrigger.on('click', function(){
26879                    $(this).toggleClass('active');
26880                    thisMonthEntries.slideToggle(300);
26881                });
26882            });
26883        });
26884    });
26885
26886})();
26887
26888// Awards scripts
26889(function() {
26890    var loyaltyAwards = $('#loyalty-local-exp-awards'),
26891        awardsTable = $('#awards-table', loyaltyAwards),
26892        awardTableHeadings = $('.tablesorter-header', awardsTable),
26893        awardsPopup = $('#awards-popup'),
26894        closeAwardsPopup = $('.close-button', awardsPopup),
26895        awardRedeemButton = $('.redeem-award', awardsTable);
26896
26897    // Table sorting
26898    $('table.tablesorter').tablesorter();
26899
26900    // Remove description rows and reset button states on begin sorting
26901    awardsTable.bind("sortBegin",function() {
26902        $('.description', awardsTable).remove();
26903        $('.see-award-details', awardsTable).removeClass('active');
26904    });
26905
26906    // Remove description rows on sorting
26907    awardTableHeadings.on('click', function(){
26908        $('#awards-table .description').remove();
26909    });
26910
26911    // Close awards popup
26912    closeAwardsPopup.on('click', function (e) {
26913        e.preventDefault();
26914
26915        awardsPopup.removeClass('visible');
26916    });
26917
26918    // Redeem award button click
26919    awardRedeemButton.on('click', function (e) {
26920        e.preventDefault();
26921
26922        var _this = $(this),
26923            imageData = _this.data('image'),
26924            titleData = _this.data('title'),
26925            textData = _this.data('text'),
26926            linkData = _this.data('link');
26927
26928        // Update award popup values
26929        updateAwardsPopupValues(awardsPopup, imageData, titleData, textData, linkData);
26930
26931        awardsPopup.addClass('visible');
26932    });
26933
26934
26935})();
26936
26937// Table 'Show Details' function
26938var showDetails = function(element){
26939    var _this = $(element),
26940        _thisText = _this.data('text'),
26941        _thisImageURL = _this.data('image'),
26942        _thisParentRow = _this.parent().parent(),
26943        tr = $('<tr />',{class: 'description'}),
26944        td = $('<td />',{colspan: '3'}),
26945        image = $('<img />',{src: _thisImageURL}),
26946        text = $('<p />', {text: _thisText});
26947
26948    if (!_this.hasClass('active')) {
26949        _this.addClass('active');
26950
26951        _thisParentRow.after(tr.append(td.append(image).append(text)));
26952
26953        setTimeout(function(){
26954            tr.addClass('visible')
26955        }, 100);
26956    } else {
26957        _thisParentRow.next().remove();
26958        _this.removeClass('active');
26959    }
26960};
26961
26962// Awards Popup
26963var updateAwardsPopupValues = function(awardPopup, image, title, text, link){
26964    var imageEl = $('img', awardPopup),
26965        titleEl = $('h2', awardPopup),
26966        textEl = $('p', awardPopup),
26967        buttonEl = $('.button', awardPopup);
26968
26969    imageEl.attr('src', image);
26970    titleEl.html(title);
26971    textEl.html(text);
26972    buttonEl.attr('href', link);
26973};
26974
26975// Invite friends scripts
26976(function () {
26977  const friendPopupTrigger = $("#invite-friend-popup-trigger"),
26978    friendPopup = $("#invite-friend-popup"),
26979    friendPopupClose = $(".close-button", friendPopup),
26980    inviteFriendForm = $("#invite-friend-form"),
26981    friendReCaptchaWrapper = $(".g-recaptcha", inviteFriendForm);
26982
26983  friendPopupTrigger.on("click", function (e) {
26984    e.preventDefault();
26985
26986    friendPopup.addClass("visible");
26987  });
26988
26989  friendPopupClose.on("click", function (e) {
26990    e.preventDefault();
26991
26992    friendPopup.removeClass("visible");
26993  });
26994})();
26995
26996// Invite Friend Form
26997function inviteFriendFormSubmit() {
26998  let inviteFriendForm = $("#invite-friend-form");
26999
27000  let jsErrorContainer = $(".js-error-container");
27001
27002  // Js error div clear
27003  jsErrorContainer.empty();
27004
27005  // Check validity
27006
27007  var formValid = inviteFriendForm.validationEngine("validate");
27008
27009  if (!formValid) return;
27010
27011  $(".loading-overlay").addClass("visible");
27012
27013  // Trigger form submit
27014  // inviteFriendForm.submit();
27015
27016  $.ajax({
27017    type: "POST",
27018    url: inviteFriendForm.attr("action"),
27019    data: inviteFriendForm.serialize(), // serializes the form's elements.
27020    success: function (data) {
27021      console.log("Invite Friend Results", data);
27022
27023      $(".loading-overlay").removeClass("visible");
27024
27025      if (data.code == 200) {
27026        console.log(data.result_text);
27027        if (data.result_text && typeof data.result_text === "string") {
27028          let msg = data.result_text;
27029          jsErrorContainer.append("<p>" + msg + "</p>");
27030        }
27031      }
27032       else {
27033        if (data.result_text && typeof data.result_text === "string") {
27034          let msg = data.result_text;
27035          // jsErrorContainer.append("<p>" + msg + "</p>");
27036          jsErrorContainer.append("<p>Great news! Your invitee is already a member.</p>");
27037        }
27038        $(document).on("click", function () {
27039          jsErrorContainer.empty();
27040        });
27041      }
27042    },
27043    error: function (err) {
27044      console.log("err", err);
27045      console.log("error", err.statusText);
27046      $(".loading-overlay").removeClass("visible");
27047      if (err.status == 500) {
27048        jsErrorContainer.append("<p> User already exists </p>");
27049      } else {
27050        jsErrorContainer.append(
27051          "<p> Something went wrong. Please try again later. </p>"
27052        );
27053      }
27054      $(document).on("click", function () {
27055        jsErrorContainer.empty();
27056      });
27057    },
27058  });
27059}
27060
27061jQuery(document).ready(function(){
27062
27063    $( ".faq-section" ).each(function( index ) {
27064
27065        var $thisFaq = $(this),
27066            $thisFaqItem = $('.faq-section-item', $thisFaq),
27067            $thisFaqItemQuestion = $('.faq-section-question', $thisFaq),
27068            $thisStartModeOption = $thisFaq.data('start-mode-option'),
27069            $thisDataExpandOption = $thisFaq.data('expand-option');
27070
27071        if($thisStartModeOption == 'first') {
27072            $thisFaqItem.first().addClass('active').find('.faq-section-answer').show();
27073        } else if($thisStartModeOption == 'all') {
27074            $thisFaqItem.addClass('active').find('.faq-section-answer').show();
27075        }
27076
27077        $thisFaqItemQuestion.on( "click", function() {
27078
27079            var $thisQuestion = $(this);
27080
27081            if($thisDataExpandOption == 'one') {
27082                $thisFaqItemQuestion.not(this).parent().removeClass('active');
27083                $thisFaqItemQuestion.not(this).next().slideUp();
27084            }
27085
27086            $thisQuestion.parent().toggleClass('active');
27087            $thisQuestion.next().slideToggle();
27088        });
27089
27090    });
27091
27092});
27093// Main Site Loyalty Scripts
27094(function () {
27095  const myProfileForm = $(".myprofile-form"),
27096    loyaltyForm = $(".loyalty-form");
27097
27098  // Enable this parent submit/save
27099  const enableThisSave = function (thisObject) {
27100    const _thisParentFieldset = thisObject.parents(".loyalty-form"),
27101      _thisSaveSubmit = $('input[type="submit"]', _thisParentFieldset);
27102
27103    _thisSaveSubmit.removeAttr("disabled");
27104  };
27105
27106  // Form Country Flags
27107  if (loyaltyForm.length) {
27108    var phoneSelector = $(".form .phone-num");
27109
27110    phoneSelector.each(function () {
27111      const _this = $(this);
27112
27113      _this.intlTelInput({
27114        initialCountry: "us",
27115        preferredCountries: ["us", "ca"],
27116        autoFormat: true,
27117        nationalMode: false,
27118      });
27119
27120      _this.on("countrychange", function () {
27121        console.log("country changed");
27122        enableThisSave(phoneSelector);
27123      });
27124    });
27125  }
27126
27127  // Profile form scripts
27128  if (myProfileForm.length) {
27129    // Add family member by type and index
27130    const addFamilyMemberInput = (type, index) => {
27131      switch (type) {
27132        case "partner":
27133          return `
27134                         <fieldset class="additional-fieldset partner" data-attribute="partner">
27135                            <legend>${
27136                              profileFormTranslateLabels.partner
27137                            }</legend>
27138                            <h4>${profileFormTranslateLabels.partner}</h4>
27139                            <button type="button" class="remove-fieldset" data-attribute="partner">(${
27140                              profileFormTranslateLabels.remove
27141                            })</button>
27142
27143                            <div class="form-block">
27144                                <div class="w33 paragraph">
27145                                    <label for="${profileFormId}-spouse-title-x">${
27146            profileFormTranslateLabels.title
27147          }</label>
27148                                    <div class="select-wrapper">
27149                                        <select name="${profileFormQualifiedName}[spouse][title]" id="${profileFormId}-spouse-title-x">
27150                                            <option value selected="selected">${
27151                                              profileFormTranslateLabels.select
27152                                            }</option>
27153                                            ${profileFormTitles.map(
27154                                              (value) =>
27155                                                `<option value='${value}'>${value}</option>`
27156                                            )}
27157                                        </select>
27158                                        <div class="select-icon"></div>
27159                                    </div>
27160                                </div>
27161                                <p class="w33">
27162                                    <label for="${profileFormId}-spouse-name-x">${
27163            profileFormTranslateLabels.name
27164          }</label>
27165                                    <input type="text" name="${profileFormQualifiedName}[spouse][name]" id="${profileFormId}-spouse-name-x"/>
27166                                </p>
27167                                <p class="w33">
27168                                    <label for="${profileFormId}-spouse-dob">${
27169            profileFormTranslateLabels.dob
27170          }</label>
27171                                    <input type="text" name="${profileFormQualifiedName}[spouse][birthday]" id="${profileFormId}-spouse-dob-x"placeholder="MM/DD/YYYY"/>
27172                                </p>
27173                            </div>
27174                        </fieldset>
27175                    `;
27176        case "child":
27177          return `
27178                        <fieldset class="additional-fieldset child" data-attribute="child-${index}">
27179                            <legend>${profileFormTranslateLabels.child} ${index}</legend>
27180                            <h4>${profileFormTranslateLabels.child} ${index}</h4>
27181                            <button type="button" class="remove-fieldset" data-attribute="child-${index}">(${profileFormTranslateLabels.remove})</button>
27182                            <div class="form-block">
27183                                <p class="w50">
27184                                    <label for="${profileFormId}-child-name-${index}-x">${profileFormTranslateLabels.childName}</label>
27185                                    <input type="text" name="${profileFormQualifiedName}[child][${index}][name]" id="${profileFormId}-child-name-${index}-x"/>
27186                                </p>
27187                                <p class="w50">
27188                                    <label for="${profileFormId}-child-dob-${index}-x">${profileFormTranslateLabels.dob}</label>
27189                                    <input type="text" name="${profileFormQualifiedName}[child][${index}][birthday]" id="${profileFormId}-child-dob-${index}-x" placeholder="MM/DD/YYYY"/>
27190                                </p>
27191                            </div>
27192                        </fieldset>
27193                    `;
27194      }
27195    };
27196
27197    // Re-index children count
27198    const reindexChildren = (plusMinus) => {
27199      switch (plusMinus) {
27200        case "plus":
27201          profileChildCount = profileChildCount + 1;
27202          break;
27203        case "minus":
27204          profileChildCount = profileChildCount - 1;
27205          break;
27206        default:
27207          profileChildCount = $(
27208            ".additional-fieldset.child",
27209            myProfileForm
27210          ).length;
27211      }
27212    };
27213
27214    // Update children counts
27215    var updateChildrenCounters = function () {
27216      $(".additional-family-members .additional-fieldset.child legend").each(
27217        function (index) {
27218          var newText = $(this)
27219            .text()
27220            .replace(/[0-9]/g, index + 1);
27221          $(this).text(newText).next().text(newText);
27222        }
27223      );
27224
27225      reindexChildren();
27226    };
27227
27228    // Remove family member;
27229    $(document).on("click", "button.remove-fieldset", function (e) {
27230      e.preventDefault();
27231
27232      $(this).parents(".additional-fieldset").remove();
27233      $(
27234        '.add-family-member button[data-attribute="' +
27235          $(this).data("attribute") +
27236          '"]'
27237      )
27238        .removeClass("hide")
27239        .show();
27240
27241      updateChildrenCounters();
27242    });
27243
27244    var addFamilyMember = $(".add-family-member"),
27245      familyMemberTrigger = $("button", addFamilyMember);
27246
27247    // Open Family Member List
27248    familyMemberTrigger.on("click", function (e) {
27249      e.preventDefault();
27250      addFamilyMember.toggleClass("open");
27251    });
27252
27253    $(document).on("click", function (e) {
27254      if (
27255        !(
27256          $(e.target).closest(addFamilyMember).length > 0 ||
27257          $(e.target).closest(familyMemberTrigger).length > 0
27258        )
27259      ) {
27260        addFamilyMember.removeClass("open");
27261      }
27262    });
27263
27264    $(".add-family-member button").click(function (e) {
27265      e.preventDefault();
27266
27267      const _thisButton = $(this),
27268        _thisType = $(this).data("attribute");
27269
27270      switch (_thisType) {
27271        case "partner":
27272          $(".additional-family-members.partner", myProfileForm).prepend(
27273            addFamilyMemberInput("partner")
27274          );
27275          _thisButton.addClass("hide");
27276          break;
27277        case "child":
27278          reindexChildren("plus");
27279          $(".additional-family-members.children", myProfileForm).append(
27280            addFamilyMemberInput("child", profileChildCount)
27281          );
27282          break;
27283        default:
27284          return;
27285      }
27286
27287      watchChangesToEnableSubmit();
27288    });
27289  }
27290
27291  // Disabled submit buttons
27292  const profileForm = $("#profile-info-form"),
27293    profileSubForms = $(".loyalty-form", profileForm);
27294
27295  // Watch input change to enable submit/save
27296  const watchChangesToEnableSubmit = function () {
27297    profileSubForms.each(function () {
27298      const _thisSubform = $(this),
27299        _thisInputs = $('input:not([type="submit"])', _thisSubform),
27300        _thisFormFields = $('input:not([type="submit"]), select', _thisSubform),
27301        _thisSubmit = $('input[type="submit"]', _thisSubform);
27302
27303      // On change
27304      _thisFormFields.on("change", function () {
27305        _thisSubmit.removeAttr("disabled");
27306      });
27307
27308      // On keypress ASAP if value changed
27309      _thisInputs.each(function () {
27310        const _thisInput = $(this);
27311        let _thisValue = _thisInput.val();
27312
27313        _thisInput.keyup(function () {
27314          if (_thisInput.val() != _thisValue) {
27315            _thisSubmit.removeAttr("disabled");
27316          }
27317        });
27318      });
27319    });
27320  };
27321
27322  watchChangesToEnableSubmit();
27323
27324  // Loyalty Form Address Type - Tab Selector
27325  // $('.loyalty-form.address-form').each(function () {
27326  //
27327  //     var thisFieldsetType = $(this),
27328  //         fieldsetSelectors = $('.fieldset-selector', thisFieldsetType),
27329  //         fieldsetSelector = $('button', fieldsetSelectors),
27330  //         fieldsetEntry = $('.fieldset-entry', thisFieldsetType);
27331  //
27332  //     fieldsetSelector.on('click', function () {
27333  //         var thisFieldsetSelector = $(this);
27334  //         thisFieldsetSelector.siblings().removeClass('active');
27335  //         thisFieldsetSelector.addClass('active');
27336  //     });
27337  //
27338  //     fieldsetEntry.each(function () {
27339  //         var thisItem = $(this);
27340  //         var fieldsetState = $(this).data('fieldset');
27341  //
27342  //         fieldsetSelector.on('click', function () {
27343  //             thisItem.addClass('hide');
27344  //
27345  //             if ($(this).data('fieldset') === fieldsetState) {
27346  //                 thisItem.removeClass('hide');
27347  //             } else {
27348  //                 thisItem.addClass('hide');
27349  //             }
27350  //         });
27351  //
27352  //     });
27353  //
27354  // });
27355})();
27356
27357// Profile progress loading circles and tabulation
27358
27359(function() {
27360    var profProgress = $('#profile-progress');
27361
27362    if(profProgress.length) {
27363        var tabControls = $('.tab-controls'),
27364            tabButtons = $('button', tabControls),
27365            tabBlocks = $('.tab', profProgress);
27366
27367        // Apply button progress stroke value
27368        tabButtons.each(function(){
27369            var _this = $(this),
27370                _thisOffset = _this.data('offset');
27371
27372            $('.bar2', _this).attr('style', 'stroke-dashoffset: '+_thisOffset+'px;');
27373        });
27374
27375        // Change tabs
27376        tabButtons.on('click', function (e) {
27377            e.preventDefault();
27378
27379            var _thisDataIndex = parseInt($(this).data('index'));
27380
27381            tabBlocks.removeClass('visible');
27382            tabBlocks.eq(_thisDataIndex).addClass('visible');
27383
27384            tabButtons.removeClass('active');
27385            $(this).addClass('active');
27386        });
27387    }
27388})();
27389
27390(function() {
27391    // Member card popup
27392
27393    var memCardPopup = $('.member-card-popup'),
27394        memCardTrigger = $('.member-card-popup-trigger'),
27395        memCardClose = $('.close', memCardPopup);
27396
27397    if (memCardPopup.length && memCardTrigger.length) {
27398        memCardPopup.addFocusLock({
27399            trigger: memCardTrigger,
27400            onEscapeCallback: function () {
27401                closeMemCard();
27402            },
27403            onClickOutsideCallback: function () {
27404                closeMemCard();
27405            }
27406        });
27407
27408        var openMemCard = function () {
27409            memCardPopup.addClass('open');
27410
27411            memCardPopup.focusLockOn();
27412
27413            memCardTrigger.attr('aria-expanded', 'true');
27414        };
27415
27416        var closeMemCard = function () {
27417            memCardPopup.focusLockOff();
27418
27419            memCardPopup.removeClass('open');
27420
27421            memCardTrigger.attr('aria-expanded', 'false');
27422        };
27423
27424
27425        memCardTrigger.on('click', function (e) {
27426            e.preventDefault();
27427
27428            openMemCard();
27429        });
27430
27431        memCardClose.on('click', function (e) {
27432            e.preventDefault();
27433
27434            closeMemCard();
27435        });
27436    }
27437
27438    $(document).on('click',function(e){
27439        if(!(
27440            ($(e.target).closest("#profile_controls").length > 0 ) ||
27441            ($(e.target).closest("#profile_controls button").length > 0) ||
27442            ($(e.target).closest(".member-card-popup").length > 0) ||
27443            ($(e.target).closest(".member-card-popup .close").length > 0) ||
27444            ($(e.target).closest(".member-card-popup *").length > 0)
27445        )){
27446            $("#profile_controls").removeClass("open");
27447            $("#profile_controls").parent().removeClass("open");
27448        }
27449    });
27450})();
27451
27452// Member Benefits Slideshow
27453
27454(function() {
27455    var memberBenefitsACM = $('.member-benefits-acm');
27456	if ($('.slide', memberBenefitsACM).length > 1) {
27457
27458		$('.slideshow-wrapper', memberBenefitsACM).addClass('swiper-wrapper');
27459		$('.slide', memberBenefitsACM).addClass('swiper-slide');
27460
27461		slideshows['member-benefits'] = new Swiper( $('.slideshow', memberBenefitsACM), {
27462            a11y: true,
27463            slidesPerView: 3.4,
27464            loop: true,
27465            preventClicks: false,
27466            preloadImages: false,
27467            spaceBetween: 25,
27468            loopAdditionalSlides: 3,
27469            loopedSlides: 3,
27470            lazy: {
27471                loadOnTransitionStart: true
27472            },
27473            watchSlidesVisibility: true,
27474			navigation: {
27475				prevEl: $('.slideshow-button.previous', memberBenefitsACM),
27476				nextEl: $('.slideshow-button.next', memberBenefitsACM)
27477			},
27478            breakpoints: {
27479                1130: {
27480                    slidesPerView: 2.4
27481                },
27482                1023: {
27483                    slidesPerView: 1.5
27484                },
27485                768: {
27486                    slidesPerView: 1,
27487                    autoHeight: true
27488                }
27489            },
27490			on: {
27491				init: function(){
27492					var swiper = this;
27493					disableKeyboardNavigation(swiper.wrapperEl);
27494					$('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
27495						restoreKeyboardNavigation(this, true);
27496					});
27497
27498                    lozadObserver.observe();
27499
27500                    // ADA
27501                    var slides = $('.swiper-slide', swiper.wrapperEl);
27502                    var activeSlide = $('.swiper-slide.swiper-slide-active', swiper.wrapperEl);
27503
27504                    slides.attr('aria-hidden','true');
27505                    activeSlide.attr('aria-hidden','false');
27506
27507                    if (windowWidth > 768) {
27508                        activeSlide.next().attr('aria-hidden', 'false');
27509                        activeSlide.next().next().attr('aria-hidden', 'false');
27510                    }
27511                },
27512                slideChangeTransitionStart: function(){
27513                    var swiper = this;
27514                    disableKeyboardNavigation(swiper.wrapperEl);
27515
27516                    lozadObserver.observe();
27517
27518                    // ADA
27519                    var slides = $('.swiper-slide', swiper.wrapperEl);
27520                    var activeSlide = $('.swiper-slide.swiper-slide-active', swiper.wrapperEl);
27521
27522                    slides.attr('aria-hidden','true');
27523                    activeSlide.attr('aria-hidden','false');
27524
27525                    if (windowWidth > 768) {
27526                        activeSlide.next().attr('aria-hidden', 'false');
27527                        activeSlide.next().next().attr('aria-hidden', 'false');
27528                    }
27529                },
27530                slideChangeTransitionEnd: function(){
27531                    var swiper = this;
27532                    $('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
27533                        restoreKeyboardNavigation(this, true);
27534                    });
27535                }
27536			}
27537		});
27538
27539	}
27540
27541})();
27542
27543// Member Benefits Slideshow
27544
27545(function() {
27546
27547    // New Slider
27548    var offersBenefitsACM = $('.offer-benefits');
27549	if ($('.cards', offersBenefitsACM).length > 1) {
27550
27551		$('.cards-row', offersBenefitsACM).addClass('swiper-wrapper');
27552		$('.cards', offersBenefitsACM).addClass('swiper-slide');
27553
27554		slideshows['offers-benefits'] = new Swiper( $('.offers-slideShow', offersBenefitsACM), {
27555            a11y: true,
27556            slidesPerView: 3,
27557            loop: true,
27558            preventClicks: false,
27559            preloadImages: false,
27560            spaceBetween: 25,
27561            loopAdditionalSlides: 3,
27562            loopedSlides: 3,
27563            lazy: {
27564                loadOnTransitionStart: true
27565            },
27566            watchSlidesVisibility: true,
27567			navigation: {
27568				prevEl: $('.slideshow-button.previous', offersBenefitsACM),
27569				nextEl: $('.slideshow-button.next', offersBenefitsACM)
27570			},
27571            pagination: {
27572                el: $('.slideshow-pagination', offersBenefitsACM),
27573                type: 'custom',
27574                renderCustom: function (swiper, current, total) {
27575                    return current + ' of ' + total;
27576                }
27577                // clickable: true
27578            }, 
27579            breakpoints: {
27580                1130: {
27581                    slidesPerView: 3
27582                },
27583                1023: {
27584                    slidesPerView: 2
27585                },
27586                768: {
27587                    slidesPerView: 1,
27588                    autoHeight: true
27589                }
27590            },
27591			on: {
27592				init: function(){
27593					var swiper = this;
27594					disableKeyboardNavigation(swiper.wrapperEl);
27595					$('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
27596						restoreKeyboardNavigation(this, true);
27597					});
27598
27599                    lozadObserver.observe();
27600
27601                    // ADA
27602                    var slides = $('.swiper-slide', swiper.wrapperEl);
27603                    var activeSlide = $('.swiper-slide.swiper-slide-active', swiper.wrapperEl);
27604
27605                    slides.attr('aria-hidden','true');
27606                    activeSlide.attr('aria-hidden','false');
27607
27608                    if (windowWidth > 768) {
27609                        activeSlide.next().attr('aria-hidden', 'false');
27610                        activeSlide.next().next().attr('aria-hidden', 'false');
27611                    }
27612                },
27613                slideChangeTransitionStart: function(){
27614                    var swiper = this;
27615                    disableKeyboardNavigation(swiper.wrapperEl);
27616
27617                    lozadObserver.observe();
27618
27619                    // ADA
27620                    var slides = $('.swiper-slide', swiper.wrapperEl);
27621                    var activeSlide = $('.swiper-slide.swiper-slide-active', swiper.wrapperEl);
27622
27623                    slides.attr('aria-hidden','true');
27624                    activeSlide.attr('aria-hidden','false');
27625
27626                    if (windowWidth > 768) {
27627                        activeSlide.next().attr('aria-hidden', 'false');
27628                        activeSlide.next().next().attr('aria-hidden', 'false');
27629                    }
27630                },
27631                slideChangeTransitionEnd: function(){
27632                    var swiper = this;
27633                    $('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
27634                        restoreKeyboardNavigation(this, true);
27635                    });
27636                }
27637			}
27638		});
27639	}
27640    
27641    // New Slider 
27642
27643    var memberBenefitsACM = $('.member-benefits-acm');
27644	if ($('.slide', memberBenefitsACM).length > 1) {
27645
27646		$('.slideshow-wrapper', memberBenefitsACM).addClass('swiper-wrapper');
27647		$('.slide', memberBenefitsACM).addClass('swiper-slide');
27648
27649		slideshows['member-benefits'] = new Swiper( $('.slideshow', memberBenefitsACM), {
27650            a11y: true,
27651            slidesPerView: 3.4,
27652            loop: true,
27653            preventClicks: false,
27654            preloadImages: false,
27655            spaceBetween: 25,
27656            loopAdditionalSlides: 3,
27657            loopedSlides: 3,
27658            lazy: {
27659                loadOnTransitionStart: true
27660            },
27661            watchSlidesVisibility: true,
27662			navigation: {
27663				prevEl: $('.slideshow-button.previous', memberBenefitsACM),
27664				nextEl: $('.slideshow-button.next', memberBenefitsACM)
27665			},
27666            breakpoints: {
27667                1130: {
27668                    slidesPerView: 2.4
27669                },
27670                1023: {
27671                    slidesPerView: 1.5
27672                },
27673                768: {
27674                    slidesPerView: 1,
27675                    autoHeight: true
27676                }
27677            },
27678			on: {
27679				init: function(){
27680					var swiper = this;
27681					disableKeyboardNavigation(swiper.wrapperEl);
27682					$('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
27683						restoreKeyboardNavigation(this, true);
27684					});
27685
27686                    lozadObserver.observe();
27687
27688                    // ADA
27689                    var slides = $('.swiper-slide', swiper.wrapperEl);
27690                    var activeSlide = $('.swiper-slide.swiper-slide-active', swiper.wrapperEl);
27691
27692                    slides.attr('aria-hidden','true');
27693                    activeSlide.attr('aria-hidden','false');
27694
27695                    if (windowWidth > 768) {
27696                        activeSlide.next().attr('aria-hidden', 'false');
27697                        activeSlide.next().next().attr('aria-hidden', 'false');
27698                    }
27699                },
27700                slideChangeTransitionStart: function(){
27701                    var swiper = this;
27702                    disableKeyboardNavigation(swiper.wrapperEl);
27703
27704                    lozadObserver.observe();
27705
27706                    // ADA
27707                    var slides = $('.swiper-slide', swiper.wrapperEl);
27708                    var activeSlide = $('.swiper-slide.swiper-slide-active', swiper.wrapperEl);
27709
27710                    slides.attr('aria-hidden','true');
27711                    activeSlide.attr('aria-hidden','false');
27712
27713                    if (windowWidth > 768) {
27714                        activeSlide.next().attr('aria-hidden', 'false');
27715                        activeSlide.next().next().attr('aria-hidden', 'false');
27716                    }
27717                },
27718                slideChangeTransitionEnd: function(){
27719                    var swiper = this;
27720                    $('.swiper-slide-active', swiper.wrapperEl).nextAll().addBack().slice(0, swiper.params.slidesPerView).each(function(){
27721                        restoreKeyboardNavigation(this, true);
27722                    });
27723                }
27724			}
27725		});
27726
27727	}
27728
27729})();
27730
27731/*!
27732   Copyright 2008-2021 SpryMedia Ltd.
27733
27734 This source file is free software, available under the following license:
27735   MIT license - http://datatables.net/license
27736
27737 This source file is distributed in the hope that it will be useful, but
27738 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
27739 or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
27740
27741 For details please refer to: http://www.datatables.net
27742 DataTables 1.11.5
27743 ©2008-2021 SpryMedia Ltd - datatables.net/license
27744*/
27745var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(l,z,A){l instanceof String&&(l=String(l));for(var q=l.length,E=0;E<q;E++){var P=l[E];if(z.call(A,P,E,l))return{i:E,v:P}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
27746$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(l,z,A){if(l==Array.prototype||l==Object.prototype)return l;l[z]=A.value;return l};$jscomp.getGlobal=function(l){l=["object"==typeof globalThis&&globalThis,l,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var z=0;z<l.length;++z){var A=l[z];if(A&&A.Math==Math)return A}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
27747$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(l,z){var A=$jscomp.propertyToPolyfillSymbol[z];if(null==A)return l[z];A=l[A];return void 0!==A?A:l[z]};
27748$jscomp.polyfill=function(l,z,A,q){z&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(l,z,A,q):$jscomp.polyfillUnisolated(l,z,A,q))};$jscomp.polyfillUnisolated=function(l,z,A,q){A=$jscomp.global;l=l.split(".");for(q=0;q<l.length-1;q++){var E=l[q];if(!(E in A))return;A=A[E]}l=l[l.length-1];q=A[l];z=z(q);z!=q&&null!=z&&$jscomp.defineProperty(A,l,{configurable:!0,writable:!0,value:z})};
27749$jscomp.polyfillIsolated=function(l,z,A,q){var E=l.split(".");l=1===E.length;q=E[0];q=!l&&q in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var P=0;P<E.length-1;P++){var ma=E[P];if(!(ma in q))return;q=q[ma]}E=E[E.length-1];A=$jscomp.IS_SYMBOL_NATIVE&&"es6"===A?q[E]:null;z=z(A);null!=z&&(l?$jscomp.defineProperty($jscomp.polyfills,E,{configurable:!0,writable:!0,value:z}):z!==A&&($jscomp.propertyToPolyfillSymbol[E]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(E):$jscomp.POLYFILL_PREFIX+E,
27750E=$jscomp.propertyToPolyfillSymbol[E],$jscomp.defineProperty(q,E,{configurable:!0,writable:!0,value:z})))};$jscomp.polyfill("Array.prototype.find",function(l){return l?l:function(z,A){return $jscomp.findInternal(this,z,A).v}},"es6","es3");
27751(function(l){"function"===typeof define&&define.amd?define(["jquery"],function(z){return l(z,window,document)}):"object"===typeof exports?module.exports=function(z,A){z||(z=window);A||(A="undefined"!==typeof window?require("jquery"):require("jquery")(z));return l(A,z,z.document)}:window.DataTable=l(jQuery,window,document)})(function(l,z,A,q){function E(a){var b,c,d={};l.each(a,function(e,h){(b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" ")&&(c=e.replace(b[0],
27752b[2].toLowerCase()),d[c]=e,"o"===b[1]&&E(a[e]))});a._hungarianMap=d}function P(a,b,c){a._hungarianMap||E(a);var d;l.each(b,function(e,h){d=a._hungarianMap[e];d===q||!c&&b[d]!==q||("o"===d.charAt(0)?(b[d]||(b[d]={}),l.extend(!0,b[d],b[e]),P(a[d],b[d],c)):b[d]=b[e])})}function ma(a){var b=u.defaults.oLanguage,c=b.sDecimal;c&&Xa(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&d&&"No data available in table"===b.sEmptyTable&&X(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&d&&"Loading..."===b.sLoadingRecords&&
27753X(a,a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&Xa(a)}}function zb(a){S(a,"ordering","bSort");S(a,"orderMulti","bSortMulti");S(a,"orderClasses","bSortClasses");S(a,"orderCellsTop","bSortCellsTop");S(a,"order","aaSorting");S(a,"orderFixed","aaSortingFixed");S(a,"paging","bPaginate");S(a,"pagingType","sPaginationType");S(a,"pageLength","iDisplayLength");S(a,"searching","bFilter");
27753"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":
27754"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&P(u.models.oSearch,a[b])}function Ab(a){S(a,"orderable","bSortable");S(a,"orderData","aDataSort");S(a,"orderSequence","asSorting");S(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"!==typeof b||Array.isArray(b)||(a.aDataSort=[b])}function Bb(a){if(!u.__browser){var b={};u.__browser=b;var c=l("<div/>").css({position:"fixed",top:0,left:-1*l(z).scrollLeft(),height:1,
27755width:1,overflow:"hidden"}).append(l("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(l("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}l.extend(a.oBrowser,u.__browser);a.oScroll.iBarWidth=u.__browser.barWidth}
27756function Cb(a,b,c,d,e,h){var f=!1;if(c!==q){var g=c;f=!0}for(;d!==e;)a.hasOwnProperty(d)&&(g=f?b(g,a[d],d,a):a[d],f=!0,d+=h);return g}function Ya(a,b){var c=u.defaults.column,d=a.aoColumns.length;c=l.extend({},u.models.oColumn,c,{nTh:b?b:A.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=l.extend({},u.models.oSearch,c[d]);Ga(a,d,l(b).data())}function Ga(a,b,c){b=a.aoColumns[b];
27757var d=a.oClasses,e=l(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var h=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);h&&(b.sWidthOrig=h[1])}c!==q&&null!==c&&(Ab(c),P(u.defaults.column,c,!0),c.mDataProp===q||c.mData||(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),l.extend(b,c),X(b,c,"sWidth","sWidthOrig"),c.iDataSort!==q&&(b.aDataSort=[c.iDataSort]),X(b,c,"aDataSort"));var f=b.mData,g=na(f),
27758k=b.mRender?na(b.mRender):null;c=function(m){return"string"===typeof m&&-1!==m.indexOf("@")};b._bAttrSrc=l.isPlainObject(f)&&(c(f.sort)||c(f.type)||c(f.filter));b._setter=null;b.fnGetData=function(m,n,p){var t=g(m,n,q,p);return k&&n?k(t,n,m,p):t};b.fnSetData=function(m,n,p){return ha(f)(m,n,p)};"number"!==typeof f&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==l.inArray("asc",b.asSorting);c=-1!==l.inArray("desc",b.asSorting);b.bSortable&&(a||c)?a&&!c?
27759(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI):(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI="")}function sa(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Za(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;""===b.sY&&""===b.sX||Ha(a);F(a,null,"column-sizing",[a])}function ta(a,b){a=Ia(a,"bVisible");
27760return"number"===typeof a[b]?a[b]:null}function ua(a,b){a=Ia(a,"bVisible");b=l.inArray(b,a);return-1!==b?b:null}function oa(a){var b=0;l.each(a.aoColumns,function(c,d){d.bVisible&&"none"!==l(d.nTh).css("display")&&b++});return b}function Ia(a,b){var c=[];l.map(a.aoColumns,function(d,e){d[b]&&c.push(e)});return c}function $a(a){var b=a.aoColumns,c=a.aoData,d=u.ext.type.detect,e,h,f;var g=0;for(e=b.length;g<e;g++){var k=b[g];var m=[];if(!k.sType&&k._sManualType)k.sType=k._sManualType;else if(!k.sType){var n=
277610;for(h=d.length;n<h;n++){var p=0;for(f=c.length;p<f;p++){m[p]===q&&(m[p]=T(a,p,g,"type"));var t=d[n](m[p],a);if(!t&&n!==d.length-1)break;if("html"===t&&!Z(m[p]))break}if(t){k.sType=t;break}}k.sType||(k.sType="string")}}}function Db(a,b,c,d){var e,h,f,g=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){var k=b[e];var m=k.targets!==q?k.targets:k.aTargets;Array.isArray(m)||(m=[m]);var n=0;for(h=m.length;n<h;n++)if("number"===typeof m[n]&&0<=m[n]){for(;g.length<=m[n];)Ya(a);d(m[n],k)}else if("number"===typeof m[n]&&
277620>m[n])d(g.length+m[n],k);else if("string"===typeof m[n]){var p=0;for(f=g.length;p<f;p++)("_all"==m[n]||l(g[p].nTh).hasClass(m[n]))&&d(p,k)}}if(c)for(e=0,a=c.length;e<a;e++)d(e,c[e])}function ia(a,b,c,d){var e=a.aoData.length,h=l.extend(!0,{},u.models.oRow,{src:c?"dom":"data",idx:e});h._aData=b;a.aoData.push(h);for(var f=a.aoColumns,g=0,k=f.length;g<k;g++)f[g].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==q&&(a.aIds[b]=h);!c&&a.oFeatures.bDeferRender||ab(a,e,c,d);return e}function Ja(a,
27763b){var c;b instanceof l||(b=l(b));return b.map(function(d,e){c=bb(a,e);return ia(a,c.data,e,c.cells)})}function T(a,b,c,d){"search"===d?d="filter":"order"===d&&(d="sort");var e=a.iDraw,h=a.aoColumns[c],f=a.aoData[b]._aData,g=h.sDefaultContent,k=h.fnGetData(f,d,{settings:a,row:b,col:c});if(k===q)return a.iDrawError!=e&&null===g&&(da(a,0,"Requested unknown parameter "+("function"==typeof h.mData?"{function}":"'"+h.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),g;if((k===f||null===k)&&null!==
27764g&&d!==q)k=g;else if("function"===typeof k)return k.call(f);if(null===k&&"display"===d)return"";"filter"===d&&(a=u.ext.type.search,a[h.sType]&&(k=a[h.sType](k)));return k}function Eb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function cb(a){return l.map(a.match(/(\\.|[^\.])+/g)||[""],function(b){return b.replace(/\\\./g,".")})}function db(a){return U(a.aoData,"_aData")}
27764function Ka(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}
27765function La(a,b,c){for(var d=-1,e=0,h=a.length;e<h;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===q&&a.splice(d,1)}function va(a,b,c,d){var e=a.aoData[b],h,f=function(k,m){for(;k.childNodes.length;)k.removeChild(k.firstChild);k.innerHTML=T(a,b,m,"display")};if("dom"!==c&&(c&&"auto"!==c||"dom"!==e.src)){var g=e.anCells;if(g)if(d!==q)f(g[d],d);else for(c=0,h=g.length;c<h;c++)f(g[c],c)}else e._aData=bb(a,e,d,d===q?q:e._aData).data;e._aSortData=null;e._aFilterData=null;f=a.aoColumns;if(d!==q)f[d].sType=null;
27766else{c=0;for(h=f.length;c<h;c++)f[c].sType=null;eb(a,e)}}function bb(a,b,c,d){var e=[],h=b.firstChild,f,g=0,k,m=a.aoColumns,n=a._rowReadObject;d=d!==q?d:n?{}:[];var p=function(x,w){if("string"===typeof x){var r=x.indexOf("@");-1!==r&&(r=x.substring(r+1),ha(x)(d,w.getAttribute(r)))}},t=function(x){if(c===q||c===g)f=m[g],k=x.innerHTML.trim(),f&&f._bAttrSrc?(ha(f.mData._)(d,k),p(f.mData.sort,x),p(f.mData.type,x),p(f.mData.filter,x)):n?(f._setter||(f._setter=ha(f.mData)),f._setter(d,k)):d[g]=k;g++};if(h)for(;h;){var v=
27767h.nodeName.toUpperCase();if("TD"==v||"TH"==v)t(h),e.push(h);h=h.nextSibling}else for(e=b.anCells,h=0,v=e.length;h<v;h++)t(e[h]);(b=b.firstChild?b:b.nTr)&&(b=b.getAttribute("id"))&&ha(a.rowId)(d,b);return{data:d,cells:e}}function ab(a,b,c,d){var e=a.aoData[b],h=e._aData,f=[],g,k;if(null===e.nTr){var m=c||A.createElement("tr");e.nTr=m;e.anCells=f;m._DT_RowIndex=b;eb(a,e);var n=0;for(g=a.aoColumns.length;n<g;n++){var p=a.aoColumns[n];e=(k=c?!1:!0)?A.createElement(p.sCellType):d[n];e._DT_CellIndex={row:b,
27768column:n};f.push(e);if(k||!(!p.mRender&&p.mData===n||l.isPlainObject(p.mData)&&p.mData._===n+".display"))e.innerHTML=T(a,b,n,"display");p.sClass&&(e.className+=" "+p.sClass);p.bVisible&&!c?m.appendChild(e):!p.bVisible&&c&&e.parentNode.removeChild(e);p.fnCreatedCell&&p.fnCreatedCell.call(a.oInstance,e,T(a,b,n),h,b,n)}F(a,"aoRowCreatedCallback",null,[m,h,b,f])}}function eb(a,b){var c=b.nTr,d=b._aData;if(c){if(a=a.rowIdFn(d))c.id=a;d.DT_RowClass&&(a=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?Ma(b.__rowc.concat(a)):
27769a,l(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&l(c).attr(d.DT_RowAttr);d.DT_RowData&&l(c).data(d.DT_RowData)}}function Fb(a){var b,c,d=a.nTHead,e=a.nTFoot,h=0===l("th, td",d).length,f=a.oClasses,g=a.aoColumns;h&&(c=l("<tr/>").appendTo(d));var k=0;for(b=g.length;k<b;k++){var m=g[k];var n=l(m.nTh).addClass(m.sClass);h&&n.appendTo(c);a.oFeatures.bSort&&(n.addClass(m.sSortingClass),!1!==m.bSortable&&(n.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),fb(a,m.nTh,
27770k)));m.sTitle!=n[0].innerHTML&&n.html(m.sTitle);gb(a,"header")(a,n,m,f)}h&&wa(a.aoHeader,d);l(d).children("tr").children("th, td").addClass(f.sHeaderTH);l(e).children("tr").children("th, td").addClass(f.sFooterTH);if(null!==e)for(a=a.aoFooter[0],k=0,b=a.length;k<b;k++)m=g[k],m.nTf=a[k].cell,m.sClass&&l(m.nTf).addClass(m.sClass)}function xa(a,b,c){var d,e,h=[],f=[],g=a.aoColumns.length;if(b){c===q&&(c=!1);var k=0;for(d=b.length;k<d;k++){h[k]=b[k].slice();h[k].nTr=b[k].nTr;for(e=g-1;0<=e;e--)a.aoColumns[e].bVisible||
27771c||h[k].splice(e,1);f.push([])}k=0;for(d=h.length;k<d;k++){if(a=h[k].nTr)for(;e=a.firstChild;)a.removeChild(e);e=0;for(b=h[k].length;e<b;e++){var m=g=1;if(f[k][e]===q){a.appendChild(h[k][e].cell);for(f[k][e]=1;h[k+g]!==q&&h[k][e].cell==h[k+g][e].cell;)f[k+g][e]=1,g++;for(;h[k][e+m]!==q&&h[k][e].cell==h[k][e+m].cell;){for(c=0;c<g;c++)f[k+c][e+m]=1;m++}l(h[k][e].cell).attr("rowspan",g).attr("colspan",m)}}}}}function ja(a,b){var c="ssp"==Q(a),d=a.iInitDisplayStart;d!==q&&-1!==d&&(a._iDisplayStart=c?
27772d:d>=a.fnRecordsDisplay()?0:d,a.iInitDisplayStart=-1);c=F(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==l.inArray(!1,c))V(a,!1);else{c=[];var e=0;d=a.asStripeClasses;var h=d.length,f=a.oLanguage,g="ssp"==Q(a),k=a.aiDisplay,m=a._iDisplayStart,n=a.fnDisplayEnd();a.bDrawing=!0;if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,V(a,!1);else if(!g)a.iDraw++;else if(!a.bDestroying&&!b){Gb(a);return}if(0!==k.length)for(b=g?a.aoData.length:n,f=g?0:m;f<b;f++){g=k[f];var p=a.aoData[g];null===p.nTr&&ab(a,g);var t=
27773p.nTr;if(0!==h){var v=d[e%h];p._sRowStripe!=v&&(l(t).removeClass(p._sRowStripe).addClass(v),p._sRowStripe=v)}F(a,"aoRowCallback",null,[t,p._aData,e,f,g]);c.push(t);e++}else e=f.sZeroRecords,1==a.iDraw&&"ajax"==Q(a)?e=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(e=f.sEmptyTable),c[0]=l("<tr/>",{"class":h?d[0]:""}).append(l("<td />",{valign:"top",colSpan:oa(a),"class":a.oClasses.sRowEmpty}).html(e))[0];F(a,"aoHeaderCallback","header",[l(a.nTHead).children("tr")[0],db(a),m,n,k]);F(a,"aoFooterCallback",
27774"footer",[l(a.nTFoot).children("tr")[0],db(a),m,n,k]);d=l(a.nTBody);d.children().detach();d.append(l(c));F(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function ka(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&Hb(a);d?ya(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;ja(a);a._drawHold=!1}function Ib(a){var b=a.oClasses,c=l(a.nTable);c=l("<div/>").insertBefore(c);var d=a.oFeatures,e=l("<div/>",{id:a.sTableId+"_wrapper",
27775"class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];
27775a.nTableReinsertBefore=a.nTable.nextSibling;for(var h=a.sDom.split(""),f,g,k,m,n,p,t=0;t<h.length;t++){f=null;g=h[t];if("<"==g){k=l("<div/>")[0];m=h[t+1];if("'"==m||'"'==m){n="";for(p=2;h[t+p]!=m;)n+=h[t+p],p++;"H"==n?n=b.sJUIHeader:"F"==n&&(n=b.sJUIFooter);-1!=n.indexOf(".")?(m=n.split("."),k.id=m[0].substr(1,m[0].length-1),k.className=m[1]):"#"==n.charAt(0)?k.id=n.substr(1,n.length-1):k.className=n;t+=p}e.append(k);
27776e=l(k)}else if(">"==g)e=e.parent();else if("l"==g&&d.bPaginate&&d.bLengthChange)f=Jb(a);else if("f"==g&&d.bFilter)f=Kb(a);else if("r"==g&&d.bProcessing)f=Lb(a);else if("t"==g)f=Mb(a);else if("i"==g&&d.bInfo)f=Nb(a);else if("p"==g&&d.bPaginate)f=Ob(a);else if(0!==u.ext.feature.length)for(k=u.ext.feature,p=0,m=k.length;p<m;p++)if(g==k[p].cFeature){f=k[p].fnInit(a);break}f&&(k=a.aanFeatures,k[g]||(k[g]=[]),k[g].push(f),e.append(f))}c.replaceWith(e);a.nHolding=null}function wa(a,b){b=l(b).children("tr");
27777var c,d,e;a.splice(0,a.length);var h=0;for(e=b.length;h<e;h++)a.push([]);h=0;for(e=b.length;h<e;h++){var f=b[h];for(c=f.firstChild;c;){if("TD"==c.nodeName.toUpperCase()||"TH"==c.nodeName.toUpperCase()){var g=1*c.getAttribute("colspan");var k=1*c.getAttribute("rowspan");g=g&&0!==g&&1!==g?g:1;k=k&&0!==k&&1!==k?k:1;var m=0;for(d=a[h];d[m];)m++;var n=m;var p=1===g?!0:!1;for(d=0;d<g;d++)for(m=0;m<k;m++)a[h+m][n+d]={cell:c,unique:p},a[h+m].nTr=f}c=c.nextSibling}}}function Na(a,b,c){var d=[];c||(c=a.aoHeader,
27778b&&(c=[],wa(c,b)));b=0;for(var e=c.length;b<e;b++)for(var h=0,f=c[b].length;h<f;h++)!c[b][h].unique||d[h]&&a.bSortCellsTop||(d[h]=c[b][h].cell);return d}function Oa(a,b,c){F(a,"aoServerParams","serverParams",[b]);if(b&&Array.isArray(b)){var d={},e=/(.*?)\[\]$/;l.each(b,function(n,p){(n=p.name.match(e))?(n=n[0],d[n]||(d[n]=[]),d[n].push(p.value)):d[p.name]=p.value});b=d}var h=a.ajax,f=a.oInstance,g=function(n){var p=a.jqXHR?a.jqXHR.status:null;if(null===n||"number"===typeof p&&204==p)n={},za(a,n,[]);
27779(p=n.error||n.sError)&&da(a,0,p);a.json=n;F(a,null,"xhr",[a,n,a.jqXHR]);c(n)};if(l.isPlainObject(h)&&h.data){var k=h.data;var m="function"===typeof k?k(b,a):k;b="function"===typeof k&&m?m:l.extend(!0,b,m);delete h.data}m={data:b,success:g,dataType:"json",cache:!1,type:a.sServerMethod,error:function(n,p,t){t=F(a,null,"xhr",[a,null,a.jqXHR]);-1===l.inArray(!0,t)&&("parsererror"==p?da(a,0,"Invalid JSON response",1):4===n.readyState&&da(a,0,"Ajax error",7));V(a,!1)}};a.oAjaxData=b;F(a,null,"preXhr",[a,
27780b]);a.fnServerData?a.fnServerData.call(f,a.sAjaxSource,l.map(b,function(n,p){return{name:p,value:n}}),g,a):a.sAjaxSource||"string"===typeof h?a.jqXHR=l.ajax(l.extend(m,{url:h||a.sAjaxSource})):"function"===typeof h?a.jqXHR=h.call(f,b,g,a):(a.jqXHR=l.ajax(l.extend(m,h)),h.data=k)}function Gb(a){a.iDraw++;V(a,!0);Oa(a,Pb(a),function(b){Qb(a,b)})}function Pb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,h=a.aoPreSearchCols,f=[],g=pa(a);var k=a._iDisplayStart;var m=!1!==d.bPaginate?
27781a._iDisplayLength:-1;var n=function(x,w){f.push({name:x,value:w})};n("sEcho",a.iDraw);n("iColumns",c);n("sColumns",U(b,"sName").join(","));n("iDisplayStart",k);n("iDisplayLength",m);var p={draw:a.iDraw,columns:[],order:[],start:k,length:m,search:{value:e.sSearch,regex:e.bRegex}};for(k=0;k<c;k++){var t=b[k];var v=h[k];m="function"==typeof t.mData?"function":t.mData;p.columns.push({data:m,name:t.sName,searchable:t.bSearchable,orderable:t.bSortable,search:{value:v.sSearch,regex:v.bRegex}});n("mDataProp_"+
27782k,m);d.bFilter&&(n("sSearch_"+k,v.sSearch),n("bRegex_"+k,v.bRegex),n("bSearchable_"+k,t.bSearchable));d.bSort&&n("bSortable_"+k,t.bSortable)}d.bFilter&&(n("sSearch",e.sSearch),n("bRegex",e.bRegex));d.bSort&&(l.each(g,function(x,w){p.order.push({column:w.col,dir:w.dir});n("iSortCol_"+x,w.col);n("sSortDir_"+x,w.dir)}),n("iSortingCols",g.length));b=u.ext.legacy.ajax;return null===b?a.sAjaxSource?f:p:b?f:p}function Qb(a,b){var c=function(f,g){return b[f]!==q?b[f]:b[g]},d=za(a,b),e=c("sEcho","draw"),h=
27783c("iTotalRecords","recordsTotal");c=c("iTotalDisplayRecords","recordsFiltered");if(e!==q){if(1*e<a.iDraw)return;a.iDraw=1*e}d||(d=[]);Ka(a);a._iRecordsTotal=parseInt(h,10);a._iRecordsDisplay=parseInt(c,10);e=0;for(h=d.length;e<h;e++)ia(a,d[e]);a.aiDisplay=a.aiDisplayMaster.slice();ja(a,!0);a._bInitComplete||Pa(a,b);V(a,!1)}function za(a,b,c){a=l.isPlainObject(a.ajax)&&a.ajax.dataSrc!==q?a.ajax.dataSrc:a.sAjaxDataProp;if(!c)return"data"===a?b.aaData||b[a]:""!==a?na(a)(b):b;ha(a)(b,c)}function Kb(a){var b=
27784a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,h=a.aanFeatures,f='<input type="search" class="'+b.sFilterInput+'"/>',g=d.sSearch;g=g.match(/_INPUT_/)?g.replace("_INPUT_",f):g+f;b=l("<div/>",{id:h.f?null:c+"_filter","class":b.sFilter}).append(l("<label/>").append(g));var k=function(n){var p=this.value?this.value:"";e.return&&"Enter"!==n.key||p==e.sSearch||(ya(a,{sSearch:p,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive,"return":e.return}),a._iDisplayStart=0,ja(a))};h=
27785null!==a.searchDelay?a.searchDelay:"ssp"===Q(a)?400:0;var m=l("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",h?hb(k,h):k).on("mouseup",function(n){setTimeout(function(){k.call(m[0],n)},10)}).on("keypress.DT",function(n){if(13==n.keyCode)return!1}).attr("aria-controls",c);l(a.nTable).on("search.dt.DT",function(n,p){if(a===p)try{m[0]!==A.activeElement&&m.val(e.sSearch)}catch(t){}});return b[0]}function ya(a,b,c){var d=a.oPreviousSearch,
27786e=a.aoPreSearchCols,h=function(g){d.sSearch=g.sSearch;d.bRegex=g.bRegex;d.bSmart=g.bSmart;d.bCaseInsensitive=g.bCaseInsensitive;d.return=g.return},f=function(g){return g.bEscapeRegex!==q?!g.bEscapeRegex:g.bRegex};$a(a);if("ssp"!=Q(a)){Rb(a,b.sSearch,c,f(b),b.bSmart,b.bCaseInsensitive,b.return);h(b);for(b=0;b<e.length;b++)Sb(a,e[b].sSearch,b,f(e[b]),e[b].bSmart,e[b].bCaseInsensitive);Tb(a)}else h(b);a.bFiltered=!0;F(a,null,"search",[a])}function Tb(a){for(var b=u.ext.search,c=a.aiDisplay,d,e,h=0,f=
27787b.length;h<f;h++){for(var g=[],k=0,m=c.length;k<m;k++)e=c[k],d=a.aoData[e],b[h](a,d._aFilterData,e,d._aData,k)&&g.push(e);c.length=0;l.merge(c,g)}}function Sb(a,b,c,d,e,h){if(""!==b){var f=[],g=a.aiDisplay;d=ib(b,d,e,h);for(e=0;e<g.length;e++)b=a.aoData[g[e]]._aFilterData[c],d.test(b)&&f.push(g[e]);a.aiDisplay=f}}function Rb(a,b,c,d,e,h){e=ib(b,d,e,h);var f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster;h=[];0!==u.ext.search.length&&(c=!0);var k=Ub(a);if(0>=b.length)a.aiDisplay=g.slice();else{if(k||
27788c||d||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)e.test(a.aoData[b[c]]._sFilterRow)&&h.push(b[c]);a.aiDisplay=h}}function ib(a,b,c,d){a=b?a:jb(a);c&&(a="^(?=.*?"+l.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var h=e.match(/^"(.*)"$/);e=h?h[1]:e}return e.replace('"',"")}).join(")(?=.*?")+").*$");return new RegExp(a,d?"i":"")}function Ub(a){var b=a.aoColumns,c,d;var e=!1;var h=0;for(c=a.aoData.length;h<c;h++){var f=
27789a.aoData[h];if(!f._aFilterData){var g=[];e=0;for(d=b.length;e<d;e++){var k=b[e];k.bSearchable?(k=T(a,h,e,"filter"),null===k&&(k=""),"string"!==typeof k&&k.toString&&(k=k.toString())):k="";k.indexOf&&-1!==k.indexOf("&")&&(Qa.innerHTML=k,k=tc?Qa.textContent:Qa.innerText);k.replace&&(k=k.replace(/[\r\n\u2028]/g,""));g.push(k)}f._aFilterData=g;f._sFilterRow=g.join("  ");e=!0}}return e}
vendor: 6,059 bytes, lines 27789-27801
27789function Vb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Wb(a){return{sSearch:a.search,
27790bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function Nb(a){var b=a.sTableId,c=a.aanFeatures.i,d=l("<div/>",{"class":a.oClasses.sInfo,id:c?null:b+"_info"});c||(a.aoDrawCallback.push({fn:Xb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),l(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Xb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),h=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),g=
27791f?c.sInfo:c.sInfoEmpty;f!==h&&(g+=" "+c.sInfoFiltered);g+=c.sInfoPostFix;g=Yb(a,g);c=c.fnInfoCallback;null!==c&&(g=c.call(a.oInstance,a,d,e,h,f,g));l(b).html(g)}}function Yb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,h=a.fnRecordsDisplay(),f=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,h)).replace(/_PAGE_/g,c.call(a,f?1:Math.ceil(d/e))).replace(/_PAGES_/g,
27792c.call(a,f?1:Math.ceil(h/e)))}function Aa(a){var b=a.iInitDisplayStart,c=a.aoColumns;var d=a.oFeatures;var e=a.bDeferLoading;if(a.bInitialised){Ib(a);Fb(a);xa(a,a.aoHeader);xa(a,a.aoFooter);V(a,!0);d.bAutoWidth&&Za(a);var h=0;for(d=c.length;h<d;h++){var f=c[h];f.sWidth&&(f.nTh.style.width=K(f.sWidth))}F(a,null,"preInit",[a]);ka(a);c=Q(a);if("ssp"!=c||e)"ajax"==c?Oa(a,[],function(g){var k=za(a,g);for(h=0;h<k.length;h++)ia(a,k[h]);a.iInitDisplayStart=b;ka(a);V(a,!1);Pa(a,g)},a):(V(a,!1),Pa(a))}else setTimeout(function(){Aa(a)},
27793200)}function Pa(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&sa(a);F(a,null,"plugin-init",[a,b]);F(a,"aoInitComplete","init",[a,b])}function kb(a,b){b=parseInt(b,10);a._iDisplayLength=b;lb(a);F(a,null,"length",[a,b])}function Jb(a){var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=Array.isArray(d[0]),h=e?d[0]:d;d=e?d[1]:d;e=l("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect});for(var f=0,g=h.length;f<g;f++)e[0][f]=new Option("number"===typeof d[f]?a.fnFormatNumber(d[f]):d[f],
27794h[f]);var k=l("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(k[0].id=c+"_length");k.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));l("select",k).val(a._iDisplayLength).on("change.DT",function(m){kb(a,l(this).val());ja(a)});l(a.nTable).on("length.dt.DT",function(m,n,p){a===n&&l("select",k).val(p)});return k[0]}function Ob(a){var b=a.sPaginationType,c=u.ext.pager[b],d="function"===typeof c,e=function(f){ja(f)};b=l("<div/>").addClass(a.oClasses.sPaging+b)[0];
27795var h=a.aanFeatures;d||c.fnInit(a,b,e);h.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(f){if(d){var g=f._iDisplayStart,k=f._iDisplayLength,m=f.fnRecordsDisplay(),n=-1===k;g=n?0:Math.ceil(g/k);k=n?1:Math.ceil(m/k);m=c(g,k);var p;n=0;for(p=h.p.length;n<p;n++)gb(f,"pageButton")(f,h.p[n],n,m,g,k)}else c.fnUpdate(f,e)},sName:"pagination"}));return b}function Ra(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,h=a.fnRecordsDisplay();0===h||-1===e?d=0:"number"===typeof b?(d=b*e,d>h&&
27796(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<h&&(d+=e):"last"==b?d=Math.floor((h-1)/e)*e:da(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(F(a,null,"page",[a]),c&&ja(a));return b}function Lb(a){return l("<div/>",{id:a.aanFeatures.r?null:a.sTableId+"_processing","class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function V(a,b){a.oFeatures.bProcessing&&l(a.aanFeatures.r).css("display",b?"block":"none");
27797F(a,null,"processing",[a,b])}function Mb(a){var b=l(a.nTable),c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,h=a.oClasses,f=b.children("caption"),g=f.length?f[0]._captionSide:null,k=l(b[0].cloneNode(!1)),m=l(b[0].cloneNode(!1)),n=b.children("tfoot");n.length||(n=null);k=l("<div/>",{"class":h.sScrollWrapper}).append(l("<div/>",{"class":h.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?d?K(d):null:"100%"}).append(l("<div/>",{"class":h.sScrollHeadInner}).css({"box-sizing":"content-box",
27798width:c.sXInner||"100%"}).append(k.removeAttr("id").css("margin-left",0).append("top"===g?f:null).append(b.children("thead"))))).append(l("<div/>",{"class":h.sScrollBody}).css({position:"relative",overflow:"auto",width:d?K(d):null}).append(b));n&&k.append(l("<div/>",{"class":h.sScrollFoot}).css({overflow:"hidden",border:0,width:d?d?K(d):null:"100%"}).append(l("<div/>",{"class":h.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",0).append("bottom"===g?f:null).append(b.children("tfoot")))));
27799b=k.children();var p=b[0];h=b[1];var t=n?b[2]:null;if(d)l(h).on("scroll.DT",function(v){v=this.scrollLeft;p.scrollLeft=v;n&&(t.scrollLeft=v)});l(h).css("max-height",e);c.bCollapse||l(h).css("height",e);a.nScrollHead=p;a.nScrollBody=h;a.nScrollFoot=t;a.aoDrawCallback.push({fn:Ha,sName:"scrolling"});return k[0]}function Ha(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY;b=b.iBarWidth;var h=l(a.nScrollHead),f=h[0].style,g=h.children("div"),k=g[0].style,m=g.children("table");g=a.nScrollBody;var n=l(g),p=
27800g.style,t=l(a.nScrollFoot).children("div"),v=t.children("table"),x=l(a.nTHead),w=l(a.nTable),r=w[0],C=r.style,G=a.nTFoot?l(a.nTFoot):null,aa=a.oBrowser,L=aa.bScrollOversize;U(a.aoColumns,"nTh");var O=[],I=[],H=[],ea=[],Y,Ba=function(D){D=D.style;D.paddingTop="0";D.paddingBottom="0";D.borderTopWidth="0";D.borderBottomWidth="0";D.height=0};var fa=g.scrollHeight>g.clientHeight;if(a.scrollBarVis!==fa&&a.scrollBarVis!==q)a.scrollBarVis=fa,sa(a);else{a.scrollBarVis=fa;w.children("thead, tfoot").remove();
27801if(G){var ba=G.clone().prependTo(w);var la=G.find("tr");ba=ba.find("tr")}var mb=x.clone().prependTo(w);x=x.find("tr");fa=mb.find("tr");mb.find("th, td").removeAttr("tabindex");c||(p.width="100%",h[0].style.width="100%");l.each(Na(a,mb),function(D,W){Y=ta(a,D);W.style.width=a.aoColumns[Y].sWidth});
27801G&&ca(function(D){D.style.width=""},ba);h=w.outerWidth();""===c?(C.width="100%",L&&(w.find("tbody").height()>g.offsetHeight||"scroll"==n.css("overflow-y"))&&(C.width=K(w.outerWidth()-b)),h=w.outerWidth()):
27802""!==d&&(C.width=K(d),h=w.outerWidth());ca(Ba,fa);ca(function(D){var W=z.getComputedStyle?z.getComputedStyle(D).width:K(l(D).width());H.push(D.innerHTML);O.push(W)},fa);ca(function(D,W){D.style.width=O[W]},x);l(fa).css("height",0);G&&(ca(Ba,ba),ca(function(D){ea.push(D.innerHTML);I.push(K(l(D).css("width")))},ba),ca(function(D,W){D.style.width=I[W]},la),l(ba).height(0));ca(function(D,W){D.innerHTML='<div class="dataTables_sizing">'+H[W]+"</div>";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow=
27803"hidden";D.style.width=O[W]},fa);G&&ca(function(D,W){D.innerHTML='<div class="dataTables_sizing">'+ea[W]+"</div>";D.childNodes[0].style.height="0";D.childNodes[0].style.overflow="hidden";D.style.width=I[W]},ba);Math.round(w.outerWidth())<Math.round(h)?(la=g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y")?h+b:h,L&&(g.scrollHeight>g.offsetHeight||"scroll"==n.css("overflow-y"))&&(C.width=K(la-b)),""!==c&&""===d||da(a,1,"Possible column misalignment",6)):la="100%";p.width=K(la);f.width=K(la);
27804G&&(a.nScrollFoot.style.width=K(la));!e&&L&&(p.height=K(r.offsetHeight+b));c=w.outerWidth();m[0].style.width=K(c);k.width=K(c);d=w.height()>g.clientHeight||"scroll"==n.css("overflow-y");e="padding"+(aa.bScrollbarLeft?"Left":"Right");k[e]=d?b+"px":"0px";G&&(v[0].style.width=K(c),t[0].style.width=K(c),t[0].style[e]=d?b+"px":"0px");w.children("colgroup").insertBefore(w.children("thead"));n.trigger("scroll");!a.bSorted&&!a.bFiltered||a._drawHold||(g.scrollTop=0)}}function ca(a,b,c){for(var d=0,e=0,h=
27805b.length,f,g;e<h;){f=b[e].firstChild;for(g=c?c[e].firstChild:null;f;)1===f.nodeType&&(c?a(f,g,d):a(f,d),d++),f=f.nextSibling,g=c?g.nextSibling:null;e++}}function Za(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,h=d.sX,f=d.sXInner,g=c.length,k=Ia(a,"bVisible"),m=l("th",a.nTHead),n=b.getAttribute("width"),p=b.parentNode,t=!1,v,x=a.oBrowser;d=x.bScrollOversize;(v=b.style.width)&&-1!==v.indexOf("%")&&(n=v);for(v=0;v<k.length;v++){var w=c[k[v]];null!==w.sWidth&&(w.sWidth=Zb(w.sWidthOrig,p),t=!0)}if(d||
27806!t&&!h&&!e&&g==oa(a)&&g==m.length)for(v=0;v<g;v++)k=ta(a,v),null!==k&&(c[k].sWidth=K(m.eq(v).width()));else{g=l(b).clone().css("visibility","hidden").removeAttr("id");g.find("tbody tr").remove();var r=l("<tr/>").appendTo(g.find("tbody"));g.find("thead, tfoot").remove();g.append(l(a.nTHead).clone()).append(l(a.nTFoot).clone());g.find("tfoot th, tfoot td").css("width","");m=Na(a,g.find("thead")[0]);for(v=0;v<k.length;v++)w=c[k[v]],m[v].style.width=null!==w.sWidthOrig&&""!==w.sWidthOrig?K(w.sWidthOrig):
27807"",w.sWidthOrig&&h&&l(m[v]).append(l("<div/>").css({width:w.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(v=0;v<k.length;v++)t=k[v],w=c[t],l($b(a,t)).clone(!1).append(w.sContentPadding).appendTo(r);l("[name]",g).removeAttr("name");w=l("<div/>").css(h||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(g).appendTo(p);h&&f?g.width(f):h?(g.css("width","auto"),g.removeAttr("width"),g.width()<p.clientWidth&&n&&g.width(p.clientWidth)):e?g.width(p.clientWidth):
27808n&&g.width(n);for(v=e=0;v<k.length;v++)p=l(m[v]),f=p.outerWidth()-p.width(),p=x.bBounding?Math.ceil(m[v].getBoundingClientRect().width):p.outerWidth(),e+=p,c[k[v]].sWidth=K(p-f);b.style.width=K(e);w.remove()}n&&(b.style.width=K(n));!n&&!h||a._reszEvt||(b=function(){l(z).on("resize.DT-"+a.sInstance,hb(function(){sa(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0)}function Zb(a,b){if(!a)return 0;a=l("<div/>").css("width",K(a)).appendTo(b||A.body);b=a[0].offsetWidth;a.remove();return b}function $b(a,b){var c=
27809ac(a,b);if(0>c)return null;var d=a.aoData[c];return d.nTr?d.anCells[b]:l("<td/>").html(T(a,c,b,"display"))[0]}function ac(a,b){for(var c,d=-1,e=-1,h=0,f=a.aoData.length;h<f;h++)c=T(a,h,b,"display")+"",c=c.replace(uc,""),c=c.replace(/&nbsp;/g," "),c.length>d&&(d=c.length,e=h);return e}function K(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function pa(a){var b=[],c=a.aoColumns;var d=a.aaSortingFixed;var e=l.isPlainObject(d);var h=[];var f=function(n){n.length&&
27810!Array.isArray(n[0])?h.push(n):l.merge(h,n)};
27810Array.isArray(d)&&f(d);e&&d.pre&&f(d.pre);f(a.aaSorting);e&&d.post&&f(d.post);for(a=0;a<h.length;a++){var g=h[a][0];f=c[g].aDataSort;d=0;for(e=f.length;d<e;d++){var k=f[d];var m=c[k].sType||"string";h[a]._idx===q&&(h[a]._idx=l.inArray(h[a][1],c[k].asSorting));b.push({src:g,col:k,dir:h[a][1],index:h[a]._idx,type:m,formatter:u.ext.type.order[m+"-pre"]})}}return b}function Hb(a){var b,c=[],d=u.ext.type.order,e=a.aoData,h=0,f=a.aiDisplayMaster;$a(a);var g=
27811pa(a);var k=0;for(b=g.length;k<b;k++){var m=g[k];m.formatter&&h++;bc(a,m.col)}if("ssp"!=Q(a)&&0!==g.length){k=0;for(b=f.length;k<b;k++)c[f[k]]=k;h===g.length?f.sort(function(n,p){var t,v=g.length,x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;t<v;t++){var r=g[t];var C=x[r.col];var G=w[r.col];C=C<G?-1:C>G?1:0;if(0!==C)return"asc"===r.dir?C:-C}C=c[n];G=c[p];return C<G?-1:C>G?1:0}):f.sort(function(n,p){var t,v=g.length,x=e[n]._aSortData,w=e[p]._aSortData;for(t=0;t<v;t++){var r=g[t];var C=x[r.col];var G=
27812w[r.col];r=d[r.type+"-"+r.dir]||d["string-"+r.dir];C=r(C,G);if(0!==C)return C}C=c[n];G=c[p];return C<G?-1:C>G?1:0})}a.bSorted=!0}function cc(a){var b=a.aoColumns,c=pa(a);a=a.oLanguage.oAria;for(var d=0,e=b.length;d<e;d++){var h=b[d];var f=h.asSorting;var g=h.ariaTitle||h.sTitle.replace(/<.*?>/g,"");var k=h.nTh;k.removeAttribute("aria-sort");h.bSortable&&(0<c.length&&c[0].col==d?(k.setAttribute("aria-sort","asc"==c[0].dir?"ascending":"descending"),h=f[c[0].index+1]||f[0]):h=f[0],g+="asc"===h?a.sSortAscending:
27813a.sSortDescending);k.setAttribute("aria-label",g)}}function nb(a,b,c,d){var e=a.aaSorting,h=a.aoColumns[b].asSorting,f=function(g,k){var m=g._idx;m===q&&(m=l.inArray(g[1],h));return m+1<h.length?m+1:k?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=l.inArray(b,U(e,"0")),-1!==c?(b=f(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=h[b],e[c]._idx=b)):(e.push([b,h[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=f(e[0]),e.length=1,e[0][1]=h[b],
27814e[0]._idx=b):(e.length=0,e.push([b,h[0]]),e[0]._idx=0);ka(a);"function"==typeof d&&d(a)}function fb(a,b,c,d){var e=a.aoColumns[c];ob(b,{},function(h){!1!==e.bSortable&&(a.oFeatures.bProcessing?(V(a,!0),setTimeout(function(){nb(a,c,h.shiftKey,d);"ssp"!==Q(a)&&V(a,!1)},0)):nb(a,c,h.shiftKey,d))})}function Sa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=pa(a),e=a.oFeatures,h;if(e.bSort&&e.bSortClasses){e=0;for(h=b.length;e<h;e++){var f=b[e].src;l(U(a.aoData,"anCells",f)).removeClass(c+(2>e?e+1:3))}e=
278150;for(h=d.length;e<h;e++)f=d[e].src,l(U(a.aoData,"anCells",f)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function bc(a,b){var c=a.aoColumns[b],d=u.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ua(a,b)));for(var h,f=u.ext.type.order[c.sType+"-pre"],g=0,k=a.aoData.length;g<k;g++)if(c=a.aoData[g],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)h=d?e[g]:T(a,g,b,"sort"),c._aSortData[b]=f?f(h):h}function Ca(a){if(!a._bLoadingState){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,
27816order:l.extend(!0,[],a.aaSorting),search:Vb(a.oPreviousSearch),columns:l.map(a.aoColumns,function(c,d){return{visible:c.bVisible,search:Vb(a.aoPreSearchCols[d])}})};a.oSavedState=b;F(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oFeatures.bStateSave&&!a.bDestroying&&a.fnStateSaveCallback.call(a.oInstance,a,b)}}function dc(a,b,c){if(a.oFeatures.bStateSave)return b=a.fnStateLoadCallback.call(a.oInstance,a,function(d){pb(a,d,c)}),b!==q&&pb(a,b,c),!0;c()}function pb(a,b,c){var d,e=a.aoColumns;a._bLoadingState=
27817!0;var h=a._bInitComplete?new u.Api(a):null;if(b&&b.time){var f=F(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1!==l.inArray(!1,f))a._bLoadingState=!1;else if(f=a.iStateDuration,0<f&&b.time<+new Date-1E3*f)a._bLoadingState=!1;else if(b.columns&&e.length!==b.columns.length)a._bLoadingState=!1;else{a.oLoadedState=l.extend(!0,{},b);b.start!==q&&(null===h?(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start):Ra(a,b.start/b.length));b.length!==q&&(a._iDisplayLength=b.length);b.order!==q&&(a.aaSorting=
27818[],l.each(b.order,function(k,m){a.aaSorting.push(m[0]>=e.length?[0,m[1]]:m)}));b.search!==q&&l.extend(a.oPreviousSearch,Wb(b.search));if(b.columns){f=0;for(d=b.columns.length;f<d;f++){var g=b.columns[f];g.visible!==q&&(h?h.column(f).visible(g.visible,!1):e[f].bVisible=g.visible);g.search!==q&&l.extend(a.aoPreSearchCols[f],Wb(g.search))}h&&h.columns.adjust()}a._bLoadingState=!1;F(a,"aoStateLoaded","stateLoaded",[a,b])}}else a._bLoadingState=!1;c()}function Ta(a){var b=u.settings;a=l.inArray(a,U(b,
27819"nTable"));return-1!==a?b[a]:null}function da(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)z.console&&console.log&&console.log(c);else if(b=u.ext,b=b.sErrMode||b.errMode,a&&F(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function X(a,b,c,d){Array.isArray(c)?l.each(c,function(e,h){Array.isArray(h)?X(a,b,h[0],h[1]):
27820X(a,b,h)}):(d===q&&(d=c),b[c]!==q&&(a[d]=b[c]))}function qb(a,b,c){var d;for(d in b)if(b.hasOwnProperty(d)){var e=b[d];l.isPlainObject(e)?(l.isPlainObject(a[d])||(a[d]={}),l.extend(!0,a[d],e)):c&&"data"!==d&&"aaData"!==d&&Array.isArray(e)?a[d]=e.slice():a[d]=e}return a}function ob(a,b,c){l(a).on("click.DT",b,function(d){l(a).trigger("blur");c(d)}).on("keypress.DT",b,function(d){13===d.which&&(d.preventDefault(),c(d))}).on("selectstart.DT",function(){return!1})}function R(a,b,c,d){c&&a[b].push({fn:c,
27821sName:d})}function F(a,b,c,d){var e=[];b&&(e=l.map(a[b].slice().reverse(),function(h,f){return h.fn.apply(a.oInstance,d)}));null!==c&&(b=l.Event(c+".dt"),l(a.nTable).trigger(b,d),e.push(b.result));return e}function lb(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function gb(a,b){a=a.renderer;var c=u.ext.renderer[b];return l.isPlainObject(a)&&a[b]?c[a[b]]||c._:"string"===typeof a?c[a]||c._:c._}
vendor: 3,240 bytes, lines 27821-27828
27821function Q(a){return a.oFeatures.bServerSide?
27822"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function Da(a,b){var c=ec.numbers_length,d=Math.floor(c/2);b<=c?a=qa(0,b):a<=d?(a=qa(0,c-2),a.push("ellipsis"),a.push(b-1)):(a>=b-1-d?a=qa(b-(c-2),b):(a=qa(a-d+2,a+d-1),a.push("ellipsis"),a.push(b-1)),a.splice(0,0,"ellipsis"),a.splice(0,0,0));a.DT_el="span";return a}function Xa(a){l.each({num:function(b){return Ua(b,a)},"num-fmt":function(b){return Ua(b,a,rb)},"html-num":function(b){return Ua(b,a,Va)},"html-num-fmt":function(b){return Ua(b,a,Va,rb)}},function(b,
27823c){M.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(M.type.search[b+a]=M.type.search.html)})}function fc(a){return function(){var b=[Ta(this[u.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return u.ext.internal[a].apply(this,b)}}var u=function(a,b){if(this instanceof u)return l(a).DataTable(b);b=a;this.$=function(f,g){return this.api(!0).$(f,g)};this._=function(f,g){return this.api(!0).rows(f,g).data()};this.api=function(f){return f?new B(Ta(this[M.iApiIndex])):new B(this)};this.fnAddData=
27824function(f,g){var k=this.api(!0);f=Array.isArray(f)&&(Array.isArray(f[0])||l.isPlainObject(f[0]))?k.rows.add(f):k.row.add(f);(g===q||g)&&k.draw();return f.flatten().toArray()};this.fnAdjustColumnSizing=function(f){var g=this.api(!0).columns.adjust(),k=g.settings()[0],m=k.oScroll;f===q||f?g.draw(!1):(""!==m.sX||""!==m.sY)&&Ha(k)};this.fnClearTable=function(f){var g=this.api(!0).clear();(f===q||f)&&g.draw()};this.fnClose=function(f){this.api(!0).row(f).child.hide()};this.fnDeleteRow=function(f,g,k){var m=
27825this.api(!0);f=m.rows(f);var n=f.settings()[0],p=n.aoData[f[0][0]];f.remove();g&&g.call(this,n,p);(k===q||k)&&m.draw();return p};this.fnDestroy=function(f){this.api(!0).destroy(f)};this.fnDraw=function(f){this.api(!0).draw(f)};this.fnFilter=function(f,g,k,m,n,p){n=this.api(!0);null===g||g===q?n.search(f,k,m,p):n.column(g).search(f,k,m,p);n.draw()};this.fnGetData=function(f,g){var k=this.api(!0);if(f!==q){var m=f.nodeName?f.nodeName.toLowerCase():"";return g!==q||"td"==m||"th"==m?k.cell(f,g).data():
27826k.row(f).data()||null}return k.data().toArray()};this.fnGetNodes=function(f){var g=this.api(!0);return f!==q?g.row(f).node():g.rows().nodes().flatten().toArray()};this.fnGetPosition=function(f){var g=this.api(!0),k=f.nodeName.toUpperCase();return"TR"==k?g.row(f).index():"TD"==k||"TH"==k?(f=g.cell(f).index(),[f.row,f.columnVisible,f.column]):null};this.fnIsOpen=function(f){return this.api(!0).row(f).child.isShown()};this.fnOpen=function(f,g,k){return this.api(!0).row(f).child(g,k).show().child()[0]};
27827this.fnPageChange=function(f,g){f=this.api(!0).page(f);(g===q||g)&&f.draw(!1)};this.fnSetColumnVis=function(f,g,k){f=this.api(!0).column(f).visible(g);(k===q||k)&&f.columns.adjust().draw()};this.fnSettings=function(){return Ta(this[M.iApiIndex])};this.fnSort=function(f){this.api(!0).order(f).draw()};this.fnSortListener=function(f,g,k){this.api(!0).order.listener(f,g,k)};this.fnUpdate=function(f,g,k,m,n){var p=this.api(!0);k===q||null===k?p.row(g).data(f):p.cell(g,k).data(f);(n===q||n)&&p.columns.adjust();
27828(m===q||m)&&p.draw();return 0};this.fnVersionCheck=M.fnVersionCheck;var c=this,d=b===q,e=this.length;d&&(b={});this.oApi=this.internal=M.internal;
27828for(var h in u.ext.internal)h&&(this[h]=fc(h));this.each(function(){var f={},g=1<e?qb(f,b,!0):b,k=0,m;f=this.getAttribute("id");var n=!1,p=u.defaults,t=l(this);if("table"!=this.nodeName.toLowerCase())da(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{zb(p);Ab(p.column);P(p,p,!0);P(p.column,p.column,!0);P(p,l.extend(g,t.data()),!0);var v=
27829u.settings;k=0;for(m=v.length;k<m;k++){var x=v[k];if(x.nTable==this||x.nTHead&&x.nTHead.parentNode==this||x.nTFoot&&x.nTFoot.parentNode==this){var w=g.bRetrieve!==q?g.bRetrieve:p.bRetrieve;if(d||w)return x.oInstance;if(g.bDestroy!==q?g.bDestroy:p.bDestroy){x.oInstance.fnDestroy();break}else{da(x,0,"Cannot reinitialise DataTable",3);return}}if(x.sTableId==this.id){v.splice(k,1);break}}if(null===f||""===f)this.id=f="DataTables_Table_"+u.ext._unique++;var r=l.extend(!0,{},u.models.oSettings,{sDestroyWidth:t[0].style.width,
27830sInstance:f,sTableId:f});r.nTable=this;r.oApi=c.internal;r.oInit=g;v.push(r);r.oInstance=1===c.length?c:t.dataTable();zb(g);ma(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=Array.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=qb(l.extend(!0,{},p),g);X(r.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));X(r,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod",
27831"aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);X(r.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);X(r.oLanguage,g,"fnInfoCallback");
27832R(r,"aoDrawCallback",g.fnDrawCallback,"user");R(r,"aoServerParams",g.fnServerParams,"user");R(r,"aoStateSaveParams",g.fnStateSaveParams,"user");R(r,"aoStateLoadParams",g.fnStateLoadParams,"user");R(r,"aoStateLoaded",g.fnStateLoaded,"user");R(r,"aoRowCallback",g.fnRowCallback,"user");R(r,"aoRowCreatedCallback",g.fnCreatedRow,"user");R(r,"aoHeaderCallback",g.fnHeaderCallback,"user");R(r,"aoFooterCallback",g.fnFooterCallback,"user");R(r,"aoInitComplete",g.fnInitComplete,"user");R(r,"aoPreDrawCallback",
27833g.fnPreDrawCallback,"user");r.rowIdFn=na(g.rowId);Bb(r);var C=r.oClasses;l.extend(C,u.ext.classes,g.oClasses);t.addClass(C.sTable);r.iInitDisplayStart===q&&(r.iInitDisplayStart=g.iDisplayStart,r._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(r.bDeferLoading=!0,f=Array.isArray(g.iDeferLoading),r._iRecordsDisplay=f?g.iDeferLoading[0]:g.iDeferLoading,r._iRecordsTotal=f?g.iDeferLoading[1]:g.iDeferLoading);var G=r.oLanguage;l.extend(!0,G,g.oLanguage);G.sUrl?(l.ajax({dataType:"json",url:G.sUrl,
27834success:function(I){P(p.oLanguage,I);ma(I);l.extend(!0,G,I);F(r,null,"i18n",[r]);Aa(r)},error:function(){Aa(r)}}),n=!0):F(r,null,"i18n",[r]);null===g.asStripeClasses&&(r.asStripeClasses=[C.sStripeOdd,C.sStripeEven]);f=r.asStripeClasses;var aa=t.children("tbody").find("tr").eq(0);-1!==l.inArray(!0,l.map(f,function(I,H){return aa.hasClass(I)}))&&(l("tbody tr",this).removeClass(f.join(" ")),r.asDestroyStripes=f.slice());f=[];v=this.getElementsByTagName("thead");0!==v.length&&(wa(r.aoHeader,v[0]),f=Na(r));
27835if(null===g.aoColumns)for(v=[],k=0,m=f.length;k<m;k++)v.push(null);else v=g.aoColumns;k=0;for(m=v.length;k<m;k++)Ya(r,f?f[k]:null);Db(r,g.aoColumnDefs,v,function(I,H){Ga(r,I,H)});if(aa.length){var L=function(I,H){return null!==I.getAttribute("data-"+H)?H:null};l(aa[0]).children("th, td").each(function(I,H){var ea=r.aoColumns[I];if(ea.mData===I){var Y=L(H,"sort")||L(H,"order");H=L(H,"filter")||L(H,"search");if(null!==Y||null!==H)ea.mData={_:I+".display",sort:null!==Y?I+".@data-"+Y:q,type:null!==Y?
27836I+".@data-"+Y:q,filter:null!==H?I+".@data-"+H:q},Ga(r,I)}})}var O=r.oFeatures;f=function(){if(g.aaSorting===q){var I=r.aaSorting;k=0;for(m=I.length;k<m;k++)I[k][1]=r.aoColumns[k].asSorting[0]}Sa(r);O.bSort&&R(r,"aoDrawCallback",function(){if(r.bSorted){var Y=pa(r),Ba={};l.each(Y,function(fa,ba){Ba[ba.src]=ba.dir});F(r,null,"order",[r,Y,Ba]);cc(r)}});R(r,"aoDrawCallback",function(){(r.bSorted||"ssp"===Q(r)||O.bDeferRender)&&Sa(r)},"sc");I=t.children("caption").each(function(){this._captionSide=l(this).css("caption-side")});
27837var H=t.children("thead");0===H.length&&(H=l("<thead/>").appendTo(t));r.nTHead=H[0];var ea=t.children("tbody");0===ea.length&&(ea=l("<tbody/>").insertAfter(H));r.nTBody=ea[0];H=t.children("tfoot");0===H.length&&0<I.length&&(""!==r.oScroll.sX||""!==r.oScroll.sY)&&(H=l("<tfoot/>").appendTo(t));0===H.length||0===H.children().length?t.addClass(C.sNoFooter):0<H.length&&(r.nTFoot=H[0],wa(r.aoFooter,r.nTFoot));if(g.aaData)for(k=0;k<g.aaData.length;k++)ia(r,g.aaData[k]);else(r.bDeferLoading||"dom"==Q(r))&&
27838Ja(r,l(r.nTBody).children("tr"));r.aiDisplay=r.aiDisplayMaster.slice();r.bInitialised=!0;!1===n&&Aa(r)};R(r,"aoDrawCallback",Ca,"state_save");g.bStateSave?(O.bStateSave=!0,dc(r,g,f)):f()}});c=null;return this},M,y,J,sb={},gc=/[\r\n\u2028]/g,Va=/<.*?>/g,vc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,wc=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,rb=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,Z=function(a){return a&&!0!==a&&"-"!==a?!1:!0},hc=
27839function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},ic=function(a,b){sb[b]||(sb[b]=new RegExp(jb(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(sb[b],"."):a},tb=function(a,b,c){var d="string"===typeof a;if(Z(a))return!0;b&&d&&(a=ic(a,b));c&&d&&(a=a.replace(rb,""));return!isNaN(parseFloat(a))&&isFinite(a)},jc=function(a,b,c){return Z(a)?!0:Z(a)||"string"===typeof a?tb(a.replace(Va,""),b,c)?!0:null:null},U=function(a,b,c){var d=[],e=0,h=a.length;if(c!==q)for(;e<
27840h;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<h;e++)a[e]&&d.push(a[e][b]);return d},Ea=function(a,b,c,d){var e=[],h=0,f=b.length;if(d!==q)for(;h<f;h++)a[b[h]][c]&&e.push(a[b[h]][c][d]);else for(;h<f;
27840h++)e.push(a[b[h]][c]);return e},qa=function(a,b){var c=[];if(b===q){b=0;var d=a}else d=b,b=a;for(a=b;a<d;a++)c.push(a);return c},kc=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},Ma=function(a){a:{if(!(2>a.length)){var b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d<
27841e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();b=[];e=a.length;var h,f=0;d=0;a:for(;d<e;d++){c=a[d];for(h=0;h<f;h++)if(b[h]===c)continue a;b.push(c);f++}return b},lc=function(a,b){if(Array.isArray(b))for(var c=0;c<b.length;c++)lc(a,b[c]);else a.push(b);return a},mc=function(a,b){b===q&&(b=0);return-1!==this.indexOf(a,b)};Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Array.prototype.includes||(Array.prototype.includes=mc);
27842String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")});String.prototype.includes||(String.prototype.includes=mc);u.util={throttle:function(a,b){var c=b!==q?b:200,d,e;return function(){var h=this,f=+new Date,g=arguments;d&&f<d+c?(clearTimeout(e),e=setTimeout(function(){d=q;a.apply(h,g)},c)):(d=f,a.apply(h,g))}},escapeRegex:function(a){return a.replace(wc,"\\$1")},set:function(a){if(l.isPlainObject(a))return u.util.set(a._);if(null===
27843a)return function(){};if("function"===typeof a)return function(c,d,e){a(c,"set",d,e)};if("string"!==typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(c,d){c[a]=d};var b=function(c,d,e){e=cb(e);var h=e[e.length-1];for(var f,g,k=0,m=e.length-1;k<m;k++){if("__proto__"===e[k]||"constructor"===e[k])throw Error("Cannot set prototype values");f=e[k].match(Fa);g=e[k].match(ra);if(f){e[k]=e[k].replace(Fa,"");c[e[k]]=[];h=e.slice();h.splice(0,k+1);f=h.join(".");if(Array.isArray(d))for(g=
278440,m=d.length;g<m;g++)h={},b(h,d[g],f),c[e[k]].push(h);else c[e[k]]=d;return}g&&(e[k]=e[k].replace(ra,""),c=c[e[k]](d));if(null===c[e[k]]||c[e[k]]===q)c[e[k]]={};c=c[e[k]]}if(h.match(ra))c[h.replace(ra,"")](d);else c[h.replace(Fa,"")]=d};return function(c,d){return b(c,d,a)}},get:function(a){if(l.isPlainObject(a)){var b={};l.each(a,function(d,e){e&&(b[d]=u.util.get(e))});return function(d,e,h,f){var g=b[e]||b._;return g!==q?g(d,e,h,f):d}}if(null===a)return function(d){return d};if("function"===typeof a)return function(d,
27845e,h,f){return a(d,e,h,f)};if("string"!==typeof a||-1===a.indexOf(".")&&-1===a.indexOf("[")&&-1===a.indexOf("("))return function(d,e){return d[a]};var c=function(d,e,h){if(""!==h){var f=cb(h);for(var g=0,k=f.length;g<k;g++){h=f[g].match(Fa);var m=f[g].match(ra);if(h){f[g]=f[g].replace(Fa,"");""!==f[g]&&(d=d[f[g]]);m=[];f.splice(0,g+1);f=f.join(".");if(Array.isArray(d))for(g=0,k=d.length;g<k;g++)m.push(c(d[g],e,f));d=h[0].substring(1,h[0].length-1);d=""===d?m:m.join(d);break}else if(m){f[g]=f[g].replace(ra,
27846"");d=d[f[g]]();continue}if(null===d||d[f[g]]===q)return q;d=d[f[g]]}}return d};return function(d,e){return c(d,e,a)}}};var S=function(a,b,c){a[b]!==q&&(a[c]=a[b])},Fa=/\[.*?\]$/,ra=/\(\)$/,na=u.util.get,ha=u.util.set,jb=u.util.escapeRegex,Qa=l("<div>")[0],tc=Qa.textContent!==q,uc=/<.*?>/g,hb=u.util.throttle,nc=[],N=Array.prototype,xc=function(a){var b,c=u.settings,d=l.map(c,function(h,f){return h.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e=
27847l.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=l(a):a instanceof l&&(b=a)}else return[];if(b)return b.map(function(h){e=l.inArray(this,d);return-1!==e?c[e]:null}).toArray()};var B=function(a,b){if(!(this instanceof B))return new B(a,b);var c=[],d=function(f){(f=xc(f))&&c.push.apply(c,f)};if(Array.isArray(a))for(var e=0,h=a.length;e<h;e++)d(a[e]);else d(a);this.context=Ma(c);b&&l.merge(this,b);this.selector={rows:null,
27848cols:null,opts:null};B.extend(this,this,nc)};u.Api=B;l.extend(B.prototype,{any:function(){return 0!==this.count()},concat:N.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new B(b[a],this[a]):null},filter:function(a){var b=[];if(N.filter)b=N.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);
27849return new B(this.context,b)},flatten:function(){var a=[];return new B(this.context,a.concat.apply(a,this.toArray()))},join:N.join,indexOf:N.indexOf||function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1},iterator:function(a,b,c,d){var e=[],h,f,g=this.context,k,m=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);var n=0;for(h=g.length;n<h;n++){var p=new B(g[n]);if("table"===b){var t=c.call(p,g[n],n);t!==q&&e.push(t)}else if("columns"===b||"rows"===b)t=c.call(p,g[n],
27850this[n],n),t!==q&&e.push(t);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){var v=this[n];"column-rows"===b&&(k=Wa(g[n],m.opts));var x=0;for(f=v.length;x<f;x++)t=v[x],t="cell"===b?c.call(p,g[n],t.row,t.column,n,x):c.call(p,g[n],t,n,x,k),t!==q&&e.push(t)}}return e.length||d?(a=new B(g,a?e.concat.apply([],e):e),b=a.selector,b.rows=m.rows,b.cols=m.cols,b.opts=m.opts,a):this},lastIndexOf:N.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,
27851map:function(a){var b=[];if(N.map)b=N.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new B(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:N.pop,push:N.push,reduce:N.reduce||function(a,b){return Cb(this,a,b,0,this.length,1)},reduceRight:N.reduceRight||function(a,b){return Cb(this,a,b,this.length-1,-1,-1)}
27851,reverse:N.reverse,selector:null,shift:N.shift,slice:function(){return new B(this.context,this)},sort:N.sort,
27852splice:N.splice,toArray:function(){return N.slice.call(this)},to$:function(){return l(this)},toJQuery:function(){return l(this)},unique:function(){return new B(this.context,Ma(this))},unshift:N.unshift});B.extend=function(a,b,c){if(c.length&&b&&(b instanceof B||b.__dt_wrapper)){var d,e=function(g,k,m){return function(){var n=k.apply(g,arguments);B.extend(n,n,m.methodExt);return n}};var h=0;for(d=c.length;h<d;h++){var f=c[h];b[f.name]="function"===f.type?e(a,f.val,f):"object"===f.type?{}:f.val;b[f.name].__dt_wrapper=
27853!0;B.extend(a,b[f.name],f.propExt)}}};B.register=y=function(a,b){if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)B.register(a[c],b);else{d=a.split(".");var e=nc,h;a=0;for(c=d.length;a<c;a++){var f=(h=-1!==d[a].indexOf("()"))?d[a].replace("()",""):d[a];a:{var g=0;for(var k=e.length;g<k;g++)if(e[g].name===f){g=e[g];break a}g=null}g||(g={name:f,val:{},methodExt:[],propExt:[],type:"object"},e.push(g));a===c-1?(g.val=b,g.type="function"===typeof b?"function":l.isPlainObject(b)?"object":"other"):e=h?
27854g.methodExt:g.propExt}}};B.registerPlural=J=function(a,b,c){B.register(a,c);B.register(b,function(){var d=c.apply(this,arguments);return d===this?this:d instanceof B?d.length?Array.isArray(d[0])?new B(d.context,d[0]):d[0]:q:d})};var oc=function(a,b){if(Array.isArray(a))return l.map(a,function(d){return oc(d,b)});if("number"===typeof a)return[b[a]];var c=l.map(b,function(d,e){return d.nTable});return l(c).filter(a).map(function(d){d=l.inArray(this,c);return b[d]}).toArray()};y("tables()",function(a){return a!==
27855q&&null!==a?new B(oc(a,this.context)):this});y("table()",function(a){a=this.tables(a);var b=a.context;return b.length?new B(b[0]):a});J("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});J("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});J("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});J("tables().footer()","table().footer()",
27856function(){return this.iterator("table",function(a){return a.nTFoot},1)});J("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});y("draw()",function(a){return this.iterator("table",function(b){"page"===a?ja(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),ka(b,!1===a))})});y("page()",function(a){return a===q?this.page.info().page:this.iterator("table",function(b){Ra(b,a)})});y("page.info()",function(a){if(0===this.context.length)return q;
27857a=this.context[0];var b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===Q(a)}});y("page.len()",function(a){return a===q?0!==this.context.length?this.context[0]._iDisplayLength:q:this.iterator("table",function(b){kb(b,a)})});var pc=function(a,b,c){if(c){var d=new B(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==
27858Q(a))ka(a,b);else{V(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();Oa(a,[],function(h){Ka(a);h=za(a,h);for(var f=0,g=h.length;f<g;f++)ia(a,h[f]);ka(a,b);V(a,!1)})}};y("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});y("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});y("ajax.reload()",function(a,b){return this.iterator("table",function(c){pc(c,!1===b,a)})});y("ajax.url()",function(a){var b=this.context;if(a===q){if(0===b.length)return q;
27859b=b[0];return b.ajax?l.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(c){l.isPlainObject(c.ajax)?c.ajax.url=a:c.ajax=a})});y("ajax.url().load()",function(a,b){return this.iterator("table",function(c){pc(c,!1===b,a)})});var ub=function(a,b,c,d,e){var h=[],f,g,k;var m=typeof b;b&&"string"!==m&&"function"!==m&&b.length!==q||(b=[b]);m=0;for(g=b.length;m<g;m++){var n=b[m]&&b[m].split&&!b[m].match(/[\[\(:]/)?b[m].split(","):[b[m]];var p=0;for(k=n.length;p<k;p++)(f=
27860c("string"===typeof n[p]?n[p].trim():n[p]))&&f.length&&(h=h.concat(f))}a=M.selector[a];if(a.length)for(m=0,g=a.length;m<g;m++)h=a[m](d,e,h);return Ma(h)},vb=function(a){a||(a={});a.filter&&a.search===q&&(a.search=a.filter);return l.extend({search:"none",order:"current",page:"all"},a)},wb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Wa=function(a,b){var c=[],d=a.aiDisplay;var e=a.aiDisplayMaster;
27861var h=b.search;var f=b.order;b=b.page;if("ssp"==Q(a))return"removed"===h?[]:qa(0,e.length);if("current"==b)for(f=a._iDisplayStart,a=a.fnDisplayEnd();f<a;f++)c.push(d[f]);else if("current"==f||"applied"==f)if("none"==h)c=e.slice();else if("applied"==h)c=d.slice();else{if("removed"==h){var g={};f=0;for(a=d.length;f<a;f++)g[d[f]]=null;c=l.map(e,function(k){return g.hasOwnProperty(k)?null:k})}}else if("index"==f||"original"==f)for(f=0,a=a.aoData.length;f<a;f++)"none"==h?c.push(f):(e=l.inArray(f,d),(-1===
27862e&&"removed"==h||0<=e&&"applied"==h)&&c.push(f));return c},yc=function(a,b,c){var d;return ub("row",b,function(e){var h=hc(e),f=a.aoData;if(null!==h&&!c)return[h];
27862d||(d=Wa(a,c));if(null!==h&&-1!==l.inArray(h,d))return[h];if(null===e||e===q||""===e)return d;if("function"===typeof e)return l.map(d,function(k){var m=f[k];return e(k,m._aData,m.nTr)?k:null});if(e.nodeName){h=e._DT_RowIndex;var g=e._DT_CellIndex;if(h!==q)return f[h]&&f[h].nTr===e?[h]:[];if(g)return f[g.row]&&f[g.row].nTr===e.parentNode?
27863[g.row]:[];h=l(e).closest("*[data-dt-row]");return h.length?[h.data("dt-row")]:[]}if("string"===typeof e&&"#"===e.charAt(0)&&(h=a.aIds[e.replace(/^#/,"")],h!==q))return[h.idx];h=kc(Ea(a.aoData,d,"nTr"));return l(h).filter(e).map(function(){return this._DT_RowIndex}).toArray()},a,c)};y("rows()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=vb(b);var c=this.iterator("table",function(d){return yc(d,a,b)},1);c.selector.rows=a;c.selector.opts=b;return c});y("rows().nodes()",function(){return this.iterator("row",
27864function(a,b){return a.aoData[b].nTr||q},1)});y("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return Ea(a.aoData,b,"_aData")},1)});J("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){b=b.aoData[c];return"search"===a?b._aFilterData:b._aSortData},1)});J("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){va(b,c,a)})});J("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,
27865b){return b},1)});J("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var h=0,f=this[d].length;h<f;h++){var g=c[d].rowIdFn(c[d].aoData[this[d][h]]._aData);b.push((!0===a?"#":"")+g)}return new B(c,b)});J("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,h=e[c],f,g;e.splice(c,1);var k=0;for(f=e.length;k<f;k++){var m=e[k];var n=m.anCells;null!==m.nTr&&(m.nTr._DT_RowIndex=k);if(null!==n)for(m=0,g=n.length;m<
27866g;m++)n[m]._DT_CellIndex.row=k}La(b.aiDisplayMaster,c);La(b.aiDisplay,c);La(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;lb(b);c=b.rowIdFn(h._aData);c!==q&&delete b.aIds[c]});this.iterator("table",function(b){for(var c=0,d=b.aoData.length;c<d;c++)b.aoData[c].idx=c});return this});y("rows.add()",function(a){var b=this.iterator("table",function(d){var e,h=[];var f=0;for(e=a.length;f<e;f++){var g=a[f];g.nodeName&&"TR"===g.nodeName.toUpperCase()?h.push(Ja(d,g)[0]):h.push(ia(d,g))}return h},1),
27867c=this.rows(-1);c.pop();l.merge(c,b);return c});y("row()",function(a,b){return wb(this.rows(a,b))});y("row().data()",function(a){var b=this.context;if(a===q)return b.length&&this.length?b[0].aoData[this[0]]._aData:q;var c=b[0].aoData[this[0]];c._aData=a;Array.isArray(a)&&c.nTr&&c.nTr.id&&ha(b[0].rowId)(a,c.nTr.id);va(b[0],this[0],"data");return this});y("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});y("row.add()",function(a){a instanceof
27868l&&a.length&&(a=a[0]);var b=this.iterator("table",function(c){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?Ja(c,a)[0]:ia(c,a)});return this.row(b[0])});l(A).on("plugin-init.dt",function(a,b){a=new B(b);a.on("stateSaveParams",function(d,e,h){d=e.rowIdFn;e=e.aoData;for(var f=[],g=0;g<e.length;g++)e[g]._detailsShow&&f.push("#"+d(e[g]._aData));h.childRows=f});var c=a.state.loaded();c&&c.childRows&&a.rows(l.map(c.childRows,function(d){return d.replace(/:/g,"\\:")})).every(function(){F(b,null,"requestChild",
27869[this])})});var zc=function(a,b,c,d){var e=[],h=function(f,g){if(Array.isArray(f)||f instanceof l)for(var k=0,m=f.length;k<m;k++)h(f[k],g);else f.nodeName&&"tr"===f.nodeName.toLowerCase()?e.push(f):(k=l("<tr><td></td></tr>").addClass(g),l("td",k).addClass(g).html(f)[0].colSpan=oa(a),e.push(k[0]))};h(c,d);b._details&&b._details.detach();b._details=l(e);b._detailsShow&&b._details.insertAfter(b.nTr)},qc=u.util.throttle(function(a){Ca(a[0])},500),xb=function(a,b){var c=a.context;c.length&&(a=c[0].aoData[b!==
27870q?b:a[0]])&&a._details&&(a._details.remove(),a._detailsShow=q,a._details=q,l(a.nTr).removeClass("dt-hasChild"),qc(c))},rc=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];d._details&&((d._detailsShow=b)?(d._details.insertAfter(d.nTr),l(d.nTr).addClass("dt-hasChild")):(d._details.detach(),l(d.nTr).removeClass("dt-hasChild")),F(c[0],null,"childRow",[b,a.row(a[0])]),Ac(c[0]),qc(c))}},Ac=function(a){var b=new B(a),c=a.aoData;b.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");
278710<U(c,"_details").length&&(b.on("draw.dt.DT_details",function(d,e){a===e&&b.rows({page:"current"}).eq(0).each(function(h){h=c[h];h._detailsShow&&h._details.insertAfter(h.nTr)})}),b.on("column-visibility.dt.DT_details",function(d,e,h,f){if(a===e)for(e=oa(e),h=0,f=c.length;h<f;h++)d=c[h],d._details&&d._details.children("td[colspan]").attr("colspan",e)}),b.on("destroy.dt.DT_details",function(d,e){if(a===e)for(d=0,e=c.length;d<e;d++)c[d]._details&&xb(b,d)}))};y("row().child()",function(a,b){var c=this.context;
27872if(a===q)return c.length&&this.length?c[0].aoData[this[0]]._details:q;!0===a?this.child.show():!1===a?xb(this):c.length&&this.length&&zc(c[0],c[0].aoData[this[0]],a,b);return this});y(["row().child.show()","row().child().show()"],function(a){rc(this,!0);return this});y(["row().child.hide()","row().child().hide()"],function(){rc(this,!1);return this});y(["row().child.remove()","row().child().remove()"],function(){xb(this);return this});y("row().child.isShown()",function(){var a=this.context;return a.length&&
27873this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var Bc=/^([^:]+):(name|visIdx|visible)$/,sc=function(a,b,c,d,e){c=[];d=0;for(var h=e.length;d<h;d++)c.push(T(a,e[d],b));return c},Cc=function(a,b,c){var d=a.aoColumns,e=U(d,"sName"),h=U(d,"nTh");return ub("column",b,function(f){var g=hc(f);if(""===f)return qa(d.length);if(null!==g)return[0<=g?g:d.length+g];
27873if("function"===typeof f){var k=Wa(a,c);return l.map(d,function(p,t){return f(t,sc(a,t,0,0,k),h[t])?t:null})}var m="string"===typeof f?f.match(Bc):
27874"";if(m)switch(m[2]){case "visIdx":case "visible":g=parseInt(m[1],10);if(0>g){var n=l.map(d,function(p,t){return p.bVisible?t:null});return[n[n.length+g]]}return[ta(a,g)];case "name":return l.map(e,function(p,t){return p===m[1]?t:null});default:return[]}if(f.nodeName&&f._DT_CellIndex)return[f._DT_CellIndex.column];g=l(h).filter(f).map(function(){return l.inArray(this,h)}).toArray();if(g.length||!f.nodeName)return g;g=l(f).closest("*[data-dt-column]");return g.length?[g.data("dt-column")]:[]},a,c)};
27875y("columns()",function(a,b){a===q?a="":l.isPlainObject(a)&&(b=a,a="");b=vb(b);var c=this.iterator("table",function(d){return Cc(d,a,b)},1);c.selector.cols=a;c.selector.opts=b;return c});J("columns().header()","column().header()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTh},1)});J("columns().footer()","column().footer()",function(a,b){return this.iterator("column",function(c,d){return c.aoColumns[d].nTf},1)});J("columns().data()","column().data()",function(){return this.iterator("column-rows",
27876sc,1)});J("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});J("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,h){return Ea(b.aoData,h,"search"===a?"_aFilterData":"_aSortData",c)},1)});J("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return Ea(a.aoData,e,"anCells",b)},1)});J("columns().visible()","column().visible()",
27877function(a,b){var c=this,d=this.iterator("column",function(e,h){if(a===q)return e.aoColumns[h].bVisible;var f=e.aoColumns,g=f[h],k=e.aoData,m;if(a!==q&&g.bVisible!==a){if(a){var n=l.inArray(!0,U(f,"bVisible"),h+1);f=0;for(m=k.length;f<m;f++){var p=k[f].nTr;e=k[f].anCells;p&&p.insertBefore(e[h],e[n]||null)}}else l(U(e.aoData,"anCells",h)).detach();g.bVisible=a}});a!==q&&this.iterator("table",function(e){xa(e,e.aoHeader);xa(e,e.aoFooter);e.aiDisplay.length||l(e.nTBody).find("td[colspan]").attr("colspan",
27878oa(e));Ca(e);c.iterator("column",function(h,f){F(h,null,"column-visibility",[h,f,a,b])});(b===q||b)&&c.columns.adjust()});return d});J("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?ua(b,c):c},1)});y("columns.adjust()",function(){return this.iterator("table",function(a){sa(a)},1)});y("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return ta(c,b);if("fromData"===
27879a||"toVisible"===a)return ua(c,b)}});y("column()",function(a,b){return wb(this.columns(a,b))});var Dc=function(a,b,c){var d=a.aoData,e=Wa(a,c),h=kc(Ea(d,e,"anCells")),f=l(lc([],h)),g,k=a.aoColumns.length,m,n,p,t,v,x;return ub("cell",b,function(w){var r="function"===typeof w;if(null===w||w===q||r){m=[];n=0;for(p=e.length;n<p;n++)for(g=e[n],t=0;t<k;t++)v={row:g,column:t},r?(x=d[g],w(v,T(a,g,t),x.anCells?x.anCells[t]:null)&&m.push(v)):m.push(v);return m}if(l.isPlainObject(w))return w.column!==q&&w.row!==
27880q&&-1!==l.inArray(w.row,e)?[w]:[];r=f.filter(w).map(function(C,G){return{row:G._DT_CellIndex.row,column:G._DT_CellIndex.column}}).toArray();if(r.length||!w.nodeName)return r;x=l(w).closest("*[data-dt-row]");return x.length?[{row:x.data("dt-row"),column:x.data("dt-column")}]:[]},a,c)};y("cells()",function(a,b,c){l.isPlainObject(a)&&(a.row===q?(c=a,a=null):(c=b,b=null));l.isPlainObject(b)&&(c=b,b=null);if(null===b||b===q)return this.iterator("table",function(n){return Dc(n,a,vb(c))});var d=c?{page:c.page,
27881order:c.order,search:c.search}:{},e=this.columns(b,d),h=this.rows(a,d),f,g,k,m;d=this.iterator("table",function(n,p){n=[];f=0;for(g=h[p].length;f<g;f++)for(k=0,m=e[p].length;k<m;k++)n.push({row:h[p][f],column:e[p][k]});return n},1);d=c&&c.selected?this.cells(d,c):d;l.extend(d.selector,{cols:b,rows:a,opts:c});return d});J("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:q},1)});y("cells().data()",function(){return this.iterator("cell",
27882function(a,b,c){return T(a,b,c)},1)});J("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});J("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return T(b,c,d,a)},1)});J("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:ua(a,c)}},1)});J("cells().invalidate()","cell().invalidate()",
27883function(a){return this.iterator("cell",function(b,c,d){va(b,c,a,d)})});y("cell()",function(a,b,c){return wb(this.cells(a,b,c))});y("cell().data()",function(a){var b=this.context,c=this[0];if(a===q)return b.length&&c.length?T(b[0],c[0].row,c[0].column):q;Eb(b[0],c[0].row,c[0].column,a);va(b[0],c[0].row,"data",c[0].column);return this});y("order()",function(a,b){var c=this.context;if(a===q)return 0!==c.length?c[0].aaSorting:q;"number"===typeof a?a=[[a,b]]:a.length&&!Array.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));
27884return this.iterator("table",function(d){d.aaSorting=a.slice()})});y("order.listener()",function(a,b,c){return this.iterator("table",function(d){fb(d,a,b,c)})});
vendor: 11,583 bytes, lines 27884-27906
27884y("order.fixed()",function(a){if(!a){var b=this.context;b=b.length?b[0].aaSortingFixed:q;return Array.isArray(b)?{pre:b}:b}return this.iterator("table",function(c){c.aaSortingFixed=l.extend(!0,{},a)})});y(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];l.each(b[d],function(h,
27885f){e.push([f,a])});c.aaSorting=e})});y("search()",function(a,b,c,d){var e=this.context;return a===q?0!==e.length?e[0].oPreviousSearch.sSearch:q:this.iterator("table",function(h){h.oFeatures.bFilter&&ya(h,l.extend({},h.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});J("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,h){var f=e.aoPreSearchCols;if(a===q)return f[h].sSearch;e.oFeatures.bFilter&&
27886(l.extend(f[h],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ya(e,e.oPreviousSearch,1))})});y("state()",function(){return this.context.length?this.context[0].oSavedState:null});y("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});y("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});y("state.save()",function(){return this.iterator("table",function(a){Ca(a)})});
27887u.versionCheck=u.fnVersionCheck=function(a){var b=u.version.split(".");a=a.split(".");for(var c,d,e=0,h=a.length;e<h;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};u.isDataTable=u.fnIsDataTable=function(a){var b=l(a).get(0),c=!1;if(a instanceof u.Api)return!0;l.each(u.settings,function(d,e){d=e.nScrollHead?l("table",e.nScrollHead)[0]:null;var h=e.nScrollFoot?l("table",e.nScrollFoot)[0]:null;if(e.nTable===b||d===b||h===b)c=!0});return c};u.tables=u.fnTables=function(a){var b=
27888!1;l.isPlainObject(a)&&(b=a.api,a=a.visible);var c=l.map(u.settings,function(d){if(!a||a&&l(d.nTable).is(":visible"))return d.nTable});return b?new B(c):c};u.camelToHungarian=P;y("$()",function(a,b){b=this.rows(b).nodes();b=l(b);return l([].concat(b.filter(a).toArray(),b.find(a).toArray()))});l.each(["on","one","off"],function(a,b){y(b+"()",function(){var c=Array.prototype.slice.call(arguments);c[0]=l.map(c[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var d=l(this.tables().nodes());
27889d[b].apply(d,c);return this})});y("clear()",function(){return this.iterator("table",function(a){Ka(a)})});y("settings()",function(){return new B(this.context,this.context)});y("init()",function(){var a=this.context;return a.length?a[0].oInit:null});y("data()",function(){return this.iterator("table",function(a){return U(a.aoData,"_aData")}).flatten()});y("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,h=b.nTBody,f=b.nTHead,
27890g=b.nTFoot,k=l(e);h=l(h);var m=l(b.nTableWrapper),n=l.map(b.aoData,function(t){return t.nTr}),p;b.bDestroying=!0;F(b,"aoDestroyCallback","destroy",[b]);a||(new B(b)).columns().visible(!0);m.off(".DT").find(":not(tbody *)").off(".DT");l(z).off(".DT-"+b.sInstance);e!=f.parentNode&&(k.children("thead").detach(),k.append(f));g&&e!=g.parentNode&&(k.children("tfoot").detach(),k.append(g));b.aaSorting=[];b.aaSortingFixed=[];Sa(b);l(n).removeClass(b.asStripeClasses.join(" "));l("th, td",f).removeClass(d.sSortable+
27891" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);h.children().detach();h.append(n);f=a?"remove":"detach";k[f]();m[f]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),k.css("width",b.sDestroyWidth).removeClass(d.sTable),(p=b.asDestroyStripes.length)&&h.children().each(function(t){l(this).addClass(b.asDestroyStripes[t%p])}));c=l.inArray(b,u.settings);-1!==c&&u.settings.splice(c,1)})});l.each(["column","row","cell"],function(a,b){y(b+"s().every()",function(c){var d=this.selector.opts,e=
27892this;return this.iterator(b,function(h,f,g,k,m){c.call(e[b](f,"cell"===b?g:d,"cell"===b?d:q),f,g,k,m)})})});y("i18n()",function(a,b,c){var d=this.context[0];a=na(a)(d.oLanguage);a===q&&(a=b);c!==q&&l.isPlainObject(a)&&(a=a[c]!==q?a[c]:a._);return a.replace("%d",c)});u.version="1.11.5";u.settings=[];u.models={};u.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,"return":!1};u.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",
27893src:null,idx:-1};u.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};u.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,
2789425,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,
27895fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},
27896fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",
27897sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:l.extend({},u.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};E(u.defaults);u.defaults.column={aDataSort:null,
27898iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};E(u.defaults.column);u.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,
27899iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],
27900aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:q,oAjaxData:q,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,
27901bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Q(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Q(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,h=
27902e.bPaginate;return e.bServerSide?!1===h||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!h||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};u.ext=M={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:u.fnVersionCheck,
27903iApiIndex:0,oJUIClasses:{},sVersion:u.version};l.extend(M,{afnFiltering:M.search,aTypes:M.type.detect,ofnSearch:M.type.search,oSort:M.type.order,afnSortData:M.order,aoFeatures:M.feature,oApi:M.internal,oStdClasses:M.classes,oPagination:M.pager});l.extend(u.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",
27904sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",
27905sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var ec=u.ext.pager;l.extend(ec,{simple:function(a,b){return["previous","next"]},full:function(a,b){return["first","previous","next","last"]},numbers:function(a,b){return[Da(a,b)]},simple_numbers:function(a,b){return["previous",Da(a,b),"next"]},
27906full_numbers:function(a,b){return["first","previous",Da(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",Da(a,b),"last"]},_numbers:Da,numbers_length:7});l.extend(!0,u.ext.renderer,{pageButton:{_:function(a,b,c,d,e,h){var f=a.oClasses,g=a.oLanguage.oPaginate,k=a.oLanguage.oAria.paginate||{},m,n,p=0,t=function(x,w){var r,C=f.sPageButtonDisabled,G=function(I){Ra(a,I.data.action,!0)};var aa=0;for(r=w.length;aa<r;aa++){var L=w[aa];if(Array.isArray(L)){var O=l("<"+(L.DT_el||"div")+"/>").appendTo(x);
27907t(O,L)}else{m=null;n=L;O=a.iTabIndex;switch(L){case "ellipsis":x.append('<span class="ellipsis">&#x2026;</span>');break;case "first":m=g.sFirst;0===e&&(O=-1,n+=" "+C);break;case "previous":m=g.sPrevious;0===e&&(O=-1,n+=" "+C);break;case "next":m=g.sNext;if(0===h||e===h-1)O=-1,n+=" "+C;break;case "last":m=g.sLast;if(0===h||e===h-1)O=-1,n+=" "+C;break;default:m=a.fnFormatNumber(L+1),n=e===L?f.sPageButtonActive:""}null!==m&&(O=l("<a>",{"class":f.sPageButton+" "+n,"aria-controls":a.sTableId,"aria-label":k[L],
27908"data-dt-idx":p,tabindex:O,id:0===c&&"string"===typeof L?a.sTableId+"_"+L:null}).html(m).appendTo(x),ob(O,{action:L},G),p++)}}};try{var v=l(b).find(A.activeElement).data("dt-idx")}catch(x){}t(l(b).empty(),d);v!==q&&l(b).find("[data-dt-idx="+v+"]").trigger("focus")}}});l.extend(u.ext.type.detect,[function(a,b){b=b.oLanguage.sDecimal;return tb(a,b)?"num"+b:null},function(a,b){if(a&&!(a instanceof Date)&&!vc.test(a))return null;b=Date.parse(a);return null!==b&&!isNaN(b)||Z(a)?"date":null},function(a,
27909b){b=b.oLanguage.sDecimal;return tb(a,b,!0)?"num-fmt"+b:null},function(a,b){b=b.oLanguage.sDecimal;return jc(a,b)?"html-num"+b:null},function(a,b){b=b.oLanguage.sDecimal;return jc(a,b,!0)?"html-num-fmt"+b:null},function(a,b){return Z(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);l.extend(u.ext.type.search,{html:function(a){return Z(a)?a:"string"===typeof a?a.replace(gc," ").replace(Va,""):""},string:function(a){return Z(a)?a:"string"===typeof a?a.replace(gc," "):a}});var Ua=function(a,
27910b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=ic(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};l.extend(M.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return Z(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return Z(a)?"":"string"===typeof a?a.toLowerCase():a.toString?a.toString():""},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<
27911b?1:a>b?-1:0}});Xa("");l.extend(!0,u.ext.renderer,{header:{_:function(a,b,c,d){l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass))})},jqueryui:function(a,b,c,d){l("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(l("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);l(a.nTable).on("order.dt.DT",function(e,h,f,g){a===h&&(e=c.idx,b.removeClass(d.sSortAsc+
27912" "+d.sSortDesc).addClass("asc"==g[e]?d.sSortAsc:"desc"==g[e]?d.sSortDesc:c.sSortingClass),b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass("asc"==g[e]?d.sSortJUIAsc:"desc"==g[e]?d.sSortJUIDesc:c.sSortingClassJUI))})}}});var yb=function(a){Array.isArray(a)&&(a=a.join(","));return"string"===typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):a};u.render=
27913{number:function(a,b,c,d,e){return{display:function(h){if("number"!==typeof h&&"string"!==typeof h)return h;var f=0>h?"-":"",g=parseFloat(h);if(isNaN(g))return yb(h);g=g.toFixed(c);h=Math.abs(g);g=parseInt(h,10);h=c?b+(h-g).toFixed(c).substring(2):"";0===g&&0===parseFloat(h)&&(f="");return f+(d||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+h+(e||"")}}},text:function(){return{display:yb,filter:yb}}};l.extend(u.ext.internal,{_fnExternApiFunc:fc,_fnBuildAjax:Oa,_fnAjaxUpdate:Gb,_fnAjaxParameters:Pb,
27914_fnAjaxUpdateDraw:Qb,_fnAjaxDataSrc:za,_fnAddColumn:Ya,_fnColumnOptions:Ga,_fnAdjustColumnSizing:sa,_fnVisibleToColumnIndex:ta,_fnColumnIndexToVisible:ua,_fnVisbleColumns:oa,_fnGetColumns:Ia,_fnColumnTypes:$a,_fnApplyColumnDefs:Db,_fnHungarianMap:E,_fnCamelToHungarian:P,_fnLanguageCompat:ma,_fnBrowserDetect:Bb,_fnAddData:ia,_fnAddTr:Ja,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==q?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return l.inArray(c,a.aoData[b].anCells)},_fnGetCellData:T,
27915_fnSetCellData:Eb,_fnSplitObjNotation:cb,_fnGetObjectDataFn:na,_fnSetObjectDataFn:ha,_fnGetDataMaster:db,_fnClearTable:Ka,_fnDeleteIndex:La,_fnInvalidate:va,_fnGetRowElements:bb,_fnCreateTr:ab,_fnBuildHead:Fb,_fnDrawHead:xa,_fnDraw:ja,_fnReDraw:ka,_fnAddOptionsHtml:Ib,_fnDetectHeader:wa,_fnGetUniqueThs:Na,_fnFeatureHtmlFilter:Kb,_fnFilterComplete:ya,_fnFilterCustom:Tb,_fnFilterColumn:Sb,_fnFilter:Rb,_fnFilterCreateSearch:ib,_fnEscapeRegex:jb,_fnFilterData:Ub,_fnFeatureHtmlInfo:Nb,_fnUpdateInfo:Xb,
27916_fnInfoMacros:Yb,_fnInitialise:Aa,_fnInitComplete:Pa,_fnLengthChange:kb,_fnFeatureHtmlLength:Jb,_fnFeatureHtmlPaginate:Ob,_fnPageChange:Ra,_fnFeatureHtmlProcessing:Lb,_fnProcessingDisplay:V,_fnFeatureHtmlTable:Mb,_fnScrollDraw:Ha,_fnApplyToChildren:ca,_fnCalculateColumnWidths:Za,_fnThrottle:hb,_fnConvertToWidth:Zb,_fnGetWidestNode:$b,_fnGetMaxLenString:ac,_fnStringToCss:K,_fnSortFlatten:pa,_fnSort:Hb,_fnSortAria:cc,_fnSortListener:nb,_fnSortAttachListener:fb,_fnSortingClasses:Sa,_fnSortData:bc,_fnSaveState:Ca,
27917_fnLoadState:dc,_fnImplementState:pb,_fnSettingsFromNode:Ta,_fnLog:da,_fnMap:X,_fnBindAction:ob,_fnCallbackReg:R,_fnCallbackFire:F,_fnLengthOverflow:lb,_fnRenderer:gb,_fnD
27917ataSource:Q,_fnRowAttributes:eb,_fnExtend:qb,_fnCalculateEnd:function(){}});l.fn.dataTable=u;u.$=l;l.fn.dataTableSettings=u.settings;l.fn.dataTableExt=u.ext;l.fn.DataTable=function(a){return l(this).dataTable(a).api()};l.each(u,function(a,b){l.fn.DataTable[a]=b});return u});

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.