1window.gdSetMap = window.gdSetMap || 'osm'; 2 3window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.1\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.1\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/de.hostelman.com\/wp-includes\/js\/wp-emoji-release.min.js?ver=b0babab598a755e719a6b5dd9225291d"}}; 4 !function(e,a,t){var n,r,o,i=a.createElement("canvas"),p=i.getContext&&i.getContext("2d");function s(e,t){var a=String.fromCharCode;p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,e),0,0);e=i.toDataURL();return p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,t),0,0),e===i.toDataURL()}function c(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(o=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},r=0;r<o.length;r++)t.supports[o[r]]=function(e){if(!p||!p.fillText)return!1;switch(p.textBaseline="top",p.font="600 32px Arial",e){case"flag":return s([127987,65039,8205,9895,65039],[127987,65039,8203,9895,65039])?!1:!s([55356,56826,55356,56819],[55356,56826,8203,55356,56819])&&!s([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]);case"emoji":return!s([55357,56424,8205,55356,57212],[55357,56424,8203,55356,57212])}return!1}(o[r]),t.supports.everything=t.supports.everything&&t.supports[o[r]],"flag"!==o[r]&&(t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&t.supports[o[r]]);t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&!t.supports.flag,t.DOMReady=!1,t.readyCallback=function(){t.DOMReady=!0},t.supports.everything||(n=function(){t.readyCallback()},a.addEventListener?(a.addEventListener("DOMContentLoaded",n,!1),e.addEventListener("load",n,!1)):(e.attachEvent("onload",n),a.attachEvent("onreadystatechange",function(){"complete"===a.readyState&&t.readyCallback()})),(n=t.source||{}).concatemoji?c(n.concatemoji):n.wpemoji&&n.twemoji&&(c(n.twemoji),c(n.wpemoji)))}(window,document,window._wpemojiSettings); 5
vendor: 15,088 bytes, lines 6-7
6/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ 7!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(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},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}
vendor: 4,356 bytes, line 7
7:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];
vendor: 10,068 bytes, line 7
7if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(D).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pe
vendor: 8,547 bytes, line 7
7nding",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(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},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(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[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(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(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.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&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.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=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.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 ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone
vendor: 51,417 bytes, line 7
7=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);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"===w(o))S.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]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(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=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,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&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(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=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(je,""),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.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 Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(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&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.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}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(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+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.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=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.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):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.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=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._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--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.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(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.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=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.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=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.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)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,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":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+It+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.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 S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.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"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.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)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
8jQuery.noConflict(); 9 10/*! jQuery Migrate v3.3.2 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 11"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],i=1;i<=3;i++){if(+o[i]<+n[i])return 1;if(+n[i]<+o[i])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.3.2",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;s.migrateDeduplicateWarnings&&r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function o(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var i,a,c,d={},l=s.fn.init,p=s.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,y=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,m=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(i in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&f.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(y,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return p.apply(this,r)},p)Object.prototype.hasOwnProperty.call(p,i)&&(s.find[i]=p[i]);o(s.fn,"size",function(){return this.length},"jQuery.fn.size() is deprecated and removed; use the .length property"),o(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"jQuery.parseJSON is deprecated; use JSON.parse"),o(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),o(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&o(s,"trim",function(e){return null==e?"":(e+"").replace(m,"")},"jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(o(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"jQuery.nodeName is deprecated"),o(s,"isArray",Array.isArray,"jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(o(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()}),o(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[Object.prototype.toString.call(e)]||"object":typeof e},"jQuery.type is deprecated"),o(s,"isFunction",function(e){return"function"==typeof e},"jQuery.isFunction() is deprecated"),o(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated")),s.ajax&&(a=s.ajax,c=/(=)\?(?=&|$)|\?\?/,s.ajax=function(){var e=a.apply(this,arguments);return e.promise&&(o(e,"success",e.done,"jQXHR.success is deprecated and removed"),o(e,"error",e.fail,"jQXHR.error is deprecated and removed"),o(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e},e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(c.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&c.test(e.data))&&u("JSON-to-JSONP auto-promotion is deprecated")}));var g=s.fn.removeAttr,h=s.fn.toggleClass,v=/\S+/g;function j(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}s.fn.removeAttr=function(e){var r=this;return s.each(e.match(v),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),g.apply(this,arguments)};var Q,b=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?h.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))}),w=/^[a-z]/,x=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return b=!0,e=r.apply(this,arguments),b=!1,e})}),s.swap=function(e,t,r,n){var o,i,a={};for(i in b||u("jQuery.swap() is undocumented and deprecated"),t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=r.apply(e,n||[]),t)e.style[i]=a[i];return o},e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("JQMIGRATE: jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),s.cssNumber||(s.cssNumber={}),Q=s.fn.css,s.fn.css=function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=j(e),n=r,w.test(n)&&x.test(n[0].toUpperCase()+n.slice(1))||s.cssNumber[r]||u('Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))};var A,k,S,M,N=s.data;s.data=function(e,t,r){var n,o,i;if(t&&"object"==typeof t&&2===arguments.length){for(i in n=s.hasData(e)&&N.call(this,e),o={},t)i!==j(i)?(u("jQuery.data() always sets/gets camelCased names: "+i),n[i]=t[i]):o[i]=t[i];return N.call(this,e,o),t}return t&&"string"==typeof t&&t!==j(t)&&(n=s.hasData(e)&&N.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):N.apply(this,arguments)},s.fx&&(S=s.Tween.prototype.run,M=function(e){return e},s.Tween.prototype.run=function(){1<s.easing[this.easing].length&&(u("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=M),S.apply(this,arguments)},A=s.fx.interval||13,k="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u(k),A},set:function(e){u(k),A=e}}));var R=s.fn.load,H=s.event.add,C=s.event.fix;s.event.props=[],s.event.fixHooks={},t(s.event.props,"concat",s.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),s.event.fix=function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=C.call(this,e),n&&n.filter?n.filter(t,e):t},s.event.add=function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("jQuery(window).on('load'...) called after load event occurred"),H.apply(this,arguments)},s.each(["load","unload","error"],function(e,t){s.fn[t]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?R.apply(this,e):(u("jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),s.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,r){s.fn[r]=function(e,t){return u("jQuery.fn."+r+"
11() event shorthand is deprecated"),0<arguments.length?this.on(r,null,e,t):this.trigger(r)}}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("'ready' event is deprecated")}},s.fn.extend({bind:function(e,t,r){return u("jQuery.fn.bind() is deprecated"),this.on(e,null,t,r)},unbind:function(e,t){return u("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,r,n){return u("jQuery.fn.delegate() is deprecated"),this.on(t,e,r,n)},undelegate:function(e,t,r){return u("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},hover:function(e,t){return u("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}function P(e){var t=e.replace(O,"<$1></$2>");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1></$2>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s}); 12 13 14jQuery.autocomplete_gd=function(input,options){var me=this;var $input=jQuery(input).attr("autocomplete","off");if(options.inputClass)$input.addClass(options.inputClass);var results=document.createElement("div");var $results=jQuery(results);$results.show().addClass(options.resultsClass).css("position","absolute");if(options.width>0)$results.css("width",options.width);jQuery("body").append(results);input.autocompleter=me;var timeout=null;var prev="";var active=-1;var cache={};var keyb=false;var hasFocus=false;var lastKeyPressCode=null;function flushCache(){cache={};cache.data={};cache.length=0}flushCache();if(options.data!=null){var sFirstChar="",stMatchSets={},row=[];if(typeof options.url!="string")options.cacheLength=1;for(var i=0;i<options.data.length;i++){row=typeof options.data[i]=="string"?[options.data[i]]:options.data[i];if(row[0].length>0){sFirstChar=row[0].substring(0,1).toLowerCase();if(!stMatchSets[sFirstChar])stMatchSets[sFirstChar]=[];stMatchSets[sFirstChar].push(row)}}for(var k in stMatchSets){options.cacheLength++;addToCache(k,stMatchSets[k])}}$input.keydown(function(e){lastKeyPressCode=e.keyCode;switch(e.keyCode){case 38:e.preventDefault();moveSelect(-1);break;case 40:e.preventDefault();moveSelect(1);break;case 9:case 13:if(selectCurrent()){$input.get(0).blur();e.preventDefault()}break;default:active=-1;if(timeout)clearTimeout(timeout);timeout=setTimeout(function(){onChange()},options.delay);break}}).focus(function(){hasFocus=true}).blur(function(){hasFocus=false;hideResults()});hideResultsNow();function onChange(){if(lastKeyPressCode==46||lastKeyPressCode>8&&lastKeyPressCode<32)return $results.show();var v=$input.val();if(v==prev)return;prev=v;if(v.length>=options.minChars){$input.addClass(options.loadingClass);requestData(v)}else{$input.removeClass(options.loadingClass);$results.show()}}function moveSelect(step){var lis=jQuery("li",results);if(!lis)return;active+=step;if(active<0){active=0}else if(active>=lis.size()){active=lis.size()-1}lis.removeClass("ac_over");jQuery(lis[active]).addClass("ac_over")}function selectCurrent(){var li=jQuery("li.ac_over",results)[0];if(!li){var $li=jQuery("li",results);if(options.selectOnly){if($li.length==1)li=$li[0]}else if(options.selectFirst){li=$li[0]}}if(li){selectItem(li);return true}else{return false}}function selectItem(li){if(!li){li=document.createElement("li");li.extra=[];li.selectValue=""}var v=jQuery.trim(li.selectValue?li.selectValue:li.innerHTML);input.lastSelected=v;prev=v;$results.html("");$input.val(v);hideResultsNow();if(options.onItemSelect)setTimeout(function(){options.onItemSelect(li,$input.parents("form"))},1)}function createSelection(start,end){var field=$input.get(0);if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select()}else if(field.setSelectionRange){field.setSelectionRange(start,end)}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end}}field.focus()}function autoFill(sValue){if(lastKeyPressCode!=8){$input.val($input.val()+sValue.substring(prev.length));createSelection(prev.length,sValue.length)}}function showResults(){jQuery("."+options.resultsClass).css({display:"block"});var pos=findPos(input);var total_heigth=input.offsetHeight+jQuery("#wpadminbar").height();var iWidth=options.width>0?options.width:$input.width();$results.css({width:parseInt(iWidth)+"px",top:pos.y+total_heigth+"px",left:pos.x+"px"}).show()}function hideResults(){if(timeout)clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200)}function hideResultsNow(){jQuery("."+options.resultsClass).css({display:"none"});if(timeout)clearTimeout(timeout);$input.removeClass(options.loadingClass);if($results.is(":visible")){$results.show()}if(options.mustMatch){var v=$input.val();if(v!=input.lastSelected){selectItem(null)}}}function receiveData(q,data){if(data){$input.removeClass(options.loadingClass);results.innerHTML="";if(!hasFocus||data.length==0)return hideResultsNow();if(jQuery.browser.msie){$results.append(document.createElement("iframe"))}results.appendChild(dataToDom(data));if(options.autoFill&&$input.val().toLowerCase()==q.toLowerCase())autoFill(data[0][0]);showResults()}else{hideResultsNow()}}function parseData(data){if(!data)return null;var parsed=[];var rows=data.split(options.lineSeparator);for(var i=0;i<rows.length;i++){var row=jQuery.trim(rows[i]);if(row){parsed[parsed.length]=row.split(options.cellSeparator)}}return parsed}function dataToDom(data){var ul=document.createElement("ul");var num=data.length;if(options.maxItemsToShow>0&&options.maxItemsToShow<num)num=options.maxItemsToShow;for(var i=0;i<num;i++){var row=data[i];if(!row)continue;var li=document.createElement("li");if(options.formatItem){li.innerHTML=options.formatItem(row,i,num);li.selectValue=row[0]}else{li.innerHTML=row[0];li.selectValue=row[0]}var extra=null;if(row.length>1){extra=[];for(var j=1;j<row.length;j++){extra[extra.length]=row[j]}}li.extra=extra;
14ul.appendChild(li);jQuery(li).hover(function(){jQuery("li",ul).removeClass("ac_over");jQuery(this).addClass("ac_over");active=jQuery("li",ul).indexOf(jQuery(this).get(0))},function(){jQuery(this).removeClass("ac_over")}).click(function(e){e.preventDefault();e.stopPropagation();selectItem(this)})}return ul}function requestData(q){if(!options.matchCase)q=q.toLowerCase();var data=options.cacheLength?loadFromCache(q):null;if(data&&data.length){receiveData(q,data)}else if(typeof options.url=="string"&&options.url.length>0){jQuery.ajax({url:makeUrl(q),type:"GET",dataType:"html",beforeSend:function(){geodir_search_wait(1)},success:function(data,textStatus,xhr){data=parseData(data);addToCache(q,data);receiveData(q,data);geodir_search_wait(0)},error:function(xhr,textStatus,errorThrown){console.log(textStatus);geodir_search_wait(0)}})}else{$input.removeClass(options.loadingClass)}}function makeUrl(q){var sform=jQuery($input).closest("form");var url=options.url+"&q="+encodeURI(q);for(var i in options.extraParams){url+="&"+i+"="+encodeURI(options.extraParams[i])}if($input.attr("name")==geodir_advanced_search_js_msg.autocomplete_field_name){if(sform.find('[name="set_location_type"]').length){url+="&_ltype="+encodeURI(sform.find('[name="set_location_type"]').val())}if(sform.find('[name="set_location_val"]').length){url+="&_lval="+encodeURI(sform.find('[name="set_location_val"]').val())}if(sform.find('[name="gd_hood_s"]').length){url+="&_lhood="+encodeURI(sform.find('[name="gd_hood_s"]').val())}}return url}function loadFromCache(q){if(gdNearChanged){flushCache();gdNearChanged=false;return null}if(!q)return null;if(cache.data[q])return cache.data[q];if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var qs=q.substr(0,i);var c=cache.data[qs];if(c){var csub=[];for(var j=0;j<c.length;j++){var x=c[j];var x0=x[0];if(matchSubset(x0,q)){csub[csub.length]=x}}return csub}}}return null}function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains}this.flushCache=function(){flushCache()};this.setExtraParams=function(p){options.extraParams=p};this.findValue=function(){var q=$input.val();if(!options.matchCase)q=q.toLowerCase();var data=options.cacheLength?loadFromCache(q):null;if(data&&data.length){findValueCallback(q,data)}else if(typeof options.url=="string"&&options.url.length>0){jQuery.get(makeUrl(q),function(data){data=parseData(data);addToCache(q,data);findValueCallback(q,data)})}else{findValueCallback(q,null)}};function findValueCallback(q,data){if(data)$input.removeClass(options.loadingClass);var num=data?data.length:0;var li=null;for(var i=0;i<num;i++){var row=data[i];if(row[0].toLowerCase()==q.toLowerCase()){li=document.createElement("li");if(options.formatItem){li.innerHTML=options.formatItem(row,i,num);li.selectValue=row[0]}else{li.innerHTML=row[0];li.selectValue=row[0]}var extra=null;if(row.length>1){extra=[];for(var j=1;j<row.length;j++){extra[extra.length]=row[j]}}li.extra=extra}}if(options.onFindValue)setTimeout(function(){options.onFindValue(li)},1)}function addToCache(q,data){if(!data||!q||!options.cacheLength)return;if(!cache.length||cache.length>options.cacheLength){flushCache();cache.length++}else if(!cache[q]){cache.length++}cache.data[q]=data}function findPos(obj){var curleft=obj.offsetLeft||0;var curtop=obj.offsetTop||0;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop}return{x:curleft,y:curtop}}};jQuery.fn.autocomplete_gd=function(url,options,data){options=options||{};options.url=url;options.data=typeof data=="object"&&data.constructor==Array?data:null;options.inputClass=options.inputClass||"ac_input";options.resultsClass=options.resultsClass||"ac_results";options.lineSeparator=options.lineSeparator||"\n";options.cellSeparator=options.cellSeparator||"|";options.minChars=options.minChars||1;options.delay=options.delay||400;options.matchCase=options.matchCase||0;options.matchSubset=options.matchSubset||1;options.matchContains=options.matchContains||0;options.cacheLength=options.cacheLength||1;options.mustMatch=options.mustMatch||0;options.extraParams=options.extraParams||{};options.loadingClass=options.loadingClass||"ac_loading";options.selectFirst=options.selectFirst||false;options.selectOnly=options.selectOnly||false;options.maxItemsToShow=options.maxItemsToShow||-1;options.autoFill=options.autoFill||false;options.width=parseInt(options.width,10)||0;this.each(function(){var input=this;new jQuery.autocomplete_gd(input,options)});return this};jQuery.fn.autocompleteArray=function(data,options){return this.autocomplete_gd(null,options,data)};jQuery.fn.indexOf=function(e){for(var i=0;i<this.length;i++){if(this[i]==e)return i}return-1};(function(){})();gdSearchDoing=0;var gdNearChanged=0;function geodir_search_wait(on){waitTime=300;if(on){if(gdSearchDoing){return}gdSearchDoing=1;jQuery(".geodir_submit_search").addClass("gd-wait-btnsearch").prop("disabled",true);jQuery(".showFilters").prop("disabled",true);searchPos=1;function geodir_search_wait_animate(){if(!searchPos){return}if(searchPos==1){jQuery('input[type="button"].geodir_submit_search').val("ï ï ï");searchPos=2;window.setTimeout(geodir_search_wait_animate,waitTime);return}if(searchPos==2){jQuery('input[type="button"].geodir_submit_search').val("ï ï ï");searchPos=3;window.setTimeout(geodir_search_wait_animate,waitTime);return}if(searchPos==3){jQuery('input[type="button"].geodir_submit_search').val("ï ï ï");searchPos=1;window.setTimeout(geodir_search_wait_animate,waitTime);return}}geodir_search_wait_animate()}else{searchPos=0;gdSearchDoing=0;jQuery(".geodir_submit_search").removeClass("gd-wait-btnsearch").prop("disabled",fal
14se);jQuery(".showFilters").prop("disabled",false);jQuery('input[type="button"].geodir_submit_search').val(gdsText)}}jQuery(document).ready(function($){gdsText=jQuery('input[type="button"].geodir_submit_search').val();jQuery(".geodir_submit_search").click(function(){var $form=jQuery(this).closest("form");geodir_search_wait(1);var is_near_me=false;var $snear=jQuery(".snear",$form).val();if($snear==geodir_advanced_search_js_msg.msg_Near+" "+geodir_advanced_search_js_msg.msg_Me){is_near_me=true}else if($snear==geodir_advanced_search_js_msg.msg_Near+" "+geodir_advanced_search_js_msg.msg_User_defined){is_near_me=true}else if($snear.match("^"+geodir_advanced_search_js_msg.msg_In)){is_near_me=true}if(jQuery(".sgeo_lat").val()!=""&&jQuery(".sgeo_lon").val()!=""&&!is_near_me){jQuery(".sgeo_lat").val("");jQuery(".sgeo_lon").val("")}return false});if(geodir_advanced_search_js_msg.geodir_location_manager_active==1&&geodir_advanced_search_js_msg.geodir_enable_autocompleter_near==1){jQuery(".snear").each(function(){jQuery(this).keyup(function(){jQuery(this).removeClass("near-country near-region near-city")})});jQuery("input[name=snear]").autocomplete_gd(geodir_advanced_search_js_msg.geodir_admin_ajax_url+"?action=geodir_autocompleter_near_ajax_action",{delay:500,minChars:parseInt(geodir_var.as_min_char),matchSubset:1,matchContains:1,cacheLength:1,formatItem:formatItemNear,onItemSelect:onSelectItemNear,autoFill:false})}if(jQuery(".search_by_post").val()){gd_s_post_type=jQuery(".search_by_post").val()}else{gd_s_post_type="gd_place"}setTimeout(function(){jQuery(".search_by_post").change(function(){gd_s_post_type=jQuery(this).val();gdReplaceASC(gd_s_post_type,this);jQuery.each(gdsa,function(index,item){if(this.autocompleter){this.autocompleter.setExtraParams({post_type:gd_s_post_type});this.autocompleter.flushCache()}})})},100);if(geodir_advanced_search_js_msg.geodir_enable_autocompleter==1){try{var gdsa=jQuery(".geodir_submit_search").closest("form").find("input[name="+geodir_advanced_search_js_msg.autocomplete_field_name+"]").autocomplete_gd(geodir_advanced_search_js_msg.geodir_admin_ajax_url+"?action=geodir_autocompleter_ajax_action",{delay:500,minChars:parseInt(geodir_var.as_min_char),matchSubset:1,matchContains:1,cacheLength:1,formatItem:formatItem,onItemSelect:onSelectItem,autoFill:false,extraParams:{post_type:gd_s_post_type}})}catch(e){}}if(jQuery(".gd-adv-search-labels label").length){jQuery(".gd-adv-search-labels label").live("click",function(event){var dataName=jQuery(this).attr("data-name");var dataNames=jQuery(this).attr("data-names");if(typeof dataName!="undefined"||jQuery(this).hasClass("gd-adv-search-near")){if(jQuery(this).hasClass("gd-adv-search-near")){dataName="snear"}var dataEl=jQuery("form.geodir-listing-search").find('[name="'+dataName+'"]');gd_adv_search_deselect(dataEl);if(typeof dataNames!="undefined"){dataEl=jQuery("form.geodir-listing-search").find('[name="'+dataNames+'"]');gd_adv_search_deselect(dataEl)}jQuery("form.geodir-listing-search").find(".geodir_submit_search").click()}})}jQuery(".geodir_advance_search_widget.geodir-advance-search-searched").each(function(){var $this=this;if(jQuery($this).attr("data-show-adv")=="search"){jQuery(".showFilters",$this).trigger("click")}});jQuery(".customize_filter",".geodir-filter-container").each(function(){var $cont=this;var $form=jQuery($cont).closest("form");var $adv_show=jQuery($form).closest(".geodir_advance_search_widget").attr("data-show-adv");if($adv_show=="always"&&typeof jQuery(".showFilters",$form).html()!="undefined"){jQuery(".geodir_submit_search:first",$form).css({visibility:"hidden"});jQuery(".showFilters",$form).remove();if(!jQuery(".customize_filter",$form).is(":visible")){jQuery(".customize_filter",$form).slideToggle(500)}}});try{jQuery('[name="stype"]',jQuery("form.geodir-listing-search")).each(function(e){jQuery(this).trigger("change")})}catch(e){}});function gd_adv_search_deselect(el){var fType=jQuery(el).prop("type");switch(fType){case"checkbox":case"radio":jQuery(el).prop("checked",false);break}jQuery(el).val("")}function gdGetLocation(box){jQuery(".snear").removeClass("near-country near-region near-city");if(box&&box.prop("checked")!=true){gdClearUserLoc();return}if(navigator.geolocation){navigator.geolocation.getCurrentPosition(function(position){lat=position.coords.latitude;lon=position.coords.longitude;gdSetUserLocation(position.coords.latitude,position.coords.longitude,1)},gdLocationError,gdLocationOptions)}else{alert(geodir_advanced_search_js_msg.GEOLOCATION_NOT_SUPPORTED)}}function gdClearUserLoc(){lat="";lon="";my_location="";userMarkerActive=true;gdSetUserLocation(lat,lon,my_location)}function setusermarker(new_lat,new_lon,map_id){if(window.gdMaps=="osm"){setusermarker_osm(new_lat,new_lon,map_id);return}var image=new google.maps.MarkerImage(geodir_advanced_search_js_msg.geodir_advanced_search_plugin_url+"/css/map_me.png",null,null,new google.maps.Point(8,8),new google.maps.Size(17,17));if(map_id){goMap=jQuery("#"+map_id).goMap()}if(gdUmarker["visible"]){return}if(typeof goMap=="undefined"){return}var coord=new google.maps.LatLng(lat,lon);gdUmarker=jQuery.goMap.createMarker({optimized:false,flat:true,draggable:true,id:"map_me",title:"Set Location",position:coord,visible:true,clickable:true,icon:image});jQuery.goMap.createListener({type:"marker",marker:"map_me"},"dragend",function(){latLng=gdUmarker.getPosition();lat=latLng.lat();lon=latLng.lng();gdSetUserLocation(lat,lon,0)});userMarkerActive=true}function setusermarker_osm(new_lat,new_lon,map_id){if(map_id){goMap=jQuery("#"+map_id).goMap()}if(jQuery.goMap.gdUmarker){return}if(typeof goMap=="undefined"){return}gdUmarker=jQuery.goMap.createMarker({optimized:false,flat:true,draggable:true,id:"map_me",title:"Set Location",position:new L.latLng(lat,lon),visible:true,clickable:true,addToMap:true});gdUmarker.setIcon(L.divIcon({iconSize:[17,17],iconAnchor:[8.5,8.5],className:"gd-user-marker",html:'<div class="gd-user-marker-box"><div class="gd-user-marker-animate"></div><img class="gd-user-marker-img" src="'+geodir_advanced_search_js_msg.geodir_advanced_search_plugin_url+"/css/map_me.png"+'"></img></div>'}));gdUmarker.on("dragend",function(e){gdULatLng=gdUmarker.getLatLng();gdSetUserLocation(gdULatLng.lat,gdULatLng.lng,0)});jQuery.goMap.gdUmarker=gdUmarker;userMarkerActive=true}
14function moveUserMarker(lat,lon){if(window.gdMaps=="google"){var coord=new google.maps.LatLng(lat,lon);gdUmarker.setPosition(coord)}else if(window.gdMaps=="osm"){var coord=new L.latLng(lat,lon);gdUmarker.setLatLng(coord)}}function removeUserMarker(){if(typeof goMap!="undefined"){jQuery.goMap.removeMarker("map_me")}userMarkerActive=false}function gdLocationError(error){switch(error.code){case error.PERMISSION_DENIED:alert(geodir_advanced_search_js_msg.PERMISSION_DENINED);break;case error.POSITION_UNAVAILABLE:alert(geodir_advanced_search_js_msg.POSITION_UNAVAILABLE);break;case error.TIMEOUT:alert(geodir_advanced_search_js_msg.DEFAUTL_ERROR);break;case error.UNKNOWN_ERROR:alert(geodir_advanced_search_js_msg.UNKNOWN_ERROR);break}}function gdSetupUserLoc(){if(my_location){jQuery(".geodir-search .fa-compass").css("color",geodir_advanced_search_js_msg.compass_active_color);jQuery(".gt_near_me_s").prop("checked",true);jQuery(".snear").val(geodir_advanced_search_js_msg.msg_Near+" "+geodir_advanced_search_js_msg.msg_Me);jQuery(".sgeo_lat").val(lat);jQuery(".sgeo_lon").val(lon)}else{if(lat&&lon){jQuery(".geodir-search .fa-compass").css("color",geodir_advanced_search_js_msg.compass_active_color);jQuery(".gt_near_me_s").prop("checked",true);jQuery(".snear").val(geodir_advanced_search_js_msg.msg_Near+" "+geodir_advanced_search_js_msg.msg_User_defined);jQuery(".sgeo_lat").val(lat);jQuery(".sgeo_lon").val(lon)}else if(jQuery(".snear").length&&jQuery(".snear").val().match("^"+geodir_advanced_search_js_msg.msg_Near)){jQuery(".geodir-search .fa-compass").css("color","");jQuery(".gt_near_me_s").prop("checked",false);jQuery(".snear").val("");jQuery(".snear").blur();jQuery(".sgeo_lat").val("");jQuery(".sgeo_lon").val("")}}}function gdSetUserLocation(lat,lon,my_loc){if(my_loc){my_location=1}else{my_location=0}gdSetupUserLoc();if(userMarkerActive==false){jQuery.each(map_id_arr,function(key,value){setusermarker(lat,lon,value)})}else if(lat&&lon){moveUserMarker(lat,lon)}else{removeUserMarker()}jQuery.ajax({url:geodir_advanced_search_js_msg.geodir_admin_ajax_url,type:"POST",dataType:"html",data:{action:"gd_set_user_location",lat:lat,lon:lon,myloc:my_location},success:function(data,textStatus,xhr){},error:function(xhr,textStatus,errorThrown){console.log(errorThrown)}})}function gdasShowRange(el){jQuery(".gdas-range-value-out").html(jQuery(el).val()+" "+geodir_advanced_search_js_msg.unom_dist);gdasSetRange(jQuery(el).val())}function gdasSetRange(range){var ajax_url=geodir_advanced_search_js_msg.geodir_admin_ajax_url;jQuery.post(ajax_url,{action:"geodir_set_near_me_range",range:range},function(data){})}function geodir_do_geolocation_on_load(){if(navigator.geolocation){navigator.geolocation.getCurrentPosition(geodir_position_success_on_load,geodir_position_error,{timeout:1e4})}else{var error={code:"-1"};geodir_position_error(error)}}function geodir_position_error(err){var ajax_url=geodir_advanced_search_js_msg.geodir_admin_ajax_url;var msg;var default_err=false;switch(err.code){case err.UNKNOWN_ERROR:msg=geodir_advanced_search_js_msg.UNKNOWN_ERROR;break;case err.PERMISSION_DENINED:msg=geodir_advanced_search_js_msg.PERMISSION_DENINED;break;case err.POSITION_UNAVAILABLE:msg=geodir_advanced_search_js_msg.POSITION_UNAVAILABLE;break;case err.BREAK:msg=geodir_advanced_search_js_msg.BREAK;break;case 3:geodir_position_success_on_load(null);break;default:msg=geodir_advanced_search_js_msg.DEFAUTL_ERROR;default_err=true;break}jQuery.post(ajax_url,{action:"geodir_share_location",geodir_ajax:"share_location",error:true},function(data){});if(!default_err){alert(msg)}}function geodir_position_success_on_load(position){var ajax_url=geodir_advanced_search_js_msg.geodir_admin_ajax_url;var request_param=geodir_advanced_search_js_msg.request_param;var redirect=typeof redirect!=="undefined"?redirect:"";var lat;var long;if(position&&position!==null){var coords=position.coords||position.coordinate||position;lat=coords.latitude;long=coords.longitude}jQuery.post(ajax_url,{action:"geodir_share_location",geodir_ajax:"share_location",lat:lat,"long":long,request_param:request_param},function(data){if(data&&data!=="OK"){window.location=data}})}jQuery(document).ready(function(){geodir_search_onload_redirect()});function geodir_search_onload_redirect(){var onloadRedirect=geodir_advanced_search_js_msg.onload_redirect;var onloadAskRedirect=geodir_advanced_search_js_msg.onload_askRedirect;if(!onloadAskRedirect){return}switch(onloadRedirect){case"nearest":if(geodir_advanced_search_js_msg.geodir_autolocate_ask){if(confirm(geodir_advanced_search_js_msg.geodir_autolocate_ask_msg)){geodir_do_geolocation_on_load()}else{geodir_position_do_not_share()}}else{geodir_do_geolocation_on_load()}break;case"location":var redirectLocation=geodir_advanced_search_js_msg.onload_redirectLocation;if(redirectLocation&&redirectLocation!==""){window.location=redirectLocation}break;case"no":default:geodir_position_do_not_share();break}}function geodir_position_do_not_share(){var ajax_url=geodir_advanced_search_js_msg.geodir_admin_ajax_url;jQuery.post(ajax_url,{action:"geodir_do_not_share_location",geodir_ajax:"share_location"},function(data){})}function formatItemNear(row){var attr;if(row.length==3){attr='attr="'+row[2]+'"'}else{attr=""}
14return row[0]+"<span "+attr+"></span>"}gdReplaceASC_load=true;function gdReplaceASC(stype,el){if(!stype){return}var $form=jQuery(el).closest("form");var $adv_show=jQuery($form).closest(".geodir_advance_search_widget").attr("data-show-adv");jQuery($form).addClass("geodir-adv-form-wait");if($adv_show=="always"||$adv_show=="search"){jQuery(".geodir-loc-bar-in",$form).css({opacity:".66"});jQuery(".customize_filter",$form).css({opacity:".66"});if(jQuery(".customize_filter",$form).is(":visible")){jQuery(".customize_filter",$form).slideToggle(500)}jQuery(".geodir_submit_search",$form).css("visibility","hidden")}else{jQuery(".customize_filter",$form).hide("slow");jQuery(".geodir_submit_search",$form).css("visibility","visible")}var $div=jQuery(el).closest(".geodir-search");var button="";var html="";jQuery.ajax({url:geodir_advanced_search_js_msg.geodir_admin_ajax_url,type:"POST",dataType:"html",data:{action:"geodir_advance_search_button_ajax",stype:stype,adv:$adv_show},beforeSend:function(){if(!gdReplaceASC_load){geodir_search_wait(1)}gdReplaceASC_load=false},success:function(data,textStatus,xhr){jQuery($form).removeClass("geodir-adv-form-wait");jQuery("body").removeClass("gd-multi-datepicker");if(data){gdGetCustomiseHtml(stype,data,el)}else{if($adv_show=="always"||$adv_show=="search"){jQuery(".geodir_submit_search",$form).css("visibility","visible");jQuery(".geodir-loc-bar-in",$form).css({opacity:"1"})}gdSetupAjaxAdvancedSearch("","",el);geodir_search_wait(0)}geodir_reposition_compass()},error:function(xhr,textStatus,errorThrown){console.log(textStatus);geodir_search_wait(0)},complete:function(xhr,textStatus){}})}function gdGetCustomiseHtml(stype,button,el){var $adv_show=jQuery(el).closest(".geodir_advance_search_widget").attr("data-show-adv");jQuery.ajax({url:geodir_advanced_search_js_msg.geodir_admin_ajax_url,type:"POST",dataType:"html",data:{action:"gd_advancedsearch_customise",stype:stype,adv:$adv_show},beforeSend:function(){},success:function(data,textStatus,xhr){gdSetupAjaxAdvancedSearch(button,data,el);geodir_reposition_compass();geodir_search_wait(0)},error:function(xhr,textStatus,errorThrown){console.log(textStatus);geodir_search_wait(0)}})}function gdSetupAjaxAdvancedSearch(button,html,el){var $form=jQuery(el).closest("form");var $adv_show=jQuery($form).closest(".geodir_advance_search_widget").attr("data-show-adv");if(button){if(jQuery(".showFilters",$form).length){}else{jQuery(".geodir_submit_search:visible",$form).after(button)}jQuery($form).addClass("geodir-adv-form");jQuery(".geodir-filter-container",$form).html(html);if($adv_show=="always"||$adv_show=="search"){jQuery(".geodir-loc-bar-in",$form).css({opacity:"1"});if(!jQuery(".customize_filter",$form).is(":visible")){jQuery(".customize_filter",$form).slideToggle(500)}if($adv_show=="always"){jQuery(".showFilters",$form).remove()}else{jQuery("body").addClass("geodir_advance_search")}jQuery(".geodir_submit_search:first",$form).css({visibility:"hidden"})}else{jQuery("body").addClass("geodir_advance_search")}}else{jQuery(".showFilters",$form).remove();jQuery(".geodir-filter-container",$form).html("");jQuery("body").removeClass("geodir_advance_search");jQuery($form).removeClass("geodir-adv-form")}geodir_setup_submit_search()}function onSelectItem(row,$form){if(geodir_advanced_search_js_msg.geodir_autocompleter_autosubmit==1){var link=jQuery(row).find("span").attr("link");if(typeof link!="undefined"&&link!=""){window.location.href=link;return true}if($form.find(' input[name="snear"]').val()==geodir_advanced_search_js_msg.default_Near){jQuery('input[name="snear"]').val("")}if(jQuery(".search_by_post",$form).val()!=""&&typeof gd_cpt_no_location=="function"){if(gd_cpt_no_location(jQuery(".search_by_post",$form).val())){jQuery(".snear",$form).remove();jQuery(".sgeo_lat",$form).remove();jQuery(".sgeo_lon",$form).remove();jQuery('select[name="sort_by"]',$form).remove()}}if(typeof jQuery(row).find("span").attr("attr")!="undefined"){jQuery("input.geodir_submit_search",$form).trigger("click")}else{jQuery("input.geodir_submit_search",$form).trigger("click")}}else{jQuery(row).parents("form").find('input[name="'+geodir_advanced_search_js_msg.autocomplete_field_name+'"]').focus()}}function onSelectItemNear(row,$form){nClass="";lType="";gdNearChanged=true;if(row.extra[2]==1){nClass="near-country";lType=geodir_advanced_search_js_msg.txt_in_country}else if(row.extra[2]==2){nClass="near-region";
14lType=geodir_advanced_search_js_msg.txt_in_region}else if(row.extra[2]==3){nClass="near-city";lType=geodir_advanced_search_js_msg.txt_in_city}else if(row.extra[2]==4){nClass="near-neighbourhood";lType=geodir_advanced_search_js_msg.txt_in_hood;if($form.find(' input[name="gd_hood_s"]').length){$form.find(' input[name="gd_hood_s"]').val(row.extra[3])}else{$form.find(' input[name="snear"]').after('<input name="gd_hood_s" type="hidden" value="'+row.extra[3]+'" />')}}if(row.extra[2]!=4){$form.find('input[name="gd_hood_s"]').remove()}fillVal=geodir_advanced_search_js_msg.msg_In+" "+row.extra[0]+" "+lType;$form.find(' input[name="snear"]').val(fillVal);if($form.find(' input[name="set_location_val"]').length){$form.find(' input[name="set_location_val"]').val(row.extra[1])}else{$form.find(' input[name="snear"]').after('<input name="set_location_val" type="hidden" value="'+row.extra[1]+'" />')}if($form.find(' input[name="set_location_type"]').length){$form.find(' input[name="set_location_type"]').val(row.extra[2])}else{$form.find(' input[name="snear"]').after('<input name="set_location_type" type="hidden" value="'+row.extra[2]+'" />')}$form.find(' input[name="snear"]').removeClass("near-country near-region near-city");if(nClass){$form.find(' input[name="snear"]').addClass(nClass)}if(geodir_advanced_search_js_msg.geodir_autocompleter_autosubmit_near==1){setTimeout(function(){$form.find(".geodir_submit_search").click()},100)}}function formatItem(row){var attr;if(row.length==3&&row[2]!=""){attr='attr="'+row[2]+'"'}else{attr=""}var link="";var icon="";var exp=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;if(typeof row[1]!="undefined"&&row[1]!=""&&exp.test(row[1])){link=' link="'+row[1]+'" class="gd-search-has-link"';icon='<i class="fa fa-angle-double-right"></i>'}return row[0]+"<span "+attr+" "+link+">"+icon+"</span>"}function geodir_insert_compass(){jQuery(".snear").each(function(){var $this=jQuery(this);jQuery('<span class="near-compass" data-dropdown=".gd-near-me-dropdown"></span>').css({position:"absolute",left:$this.position().left+$this.outerWidth()+parseInt($this.css("margin-left"))-$this.innerHeight(),top:$this.position().top+parseInt($this.css("margin-top"))+($this.outerHeight()-$this.innerHeight())/2,fontSize:($this.innerHeight()+parseInt($this.css("margin-top")))*.95,"line-height":"0px"}).html('<i class="fa fa-compass"></i>').data("inputEQ",$this.index()).insertAfter($this)});jQuery(window).resize(function(){geodir_reposition_compass()})}function geodir_reposition_compass(){jQuery(".snear").each(function(){var $this=jQuery(this);jQuery($this).next(".near-compass").css({position:"absolute",left:$this.position().left+$this.outerWidth()+parseInt($this.css("margin-left"))-$this.innerHeight(),top:$this.position().top+parseInt($this.css("margin-top"))+($this.outerHeight()-$this.innerHeight())/2,fontSize:($this.innerHeight()+parseInt($this.css("margin-top")))*.95,"line-height":"0px"})})}function geodir_search_expandmore(el){var moretext=jQuery.trim(jQuery(el).text());jQuery(el).closest("ul").find(".more").toggle("slow");if(moretext==geodir_advanced_search_js_msg.text_more){jQuery(el).text(geodir_advanced_search_js_msg.text_less)}else{jQuery(el).text(geodir_advanced_search_js_msg.text_more)}}jQuery&&function(t){function o(o,d){var n=o?t(this):d,a=t(n.attr("data-dropdown")),s=n.hasClass("dropdown-open");if(o){if(t(o.target).hasClass("dropdown-ignore"))return;o.preventDefault(),o.stopPropagation()}else if(n!==d.target&&t(d.target).hasClass("dropdown-ignore"))return;r(),s||n.hasClass("dropdown-disabled")||(n.addClass("dropdown-open"),a.data("dropdown-trigger",n).show(),e(),a.trigger("show",{dropdown:a,trigger:n}))}function r(o){var r=o?t(o.target).parents().addBack():null;if(r&&r.is("div.gd-dropdown")){if(!r.is(".dropdown-menu"))return;if(!r.is("A"))return}t(document).find("div.gd-dropdown:visible").each(function(){var o=t(this);o.hide().removeData("dropdown-trigger").trigger("hide",{dropdown:o})}),t(document).find(".dropdown-open").removeClass("dropdown-open")}function e(){var o=t(".gd-dropdown:visible").eq(0),r=o.data("dropdown-trigger"),e=r?parseInt(r.attr("data-horizontal-offset")||0,10):null,d=r?parseInt(r.attr("data-vertical-offset")||0,10):null;0!==o.length&&r&&o.css(o.hasClass("dropdown-relative")?{left:o.hasClass("dropdown-anchor-right")?r.position().left-(o.outerWidth(!0)-r.outerWidth(!0))-parseInt(r.css("margin-right"),10)+e:r.position().left+parseInt(r.css("margin-left"),10)+e,top:r.position().top+r.outerHeight(!0)-parseInt(r.css("margin-top"),10)+d}:{left:o.hasClass("dropdown-anchor-right")?r.offset().left-(o.outerWidth()-r.outerWidth())+e:r.offset().left+e,top:r.offset().top+r.outerHeight()+d})}t.extend(t.fn,{dropdown:function(e,d){switch(e){case"show":return o(null,t(this)),t(this);case"hide":return r(),t(this);case"attach":return t(this).attr("data-dropdown",d);case"detach":return r(),t(this).removeAttr("data-dropdown");case"disable":return t(this).addClass("dropdown-disabled");case"enable":return r(),t(this).removeClass("dropdown-disabled")}}}),t(document).on("click.dropdown","[data-dropdown]",o),t(document).on("click.dropdown",r),t(window).on("resize",e)}(jQuery); 15 16 17function delete_rec(claimid, nonce) 18{ 19 if(confirm(geodir_claim_all_js_msg.geodir_want_to_delete_claim)) 20 { 21 window.location.href=geodir_claim_all_js_msg.geodir_claim_admin_ajax_url+"?action=geodir_claim_aja
21x_action&manage_action=true&pagetype=delete&id="+claimid+'&_wpnonce='+nonce; 22 return true; 23 }else 24 { 25 return false; 26 } 27} 28 29function approve_rec(claimid, nonce) 30{ 31 if(confirm(geodir_claim_all_js_msg.geodir_want_to_approve_claim)) 32 { 33 window.location.href=geodir_claim_all_js_msg.geodir_claim_admin_ajax_url+"?action=geodir_claim_ajax_action&manage_action=true&pagetype=approve&id="+claimid+'&_wpnonce='+nonce; 34 return true; 35 }else 36 { 37 return false; 38 } 39} 40 41function reject_rec(claimid, nonce) 42{ 43 if(confirm(geodir_claim_all_js_msg.geodir_want_to_reject_claim)) 44 { 45 window.location.href=geodir_claim_all_js_msg.geodir_claim_admin_ajax_url+"?action=geodir_claim_ajax_action&manage_action=true&pagetype=reject&id="+claimid+'&_wpnonce='+nonce; 46 return true; 47 }else 48 { 49 return false; 50 } 51} 52 53function undo_rec(claimid, nonce) 54{ 55 if(confirm(geodir_claim_all_js_msg.geodir_want_to_undo_claim)) 56 { 57 window.location.href=geodir_claim_all_js_msg.geodir_claim_admin_ajax_url+"?action=geodir_claim_ajax_action&manage_action=true&pagetype=undo&id="+claimid+'&_wpnonce='+nonce; 58 return true; 59 }else 60 { 61 return false; 62 } 63} 64 65function geodir_claimtoggle() { 66 var ele = document.getElementById("gd-claimtoggleText"); 67 var text = document.getElementById("gd-claimdisplayText"); 68 69 if(ele.style.display == "block" || ele.style.display == "" ) { 70 jQuery("#gd-claimtoggleText").hide('slow'); 71 text.innerHTML = geodir_claim_all_js_msg.geodir_what_is_claim_process; 72 } 73 if(ele.style.display == "none") { 74 jQuery("#gd-claimtoggleText").show('slow'); 75 text.innerHTML = geodir_claim_all_js_msg.geodir_claim_process_hide; 76 } 77} 78 79 80/* --- geodir claim popup script --- */ 81 82function geodir_get_claim_popup_forms(e, clk_class, popup_id){ 83 84 var ajax_url =geodir_claim_all_js_msg.geodir_claim_admin_ajax_url_form; 85 var post_id = jQuery('input[name="geodir_claim_popup_post_id"]').val() 86 87 var append_class = jQuery('.'+clk_class).closest('.geodir-company_info'); 88 89 jQuery.gdmodal('<div id="basic-modal-content" class="clearfix simplemodal-data" style="display: block;"><div class="geodir-modal-loading"><i class="fa fa-refresh fa-spin "></div></div>');// show popup right away 90 91 jQuery.post( ajax_url, { popuptype: clk_class, post_id: post_id }) 92 .done(function( data ) { 93 94 append_class.find('.geodir_display_claim_popup_forms').append(data); 95 e.preventDefault(); 96 jQuery.gdmodal.close();// close popup and show new one with new data, will be so fast user will not see it 97 jQuery('#'+popup_id).gdmodal({ 98 persist:true, 99 onClose: function(){ 100 jQuery.gdmodal.close({ 101 overlayClose:true 102 }); 103 append_class.find('.geodir_display_claim_popup_forms').html(''); 104 }, 105 }); 106 107 }); 108 109} 110 111jQuery(document).ready(function(){ 112 113 var geodir_popup_claim_timer; 114 115 jQuery('a.geodir_claim_enable').click(function (e) { 116 117 geodir_get_claim_popup_forms(e, 'geodir_claim_enable', 'gd-basic-modal-content4'); 118 119 120 }); 121 122}); 123 124 125function geodir_claim_popup_validate_field(field){ 126 127 var is_error = true; 128 erro_msg = ''; 129 switch( jQuery(field).attr('field_type') ) 130 { 131 132 case 'email': 133 var filter = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; 134 135 if (field.value == '') { 136 erro_msg = geodir_claim_all_js_msg.geodir_claim_field_id_required; 137 } 138 139 if (field.value != '' && !filter.test(field.value)) { 140 erro_msg = geodir_claim_all_js_msg.geodir_claim_valid_email_address_msg; 141 } 142 143 if (field.value != '' && filter.test(field.value)) { 144 is_error = false; 145 } 146 break; 147 case 'text': 148 case 'textarea': 149 if(field.value != '') 150 { is_error = false; }else{erro_msg = geodir_claim_all_js_msg.geodir_claim_field_id_required;} 151 break; 152 } 153 154 if(is_error) 155 { 156 if(erro_msg) 157 {jQuery(field).closest('div').find('span.message_error2').html(erro_msg)} 158 159 jQuery(field).closest('div').find('span.message_error2').fadeIn(); 160 161 return false; 162 }else 163 { 164 165 jQuery(field).closest('div').find('span.message_error2').html(''); 166 jQuery(field).closest('div').find('span.message_error2').fadeOut(); 167 168 return true; 169 } 170} 171 172 173jQuery(document).ready(function(){ 174 175 jQuery(document).delegate("#geodir_claim_form .is_required:visible", "blur", function(ele){ 176 177 geodir_claim_popup_validate_field(this); 178 179 }); 180 181 182 jQuery(document).delegate("#geodir_claim_form", "submit", function(ele){ 183 184 var claim_popup_is_validate = true; 185 186 jQuery(this).find(".is_required:visible").each(function(){ 187 188 if(!geodir_claim_popup_validate_field( this )) 189 claim_popup_is_validate = geodir_claim_popup_validate_field( this ); 190
191 }); 192 193 if(claim_popup_is_validate){ 194 return true; 195 }else{ 196 return false; 197 } 198 199 }); 200 201}); 202 203function gd_claim_change_pmethod(el, keys) { 204 var method = jQuery(el).val(); 205 206 if (keys && typeof keys == 'object') { 207 for(i=0; i < keys.length; i++) { 208 if (jQuery('#'+keys[i]+'options').is(':visible') && keys[i] != method) { 209 jQuery('#'+keys[i]+'options').hide(); 210 } 211 } 212 if (!jQuery('#'+method+'options').is(':visible')) { 213 jQuery('#'+method+'options').show(); 214 215 if (jQuery('#'+method+'options').length) { 216 jQuery('input[type="text"]', '#'+method+'options').each(function(){ 217 jQuery(this).attr('field_type', 'text').addClass('is_required'); 218 if (!jQuery('#'+jQuery(this).attr('name')+'Info.message_error2').length) { 219 jQuery(this).after('<span class="message_error2" id="'+jQuery(this).attr('name')+'Info"></span>'); 220 } 221 }); 222 jQuery('textarea', '#'+method+'options').each(function(){ 223 jQuery(this).attr('field_type', 'textarea').addClass('is_required'); 224 if (!jQuery('#'+jQuery(this).attr('name')+'Info.message_error2').length) { 225 jQuery(this).after('<span class="message_error2" id="'+jQuery(this).attr('name')+'Info"></span>'); 226 } 227 }); 228 jQuery('select', '#'+method+'options').each(function(){ 229 jQuery(this).attr('field_type', 'text').addClass('is_required'); 230 if (!jQuery('#'+jQuery(this).attr('name')+'Info.message_error2').length) { 231 jQuery(this).after('<span class="message_error2" id="'+jQuery(this).attr('name')+'Info"></span>'); 232 } 233 }); 234 } 235 } 236 } 237} 238 239 240/* <![CDATA[ */ 241var geodir_var = {"siteurl":"https:\/\/de.hostelman.com","geodir_plugin_url":"https:\/\/de.hostelman.com\/wp-content\/plugins\/geodirectory","geodir_lazy_load":"0","geodir_ajax_url":"https:\/\/de.hostelman.com\/wp-admin\/admin-ajax.php?action=geodir_ajax_action","geodir_gd_modal":"0","is_rtl":"0","as_min_char":"2"}; 242/* ]]> */ 243 244var gdUrlParam=function gdUrlParam(sParam){var sPageURL=decodeURIComponent(window.location.search.substring(1)),sURLVariables=sPageURL.split("&"),sParameterName,i;for(i=0;i<sURLVariables.length;i++){sParameterName=sURLVariables[i].split("=");if(sParameterName[0]===sParam){return sParameterName[1]===undefined?true:sParameterName[1]}}};jQuery.fn.gdunveil=function(threshold,callback,extra1){var $w=jQuery(window),th=threshold||0,retina=window.devicePixelRatio>1,attrib=retina?"data-src-retina":"data-src",images=this,loaded;if(extra1){var $e1=jQuery(extra1),th=threshold||0,retina=window.devicePixelRatio>1,attrib=retina?"data-src-retina":"data-src",images=this,loaded}this.one("gdunveil",function(){var source=this.getAttribute(attrib);source=source||this.getAttribute("data-src");if(source){jQuery(this).css("background-image",'url("'+source+'")');if(typeof callback==="function")callback.call(this)}});function gdunveil(){var inview=images.filter(function(){var $e=jQuery(this);if($e.is(":hidden"))return;var wt=$w.scrollTop(),wb=wt+$w.height(),et=$e.offset().top,eb=et+$e.height();return eb>=wt-th&&et<=wb+th});loaded=inview.trigger("gdunveil");images=images.not(loaded)}$w.on("scroll.gdunveil resize.gdunveil lookup.gdunveil",gdunveil);if(extra1){$e1.on("scroll.gdunveil resize.gdunveil lookup.gdunveil",gdunveil)}gdunveil();return this};function geodir_init_lazy_load(){jQuery(".geodir_thumbnail").gdunveil(100,function(){this.style.opacity=1},"#geodir_content");jQuery("#gd-tabs").click(function(){setTimeout(function(){jQuery(window).trigger("lookup")},100)});jQuery(document).ready(function(){setTimeout(function(){jQuery(window).trigger("lookup")},100)})}jQuery(function(){if(geodir_var.geodir_lazy_load==1){geodir_init_lazy_load()}});(function(t){"use strict";function e(t,e,r){return t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent?t.attachEvent("on"+e,r):void 0}function r(t,e){var r,n;for(r=0,n=t.length;n>r;r++)if(t[r]===e)return!0;return!1}function n(t,e){var r;t.createTextRange?(r=t.createTextRange(),r.move("character",e),r.select()):t.selectionStart&&(t.focus(),t.setSelectionRange(e,e))}function a(t,e){try{return t.type=e,!0}catch(r){return!1}}t.Placeholders={Utils:{addEventListener:e,inArray:r,moveCaret:n,changeType:a}}})(this),function(t){"use strict";function e(){}function r(){try{return document.activeElement}catch(t){}}function n(t,e){var r,n,a=!!e&&t.value!==e,u=t.value===t.getAttribute(V);return(a||u)&&"true"===t.getAttribute(D)?(t.removeAttribute(D),t.value=t.value.replace(t.getAttribute(V),""),t.className=t.className.replace(R,""),n=t.getAttribute(F),parseInt(n,10)>
244=0&&(t.setAttribute("maxLength",n),t.removeAttribute(F)),r=t.getAttribute(P),r&&(t.type=r),!0):!1}function a(t){var e,r,n=t.getAttribute(V);return""===t.value&&n?(t.setAttribute(D,"true"),t.value=n,t.className+=" "+I,r=t.getAttribute(F),r||(t.setAttribute(F,t.maxLength),t.removeAttribute("maxLength")),e=t.getAttribute(P),e?t.type="text":"password"===t.type&&M.changeType(t,"text")&&t.setAttribute(P,"password"),!0):!1}function u(t,e){var r,n,a,u,i,l,o;if(t&&t.getAttribute(V))e(t);else for(a=t?t.getElementsByTagName("input"):b,u=t?t.getElementsByTagName("textarea"):f,r=a?a.length:0,n=u?u.length:0,o=0,l=r+n;l>o;o++)i=r>o?a[o]:u[o-r],e(i)}function i(t){u(t,n)}function l(t){u(t,a)}function o(t){return function(){m&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(D)?M.moveCaret(t,0):n(t)}}function c(t){return function(){a(t)}}function s(t){return function(e){return A=t.value,"true"===t.getAttribute(D)&&A===t.getAttribute(V)&&M.inArray(C,e.keyCode)?(e.preventDefault&&e.preventDefault(),!1):void 0}}function d(t){return function(){n(t,A),""===t.value&&(t.blur(),M.moveCaret(t,0))}}function g(t){return function(){t===r()&&t.value===t.getAttribute(V)&&"true"===t.getAttribute(D)&&M.moveCaret(t,0)}}function v(t){return function(){i(t)}}function p(t){t.form&&(T=t.form,"string"==typeof T&&(T=document.getElementById(T)),T.getAttribute(U)||(M.addEventListener(T,"submit",v(T)),T.setAttribute(U,"true"))),M.addEventListener(t,"focus",o(t)),M.addEventListener(t,"blur",c(t)),m&&(M.addEventListener(t,"keydown",s(t)),M.addEventListener(t,"keyup",d(t)),M.addEventListener(t,"click",g(t))),t.setAttribute(j,"true"),t.setAttribute(V,x),(m||t!==r())&&a(t)}var b,f,m,h,A,y,E,x,L,T,N,S,w,B=["text","search","url","tel","email","password","number","textarea"],C=[27,33,34,35,36,37,38,39,40,8,46],k="#ccc",I="placeholdersjs",R=RegExp("(?:^|\\s)"+I+"(?!\\S)"),V="data-placeholder-value",D="data-placeholder-active",P="data-placeholder-type",U="data-placeholder-submit",j="data-placeholder-bound",q="data-placeholder-focus",z="data-placeholder-live",F="data-placeholder-maxlength",G=document.createElement("input"),H=document.getElementsByTagName("head")[0],J=document.documentElement,K=t.Placeholders,M=K.Utils;if(K.nativeSupport=void 0!==G.placeholder,!K.nativeSupport){for(b=document.getElementsByTagName("input"),f=document.getElementsByTagName("textarea"),m="false"===J.getAttribute(q),h="false"!==J.getAttribute(z),y=document.createElement("style"),y.type="text/css",E=document.createTextNode("."+I+" { color:"+k+"; }"),y.styleSheet?y.styleSheet.cssText=E.nodeValue:y.appendChild(E),H.insertBefore(y,H.firstChild),w=0,S=b.length+f.length;S>w;w++)N=b.length>w?b[w]:f[w-b.length],x=N.attributes.placeholder,x&&(x=x.nodeValue,x&&M.inArray(B,N.type)&&p(N));L=setInterval(function(){for(w=0,S=b.length+f.length;S>w;w++)N=b.length>w?b[w]:f[w-b.length],x=N.attributes.placeholder,x?(x=x.nodeValue,x&&M.inArray(B,N.type)&&(N.getAttribute(j)||p(N),(x!==N.getAttribute(V)||"password"===N.type&&!N.getAttribute(P))&&("password"===N.type&&!N.getAttribute(P)&&M.changeType(N,"text")&&N.setAttribute(P,"password"),N.value===N.getAttribute(V)&&(N.value=x),N.setAttribute(V,x)))):N.getAttribute(D)&&(n(N),N.removeAttribute(V));h||clearInterval(L)},100)}M.addEventListener(t,"beforeunload",function(){K.disable()}),K.disable=K.nativeSupport?e:i,K.enable=K.nativeSupport?e:l}(this);jQuery(document).ready(function($){jQuery("#geodir-tab-mobile-menu").click(function(){jQuery("#gd-tabs .geodir-tab-head").toggle()});gd_infowindow=typeof google!=="undefined"&&typeof google.maps!=="undefined"?new google.maps.InfoWindow:null;if(jQuery("select.chosen_select").length>0){jQuery("select.chosen_select").chosen({no_results_text:"Sorry, nothing found!"});jQuery("select.chosen_select_nostd").chosen({allow_single_deselect:"true"})}jQuery('.gd-cats-display-checkbox input[type="checkbox"]').click(function(){var isChecked=jQuery(this).is(":checked");if(!isChecked){var chkVal=jQuery(this).val();jQuery(this).closest(".gd-parent-cats-list").find(".gd-cat-row-"+chkVal+' input[type="checkbox"]').prop("checked",isChecked)}});jQuery(".geodir-delete").click(function(){var message=geodir_all_js_msg.my_place_listing_del;if(jQuery(this).closest(".geodir-gridview").hasClass("gdp-franchise-m")||jQuery(this).closest(".geodir-listview").hasClass("gdp-franchise-m")){message=geodir_all_js_msg.my_main_listing_del}if(confirm(message)){return true}else{return false}});jQuery(".gd-category-dd").hover(function(){jQuery(".gd-category-dd ul").show()});jQuery(".gd-category-dd ul li a").click(function(ele){jQuery(".gd-category-dd").find("input").val(jQuery(this).attr("data-slug"));jQuery(".gd-category-dd > a").html(jQuery(this).attr("data-name"));jQuery(".gd-category-dd ul").hide()});geodir_setup_search_form()});jQuery(window).load(function(){jQuery(".geodir-tabs-content").show();tabNoRun=false;function activateTab(tab){if(!jQuery(".geodir-tab-head").length){return}tabName=urlHash=tab.find("a").html();if(tabName&&jQuery(".geodir-mobile-active-tab").length){jQuery(".geodir-mobile-active-tab").html(tabName)}if(tabNoRun){tabNoRun=false;return}var activeTab=tab.closest("dl").find("dd.geodir-tab-active"),contentLocation=tab.find("a").attr("data-tab")+"Tab";urlHash=tab.find("a").attr("data-tab");if(jQuery(tab).hasClass("geodir-tab-active")){}else{if(typeof urlHash==="undefined"){if(window.location.hash.substring(0,8)=="#comment"){tab=jQuery('*[data-tab="#reviews"]').parent();tabNoRun=true}}else{if(history.pushState){history.replaceState(null,null,urlHash)}else{window.location.hash=urlHash}}}activeTab.removeClass("geodir-tab-active");tab.addClass("geodir-tab-active");jQuery(contentLocation).closest(".geodir-tabs-content").children("li").hide();jQuery(contentLocation).fadeIn();jQuery(contentLocation).css({display:"inline-block"});if(urlHash=="#post_map"&&window.gdMaps){window.setTimeout(function(){jQuery("#detail_page_map_canvas").goMap();var center=jQuery.goMap.map.getCenter();if(window.gdMaps=="osm"){jQuery.goMap.map.invalidateSize();jQuery.goMap.map._onResize();jQuery.goMap.map.panTo(center)}else{google.maps.event.trigger(jQuery.goMap.map,"resize");jQuery.goMap.map.setCenter(center)}},100)}if(history.pushState&&window.location.hash&&jQuery("#publish_listing").length===0){if(jQuery(window).width()<1060){jQuery("#gd-tabs .geodir-tab-head").toggle();jQuery("html, body").animate({scrollTop:jQuery("#geodir-tab-mobile-menu").offset().top},500)}}}jQuery("dl.geodir-tab-head").each(function(){var tabs=jQuery(this).children("dd");tabs.click(function(e){if(jQuery(this).find("a").attr("data-status")=="enable"){activateTab(jQuery(this))}})});if(window.location.hash){activateTab(jQuery('a[data-tab="'+window.location.hash+'"]').parent())}
244jQuery(".gd-tabs .gd-tab-next").click(function(ele){var is_validate=true;if(is_validate){var tab=jQuery("dl.geodir-tab-head").find("dd.geodir-tab-active").next();if(tab.find("a").attr("data-status")=="enable"){activateTab(tab)}if(!jQuery("dl.geodir-tab-head").find("dd.geodir-tab-active").next().is("dd")){jQuery(this).hide();jQuery("#gd-add-listing-submit").show()}}});jQuery("#gd-login-options input").change(function(){jQuery(".gd-login_submit").toggle()});jQuery("ul.geodir-tabs-content").css({"z-index":"0",position:"relative"});jQuery("dl.geodir-tab-head dd.geodir-tab-active").trigger("click")});function autofill_click(ele){var fill_value=jQuery(ele).html();jQuery(ele).closest("div.gd-autofill-dl").closest("div.gd-autofill").find("input[type=text]").val(fill_value);jQuery(ele).closest(".gd-autofill-dl").remove()}jQuery(document).ready(function(){jQuery("input[type=text]").keyup(function(){var input_field=jQuery(this);if(input_field.attr("data-type")=="autofill"&&input_field.attr("data-fill")!=""){var data_fill=input_field.attr("data-fill");var fill_value=jQuery(this).val();jQuery.get(geodir_var.geodir_ajax_url,{autofill:data_fill,fill_str:fill_value},function(data){if(data!=""){if(input_field.closest("div.gd-autofill").length==0)input_field.wrap('<div class="gd-autofill"></div>');input_field.closest("div.gd-autofill").find(".gd-autofill-dl").remove();input_field.after('<div class="gd-autofill-dl"></div>');input_field.next(".gd-autofill-dl").html(data);input_field.focus()}})}});jQuery("input[type=text]").parent().mouseleave(function(){jQuery(this).find(".gd-autofill-dl").remove()});jQuery(".gd-trigger").click(function(){jQuery(this).toggleClass("active").next().slideToggle("slow");var aD=jQuery(this).toggleClass("active").next().hasClass("map_category")?true:false;if(jQuery(".gd-trigger").hasClass("gd-triggeroff")){jQuery(".gd-trigger").removeClass("gd-triggeroff");jQuery(".gd-trigger").addClass("gd-triggeron");if(aD){gd_compress_animate(this,0)}}else{jQuery(".gd-trigger").removeClass("gd-triggeron");jQuery(".gd-trigger").addClass("gd-triggeroff");if(aD){gd_compress_animate(this,parseFloat(jQuery(this).toggleClass("active").next().outerWidth()))}}});jQuery(".gd-trigger").each(function(){if(jQuery(this).hasClass("gd-triggeroff")&&jQuery(this).next().hasClass("map_category")){gd_compress_animate(this,parseFloat(jQuery(this).next().outerWidth()))}});jQuery(".trigger_sticky").click(function(){var effect="slide";var options={direction:"right"};var duration=500;var tigger_sticky=jQuery(this);tigger_sticky.hide();jQuery("div.stickymap").toggle(effect,options,duration,function(){tigger_sticky.show()});if(tigger_sticky.hasClass("triggeroff_sticky")){tigger_sticky.removeClass("triggeroff_sticky");tigger_sticky.addClass("triggeron_sticky");setCookie("geodir_stickystatus","shide",1)}else{tigger_sticky.removeClass("triggeron_sticky");tigger_sticky.addClass("triggeroff_sticky");setCookie("geodir_stickystatus","sshow",1)}});function gd_compress_animate(e,r){jQuery(e).animate({"margin-right":r+"px"},"fast")}var gd_modal="undefined"!=typeof geodir_var.geodir_gd_modal&&1==parseInt(geodir_var.geodir_gd_modal)?false:true;if(gd_modal){jQuery(".geodir-custom-post-gallery").each(function(){jQuery("a",this).lightBox({overlayOpacity:.5,imageLoading:geodir_var.geodir_plugin_url+"/geodirectory-assets/images/lightbox-ico-loading.gif",imageBtnNext:geodir_var.geodir_plugin_url+"/geodirectory-assets/images/lightbox-btn-next.gif",imageBtnPrev:geodir_var.geodir_plugin_url+"/geodirectory-assets/images/lightbox-btn-prev.gif",imageBtnClose:geodir_var.geodir_plugin_url+"/geodirectory-assets/images/lightbox-btn-close.gif",imageBlank:geodir_var.geodir_plugin_url+"/geodirectory-assets/images/lightbox-blank.gif"})})}jQuery(".gd_comment_replaylink a").bind("click",function(){jQuery("#commentform #err_no_rating").remove();jQuery("#commentform .gd_rating").hide();jQuery("#commentform .br-wrapper.br-theme-fontawesome-stars").hide();jQuery("#commentform #geodir_overallrating").val("0");jQuery("#respond .form-submit input#submit").val(geodir_all_js_msg.gd_cmt_btn_post_reply);jQuery("#respond .comment-form-comment label").html(geodir_all_js_msg.gd_cmt_btn_reply_text)});jQuery(".gd-cancel-replaylink a").bind("click",function(){jQuery("#commentform #err_no_rating").remove();jQuery("#commentform .gd_rating").show();jQuery("#commentform .br-wrapper.br-theme-fontawesome-stars").show();jQuery("#commentform #geodir_overallrating").val("0");jQuery("#respond .form-submit input#submit").val(geodir_all_js_msg.gd_cmt_btn_post_review);jQuery("#respond .comment-form-comment label").html(geodir_all_js_msg.gd_cmt_btn_review_text)});jQuery("#commentform .gd_rating, #commentform .gd-fa-rating").each(function(){var rat_obj=this;var $frm_obj=jQuery(rat_obj).closest("#commentform");if(parseInt($frm_obj.find("#comment_parent").val())>0){jQuery("#commentform #err_no_rating").remove();jQuery("#commentform .gd_rating").hide();jQuery("#respond .form-submit input#submit").val(geodir_all_js_msg.gd_cmt_btn_post_reply);jQuery("#respond .comment-form-comment label").html(geodir_all_js_msg.gd_cmt_btn_reply_text)}if(!geodir_all_js_msg.multirating){$frm_obj.find('input[name="submit"]').click(function(e){var $comment=jQuery('textarea[name="comment"]',$frm_obj);jQuery("#err_no_comment",$frm_obj).remove();$frm_obj.find("#err_no_rating").remove();var is_review=parseInt($frm_obj.find("#comment_parent").val());is_review=is_review==0?true:false;if(jQuery.trim($comment.val())==""){var $err=is_review?geodir_all_js_msg.err_empty_review:geodir_all_js_msg.err_empty_review;
244$comment.before('<div id="err_no_comment" class="err-no-rating">'+$err+"</div>");$comment.focus();return false}if(typeof geodir_all_js_msg.gd_cmt_disable_rating!="undefined"&&geodir_all_js_msg.gd_cmt_disable_rating){return true}if(is_review){var btn_obj=this;var invalid=0;$frm_obj.find("input[name^=geodir_overallrating]").each(function(){var star_obj=this;var star=parseInt(jQuery(star_obj).val());if(!star>0){invalid++}});if(invalid>0){jQuery(rat_obj).after('<div id="err_no_rating" class="err-no-rating">'+geodir_all_js_msg.gd_cmt_err_no_rating+"</div>");return false}return true}})}})});jQuery(window).load(function(){if(jQuery(".map_background").length==0){jQuery(".geodir-pinpoint").hide()}else{jQuery(".geodir-pinpoint").show()}});function geodir_get_post_term(el){limit=jQuery(el).data("limit");term=jQuery(el).val();var parent_only=parseInt(jQuery(el).data("parent"))>0?1:0;jQuery(el).parent().parent().find(".geodir-popular-cat-list").html('<i class="fa fa-cog fa-spin"></i>');jQuery(el).parent().parent().parent().find(".geodir-cat-list-more").hide();jQuery.post(geodir_all_js_msg.geodir_admin_ajax_url+"?action=geodir_ajax_action",{ajax_action:"geodir_get_term_list",term:term,limit:limit,parent_only:parent_only}).done(function(data){if(jQuery.trim(data)!=""){jQuery(el).parent().parent().find(".geodir-popular-cat-list").hide().html(data).fadeIn("slow");if(jQuery(el).parent().parent().find(".geodir-popular-cat-list li").length>limit){jQuery(el).parent().parent().parent().find(".geodir-cat-list-more").fadeIn("slow")}}})}jQuery(window).load(function(){geodir_resize_rating_stars();jQuery(document).on("click",".geodir-rating,.gd-star-rating",function(e){if(reviewLink=jQuery(this).closest(".geodir-category-listing").find("a.geodir-pcomments").attr("href")){window.location=reviewLink}else if(reviewLink=jQuery(this).closest(".gd-bubble").find("a.geodir-pcomments").attr("href")){window.location=reviewLink}});jQuery(".geodir-details-sidebar-rating").on("click",".geodir-rating,.gd-star-rating",function(e){jQuery('#gd-tabs [data-tab="#reviews"]').trigger("click");jQuery("html, body").animate({scrollTop:jQuery("#reviews-wrap").offset().top},500)})});jQuery(window).resize(function(){geodir_resize_rating_stars(true)});function geodir_resize_rating_stars(re){jQuery(".geodir-rating").each(function(){var $this=jQuery(this);var parent_width=$this.width();if(!parent_width){return true}var star_width=$this.find(".geodir_Star img").width();var star_count=$this.find(".geodir_Star img").length;var width_calc=star_width*star_count;width_calc=typeof re!="undefined"&&re?"auto":width_calc;$this.width(width_calc)})}function geodir_load_search_form(stype,el){var $adv_show=jQuery(el).closest(".geodir_advance_search_widget").attr("data-show-adv");jQuery.ajax({url:geodir_all_js_msg.geodir_admin_ajax_url,type:"POST",dataType:"html",data:{action:"geodir_search_form",stype:stype,adv:$adv_show},beforeSend:function(){geodir_search_wait(1)},success:function(data,textStatus,xhr){jQuery(el).closest(".geodir_advance_search_widget").html(data);geodir_setup_search_form();jQuery("body").trigger("geodir_setup_search_form");geodir_search_wait(0)},error:function(xhr,textStatus,errorThrown){console.log(textStatus);geodir_search_wait(0)}})}function geodir_setup_search_form(){if(jQuery(".search_by_post").val()){gd_s_post_type=jQuery(".search_by_post").val()}else{gd_s_post_type="gd_place"}setTimeout(function(){jQuery(".search_by_post").change(function(){gd_s_post_type=jQuery(this).val();geodir_load_search_form(gd_s_post_type,this)})},100)}gdSearchDoing=0;var gdNearChanged=0;gd_search_icon="";function geodir_search_wait(on){waitTime=300;if(on){if(gdSearchDoing){return}gdSearchDoing=1;jQuery(".geodir_submit_search").addClass("gd-wait-btnsearch").prop("disabled",true);jQuery(".showFilters").prop("disabled",true);searchPos=1;gd_search_icon=jQuery(".geodir_submit_search").html();function geodir_search_wait_animate(){if(!searchPos){return}if(searchPos==1){jQuery('input[type="button"].geodir_submit_search').val("ï ï ï");searchPos=2;window.setTimeout(geodir_search_wait_animate,waitTime);return}if(searchPos==2){jQuery('input[type="button"].geodir_submit_search').val("ï ï ï");searchPos=3;window.setTimeout(geodir_search_wait_animate,waitTime);return}if(searchPos==3){jQuery('input[type="button"].geodir_submit_search').val("ï ï ï");searchPos=1;window.setTimeout(geodir_search_wait_animate,waitTime);return}}geodir_search_wait_animate();jQuery("button.geodir_submit_search").html('<i class="fa fa-hourglass fa-spin" aria-hidden="true"></i>')}else{searchPos=0;gdSearchDoing=0;jQuery(".geodir_submit_search").removeClass("gd-wait-btnsearch").prop("disabled",fal
244se);jQuery(".showFilters").prop("disabled",false);jQuery('input[type="button"].geodir_submit_search').val(gdsText);jQuery("button.geodir_submit_search").html(gd_search_icon)}} 245 246!function(t,e,i){function n(){var e=t.L;o.noConflict=function(){return t.L=e,this},t.L=o}var o={version:"1.0.0-rc.3"};"object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),"undefined"!=typeof t&&n(),o.Util={extend:function(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++){o=arguments[i];for(e in o)t[e]=o[e]}return t},create:Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}(),bind:function(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}},stamp:function(t){return t._leaflet_id=t._leaflet_id||++o.Util.lastId,t._leaflet_id},lastId:0,throttle:function(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)}},wrapNum:function(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){t.hasOwnProperty("options")||(t.options=t.options?o.Util.create(t.options):{});for(var i in e)t.options[i]=e[i];return t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&e.indexOf("?")!==-1?"&":"?")+n.join("&")},template:function(t,e){return t.replace(o.Util.templateRe,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},templateRe:/\{ *([\w_\-]+) *\}/g,isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},indexOf:function(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){return t["webkit"+e]||t["moz"+e]||t["ms"+e]}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,r=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,r){return r&&s===i?void e.call(n):s.call(t,o.bind(e,n))},o.Util.cancelAnimFrame=function(e){e&&r.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,n=o.Util.create(i);n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);return t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),n.options&&(t.options=o.Util.extend(o.Util.create(n.options),t.options)),o.extend(n,t),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;t<e;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){return o.extend(this.prototype,t),this},o.Class.mergeOptions=function(t){return o.extend(this.prototype.options,t),this},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},o.Evented=o.Class.extend({on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else{t=o.Util.splitWords(t);for(var s=0,r=t.length;s<r;s++)this._on(t[s],e,i)}return this}
246,off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=o.Util.splitWords(t);for(var s=0,r=t.length;s<r;s++)this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var o=this._events[t];o||(o={listeners:[],count:0},this._events[t]=o),n===this&&(n=i);for(var s={fn:e,ctx:n},r=o.listeners,a=0,h=r.length;a<h;a++)if(r[a].fn===e&&r[a].ctx===n)return;r.push(s),o.count++},_off:function(t,e,n){var s,r,a,h;if(this._events&&(s=this._events[t])){if(r=s.listeners,!e){for(a=0,h=r.length;a<h;a++)r[a].fn=o.Util.falseFn;return void delete this._events[t]}if(n===this&&(n=i),r)for(a=0,h=r.length;a<h;a++){var l=r[a];if(l.ctx===n&&l.fn===e)return l.fn=o.Util.falseFn,s.count--,this._isFiring&&(r=r.slice()),void r.splice(a,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=o.Util.extend({},e,{type:t,target:this});if(this._events){var s=this._events[t];if(s){this._isFiring=!0;for(var r=s.listeners,a=0,h=r.length;a<h;a++){var l=r[a];l.fn.call(l.ctx||this,n)}this._isFiring=!1}}return i&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.count)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var s=o.bind(function(){this.off(t,e,i).off(t,s,i)},this);return this.on(t,e,i).on(t,s,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o.stamp(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o.stamp(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,o.extend({layer:t.target},t),!0)}});var s=o.Evented.prototype;s.addEventListener=s.on,s.removeEventListener=s.clearAllEventListeners=s.off,s.addOneTimeEventListener=s.once,s.fireEvent=s.fire,s.hasEventListeners=s.listens,o.Mixin={Events:s},function(){var i=navigator.userAgent.toLowerCase(),n=e.documentElement,s="ActiveXObject"in t,r=i.indexOf("webkit")!==-1,a=i.indexOf("phantom")!==-1,h=i.search("android [23]")!==-1,l=i.indexOf("chrome")!==-1,u=i.indexOf("gecko")!==-1&&!r&&!t.opera&&!s,c=0===navigator.platform.indexOf("Win"),d="undefined"!=typeof orientation||i.indexOf("mobile")!==-1,_=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent||_,p=s&&"transition"in n.style,f="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!h,g="MozPerspective"in n.style,v="OTransition"in n.style,y=!t.L_NO_TOUCH&&(m||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:s,ielt9:s&&!e.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in e),webkit:r,gecko:u,android:i.indexOf("android")!==-1,android23:h,chrome:l,safari:!l&&i.indexOf("safari")!==-1,win:c,ie3d:p,webkit3d:f,gecko3d:g,opera12:v,any3d:!t.L_DISABLE_3D&&(p||f||g)&&!v&&!a,mobile:d,mobileWebkit:d&&r,mobileWebkit3d:d&&f,mobileOpera:d&&t.opera,mobileGecko:d&&u,touch:!!y,msPointer:!!_,pointer:!!m,retina:(t.devicePixelRatio||t.screen.deviceXDPI/t.screen.logicalXDPI)>1}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new o.Point(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new o.Point(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}
246,toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new o.Point(t.x,t.y):new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,r=s.x>=e.x&&n.x<=i.x,a=s.y>=e.y&&n.y<=i.y;return r&&a},overlaps:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,r=s.x>e.x&&n.x<i.x,a=s.y>e.y&&n.y<i.y;return r&&a},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},create:function(t,i,n){var o=e.createElement(t);return o.className=i||"",n&&n.appendChild(o),o},remove:function(t){var e=t.parentNode;e&&e.removeChild(t)},empty:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},toFront:function(t){t.parentNode.appendChild(t)},toBack:function(t){var e=t.parentNode;e.insertBefore(t,e.firstChild)},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil.getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,r=n.length;s<r;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var a=o.DomUtil.getClass(t);o.DomUtil.setClass(t,(a?a+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil.setClass(t,o.Util.trim((" "+o.DomUtil.getClass(t)+" ").replace(" "+e+" "," ")))},setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&o.DomUtil._setOpacityIE(t,e)},_setOpacityIE:function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},setTransform:function(t,e,i){var n=e||new o.Point(0,0);t.style[o.DomUtil.TRANSFORM]=(o.Browser.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")},setPosition:function(t,e){t._leaflet_pos=e,o.Browser.any3d?o.DomUtil.setTransform(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos||new o.Point(0,0)}},function(){o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]);var i=o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);if(o.DomUtil.TRANSITION_END="webkitTransition"===i||"OTransition"===i?i+"End":"transitionend","onselectstart"in e)o.DomUtil.disableTextSelection=function(){o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault)},o.DomUtil.enableTextSelection=function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault)};else{var n=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);
246o.DomUtil.disableTextSelection=function(){if(n){var t=e.documentElement.style;this._userSelect=t[n],t[n]="none"}},o.DomUtil.enableTextSelection=function(){n&&(e.documentElement.style[n]=this._userSelect,delete this._userSelect)}}o.DomUtil.disableImageDrag=function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},o.DomUtil.enableImageDrag=function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)},o.DomUtil.preventOutline=function(e){for(;e.tabIndex===-1;)e=e.parentNode;e&&e.style&&(o.DomUtil.restoreOutline(),this._outlineElement=e,this._outlineStyle=e.style.outline,e.style.outline="none",o.DomEvent.on(t,"keydown",o.DomUtil.restoreOutline,this))},o.DomUtil.restoreOutline=function(){this._outlineElement&&(this._outlineElement.style.outline=this._outlineStyle,delete this._outlineElement,delete this._outlineStyle,o.DomEvent.off(t,"keydown",o.DomUtil.restoreOutline,this))}}(),o.LatLng=function(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,n!==i&&(this.alt=+n)},o.LatLng.prototype={equals:function(t,e){if(!t)return!1;t=o.latLng(t);var n=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return n<=(e===i?1e-9:e)},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){return o.CRS.Earth.distance(this,o.latLng(t))},wrap:function(){return o.CRS.Earth.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return o.latLngBounds([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new o.LatLng(this.lat,this.lng,this.alt)}},o.latLng=function(t,e,n){return t instanceof o.LatLng?t:o.Util.isArray(t)&&"object"!=typeof t[0]?3===t.length?new o.LatLng(t[0],t[1],t[2]):2===t.length?new o.LatLng(t[0],t[1]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===i?null:new o.LatLng(t,e,n)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){var e,i,n=this._southWest,s=this._northEast;if(t instanceof o.LatLng)e=t,i=t;else{if(!(t instanceof o.LatLngBounds))return t?this.extend(o.latLng(t)||o.latLngBounds(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||s?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),s.lat=Math.max(i.lat,s.lat),s.lng=Math.max(i.lng,s.lng)):(this._southWest=new o.LatLng(e.lat,e.lng),this._northEast=new o.LatLng(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;
246return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>=e.lat&&n.lat<=i.lat,a=s.lng>=e.lng&&n.lng<=i.lng;return r&&a},overlaps:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>e.lat&&n.lat<i.lat,a=s.lng>e.lng&&n.lng<i.lng;return r&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return!!t&&(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast()))},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)},bounds:o.bounds([-180,-90],[180,90])},o.Projection.SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=Math.sin(n*e);return new o.Point(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new o.LatLng((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return o.bounds([-t,-t],[t,t])}()},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t),n=this.transformation.transform(e.min,i),s=this.transformation.transform(e.max,i);return o.bounds(n,s)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?o.Util.wrapNum(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?o.Util.wrapNum(t.lat,this.wrapLat,!0):t.lat,n=t.alt;return o.latLng(i,e,n)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0}),o.CRS.Earth=o.extend({},o.CRS,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin(n)*Math.sin(o)+Math.cos(n)*Math.cos(o)*Math.cos((e.lng-t.lng)*i);return this.R*Math.acos(Math.min(s,1))}}),o.CRS.EPSG3857=o.extend({},o.CRS.Earth,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:function(){var t=.5/(Math.PI*o.Projection.SphericalMercator.R);return new o.Transformation(t,.5,-t,.5)}()}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS.Earth,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/180,1,-1/180,.5)}),o.Map=o.Evented.extend({options:{crs:o.CRS.EPSG3857,center:i,zoom:i,minZoom:i,maxZoom:i,layers:[],maxBounds:i,renderer:i,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==i&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._addLayers(this.options.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(o.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(o.Browser.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)}
246,setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),r=t instanceof o.Point?t:this.latLngToContainerPoint(t),a=r.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(a));return this.setView(h,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s;var r=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(a.add(h).divideBy(2).add(r),s);return{center:l,zoom:s}},fitBounds:function(t,e){if(t=o.latLngBounds(t),!t.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),t.isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){return this.options.minZoom=t,this._loaded&&this.getZoom()<this.options.minZoom?this.setZoom(t):this},setMaxZoom:function(t){return this.options.maxZoom=t,this._loaded&&this.getZoom()>this.options.maxZoom?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,o.latLngBounds(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),r=n.subtract(s);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._initEvents(!0);try{delete this._container._leaflet}catch(t){this._container._leaflet=i}o.DomUtil.remove(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload");for(var e in this._layers)this._layers[e].remove();return this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=o.DomUtil.create("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t),i=o.point(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),h=t.getSouthEast(),l=this.getSize().subtract(i),u=this.project(h,n).subtract(this.project(a,n)),c=o.Browser.any3d?this.options.zoomSnap:1,d=Math.min(l.x/u.x,l.y/u.y);return n=this.getScaleZoom(d,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(s,Math.min(r,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new o.Bounds(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===i?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=e===i?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;return e=e===i?this._zoom:e,n.zoom(t*n.scale(e))},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(o.latLng(t))},distance:function(t,e){return this.options.crs.distance(o.latLng(t),o.latLng(e))},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");o.DomEvent.addListener(e,"scroll",this._onScroll,this),e._leaflet=!0},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&o.Browser.any3d,o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(o.Browser.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),o.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){o.DomUtil.setPosition(this._mapPane,new o.Point(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,e,n){e===i&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")}
246,_stop:function(){return o.Util.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){this._targets={},this._targets[o.stamp(this._container)]=this;var i=e?"off":"on";o.DomEvent[i](this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&o.DomEvent[i](t,"resize",this._onResize,this),o.Browser.any3d&&this.options.transform3DLimit&&this[i]("moveend",this._onMoveEnd)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],s="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if(i=this._targets[o.stamp(r)],i&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(s&&!o.DomEvent._isExternalTarget(r,t))break;if(n.push(i),s)break}if(r===this._container)break;r=r.parentNode}return n.length||a||s||!o.DomEvent._isExternalTarget(r,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e="keypress"===t.type&&13===t.keyCode?"click":t.type;"mousedown"===e&&o.DomUtil.preventOutline(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_fireDOMEvent:function(t,e,i){if("click"===t.type){var n=o.Util.extend({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e)),i.length)){var s=i[0];"contextmenu"===e&&s.listens(e,!0)&&o.DomEvent.preventDefault(t);var r={originalEvent:t};if("keypress"!==t.type){var a=s instanceof o.Marker;r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var h=0;h<i.length;h++)if(i[h].fire(e,r,!0),r.originalEvent._stopped||i[h].options.nonBubblingEvents&&o.Util.indexOf(i[h].options.nonBubblingEvents,e)!==-1)return; 247}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)||new o.Point(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var n=t&&e!==i?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return n.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),r=new o.Bounds(n.subtract(s),n.add(s)),a=this._getBoundsOffset(r,i,e);return a.round().equals([0,0])?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))}
247,_getBoundsOffset:function(t,e,i){var n=o.bounds(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),s=n.min.subtract(t.min),r=n.max.subtract(t.max),a=this._rebound(s.x,-r.x),h=this._rebound(s.y,-r.y);return new o.Point(a,h)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=o.Browser.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Layer=o.Evented.extend({options:{pane:"overlayPane",nonBubblingEvents:[]},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o.stamp(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o.stamp(t)],this},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&this._map.attributionControl&&this._map.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}}),o.Map.include({addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&o.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o.stamp(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=o.stamp(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-(1/0),n=this._getZoomSpan();for(var o in this._zoomBoundLayers){var s=this._zoomBoundLayers[o].options;t=s.minZoom===i?t:Math.min(t,s.minZoom),e=s.maxZoom===i?e:Math.max(e,s.maxZoom)}this._layersMaxZoom=e===-(1/0)?i:e,this._layersMinZoom=t===1/0?i:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange")}}),o.Projection.Mercator={R:6378137,R_MINOR:6356752.314245179,bounds:o.bounds([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,r=Math.sqrt(1-s*s),a=r*Math.sin(n),h=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),r/2);return n=-i*Math.log(Math.max(h,1e-10)),new o.Point(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,s=this.R_MINOR/n,r=Math.sqrt(1-s*s),a=Math.exp(-t.y/n),h=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=r*Math.sin(h),e=Math.pow((1-e)/(1+e),r/2),u=Math.PI/2-2*Math.atan(a*e)-h,h+=u;return new o.LatLng(h*i,t.x*i/n)}},o.CRS.EPSG3395=o.extend({},o.CRS.Earth,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=.5/(Math.PI*o.Projection.Mercator.R);return new o.Transformation(t,.5,-t,.5)}()}),o.GridLayer=o.Layer.extend({options:{tileSize:256,opacity:1,updateWhenIdle:o.Browser.mobile,updateWhenZooming:!0,updateInterval:200,attribution:null,zIndex:1,bounds:null,minZoom:0,maxZoom:i,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){t=o.setOptions(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),o.DomUtil.remove(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=null},bringToFront:function(){return this._map&&(o.DomUtil.toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(o.DomUtil.toBack(this._container),this._setAutoZIndex(Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=o.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return e.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof o.Point?t:new o.Point(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-(1/0),1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!o.Browser.ielt9){o.DomUtil.setOpacity(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var r=Math.min(1,(t-s.loaded)/200);
247o.DomUtil.setOpacity(s.el,r),r<1?e=!0:(s.active&&(i=!0),s.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(o.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=o.Util.requestAnimFrame(this._updateOpacity,this))}},_initContainer:function(){this._container||(this._container=o.DomUtil.create("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(t===i)return i;for(var n in this._levels)this._levels[n].el.children.length||n===t?this._levels[n].el.style.zIndex=e-Math.abs(t-n):(o.DomUtil.remove(this._levels[n].el),this._removeTilesAtZoom(n),delete this._levels[n]);var s=this._levels[t],r=this._map;return s||(s=this._levels[t]={},s.el=o.DomUtil.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),s.el.style.zIndex=e,s.origin=r.project(r.unproject(r.getPixelOrigin()),t).round(),s.zoom=t,this._setZoomTransform(s,r.getCenter(),r.getZoom()),o.Util.falseFn(s.el.offsetWidth)),this._level=s,s},_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)return void this._removeAllTiles();for(t in this._tiles)e=this._tiles[t],e.retain=e.current;for(t in this._tiles)if(e=this._tiles[t],e.current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)o.DomUtil.remove(this._levels[t].el),delete this._levels[t];this._removeAllTiles(),this._tileZoom=null},_retainParent:function(t,e,i,n){var s=Math.floor(t/2),r=Math.floor(e/2),a=i-1,h=new o.Point(+s,+r);h.z=+a;var l=this._tileCoordsToKey(h),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),a>n&&this._retainParent(s,r,a,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var r=2*e;r<2*e+2;r++){var a=new o.Point(s,r);a.z=i+1;var h=this._tileCoordsToKey(a),l=this._tiles[h];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(s,r,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_setView:function(t,e,n,o){var s=Math.round(e);(this.options.maxZoom!==i&&s>this.options.maxZoom||this.options.minZoom!==i&&s<this.options.minZoom)&&(s=i);var r=this.options.updateWhenZooming&&s!==this._tileZoom;o&&!r||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),s!==i&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();o.Browser.any3d?o.DomUtil.setTransform(t.el,s,n):o.DomUtil.setPosition(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),s=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*n);return new o.Bounds(s.subtract(r),s.add(r))},_update:function(t){var n=this._map;if(n){var s=n.getZoom();if(t===i&&(t=n.getCenter()),this._tileZoom!==i){var r=this._getTiledPixelBounds(t),a=this._pxBoundsToTileRange(r),h=a.getCenter(),l=[],u=this.options.keepBuffer,c=new o.Bounds(a.getBottomLeft().subtract([u,-u]),a.getTopRight().add([u,-u]));for(var d in this._tiles){var _=this._tiles[d].coords;_.z===this._tileZoom&&c.contains(o.point(_.x,_.y))||(this._tiles[d].current=!1)}if(Math.abs(s-this._tileZoom)>
2471)return void this._setView(t,s);for(var m=a.min.y;m<=a.max.y;m++)for(var p=a.min.x;p<=a.max.x;p++){var f=new o.Point(p,m);if(f.z=this._tileZoom,this._isValidTile(f)){var g=this._tiles[this._tileCoordsToKey(f)];g?g.current=!0:l.push(f)}}if(l.sort(function(t,e){return t.distanceTo(h)-e.distanceTo(h)}),0!==l.length){this._loading||(this._loading=!0,this.fire("loading"));var v=e.createDocumentFragment();for(p=0;p<l.length;p++)this._addTile(l[p],v);this._level.el.appendChild(v)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return o.latLngBounds(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i),r=e.wrapLatLng(e.unproject(n,t.z)),a=e.wrapLatLng(e.unproject(s,t.z));return new o.LatLngBounds(r,a)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new o.Point(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(o.DomUtil.remove(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){o.DomUtil.addClass(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=o.Util.falseFn,t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity<1&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.android&&!o.Browser.android23&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o.bind(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&o.Util.requestAnimFrame(o.bind(this._tileReady,this,t,null,s)),o.DomUtil.setPosition(s,i),this._tiles[n]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){if(this._map){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(o.DomUtil.setOpacity(i.el,0),o.Util.cancelAnimFrame(this._fadeFrame),this._fadeFrame=o.Util.requestAnimFrame(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),o.DomUtil.addClass(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t}),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),o.Browser.ielt9||!this._map._fadeAnimated?o.Util.requestAnimFrame(this._pruneTiles,this):setTimeout(o.bind(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new o.Point(this._wrapX?o.Util.wrapNum(t.x,this._wrapX):t.x,this._wrapY?o.Util.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new o.Bounds(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),o.gridLayer=function(t){return new o.GridLayer(t)},o.TileLayer=o.GridLayer.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),o.Browser.android||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,i){var n=e.createElement("img");return o.DomEvent.on(n,"load",o.bind(this._tileOnLoad,this,i,n)),o.DomEvent.on(n,"error",o.bind(this._tileOnError,this,i,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:o.Browser.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return o.Util.template(this._url,o.extend(e,this.options))},_tileOnLoad:function(t,e){o.Browser.ielt9?setTimeout(o.bind(t,this,null,e),
2470):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&(e.src=n),t(i,e)},getTileSize:function(){var t=this._map,e=o.GridLayer.prototype.getTileSize.call(this),i=this._tileZoom+this.options.zoomOffset,n=this.options.maxNativeZoom;return null!==n&&i>n?e.divideBy(t.getZoomScale(n,i)).round():e},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this.options,e=this._tileZoom;return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,null!==t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=o.Util.falseFn,e.onerror=o.Util.falseFn,e.complete||(e.src=o.Util.emptyImageUrl,o.DomUtil.remove(e)))}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=o.setOptions(this,e),i.width=i.height=e.tileSize*(e.detectRetina&&o.Browser.retina?2:1),this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToBounds(t),i=this._crs.project(e.getNorthWest()),n=this._crs.project(e.getSouthEast()),s=(this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[n.y,i.x,i.y,n.x]:[i.x,n.y,n.x,i.y]).join(","),r=o.TileLayer.prototype.getTileUrl.call(this,t);return r+o.Util.getParamString(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.ImageOverlay=o.Layer.extend({options:{opacity:1,alt:"",interactive:!1,attribution:null,crossOrigin:!1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(o.DomUtil.addClass(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){o.DomUtil.remove(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&o.DomUtil.toFront(this._image),this},bringToBack:function(){return this._map&&o.DomUtil.toBack(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=t,this._map&&this._reset(),this},getAttribution:function(){return this.options.attribution},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._image=o.DomUtil.create("img","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));t.onselectstart=o.Util.falseFn,t.onmousemove=o.Util.falseFn,t.onload=o.bind(this.fire,this,"load"),this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,t.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngToNewLayerPoint(this._bounds.getNorthWest(),t.zoom,t.center);o.DomUtil.setTransform(this._image,i,e)},_reset:function(){var t=this._image,e=new o.Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();o.DomUtil.setPosition(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}
247),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=o.point(n),r=o.point("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+(o.Browser.retina&&"icon"===t?"-2x":"")+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=s.length;t<i;t++)if(n=s[t].src||"",n.match(r))return o=n.split(r)[0],(o?o+"/":"")+"images"}(),o.Marker=o.Layer.extend({options:{icon:new o.Icon.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=o.latLng(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),t.alt&&(i.alt=t.alt)),o.DomUtil.addClass(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var s=t.icon.createShadow(this._shadow),r=!1;s!==this._shadow&&(this._removeShadow(),r=!0),s&&o.DomUtil.addClass(s,e),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&r&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),o.DomUtil.remove(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&o.DomUtil.remove(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(o.DomUtil.addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),o.Handler.MarkerDrag)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new o.Handler.MarkerDrag(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;
247o.DomUtil.setOpacity(this._icon,t),this._shadow&&o.DomUtil.setOpacity(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;if(i.innerHTML=n.html!==!1?n.html:"",n.bgPos){var s=o.point(n.bgPos);i.style.backgroundPosition=-s.x+"px "+-s.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.DivOverlay=o.Layer.extend({options:{offset:[0,7],zoomAnimation:!0,className:"",pane:"popupPane"},initialize:function(t,e){o.setOptions(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&this.options.zoomAnimation,this._container||this._initLayout(),t._fadeAnimated&&o.DomUtil.setOpacity(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&o.DomUtil.setOpacity(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(o.DomUtil.setOpacity(this._container,0),this._removeTimeout=setTimeout(o.bind(o.DomUtil.remove,o.DomUtil,this._container),200)):o.DomUtil.remove(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&o.DomUtil.toFront(this._container),this},bringToBack:function(){return this._map&&o.DomUtil.toBack(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=o.point(this.options.offset),i=this._getAnchor();this._zoomAnimated?o.DomUtil.setPosition(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}}),o.Popup=o.DivOverlay.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){o.DivOverlay.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof o.Path||this._source.on("preclick",o.DomEvent.stopPropagation))},onRemove:function(t){o.DivOverlay.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof o.Path||this._source.off("preclick",o.DomEvent.stopPropagation))},getEvents:function(){var t=o.DivOverlay.prototype.getEvents.call(this);return("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=o.DomUtil.create("div",t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"));if(this.options.closeButton){var i=this._closeButton=o.DomUtil.create("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",o.DomEvent.on(i,"click",this._onCloseButtonClick,this)}var n=this._wrapper=o.DomUtil.create("div",t+"-content-wrapper",e);this._contentNode=o.DomUtil.create("div",t+"-content",n),o.DomEvent.disableClickPropagation(n).disableScrollPropagation(this._contentNode).on(n,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",t+"-tip-container",e),this._tip=o.DomUtil.create("div",t+"-tip",this._tipContainer)},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,r="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,r)):o.DomUtil.removeClass(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();o.DomUtil.setPosition(this._container,e.add(i))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(o.DomUtil.getStyle(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new o.Point(this._containerLeft,-i-this._containerBottom);this._zoomAnimated&&s._add(o.DomUtil.getPosition(this._container));var r=t.layerPointToContainerPoint(s),a=o.point(this.options.autoPanPadding),h=o.point(this.options.autoPanPaddingTopLeft||a),l=o.point(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,d=0;r.x+n+l.x>u.x&&(c=r.x+n-u.x+l.x),r.x-c-h.x<0&&(c=r.x-h.x),r.y+i+l.y>u.y&&(d=r.y+i-u.y+l.y), 248r.y-d-h.y<0&&(d=r.y-h.y),(c||d)&&t.fire("autopanstart").panBy([c,d])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)},_getAnchor:function(){return o.point(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.mergeOptions({closePopupOnClick:!0}
248),o.Map.include({openPopup:function(t,e,i){return t instanceof o.Popup||(t=new o.Popup(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),o.Layer.include({bindPopup:function(t,e){return t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof o.Layer||(e=t,t=this),t instanceof o.FeatureGroup)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;if(this._popup&&this._map)return o.DomEvent.stop(t),e instanceof o.Path?void this.openPopup(t.layer||t.target,t.latlng):void(this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.Marker.include({_getPopupAnchor:function(){return this.options.icon.options.popupAnchor||[0,0]}}),o.Tooltip=o.DivOverlay.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){o.DivOverlay.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){o.DivOverlay.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=o.DivOverlay.prototype.getEvents.call(this);return o.Browser.touch&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=o.DomUtil.create("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=i.offsetWidth,h=i.offsetHeight,l=o.point(this.options.offset),u=this._getAnchor();"top"===r?t=t.add(o.point(-a/2+l.x,-h+l.y+u.y)):"bottom"===r?t=t.subtract(o.point(a/2-l.x,-l.y)):"center"===r?t=t.subtract(o.point(a/2+l.x,h/2-u.y+l.y)):"right"===r||"auto"===r&&s.x<n.x?(r="right",t=t.add([l.x+u.x,u.y-h/2+l.y])):(r="left",t=t.subtract(o.point(a+u.x-l.x,h/2-u.y-l.y))),o.DomUtil.removeClass(i,"leaflet-tooltip-right"),o.DomUtil.removeClass(i,"leaflet-tooltip-left"),o.DomUtil.removeClass(i,"leaflet-tooltip-top"),o.DomUtil.removeClass(i,"leaflet-tooltip-bottom"),o.DomUtil.addClass(i,"leaflet-tooltip-"+r),o.DomUtil.setPosition(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&o.DomUtil.setOpacity(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return o.point(this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),o.tooltip=function(t,e){return new o.Tooltip(t,e)}
248,o.Map.include({openTooltip:function(t,e,i){return t instanceof o.Tooltip||(t=new o.Tooltip(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),o.Layer.include({bindTooltip:function(t,e){return t instanceof o.Tooltip?(o.setOptions(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=o.tooltip(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),o.Browser.touch&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof o.Layer||(e=t,t=this),t instanceof o.FeatureGroup)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(o.DomUtil.addClass(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&(o.DomUtil.removeClass(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:i)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}}),o.Marker.include({_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor||[0,0]}}),o.LayerGroup=o.Layer.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;e<i;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){for(var t in this._layers)this.removeLayer(this._layers[t]);return this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){for(var e in this._layers)t.addLayer(this._layers[e])},onRemove:function(t){for(var e in this._layers)t.removeLayer(this._layers[e])},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),o.LayerGroup.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),o.LayerGroup.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Renderer=o.Layer.extend({options:{padding:.1},initialize:function(t){o.setOptions(this,t),o.stamp(this)},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&o.DomUtil.addClass(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update()},onRemove:function(){o.DomUtil.remove(this._container)},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=o.DomUtil.getPosition(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),a=this._map.project(t,e),h=a.subtract(r),l=s.multiplyBy(-i).add(n).add(s).subtract(h);o.Browser.any3d?o.DomUtil.setTransform(this._container,l,i):o.DomUtil.setPosition(this._container,l)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom)},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).roun
248d();this._bounds=new o.Bounds(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),o.Map.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this.options.preferCanvas&&o.canvas()||o.svg()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||t===i)return!1;var e=this._paneRenderers[t];return e===i&&(e=o.SVG&&o.svg({pane:t})||o.Canvas&&o.canvas({pane:t}),this._paneRenderers[t]=e),e}}),o.Path=o.Layer.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},getEvents:function(){return{zoomend:this._project,moveend:this._update,viewreset:this._reset}},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return o.setOptions(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(o.Browser.touch?10:0)}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var r,a=[];for(r=0;r<n;r++)s[r]&&a.push(t[r]);return a},_simplifyDPStep:function(t,e,i,n,o){var s,r,a,h=0;for(r=n+1;r<=o-1;r++)a=this._sqClosestPointOnSegment(t[r],t[n],t[o],!0),a>h&&(s=r,h=a);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;n<s;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return o<s-1&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n,o){var s,r,a,h=n?this._lastCode:this._getBitCode(t,i),l=this._getBitCode(e,i);for(this._lastCode=l;;){if(!(h|l))return[t,e];if(h&l)return!1;s=h||l,r=this._getEdgeIntersection(t,e,s,i,o),a=this._getBitCode(r,i),s===h?(t=r,h=a):(e=r,l=a)}},_getEdgeIntersection:function(t,e,i,n,s){var r,a,h=e.x-t.x,l=e.y-t.y,u=n.min,c=n.max;return 8&i?(r=t.x+h*(c.y-t.y)/l,a=c.y):4&i?(r=t.x+h*(u.y-t.y)/l,a=u.y):2&i?(r=c.x,a=t.y+l*(c.x-t.x)/h):1&i&&(r=u.x,a=t.y+l*(u.x-t.x)/h),new o.Point(r,a,s)},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,r=e.x,a=e.y,h=i.x-r,l=i.y-a,u=h*h+l*l;return u>0&&(s=((t.x-r)*h+(t.y-a)*l)/u,s>1?(r=i.x,a=i.y):s>0&&(r+=h*s,a+=l*s)),h=t.x-r,l=t.y-a,n?h*h+l*l:new o.Point(r,a)}},o.Polyline=o.Path.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){o.setOptions(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,s=null,r=o.LineUtil._sqClosestPointOnSegment,a=0,h=this._parts.length;a<h;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){e=l[u-1],i=l[u];var d=r(t,e,i,!0);d<n&&(n=d,s=r(t,e,i))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){var t,e,i,n,o,s,r,a=this._rings[0],h=a.length;if(!h)return null;for(t=0,e=0;t<h-1;t++)e+=a[t].distanceTo(a[t+1])/2;
248if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,n=0;t<h-1;t++)if(o=a[t],s=a[t+1],i=o.distanceTo(s),n+=i,n>e)return r=(n-e)/i,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=o.latLng(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new o.LatLngBounds,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return o.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=o.Polyline._flat(t),n=0,s=t.length;n<s;n++)i?(e[n]=o.latLng(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new o.Bounds;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),i=new o.Point(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(i),t.max._add(i),this._pxBounds=t)},_projectLatlngs:function(t,e,i){var n,s,r=t[0]instanceof o.LatLng,a=t.length;if(r){for(s=[],n=0;n<a;n++)s[n]=this._map.latLngToLayerPoint(t[n]),i.extend(s[n]);e.push(s)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);var e,i,n,s,r,a,h,l=this._parts;for(e=0,n=0,s=this._rings.length;e<s;e++)for(h=this._rings[e],i=0,r=h.length;i<r-1;i++)a=o.LineUtil.clipSegment(h[i],h[i+1],t,i,!0),a&&(l[n]=l[n]||[],l[n].push(a[0]),a[1]===h[i+1]&&i!==r-2||(l[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=o.LineUtil.simplify(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.Polyline._flat=function(t){return!o.Util.isArray(t[0])||"object"!=typeof t[0][0]&&"undefined"!=typeof t[0][0]},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e,i){var n,s,r,a,h,l,u,c,d,_=[1,4,2,8],m=o.LineUtil;for(s=0,u=t.length;s<u;s++)t[s]._code=m._getBitCode(t[s],e);for(a=0;a<4;a++){for(c=_[a],n=[],s=0,u=t.length,r=u-1;s<u;r=s++)h=t[s],l=t[r],h._code&c?l._code&c||(d=m._getEdgeIntersection(l,h,c,e,i),d._code=m._getBitCode(d,e),n.push(d)):(l._code&c&&(d=m._getEdgeIntersection(l,h,c,e,i),d._code=m._getBitCode(d,e),n.push(d)),n.push(h));t=n}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){var t,e,i,n,o,s,r,a,h,l=this._rings[0],u=l.length;if(!u)return null;for(s=r=a=0,t=0,e=u-1;t<u;e=t++)i=l[t],n=l[e],o=i.y*n.x-n.y*i.x,r+=(i.x+n.x)*o,a+=(i.y+n.y)*o,s+=3*o;return h=0===s?l[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=o.Polyline.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof o.LatLng&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){o.Polyline.prototype._setLatLngs.call(this,t),o.Polyline._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return o.Polyline._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new o.Point(e,e);if(t=new o.Bounds(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);for(var n,s=0,r=this._rings.length;s<r;s++)n=o.PolyUtil.clipPolygon(this._rings[s],t,!0),n.length&&this._parts.push(n)}},_updatePath:function(){this._renderer._updatePoly(this,!0)}}),o.polygon=function(t,e){return new o.Polygon(t,e)},o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest
248(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.CircleMarker=o.Path.extend({options:{fill:!0,radius:10},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return o.Path.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new o.Bounds(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Circle=o.CircleMarker.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=o.extend({},i,{radius:e})),o.setOptions(this,e),this._latlng=o.latLng(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new o.LatLngBounds(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:o.Path.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===o.CRS.Earth.distance){var s=Math.PI/180,r=this._mRadius/o.CRS.Earth.R/s,a=i.project([e+r,t]),h=i.project([e-r,t]),l=a.add(h).divideBy(2),u=i.unproject(l).lat,c=Math.acos((Math.cos(r*s)-Math.sin(e*s)*Math.sin(u*s))/(Math.cos(e*s)*Math.cos(u*s)))/s;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:Math.max(Math.round(l.x-i.project([u,t-c]).x),1),this._radiusY=Math.max(Math.round(l.y-a.y),1)}else{var d=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(d).x}this._updateBounds()}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.SVG=o.Renderer.extend({getEvents:function(){var t=o.Renderer.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=o.SVG.create("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=o.SVG.create("g"),this._container.appendChild(this._rootGroup)},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){o.Renderer.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),o.DomUtil.setPosition(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" "))}},_initPath:function(t){var e=t._path=o.SVG.create("path");t.options.className&&o.DomUtil.addClass(e,t.options.className),t.options.interactive&&o.DomUtil.addClass(e,"leaflet-interactive"),this._updateStyle(t)},_addPath:function(t){this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){o.DomUtil.remove(t._path),t.removeInteractiveTarget(t._path)},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,o.SVG.pointsToPath(t._parts,e))},_updateCircle:function(t){var e=t._point,i=t._radius,n=t._radiusY||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){o.DomUtil.toFront(t._path)},_bringToBack:function(t){o.DomUtil.toBack(t._path)}}),o.extend(o.SVG,{create:function(t){return e.createElementNS("http://www.w3.org/2000/svg",t)},pointsToPath:function(t,e){var i,n,s,r,a,h,l="";for(i=0,s=t.length;i<s;i++){for(a=t[i],n=0,r=a.length;n<r;n++)h=a[n],l+=(n?"L":"M")+h.x+" "+h.y;l+=e?o.Browser.svg?"z":"x":""}return l||"M0 0"}}),o.Browser.svg=!(!e.createElementNS||!o.SVG.create("svg").createSVGRect),o.svg=function(t){return o.Browser.svg||o.Browser.vml?new o.SVG(t):null},o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.SVG.include(o.Browser.vml?{_initContainer:function(){this._container=o.DomUtil.create("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||o.Renderer.prototype._update.call(this)},_initPath:function(t){var e=t._container=o.SVG.create("shape");o.DomUtil.addClass(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=o.SVG.create("path"),e.appendChild(t._path),this._updateStyle(t)},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;o.DomUtil.remove(e),t.removeInteractiveTarget(e)},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=o.SVG.create("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=o.Util.isArray(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=o.SVG.create("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){o.DomUtil.toFront(t._container)},_bringToBack:function(t){o.DomUtil.toBack(t._container)}}:{}),o.Browser.vml&&(o.SVG.create=function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}()),o.Canvas=o.Renderer.extend({onAdd:function(){o.Renderer.prototype.onAdd.call(this),this._layers=this._layers||{},this._draw()},_initContainer:function(){var t=this._container=e.createElement("canvas");o.DomEvent.on(t,"mousemove",o.Util.throttle(this._onMouseMove,32,this),this).on(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this).on(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={}
248,o.Renderer.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=o.Browser.retina?2:1;o.DomUtil.setPosition(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",o.Browser.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y)}},_initPath:function(t){this._updateDashArray(t),this._layers[o.stamp(t)]=t},_addPath:o.Util.falseFn,_removePath:function(t){t._removed=!0,this._requestRedraw(t)},_updatePath:function(t){this._redrawBounds=t._pxBounds,this._draw(!0),t._project(),t._update(),this._draw(),this._redrawBounds=null},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(t.options.dashArray){var e,i=t.options.dashArray.split(","),n=[];for(e=0;e<i.length;e++)n.push(Number(i[e]));t.options._dashArray=n}},_requestRedraw:function(t){if(this._map){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new o.Bounds,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e])),this._redrawRequest=this._redrawRequest||o.Util.requestAnimFrame(this._redraw,this)}},_redraw:function(){this._redrawRequest=null,this._draw(!0),this._draw(),this._redrawBounds=null},_draw:function(t){this._clear=t;var e,i=this._redrawBounds;this._ctx.save(),i&&(this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,i.max.x-i.min.x,i.max.y-i.min.y),this._ctx.clip());for(var n in this._layers)e=this._layers[n],(!i||e._pxBounds&&e._pxBounds.intersects(i))&&e._updatePath(),t&&e._removed&&(delete e._removed,delete this._layers[n]);this._ctx.restore()},_updatePoly:function(t,e){var i,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(this._drawnLayers[t._leaflet_id]=t,h.beginPath(),h.setLineDash&&h.setLineDash(t.options&&t.options._dashArray||[]),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],h[n?"lineTo":"moveTo"](s.x,s.y);e&&h.closePath()}this._fillStroke(h,t)}},_updateCircle:function(t){if(!t._empty()){var e=t._point,i=this._ctx,n=t._radius,o=(t._radiusY||n)/n;this._drawnLayers[t._leaflet_id]=t,1!==o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!==o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=this._clear,n=e.options;t.globalCompositeOperation=i?"destination-out":"source-over",n.fill&&(t.globalAlpha=i?1:n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.globalAlpha=i?1:n.opacity,e._prevWeight=t.lineWidth=i?e._prevWeight+1:n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){var e,i=this._map.mouseEventToLayerPoint(t),n=[];for(var s in this._layers)e=this._layers[s],e.options.interactive&&e._containsPoint(i)&&!this._map._draggableMoved(e)&&(o.DomEvent._fakeStop(t),n.push(e));n.length&&this._fireEvent(n,t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseOut(t,e),this._handleMouseHover(t,e)}},_handleMouseOut:function(t,e){var i=this._hoveredLayer;!i||"mouseout"!==t.type&&i._containsPoint(e)||(o.DomUtil.removeClass(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){var i,n;for(i in this._drawnLayers)n=this._drawnLayers[i],n.options.interactive&&n._containsPoint(e)&&(o.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n);this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:o.Util.falseFn,_bringToBack:o.Util.falseFn}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.canvas=function(t){return o.Browser.canvas?new o.Canvas(t):null},o.Polyline.prototype._containsPoint=function(t,e){var i,n,s,r,a,h,l=this._clickTolerance();if(!this._pxBounds.contains(t))return!1;for(i=0,r=this._parts.length;i<r;i++)for(h=this._parts[i],n=0,a=h.length,s=a-1;n<a;s=n++)if((e||0!==n)&&o.LineUtil.pointToSegmentDistance(t,h[s],h[n])<=l)return!0;return!1},o.Polygon.prototype._containsPoint=function(t){var e,i,n,s,r,a,h,l,u=!1;if(!this._pxBounds.contains(t))return!1;for(s=0,h=this._parts.length;s<h;s++)for(e=this._parts[s],r=0,l=e.length,a=l-1;r<l;a=r++)i=e[r],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||o.Polyline.prototype._containsPoint.call(this,t,!0)},o.CircleMarker.prototype._containsPoint=function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()},o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;e<i;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var a=o.GeoJSON.geometryToLayer(t,r);return a?(a.feature=o.GeoJSON.asFeature(t),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=o.Util.extend({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){ 249this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e){var i,n,s,r,a="Feature"===t.type?t.geometry:t,h=a?a.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||this.coordsToLatLng;if(!h&&!a)return null;switch(a.type){case"Point":return i=c(h),u?u(t,i):new o.Marker(i);case"MultiPoint":for(s=0,r=h.length;s<r;s++)i=c(h[s]),l.push(u?u(t,i):new o.Marker(i));return new o.FeatureGroup(l);case"LineString":case"MultiLineString":return n=this.coordsToLatLngs(h,"LineString"===a.type?0:1,c),new o.Polyline(n,e);case"Polygon":case"MultiPolygon":return n=this.coordsToLatLngs(h,"Polygon"===a.type?1:2,c),new o.Polygon(n,e);case"GeometryCollection":for(s=0,r=a.geometries.length;s<r;s++){var d=this.geometryToLayer({geometry:a.geometries[s],type:"Feature",properties:t.properties},e);d&&l.push(d)}return new o.FeatureGroup(l);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])}
249,coordsToLatLngs:function(t,e,i){for(var n,o=[],s=0,r=t.length;s<r;s++)n=e?this.coordsToLatLngs(t[s],e-1,i):(i||this.coordsToLatLng)(t[s]),o.push(n);return o},latLngToCoords:function(t){return t.alt!==i?[t.lng,t.lat,t.alt]:[t.lng,t.lat]},latLngsToCoords:function(t,e,i){for(var n=[],s=0,r=t.length;s<r;s++)n.push(e?o.GeoJSON.latLngsToCoords(t[s],e-1,i):o.GeoJSON.latLngToCoords(t[s]));return!e&&i&&n.push(n[0]),n},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var r={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(r),o.Circle.include(r),o.CircleMarker.include(r),o.Polyline.prototype.toGeoJSON=function(){var t=!o.Polyline._flat(this._latlngs),e=o.GeoJSON.latLngsToCoords(this._latlngs,t?1:0);return o.GeoJSON.getFeature(this,{type:(t?"Multi":"")+"LineString",coordinates:e})},o.Polygon.prototype.toGeoJSON=function(){var t=!o.Polyline._flat(this._latlngs),e=t&&!o.Polyline._flat(this._latlngs[0]),i=o.GeoJSON.latLngsToCoords(this._latlngs,e?2:t?1:0,!0);return t||(i=[i]),o.GeoJSON.getFeature(this,{type:(e?"Multi":"")+"Polygon",coordinates:i})},o.LayerGroup.include({toMultiPoint:function(){var t=[];return this.eachLayer(function(e){t.push(e.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint();var e="GeometryCollection"===t,i=[];return this.eachLayer(function(t){if(t.toGeoJSON){var n=t.toGeoJSON();i.push(e?n.geometry:o.GeoJSON.asFeature(n))}}),e?o.GeoJSON.getFeature(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}}),o.geoJSON=function(t,e){return new o.GeoJSON(t,e)},o.geoJson=o.geoJSON;var a="_leaflet_events";o.DomEvent={on:function(t,e,i,n){if("object"==typeof e)for(var s in e)this._on(t,s,e[s],i);else{e=o.Util.splitWords(e);for(var r=0,a=e.length;r<a;r++)this._on(t,e[r],i,n)}return this},off:function(t,e,i,n){if("object"==typeof e)for(var s in e)this._off(t,s,e[s],i);else{e=o.Util.splitWords(e);for(var r=0,a=e.length;r<a;r++)this._off(t,e[r],i,n)}return this},_on:function(e,i,n,s){var r=i+o.stamp(n)+(s?"_"+o.stamp(s):"");if(e[a]&&e[a][r])return this;var h=function(i){return n.call(s||e,i||t.event)},l=h;return o.Browser.pointer&&0===i.indexOf("touch")?this.addPointerListener(e,i,h,r):o.Browser.touch&&"dblclick"===i&&this.addDoubleTapListener?this.addDoubleTapListener(e,h,r):"addEventListener"in e?"mousewheel"===i?e.addEventListener("onwheel"in e?"wheel":"mousewheel",h,!1):"mouseenter"===i||"mouseleave"===i?(h=function(i){i=i||t.event,o.DomEvent._isExternalTarget(e,i)&&l(i)},e.addEventListener("mouseenter"===i?"mouseover":"mouseout",h,!1)):("click"===i&&o.Browser.android&&(h=function(t){return o.DomEvent._filterClick(t,l)}),e.addEventListener(i,h,!1)):"attachEvent"in e&&e.attachEvent("on"+i,h),e[a]=e[a]||{},e[a][r]=h,this},_off:function(t,e,i,n){var s=e+o.stamp(i)+(n?"_"+o.stamp(n):""),r=t[a]&&t[a][s];return r?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,s):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,s):"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[a][s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){return o.DomEvent.on(t,"mousewheel",o.DomEvent.stopPropagation)},disableClickPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,o.Draggable.START.join(" "),e),o.DomEvent.on(t,{click:o.DomEvent._fakeStop,dblclick:e})},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},_wheelPxFactor:o.Browser.win&&o.Browser.chrome?2:o.Browser.gecko?t.devicePixelRatio:1,getWheelDelta:function(t){return o.Browser.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/o.DomEvent._wheelPxFactor:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail
249:t.detail?t.detail/-32765*60:0},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_isExternalTarget:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,void e(t))}},o.DomEvent.addListener=o.DomEvent.on,o.DomEvent.removeListener=o.DomEvent.off,o.Draggable=o.Evented.extend({options:{clickTolerance:3},statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e,i){this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(o.DomEvent.on(this._dragStartTarget,o.Draggable.START.join(" "),this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(o.DomEvent.off(this._dragStartTarget,o.Draggable.START.join(" "),this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!o.DomUtil.hasClass(this._element,"leaflet-zoom-anim")&&!(o.Draggable._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches)&&this._enabled&&(o.Draggable._dragging=!0,this._preventOutline&&o.DomUtil.preventOutline(this._element),o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),!this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(i){if(!i._simulated&&this._enabled){if(i.touches&&i.touches.length>1)return void(this._moved=!0);var n=i.touches&&1===i.touches.length?i.touches[0]:i,s=new o.Point(n.clientX,n.clientY),r=s.subtract(this._startPoint);(r.x||r.y)&&(Math.abs(r.x)+Math.abs(r.y)<this.options.clickTolerance||(o.DomEvent.preventDefault(i),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(r),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=i.target||i.srcElement,t.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(r),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._lastEvent=i,this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){if(!t._simulated&&this._enabled){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var i in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[i],this._onMove,this).off(e,o.Draggable.END[i],this._onUp,this);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,o.Draggable._dragging=!1}}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({down:this._onDown,dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}o.DomUtil.addClass(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){o.DomUtil.removeClass(this._map._container,"leaflet-grab"),o.DomUtil.removeClass(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved}
vendor: 4,435 bytes, line 249
249,moving:function(){return this._draggable&&this._draggable._moving},_onDown:function(){this._map._stop()},_onDragStart:function(){var t=this._map;if(this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=o.latLngBounds(this._map.options.maxBounds);this._offsetLimit=o.bounds(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),e-this._times[0]>50&&(this._positions.shift(),this._times.shift())}this._map.fire("move",t).fire("drag",t)},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{var s=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,h=s.multiplyBy(a/r),l=h.distanceTo([0,0]),u=Math.min(i.inertiaMaxSpeed,l),c=h.multiplyBy(u/l),d=u/(i.inertiaDeceleration*a),_=c.multiplyBy(-d/2).round();_.x||_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:d,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),n),o.DomEvent.stop(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=i?Math.ceil(o/i)*i:o,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,e,
249i){function n(t){var e;if(e=o.Browser.pointer?o.DomEvent._pointersCount:t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);a=t.touches?t.touches[0]:t,h=n>0&&n<=l,r=i}}function s(){if(h&&!a.cancelBubble){if(o.Browser.pointer){var t,i,n={};for(i in a)t=a[i],n[i]=t&&t.bind?t.bind(a):t;a=n}a.type="dblclick",e(a),r=null}}var r,a,h=!1,l=250,u="_leaflet_",c=this._touchstart,d=this._touchend;return t[u+c+i]=n,t[u+d+i]=s,t[u+"dblclick"+i]=e,t.addEventListener(c,n,!1),t.addEventListener(d,s,!1),o.Browser.edge||t.addEventListener("dblclick",e,!1),this},removeDoubleTapListener:function(t,e){var i="_leaflet_",n=t[i+this._touchstart+e],s=t[i+this._touchend+e],r=t[i+"dblclick"+e];return t.removeEventListener(this._touchstart,n,!1),t.removeEventListener(this._touchend,s,!1),o.Browser.edge||t.removeEventListener("dblclick",r,!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST:["INPUT","SELECT","OPTION"],_pointers:{},_pointersCount:0,addPointerListener:function(t,e,i,n){return"touchstart"===e?this._addPointerStart(t,i,n):"touchmove"===e?this._addPointerMove(t,i,n):"touchend"===e&&this._addPointerEnd(t,i,n),this},removePointerListener:function(t,e,i){var n=t["_leaflet_"+e+i];return"touchstart"===e?t.removeEventListener(this.POINTER_DOWN,n,!1):"touchmove"===e?t.removeEventListener(this.POINTER_MOVE,n,!1):"touchend"===e&&(t.removeEventListener(this.POINTER_UP,n,!1),t.removeEventListener(this.POINTER_CANCEL,n,!1)),this},_addPointerStart:function(t,i,n){var s=o.bind(function(t){if("mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(this.TAG_WHITE_LIST.indexOf(t.target.tagName)<0))return;o.DomEvent.preventDefault(t)}this._handlePointer(t,i)},this);if(t["_leaflet_touchstart"+n]=s,t.addEventListener(this.POINTER_DOWN,s,!1),!this._pointerDocListener){var r=o.bind(this._globalPointerUp,this);e.documentElement.addEventListener(this.POINTER_DOWN,o.bind(this._globalPointerDown,this),!0),e.documentElement.addEventListener(this.POINTER_MOVE,o.bind(this._globalPointerMove,this),!0),e.documentElement.addEventListener(this.POINTER_UP,r,!0),e.documentElement.addEventListener(this.POINTER_CANCEL,r,!0),this._pointerDocListener=!0}},_globalPointerDown:function(t){this._pointers[t.pointerId]=t,this._pointersCount++},_globalPointerMove:function(t){this._pointers[t.pointerId]&&(this._pointers[t.pointerId]=t)},_globalPointerUp:function(t){delete this._pointers[t.pointerId],this._pointersCount--},_handlePointer:function(t,e){t.touches=[];for(var i in this._pointers)t.touches.push(this._pointers[i]);t.changedTouches=[t],e(t)},_addPointerMove:function(t,e,i){var n=o.bind(function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&this._handlePointer(t,e)},this);t["_leaflet_touchmove"+i]=n,t.addEventListener(this.POINTER_MOVE,n,!1)},_addPointerEnd:function(t,e,i){var n=o.bind(function(t){this._handlePointer(t,e)},this);t["_leaflet_touchend"+i]=n,t.addEventListener(this.POINTER_UP,n,!1),t.addEventListener(this.POINTER_CANCEL,n,!1)}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(n.add(s)._divideBy(2))),this._startDist=n.distanceTo(s),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMin
249Zoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest);var a=o.bind(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=o.Util.requestAnimFrame(a,this,!0),o.DomEvent.preventDefault(t)}},_onTouchEnd:function(){return this._moved&&this._zooming?(this._zooming=!1,o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd),void(this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))):void(this._zooming=!1)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),o.DomEvent.on(e,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._simulateEvent("mouseup",i),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_resetState:function(){this._moved=!1},_onMouseDown:function(t){return!(!t.shiftKey||1!==t.which&&1!==t.button)&&(this._resetState(),o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(t),void o.DomEvent.on(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this))},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=o.DomUtil.create("div","leaflet-zoom-box",this._container),o.DomUtil.addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new o.Bounds(this._point,this._startPoint),i=e.getSize();o.DomUtil.setPosition(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(o.DomUtil.remove(this._box),o.DomUtil.removeClass(this._container,"leaflet-crosshair")),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,{contextmenu:o.DomEvent.stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){setTimeout(o.bind(this._resetState,this),0);var e=new o.LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanDelta:80}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),o.DomEvent.on(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown}
249,this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),o.DomEvent.off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;e=this._panKeys[i],t.shiftKey&&(e=o.point(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i)return;n.closePopup()}o.DomEvent.stop(t)}}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),o.DomUtil.addClass(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(t){var e=this._marker,i=e._shadow,n=o.DomUtil.getPosition(e._icon),s=e._map.layerPointToLatLng(n);i&&o.DomUtil.setPosition(i,n),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this},remove:function(){return this._map?(o.DomUtil.remove(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,s){var r=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",r,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){o.DomUtil.remove(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}
249,_createButton:function(t,e,i,n,s){var r=o.DomUtil.create("a",i,n);return r.innerHTML=t,r.href="#",r.title=e,o.DomEvent.on(r,"mousedown dblclick",o.DomEvent.stopPropagation).on(r,"click",o.DomEvent.stop).on(r,"click",s,this).on(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&o.DomUtil.addClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent&&o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){ 250var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(new o.Control.Attribution).addTo(this)}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e,i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1},initialize:function(t,e,i){o.setOptions(this,i),this._layers=[],this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this),this._container},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(o.stamp(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(o.DomUtil.addClass(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=t+"px"):o.DomUtil.removeClass(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return o.DomUtil.removeClass(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.DomEvent.disableClickPropagation(e),o.Browser.touch||o.DomEvent.disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,{mouseenter:this.expand,mouseleave:this.collapse},this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this.expand,this):o.DomEvent.on(n,"focus",this.expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this.collapse,this)}else this.expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&o.stamp(this._layers[e].layer)===t)return this._layers[e]}
250,_addLayer:function(t,e,i){t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(!this._container)return this;o.DomUtil.empty(this._baseLayersList),o.DomUtil.empty(this._overlaysList);var t,e,i,n,s=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&s>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o.stamp(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var r=e.createElement("span");r.innerHTML=" "+t.name;var a=e.createElement("div");n.appendChild(a),a.appendChild(i),a.appendChild(r);var h=t.overlay?this._overlaysList:this._baseLayersList;return h.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=[],s=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,i=this._map.hasLayer(e),t.checked&&!i?o.push(e):!t.checked&&i&&s.push(e);for(r=0;r<s.length;r++)this._map.removeLayer(s[r]);for(r=0;r<o.length;r++)this._map.addLayer(o[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._form.getElementsByTagName("input"),o=this._map.getZoom(),s=n.length-1;s>=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.disabled=e.options.minZoom!==i&&o<e.options.minZoom||e.options.maxZoom!==i&&o>e.options.maxZoom},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Evented.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),o.DomUtil.setPosition(this._el,i),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate,duration:n.duration},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return!((e&&e.animate)!==!0&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4});var h=o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.mobileOpera;h&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),o.DomEvent.on(this._proxy,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this))}),o.Map.include(h?{_createAnimProxy:function(){var t=this._proxy=o.DomUtil.create("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=o.DomUtil.TRANSFORM,n=t.style[i];
250o.DomUtil.setTransform(t,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===t.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var e=this.getCenter(),i=this.getZoom();o.DomUtil.setTransform(t,this.project(e,i),this.getZoomScale(i,1))},this)},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(i.animate!==!0&&!this.getSize().contains(s))&&(o.Util.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),o.Util.requestAnimFrame(function(){this._moveEnd(!0)},this))}}:{}),o.Map.include({flyTo:function(t,e,n){function s(t){var e=t?-1:1,i=t?v:g,n=v*v-g*g+e*L*L*y*y,o=2*i*L*y,s=n/o,r=Math.sqrt(s*s+1)-s,a=r<1e-9?-18:Math.log(r);return a}function r(t){return(Math.exp(t)-Math.exp(-t))/2}function a(t){return(Math.exp(t)+Math.exp(-t))/2}function h(t){return r(t)/a(t)}function l(t){return g*(a(x)/a(x+P*t))}function u(t){return g*(a(x)*h(x+P*t)-r(x))/L}function c(t){return 1-Math.pow(1-t,1.5)}function d(){var i=(Date.now()-b)/T,n=c(i)*w;i<=1?(this._flyToFrame=o.Util.requestAnimFrame(d,this),this._move(this.unproject(_.add(m.subtract(_).multiplyBy(u(n)/y)),f),this.getScaleZoom(g/l(n),f),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}if(n=n||{},n.animate===!1||!o.Browser.any3d)return this.setView(t,e,n);this._stop();var _=this.project(this.getCenter()),m=this.project(t),p=this.getSize(),f=this._zoom;t=o.latLng(t),e=e===i?f:e;var g=Math.max(p.x,p.y),v=g*this.getZoomScale(f,e),y=m.distanceTo(_)||1,P=1.42,L=P*P,x=s(0),b=Date.now(),w=(s(1)-x)/P,T=n.duration?1e3*n.duration:1e3*w*.8;return this._moveStart(!0),d.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)}}),o.Map.include({_defaultLocateOptions:{timeout:1e4,watch:!1},locate:function(t){if(t=this._locateOptions=o.extend({},this._defaultLocateOptions,t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=n.toBounds(t.coords.accuracy),r=this._locateOptions;if(r.setView){var a=this.getBoundsZoom(s);this.setView(n,r.maxZoom?Math.min(a,r.maxZoom):a)}var h={latlng:n,bounds:s,timestamp:t.timestamp};for(var l in t.coords)"number"==typeof t.coords[l]&&(h[l]=t.coords[l]);this.fire("locationfound",h)}})}(window,document);(function(root,factory){if(typeof define==="function"&&define.amd)define(["leaflet"],factory);else if(typeof modules==="object"&&module.exports)module.exports=factory(require("leaflet"));else factory(L)})(this,function(L){L.TileLayer.Provider=L.TileLayer.extend({initialize:function(arg,options){var providers=L.TileLayer.Provider.providers;var parts=arg.split(".");var providerName=parts[0];var variantName=parts[1];if(!providers[providerName])throw"No such provider ("+providerName+")";var provider={url:providers[providerName].url,options:providers[providerName].options};if(variantName&&"variants"in providers[providerName]){if(!(variantName in providers[providerName].variants)
250)throw"No such variant of "+providerName+" ("+variantName+")";var variant=providers[providerName].variants[variantName];var variantOptions;if(typeof variant==="string")variantOptions={variant:variant};else variantOptions=variant.options;provider={url:variant.url||provider.url,options:L.Util.extend({},provider.options,variantOptions)}}var forceHTTP=window.location.protocol==="file:"||provider.options.forceHTTP;if(provider.url.indexOf("//")===0&&forceHTTP)provider.url="http:"+provider.url;if(provider.options.retina)if(options.detectRetina&&L.Browser.retina)options.detectRetina=false;else provider.options.retina="";var attributionReplacer=function(attr){if(attr.indexOf("{attribution.")===-1)return attr;return attr.replace(/\{attribution.(\w*)\}/,function(match,attributionName){return attributionReplacer(providers[attributionName].options.attribution)})};provider.options.attribution=attributionReplacer(provider.options.attribution);var layerOpts=L.Util.extend({},provider.options,options);L.TileLayer.prototype.initialize.call(this,provider.url,layerOpts)}});L.TileLayer.Provider.providers=[];if(typeof geodir_var!="undefined"&&geodir_var.osmProviders&&typeof geodir_var.osmProviders=="object")try{L.TileLayer.Provider.providers=geodir_var.osmProviders}catch(e){}L.tileLayer.provider=function(provider,options){return new L.TileLayer.Provider(provider,options)};return L});var exampleAPIcodes=typeof geodir_var!="undefined"&&geodir_var.osmAPIcodes?geodir_var.osmAPIcodes:{};var origProviderInit=L.TileLayer.Provider.prototype.initialize;L.TileLayer.Provider.include({initialize:function(providerName,options){this._providerName=providerName;options=options||{};var provider=this._providerName.split(".")[0];if(provider in exampleAPIcodes){this._exampleAPIcodes={};for(var key in exampleAPIcodes[provider])this._exampleAPIcodes[key]="<your "+key+">";L.extend(options,exampleAPIcodes[provider])}origProviderInit.call(this,providerName,options)}});var origTileLayerInit=L.TileLayer.prototype.initialize;L.TileLayer.include({initialize:function(url,options){this._options=options;origTileLayerInit.apply(this,arguments)}});L.tileLayer.provider.eachLayer=function(callback){for(var provider in L.TileLayer.Provider.providers)if(L.TileLayer.Provider.providers[provider].variants)for(var variant in L.TileLayer.Provider.providers[provider].variants)callback(provider+"."+variant);else callback(provider)};if(!String.prototype.startsWith)String.prototype.startsWith=function(searchString,position){position=position||0;return this.substr(position,searchString.length)===searchString}; 251 252L.gdGeoCode={};L.gdGeoCode.Provider={};L.gdGeoCode.Result=function(x,y,label,bounds,details){this.X=x;this.Y=y;this.Label=label;this.bounds=bounds;if(details)this.details=details};L.Control.gdGeoCode=L.Control.extend({options:{position:"topleft",showMarker:true,showPopup:false,customIcon:false,retainZoomLevel:false,draggable:false},_config:{country:"",searchLabel:"Enter address",notFoundMessage:"Sorry, that address could not be found.",messageHideDelay:3e3,zoomLevel:18},initialize:function(options){L.Util.extend(this.options,options);L.Util.extend(this._config,options)},resetLink:function(extraClass){var link=this._container.querySelector("a");link.className="leaflet-bar-part leaflet-bar-part-single"+" "+extraClass},onAdd:function(map){this._container=L.DomUtil.create("div","leaflet-bar leaflet-control leaflet-control-geosearch");var link=L.DomUtil.create("a","",this._container);link.href="#";link.title=this._config.searchLabel;this.resetLink("glass");var form=L.DomUtil.create("form","displayNone",this._container);var searchbox=L.DomUtil.create("input",null,form);searchbox.type="text";searchbox.placeholder=this._config.searchLabel;this._searchbox=searchbox;var msgbox=L.DomUtil.create("div","leaflet-bar message displayNone",this._container);this._msgbox=msgbox;L.DomEvent.on(link,"click",L.DomEvent.stopPropagation).on(link,"click",L.DomEvent.preventDefault).on(link,"click",function(){if(L.DomUtil.hasClass(form,"displayNone")){L.DomUtil.removeClass(form,"displayNone");searchbox.focus()}else{L.DomUtil.addClass(form,"displayNone")}}).on(link,"dblclick",L.DomEvent.stopPropagation);
252L.DomEvent.addListener(this._searchbox,"keypress",this._onKeyPress,this).addListener(this._searchbox,"keyup",this._onKeyUp,this).addListener(this._searchbox,"input",this._onInput,this);L.DomEvent.disableClickPropagation(this._container);return this._container},geosearch:function(qry){var that=this;try{var provider=this._config.provider;if(typeof provider.GetLocations=="function"){provider.GetLocations(qry,function(results){return that._processResults(results,qry)})}else{var url=provider.GetServiceUrl(qry);return this.sendRequest(provider,url,qry)}}catch(error){this._printError(error)}},cancelSearch:function(){var form=this._container.querySelector("form");L.DomUtil.addClass(form,"displayNone");this._searchbox.value="";this.resetLink("glass");L.DomUtil.addClass(this._msgbox,"displayNone");this._map._container.focus()},startSearch:function(){this.resetLink("spinner");this.geosearch(this._searchbox.value)},sendRequest:function(provider,url,qry){var that=this;window.parseLocation=function(response){var results=provider.ParseJSON(response);results=that._processResults(results,qry);document.body.removeChild(document.getElementById("getJsonP"));delete window.parseLocation;return results};function getJsonP(url){url=url+"&callback=parseLocation";var script=document.createElement("script");script.id="getJsonP";script.src=url;script.async=true;document.body.appendChild(script)}if(XMLHttpRequest){var xhr=new XMLHttpRequest;if("withCredentials"in xhr){var xhr=new XMLHttpRequest;xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){var response=JSON.parse(xhr.responseText),results=provider.ParseJSON(response);that._processResults(results,qry)}else if(xhr.status==0||xhr.status==400){getJsonP(url)}else{that._printError(xhr.responseText)}}};xhr.open("GET",url,true);xhr.send()}else if(XDomainRequest){var xdr=new XDomainRequest;xdr.onerror=function(err){that._printError(err)};xdr.onload=function(){var response=JSON.parse(xdr.responseText),results=provider.ParseJSON(response);that._processResults(results,qry)};xdr.open("GET",url);xdr.send()}else{getJsonP(url)}}},_processResults:function(results,qry){if(results.length>0){return results[0];this.cancelSearch()}else{this._printError(this._config.notFoundMessage)}return null},_showLocation:function(location,qry){if(this.options.showMarker==true){if(typeof this._positionMarker==="undefined"){this._positionMarker=L.marker([location.Y,location.X],{draggable:this.options.draggable}).addTo(this._map);if(this.options.customIcon){this._positionMarker.setIcon(this.options.customIcon)}if(this.options.showPopup){this._positionMarker.bindPopup(qry).openPopup()}}else{this._positionMarker.setLatLng([location.Y,location.X]);if(this.options.showPopup){this._positionMarker.bindPopup(qry).openPopup()}}}if(!this.options.retainZoomLevel&&location.bounds&&location.bounds.isValid()){this._map.fitBounds(location.bounds)}
252else{this._map.setView([location.Y,location.X],this._getZoomLevel(),false)}this._map.fireEvent("geosearch_showlocation",{Location:location,Marker:this._positionMarker})},_isShowingError:false,_printError:function(message){alert(message)},_onKeyUp:function(e){var esc=27;if(e.keyCode===esc){this.cancelSearch()}},_getZoomLevel:function(){if(!this.options.retainZoomLevel){return this._config.zoomLevel}return this._map._zoom},_onInput:function(){if(this._isShowingError){this.resetLink("glass");L.DomUtil.addClass(this._msgbox,"displayNone");this._isShowingError=false}},_onKeyPress:function(e){var enterKey=13;if(e.keyCode===enterKey){e.preventDefault();e.stopPropagation();this.startSearch()}}});L.gdGeoCode.Provider.OpenStreetMap=L.Class.extend({options:{},initialize:function(options){options=L.Util.setOptions(this,options)},GetServiceUrl:function(qry){var parameters=L.Util.extend({q:qry,format:"json"},this.options);return(location.protocol==="https:"?"https:":"http:")+"https://nominatim.openstreetmap.org/search"+L.Util.getParamString(parameters)},ParseJSON:function(data){var results=[];for(var i=0;i<data.length;i++){var boundingBox=data[i].boundingbox,northEastLatLng=new L.LatLng(boundingBox[1],boundingBox[3]),southWestLatLng=new L.LatLng(boundingBox[0],boundingBox[2]);if(data[i].address)data[i].address.type=data[i].type;results.push(new L.gdGeoCode.Result(data[i].lon,data[i].lat,data[i].display_name,new L.LatLngBounds([northEastLatLng,southWestLatLng]),data[i].address))}return results}});function gd_highlight(data,search,start,end){if(typeof start==="undefined"){start='<span class="gdOH">';end="</span>"}if(typeof end==="undefined"){end="</span>"}search=(search+"").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1");return data.replace(new RegExp("("+search+")","gi"),start+"$1"+end)}function gd_osm_parse_item(item){var formated=item.display_name;item.country="";item.state="";item.city="";item.postcode="";item.country_code="";if(item.address){var address=item.address;if(address.country){item.country=address.country;formated=gd_osm_parse_name(formated,address.country)}if(address.postcode){item.postcode=address.postcode;formated=gd_osm_parse_name(formated,address.postcode)}if(address.state){item.state=address.state;item.state=item.state.replace(" (state)","");formated=gd_osm_parse_name(formated,address.state)}if(address.county){item.city=address.county;formated=gd_osm_parse_name(formated,address.county)}if(address.state_district){item.city=address.state_district;formated=gd_osm_parse_name(formated,address.state_district)}if(address.city){item.city=address.city;formated=gd_osm_parse_name(formated,address.city)}else if(address.city_district){item.city=address.city_district;formated=gd_osm_parse_name(formated,address.city_district)}else if(address.town){item.city=address.town;formated=gd_osm_parse_name(formated,address.town)}if(address.country_code){item.country_code=address.country_code.toUpperCase()}if(address.state_district){formated=gd_osm_parse_name(formated,address.state_district)}}if(formated==""){if(item.city){formated=item.city}else{formated=item.display_name}}item.display_address=formated;return item}function gd_osm_parse_name(name,search){if(name==""||search==""){return name}search=", "+search;var n=name.toLowerCase().lastIndexOf(search.toLowerCase());var pat=new RegExp(search,"i");return name.slice(0,n)+name.slice(n).replace(pat,"")}function geocodePositionOSM(latLon,address,countrycodes,updateMap,callback){data={format:"json",addressdetails:1,limit:1};if(address){type="search";data.q=address;if(countrycodes){data.countrycodes=countrycodes.toLowerCase()}}else if(latLon&&typeof latLon==="object"){type="reverse";data.lat=latLon.lat;data.lon=latLon.lng}else{return}jQuery.ajax({url:(location.protocol==="https:"?"https:":"http:")+"https://nominatim.openstreetmap.org/"+type,dataType:"json",data:data,success:function(data,textStatus,jqXHR){if(type=="search"&&data.length){data=data[0]}data=gd_osm_parse_item(data);if(typeof callback==="function"){callback(data)}else{geocodeResponseOSM(data,updateMap)}},error:function(jqXHR,textStatus,errorThrown){console.log(errorThrown)},complete:function(jqXHR,textStatus){}})} 253 254(function(){(function(){var q={}.hasOwnProperty,r=[].slice;null!=this.L&&(this.OverlappingMarkerSpiderfier=function(){function n(c,b){var a,e,g,f,d=this;this.map=c;null==b&&(b={});for(a in b)q.call(b,a)&&(e=b[a],this[a]=e);this.initMarkerArrays();this.listeners={};f=["click","zoomend"];e=0;for(g=f.length;e<g;e++)a=f[e],this.map.addEventListener(a,function(){return d.unspiderfy()})}var d,k;d=n.prototype;d.VERSION="0.2.6";k=2*Math.PI;d.keepSpiderfied=!1;d.nearbyDistance=20;d.circleSpiralSwitchover=9;d.circleFootSeparation=25;d.circleStartAngle=k/12;d.spiralFootSeparation=28;d.spiralLengthStart=11;d.spiralLengthFactor=5;d.legWeight=1.5;d.legColors={usual:"#222",highlighted:"#f00"};d.initMarkerArrays=function(){this.markers=[];return this.markerListeners=[]};d.addMarker=function(c){var b,a=this;if(null!=c._oms)return this;c._oms=!0;b=function(){return a.spiderListener(c)};c.addEventListener("click",b);this.markerListeners.push(b);this.markers.push(c);return this};d.getMarkers=function(){return this.markers.slice(0)};d.removeMarker=function(c){var b,a;null!=c._omsData&&this.unspiderfy();b=this.arrIndexOf(this.markers,c);if(0>b)return this;a=this.markerListeners.splice(b,1)[0];c.removeEventListener("click",a);delete c._oms;this.markers.splice(b,1);return this};
254d.clearMarkers=function(){var c,b,a,e,g;this.unspiderfy();g=this.markers;c=a=0;for(e=g.length;a<e;c=++a)b=g[c],c=this.markerListeners[c],b.removeEventListener("click",c),delete b._oms;this.initMarkerArrays();return this};d.addListener=function(c,b){var a,e;(null!=(e=(a=this.listeners)[c])?e:a[c]=[]).push(b);return this};d.removeListener=function(c,b){var a;a=this.arrIndexOf(this.listeners[c],b);0>a||this.listeners[c].splice(a,1);return this};d.clearListeners=function(c){this.listeners[c]=[];return this};d.trigger=function(){var c,b,a,e,g,f;b=arguments[0];c=2<=arguments.length?r.call(arguments,1):[];b=null!=(a=this.listeners[b])?a:[];f=[];e=0;for(g=b.length;e<g;e++)a=b[e],f.push(a.apply(null,c));return f};d.generatePtsCircle=function(c,b){var a,e,g,f,d;g=this.circleFootSeparation*(2+c)/k;e=k/c;d=[];for(a=f=0;0<=c?f<c:f>c;a=0<=c?++f:--f)a=this.circleStartAngle+a*e,d.push(new L.Point(b.x+g*Math.cos(a),b.y+g*Math.sin(a)));return d};d.generatePtsSpiral=function(c,b){var a,e,g,f,d;g=this.spiralLengthStart;a=0;d=[];for(e=f=0;0<=c?f<c:f>c;e=0<=c?++f:--f)a+=this.spiralFootSeparation/g+5e-4*e,e=new L.Point(b.x+g*Math.cos(a),b.y+g*Math.sin(a)),g+=k*this.spiralLengthFactor/a,d.push(e);return d};d.spiderListener=function(c){var b,a,e,g,f,d,h,k,l;(b=null!=c._omsData)&&this.keepSpiderfied||this.unspiderfy();if(b)return this.trigger("click",c);g=[];f=[];d=this.nearbyDistance*this.nearbyDistance;e=this.map.latLngToLayerPoint(c.getLatLng());l=this.markers;h=0;for(k=l.length;h<k;h++)b=l[h],this.map.hasLayer(b)&&(a=this.map.latLngToLayerPoint(b.getLatLng()),this.ptDistanceSq(a,e)<d?g.push({marker:b,markerPt:a}):f.push(b));return 1===g.length?this.trigger("click",c):this.spiderfy(g,f)};d.makeHighlightListeners=function(c){var b=this;return{highlight:function(){return c._omsData.leg.setStyle({color:b.legColors.highlighted})},unhighlight:function(){return c._omsData.leg.setStyle({color:b.legColors.usual})}}};d.spiderfy=function(c,b){var a,e,g,d,p,h,k,l,n,m;this.spiderfying=!0;m=c.length;a=this.ptAverage(function(){var a,b,e;e=[];a=0;for(b=c.length;a<b;a++)k=c[a],e.push(k.markerPt);return e}());d=m>=this.circleSpiralSwitchover?this.generatePtsSpiral(m,a).reverse():this.generatePtsCircle(m,a);a=function(){var a,b,k,m=this;k=[];a=0;for(b=d.length;a<b;a++)g=d[a],e=this.map.layerPointToLatLng(g),n=this.minExtract(c,function(a){return m.ptDistanceSq(a.markerPt,g)}),h=n.marker,p=new L.Polyline([h.getLatLng(),e],{color:this.legColors.usual,weight:this.legWeight,clickable:!1}),this.map.addLayer(p),h._omsData={usualPosition:h.getLatLng(),leg:p},this.legColors.highlighted!==this.legColors.usual&&(l=this.makeHighlightListeners(h),h._omsData.highlightListeners=l,h.addEventListener("mouseover",l.highlight),h.addEventListener("mouseout",l.unhighlight)),h.setLatLng(e),h.setZIndexOffset(1e6),k.push(h);return k}.call(this);delete this.spiderfying;this.spiderfied=!0;return this.trigger("spiderfy",a,b)};d.unspiderfy=function(c){var b,a,e,d,f,k,h;null==c&&(c=null);if(null==this.spiderfied)return this;this.unspiderfying=!0;d=[];e=[];h=this.markers;f=0;for(k=h.length;f<k;f++)b=h[f],null!=b._omsData?(this.map.removeLayer(b._omsData.leg),b!==c&&b.setLatLng(b._omsData.usualPosition),b.setZIndexOffset(0),a=b._omsData.highlightListeners,null!=a&&(b.removeEventListener("mouseover",a.highlight),b.removeEventListener("mouseout",a.unhighlight)),delete b._omsData,d.push(b)):e.push(b);delete this.unspiderfying;delete this.spiderfied;this.trigger("unspiderfy",d,e);return this};d.ptDistanceSq=function(c,b){var a,e;a=c.x-b.x;e=c.y-b.y;return a*a+e*e};d.ptAverage=function(c){var b,a,e,d,f;d=a=e=0;for(f=c.length;d<f;d++)b=c[d],a+=b.x,e+=b.y;c=c.length;return new L.Point(a/c,e/c)};d.minExtract=function(c,b){var a,d,g,f,k,h;g=k=0;for(h=c.length;k<h;g=++k)if(f=c[g],f=b(f),"undefined"===typeof a||null===a||f<d)d=f,a=g;return c.splice(a,1)[0]};d.arrIndexOf=function(c,b){var a,d,g,f;if(null!=c.indexOf)return c.indexOf(b);a=g=0;for(f=c.length;g<f;a=++g)if(d=c[a],d===b)return a;return-1};return n}())}).call(this)}).call(this); 255 256(function(){var e,t,n,r,i,s={}.hasOwnProperty,o=function(e,t){function r(){this.constructor=e}for(var n in t){if(s.call(t,n))e[n]=t[n]}r.prototype=t.prototype;e.prototype=new r;e.__super__=t.prototype;return e};r=function(){function e(){this.options_index=0;this.parsed=[]}e.prototype.add_node=function(e){if(e.nodeName.toUpperCase()==="OPTGROUP"){return this.add_group(e)}else{return this.add_option(e)}};e.prototype.add_group=function(e){var t,n,r,i,s,o;t=this.parsed.length;this.parsed.push({array_index:t,group:true,label:this.escapeExpression(e.label),children:0,disabled:e.disabled});s=e.childNodes;o=[];for(r=0,i=s.length;r<i;r++){n=s[r];o.push(this.add_option(n,t,e.disabled))}return o};e.prototype.add_option=function(e,t,n){if(e.nodeName.toUpperCase()==="OPTION"){if(e.text!==""){if(t!=null){this.parsed[t].children+=1}this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:n===true?n:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})}else{this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:true})}return this.options_index+=1}};e.prototype.escapeExpression=function(e){var t,n;if(e==null||e===false){return""}if(!/[\&\<\>\"\'\`]/.test(e)){return e}t={"<":"<",">":">",'"':""","'":"'","`":"`"};n=/&(?!\w+;)|[\<\>\"\'\`]/g;return e.replace(n,function(e){return t[e]||"&"})};return e}();r.select_to_array=function(e){var t,n,i,s,o;n=new r;o=e.childNodes;for(i=0,s=o.length;i<s;i++){t=o[i];n.add_node(t)}return n.parsed};t=function(){function e(t,n){this.form_field=t;this.options=n!=null?n:{};if(!e.browser_is_supported()){return}this.is_multiple=this.form_field.multiple;this.set_default_text();this.set_default_values();this.setup();this.set_up_html();this.register_observers()}e.prototype.set_default_values=function(){var e=this;this.click_test_action=function(t){return e.test_active_click(t)};this.activate_action=function(t){return e.activate_field(t)};this.active_field=false;this.mouse_on_container=false;this.results_showing=false;this.result_highlighted=null;this.result_single_selected=null;this.allow_single_deselect=this.options.allow_single_deselect!=null&&this.form_field.options[0]!=null&&this.form_field.options[0].text===""?this.options.allow_single_deselect:false;this.disable_search_threshold=this.options.disable_search_threshold||0;this.disable_search=this.options.disable_search||false;this.enable_split_word_search=this.options.enable_split_word_search!=null?this.options.enable_split_word_search:true;this.group_search=this.options.group_search!=null?this.options.group_search:true;this.search_contains=this.options.search_contains||false;this.single_backstroke_delete=this.options.single_backstroke_delete!=null?this.options.single_backstroke_delete:true;this.max_selected_options=this.options.max_selected_options||Infinity;this.inherit_select_classes=this.options.inherit_select_classes||false;this.display_selected_options=this.options.display_selected_options!=null?this.options.display_selected_options:true;return this.display_disabled_options=this.options.display_disabled_options!=null?this.options.display_disabled_options:true};e.prototype.set_default_text=function(){if(this.form_field.getAttribute("data-placeholder")){this.default_text=this.form_field.getAttribute("data-placeholder")}else if(this.is_multiple){this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text}else{this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text}return this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text};e.prototype.mouse_enter=function(){return this.mouse_on_container=true};e.prototype.mouse_leave=function(){return this.mouse_on_container=false};e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field){return setTimeout(function(){return t.container_mousedown()},50)}}else{if(!this.active_field){return this.activate_field()}}};e.prototype.input_blur=function(e){var t=this;if(!this.mouse_on_container){this.active_field=false;return setTimeout(function(){return t.blur_test()},100)}};e.prototype.results_option_build=function(e){var t,n,r,i,s;t="";s=this.results_data;for(r=0,i=s.length;r<i;r++){n=s[r];if(n.group){t+=this.result_add_group(n)}else{t+=this.result_add_option(n)}if(e!=null?e.first:void 0){if(n.selected&&this.is_multiple){this.choice_build(n)}else if(n.selected&&!this.is_multiple){this.single_set_selected_text(n.text)}}}return t};e.prototype.result_add_option=function(e){var t,n;if(!e.search_match){return""}if(!this.include_option_in_results(e)){return""}t=[];
256if(!e.disabled&&!(e.selected&&this.is_multiple)){t.push("active-result")}if(e.disabled&&!(e.selected&&this.is_multiple)){t.push("disabled-result")}if(e.selected){t.push("result-selected")}if(e.group_array_index!=null){t.push("group-option")}if(e.classes!==""){t.push(e.classes)}n=e.style.cssText!==""?' style="'+e.style+'"':"";return'<li class="'+t.join(" ")+'"'+n+' data-option-array-index="'+e.array_index+'">'+e.search_text+"</li>"};e.prototype.result_add_group=function(e){if(!(e.search_match||e.group_match)){return""}if(!(e.active_options>0)){return""}return'<li class="group-result">'+e.search_text+"</li>"};e.prototype.results_update_field=function(){this.set_default_text();if(!this.is_multiple){this.results_reset_cleanup()}this.result_clear_highlight();this.result_single_selected=null;this.results_build();if(this.results_showing){return this.winnow_results()}};e.prototype.results_toggle=function(){if(this.results_showing){return this.results_hide()}else{return this.results_show()}};e.prototype.results_search=function(e){if(this.results_showing){return this.winnow_results()}else{return this.results_show()}};e.prototype.winnow_results=function(){var e,t,n,r,i,s,o,u,a,f,l,c,h,tt;this.no_results_clear();i=0;o=this.get_search_text();e=o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");r=this.search_contains?"":"^";n=new RegExp(r+e,"i");f=new RegExp(e,"i");h=this.results_data;for(l=0,c=h.length;l<c;l++){t=h[l];t.search_match=false;s=null;if(this.include_option_in_results(t)){if(t.group){t.group_match=false;t.active_options=0}if(t.group_array_index!=null&&this.results_data[t.group_array_index]){s=this.results_data[t.group_array_index];if(s.active_options===0&&s.search_match){i+=1}s.active_options+=1}if(!(t.group&&!this.group_search)){t.search_text=t.group?t.label:t.html;t.search_match=this.search_string_match(t.search_text,n);if(t.search_match&&!t.group){i+=1}if(t.search_match){if(o.length){u=t.search_text.search(f);if(u!=0){var tt=gd_replace_accents(t.search_text);u=tt.search(f)}a=t.search_text.substr(0,u+o.length)+"</em>"+t.search_text.substr(u+o.length);t.search_text=a.substr(0,u)+"<em>"+a.substr(u)}if(s!=null){s.group_match=true}}else if(t.group_array_index!=null&&this.results_data[t.group_array_index].search_match){t.search_match=true}}}}this.result_clear_highlight();if(i<1&&o.length){this.update_results_content("");return this.no_results(o)}else{this.update_results_content(this.results_option_build());return this.winnow_results_set_highlight()}};e.prototype.search_string_match=function(e,t){var n,r,i,s,et;if(t.test(e)){return true}else if(this.enable_split_word_search&&(e.indexOf(" ")>=0||e.indexOf("[")===0)){r=e.replace(/\[|\]/g,"").split(" ");if(r.length){for(i=0,s=r.length;i<s;i++){n=r[i];if(t.test(n)){return true}}}et=gd_replace_accents(e);r=et.replace(/\[|\]/g,"").split(" ");if(r.length){for(i=0,s=r.length;i<s;i++){n=r[i];if(t.test(n)){return true}}}}else{et=gd_replace_accents(e);if(t.test(et)){return true}}};e.prototype.choices_count=function(){var e,t,n,r;if(this.selected_option_count!=null){return this.selected_option_count}this.selected_option_count=0;r=this.form_field.options;for(t=0,n=r.length;t<n;t++){e=r[t];if(e.selected){this.selected_option_count+=1}}return this.selected_option_count};e.prototype.choices_click=function(e){e.preventDefault();if(!(this.results_showing||this.is_disabled)){return this.results_show()}};e.prototype.keyup_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode;this.search_field_scale();switch(t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0){return this.keydown_backstroke()}else if(!this.pending_backstroke){this.result_clear_highlight();return this.results_search()}break;case 13:e.preventDefault();if(this.results_showing){return this.result_select(e)}break;case 27:if(this.results_showing){this.results_hide()}return true;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}};e.prototype.container_width=function(){if(this.options.width!=null){return this.options.width}else{return""+this.form_field.offsetWidth+"px"}};e.prototype.include_option_in_results=function(e){if(this.is_multiple&&!this.display_selected_options&&e.selected){return false}if(!this.display_disabled_options&&e.disabled){return false}if(e.empty){return false}return true};e.browser_is_supported=function(){if(window.navigator.appName==="Microsoft Internet Explorer"){return document.documentMode>=8}if(/iP(od|hone)/i.test(window.navigator.userAgent)){return false}if(/Android/i.test(window.navigator.userAgent)){if(/Mobile/i.test(window.navigator.userAgent)){return false}}return true};e.default_multiple_text="Select Some Options";e.default_single_text="Select an Option";e.default_no_result_text="No results match";return e}();e=jQuery;e.fn.extend({chosen:function(r){if(!t.browser_is_supported()){return this}return this.each(function(t){var i,s;i=e(this);s=i.data("chosen");if(r==="destroy"&&s){s.destroy()}
256else if(!s){i.data("chosen",new n(this,r))}})}});n=function(t){function n(){i=n.__super__.constructor.apply(this,arguments);return i}o(n,t);n.prototype.setup=function(){this.form_field_jq=e(this.form_field);this.current_selectedIndex=this.form_field.selectedIndex;return this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")};n.prototype.set_up_html=function(){var t,n;t=["geodir-chosen-container"];t.push("geodir-chosen-container-"+(this.is_multiple?"multi":"single"));if(this.inherit_select_classes&&this.form_field.className){t.push(this.form_field.className)}if(this.is_rtl){t.push("chosen-rtl")}n={"class":t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title};if(this.form_field.id.length){n.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"}this.container=e("<div />",n);if(this.is_multiple){this.container.html('<div class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></div><div class="chosen-drop"><div class="chosen-results"></div></div>')}else{this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><div class="chosen-results"></div></div>')}this.form_field_jq.hide().after(this.container);this.dropdown=this.container.find("div.chosen-drop").first();this.search_field=this.container.find("input").first();this.search_results=this.container.find("div.chosen-results").first();this.search_field_scale();this.search_no_results=this.container.find("li.no-results").first();if(this.is_multiple){this.search_choices=this.container.find("div.chosen-choices").first();this.search_container=this.container.find("li.search-field").first()}else{this.search_container=this.container.find("div.chosen-search").first();this.selected_item=this.container.find(".chosen-single").first()}this.results_build();this.set_tab_index();this.set_label_behavior();return this.form_field_jq.trigger("chosen:ready",{chosen:this})};n.prototype.register_observers=function(){var e=this;this.container.bind("mousedown.chosen",function(t){e.container_mousedown(t)});this.container.bind("mouseup.chosen",function(t){e.container_mouseup(t)});this.container.bind("mouseenter.chosen",function(t){e.mouse_enter(t)});this.container.bind("mouseleave.chosen",function(t){e.mouse_leave(t)});this.search_results.bind("mouseup.chosen",function(t){e.search_results_mouseup(t)});this.search_results.bind("mouseover.chosen",function(t){e.search_results_mouseover(t)});this.search_results.bind("mouseout.chosen",function(t){e.search_results_mouseout(t)});this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(t){e.search_results_mousewheel(t)});this.form_field_jq.bind("chosen:updated.chosen",function(t){e.results_update_field(t)});this.form_field_jq.bind("chosen:activate.chosen",function(t){e.activate_field(t)});this.form_field_jq.bind("chosen:open.chosen",function(t){e.container_mousedown(t)});this.search_field.bind("blur.chosen",function(t){e.input_blur(t)});this.search_field.bind("keyup.chosen",function(t){e.keyup_checker(t)});this.search_field.bind("keydown.chosen",function(t){e.keydown_checker(t)});this.search_field.bind("focus.chosen",function(t){e.input_focus(t)});if(this.is_multiple){return this.search_choices.bind("click.chosen",function(t){e.choices_click(t)})}else{return this.container.bind("click.chosen",function(e){e.preventDefault()})}};n.prototype.destroy=function(){e(document).unbind("click.chosen",this.click_test_action);if(this.search_field[0].tabIndex){this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex}this.container.remove();this.form_field_jq.removeData("chosen");return this.form_field_jq.show()};n.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled){this.container.addClass("chosen-disabled");this.search_field[0].disabled=true;if(!this.is_multiple){this.selected_item.unbind("focus.chosen",this.activate_action)}return this.close_field()}else{this.container.removeClass("chosen-disabled");this.search_field[0].disabled=false;if(!this.is_multiple){return this.selected_item.bind("focus.chosen",this.activate_action)}}};n.prototype.container_mousedown=function(t){if(!this.is_disabled){if(t&&t.type==="mousedown"&&!this.results_showing){t.preventDefault()}if(!(t!=null&&e(t.target).hasClass("search-choice-close"))){if(!this.active_field){if(this.is_multiple){this.search_field.val("")}e(document).bind("click.chosen",this.click_test_action);this.results_show()}else if(!this.is_multiple&&t&&(e(t.target)[0]===this.selected_item[0]||e(t.target).parents("a.chosen-single").length)){t.preventDefault();
256this.results_toggle()}return this.activate_field()}}};n.prototype.container_mouseup=function(e){if(e.target.nodeName==="ABBR"&&!this.is_disabled){return this.results_reset(e)}};n.prototype.search_results_mousewheel=function(e){var t,n,r;t=-((n=e.originalEvent)!=null?n.wheelDelta:void 0)||((r=e.originialEvent)!=null?r.detail:void 0);if(t!=null){e.preventDefault();if(e.type==="DOMMouseScroll"){t=t*40}return this.search_results.scrollTop(t+this.search_results.scrollTop())}};n.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("geodir-chosen-container-active")){return this.close_field()}};n.prototype.close_field=function(){e(document).unbind("click.chosen",this.click_test_action);this.active_field=false;this.results_hide();this.container.removeClass("geodir-chosen-container-active");this.clear_backstroke();this.show_search_field_default();return this.search_field_scale()};n.prototype.activate_field=function(){this.container.addClass("geodir-chosen-container-active");this.active_field=true;this.search_field.val(this.search_field.val());return this.search_field.focus()};n.prototype.test_active_click=function(t){if(this.container.is(e(t.target).closest(".geodir-chosen-container"))){return this.active_field=true}else{return this.close_field()}};n.prototype.results_build=function(){this.parsing=true;this.selected_option_count=null;this.results_data=r.select_to_array(this.form_field);if(this.is_multiple){this.search_choices.find("li.search-choice").remove()}else if(!this.is_multiple){this.single_set_selected_text();if(this.disable_search||this.form_field.options.length<=this.disable_search_threshold){this.search_field[0].readOnly=true;this.container.addClass("geodir-chosen-container-single-nosearch")}else{this.search_field[0].readOnly=false;this.container.removeClass("geodir-chosen-container-single-nosearch")}}this.update_results_content(this.results_option_build({first:true}));this.search_field_disabled();this.search_field_scale();return this.parsing=false};n.prototype.result_do_highlight=function(e){var t,n,r,i,s;if(e.length){this.result_clear_highlight();this.result_highlight=e;this.result_highlight.addClass("highlighted");r=parseInt(this.search_results.css("maxHeight"),10);s=this.search_results.scrollTop();i=r+s;n=this.result_highlight.position().top+this.search_results.scrollTop();t=n+this.result_highlight.outerHeight();if(t>=i){return this.search_results.scrollTop(t-r>0?t-r:0)}else if(n<s){return this.search_results.scrollTop(n)}}};n.prototype.result_clear_highlight=function(){if(this.result_highlight){this.result_highlight.removeClass("highlighted")}return this.result_highlight=null};n.prototype.results_show=function(){if(this.is_multiple&&this.max_selected_options<=this.choices_count()){this.form_field_jq.trigger("chosen:maxselected",{chosen:this});return false}this.container.addClass("chosen-with-drop");this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this});this.results_showing=true;this.search_field.focus();this.search_field.val(this.search_field.val());return this.winnow_results()};n.prototype.update_results_content=function(e){return this.search_results.html(e)};n.prototype.results_hide=function(){if(this.results_showing){this.result_clear_highlight();this.container.removeClass("chosen-with-drop");this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})}return this.results_showing=false};n.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex){t=this.form_field.tabIndex;this.form_field.tabIndex=-1;return this.search_field[0].tabIndex=t}};n.prototype.set_label_behavior=function(){var t=this;this.form_field_label=this.form_field_jq.parents("label");if(!this.form_field_label.length&&this.form_field.id.length){this.form_field_label=e("label[for='"+this.form_field.id+"']")}if(this.form_field_label.length>0){return this.form_field_label.bind("click.chosen",function(e){if(t.is_multiple){return t.container_mousedown(e)}else{return t.activate_field()}})}};n.prototype.show_search_field_default=function(){if(this.is_multiple&&this.choices_count()<1&&!this.active_field){this.search_field.val(this.default_text);return this.search_field.addClass("default")}else{this.search_field.val("");return this.search_field.removeClass("default")}};n.prototype.search_results_mouseup=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n.length){this.result_highlight=n;this.result_select(t);return this.search_field.focus()}};n.prototype.search_results_mouseover=function(t){var n;n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first();if(n){return this.result_do_highlight(n)}};n.prototype.search_results_mouseout=function(t){if(e(t.target).hasClass("active-result"||e(t.target).parents(".active-result").first())){return this.result_clear_highlight()}};n.prototype.choice_build=function(t){var n,r,i=this;n=e("<li />",{"class":"search-choice"}).html("<span>"+t.html+"</span>");if(t.disabled){n.addClass("search-choice-disabled")}else{r=e("<a />",{"class":"search-choice-close","data-option-array-index":t.array_index});r.bind("click.chosen",function(e){return i.choice_destroy_link_click(e)});n.append(r)}return this.search_container.before(n)};n.prototype.choice_destroy_link_click=function(t){t.preventDefault();t.stopPropagation();if(!this.is_disabled){return this.choice_destroy(e(t.target))}};n.prototype.choice_destroy=function(e){if(this.result_deselect(e[0].getAttribute("data-option-array-index"))){this.show_search_field_default();if(this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1){this.results_hide()}e.parents("li").first().remove();return this.search_field_scale()}};n.prototype.results_reset=function(){this.form_field.options[0].selected=true;this.selected_option_count=null;this.single_set_selected_text();this.show_search_field_default();this.results_reset_cleanup();this.form_field_jq.trigger("change");if(this.active_field){return this.results_hide()}};n.prototype.results_reset_cleanup=function(){this.current_selectedIndex=this.form_field.selectedIndex;return this.selected_item.find("abbr").remove()};n.prototype.result_select=function(e){var t,n,r;if(this.result_highlight){t=this.result_highlight;this.result_clear_highlight();if(this.is_multiple&&this.max_selected_options<=this.choices_count()){this.form_field_jq.trigger("chosen:maxselected",{chosen:this});return false}if(this.is_multiple){t.removeClass("active-result")}else{if(this.result_single_selected){this.result_single_selected.removeClass("result-selected");r=this.result_single_selected[0].getAttribute("data-option-array-index");this.results_data[r].selected=false}this.result_single_selected=t}t.addClass("result-selected");n=this.results_data[t[0].getAttribute("data-option-array-index")];n.selected=true;this.form_field.options[n.options_index].selected=true;this.selected_option_count=null;if(this.is_multiple){this.choice_build(n)}else{this.single_set_selected_text(n.text)}if(!((e.metaKey||e.ctrlKey)&&this.is_multiple)){this.results_hide()}this.search_field.val("");if(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex){this.form_field_jq.trigger("change",{selected:this.form_field.options[n.options_index].value})}this.current_selectedIndex=this.form_field.selectedIndex;return this.search_field_scale()}};n.prototype.single_set_selected_text=function(e){if(e==null){e=this.default_text}if(e===this.default_text){this.selected_item.addClass("chosen-default")}else{this.single_deselect_control_build();this.selected_item.removeClass("chosen-default")}return this.selected_item.find("span").text(e)};n.prototype.result_deselect=function(e){var t;t=this.results_data[e];if(!this.form_field.options[t.options_index].disabled){t.selected=false;this.form_field.options[t.options_index].selected=false;this.selected_option_count=null;this.result_clear_highlight();if(this.results_showing){this.winnow_results()}this.form_field_jq.trigger("change",{deselected:this.form_field.options[t.options_index].value});this.search_field_scale();return true}else{return false}};n.prototype.single_deselect_control_build=function(){if(!this.allow_single_deselect){return}if(!this.selected_item.find("abbr").length){this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')}return this.selected_item.addClass("chosen-single-with-deselect")};n.prototype.get_search_text=function(){if(this.search_field.val()===this.default_text){return""}else{return e("<div/>").text(e.trim(this.search_field.val())).html()}};n.prototype.winnow_results_set_highlight=function(){var e,t;t=!this.is_multiple?this.search_results.find(".result-selected.active-result"):[];e=t.length?t.first():this.search_results.find(".active-result").first();if(e!=null){return this.result_do_highlight(e)}};n.prototype.no_results=function(t){var n;n=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>');n.find("span").first().html(t);return this.search_results.append(n)};n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()};n.prototype.keydown_arrow=function(){var e;if(this.results_showing&&this.result_highlight){e=this.result_highlight.nextAll("li.active-result").first();if(e){return this.result_do_highlight(e)}}else{return this.results_show()}};n.prototype.keyup_arrow=function(){var e;if(!this.results_showing&&!this.is_multiple){return this.results_show()}else if(this.result_highlight){e=this.result_highlight.prevAll("li.active-result");if(e.length){return this.result_do_highlight(e.first())}else{if(this.choices_count()>0){this.results_hide()}return this.result_clear_highlight()}}};n.prototype.keydown_backstroke=function(){var e;if(this.pending_backstroke){this.choice_destroy(this.pending_backstroke.find("a").first());return this.clear_backstroke()}else{e=this.search_container.siblings("li.search-choice").last();if(e.length&&!e.hasClass("search-choice-disabled")){this.pending_backstroke=e;if(this.single_backstroke_delete){return this.keydown_backstroke()}else{return this.pending_backstroke.addClass("search-choice-focus")}}}};n.prototype.clear_backstroke=function(){if(this.pending_backstroke){this.pending_backstroke.removeClass("search-choice-focus")}return this.pending_backstroke=null};n.prototype.keydown_checker=function(e){var t,n;t=(n=e.which)!=null?n:e.keyCode;this.search_field_scale();if(t!==8&&this.pending_backstroke){this.clear_backstroke()}switch(t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:if(this.results_showing&&!this.is_multiple){this.result_select(e)}this.mouse_on_container=false;break;case 13:e.preventDefault();break;case 38:e.preventDefault();this.keyup_arrow();break;case 40:e.preventDefault();this.keydown_arrow();break}};n.prototype.search_field_scale=function(){var t,n,r,i,s,o,u,a,f;if(this.is_multiple){r=0;u=0;s="position:absolute; left: -1000px; top: -1000px; display:none;";o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(a=0,f=o.length;a<f;a++){i=o[a];s+=i+":"+this.search_field.css(i)+";"}t=e("<div />",{style:s});t.text(this.search_field.val());e("body").append(t);u=t.width()+25;t.remove();n=this.container.outerWidth();if(u>n-10){u=n-10}return this.search_field.css({width:u+"px"})}};return n}(t)}
256).call(this); 257 258(function($){return $.fn.ajaxChosen=function(settings,callback,chosenOptions){var chosenXhr,defaultOptions,options,select;if(settings==null){settings={}}if(chosenOptions==null){chosenOptions={}}defaultOptions={minTermLength:0,afterTypeDelay:500,addSearchTermOnNorecord:0,noLocationUrl:0,jsonTermKey:"term",jsonTermKeyObject:"term",keepTypingMsg:"Keep typing...",lookingForMsg:"Looking for"};select=this;chosenXhr=null;options=$.extend({},defaultOptions,$(select).data(),settings);this.chosen(chosenOptions?chosenOptions:{});return this.each(function(){return $(this).next(".geodir-chosen-container").find(".search-field > input, .chosen-search > input").bind("keyup",function(){var field,msg,success,untrimmed_val,val;untrimmed_val=$(this).val();val=$.trim($(this).val());msg=val.length<options.minTermLength?options.keepTypingMsg:options.lookingForMsg+(" '"+val+"'");select.next(".geodir-chosen-container").find(".no-results").text(msg);$(this).data("prevVal",val);if(this.timer){clearTimeout(this.timer)}if(val.length<options.minTermLength){return false}if(val.length==0){select.find("option").each(function(){return $(this).remove()});$("<option />").attr("value","").html("").appendTo(select);select.trigger("chosen:updated")}field=$(this);if(options.data==null){options.data={}}options.data[options.jsonTermKey]=val;if(options.dataCallback!=null){options.data=options.dataCallback(options.data)}success=options.success;if(options.success==null){options.success=function(data){var items,nbItems,selected_values;if(data==null){return}selected_values=[];select.find("option").each(function(){if(!$(this).is(":selected")){return $(this).remove()}else{return selected_values.push($(this).val()+"-"+$(this).text())}});select.find("optgroup:empty").each(function(){return $(this).remove()});items=callback!=null?callback(data,field):data;nbItems=0;$.each(items,function(i,element){var group,text,value;nbItems++;if(element.group){group=select.find("optgroup[label='"+element.text+"']");if(!group.size()){group=$("<optgroup />")}group.attr("label",element.text).appendTo(select);return $.each(element.items,function(i,element){var text,value;if(typeof element==="string"){value=i;text=element}else{value=element.value;text=element.text}if($.inArray(value+"-"+text,selected_values)===-1){return $("<option />").attr("value",value).html(text).appendTo(group)}})}else{if(typeof element==="string"){value=i;text=element}else{value=element.value;text=element.text}if($.inArray(value+"-"+text,selected_values)===-1){return $("<option />").attr("value",value).html(text).appendTo(select)}}});if(nbItems){select.trigger("chosen:updated")}else{select.data().chosen.no_results_clear();select.data().chosen.no_results(field.val())}if(settings.success!=null){settings.success(data)}}}return this.timer=setTimeout(function(){if(chosenXhr){chosenXhr.abort()}return chosenXhr=$.ajax(options)},options.afterTypeDelay)})})}})(jQuery); 259 260/*! 261* jquery.inputmask.bundle.js 262* https://github.com/RobinHerbots/Inputmask 263* Copyright (c) 2010 - 2018 Robin Herbots 264* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) 265* Version: 4.0.1-beta.16 266*/ 267 268!function(modules) { 269 var installedModules = {}; 270 function __webpack_require__(moduleId) { 271 if (installedModules[moduleId]) return installedModules[moduleId].exports; 272 var module = installedModules[moduleId] = { 273 i: moduleId, 274 l: !1, 275 exports: {} 276 }; 277 return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__), 278 module.l = !0, module.exports; 279 } 280 __webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) { 281 __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { 282 enumerable: !0, 283 get: getter 284 }); 285 }, __webpack_require__.r = function(exports) { 286 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, { 287 value: "Module" 288 }), Object.defineProperty(exports, "__esModule", { 289 value: !0 290 }); 291 }, __webpack_require__.t = function(value, mode) { 292 if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value; 293 if (4 & mode && "object" == typeof value && value && value.__esMo
293dule) return value; 294 var ns = Object.create(null); 295 if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", { 296 enumerable: !0, 297 value: value 298 }), 2 & mode && "string" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) { 299 return value[key]; 300 }.bind(null, key)); 301 return ns; 302 }, __webpack_require__.n = function(module) { 303 var getter = module && module.__esModule ? function() { 304 return module.default; 305 } : function() { 306 return module; 307 }; 308 return __webpack_require__.d(getter, "a", getter), getter; 309 }, __webpack_require__.o = function(object, property) { 310 return Object.prototype.hasOwnProperty.call(object, property); 311 }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 0); 312}([ function(module, exports, __webpack_require__) { 313 "use strict"; 314 __webpack_require__(1), __webpack_require__(7), __webpack_require__(8), __webpack_require__(9); 315 var _inputmask2 = _interopRequireDefault(__webpack_require__(4)), _inputmask4 = _interopRequireDefault(__webpack_require__(2)), _jquery2 = _interopRequireDefault(__webpack_require__(3)); 316 function _interopRequireDefault(obj) { 317 return obj && obj.__esModule ? obj : { 318 default: obj 319 }; 320 } 321 _inputmask4.default === _jquery2.default && __webpack_require__(10), window.Inputmask = _inputmask2.default; 322}, function(module, exports, __webpack_require__) { 323 "use strict"; 324 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 325 "function" == typeof Symbol && Symbol.iterator; 326 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2), __webpack_require__(4) ], 327 void 0 === (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function($, Inputmask) { 328 var formatCode = { 329 d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ], 330 dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() { 331 return pad(Date.prototype.getDate.call(this), 2); 332 } ], 333 ddd: [ "" ], 334 dddd: [ "" ], 335 m: [ "[1-9]|1[012]", Date.prototype.setMonth, "month", function() { 336 return Date.prototype.getMonth.call(this) + 1; 337 } ], 338 mm: [ "0[1-9]|1[012]", Date.prototype.setMonth, "month", function() { 339 return pad(Date.prototype.getMonth.call(this) + 1, 2); 340 } ], 341 mmm: [ "" ], 342 mmmm: [ "" ], 343 yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() { 344 return pad(Date.prototype.getFullYear.call(this), 2); 345 } ], 346 yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() { 347 return pad(Date.prototype.getFullYear.call(this), 4); 348 } ], 349 h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 350 hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() { 351 return pad(Date.prototype.getHours.call(this), 2); 352 } ], 353 hhh: [ "[0-9]+", Date.prototype.setHours, "hours", Date.prototype.getHours ], 354 H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 355 HH: [ "[01][0-9]|2[0-3]", Date.prototype.setHours, "hours", function() { 356 return pad(Date.prototype.getHours.call(this), 2); 357 } ], 358 HHH: [ "[0-9]+", Date.prototype.setHours, "hours", Date.prototype.getHours ], 359 M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ], 360 MM: [ "[0-5][0-9]", Date.prototype.setMinutes, "minutes", function() { 361 return pad(Date.prototype.getMinutes.call(this), 2); 362 } ], 363 s: [ "[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds ], 364 ss: [ "[0-5][0-9]", Date.prototype.setSeconds, "seconds", function() { 365 return pad(Date.prototype.getSeconds.call(this), 2); 366 } ], 367 l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() { 368 return pad(Date.prototype.getMilliseconds.call(this), 3); 369 } ], 370 L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() { 371 return pad(Date.prototype.getMilliseconds.call(this), 2); 372 } ], 373 t: [ "[ap]" ], 374 tt: [ "[ap]m" ], 375 T: [ "[AP]" ], 376 TT: [ "[AP]M" ], 377 Z: [ "" ], 378 o: [ "" ], 379 S: [ "" ] 380 }, formatAlias = { 381 isoDate: "yyyy-mm-dd", 382 isoTime: "HH:MM:ss", 383 isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", 384 isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" 385 }; 386 function getTokenizer(opts) { 387 if (!opts.tokenizer) { 388 var tokens = []; 389 for (var ndx in formatCode) -1 === tokens.indexOf(ndx[0]) && tokens.push(ndx[0]); 390 opts.tokenizer = "(" + tokens.join("+|") + ")+?|.", opts.tokenizer = new RegExp(opts.tokenizer, "g"); 391 } 392 return opts.tokenizer; 393 } 394 function parse(format, dateObjValue, opts) { 395 for (var match, mask = ""; match = getTokenizer(opts).exec(format); ) if (void 0 === dateObjValue) if (formatCode[match[0]]) mask += "(" + formatCode[match[0]][0] + ")"; else switch (match[0]) { 396 case "[": 397 mask += "("; 398 break; 399 400 case "]": 401 mask += ")?"; 402 break; 403 404 default: 405 mask += Inputmask.escapeRegex(match[0]); 406 } else if (formatCode[match[0]]) { 407 var getFn = formatCode[match[0]][3]; 408 mask += getFn.call(dateObjValue.date); 409 } else mask += match[0]; 410 return mask; 411 } 412 function pad(val, len) { 413 for (val = String(val), len = len || 2; val.length < len; ) val = "0" + val; 414 return val; 415 } 416 function analyseMask(maskString, format, opts) { 417 var targetProp, match, dateOperation, targetValidator, dateObj = { 418 date: new Date(1, 0, 1) 419 }, mask = maskString; 420 function extendProperty(value) { 421 var correctedValue; 422 if (opts.min && opts.min[targetProp] || opts.max && opts.max[targetProp]) { 423 var min = opts.min && opts.min[targetProp] || opts.max[targetProp], max = opts.max && opts.max[targetProp] || opts.min[targetProp]; 424 for (correctedValue = value.replace(/[^0-9]/g, ""), correctedValue += (min.indexOf(correctedValue) < max.indexOf(correctedValue) ? max : min).toString().substr(correctedValue.length); !new RegExp(targetValidator).test(correctedValue); ) correctedValue--; 425 } else correctedValue = value.replace(/[^0-9]/g, "0"); 426 return correctedValue; 427 } 428 function setValue(dateObj, value, opts) { 429 dateObj[targetProp] = extendProperty(value), dateObj["raw" + targetProp] = value,
430 void 0 !== dateOperation && dateOperation.call(dateObj.date, "month" == targetProp ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]); 431 } 432 if ("string" == typeof mask) { 433 for (;match = getTokenizer(opts).exec(format); ) { 434 var value = mask.slice(0, match[0].length); 435 formatCode.hasOwnProperty(match[0]) && (targetValidator = formatCode[match[0]][0], 436 targetProp = formatCode[match[0]][2], dateOperation = formatCode[match[0]][1], setValue(dateObj, value)), 437 mask = mask.slice(value.length); 438 } 439 return dateObj; 440 } 441 } 442 return Inputmask.extendAliases({ 443 datetime: { 444 mask: function(opts) { 445 return formatCode.S = opts.i18n.ordinalSuffix.join("|"), opts.inputFormat = formatAlias[opts.inputFormat] || opts.inputFormat, 446 opts.displayFormat = formatAlias[opts.displayFormat] || opts.displayFormat || opts.inputFormat, 447 opts.outputFormat = formatAlias[opts.outputFormat] || opts.outputFormat || opts.inputFormat, 448 opts.placeholder = "" !== opts.placeholder ? opts.placeholder : opts.inputFormat.replace(/[\[\]]/, ""), 449 opts.min = analyseMask(opts.min, opts.inputFormat, opts), opts.max = analyseMask(opts.max, opts.inputFormat, opts), 450 opts.regex = parse(opts.inputFormat, void 0, opts), null; 451 }, 452 placeholder: "", 453 inputFormat: "isoDateTime", 454 displayFormat: void 0, 455 outputFormat: void 0, 456 min: null, 457 max: null, 458 i18n: { 459 dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ], 460 monthNames: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
460November", "December" ], 461 ordinalSuffix: [ "st", "nd", "rd", "th" ] 462 }, 463 postValidation: function(buffer, pos, currentResult, opts) { 464 var result = currentResult, dateParts = analyseMask(buffer.join(""), opts.inputFormat, opts); 465 return result && dateParts.date.getTime() == dateParts.date.getTime() && (result = (result = function(dateParts, currentResult) { 466 return (!isFinite(dateParts.rawday) || "29" == dateParts.day && !isFinite(dateParts.rawyear) || new Date(dateParts.date.getFullYear(), isFinite(dateParts.rawmonth) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day) && currentResult; 467 }(dateParts, result)) && function(dateParts, opts) { 468 var result = !0; 469 if (opts.min) { 470 if (dateParts.rawyear) { 471 var rawYear = dateParts.rawyear.replace(/[^0-9]/g, ""), minYear = opts.min.year.substr(0, rawYear.length); 472 result = minYear <= rawYear; 473 } 474 dateParts.year === dateParts.rawyear && opts.min.date.getTime() == opts.min.date.getTime() && (result = opts.min.date.getTime() <= dateParts.date.getTime()); 475 } 476 return result && opts.max && opts.max.date.getTime() == opts.max.date.getTime() && (result = opts.max.date.getTime() >= dateParts.date.getTime()), 477 result; 478 }(dateParts, opts)), result && currentResult.pos !== pos ? { 479 buffer: parse(opts.inputFormat, dateParts, opts), 480 refreshFromBuffer: { 481 start: pos, 482 end: currentResult.pos 483 } 484 } : result; 485 }, 486 onKeyDown: function(e, buffer, caretPos, opts) { 487 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) { 488 for (var match, today = new Date(), date = ""; match = getTokenizer(opts).exec(opts.inputFormat); ) "d" === match[0].charAt(0) ? date += pad(today.getDate(), match[0].length) : "m" === match[0].charAt(0) ? date += pad(today.getMonth() + 1, match[0].length) : "yyyy" === match[0] ? date += today.getFullYear().toString() : "y" === match[0].charAt(0) && (date += pad(today.getYear(), match[0].length)); 489 this.inputmask._valueSet(date), $(this).trigger("setvalue"); 490 } 491 }, 492 onUnMask: function(maskedValue, unmaskedValue, opts) { 493 return parse(opts.outputFormat, analyseMask(maskedValue, opts.inputFormat, opts), opts); 494 }, 495 casing: function(elem, test, pos, validPositions) { 496 return 0 == test.nativeDef.indexOf("[ap]") ? elem.toLowerCase() : 0 == test.nativeDef.indexOf("[AP]") ? elem.toUpperCase() : elem; 497 }, 498 insertMode: !1 499 } 500 }), Inputmask; 501 }) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 502}, function(module, exports, __webpack_require__) { 503 "use strict"; 504 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 505 "function" == typeof Symbol && Symbol.iterator; 506 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(3) ], void 0 === (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function($) { 507 return $; 508 }) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 509}, function(module, exports) { 510 module.exports = jQuery; 511}, function(module, exports, __webpack_require__) { 512 "use strict"; 513 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__, _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { 514 return typeof obj; 515 } : function(obj) { 516 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 517 }; 518 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2), __webpack_require__(5), __webpack_require__(6) ], 519 void 0 === (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function($, window, document, undefined) { 520 var ua = navigator.userAgent, mobile = isInputEventSupported("touchstart"), iemobile = /iemobile/i.test(ua), iphone = /iphone/i.test(ua) && !iemobile; 521 function Inputmask(alias, options, internal) { 522 if (!(this instanceof Inputmask)) return new Inputmask(alias, options, internal); 523 this.el = undefined, this.events = {}, this.maskset = undefined, this.refreshValue = !1, 524 !0 !== internal && ($.isPlainObject(alias) ? options = alias : (options = options || {},
525 alias && (options.alias = alias)), this.opts = $.extend(!0, {}, this.defaults, options), 526 this.noMasksCache = options && options.definitions !== undefined, this.userOptions = options || {}, 527 this.isRTL = this.opts.numericInput, resolveAlias(this.opts.alias, options, this.opts)); 528 } 529 function resolveAlias(aliasStr, options, opts) { 530 var aliasDefinition = Inputmask.prototype.aliases[aliasStr]; 531 return aliasDefinition ? (aliasDefinition.alias && resolveAlias(aliasDefinition.alias, undefined, opts), 532 $.extend(!0, opts, aliasDefinition), $.extend(!0, opts, options), !0) : (null === opts.mask && (opts.mask = aliasStr), 533 !1); 534 } 535 function generateMaskSet(opts, nocache) { 536 function generateMask(mask, metadata, opts) { 537 var regexMask = !1; 538 if (null !== mask && "" !== mask || ((regexMask = null !== opts.regex) ? mask = (mask = opts.regex).replace(/^(\^)(.*)(\$)$/, "$2") : (regexMask = !0, 539 mask = ".*")), 1 === mask.length && !1 === opts.greedy && 0 !== opts.repeat && (opts.placeholder = ""), 540 opts.repeat > 0 || "*" === opts.repeat || "+" === opts.repeat) { 541 var repeatStart = "*" === opts.repeat ? 0 : "+" === opts.repeat ? 1 : opts.repeat; 542 mask = opts.groupmarker[0] + mask + opts.groupmarker[1] + opts.quantifiermarker[0] + repeatStart + "," + opts.repeat + opts.quantifiermarker[1]; 543 } 544 var masksetDefinition, maskdefKey = regexMask ? "regex_" + opts.regex : opts.numericInput ? mask.split("").reverse().join("") : mask; 545 return Inputmask.prototype.masksCache[maskdefKey] === undefined || !0 === nocache ? (masksetDefinition = { 546 mask: mask, 547 maskToken: Inputmask.prototype.analyseMask(mask, regexMask, opts), 548 validPositions: {}, 549 _buffer: undefined, 550 buffer: undefined, 551 tests: {}, 552 excludes: {}, 553 metadata: metadata, 554 maskLength: undefined 555 }, !0 !== nocache && (Inputmask.prototype.masksCache[maskdefKey] = masksetDefinition, 556 masksetDefinition = $.extend(!0, {}, Inputmask.prototype.masksCache[maskdefKey]))) : masksetDefinition = $.extend(!0, {}, Inputmask.prototype.masksCache[maskdefKey]), 557 masksetDefinition; 558 } 559 if ($.isFunction(opts.mask) && (opts.mask = opts.mask(opts)), $.isArray(opts.mask)) { 560 if (opts.mask.length > 1) { 561 if (null === opts.keepStatic) { 562 opts.keepStatic = "auto"; 563 for (var i = 0; i < opts.mask.length; i++) if (opts.mask[i].charAt(0) !== opts.mask[0].charAt(0)) { 564 opts.keepStatic = !0; 565 break; 566 } 567 } 568 var altMask = opts.groupmarker[0]; 569 return $.each(opts.isRTL ? opts.mask.reverse() : opts.mask, function(ndx, msk) { 570 altMask.length > 1 && (altMask += opts.groupmarker[1] + opts.alternatormarker + opts.groupmarker[0]), 571 msk.mask === undefined || $.isFunction(msk.mask) ? altMask += msk : altMask += msk.mask; 572 }), generateMask(altMask += opts.groupmarker[1], opts.mask, opts); 573 } 574 opts.mask = opts.mask.pop(); 575 } 576 return opts.mask && opts.mask.mask !== undefined && !$.isFunction(opts.mask.mask) ? generateMask(opts.mask.mask, opts.mask, opts) : generateMask(opts.mask, opts.mask, opts); 577 } 578 function isInputEventSupported(eventName) { 579 var el = document.createElement("input"), evName = "on" + eventName, isSupported = evName in el; 580 return isSupported || (el.setAttribute(evName, "return;"), isSupported = "function" == typeof el[evName]), 581 el = null, isSupported; 582 } 583 function maskScope(actionObj, maskset, opts) { 584 maskset = maskset || this.maskset, opts = opts || this.opts;
585 var undoValue, $el, maxLength, colorMask, jitPos, inputmask = this, el = this.el, isRTL = this.isRTL, skipKeyPressEvent = !1, skipInputEvent = !1, ignorable = !1, mouseEnter = !1, jitOffset = 0, originalPlaceholder = ""; 586 function getMaskTemplate(baseOnInput, minimalPos, includeMode, noJit, clearOptionalTail) { 587 !0 !== noJit && (jitPos = undefined, jitOffset = 0); 588 var greedy = opts.greedy; 589 clearOptionalTail && (opts.greedy = !1), minimalPos = minimalPos || 0; 590 var ndxIntlzr, test, testPos, maskTemplate = [], pos = 0, lvp = getLastValidPosition(); 591 do { 592 if (!0 === baseOnInput && getMaskSet().validPositions[pos]) testPos = clearOptionalTail && !0 === getMaskSet().validPositions[pos].match.optionality && getMaskSet().validPositions[pos + 1] === undefined && (!0 === getMaskSet().validPositions[pos].generatedInput || getMaskSet().validPositions[pos].input == opts.skipOptionalPartCharacter && pos > 0) ? determineTestTemplate(pos, getTests(pos, ndxIntlzr, pos - 1)) : getMaskSet().validPositions[pos], 593 test = testPos.match, ndxIntlzr = testPos.locator.slice(), maskTemplate.push(!0 === includeMode ? testPos.input : !1 === includeMode ? test.nativeDef : getPlaceholder(pos, test)); else { 594 testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), test = testPos.match, ndxIntlzr = testPos.locator.slice(); 595 var jitMasking = !0 !== noJit && (!1 !== opts.jitMasking ? opts.jitMasking : test.jit); 596 !1 === jitMasking || jitMasking === undefined || pos < lvp || "number" == typeof jitMasking && isFinite(jitMasking) && jitMasking > pos ? maskTemplate.push(!1 === includeMode ? test.nativeDef : getPlaceholder(pos, test)) : test.jit && test.optionalQuantifier !== undefined && (jitPos = pos, 597 jitOffset++); 598 } 599 "auto" === opts.keepStatic && test.newBlockMarker && null !== test.fn && (opts.keepStatic = pos - 1), 600 pos++; 601 } while ((maxLength === undefined || pos < maxLength) && (null !== test.fn || "" !== test.def) || minimalPos > pos); 602 return "" === maskTemplate[maskTemplate.length - 1] && maskTemplate.pop(), !1 === includeMode && getMaskSet().maskLength !== undefined || (getMaskSet().maskLength = pos - 1), 603 opts.greedy = greedy, maskTemplate; 604 } 605 function getMaskSet() { 606 return maskset; 607 } 608 function resetMaskSet(soft) { 609 var maskset = getMaskSet(); 610 maskset.buffer = undefined, !0 !== soft && (maskset.validPositions = {}, maskset.p = 0); 611 } 612 function getLastValidPosition(closestTo, strict, validPositions) { 613 var before = -1, after = -1, valids = validPositions || getMaskSet().validPositions; 614 for (var posNdx in closestTo === undefined && (closestTo = -1), valids) { 615 var psNdx = parseInt(posNdx); 616 valids[psNdx] && (strict || !0 !== valids[psNdx].generatedInput) && (psNdx <= closestTo && (before = psNdx), 617 psNdx >= closestTo && (after = psNdx)); 618 } 619 return -1 === before || before == closestTo ? after : -1 == after ? before : closestTo - before < after - closestTo ? before : after; 620 } 621 function getDecisionTaker(tst) { 622 var decisionTaker = tst.locator[tst.alternation]; 623 return "string" == typeof decisionTaker && decisionTaker.length > 0 && (decisionTaker = decisionTaker.split(",")[0]), 624 decisionTaker !== undefined ? decisionTaker.toString() : ""; 625 } 626 function getLocator(tst, align) { 627 var locator = (tst.alternation != undefined ? tst.mloc[getDecisionTaker(tst)] : tst.locator).join(""); 628 if ("" !== locator) for (;locator.length < align; ) locator += "0"; 629 return locator; 630 } 631 function determineTestTemplate(pos, tests) { 632 for (var tstLocator, closest, bestMatch, altTest = getTest(pos = pos >
632 0 ? pos - 1 : 0), targetLocator = getLocator(altTest), ndx = 0; ndx < tests.length; ndx++) { 633 var tst = tests[ndx]; 634 tstLocator = getLocator(tst, targetLocator.length); 635 var distance = Math.abs(tstLocator - targetLocator); 636 (closest === undefined || "" !== tstLocator && distance < closest || bestMatch && bestMatch.match.optionality && "master" === bestMatch.match.newBlockMarker && (!tst.match.optionality || !tst.match.newBlockMarker) || bestMatch && bestMatch.match.optionalQuantifier && !tst.match.optionalQuantifier) && (closest = distance, 637 bestMatch = tst); 638 } 639 return bestMatch; 640 } 641 function getTestTemplate(pos, ndxIntlzr, tstPs) { 642 return getMaskSet().validPositions[pos] || determineTestTemplate(pos, getTests(pos, ndxIntlzr ? ndxIntlzr.slice() : ndxIntlzr, tstPs)); 643 } 644 function getTest(pos, tests) { 645 return getMaskSet().validPositions[pos] ? getMaskSet().validPositions[pos] : (tests || getTests(pos))[0]; 646 } 647 function positionCanMatchDefinition(pos, def) { 648 for (var valid = !1, tests = getTests(pos), tndx = 0; tndx < tests.length; tndx++) if (tests[tndx].match && tests[tndx].match.def === def) { 649 valid = !0; 650 break; 651 } 652 return valid; 653 } 654 function getTests(pos, ndxIntlzr, tstPs) { 655 var latestMatch, maskTokens = getMaskSet().maskToken, testPos = ndxIntlzr ? tstPs : 0, ndxInitializer = ndxIntlzr ? ndxIntlzr.slice() : [ 0 ], matches = [], insertStop = !1, cacheDependency = ndxIntlzr ? ndxIntlzr.join("") : ""; 656 function resolveTestFromToken(maskToken, ndxInitializer, loopNdx, quantifierRecurse) { 657 function handleMatch(match, loopNdx, quantifierRecurse) { 658 function isFirstMatch(latestMatch, tokenGroup) { 659 var firstMatch = 0 === $.inArray(latestMatch, tokenGroup.matches); 660 return firstMatch || $.each(tokenGroup.matches, function(ndx, match) { 661 if (!0 === match.isQuantifier ? firstMatch = isFirstMatch(latestMatch, tokenGroup.matches[ndx - 1]) : !0 === match.isOptional ? firstMatch = isFirstMatch(latestMatch, match) : !0 === match.isAlternate && (firstMatch = isFirstMatch(latestMatch, match)), 662 firstMatch) return !1; 663 }), firstMatch; 664 } 665 function resolveNdxInitializer(pos, alternateNdx, targetAlternation) { 666 var bestMatch, indexPos; 667 if ((getMaskSet().tests[pos] || getMaskSet().validPositions[pos]) && $.each(getMaskSet().tests[pos] || [ getMaskSet().validPositions[pos] ], function(ndx, lmnt) { 668 if (lmnt.mloc[alternateNdx]) return bestMatch = lmnt, !1; 669 var alternation = targetAlternation !== undefined ? targetAlternation : lmnt.alternation, ndxPos = lmnt.locator[alternation] !== undefined ? lmnt.locator[alternation].toString().indexOf(alternateNdx) : -1; 670 (indexPos === undefined || ndxPos < indexPos) && -1 !== ndxPos && (bestMatch = lmnt, 671 indexPos = ndxPos); 672 }), bestMatch) { 673 var bestMatchAltIndex = bestMatch.locator[bestMatch.alternation], locator = bestMatch.mloc[alternateNdx] || bestMatch.mloc[bestMatchAltIndex] || bestMatch.locator; 674 return locator.slice((targetAlternation !== undefined ? targetAlternation : bestMatch.alternation) + 1); 675 } 676 return targetAlternation !== undefined ? resolveNdxInitializer(pos, alternateNdx) : undefined; 677 } 678 function isSubsetOf(source, target) { 679 function expand(pattern) { 680 for (var start, end, expanded = [], i = 0, l = pattern.length; i < l;
680 i++) if ("-" === pattern.charAt(i)) for (end = pattern.charCodeAt(i + 1); ++start < end; ) expanded.push(String.fromCharCode(start)); else start = pattern.charCodeAt(i), 681 expanded.push(pattern.charAt(i)); 682 return expanded.join(""); 683 } 684 return opts.regex && null !== source.match.fn && null !== target.match.fn ? -1 !== expand(target.match.def.replace(/[\[\]]/g, "")).indexOf(expand(source.match.def.replace(/[\[\]]/g, ""))) : source.match.def === target.match.nativeDef; 685 } 686 function setMergeLocators(targetMatch, altMatch) { 687 if (altMatch === undefined || targetMatch.alternation === altMatch.alternation && -1 === targetMatch.locator[targetMatch.alternation].toString().indexOf(altMatch.locator[altMatch.alternation])) { 688 targetMatch.mloc = targetMatch.mloc || {}; 689 var locNdx = targetMatch.locator[targetMatch.alternation]; 690 if (locNdx !== undefined) { 691 if ("string" == typeof locNdx && (locNdx = locNdx.split(",")[0]), targetMatch.mloc[locNdx] === undefined && (targetMatch.mloc[locNdx] = targetMatch.locator.slice()), 692 altMatch !== undefined) { 693 for (var ndx in altMatch.mloc) "string" == typeof ndx && (ndx = ndx.split(",")[0]), 694 targetMatch.mloc[ndx] === undefined && (targetMatch.mloc[ndx] = altMatch.mloc[ndx]); 695 targetMatch.locator[targetMatch.alternation] = Object.keys(targetMatch.mloc).join(","); 696 } 697 return !0; 698 } 699 targetMatch.alternation = undefined; 700 } 701 return !1; 702 } 703 if (testPos > 5e3) throw "Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + getMaskSet().mask; 704 if (testPos === pos && match.matches === undefined) return matches.push({ 705 match: match, 706 locator: loopNdx.reverse(), 707 cd: cacheDependency, 708 mloc: {} 709 }), !0; 710 if (match.matches !== undefined) { 711 if (match.isGroup && quantifierRecurse !== match) { 712 if (match = handleMatch(maskToken.matches[$.inArray(match, maskToken.matches) + 1], loopNdx, quantifierRecurse)) return !0; 713 } else if (match.isOptional) { 714 var optionalToken = match; 715 if (match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) { 716 if ($.each(matches, function(ndx, mtch) { 717 mtch.match.optionality = !0; 718 }), latestMatch = matches[matches.length - 1].match, quantifierRecurse !== undefined || !isFirstMatch(latestMatch, optionalToken)) return !0; 719 insertStop = !0, testPos = pos; 720 } 721 } else if (match.isAlternator) { 722 var maltMatches, alternateToken = match, malternateMatches = [], currentMatches = matches.slice(), loopNdxCnt = loopNdx.length, altIndex = ndxInitializer.length > 0 ? ndxInitializer.shift() : -1; 723 if (-1 === altIndex || "string" == typeof altIndex) { 724 var amndx, currentPos = testPos, ndxInitializerClone = ndxInitializer.slice(), altIndexArr = []; 725 if ("string" == typeof altIndex) altIndexArr = altIndex.split(","); else for (amndx = 0;
725 amndx < alternateToken.matches.length; amndx++) altIndexArr.push(amndx.toString()); 726 if (getMaskSet().excludes[pos]) { 727 for (var altIndexArrClone = altIndexArr.slice(), i = 0, el = getMaskSet().excludes[pos].length; i < el; i++) altIndexArr.splice(altIndexArr.indexOf(getMaskSet().excludes[pos][i].toString()), 1); 728 0 === altIndexArr.length && (getMaskSet().excludes[pos] = undefined, altIndexArr = altIndexArrClone); 729 } 730 (!0 === opts.keepStatic || isFinite(parseInt(opts.keepStatic)) && currentPos >= opts.keepStatic) && (altIndexArr = altIndexArr.slice(0, 1)); 731 for (var unMatchedAlternation = !1, ndx = 0; ndx < altIndexArr.length; ndx++) { 732 amndx = parseInt(altIndexArr[ndx]), matches = [], ndxInitializer = "string" == typeof altIndex && resolveNdxInitializer(testPos, amndx, loopNdxCnt) || ndxInitializerClone.slice(), 733 alternateToken.matches[amndx] && handleMatch(alternateToken.matches[amndx], [ amndx ].concat(loopNdx), quantifierRecurse) ? match = !0 : 0 === ndx && (unMatchedAlternation = !0), 734 maltMatches = matches.slice(), testPos = currentPos, matches = []; 735 for (var ndx1 = 0; ndx1 < maltMatches.length; ndx1++) { 736 var altMatch = maltMatches[ndx1], dropMatch = !1; 737 altMatch.match.jit = altMatch.match.jit || unMatchedAlternation, altMatch.alternation = altMatch.alternation || loopNdxCnt, 738 setMergeLocators(altMatch); 739 for (var ndx2 = 0; ndx2 < malternateMatches.length; ndx2++) { 740 var altMatch2 = malternateMatches[ndx2]; 741 if ("string" != typeof altIndex || altMatch.alternation !== undefined && -1 !== $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr)) { 742 if (altMatch.match.nativeDef === altMatch2.match.nativeDef) { 743 dropMatch = !0, setMergeLocators(altMatch2, altMatch); 744 break; 745 } 746 if (isSubsetOf(altMatch, altMatch2)) { 747 setMergeLocators(altMatch, altMatch2) && (dropMatch = !0, malternateMatches.splice(malternateMatches.indexOf(altMatch2), 0, altMatch)); 748 break; 749 } 750 if (isSubsetOf(altMatch2, altMatch)) { 751 setMergeLocators(altMatch2, altMatch); 752 break; 753 } 754 if (target = altMatch2, sloc = (source = altMatch).locator.slice(source.alternation).join(""), 755 tloc = target.locator.slice(target.alternation).join(""), sloc == tloc && null === source.match.fn && null !== target.match.fn && target.match.fn.test(source.match.def, getMaskSet(), pos, !1, opts, !1)) { 756 setMergeLocators(altMatch, altMatch2) && (dropMatch = !0, malternateMatches.splice(malternateMatches.indexOf(altMatch2), 0, altMatch)); 757 break; 758 } 759 } 760 } 761 dropMatch || malternateMatches.push(altMatch); 762 } 763 } 764 matches = currentMatches.concat(malternateMatches), testPos = pos, insertStop = matches.length > 0, 765 match = malternateMatches.length > 0, ndxInitializer = ndxInitializerClone.slice(); 766 } else match = handleMatch(alternateToken.matches[altIndex] || maskToken.matches[altIndex], [ altIndex ].concat(loopNdx), quantifierRecurse); 767 if (match) return !0; 768 } else if (match.isQuantifier && quantifierRecurse !== maskToken.matches[$.inArray(match, maskToken.matches) - 1]) for (var qt = match, qndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; qndx < (isNaN(qt.quantifier.max) ? qndx + 1 : qt.quantifier.max) && testPos <= pos; qndx++) { 769 var tokenGroup = maskToken.matches[$.inArray(qt, maskToken.matches) - 1]; 770 if (match = handleMatch(tokenGroup, [ qndx ].concat(loopNdx), tokenGroup)) { 771 if ((latestMatch = matches[matches.length - 1].match).optionalQuantifier = qndx > qt.quantifier.min - 1, 772 latestMatch.jit = qndx + tokenGroup.matches.indexOf(latestMatch) >= qt.quantifier.jit, 773 isFirstMatch(latestMatch, tokenGroup) && qndx > qt.quantifier.min - 1) { 774 insertStop = !0, testPos = pos; 775 break; 776 } 777 if (qt.quantifier.jit !== undefined && isNaN(qt.quantifier.max) && latestMatch.optionalQuantifier && getMaskSet().validPositions[pos - 1] === undefined) { 778 matches.pop(), insertStop = !0, testPos = pos, cacheDependency = undefined; 779 break; 780 } 781 return !0; 782 } 783 } else if (match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) return !0; 784 } else testPos++; 785 var source, target, sloc, tloc; 786 } 787 for (var tndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; tndx < maskToken.matches.length; tndx++) if (!0 !== maskToken.matches[tndx].isQuantifier) { 788 var match = handleMatch(maskToken.matches[tndx], [ tndx ].concat(loopNdx), quantifierRecurse); 789 if (match && testPos === pos) return match; 790 if (testPos > pos) break; 791 } 792 } 793 if (pos > -1) { 794 if (ndxIntlzr === undefined) { 795 for (var test, previousPos = pos - 1; (test = getMaskSet().validPositions[previousPos] || getMaskSet().tests[previousPos]) === undefined && previousPos > -1; ) previousPos--; 796 test !== undefined && previousPos > -1 && (ndxInitializer = function(pos, tests) { 797 var locator = []; 798 return $.isArray(tests) || (tests = [ tests ]), tests.length > 0 && (tests[0].alternation === undefined ? 0 === (locator = determineTestTemplate(pos, tests.slice()).locator.slice()).length && (locator = tests[0].locator.slice()) : $.each(tests, function(ndx, tst) { 799 if ("" !== tst.def) if (0 === locator.length) locator = t
799st.locator.slice(); else for (var i = 0; i < locator.length; i++) tst.locator[i] && -1 === locator[i].toString().indexOf(tst.locator[i]) && (locator[i] += "," + tst.locator[i]); 800 })), locator; 801 }(previousPos, test), cacheDependency = ndxInitializer.join(""), testPos = previousPos); 802 } 803 if (getMaskSet().tests[pos] && getMaskSet().tests[pos][0].cd === cacheDependency) return getMaskSet().tests[pos]; 804 for (var mtndx = ndxInitializer.shift(); mtndx < maskTokens.length; mtndx++) { 805 var match = resolveTestFromToken(maskTokens[mtndx], ndxInitializer, [ mtndx ]); 806 if (match && testPos === pos || testPos > pos) break; 807 } 808 } 809 return (0 === matches.length || insertStop) && matches.push({ 810 match: { 811 fn: null, 812 optionality: !1, 813 casing: null, 814 def: "", 815 placeholder: "" 816 }, 817 locator: [], 818 mloc: {}, 819 cd: cacheDependency 820 }), ndxIntlzr !== undefined && getMaskSet().tests[pos] ? $.extend(!0, [], matches) : (getMaskSet().tests[pos] = $.extend(!0, [], matches), 821 getMaskSet().tests[pos]); 822 } 823 function getBufferTemplate() { 824 return getMaskSet()._buffer === undefined && (getMaskSet()._buffer = getMaskTemplate(!1, 1), 825 getMaskSet().buffer === undefined && (getMaskSet().buffer = getMaskSet()._buffer.slice())), 826 getMaskSet()._buffer; 827 } 828 function getBuffer(noCache) { 829 return getMaskSet().buffer !== undefined && !0 !== noCache || (getMaskSet().buffer = getMaskTemplate(!0, getLastValidPosition(), !0)), 830 getMaskSet().buffer; 831 } 832 function refreshFromBuffer(start, end, buffer) { 833 var i, p; 834 if (!0 === start) resetMaskSet(), start = 0, end = buffer.length; else for (i = start; i < end; i++) delete getMaskSet().validPositions[i]; 835 for (p = start, i = start; i < end; i++) if (resetMaskSet(!0), buffer[i] !== opts.skipOptionalPartCharacter) { 836 var valResult = isValid(p, buffer[i], !0, !0); 837 !1 !== valResult && (resetMaskSet(!0), p = valResult.caret !== undefined ? valResult.caret : valResult.pos + 1); 838 } 839 } 840 function checkAlternationMatch(altArr1, altArr2, na) { 841 for (var naNdx, altArrC = opts.greedy ? altArr2 : altArr2.slice(0, 1), isMatch = !1, naArr = na !== undefined ? na.split(",") : [], i = 0; i < naArr.length; i++) -1 !== (naNdx = altArr1.indexOf(naArr[i])) && altArr1.splice(naNdx, 1); 842 for (var alndx = 0; alndx < altArr1.length; alndx++) if (-1 !== $.inArray(altArr1[alndx], altArrC)) { 843 isMatch = !0; 844 break; 845 } 846 return isMatch; 847 } 848 function alternate(pos, c, strict, fromSetValid, rAltPos) { 849 var lastAlt, alternation, altPos, prevAltPos, i, validPos, decisionPos, validPsClone = $.extend(!0, {}, getMaskSet().validPositions), isValidRslt = !1, lAltPos = rAltPos !== undefined ? rAltPos : getLastValidPosition(); 850 if (-1 === lAltPos && rAltPos === undefined) prevAltPos = getTest(lastAlt = 0), 851 alternation = prevAltPos.alternation; else for (;lAltPos >= 0; lAltPos--) if ((altPos = getMaskSet().validPositions[lAltPos]) && altPos.alternation !== undefined) { 852 if (prevAltPos && prevAltPos.locator[altPos.alternation] !== altPos.locator[altPos.alternation]) break; 853 lastAlt = lAltPos, alternation = getMaskSet().validPositions[lastAlt].alternation, 854 prevAltPos = altPos; 855 } 856 if (alternation !== undefined) { 857 decisionPos = parseInt(lastAlt), getMaskSet().excludes[decisionPos] = getMaskSet().excludes[decisionPos] || [], 858 !0 !== pos && getMaskSet().excludes[decisionPos].push(getDecisionTaker(prevAltPos));
859 var validInputsClone = [], staticInputsBeforePos = 0; 860 for (i = decisionPos; i < getLastValidPosition(undefined, !0) + 1; i++) (validPos = getMaskSet().validPositions[i]) && !0 !== validPos.generatedInput ? validInputsClone.push(validPos.input) : i < pos && staticInputsBeforePos++, 861 delete getMaskSet().validPositions[i]; 862 for (;getMaskSet().excludes[decisionPos] && getMaskSet().excludes[decisionPos].length < 10; ) { 863 var posOffset = -1 * staticInputsBeforePos, validInputs = validInputsClone.slice(); 864 for (getMaskSet().tests[decisionPos] = undefined, resetMaskSet(!0), isValidRslt = !0; validInputs.length > 0; ) { 865 var input = validInputs.shift(); 866 if (!(isValidRslt = isValid(getLastValidPosition(undefined, !0) + 1, input, !1, fromSetValid, !0))) break; 867 } 868 if (isValidRslt && c !== undefined) { 869 var targetLvp = getLastValidPosition(pos) + 1; 870 for (i = decisionPos; i < getLastValidPosition() + 1; i++) ((validPos = getMaskSet().validPositions[i]) === undefined || null == validPos.match.fn) && i < pos + posOffset && posOffset++; 871 isValidRslt = isValid((pos += posOffset) > targetLvp ? targetLvp : pos, c, strict, fromSetValid, !0); 872 } 873 if (isValidRslt) break; 874 if (resetMaskSet(), prevAltPos = getTest(decisionPos), getMaskSet().validPositions = $.extend(!0, {}, validPsClone), 875 !getMaskSet().excludes[decisionPos]) { 876 isValidRslt = alternate(pos, c, strict, fromSetValid, decisionPos - 1); 877 break; 878 } 879 var decisionTaker = getDecisionTaker(prevAltPos); 880 if (-1 !== getMaskSet().excludes[decisionPos].indexOf(decisionTaker)) { 881 isValidRslt = alternate(pos, c, strict, fromSetValid, decisionPos - 1); 882 break; 883 } 884 for (getMaskSet().excludes[decisionPos].push(decisionTaker), i = decisionPos; i < getLastValidPosition(undefined, !0) + 1; i++) delete getMaskSet().validPositions[i]; 885 } 886 } 887 return getMaskSet().excludes[decisionPos] = undefined, isValidRslt; 888 } 889 function isValid(pos, c, strict, fromSetValid, fromAlternate, validateOnly) { 890 function isSelection(posObj) { 891 return isRTL ? posObj.begin - posObj.end > 1 || posObj.begin - posObj.end == 1 : posObj.end - posObj.begin > 1 || posObj.end - posObj.begin == 1; 892 } 893 strict = !0 === strict; 894 var maskPos = pos; 895 function _isValid(position, c, strict) { 896 var rslt = !1, tstPos = position; 897 return jitPos !== undefined && tstPos >= jitPos && getMaskSet().validPositions[jitPos + jitOffset] == undefined && (tstPos += jitOffset), 898 $.each(getTests(tstPos), function(ndx, tst) { 899 var test = tst.match; 900 if (getBuffer(!0), !1 !== (rslt = null != test.fn ? test.fn.test(c, getMaskSet(), position, strict, opts, isSelection(pos)) : (c === test.def || c === opts.skipOptionalPartCharacter) && "" !== test.def && { 901 c: getPlaceholder(position, test, !0) || test.def, 902 pos: position 903 })) { 904 var elem = rslt.c !== undefined ? rslt.c : c, validatedPos = position; 905 return elem = elem === opts.skipOptionalPartCharacter && null === test.fn ? getPlaceholder(position, test, !0) || test.def : elem, 906 rslt.remove !== undefined && ($.isArray(rslt.remove) || (rslt.remove = [ rslt.remove ]), 907 $.each(rslt.remove.sort(function(a, b) { 908 return b - a; 909 }), function(ndx, lmnt) { 910 revalidateMask({ 911 begin: lmnt, 912 end: lmnt + 1 913 }); 914 })), rslt.insert !== undefined && ($.isArray(rslt.insert) || (rslt.insert = [ rslt.insert ]), 915 $.each(rslt.insert.sort(function(a, b) { 916 return a - b; 917 }), function(ndx, lmnt) { 918 isValid(lmnt.pos, lmnt.c, !0, fromSetValid); 919 })), !0 !== rslt && rslt.pos !== undefined && rslt.pos !== position && (validatedPos = rslt.pos), 920 (!0 === rslt || rslt.pos !== undefined || rslt.c !== undefined) && (revalidateMask(pos, $.extend({}, tst, { 921 input: function(elem, test, pos) { 922 switch (opts.casing || test.casing) { 923 case "upper": 924 elem = elem.toUpperCase(); 925 break; 926 927 case "lower": 928 elem = elem.toLowerCase(); 929 break; 930 931 case "title": 932 var posBefore = getMaskSet().validPositions[pos - 1]; 933 elem = 0 === pos || posBefore && posBefore.input === String.fromCharCode(Inputmask.keyCode.SPACE) ? elem.toUpperCase() : elem.toLowerCase(); 934 break; 935 936 default: 937 if ($.isFunction(opts.casing)) { 938 var args = Array.prototype.slice.call(arguments); 939 args.push(getMaskSet().validPositions), elem = opts.casing.apply(this, args); 940 } 941 } 942 return elem; 943 }(elem, test, validatedPos) 944 }), fromSetValid, validatedPos) || (rslt = !1), !1); 945 } 946 }), rslt; 947 } 948 pos.begin !== undefined && (maskPos = isRTL ? pos.end : pos.begin); 949 var result = !0, positionsClone = $.extend(!0, {}, getMaskSet().validPositions); 950 if ($.isFunction(opts.preValidation) && !strict && !0 !== fromSetValid && !0 !== validateOnly && (result = opts.preValidation(getBuffer(), maskPos, c, isSelection(pos), opts, getMaskSet())), 951 !0 === result) { 952 if (trackbackPositions(undefined, maskPos, !0), (maxLength === undefined || maskPos < maxLength) && (result = _isValid(maskPos, c, strict), 953 (!strict || !0 === fromSetValid) && !1 === result && !0 !== validateOnly)) { 954 var currentPosValid = getMaskSet().validPositions[maskPos]; 955 if (!currentPosValid || null !== currentPosValid.match.fn || currentPosValid.match.def !== c && c !== opts.skipOptionalPartCharacter) { 956 if (opts.regex || (opts.insertMode || getMaskSet().validPositions[seekNext(maskPos)] === undefined) && !isMask(maskPos, !0)) for (var nPos = maskPos + 1, snPos = seekNext(maskPos); nPos <= snPos; nPos++) if (!1 !== (result = _isValid(nPos, c, strict))) { 957 result = trackbackPositions(maskPos, result.pos !== undefined ? result.pos : nPos) || result, 958 maskPos = nPos; 959 break; 960 } 961 } else result = { 962 caret: seekNext(maskPos) 963 }; 964 } 965 !1 !== result || !1 === opts.keepStatic || null != opts.regex && !isComplete(getBuffer()) || strict || !0 === fromAlternate || (result = alternate(maskPos, c, strict, fromSetValid)), 966 !0 === result && (result = { 967 pos: maskPos 968 }); 969 } 970 if ($.isFunction(opts.postValidation) && !1 !== result && !strict && !0 !== fromSetValid && !0 !== validateOnly) { 971 var postResult = opts.postValidation(getBuffer(!0), pos.begin !== undefined ? isRTL ? pos.end : pos.begin : pos, result, opts); 972 if (postResult !== undefined) { 973 if (postResult.refreshFromBuffer && postResult.buffer) { 974 var refresh = postResult.refreshFromBuffer; 975 refreshFromBuffer(!0 === refresh ? refresh : refresh.start, refresh.end, postResult.buffer); 976 } 977 result = !0 === postResult ? result : postResult; 978 } 979 } 980 return result && result.pos === undefined && (result.pos = maskPos), !1 !== result && !0 !== validateOnly || (resetMaskSet(!0), 981 getMaskSet().validPositions = $.extend(!0, {}, positionsClone)), result; 982 } 983 function trackbackPositions(originalPos, newPos, fillOnly) { 984 var result; 985 if (originalPos === undefined) for (originalPos = newPos - 1; originalPos > 0 && !getMaskSet().validPositions[originalPos]; originalPos--) ; 986 for (var ps = originalPos; ps < newPos; ps++) if (getMaskSet().validPositions[ps] === undefined && !isMask(ps, !0)) { 987 var vp = 0 == ps ? getTest(ps) : getMaskSet().validPositions[ps - 1]; 988 if (vp) { 989 var tests = getTests(ps).slice(); 990 "" === tests[tests.length - 1].match.def && tests.pop(); 991 var bestMatch = determineTestTemplate(ps, tests); 992 if ((bestMatch = $.extend({}, bestMatch, { 993 input: getPlaceholder(ps, bestMatch.match, !0) || bestMatch.match.def 994 })).generatedInput = !0, revalidateMask(ps, bestMatch, !0), !0 !== fillOnly) { 995 var cvpInput = getMaskSet().validPositions[newPos].input; 996 getMaskSet().validPositions[newPos] = undefined, result = isValid(newPos, cvpInput, !0, !0); 997 } 998 } 999 } 1000 return result; 1001 } 1002 function revalidateMask(pos, validTest, fromSetValid, validatedPos) { 1003 function IsEnclosedStatic(pos, valids, selection) { 1004 var posMatch = valids[pos]; 1005 if (posMatch !== undefined && (null === posMatch.match.fn && !0 !== posMatch.match.optionality || posMatch.input === opts.radixPoint)) { 1006 var prevMatch = selection.begin <= pos - 1 ? valids[pos - 1] && null === valids[pos - 1].match.fn && valids[pos - 1] : valids[pos - 1], nextMatch = selection.end > pos + 1 ? valids[pos + 1] && null === valids[pos + 1].match.fn && valids[pos + 1] : valids[pos + 1]; 1007 return prevMatch && nextMatch; 1008 } 1009 return !1; 1010 } 1011 var begin = pos.begin !== undefined ? pos.begin : pos, end = pos.end !== undefined ? pos.end : pos; 1012 if (pos.begin > pos.end && (begin = pos.end, end = pos.begin), validatedPos = validatedPos !== undefined ? validatedPos : begin, 1013 begin !== end || opts.insertMode && getMaskSet().validPositions[validatedPos] !== undefined && fromSetValid === undefined) { 1014 var positionsClone = $.extend(!0, {}, getMaskSet().validPositions), lvp = getLastValidPosition(undefined, !0); 1015 for (getMaskSet().p = begin, i = lvp; i >= begin; i--) getMaskSet().validPositions[i] && "+" === getMaskSet().validPositions[i].match.nativeDef && (opts.isNegative = !1), 1016 delete getMaskSet().validPositions[i];
1017 var valid = !0, j = validatedPos, needsValidation = (getMaskSet().validPositions, 1018 !1), posMatch = j, i = j; 1019 for (validTest && (getMaskSet().validPositions[validatedPos] = $.extend(!0, {}, validTest), 1020 posMatch++, j++, begin < end && i++); i <= lvp; i++) { 1021 var t = positionsClone[i]; 1022 if (t !== undefined && (i >= end || i >= begin && !0 !== t.generatedInput && IsEnclosedStatic(i, positionsClone, { 1023 begin: begin, 1024 end: end 1025 }))) { 1026 for (;"" !== getTest(posMatch).match.def; ) { 1027 if (!1 === needsValidation && positionsClone[posMatch] && positionsClone[posMatch].match.nativeDef === t.match.nativeDef) getMaskSet().validPositions[posMatch] = $.extend(!0, {}, positionsClone[posMatch]), 1028 getMaskSet().validPositions[posMatch].input = t.input, trackbackPositions(undefined, posMatch, !0), 1029 j = posMatch + 1, valid = !0; else if (positionCanMatchDefinition(posMatch, t.match.def)) { 1030 var result = isValid(posMatch, t.input, !0, !0); 1031 valid = !1 !== result, j = result.caret || result.insert ? getLastValidPosition() : posMatch + 1, 1032 needsValidation = !0; 1033 } else if (!(valid = !0 === t.generatedInput || t.input === opts.radixPoint && !0 === opts.numericInput) && "" === getTest(posMatch).match.def) break; 1034 if (valid) break; 1035 posMatch++; 1036 } 1037 "" == getTest(posMatch).match.def && (valid = !1), posMatch = j; 1038 } 1039 if (!valid) break; 1040 } 1041 if (!valid) return getMaskSet().validPositions = $.extend(!0, {}, positionsClone), 1042 resetMaskSet(!0), !1; 1043 } else validTest && (getMaskSet().validPositions[validatedPos] = $.extend(!0, {}, validTest)); 1044 return resetMaskSet(!0), !0; 1045 } 1046 function isMask(pos, strict) { 1047 var test = getTestTemplate(pos).match; 1048 if ("" === test.def && (test = getTest(pos).match), null != test.fn) return test.fn; 1049 if (!0 !== strict && pos > -1) { 1050 var tests = getTests(pos); 1051 return tests.length > 1 + ("" === tests[tests.length - 1].match.def ? 1 : 0); 1052 } 1053 return !1; 1054 } 1055 function seekNext(pos, newBlock) { 1056 for (var position = pos + 1; "" !== getTest(position).match.def && (!0 === newBlock && (!0 !== getTest(position).match.newBlockMarker || !isMask(position)) || !0 !== newBlock && !isMask(position)); ) position++; 1057 return position; 1058 } 1059 function seekPrevious(pos, newBlock) { 1060 var tests, position = pos; 1061 if (position <= 0) return 0; 1062 for (;--position > 0 && (!0 === newBlock && !0 !== getTest(position).match.newBlockMarker || !0 !== newBlock && !isMask(position) && ((tests = getTests(position)).length < 2 || 2 === tests.length && "" === tests[1].match.def)); ) ; 1063 return position; 1064 } 1065 function writeBuffer(input, buffer, caretPos, event, triggerEvents) { 1066 if (event && $.isFunction(opts.onBeforeWrite)) { 1067 var result = opts.onBeforeWrite.call(inputmask, event, buffer, caretPos, opts); 1068 if (result) { 1069 if (result.refreshFromBuffer) { 1070 var refresh = result.refreshFromBuffer; 1071 refreshFromBuffer(!0 === refresh ? refresh : refresh.start, refresh.end, result.buffer || buffer), 1072 buffer = getBuffer(!0); 1073 } 1074 caretPos !== undefined && (caretPos = result.caret !== undefined ? result.caret : caretPos); 1075 } 1076 } 1077 if (input !== undefined && (input.inputmask._valueSet(buffer.join("")), caretPos === undefined || event !== undefined && "blur" === event.type ? renderColorMask(input, caretPos, 0 === buffer.length) : caret(input, caretPos), 1078 !0 === triggerEvents)) { 1079 var $input = $(input), nptVal = input.inputmask._valueGet(); 1080 skipInputEvent = !0, $input.trigger("input"), setTimeout(function() { 1081 nptVal === getBufferTemplate().join("") ? $input.trigger("cleared") : !0 === isComplete(buffer) && $input.trigger("complete"); 1082 }, 0); 1083 } 1084 } 1085 function getPlaceholder(pos, test, returnPL) { 1086 if ((test = test || getTest(pos).match).placeholder !== undefined || !0 === returnPL) return $.isFunction(test.placeholder) ? test.placeholder(opts) : test.placeholder; 1087 if (null === test.fn) { 1088 if (pos > -1 && getMaskSet().validPositions[pos] === undefined) { 1089 var prevTest, tests = getTests(pos), staticAlternations = []; 1090 if (tests.length > 1 + ("" === tests[tests.length - 1].match.def ? 1 : 0)) for (var i = 0; i < tests.length; i++) if (!0 !== tests[i].match.optionality && !0 !== tests[i].match.optionalQuantifier && (null === tests[i].match.fn || prevTest === undefined || !1 !== tests[i].match.fn.test(prevTest.match.def, getMaskSet(), pos, !0, opts)) && (staticAlternations.push(tests[i]), 1091 null === tests[i].match.fn && (prevTest = tests[i]), staticAlternations.length > 1 && /[0-9a-bA-Z]/.test(staticAlternations[0].match.def))) return opts.placeholder.charAt(pos % opts.placeholder.length); 1092 } 1093 return test.def; 1094 } 1095 return opts.placeholder.charAt(pos % opts.placeholder.length); 1096 } 1097 var valueBuffer, EventRuler = { 1098 on: function(input, eventName, eventHandler) { 1099 var ev = function(e) { 1100 var that = this; 1101 if (that.inputmask === undefined && "FORM" !== this.nodeName) { 1102 var imOpts = $.data(that, "_inputmask_opts"); 1103 imOpts ? new Inputmask(imOpts).mask(that) : EventRuler.off(that); 1104 } else { 1105 if ("setvalue" === e.type || "FORM" === this.nodeName || !(that.disabled || that.readOnly && !("keydown" === e.type && e.ctrlKey && 67 === e.keyCode || !1 === opts.tabThrough && e.keyCode === Inputmask.keyCode.TAB))) { 1106 switch (e.type) { 1107 case "input": 1108 if (!0 === skipInputEvent) return skipInputEvent = !1, e.preventDefault(); 1109 if (mobile) { 1110 var args = arguments; 1111 return setTimeout(function() { 1112 eventHandler.apply(that, args), caret(that, that.inputmask.caretPos, undefined, !0); 1113 }, 0), !1; 1114 } 1115 break; 1116 1117 case "keydown": 1118 skipKeyPressEvent = !1, skipInputEvent = !1; 1119 break; 1120 1121 case "keypress": 1122 if (!0 === skipKeyPressEvent) return e.preventDefault(); 1123 skipKeyPressEvent = !0; 1124 break; 1125 1126 case "click": 1127 if (iemobile || iphone) { 1128 var args = arguments; 1129 return setTimeout(function() { 1130 eventHandler.apply(that, args); 1131 }, 0), !1; 1132 } 1133 } 1134 var returnVal = eventHandler.apply(that, arguments); 1135 return !1 === returnVal && (e.preventDefault(), e.stopPropagation()), returnVal; 1136 } 1137 e.preventDefault(); 1138 } 1139 }; 1140 input.inputmask.events[eventName] = input.inputmask.events[eventName] || [], input.inputmask.events[eventName].push(ev), 1141 -1 !== $.inArray(eventName, [ "submit", "reset" ]) ? null !== input.form && $(input.form).on(eventName, ev) : $(input).on(eventName, ev); 1142 }, 1143 off: function(input, event) { 1144 var events; 1145 input.inputmask && input.inputmask.events && (event ? (events = [])[event] = input.inputmask.events[event] : events = input.inputmask.events, 1146 $.each(events, function(eventName, evArr) { 1147 for (;evArr.length > 0; ) { 1148 var ev = evArr.pop(); 1149 -1 !== $.inArray(eventName, [ "submit", "reset" ]) ? null !== input.form && $(input.form).off(eventName, ev) : $(input).off(eventName, ev); 1150 } 1151 delete input.inputmask.events[eventName]; 1152 })); 1153 } 1154 }, EventHandlers = { 1155 keydownEvent: function(e) { 1156 var $input = $(this), k = e.keyCode, pos = caret(this); 1157 if (k === Inputmask.keyCode.BACKSPACE || k === Inputmask.keyCode.DELETE || iphone && k === Inputmask.keyCode.BACKSPACE_SAFARI || e.ctrlKey && k === Inputmask.keyCode.X && !isInputEventSupported("cut")) e.preventDefault(), 1158 handleRemove(0, k, pos), writeBuffer(this, getBuffer(!0), getMaskSet().p, e, this.inputmask._valueGet() !== getBuffer().join("")); else if (k === Inputmask.keyCode.END || k === Inputmask.keyCode.PAGE_DOWN) { 1159 e.preventDefault(); 1160 var caretPos = seekNext(getLastValidPosition()); 1161 caret(this, e.shiftKey ? pos.begin : caretPos, caretPos, !0); 1162 } else k === Inputmask.keyCode.HOME && !e.shiftKey || k === Inputmask.keyCode.PAGE_UP ? (e.preventDefault(), 1163 caret(this, 0, e.shiftKey ? pos.begin : 0, !0)) : (opts.undoOnEscape && k === Inputmask.keyCode.ESCAPE || 90 === k && e.ctrlKey) && !0 !== e.altKey ? (checkVal(this, !0, !1, undoValue.split("")), 1164 $input.trigger("click")) : k !== Inputmask.keyCode.INSERT || e.shiftKey || e.ctrlKey ? !0 === opts.tabThrough && k === Inputmask.keyCode.TAB && (!0 === e.shiftKey ? (null === getTest(pos.begin).match.fn && (pos.begin = seekNext(pos.begin)), 1165 pos.end = seekPrevious(pos.begin, !0), pos.begin = seekPrevious(pos.end, !0)) : (pos.begin = seekNext(pos.begin, !0), 1166 pos.end = seekNext(pos.begin, !0), pos.end < getMaskSet().maskLength && pos.end--), 1167 pos.begin < getMaskSet().maskLength && (e.preventDefault(), caret(this, pos.begin, pos.end))) : (opts.insertMode = !opts.insertMode, 1168 this.setAttribute("im-insert", opts.insertMode)); 1169 opts.onKeyDown.call(this, e, getBuffer(), caret(this).begin, opts), ignorable = -1 !== $.inArray(k, opts.ignorables); 1170 },
1171 keypressEvent: function(e, checkval, writeOut, strict, ndx) { 1172 var input = this, $input = $(input), k = e.which || e.charCode || e.keyCode; 1173 if (!(!0 === checkval || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable)) return k === Inputmask.keyCode.ENTER && undoValue !== getBuffer().join("") && (undoValue = getBuffer().join(""), 1174 setTimeout(function() { 1175 $input.trigger("change"); 1176 }, 0)), !0; 1177 if (k) { 1178 46 === k && !1 === e.shiftKey && "" !== opts.radixPoint && (k = opts.radixPoint.charCodeAt(0)); 1179 var forwardPosition, pos = checkval ? { 1180 begin: ndx, 1181 end: ndx 1182 } : caret(input), c = String.fromCharCode(k), offset = 0; 1183 if (opts._radixDance && opts.numericInput) { 1184 var caretPos = getBuffer().indexOf(opts.radixPoint.charAt(0)) + 1; 1185 pos.begin <= caretPos && (k === opts.radixPoint.charCodeAt(0) && (offset = 1), pos.begin -= 1, 1186 pos.end -= 1); 1187 } 1188 getMaskSet().writeOutBuffer = !0; 1189 var valResult = isValid(pos, c, strict); 1190 if (!1 !== valResult && (resetMaskSet(!0), forwardPosition = valResult.caret !== undefined ? valResult.caret : seekNext(valResult.pos.begin ? valResult.pos.begin : valResult.pos), 1191 getMaskSet().p = forwardPosition), forwardPosition = (opts.numericInput && valResult.caret === undefined ? seekPrevious(forwardPosition) : forwardPosition) + offset, 1192 !1 !== writeOut && (setTimeout(function() { 1193 opts.onKeyValidation.call(input, k, valResult, opts); 1194 }, 0), getMaskSet().writeOutBuffer && !1 !== valResult)) { 1195 var buffer = getBuffer(); 1196 writeBuffer(input, buffer, forwardPosition, e, !0 !== checkval); 1197 } 1198 if (e.preventDefault(), checkval) return !1 !== valResult && (valResult.forwardPosition = forwardPosition), 1199 valResult; 1200 } 1201 }, 1202 pasteEvent: function(e) { 1203 var tempValue, ev = e.originalEvent || e, inputValue = ($(this), this.inputmask._valueGet(!0)), caretPos = caret(this); 1204 isRTL && (tempValue = caretPos.end, caretPos.end = caretPos.begin, caretPos.begin = tempValue); 1205 var valueBeforeCaret = inputValue.substr(0, caretPos.begin), valueAfterCaret = inputValue.substr(caretPos.end, inputValue.length); 1206 if (valueBeforeCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(0, caretPos.begin).join("") && (valueBeforeCaret = ""), 1207 valueAfterCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(caretPos.end).join("") && (valueAfterCaret = ""), 1208 window.clipboardData && window.clipboardData.getData) inputValue = valueBeforeCaret + window.clipboardData.getData("Text") + valueAfterCaret; else { 1209 if (!ev.clipboardData || !ev.clipboardData.getData) return !0; 1210 inputValue = valueBeforeCaret + ev.clipboardData.getData("text/plain") + valueAfterCaret; 1211 } 1212 var pasteValue = inputValue; 1213 if ($.isFunction(opts.onBeforePaste)) { 1214 if (!1 === (pasteValue = opts.onBeforePaste.call(inputmask, inputValue, opts))) return e.preventDefault(); 1215 pasteValue || (pasteValue = inputValue); 1216 } 1217 return checkVal(this, !1, !1, pasteValue.toString().split("")), writeBuffer(this, getBuffer(), seekNext(getLastValidPosition()), e, undoValue !== getBuffer().join("")), 1218 e.preventDefault(); 1219 }, 1220 inputFallBackEvent: function(e) { 1221 var input = this, inputValue = input.inputmask._valueGet(); 1222 if (getBuffer().join("") !== inputValue) { 1223 var caretPos = caret(input); 1224 if (inputValue = function(input, inputValue, caretPos) { 1225 if (iemobile) { 1226 var inputChar = inputValue.replace(getBuffer().join(""), ""); 1227 if (1 === inputChar.length) { 1228 var iv = inputValue.split(""); 1229 iv.splice(caretPos.begin, 0, inputChar), inputValue = iv.join(""); 1230 } 1231 } 1232 return inputValue; 1233 }(0, inputValue = function(input, inputValue, caretPos) { 1234 return "." === inputValue.charAt(caretPos.begin - 1) && "" !== opts.radixPoint && ((inputValue = inputValue.split(""))[caretPos.begin - 1] = opts.radixPoint.charAt(0), 1235 inputValue = inputValue.join("")), inputValue; 1236 }(0, inputValue, caretPos), caretPos), getBuffer().join("") !== inputValue) { 1237 var buffer = getBuffer().join(""), offset = !opts.numericInput && inputValue.length > buffer.length ? -1 : 0, frontPart = inputValue.substr(0, caretPos.begin), backPart = inputValue.substr(caretPos.begin), frontBufferPart = buffer.substr(0, caretPos.begin + offset), backBufferPart = buffer.substr(caretPos.begin + offset), selection = caretPos, entries = "", isEntry = !1; 1238 if (frontPart !== frontBufferPart) { 1239 var i, fpl = (isEntry = frontPart.length >= frontBufferPart.length) ? frontPart.length : frontBufferPart.length; 1240 for (i = 0; frontPart.charAt(i) === frontBufferPart.charAt(i) && i < fpl; i++) ; 1241 isEntry && (selection.begin = i - offset, entries += frontPart.slice(i, selection.end)); 1242 } 1243 if (backPart !== backBufferPart && (backPart.length > backBufferPart.length ? entries += backPart.slice(0, 1) : backPart.length < backBufferPart.length && (selection.end += backBufferPart.length - backPart.length, 1244 isEntry || "" === opts.radixPoint || "" !== backPart || frontPart.charAt(selection.begin + offset - 1) !== opts.radixPoint || (selection.begin--,
1245 entries = opts.radixPoint))), writeBuffer(input, getBuffer(), { 1246 begin: selection.begin + offset, 1247 end: selection.end + offset 1248 }), entries.length > 0) $.each(entries.split(""), function(ndx, entry) { 1249 var keypress = new $.Event("keypress"); 1250 keypress.which = entry.charCodeAt(0), ignorable = !1, EventHandlers.keypressEvent.call(input, keypress); 1251 }); else { 1252 selection.begin === selection.end - 1 && (selection.begin = seekPrevious(selection.begin + 1), 1253 selection.begin === selection.end - 1 ? caret(input, selection.begin) : caret(input, selection.begin, selection.end)); 1254 var keydown = new $.Event("keydown"); 1255 keydown.keyCode = opts.numericInput ? Inputmask.keyCode.BACKSPACE : Inputmask.keyCode.DELETE, 1256 EventHandlers.keydownEvent.call(input, keydown); 1257 } 1258 e.preventDefault(); 1259 } 1260 } 1261 }, 1262 beforeInputEvent: function(e) { 1263 if (e.cancelable) { 1264 var input = this; 1265 switch (e.inputType) { 1266 case "insertText": 1267 return $.each(e.data.split(""), function(ndx, entry) { 1268 var keypress = new $.Event("keypress"); 1269 keypress.which = entry.charCodeAt(0), ignorable = !1, EventHandlers.keypressEvent.call(input, keypress); 1270 }), e.preventDefault(); 1271 1272 case "deleteContentBackward": 1273 var keydown = new $.Event("keydown"); 1274 return keydown.keyCode = Inputmask.keyCode.BACKSPACE, EventHandlers.keydownEvent.call(input, keydown), 1275 e.preventDefault(); 1276 1277 case "deleteContentForward": 1278 var keydown = new $.Event("keydown"); 1279 return keydown.keyCode = Inputmask.keyCode.DELETE, EventHandlers.keydownEvent.call(input, keydown), 1280 e.preventDefault(); 1281 } 1282 } 1283 }, 1284 setValueEvent: function(e) { 1285 this.inputmask.refreshValue = !1; 1286 var value = e && e.detail ? e.detail[0] : arguments[1], value = value || this.inputmask._valueGet(!0); 1287 $.isFunction(opts.onBeforeMask) && (value = opts.onBeforeMask.call(inputmask, value, opts) || value), 1288 checkVal(this, !0, !1, value = value.split("")), undoValue = getBuffer().join(""), 1289 (opts.clearMaskOnLostFocus || opts.clearIncomplete) && this.inputmask._valueGet() === getBufferTemplate().join("") && this.inputmask._valueSet(""); 1290 }, 1291 focusEvent: function(e) { 1292 var nptValue = this.inputmask._valueGet(); 1293 opts.showMaskOnFocus && (!opts.showMaskOnHover || opts.showMaskOnHover && "" === nptValue) && (this.inputmask._valueGet() !== getBuffer().join("") ? writeBuffer(this, getBuffer(), seekNext(getLastValidPosition())) : !1 === mouseEnter && caret(this, seekNext(getLastValidPosition()))), 1294 !0 === opts.positionCaretOnTab && !1 === mouseEnter && EventHandlers.clickEvent.apply(this, [ e, !0 ]), 1295 undoValue = getBuffer().join(""); 1296 }, 1297 mouseleaveEvent: function(e) { 1298 mouseEnter = !1, opts.clearMaskOnLostFocus && document.activeElement !== this && (this.placeholder = originalPlaceholder); 1299 }, 1300 clickEvent: function(e, tabbed) { 1301 var input = this; 1302 setTimeout(function() { 1303 if (document.activeElement === input) { 1304 var selectedCaret = caret(input); 1305 if (tabbed && (isRTL ? selectedCaret.end = selectedCaret.begin : selectedCaret.begin = selectedCaret.end), 1306 selectedCaret.begin === selectedCaret.end) switch (opts.positionCaretOnClick) { 1307 case "none": 1308 break; 1309 1310 case "select": 1311 caret(input, 0, getBuffer().length); 1312 break; 1313 1314 case "ignore": 1315 caret(input, seekNext(getLastValidPosition())); 1316 break; 1317 1318 case "radixFocus": 1319 if (function(clickPos) { 1320 if ("" !== opts.radixPoint) { 1321 var vps = getMaskSet().validPositions; 1322 if (vps[clickPos] === undefined || vps[clickPos].input === getPlaceholder(clickPos)) { 1323 if (clickPos < seekNext(-1)) return !0; 1324 var radixPos = $.inArray(opts.radixPoint, getBuffer()); 1325 if (-1 !== radixPos) { 1326 for (var vp in vps) if (radixPos < vp && vps[vp].input !== getPlaceholder(vp)) return !1; 1327 return !0; 1328 } 1329 } 1330 } 1331 return !1; 1332 }(selectedCaret.begin)) { 1333 var radixPos = getBuffer().join("").indexOf(opts.radixPoint); 1334 caret(input, opts.numericInput ? seekNext(radixPos) : radixPos); 1335 break; 1336 } 1337 1338 default: 1339 var clickPosition = selectedCaret.begin, lvclickPosition = getLastValidPosition(clickPosition, !0), lastPosition = seekNext(lvclickPosition); 1340 if (clickPosition < lastPosition) caret(input, isMask(clickPosition, !0) || isMask(clickPosition - 1, !0) ? clickPosition : seekNext(clickPosition)); else { 1341 var lvp = getMaskSet().validPositions[lvclickPosition], tt = getTestTemplate(lastPosition, lvp ? lvp.match.locator : undefined, lvp), placeholder = getPlaceholder(lastPosition, tt.match); 1342 if ("" !== placeholder && getBuffer()[lastPosition] !== placeholder && !0 !== tt.match.optionalQuantifier && !0 !== tt.match.newBlockMarker || !isMask(lastPosition, opts.keepStatic) && tt.match.def === placeholder) { 1343 var newPos = seekNext(lastPosition); 1344 (clickPosition >= newPos || clickPosition === lastPosition) && (lastPosition = newPos); 1345 } 1346 caret(input, lastPosition); 1347 } 1348 } 1349 } 1350 }, 0); 1351 }, 1352 cutEvent: function(e) { 1353 $(this); 1354 var pos = caret(this), ev = e.originalEvent || e, clipboardData = window.clipboardData || ev.clipboardData, clipData = isRTL ? getBuffer().slice(pos.end, pos.begin) : getBuffer().slice(pos.begin, pos.end); 1355 clipboardData.setData("text", isRTL ? clipData.reverse().join("") : clip
1355Data.join("")), 1356 document.execCommand && document.execCommand("copy"), handleRemove(0, Inputmask.keyCode.DELETE, pos), 1357 writeBuffer(this, getBuffer(), getMaskSet().p, e, undoValue !== getBuffer().join("")); 1358 }, 1359 blurEvent: function(e) { 1360 var $input = $(this); 1361 if (this.inputmask) { 1362 this.placeholder = originalPlaceholder; 1363 var nptValue = this.inputmask._valueGet(), buffer = getBuffer().slice(); 1364 "" === nptValue && colorMask === undefined || (opts.clearMaskOnLostFocus && (-1 === getLastValidPosition() && nptValue === getBufferTemplate().join("") ? buffer = [] : clearOptionalTail(buffer)), 1365 !1 === isComplete(buffer) && (setTimeout(function() { 1366 $input.trigger("incomplete"); 1367 }, 0), opts.clearIncomplete && (resetMaskSet(), buffer = opts.clearMaskOnLostFocus ? [] : getBufferTemplate().slice())), 1368 writeBuffer(this, buffer, undefined, e)), undoValue !== getBuffer().join("") && (undoValue = buffer.join(""), 1369 $input.trigger("change")); 1370 } 1371 }, 1372 mouseenterEvent: function(e) { 1373 mouseEnter = !0, document.activeElement !== this && opts.showMaskOnHover && (this.placeholder = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join("")); 1374 }, 1375 submitEvent: function(e) { 1376 undoValue !== getBuffer().join("") && $el.trigger("change"), opts.clearMaskOnLostFocus && -1 === getLastValidPosition() && el.inputmask._valueGet && el.inputmask._valueGet() === getBufferTemplate().join("") && el.inputmask._valueSet(""), 1377 opts.clearIncomplete && !1 === isComplete(getBuffer()) && el.inputmask._valueSet(""), 1378 opts.removeMaskOnSubmit && (el.inputmask._valueSet(el.inputmask.unmaskedvalue(), !0), 1379 setTimeout(function() { 1380 writeBuffer(el, getBuffer()); 1381 }, 0)); 1382 }, 1383 resetEvent: function(e) { 1384 el.inputmask.refreshValue = !0, setTimeout(function() { 1385 $el.trigger("setvalue"); 1386 }, 0); 1387 } 1388 }; 1389 function checkVal(input, writeOut, strict, nptvl, initiatingEvent) { 1390 var inputmask = this || input.inputmask, inputValue = nptvl.slice(), charCodes = "", initialNdx = -1, result = undefined; 1391 if (resetMaskSet(), strict || !0 === opts.autoUnmask) initialNdx = seekNext(initialNdx); else { 1392 var staticInput = getBufferTemplate().slice(0, seekNext(-1)).join(""), matches = inputValue.join("").match(new RegExp("^" + Inputmask.escapeRegex(staticInput), "g")); 1393 matches && matches.length > 0 && (inputValue.splice(0, matches.length * staticInput.length), 1394 initialNdx = seekNext(initialNdx)); 1395 } 1396 -1 === initialNdx ? (getMaskSet().p = seekNext(initialNdx), initialNdx = 0) : getMaskSet().p = initialNdx, 1397 inputmask.caretPos = { 1398 begin: initialNdx 1399 }, $.each(inputValue, function(ndx, charCode) { 1400 if (charCode !== undefined) if (getMaskSet().validPositions[ndx] === undefined && inputValue[ndx] === getPlaceholder(ndx) && isMask(ndx, !0) && !1 === isValid(ndx, inputValue[ndx], !0, undefined, undefined, !0)) getMaskSet().p++; else { 1401 var keypress = new $.Event("_checkval"); 1402 keypress.which = charCode.charCodeAt(0), charCodes += charCode; 1403 var lvp = getLastValidPosition(undefined, !0); 1404 !function(ndx, charCodes) { 1405 return -1 !== getMaskTemplate(!0, 0, !1).slice(ndx, seekNext(ndx)).join("").replace(/'/g, "").indexOf(charCodes) && !isMask(ndx) && (getTest(ndx).match.nativeDef === charCodes.charAt(0) || null === getTest(ndx).match.fn && getTest(ndx).match.nativeDef === "'" + charCodes.charAt(0) || " " === getTest(ndx).match.nativeDef && (getTest(ndx + 1).match.nativeDef === charCodes.charAt(0) || null === getTest(ndx + 1).match.fn && getTest(ndx + 1).match.nativeDef === "'" + charCodes.charAt(0))); 1406 }
1406(initialNdx, charCodes) ? (result = EventHandlers.keypressEvent.call(input, keypress, !0, !1, strict, inputmask.caretPos.begin)) && (initialNdx = inputmask.caretPos.begin + 1, 1407 charCodes = "") : result = EventHandlers.keypressEvent.call(input, keypress, !0, !1, strict, lvp + 1), 1408 result && (writeBuffer(undefined, getBuffer(), result.forwardPosition, keypress, !1), 1409 inputmask.caretPos = { 1410 begin: result.forwardPosition, 1411 end: result.forwardPosition 1412 }); 1413 } 1414 }), writeOut && writeBuffer(input, getBuffer(), result ? result.forwardPosition : undefined, initiatingEvent || new $.Event("checkval"), initiatingEvent && "input" === initiatingEvent.type); 1415 } 1416 function unmaskedvalue(input) { 1417 if (input) { 1418 if (input.inputmask === undefined) return input.value; 1419 input.inputmask && input.inputmask.refreshValue && EventHandlers.setValueEvent.call(input); 1420 } 1421 var umValue = [], vps = getMaskSet().validPositions; 1422 for (var pndx in vps) vps[pndx].match && null != vps[pndx].match.fn && umValue.push(vps[pndx].input); 1423 var unmaskedValue = 0 === umValue.length ? "" : (isRTL ? umValue.reverse() : umValue).join(""); 1424 if ($.isFunction(opts.onUnMask)) { 1425 var bufferValue = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join(""); 1426 unmaskedValue = opts.onUnMask.call(inputmask, bufferValue, unmaskedValue, opts); 1427 } 1428 return unmaskedValue; 1429 } 1430 function caret(input, begin, end, notranslate) { 1431 function translatePosition(pos) { 1432 return !isRTL || "number" != typeof pos || opts.greedy && "" === opts.placeholder || !el || (pos = el.inputmask._valueGet().length - pos), 1433 pos; 1434 } 1435 var range; 1436 if (begin === undefined) return "selectionStart" in input ? (begin = input.selectionStart, 1437 end = input.selectionEnd) : window.getSelection ? (range = window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== input && range.commonAncestorContainer !== input || (begin = range.startOffset, 1438 end = range.endOffset) : document.selection && document.selection.createRange && (range = document.selection.createRange(), 1439 begin = 0 - range.duplicate().moveStart("character", -input.inputmask._valueGet().length), 1440 end = begin + range.text.length), { 1441 begin: notranslate ? begin : translatePosition(begin), 1442 end: notranslate ? end : translatePosition(end) 1443 }; 1444 if ($.isArray(begin) && (end = isRTL ? begin[0] : begin[1], begin = isRTL ? begin[1] : begin[0]), 1445 begin.begin !== undefined && (end = isRTL ? begin.begin : begin.end, begin = isRTL ? begin.end : begin.begin), 1446 "number" == typeof begin) { 1447 begin = notranslate ? begin : translatePosition(begin), end = "number" == typeof (end = notranslate ? end : translatePosition(end)) ? end : begin; 1448 var scrollCalc = parseInt(((input.ownerDocument.defaultView || window).getComputedStyle ? (input.ownerDocument.defaultView || window).getComputedStyle(input, null) : input.currentStyle).fontSize) * end; 1449 if (input.scrollLeft = scrollCalc > input.scrollWidth ? scrollCalc : 0, input.inputmask.caretPos = { 1450 begin: begin, 1451 end: end 1452 }, "selectionStart" in input) input.selectionStart = begin, input.selectionEnd = end; else if (window.getSelection) { 1453 if (range = document.createRange(), input.firstChild === undefined || null === input.firstChild) { 1454 var textNode = document.createTextNode(""); 1455 input.appendChild(textNode); 1456 } 1457 range.setStart(input.firstChild, begin < input.inputmask._valueGet().length ? begin : input.inputmask._valueGet().length), 1458 range.setEnd(input.firstChild, end < input.inputmask._valueGet().length ? end : input.inputmask._valueGet().length), 1459 range.collapse(!0); 1460 var sel = window.getSelection(); 1461 sel.removeAllRanges(), sel.addRange(range); 1462 } else input.createTextRange && ((range = input.createTextRange()).collapse(!0), 1463 range.moveEnd("character", end), range.moveStart("character", begin), range.select()); 1464 renderColorMask(input, { 1465 begin: begin, 1466 end: end 1467 }); 1468 } 1469 } 1470 function determineLastRequiredPosition(returnDefinition) { 1471 var pos, testPos, buffer = getMaskTemplate(!0, getLastValidPosition(), !0, !0), bl = buffer.length, lvp = getLastValidPosition(), positions = {}, lvTest = getMaskSet().validPositions[lvp], ndxIntlzr = lvTest !== undefined ? lvTest.locator.slice() : undefined; 1472 for (pos = lvp + 1; pos < buffer.length; pos++) testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), 1473 ndxIntlzr = testPos.locator.slice(), positions[pos] = $.extend(!0, {}, testPos); 1474 var lvTestAlt = lvTest && lvTest.alternation !== undefined ? lvTest.locator[lvTest.alternation] : undefined; 1475 for (pos = bl - 1; pos > lvp && ((testPos = positions[pos]).match.optionality || testPos.match.optionalQuantifier && testPos.match.newBlockMarker || lvTestAlt && (lvTestAlt !== positions[pos].locator[lvTest.alternation] && null != testPos.match.fn || null === testPos.match.fn && testPos.locator[lvTest.alternation] && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(","), lvTestAlt.toString().split(",")) && "" !== getTests(pos)[0].def)) && buffer[pos] === getPlaceholder(pos, testPos.match); pos--) bl--; 1476 return returnDefinition ? { 1477 l: bl, 1478 def: positions[bl] ? positions[bl].match : undefined 1479 } : bl; 1480 } 1481 function clearOptionalTail(buffer) { 1482 buffer.length = 0; 1483 for (var lmnt, template = getMaskTemplate(!0, 0, !0, undefined, !0); (lmnt = template.shift()) !== undefined; ) buffer.push(lmnt); 1484 return buffer; 1485 } 1486 function isComplete(buffer) { 1487 if ($.isFunction(opts.isComplete)) return opts.isComplete(buffer, opts); 1488 if ("*" === opts.repeat) return undefined; 1489 var complete = !1, lrp = determineLastRequiredPosition(!0), aml = seekPrevious(lrp.l); 1490 if (lrp.def === undefined || lrp.def.newBlockMarker || lrp.def.optionality || lrp.def.optionalQuantifier) { 1491 complete = !0; 1492 for (var i = 0; i <= aml; i++) { 1493 var test = getTestTemplate(i).match; 1494 if (null !== test.fn && getMaskSet().validPositions[i] === undefined && !0 !== test.optionality && !0 !== test.optionalQuantifier || null === test.fn && buffer[i] !== getPlaceholder(i, test)) { 1495 complete = !1; 1496 break; 1497 } 1498 } 1499 } 1500 return complete; 1501 } 1502 function handleRemove(input, k, pos, strict, fromIsValid) { 1503 if ((opts.numericInput || isRTL) && (k === Inputmask.keyCode.BACKSPACE ? k = Inputmask.keyCode.DELETE : k === Inputmask.keyCode.DELETE && (k = Inputmask.keyCode.BACKSPACE), 1504 isRTL)) { 1505 var pend = pos.end; 1506 pos.end = pos.begin, pos.begin = pend; 1507 } 1508 if (k === Inputmask.keyCode.BACKSPACE && pos.end - pos.begin < 1 ? (pos.begin = seekPrevious(pos.begin), 1509 getMaskSet().validPositions[pos.begin] !== undefined && getMaskSet().validPositions[pos.begin].input === opts.groupSeparator && pos.begin--) : k === Inputmask.keyCode.DELETE && pos.begin === pos.end && (pos.end = isMask(pos.end, !0) && getMaskSet().validPositions[pos.end] && getMaskSet().validPositions[pos.end].input !== opts.radixPoint ? pos.end + 1 : seekNext(pos.end) + 1, 1510 getMaskSet().validPositions[pos.begin] !== undefined && getMaskSet().validPositions[pos.begin].input === opts.groupSeparator && pos.end++), 1511 revalidateMask(pos), !0 !== strict && !1 !== opts.keepStatic || null !== opts.regex) { 1512 var result = alternate(!0); 1513 if (result) { 1514 var newPos = result.caret !== undefined ? result.caret : result.pos ? seekNext(result.pos.begin ? result.pos.begin : result.pos) : getLastValidPosition(-1, !0); 1515 (k !== Inputmask.keyCode.DELETE || pos.begin > newPos) && pos.begin; 1516 } 1517 } 1518 var lvp = getLastValidPosition(pos.begin, !0); 1519 if (lvp < pos.begin || -1 === pos.begin) getMaskSet().p = seekNext(lvp); else if (!0 !== strict && (getMaskSet().p = pos.begin, 1520 !0 !== fromIsValid)) for (;getMaskSet().p < lvp && getMaskSet().validPositions[getMaskSet().p] === undefined; ) getMaskSet().p++; 1521 } 1522 function initializeColorMask(input) { 1523 var computedStyle = (input.ownerDocument.defaultView || window).getComputedStyle(input, null), template = document.createElement("div"); 1524 template.style.width = computedStyle.width, template.style.textAlign = computedStyle.textAlign, 1525 colorMask = document.createElement("div"), input.inputmask.colorMask = colorMask, 1526 colorMask.className = "im-colormask", input.parentNode.insertBefore(colorMask, input),
1527 input.parentNode.removeChild(input), colorMask.appendChild(input), colorMask.appendChild(template), 1528 input.style.left = template.offsetLeft + "px", $(colorMask).on("mouseleave", function(e) { 1529 return EventHandlers.mouseleaveEvent.call(input, [ e ]); 1530 }), $(colorMask).on("mouseenter", function(e) { 1531 return EventHandlers.mouseenterEvent.call(input, [ e ]); 1532 }), $(colorMask).on("click", function(e) { 1533 return caret(input, function(clientx) { 1534 var caretPos, e = document.createElement("span"); 1535 for (var style in computedStyle) isNaN(style) && -1 !== style.indexOf("font") && (e.style[style] = computedStyle[style]); 1536 e.style.textTransform = computedStyle.textTransform, e.style.letterSpacing = computedStyle.letterSpacing, 1537 e.style.position = "absolute", e.style.height = "auto", e.style.width = "auto", 1538 e.style.visibility = "hidden", e.style.whiteSpace = "nowrap", document.body.appendChild(e); 1539 var itl, inputText = input.inputmask._valueGet(), previousWidth = 0; 1540 for (caretPos = 0, itl = inputText.length; caretPos <= itl; caretPos++) { 1541 if (e.innerHTML += inputText.charAt(caretPos) || "_", e.offsetWidth >= clientx) { 1542 var offset1 = clientx - previousWidth, offset2 = e.offsetWidth - clientx; 1543 e.innerHTML = inputText.charAt(caretPos), offset1 -= e.offsetWidth / 3, caretPos = offset1 < offset2 ? caretPos - 1 : caretPos; 1544 break; 1545 } 1546 previousWidth = e.offsetWidth; 1547 } 1548 return document.body.removeChild(e), caretPos; 1549 }(e.clientX)), EventHandlers.clickEvent.call(input, [ e ]); 1550 }); 1551 } 1552 function renderColorMask(input, caretPos, clear) { 1553 var test, testPos, ndxIntlzr, maskTemplate = [], isStatic = !1, pos = 0; 1554 function setEntry(entry) { 1555 if (entry === undefined && (entry = ""), isStatic || null !== test.fn && testPos.input !== undefined) if (isStatic && (null !== test.fn && testPos.input !== undefined || "" === test.def)) { 1556 isStatic = !1; 1557 var mtl = maskTemplate.length; 1558 maskTemplate[mtl - 1] = maskTemplate[mtl - 1] + "</span>", maskTemplate.push(entry); 1559 } else maskTemplate.push(entry); else isStatic = !0, maskTemplate.push("<span class='im-static'>" + entry); 1560 } 1561 if (colorMask !== undefined) { 1562 var buffer = getBuffer(); 1563 if (caretPos === undefined ? caretPos = caret(input) : caretPos.begin === undefined && (caretPos = { 1564 begin: caretPos, 1565 end: caretPos 1566 }), !0 !== clear) { 1567 var lvp = getLastValidPosition(); 1568 do { 1569 getMaskSet().validPositions[pos] ? (testPos = getMaskSet().validPositions[pos], 1570 test = testPos.match, ndxIntlzr = testPos.locator.slice(), setEntry(buffer[pos])) : (testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), 1571 test = testPos.match, ndxIntlzr = testPos.locator.slice(), !1 === opts.jitMasking || pos < lvp || "number" == typeof opts.jitMasking && isFinite(opts.jitMasking) && opts.jitMasking > pos ? setEntry(getPlaceholder(pos, test)) : isStatic = !1), 1572 pos++; 1573 } while ((maxLength === undefined || pos < maxLength) && (null !== test.fn || "" !== test.def) || lvp > pos || isStatic); 1574 isStatic && setEntry(), document.activeElement === input && (maskTemplate.splice(caretPos.begin, 0, caretPos.begin === caretPos.end || caretPos.end > getMaskSet().maskLength ? '<mark class="im-caret" style="border-right-width: 1px;border-right-style: solid;">' : '<mark class="im-caret-select">'), 1575 maskTemplate.splice(caretPos.end + 1, 0, "</mark>")); 1576 } 1577 var template = colorMask.getElementsByTagName("div")[0]; 1578 template.innerHTML = maskTemplate.join(""), input.inputmask.positionColorMask(input, template); 1579 } 1580 } 1581 if (Inputmask.prototype.positionColorMask = function(input, template) { 1582 input.style.left = template.offsetLeft + "px"; 1583 }, actionObj !== undefined) switch (actionObj.action) { 1584 case "isComplete": 1585 return el = actionObj.el, isComplete(getBuffer()); 1586 1587 case "unmaskedvalue": 1588 return el !== undefined && actionObj.value === undefined || (valueBuffer = actionObj.value, 1589 valueBuffer = ($.isFunction(opts.onBeforeMask) && opts.onBeforeMask.call(inputmask, valueBuffer, opts) || valueBuffer).split(""), 1590 checkVal.call(this, undefined, !1, !1, valueBuffer), $.isFunction(opts.onBeforeWrite) && opts.onBeforeWrite.call(inputmask, undefined, getBuffer(), 0, opts)), 1591 unmaskedvalue(el); 1592 1593 case "mask": 1594 !function(elem) { 1595 EventRuler.off(elem); 1596 var isSupported = function(input, opts) { 1597 var elementType = input.getAttribute("type"), isSupported = "INPUT" === input.tagName && -1 !== $.inArray(elementType, opts.supportsInputType) || input.isContentEditable || "TEXTAREA" === input.tagName; 1598 if (!isSupported) if ("INPUT" === input.tagName) { 1599 var el = document.createElement("input"); 1600 el.setAttribute("type", elementType), isSupported = "text" === el.type, el = null; 1601 } else isSupported = "partial"; 1602 return !1 !== isSupported ? function(npt) { 1603 var valueGet, valueSet; 1604 function getter() { 1605 return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== getLastValidPosition() || !0 !== opts.nullable ? document.activeElement === this && opts.clearMaskOnLostFocus ? (isRTL ? clearOptionalTail(getBuffer().slice()).reverse() : clearOptionalTail(getBuffer().slice())).join("") : valueGet.call(this) : "" : valueGet.call(this); 1606 } 1607 function setter(value) { 1608 valueSet.call(this, value), this.inputmask && $(this).trigger("setvalue", [ value ]); 1609 } 1610 if (!npt.inputmask.__valueGet) { 1611 if (!0 !== opts.noValuePatching) { 1612 if (Object.getOwnPropertyDescriptor) { 1613 "function" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === _typeof("test".__proto__) ? function(object) { 1614 return object.__proto__; 1615 } : function(object) { 1616 return object.constructor.prototype; 1617 }); 1618 var valueProperty = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(npt), "value") : undefined; 1619 valueProperty && valueProperty.get && valueProperty.set ? (valueGet = valueProperty.get, 1620 valueSet = valueProperty.set, Object.defineProperty(npt, "value", { 1621 get: getter, 1622 set: setter, 1623 configurable: !0 1624 })) : "INPUT" !== npt.tagName && (valueGet = function() { 1625 return this.textContent; 1626 }, valueSet = function(value) { 1627 this.textContent = value; 1628 }, Object.defineProperty(npt, "value", { 1629 get: getter, 1630 set: setter, 1631 configurable: !0 1632 })); 1633 } else document.__lookupGetter__ && npt.__lookupGetter__("value") && (valueGet = npt.__lookupGetter__("value"), 1634 valueSet = npt.__lookupSetter__("value"), npt.__defineGetter__("value", getter), 1635 npt.__defineSetter__("value", setter)); 1636 npt.inputmask.__valueGet = valueGet, npt.inputmask.__valueSet = valueSet; 1637 } 1638 npt.inputmask._valueGet = function(overruleRTL) { 1639 return isRTL && !0 !== overruleRTL ? valueGet.call(this.el).split("").reverse().join("") : valueGet.call(this.el); 1640 }, npt.inputmask._valueSet = function(value, overruleRTL) { 1641 valueSet.call(this.el, null === value || value === undefined ? "" : !0 !== overruleRTL && isRTL ? value.split("").reverse().join("") : value); 1642 }, valueGet === undefined && (valueGet = function() { 1643 return this.value; 1644 }, valueSet = function(value) { 1645 this.value = value; 1646 }, function(type) { 1647 if ($.valHooks && ($.valHooks[type] === undefined || !0 !== $.valHooks[type].inputmaskpatch)) { 1648 var valhookGet = $.valHooks[type] && $.valHooks[type].get ? $.valHooks[type].get : function(elem) { 1649 return elem.value; 1650 }, valhookSet = $.valHooks[type] && $.valHooks[type].set ? $.valHooks[type].set : function(elem, value) { 1651 return elem.value = value, elem; 1652 }; 1653 $.valHooks[type] = { 1654 get: function(elem) { 1655 if (elem.inputmask) { 1656 if (elem.inputmask.opts.autoUnmask) return elem.inputmask.unmaskedvalue(); 1657 var result = valhookGet(elem); 1658 return -1 !== getLastValidPosition(undefined, undefined, elem.inputmask.maskset.validPositions) || !0 !== opts.nullable ? result : ""; 1659 } 1660 return valhookGet(elem); 1661 }, 1662 set: function(elem, value) { 1663 var result, $elem = $(elem); 1664 return result = valhookSet(elem, value), elem.inputmask && $elem.trigger("setvalue", [ value ]), 1665 result; 1666 }, 1667 inputmaskpatch: !0 1668 }; 1669 } 1670 }(npt.type), function(npt) { 1671 EventRuler.on(npt, "mouseenter", function(event) { 1672 var $input = $(this), value = this.inputmask._valueGet(); 1673 value !== getBuffer().join("") && $input.trigger("setvalue"); 1674 }); 1675 }(npt)); 1676 } 1677 }(input) : input.inputmask = undefined, isSupported; 1678 }(elem, opts); 1679 if (!1 !== isSupported && ($el = $(el = elem), originalPlaceholder = el.placeholder, 1680 -1 === (maxLength = el !== undefined ? el.maxLength : undefined) && (maxLength = undefined), 1681 !0 === opts.colorMask && initializeColorMask(el), mobile && ("inputmode" in el && (el.inputmode = opts.inputmode, 1682 el.setAttribute("inputmode", opts.inputmode)), !0 === opts.disablePredictiveText && ("autocorrect" in el ? el.autocorrect = !1 : (!0 !== opts.colorMask && initializeColorMask(el), 1683 el.type = "password"))), !0 === isSupported && (el.setAttribute("im-insert", opts.insertMode), 1684 EventRuler.on(el, "submit", EventHandlers.submitEvent), EventRuler.on(el, "reset", EventHandlers.resetEvent), 1685 EventRuler.on(el, "blur", EventHandlers.blurEvent), EventRuler.on(el, "focus", EventHandlers.focusEvent), 1686 !0 !== opts.colorMask && (EventRuler.on(el, "click", EventHandlers.clickEvent), 1687 EventRuler.on(el, "mouseleave", EventHandlers.mouseleaveEvent), EventRuler.on(el, "mouseenter", EventHandlers.mouseenterEvent)), 1688 EventRuler.on(el, "paste", EventHandlers.pasteEvent), EventRuler.on(el, "cut", EventHandlers.cutEvent), 1689 EventRuler.on(el, "complete", opts.oncomplete), EventRuler.on(el, "incomplete", opts.onincomplete), 1690 EventRuler.on(el, "cleared", opts.oncleared), mobile || !0 === opts.inputEventOnly ? el.removeAttribute("maxLength") : (EventRuler.on(el, "keydown", EventHandlers.keydownEvent), 1691 EventRuler.on(el, "keypress", EventHandlers.keypressEvent)), EventRuler.on(el, "input", EventHandlers.inputFallBackEvent), 1692 EventRuler.on(el, "beforeinput", EventHandlers.beforeInputEvent)), EventRuler.on(el, "setvalue", EventHandlers.setValueEvent), 1693 undoValue = getBufferTemplate().join(""), "" !== el.inputmask._valueGet(!0) || !1 === opts.clearMaskOnLostFocus || document.activeElement === el)) { 1694 var initialValue = $.isFunction(opts.onBeforeMask) && opts.onBeforeMask.call(inputmask, el.inputmask._valueGet(!0), opts) || el.inputmask._valueGet(!0); 1695 "" !== initialValue && checkVal(el, !0, !1, initialValue.split("")); 1696 var buffer = getBuffer().slice(); 1697 undoValue = buffer.join(""), !1 === isComplete(buffer) && opts.clearIncomplete && resetMaskSet(), 1698 opts.clearMaskOnLostFocus && document.activeElement !== el && (-1 === getLastValidPosition() ? buffer = [] : clearOptionalTail(buffer)), 1699 (!1 === opts.clearMaskOnLostFocus || opts.showMaskOnFocus && document.activeElement === el || "" !== el.inputmask._valueGet(!0)) && writeBuffer(el, buffer), 1700 document.activeElement === el && caret(el, seekNext(getLastValidPosition())); 1701 } 1702 }(el); 1703 break; 1704 1705 case "format": 1706 return valueBuffer = ($.isFunction(opts.onBeforeMask) && opts.onBeforeMask.call(inputmask, actionObj.value, opts) || actionObj.value).split(""), 1707 checkVal.call(this, undefined, !0, !1, valueBuffer), actionObj.metadata ? { 1708 value: isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join(""), 1709 metadata: maskScope.call(this, { 1710 action: "getmetadata" 1711 }, maskset, opts) 1712 } : isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join(""); 1713 1714 case "isValid": 1715 actionObj.value ? (valueBuffer = actionObj.value.split(""), checkVal.call(this, undefined, !0, !0, valueBuffer)) : actionObj.value = getBuffer().join(""); 1716
1716 for (var buffer = getBuffer(), rl = determineLastRequiredPosition(), lmib = buffer.length - 1; lmib > rl && !isMask(lmib); lmib--) ; 1717 return buffer.splice(rl, lmib + 1 - rl), isComplete(buffer) && actionObj.value === getBuffer().join(""); 1718 1719 case "getemptymask": 1720 return getBufferTemplate().join(""); 1721 1722 case "remove": 1723 return el && el.inputmask && ($.data(el, "_inputmask_opts", null), $el = $(el), 1724 el.inputmask._valueSet(opts.autoUnmask ? unmaskedvalue(el) : el.inputmask._valueGet(!0)), 1725 EventRuler.off(el), el.inputmask.colorMask && ((colorMask = el.inputmask.colorMask).removeChild(el), 1726 colorMask.parentNode.insertBefore(el, colorMask), colorMask.parentNode.removeChild(colorMask)), 1727 Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(el), "value") && el.inputmask.__valueGet && Object.defineProperty(el, "value", { 1728 get: el.inputmask.__valueGet, 1729 set: el.inputmask.__valueSet, 1730 configurable: !0 1731 }) : document.__lookupGetter__ && el.__lookupGetter__("value") && el.inputmask.__valueGet && (el.__defineGetter__("value", el.inputmask.__valueGet), 1732 el.__defineSetter__("value", el.inputmask.__valueSet)), el.inputmask = undefined), 1733 el; 1734 1735 case "getmetadata": 1736 if ($.isArray(maskset.metadata)) { 1737 var maskTarget = getMaskTemplate(!0, 0, !1).join(""); 1738 return $.each(maskset.metadata, function(ndx, mtdt) { 1739 if (mtdt.mask === maskTarget) return maskTarget = mtdt, !1; 1740 }), maskTarget; 1741 } 1742 return maskset.metadata; 1743 } 1744 } 1745 return Inputmask.prototype = { 1746 dataAttribute: "data-inputmask", 1747 defaults: { 1748 placeholder: "_", 1749 optionalmarker: [ "[", "]" ], 1750 quantifiermarker: [ "{", "}" ], 1751 groupmarker: [ "(", ")" ], 1752 alternatormarker: "|", 1753 escapeChar: "\\", 1754 mask: null, 1755 regex: null, 1756 oncomplete: $.noop, 1757 onincomplete: $.noop, 1758 oncleared: $.noop, 1759 repeat: 0, 1760 greedy: !1, 1761 autoUnmask: !1, 1762 removeMaskOnSubmit: !1, 1763 clearMaskOnLostFocus: !0, 1764 insertMode: !0, 1765 clearIncomplete: !1, 1766 alias: null, 1767 onKeyDown: $.noop, 1768 onBeforeMask: null, 1769 onBeforePaste: function(pastedValue, opts) { 1770 return $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(this, pastedValue, opts) : pastedValue; 1771 }, 1772 onBeforeWrite: null, 1773 onUnMask: null, 1774 showMaskOnFocus: !0, 1775 showMaskOnHover: !0, 1776 onKeyValidation: $.noop, 1777 skipOptionalPartCharacter: " ", 1778 numericInput: !1, 1779 rightAlign: !1, 1780 undoOnEscape: !0, 1781 radixPoint: "", 1782 _radixDance: !1, 1783 groupSeparator: "", 1784 keepStatic: null, 1785 positionCaretOnTab: !0, 1786 tabThrough: !1, 1787 supportsInputType: [ "text", "tel", "password", "search" ], 1788 ignorables: [ 8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, 229 ], 1789 isComplete: null, 1790 preValidation: null, 1791 postValidation: null, 1792 staticDefinitionSymbol: undefined, 1793 jitMasking: !1, 1794 nullable: !0, 1795 inputEventOnly: !1, 1796 noValuePatching: !1, 1797 positionCaretOnClick: "lvp", 1798 casing: null, 1799 inputmode: "verbatim", 1800 colorMask: !1, 1801 disablePredictiveText: !1, 1802 importDataAttributes: !0 1803 }, 1804 definitions: { 1805 9: { 1806 validator: "[0-9ï¼-ï¼]", 1807 definitionSymbol: "*" 1808 }, 1809 a: { 1810 validator: "[A-Za-zÐ-ÑÐÑÃ-ÿµ]", 1811 definitionSymbol: "*" 1812 }, 1813 "*": { 1814 validator: "[0-9ï¼-ï¼A-Za-zÐ-ÑÐÑÃ-ÿµ]" 1815 } 1816 }, 1817 aliases: {}, 1818 masksCache: {}, 1819 mask: function(elems) { 1820 var that = this; 1821 return "string" == typeof elems && (elems = document.getElementById(elems) || document.querySelectorAll(elems)), 1822 elems = elems.nodeName ? [ elems ] : elems, $.each(elems, function(ndx, el) { 1823 var scopedOpts = $.extend(!0, {}, that.opts); 1824 if (function(npt, opts, userOptions, dataAttribute) { 1825 if (!0 === opts.importDataAttributes) { 1826 var option, dataoptions, optionData, p, importOption = function(option, optionData) { 1827 null !== (optionData = optionData !== undefined ? optionData : npt.getAttribute(dataAttribute + "-" + option)) && ("string" == typeof optionData && (0 === option.indexOf("on") ? optionData = window[optionData] : "false" === optionData ? optionData = !1 : "true" === optionData && (
1827optionData = !0)), 1828 userOptions[option] = optionData); 1829 }, attrOptions = npt.getAttribute(dataAttribute); 1830 if (attrOptions && "" !== attrOptions && (attrOptions = attrOptions.replace(/'/g, '"'), 1831 dataoptions = JSON.parse("{" + attrOptions + "}")), dataoptions) for (p in optionData = undefined, 1832 dataoptions) if ("alias" === p.toLowerCase()) { 1833 optionData = dataoptions[p]; 1834 break; 1835 } 1836 for (option in importOption("alias", optionData), userOptions.alias && resolveAlias(userOptions.alias, userOptions, opts), 1837 opts) { 1838 if (dataoptions) for (p in optionData = undefined, dataoptions) if (p.toLowerCase() === option.toLowerCase()) { 1839 optionData = dataoptions[p]; 1840 break; 1841 } 1842 importOption(option, optionData); 1843 } 1844 } 1845 return $.extend(!0, opts, userOptions), ("rtl" === npt.dir || opts.rightAlign) && (npt.style.textAlign = "right"), 1846 ("rtl" === npt.dir || opts.numericInput) && (npt.dir = "ltr", npt.removeAttribute("dir"), 1847 opts.isRTL = !0), Object.keys(userOptions).length; 1848 }(el, scopedOpts, $.extend(!0, {}, that.userOptions), that.dataAttribute)) { 1849 var maskset = generateMaskSet(scopedOpts, that.noMasksCache); 1850 maskset !== undefined && (el.inputmask !== undefined && (el.inputmask.opts.autoUnmask = !0, 1851 el.inputmask.remove()), el.inputmask = new Inputmask(undefined, undefined, !0), 1852 el.inputmask.opts = scopedOpts, el.inputmask.noMasksCache = that.noMasksCache, el.inputmask.userOptions = $.extend(!0, {}, that.userOptions), 1853 el.inputmask.isRTL = scopedOpts.isRTL || scopedOpts.numericInput, el.inputmask.el = el, 1854 el.inputmask.maskset = maskset, $.data(el, "_inputmask_opts", scopedOpts), maskScope.call(el.inputmask, { 1855 action: "mask" 1856 })); 1857 } 1858 }), elems && elems[0] && elems[0].inputmask || this; 1859 }, 1860 option: function(options, noremask) { 1861 return "string" == typeof options ? this.opts[options] : "object" === (void 0 === options ? "undefined" : _typeof(options)) ? ($.extend(this.userOptions, options), 1862 this.el && !0 !== noremask && this.mask(this.el), this) : void 0; 1863 }, 1864 unmaskedvalue: function(value) { 1865 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1866 maskScope.call(this, { 1867 action: "unmaskedvalue", 1868 value: value 1869 }); 1870 }, 1871 remove: function() { 1872 return maskScope.call(this, { 1873 action: "remove" 1874 }); 1875 }, 1876 getemptymask: function() { 1877 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1878 maskScope.call(this, { 1879 action: "getemptymask" 1880 }); 1881 }, 1882 hasMaskedValue: function() { 1883 return !this.opts.autoUnmask; 1884 }, 1885 isComplete: function() { 1886 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1887 maskScope.call(this, { 1888 action: "isComplete" 1889 }); 1890 }, 1891 getmetadata: function() { 1892 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1893 maskScope.call(this, { 1894 action: "getmetadata" 1895 }); 1896 }, 1897 isValid: function(value) { 1898 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1899 maskScope.call(this, { 1900 action: "isValid", 1901 value: value 1902 }); 1903 }, 1904 format: function(value, metadata) { 1905 return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), 1906 maskScope.call(this, { 1907 action: "format", 1908 value: value, 1909 metadata: metadata 1910 }); 1911 }, 1912 setValue: function(value) { 1913 this.el && $(this.el).trigger("setvalue", [ value ]); 1914 }, 1915 analyseMask: function(mask, regexMask, opts) { 1916 var match, m, openingToken, currentOpeningToken, alternator, lastMatch, tokenizer = /(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?(?:\|[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g, regexTokenizer = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, escaped = !1, currentToken = new MaskToken(), openenings = [], maskTokens = []; 1917 function MaskToken(isGroup, isOptional, isQuantifier, isAlternator) { 1918 this.matches = [], this.openGroup = isGroup || !1, this.alternatorGroup = !1, this.isGroup = isGroup || !1, 1919 this.isOptional = isOptional || !1, this.isQuantifier = is
1919Quantifier || !1, this.isAlternator = isAlternator || !1, 1920 this.quantifier = { 1921 min: 1, 1922 max: 1 1923 }; 1924 } 1925 function insertTestDefinition(mtoken, element, position) { 1926 position = position !== undefined ? position : mtoken.matches.length; 1927 var prevMatch = mtoken.matches[position - 1]; 1928 if (regexMask) 0 === element.indexOf("[") || escaped && /\\d|\\s|\\w]/i.test(element) || "." === element ? mtoken.matches.splice(position++, 0, { 1929 fn: new RegExp(element, opts.casing ? "i" : ""), 1930 optionality: !1, 1931 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== element, 1932 casing: null, 1933 def: element, 1934 placeholder: undefined, 1935 nativeDef: element 1936 }) : (escaped && (element = element[element.length - 1]), $.each(element.split(""), function(ndx, lmnt) { 1937 prevMatch = mtoken.matches[position - 1], mtoken.matches.splice(position++, 0, { 1938 fn: null, 1939 optionality: !1, 1940 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== lmnt && null !== prevMatch.fn, 1941 casing: null, 1942 def: opts.staticDefinitionSymbol || lmnt, 1943 placeholder: opts.staticDefinitionSymbol !== undefined ? lmnt : undefined, 1944 nativeDef: (escaped ? "'" : "") + lmnt 1945 }); 1946 })), escaped = !1; else { 1947 var maskdef = (opts.definitions ? opts.definitions[element] : undefined) || Inputmask.prototype.definitions[element]; 1948 maskdef && !escaped ? mtoken.matches.splice(position++, 0, { 1949 fn: maskdef.validator ? "string" == typeof maskdef.validator ? new RegExp(maskdef.validator, opts.casing ? "i" : "") : new function() { 1950 this.test = maskdef.validator; 1951 }() : new RegExp("."), 1952 optionality: !1, 1953 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== (maskdef.definitionSymbol || element), 1954 casing: maskdef.casing, 1955 def: maskdef.definitionSymbol || element, 1956 placeholder: maskdef.placeholder, 1957 nativeDef: element 1958 }) : (mtoken.matches.splice(position++, 0, { 1959 fn: null, 1960 optionality: !1, 1961 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== element && null !== prevMatch.fn, 1962 casing: null, 1963 def: opts.staticDefinitionSymbol || element, 1964 placeholder: opts.staticDefinitionSymbol !== undefined ? element : undefined, 1965 nativeDef: (escaped ? "'" : "") + element 1966 }), escaped = !1); 1967 } 1968 } 1969 function defaultCase() { 1970 if (openenings.length > 0) { 1971 if (insertTestDefinition(currentOpeningToken = openenings[openenings.length - 1], m), 1972 currentOpeningToken.isAlternator) { 1973 alternator = openenings.pop(); 1974 for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup && (alternator.matches[mndx].isGroup = !1); 1975 openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1]).matches.push(alternator) : currentToken.matches.push(alternator); 1976 } 1977 } else insertTestDefinition(currentToken, m); 1978 } 1979 function groupify(matches) { 1980 var groupToken = new MaskToken(!0); 1981 return groupToken.openGroup = !1, groupToken.matches = matches, groupToken; 1982 } 1983 for (regexMask && (opts.optionalmarker[0] = undefined, opts.optionalmarker[1] = undefined); match = regexMask ? regexTokenizer.exec(mask) : tokenizer.exec(mask); ) { 1984 if (m = match[0], regexMask) switch (m.charAt(0)) { 1985 case "?": 1986 m = "{0,1}"; 1987 break; 1988 1989 case "+": 1990 case "*": 1991 m = "{" + m + "}"; 1992 } 1993 if (escaped) defaultCase(); else switch (m.charAt(0)) { 1994 case "(?=": 1995 case "(?!": 1996 case "(?<=": 1997 case "(?<!": 1998 break; 1999 2000 case opts.escapeChar: 2001 escaped = !0, regexMask && defaultCase(); 2002 break; 2003 2004 case opts.optionalmarker[1]: 2005 case opts.groupmarker[1]: 2006 if ((openingToken = openenings.pop()).openGroup = !1, openingToken !== undefined) if (openenings.length > 0) { 2007 if ((currentOpeningToken = openenings[openenings.length - 1]).matches.push(openingToken), 2008 currentOpeningToken.isAlternator) { 2009 alternator = openenings.pop(); 2010 for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1, 2011 alternator.matches[mndx].alternatorGroup = !1; 2012 openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1]).matches.push(alternator) : currentToken.matches.push(alternator); 2013 } 2014 } else currentToken.matches.push(openingToken); else defaultCase(); 2015 break; 2016 2017 case opts.optionalmarker[0]: 2018 openenings.push(new MaskToken(!1, !0)); 2019 break; 2020 2021 case opts.groupmarker[0]: 2022 openenings.push(new MaskToken(!0)); 2023 break; 2024 2025 case opts.quantifiermarker[0]: 2026 var quantifier = new MaskToken(!1, !1, !0), mqj = (m = m.replace(/[{}]/g, "")).split("|"), mq = mqj[0].split(","), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 === mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]); 2027 "*" !== mq0 && "+" !== mq0 || (mq0 = "*" === mq1 ? 0 : 1), quantifier.quantifier = { 2028 min: mq0, 2029 max: mq1, 2030 jit: mqj[1] 2031 }; 2032 var matches = openenings.length > 0 ? openenings[openenings.length - 1].matches : currentToken.matches; 2033 if ((match = matches.pop()).isAlternator) { 2034 matches.push(match), matches = match.matches; 2035 var groupToken = new MaskToken(!0), tmpMatch = matches.pop(); 2036 matches.push(groupToken), matches = groupToken.matches, match = tmpMatch; 2037 } 2038 match.isGroup || (match = groupify([ match ])), matches.push(match), matches.push(quantifier); 2039 break; 2040 2041 case opts.alternatormarker: 2042 var groupQuantifier = function(matches) { 2043 var lastMatch = matches.pop(); 2044 return lastMatch.isQuantifier && (lastMatch = groupify([ matches.pop(), lastMatch ])), 2045 lastMatch; 2046 }; 2047 if (openenings.length > 0) { 2048 var subToken = (currentOpeningToken = openenings[openenings.length - 1]).matches[currentOpeningToken.matches.length - 1]; 2049 lastMatch = currentOpeningToken.openGroup && (subToken.matches === undefined || !1 === subToken.isGroup && !1 === subToken.isAlternator) ? openenings.pop() : groupQuantifier(currentOpeningToken.matches); 2050 } else lastMatch = groupQuantifier(currentToken.matches); 2051 if (lastMatch.isAlternator) openenings.push(lastMatch); else if (lastMatch.alternatorGroup ? (alternator = openenings.pop(), 2052 lastMatch.alternatorGroup = !1) : alternator = new MaskToken(!1, !1, !1, !0), alternator.matches.push(lastMatch), 2053 openenings.push(alternator), lastMatch.openGroup) { 2054 lastMatch.openGroup = !1; 2055 var alternatorGroup = new MaskToken(!0); 2056 alternatorGroup.alternatorGroup = !0, openenings.push(alternatorGroup); 2057 } 2058 break; 2059 2060 default: 2061 defaultCase(); 2062 } 2063 } 2064 for (;openenings.length > 0; ) openingToken = openenings.pop(), currentToken.matches.push(openingToken); 2065 return currentToken.matches.length > 0 && (function verifyGroupMarker(maskToken) { 2066 maskToken && maskToken.matches && $.each(maskToken.matches, function(ndx, token) { 2067 var nextToken = maskToken.matches[ndx + 1]; 2068 (nextToken === undefined || nextToken.matches === undefined || !1 === nextToken.isQuantifier) && token && token.isGroup && (token.isGroup = !1, 2069 regexMask || (insertTestDefinition(token, opts.groupmarker[0], 0), !0 !== token.openGroup && insertTestDefinition(token, opts.groupmarker[1]))), 2070 verifyGroupMarker(token); 2071 }); 2072 }(currentToken), maskTokens.push(currentToken)), (opts.numericInput || opts.isRTL) && function reverseTokens(maskToken) { 2073 for (var match in maskToken.matches = maskToken.matches.reverse(), maskToken.matches) if (maskToken.matches.hasOwnProperty(match)) { 2074 var intMatch = parseInt(match); 2075 if (maskToken.matches[match].isQuantifier && maskToken.matches[intMatch + 1] && maskToken.matches[intMatch + 1].isGroup) { 2076 var qt = maskToken.matches[match]; 2077 maskToken.matches.splice(match, 1), maskToken.matches.splice(intMatch + 1, 0, qt); 2078 } 2079 maskToken.matches[match].matches !== undefined ? maskToken.matches[match] = reverseTokens(maskToken.matches[match]) : maskToken.matches[match] = ((st = maskToken.matches[match]) === opts.optionalmarker[0] ? st = opts.optionalmarker[1] : st === opts.optionalmarker[1] ? st = opts.optionalmarker[0] : st === opts.groupmarker[0] ? st = opts.groupmarker[1] : st === opts.groupmarker[1] && (st = opts.groupmarker[0]), 2080 st); 2081 } 2082 var st; 2083 return maskToken; 2084 }(maskTokens[0]), maskTokens; 2085 } 2086 }, Inputmask.extendDefaults = function(options) { 2087 $.extend(!0, Inputmask.prototype.defaults, options); 2088 }, Inputmask.extendDefinitions = function(definition) { 2089 $.extend(!0, Inputmask.prototype.definitions, definition); 2090 }, Inputmask.extendAliases = function(alias) { 2091 $.extend(!0, Inputmask.prototype.aliases, alias); 2092 }, Inputmask.format = function(value, options, metadata) { 2093 return Inputmask(options).format(value, metadata); 2094 }, Inputmask.unmask = function(value, options) { 2095 return Inputmask(options).unmaskedvalue(value); 2096 }, Inputmask.isValid = function(value, options) { 2097 return Inputmask(options).isValid(value); 2098 }, Inputmask.remove = function(elems) { 2099 "string" == typeof elems && (elems = document.getElementById(elems) || document.querySelectorAll(elems)), 2100 elems = elems.nodeName ? [ elems ] : elems, $.each(elems, function(ndx, el) { 2101 el.inputmask && el.inputmask.remove(); 2102 }); 2103 }, Inputmask.setValue = function(elems, value) { 2104 "string" == typeof elems && (elems = document.getElementById(elems) || document.querySelectorAll(elems)), 2105 elems = elems.nodeName ? [ elems ] : elems, $.each(elems, function(ndx, el) { 2106 el.inputmask ? el.inputmask.setValue(value) : $(el).trigger("setvalue", [ value ]); 2107 }); 2108 }, Inputmask.escapeRegex = function(str) { 2109 return str.replace(new RegExp("(\\" + [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ].join("|\\") + ")", "gim"), "\\$1"); 2110 }, Inputmask.keyCode = { 2111 BACKSPACE: 8, 2112 BACKSPACE_SAFARI: 127, 2113 DELETE: 46, 2114 DOWN: 40, 2115 END: 35, 2116 ENTER: 13, 2117 ESCAPE: 27, 2118 HOME: 36, 2119 INSERT: 45, 2120 LEFT: 37, 2121 PAGE_DOWN: 34, 2122 PAGE_UP: 33, 2123 RIGHT: 39, 2124 SPACE: 32, 2125 TAB: 9, 2126 UP: 38, 2127 X: 88, 2128 CONTROL: 17 2129 }, Inputmask; 2130 }) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2131}, function(module, exports, __webpack_require__) { 2132 "use strict"; 2133 var __WEBPACK_AMD_DEFINE_RESULT__; 2134 "function" == typeof Symbol && Symbol.iterator; 2135 void 0 === (__WEBPACK_AMD_DEFINE_RESULT__ = function() { 2136 return window; 2137 }.call(exports, __webpack_require__, exports, module)) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2138}, function(module, exports, __webpack_require__) { 2139 "use strict"; 2140 var __WEBPACK_AMD_DEFINE_RESULT__; 2141 "function" == typeof Symbol && Symbol.iterator; 2142 void 0 === (__WEBPACK_AMD_DEFINE_RESULT__ = function() { 2143 return document; 2144 }.call(exports, __webpack_require__, exports, module)) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2145}, function(module, exports, __webpack_require__) { 2146 "use strict"; 2147 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 2148 "function" == typeof Symbol && Symbol.iterator; 2149 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2), __webpack_require__(4) ], 2150 void 0 === (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function($, Inputmask) { 2151 return Inputmask.extendDefinitions({ 2152 A: { 2153 validator: "[A-Za-zÐ-ÑÐÑÃ-ÿµ]", 2154 casing: "upper" 2155 }, 2156 "&": { 2157 validator: "[0-9A-Za-zÐ-ÑÐÑÃ-ÿµ]", 2158 casing: "upper" 2159 }, 2160 "#": { 2161 validator: "[0-9A-Fa-f]", 2162 casing: "upper" 2163 } 2164 }), Inputmask.extendAliases({ 2165 cssunit: { 2166 regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)" 2167 }, 2168 url: { 2169 regex: "(https?|ftp)//.*", 2170 autoUnmask: !1 2171 }, 2172 ip: { 2173 mask: "i[i[i]].i[i[i]].i[i[i]].i[i[i]]", 2174 definitions: { 2175 i: { 2176 validator: function(chrs, maskset, pos, strict, opts) { 2177 return pos - 1 > -1 && "." !== maskset.buffer[pos - 1] ? (chrs = maskset.buffer[pos - 1] + chrs, 2178 chrs = pos - 2 > -1 && "." !== maskset.buffer[pos - 2] ? maskset.buffer[pos - 2] + chrs : "0" + chrs) : chrs = "00" + chrs, 2179 new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs); 2180 } 2181 } 2182 }, 2183 onUnMask: function(maskedValue, unmaskedValue, opts) { 2184 return maskedValue; 2185 }, 2186
2186 inputmode: "numeric" 2187 }, 2188 email: { 2189 mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]", 2190 greedy: !1, 2191 casing: "lower", 2192 onBeforePaste: function(pastedValue, opts) { 2193 return (pastedValue = pastedValue.toLowerCase()).replace("mailto:", ""); 2194 }, 2195 definitions: { 2196 "*": { 2197 validator: "[0-9ï¼-ï¼A-Za-zÐ-ÑÐÑÃ-ÿµ!#$%&'*+/=?^_`{|}~-]" 2198 }, 2199 "-": { 2200 validator: "[0-9A-Za-z-]" 2201 } 2202 }, 2203 onUnMask: function(maskedValue, unmaskedValue, opts) { 2204 return maskedValue; 2205 }, 2206 inputmode: "email" 2207 }, 2208 mac: { 2209 mask: "##:##:##:##:##:##" 2210 }, 2211 vin: { 2212 mask: "V{13}9{4}", 2213 definitions: { 2214 V: { 2215 validator: "[A-HJ-NPR-Za-hj-npr-z\\d]", 2216 casing: "upper" 2217 } 2218 }, 2219 clearIncomplete: !0, 2220 autoUnmask: !0 2221 } 2222 }), Inputmask; 2223 }) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2224}, function(module, exports, __webpack_require__) { 2225 "use strict"; 2226 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 2227 "function" == typeof Symbol && Symbol.iterator; 2228 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2), __webpack_require__(4) ], 2229 void 0 === (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function($, Inputmask, undefined) { 2230 function autoEscape(txt, opts) { 2231 for (var escapedTxt = "", i = 0; i < txt.length; i++) Inputmask.prototype.definitions[txt.charAt(i)] || opts.definitions[txt.charAt(i)] || opts.optionalmarker.start === txt.charAt(i) || opts.optionalmarker.end === txt.charAt(i) || opts.quantifiermarker.start === txt.charAt(i) || opts.quantifiermarker.end === txt.charAt(i) || opts.groupmarker.start === txt.charAt(i) || opts.groupmarker.end === txt.charAt(i) || opts.alternatormarker === txt.charAt(i) ? escapedTxt += "\\" + txt.charAt(i) : escapedTxt += txt.charAt(i); 2232 return escapedTxt; 2233 } 2234 return Inputmask.extendAliases({ 2235 numeric: { 2236 mask: function(opts) { 2237 if (0 !== opts.repeat && isNaN(opts.integerDigits) && (opts.integerDigits = opts.repeat), 2238 opts.repeat = 0, opts.groupSeparator === opts.radixPoint && opts.digits && "0" !== opts.digits && ("." === opts.radixPoint ? opts.groupSeparator = "," : "," === opts.radixPoint ? opts.groupSeparator = "." : opts.groupSeparator = ""), 2239 " " === opts.groupSeparator && (opts.skipOptionalPartCharacter = undefined), opts.autoGroup = opts.autoGroup && "" !== opts.groupSeparator, 2240 opts.autoGroup && ("string" == typeof opts.groupSize && isFinite(opts.groupSize) && (opts.groupSize = parseInt(opts.groupSize)), 2241 isFinite(opts.integerDigits))) { 2242 var seps = Math.floor(opts.integerDigits / opts.groupSize), mod = opts.integerDigits % opts.groupSize; 2243 opts.integerDigits = parseInt(opts.integerDigits) + (0 === mod ? seps - 1 : seps), 2244 opts.integerDigits < 1 && (opts.integerDigits = "*"); 2245 } 2246 opts.placeholder.length > 1 && (opts.placeholder = opts.placeholder.charAt(0)), 2247 "radixFocus" === opts.positionCaretOnClick && "" === opts.placeholder && !1 === opts.integerOptional && (opts.positionCaretOnClick = "lvp"), 2248 opts.definitions[";"] = opts.definitions["~"], opts.definitions[";"].definitionSymbol = "~", 2249 !0 === opts.numericInput && (opts.positionCaretOnClick = "radixFocus" === opts.positionCaretOnClick ? "lvp" : opts.positionCaretOnClick, 2250 opts.digitsOptional = !1, isNaN(opts.digits) && (opts.digits = 2), opts.decimalProtect = !1); 2251 var mask = "[+]"; 2252 if (mask += autoEscape(opts.prefix, opts), !0 === opts.integerOptional ? mask += "~{1," + opts.integerDigits + "}" : mask += "~{" + opts.integerDigits + "}", 2253 opts.digits !== undefined) { 2254 var radixDef = opts.decimalProtect ? ":" : opts.radixPoint, dq = opts.digits.toString().split(","); 2255 isFinite(dq[0]) && dq[1] && isFinite(dq[1]) ? mask += radixDef + ";{" + opts.digits + "}" : (isNaN(opts.digits) || parseInt(opts.digits) > 0) && (opts.digitsOptional ? mask += "[" + radixDef + ";{1," + opts.digits + "}]" : mask += radixDef + ";{" + opts.digits + "}"); 2256 } 2257 return mask += autoEscape(opts.suffix, opts), mask += "[-]", opts.greedy = !1, mask; 2258 }, 2259 placeholder: "", 2260 greedy: !1, 2261 digits: "*", 2262 digitsOptional: !0, 2263 enforceDigitsOnBlur: !1, 2264 radixPoint: ".", 2265 positionCaretOnClick: "radixFocus", 2266 groupSize: 3, 2267 groupSeparator: "", 2268 autoGroup: !1, 2269 allowMinus: !0, 2270 negationSymbol: { 2271 front: "-", 2272 back: "" 2273 }, 2274 integerDigits: "+", 2275 integerOptional: !0, 2276 prefix: "", 2277 suffix: "", 2278 rightAlign: !0, 2279 decimalProtect: !0, 2280 min: null, 2281 max: null, 2282 step: 1, 2283 insertMode: !0, 2284 autoUnmask: !1, 2285 unmaskAsNumber: !1, 2286 inputmode: "numeric", 2287 preValidation: function(buffer, pos, c, isSelection, opts, maskset) { 2288 if ("-" === c || c === opts.negationSymbol.front) return !0 === opts.allowMinus && (opts.isNegative = opts.isNegative === undefined || !opts.isNegative, 2289 "" === buffer.join("") || { 2290 caret: maskset.validPositions[pos] ? pos : undefined, 2291 dopost: !0 2292 }); 2293 if (!1 === isSelection && c === opts.radixPoint && opts.digits !== undefined && (isNaN(opts.digits) || parseInt(opts.digits) > 0)) { 2294 var radixPos = $.inArray(opts.radixPoint, buffer); 2295 if (-1 !== radixPos && maskset.validPositions[radixPos] !== undefined) return !0 === opts.numericInput ? pos === radixPos : { 2296 caret: radixPos + 1 2297 }; 2298 } 2299 return !0; 2300 }, 2301 postValidation: function(buffer, pos, currentResult, opts) { 2302 var suffix = opts.suffix.split(""), prefix = opts.prefix.split(""); 2303 if (currentResult.pos === undefined && currentResult.caret !== undefined && !0 !== currentResult.dopost) return currentResult; 2304 var caretPos = currentResult.caret !== undefined ? currentResult.caret : currentResult.pos, maskedValue = buffer.slice(); 2305 opts.numericInput && (caretPos = maskedValue.length - caretPos - 1, maskedValue = maskedValue.reverse()); 2306 var charAtPos = maskedValue[caretPos]; 2307 if (charAtPos === opts.groupSeparator && (charAtPos = maskedValue[caretPos += 1]), 2308 caretPos === maskedValue.length - opts.suffix.length - 1 && charAtPos === opts.radixPoint) return currentResult; 2309 charAtPos !== undefined && charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back && (maskedValue[caretPos] = "?", 2310 opts.prefix.length > 0 && caretPos >= (!1 === opts.isNegative ? 1 : 0) && caretPos < opts.prefix.length - 1 + (!1 === opts.isNegative ? 1 : 0) ? prefix[caretPos - (!1 === opts.isNegative ? 1 : 0)] = "?" : opts.suffix.length > 0 && caretPos >= maskedValue.length - opts.suffix.length - (!1 === opts.isNegative ? 1 : 0) && (suffix[caretPos - (maskedValue.length - opts.suffix.length - (!1 === opts.isNegative ? 1 : 0))] = "?")), 2311 prefix = prefix.join(""), suffix = suffix.join(""); 2312 var processValue = maskedValue.join("").replace(prefix, ""); 2313 if (processValue = (processValue = (processValue = (processValue = processValue.replace(suffix, "")).replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "")).replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), "")).replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""), 2314 isNaN(opts.placeholder) && (processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.placeholder), "g"), "")), 2315 processValue.length > 1 && 1 !== processValue.indexOf(opts.radixPoint) && ("0" === charAtPos && (processValue = processValue.replace(/^\?/g, "")), 2316 processValue = processValue.replace(/^0/g, "")), processValue.charAt(0) === opts.radixPoint && "" !== opts.radixPoint && !0 !== opts.numericInput && (processValue = "0" + processValue), 2317 "" !== processValue) { 2318 if (processValue = processValue.split(""), (!opts.digitsOptional || opts.enforceDigitsOnBlur && "blur" === currentResult.event) && isFinite(opts.digits)) { 2319 var radixPosition = $.inArray(opts.radixPoint, processValue), rpb = $.inArray(opts.radixPoint, maskedValue); 2320 -1 === radixPosition && (processValue.push(opts.radixPoint), radixPosition = processValue.length - 1); 2321 for (var i = 1; i <= opts.digits; i++) opts.digitsOptional && (!opts.enforceDigitsOnBlur || "blur" !== currentResult.event) || processValue[radixPosition + i] !== undefined && processValue[radixPosition + i] !== opts.placeholder.charAt(0) ? -1 !== rpb && maskedValue[rpb + i] !== undefined && (processValue[radixPosition + i] = processValue[radixPosition + i] || maskedValue[rpb + i]) : processValue[radixPosition + i] = currentResult.placeholder || opts.placeholder.charAt(0); 2322 } 2323 if (!0 !== opts.autoGroup || "" === opts.groupSeparator || charAtPos === opts.radixPoint && currentResult.pos === undefined && !currentResult.dopost) processValue = processValue.join(""); else { 2324 var addRadix = processValue[processValue.length - 1] === opts.radixPoint && currentResult.c === opts.radixPoint; 2325 processValue = Inputmask(function(buffer, opts) { 2326 var postMask = ""; 2327 if (postMask += "(" + opts.groupSeparator + "*{" + opts.groupSize + "}){*}", "" !== opts.radixPoint) { 2328 var radixSplit = buffer.join("").split(opts.radixPoint); 2329 radixSplit[1] && (postMask += opts.radixPoint + "*{" + radixSplit[1].match(/^\d*\??\d*/)[0].length + "}"); 2330 } 2331 return postMask; 2332 }(processValue, opts), { 2333 numericInput: !0, 2334 jitMasking: !0, 2335 definitions: { 2336 "*": { 2337 validator: "[0-9?]", 2338 cardinality: 1 2339 } 2340 } 2341 }).format(processValue.join("")), addRadix && (processValue += opts.radixPoint), 2342 processValue.charAt(0) === opts.groupSeparator && processValue.substr(1); 2343 } 2344 } 2345 if (opts.isNegative && "blur" === currentResult.event && (opts.isNegative = "0" !== processValue), 2346 processValue = prefix + processValue, processValue += suffix, opts.isNegative && (processValue = opts.negationSymbol.front + processValue, 2347 processValue += opts.negationSymbol.back), processValue = processValue.split(""), 2348 charAtPos !== undefined) if (charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back) (caretPos = $.inArray("?", processValue)) > -1 ? processValue[caretPos] = charAtPos : caretPos = currentResult.caret || 0; else if (charAtPos === opts.radixPoint || charAtPos === opts.negationSymbol.front || charAtPos === opts.negationSymbol.back) { 2349 var newCaretPos = $.inArray(charAtPos, processValue); 2350 -1 !== newCaretPos && (caretPos = newCaretPos); 2351 } 2352 opts.numericInput && (caretPos = processValue.length - caretPos - 1, processValue = processValue.reverse()); 2353 var rslt = { 2354 caret: charAtPos !== undefined && currentResult.pos === undefined || caretPos === undefined ? caretPos : caretPos + (opts.numericInput ? -1 : 1), 2355 buffer: processValue, 2356 refreshFromBuffer: currentResult.dopost || buffer.join("") !== processValue.join("") 2357 }; 2358 return rslt.refreshFromBuffer ? rslt : currentResult; 2359 }, 2360 onBeforeWrite: function(e, buffer, caretPos, opts) { 2361 if (e) switch (e.type) { 2362 case "keydown": 2363 return opts.postValidation(buffer, caretPos, { 2364 caret: caretPos, 2365 dopost: !0 2366 }, opts); 2367 2368 case "blur": 2369 case "checkval": 2370 var unmasked; 2371 if (function(opts) { 2372 opts.parseMinMaxOptions === undefined && (null !== opts.min && (opts.min = opts.min.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2373 "," === opts.radixPoint && (opts.min = opts.min.replace(opts.radixPoint, ".")), 2374 opts.min = isFinite(opts.min) ? parseFloat(opts.min) : NaN, isNaN(opts.min) && (opts.min = Number.MIN_VALUE)), 2375 null !== opts.max && (opts.max = opts.max.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2376 "," === opts.radixPoint && (opts.max = opts.max.replace(opts.radixPoint, ".")), 2377 opts.max = isFinite(opts.max) ? parseFloat(opts.max) : NaN, isNaN(opts.max) && (opts.max = Number.MAX_VALUE)), 2378 opts.parseMinMaxOptions = "done"); 2379 }(opts), null !== opts.min || null !== opts.max) { 2380 if (unmasked = opts.onUnMask(buffer.join(""), undefined, $.extend({}, opts, { 2381 unmaskAsNumber: !0 2382 })), null !== opts.min && unmasked < opts.min) return opts.isNegative = opts.min < 0, 2383 opts.postValidation(opts.min.toString().replace(".", opts.radixPoint).split(""), caretPos, { 2384 caret: caretPos, 2385 dopost: !0, 2386 placeholder: "0" 2387 }, opts); 2388 if (null !== opts.max && unmasked > opts.max) return opts.isNegative = opts.max < 0, 2389 opts.postValidation(opts.max.toString().replace(".", opts.radixPoint).split(""), caretPos, { 2390 caret: caretPos, 2391 dopost: !0, 2392 placeholder: "0" 2393 }, opts); 2394 } 2395
2395 return opts.postValidation(buffer, caretPos, { 2396 caret: caretPos, 2397 placeholder: "0", 2398 event: "blur" 2399 }, opts); 2400 2401 case "_checkval": 2402 return { 2403 caret: caretPos 2404 }; 2405 } 2406 }, 2407 regex: { 2408 integerPart: function(opts, emptyCheck) { 2409 return emptyCheck ? new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?") : new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?\\d+"); 2410 }, 2411 integerNPart: function(opts) { 2412 return new RegExp("[\\d" + Inputmask.escapeRegex(opts.groupSeparator) + Inputmask.escapeRegex(opts.placeholder.charAt(0)) + "]+"); 2413 } 2414 }, 2415 definitions: { 2416 "~": { 2417 validator: function(chrs, maskset, pos, strict, opts, isSelection) { 2418 var isValid; 2419 if ("k" === chrs || "m" === chrs) { 2420 isValid = { 2421 insert: [], 2422 c: 0 2423 }; 2424 for (var i = 0, l = "k" === chrs ? 2 : 5; i < l; i++) isValid.insert.push({ 2425 pos: pos + i, 2426 c: 0 2427 }); 2428 return isValid.pos = pos + l, isValid; 2429 } 2430 if (!0 === (isValid = strict ? new RegExp("[0-9" + Inputmask.escapeRegex(opts.groupSeparator) + "]").test(chrs) : new RegExp("[0-9]").test(chrs))) { 2431 if (!0 !== opts.numericInput && maskset.validPositions[pos] !== undefined && "~" === maskset.validPositions[pos].match.def && !isSelection) { 2432 var processValue = maskset.buffer.join(""), pvRadixSplit = (processValue = (processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), "")).replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), "")).split(opts.radixPoint); 2433 pvRadixSplit.length > 1 && (pvRadixSplit[1] = pvRadixSplit[1].replace(/0/g, opts.placeholder.charAt(0))), 2434 "0" === pvRadixSplit[0] && (pvRadixSplit[0] = pvRadixSplit[0].replace(/0/g, opts.placeholder.charAt(0))), 2435 processValue = pvRadixSplit[0] + opts.radixPoint + pvRadixSplit[1] || ""; 2436 var bufferTemplate = maskset._buffer.join(""); 2437 for (processValue === opts.radixPoint && (processValue = bufferTemplate); null === processValue.match(Inputmask.escapeRegex(bufferTemplate) + "$"); ) bufferTemplate = bufferTemplate.slice(1); 2438 isValid = (processValue = (processValue = processValue.replace(bufferTemplate, "")).split(""))[pos] === undefined ? { 2439 pos: pos, 2440 remove: pos 2441 } : { 2442 pos: pos 2443 }; 2444 } 2445 } else strict || chrs !== opts.radixPoint || maskset.validPositions[pos - 1] !== undefined || (isValid = { 2446 insert: { 2447 pos: pos, 2448 c: 0 2449 }, 2450 pos: pos + 1 2451 }); 2452 return isValid; 2453 }, 2454 cardinality: 1 2455 }, 2456 "+": { 2457 validator: function(chrs, maskset, pos, strict, opts) { 2458 return opts.allowMinus && ("-" === chrs || chrs === opts.negationSymbol.front); 2459 }, 2460 cardinality: 1, 2461 placeholder: "" 2462 }, 2463 "-": { 2464 validator: function(chrs, maskset, pos, strict, opts) { 2465 return opts.allowMinus && chrs === opts.negationSymbol.back; 2466 }, 2467 cardinality: 1, 2468 placeholder: "" 2469 }, 2470 ":": { 2471 validator: function(chrs, maskset, pos, strict, opts) { 2472 var radix = "[" + Inputmask.escapeRegex(opts.radixPoint) + "]", isValid = new RegExp(radix).test(chrs); 2473 return isValid && maskset.validPositions[pos] && maskset.validPositions[pos].match.placeholder === opts.radixPoint && (isValid = { 2474 caret: pos + 1 2475 }), isValid; 2476 }, 2477 cardinality: 1, 2478 placeholder: function(opts) { 2479 return opts.radixPoint; 2480 } 2481 } 2482 }, 2483 onUnMask: function(maskedValue, unmaskedValue, opts) { 2484 if ("" === unmaskedValue && !0 === opts.nullable) return unmaskedValue; 2485 var processValue = maskedValue.replace(opts.prefix, ""); 2486 return processValue = (processValue = processValue.replace(opts.suffix, "")).replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2487 "" !== opts.placeholder.charAt(0) && (processValue = processValue.replace(new RegExp(opts.placeholder.charAt(0), "g"), "0")), 2488 opts.unmaskAsNumber ? ("" !== opts.radixPoint && -1 !== processValue.indexOf(opts.radixPoint) && (processValue = processValue.replace(Inputmask.escapeRegex.call(this, opts.radixPoint), ".")), 2489 processValue = (processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-")).replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""), 2490 Number(processValue)) : processValue; 2491 }, 2492 isComplete: function(buffer, opts) { 2493 var maskedValue = (opts.numericInput ? buffer.slice().reverse() : buffer).join(""); 2494 return maskedValue = (maskedValue = (maskedValue = (maskedValue = (maskedValue = maskedValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-")).replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), "")).replace(opts.prefix, "")).replace(opts.suffix, "")).replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator) + "([0-9]{3})", "g"), "$1"), 2495 "," === opts.radixPoint && (maskedValue = maskedValue.replace(Inputmask.escapeRegex(opts.radixPoint), ".")), 2496 isFinite(maskedValue); 2497 }, 2498 onBeforeMask: function(initialValue, opts) { 2499 if (opts.isNegative = undefined, "number" == typeof initialValue && "" !== opts.radixPoint && (initialValue = initialValue.toString().replace(".", opts.radixPoint)), 2500 initialValue = initialValue.toString().charAt(initialValue.length - 1) === opts.radixPoint ? initialValue.toString().substr(0, initialValue.length - 1) : initialValue.toString(), 2501 "" !== opts.radixPoint && isFinite(initialValue)) { 2502 var vs = initialValue.split("."), groupSize = "" !== opts.groupSeparator ? parseInt(opts.groupSize) : 0; 2503 2 === vs.length && (vs[0].length > groupSize || vs[1].length > groupSize || vs[0].length <= groupSize && vs[1].length < groupSize) && (initialValue = initialValue.replace(".", opts.radixPoint)); 2504 } 2505 var kommaMatches = initialValue.match(/,/g), dotMatches = initialValue.match(/\./g); 2506 if (initialValue = dotMatches && kommaMatches ? dotMatches.length > kommaMatches.length ? (initialValue = initialValue.replace(/\./g, "")).replace(",", opts.radixPoint) : kommaMatches.length > dotMatches.length ? (initialValue = initialValue.replace(/,/g, "")).replace(".", opts.radixPoint) : initialValue.indexOf(".") < initialValue.indexOf(",") ? initialValue.replace(/\./g, "") : initialValue.replace(/,/g, "") : initialValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""), 2507 0 === opts.digits && (-1 !== initialValue.indexOf(".") ? initialValue = initialValue.substring(0, initialValue.indexOf(".")) : -1 !== initialValue.indexOf(",") && (initialValue = initialValue.substring(0, initialValue.indexOf(",")))), 2508 "" !== opts.radixPoint && isFinite(opts.digits) && -1 !== initialValue.indexOf(opts.radixPoint)) { 2509 var decPart = initialValue.split(opts.radixPoint)[1].match(new RegExp("\\d*"))[0]; 2510 if (parseInt(opts.digits) < decPart.toString().length) { 2511 var digitsFactor = Math.pow(10, parseInt(opts.digits)); 2512 initialValue = initialValue.replace(Inputmask.escapeRegex(opts.radixPoint), "."), 2513 initialValue = (initialValue = Math.round(parseFloat(initialValue) * digitsFactor) / digitsFactor).toString().replace(".", opts.radixPoint); 2514 } 2515 } 2516 return function(buffer, opts) { 2517 if (opts.numericInput) { 2518 var radixPosition = $.inArray(opts.radixPoint, buffer); 2519 -1 === radixPosition && (buffer.push(opts.radixPoint), radixPosition = buffer.length - 1); 2520 for (var i = 1; i <= opts.digits; i++) buffer[radixPosition + i] = buffer[radixPosition + i] || "0"; 2521 } 2522 return buffer; 2523 }(initialValue.toString().split(""), opts).join(""); 2524 }, 2525 onKeyDown: function(e, buffer, caretPos, opts) { 2526 var $input = $(this); 2527 if (e.ctrlKey) switch (e.keyCode) { 2528 case Inputmask.keyCode.UP: 2529 $input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)), $input.trigger("setvalue"); 2530 break; 2531 2532 case Inputmask.keyCode.DOWN: 2533 $input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)), $input.trigger("setvalue"); 2534 } 2535 } 2536 }, 2537 currency: { 2538 prefix: "$ ", 2539 groupSeparator: ",", 2540 alias: "numeric", 2541 placeholder: "0", 2542 autoGroup: !0, 2543 digits: 2, 2544 digitsOptional: !1, 2545 clearMaskOnLostFocus: !1 2546 },
2547 decimal: { 2548 alias: "numeric" 2549 }, 2550 integer: { 2551 alias: "numeric", 2552 digits: 0, 2553 radixPoint: "" 2554 }, 2555 percentage: { 2556 alias: "numeric", 2557 digits: 2, 2558 digitsOptional: !0, 2559 radixPoint: ".", 2560 placeholder: "0", 2561 autoGroup: !1, 2562 min: 0, 2563 max: 100, 2564 suffix: " %", 2565 allowMinus: !1 2566 } 2567 }), Inputmask; 2568 }) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2569}, function(module, exports, __webpack_require__) { 2570 "use strict"; 2571 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 2572 "function" == typeof Symbol && Symbol.iterator; 2573 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2), __webpack_require__(4) ], 2574 void 0 === (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function($, Inputmask) { 2575 function maskSort(a, b) { 2576 var maska = (a.mask || a).replace(/#/g, "0").replace(/\)/, "0").replace(/[+()#-]/g, ""), maskb = (b.mask || b).replace(/#/g, "0").replace(/\)/, "0").replace(/[+()#-]/g, ""); 2577 return maska.localeCompare(maskb); 2578 } 2579 var analyseMaskBase = Inputmask.prototype.analyseMask; 2580 return Inputmask.prototype.analyseMask = function(mask, regexMask, opts) { 2581 var maskGroups = {}; 2582 return opts.phoneCodes && (opts.phoneCodes && opts.phoneCodes.length > 1e3 && (function reduceVariations(masks, previousVariation, previousmaskGroup) { 2583 previousVariation = previousVariation || "", previousmaskGroup = previousmaskGroup || maskGroups, 2584 "" !== previousVariation && (previousmaskGroup[previousVariation] = {}); 2585 for (var variation = "", maskGroup = previousmaskGroup[previousVariation] || previousmaskGroup, i = masks.length - 1; i >= 0; i--) maskGroup[variation = (mask = masks[i].mask || masks[i]).substr(0, 1)] = maskGroup[variation] || [], 2586 maskGroup[variation].unshift(mask.substr(1)), masks.splice(i, 1); 2587 for (var ndx in maskGroup) maskGroup[ndx].length > 500 && reduceVariations(maskGroup[ndx].slice(), ndx, maskGroup); 2588 }((mask = mask.substr(1, mask.length - 2)).split(opts.groupmarker[1] + opts.alternatormarker + opts.groupmarker[0])), 2589 mask = function rebuild(maskGroup) { 2590 var mask = "", submasks = []; 2591 for (var ndx in maskGroup) $.isArray(maskGroup[ndx]) ? 1 === maskGroup[ndx].length ? submasks.push(ndx + maskGroup[ndx]) : submasks.push(ndx + opts.groupmarker[0] + maskGroup[ndx].join(opts.groupmarker[1] + opts.alternatormarker + opts.groupmarker[0]) + opts.groupmarker[1]) : submasks.push(ndx + rebuild(maskGroup[ndx])); 2592 return 1 === submasks.length ? mask += submasks[0] : mask += opts.groupmarker[0] + submasks.join(opts.groupmarker[1] + opts.alternatormarker + opts.groupmarker[0]) + opts.groupmarker[1], 2593 mask; 2594 }(maskGroups)), mask = mask.replace(/9/g, "\\9")), analyseMaskBase.call(this, mask, regexMask, opts); 2595 }, Inputmask.extendAliases({ 2596 abstractphone: { 2597 groupmarker: [ "<", ">" ], 2598 countrycode: "", 2599 phoneCodes: [], 2600 keepStatic: "auto", 2601 mask: function(opts) { 2602 return opts.definitions = { 2603 "#": Inputmask.prototype.definitions[9] 2604 }, opts.phoneCodes.sort(maskSort); 2605 }, 2606 onBeforeMask: function(value, opts) { 2607 var processedValue = value.replace(/^0{1,2}/, "").replace(/[\s]/g, ""); 2608 return (processedValue.indexOf(opts.countrycode) > 1 || -1 === processedValue.indexOf(opts.countrycode)) && (processedValue = "+" + opts.c
2608ountrycode + processedValue), 2609 processedValue; 2610 }, 2611 onUnMask: function(maskedValue, unmaskedValue, opts) { 2612 return maskedValue.replace(/[()#-]/g, ""); 2613 }, 2614 inputmode: "tel" 2615 } 2616 }), Inputmask; 2617 }) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2618}, function(module, exports, __webpack_require__) { 2619 "use strict"; 2620 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__, _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) { 2621 return typeof obj; 2622 } : function(obj) { 2623 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 2624 }; 2625 __WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(3), __webpack_require__(4) ], 2626 void 0 === (__WEBPACK_AMD_DEFINE_RESULT__ = "function" == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function($, Inputmask) { 2627 return void 0 === $.fn.inputmask && ($.fn.inputmask = function(fn, options) { 2628 var nptmask, input = this[0]; 2629 if (void 0 === options && (options = {}), "string" == typeof fn) switch (fn) { 2630 case "unmaskedvalue": 2631 return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val(); 2632 2633 case "remove": 2634 return this.each(function() { 2635 this.inputmask && this.inputmask.remove(); 2636 }); 2637 2638 case "getemptymask": 2639 return input && input.inputmask ? input.inputmask.getemptymask() : ""; 2640 2641 case "hasMaskedValue": 2642 return !(!input || !input.inputmask) && input.inputmask.hasMaskedValue(); 2643 2644 case "isComplete": 2645 return !input || !input.inputmask || input.inputmask.isComplete(); 2646 2647 case "getmetadata": 2648 return input && input.inputmask ? input.inputmask.getmetadata() : void 0; 2649 2650 case "setvalue": 2651 Inputmask.setValue(input, options); 2652 break; 2653 2654 case "option": 2655 if ("string" != typeof options) return this.each(function() { 2656 if (void 0 !== this.inputmask) return this.inputmask.option(options); 2657 }); 2658 if (input && void 0 !== input.inputmask) return input.inputmask.option(options); 2659 break; 2660 2661 default: 2662 return options.alias = fn, nptmask = new Inputmask(options), this.each(function() { 2663 nptmask.mask(this); 2664 }); 2665 } else { 2666 if (Array.isArray(fn)) return options.alias = fn, nptmask = new Inputmask(options), 2667 this.each(function() { 2668 nptmask.mask(this); 2669 }); 2670 if ("object" == (void 0 === fn ? "undefined" : _typeof(fn))) return nptmask = new Inputmask(fn), 2671 void 0 === fn.mask && void 0 === fn.alias ? this.each(function() { 2672 if (void 0 !== this.inputmask) return this.inputmask.option(fn); 2673 nptmask.mask(this); 2674 }) : this.each(function() { 2675 nptmask.mask(this); 2676 }); 2677 if (void 0 === fn) return this.each(function() { 2678 (nptmask = new Inputmask(options)).mask(this); 2679 }); 2680 } 2681 }), $.fn.inputmask; 2682 }) ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__); 2683} ]); 2684 2685/* <![CDATA[ */ 2686var Cli_Data = {"nn_cookie_ids":["test_cookie"],"non_necessary_cookies":{"non-necessary":["test_cookie"]},"cookielist":{"necessary":{"0":{"ID":1598,"post_author":"1","post_date":"2019-12-03 02:34:52","post_date_gmt":"2019-12-03 01:34:52","post_content":"The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.","post_title":"viewed_cookie_policy","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"viewed_cookie_policy","to_ping":"","pinged":"","post_modified":"2019-12-03 02:34:52","post_modified_gmt":"2019-12-03 01:34:52","post_content_filtered":"","post_parent":0,"guid":"http:\/\/de.hostelman.com\/cookielawinfo\/viewed_cookie_policy\/","menu_order":0,"post_type":"cookielawinfo","post_mime_type":"","comment_count":"0","filter":"raw"},"1":{"ID":1599,"post_author":"1","post_date":"2019-12-03 02:34:52","post_date_gmt":"2019-12-03 01:34:52","post_content":"This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category \"Necessary\".","post_title":"cookielawinfo-checkbox-necessary","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"cookielawinfo-checkbox-necessary","to_ping":"","pinged":"","post_modified":"2019-12-03 02:34:52","post_modified_gmt":"2019-12-03 01:34:52","post_content_filtered":"","post_parent":0,"guid":"http:\/\/de.hostelman.com\/cookielawinfo\/cookielawinfo-checkbox-necessary\/","menu_order":0,"post_type":"cookielawinfo","post_mime_type":"","comment_count":"0","filter":"raw"},"2":{"ID":1600,"post_author":"1","post_date":"2019-12-03 02:34:52","post_date_gmt":"2019-12-03 01:34:52","post_content":"This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category \"Non Necessary\".","post_title":"cookielawinfo-checkbox-non-necessary","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"cookielawinfo-checkbox-non-necessary","to_ping":"","pinged":"","post_modified":"2019-12-03 02:34:52","post_modified_gmt":"2019-12-03 01:34:52","post_content_filtered":"","post_parent":0,"guid":"http:\/\/de.hostelman.com\/cookielawinfo\/cookielawinfo-checkbox-non-necessary\/","menu_order":0,"post_type":"cookielawinfo","post_mime_type":"","comment_count":"0","filter":"raw"},"term_id":40,"name":"Necessary","loadonstart":0,"defaultstate":"enabled"},"non-necessary":{"0":{"ID":1601,"post_author":"1","post_date":"2019-12-03 02:34:52","post_date_gmt":"2019-12-03 01:34:52","post_content":"","post_title":"test_cookie","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"test_cookie","to_ping":"","pinged":"","post_modified":"2019-12-03 02:34:52","post_modified_gmt":"2019-12-03 01:34:52","post_content_filtered":"","post_parent":0,"guid":"http:\/\/de.hostelman.com\/cookielawinfo\/test_cookie\/","menu_order":0,"post_type":"cookielawinfo","post_mime_type":"","comment_count":"0","filter":"raw"},"term_id":41,"name":"Non Necessary","loadonstart":0,"defaultstate":"disabled"}},"ajax_url":"https:\/\/de.hostelman.com\/wp-admin\/admin-ajax.php","current_lang":"de","security":"d8ef6b9c6c","eu_countries":["GB"],"geoIP":"disabled","consentVersion":"1","strictlyEnabled":["necessary","obligatoire"]}; 2687var log_object = {"ajax_url":"https:\/\/de.hostelman.com\/wp-admin\/admin-ajax.php"}; 2688/* ]]> */ 2689 2690CLI_ACCEPT_COOKIE_NAME =(typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy'); 2691CLI_ACCEPT_COOKIE_EXPIRE =(typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365); 2692CLI_COOKIEBAR_AS_POPUP=(typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_AS_POPUP : false); 2693var CLI_Cookie={ 2694 set: function (name, value, days) { 2695 if (days) { 2696 var date = new Date(); 2697 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 2698 var expires = "; expires=" + date.toGMTString(); 2699 } else 2700 { 2701 var expires = ""; 2702 } 2703 document.cookie = name + "=" + value + expires + "; path=/"; 2704 if(days<1) 2705 { 2706 host_name=window.location.hostname; 2707 document.cookie = name + "=" + value + expires + "; path=/; domain=."+host_name+";secure"; 2708 if(host_name.indexOf("www")!=1) 2709 { 2710 var host_name_withoutwww=host_name.replace('www',''); 2711 document.cookie = name + "=" + value + expires + "; path=/; domain="+host_name_withoutwww+";"; 2712 } 2713 host_name=host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".")-1)); 2714 document.cookie = name + "=" + value + expires + "; path=/; domain="+host_name+";"; 2715 } 2716 }, 2717 read: function (name) { 2718 var nameEQ = name + "="; 2719 var ca = document.cookie.split(';'); 2720 for (var i = 0; i < ca.length; i++) { 2721 var c = ca[i]; 2722 while (c.charAt(0) == ' ') { 2723 c = c.substring(1, c.length); 2724 } 2725 if (c.indexOf(nameEQ) === 0) { 2726 return c.substring(nameEQ.length, c.length); 2727 } 2728 } 2729 return null; 2730 },
2731 erase: function (name) { 2732 this.set(name, "", -10); 2733 }, 2734 exists: function (name) { 2735 return (this.read(name) !== null); 2736 }, 2737 getallcookies:function() 2738 { 2739 var pairs = document.cookie.split(";"); 2740 var cookieslist = {}; 2741 for (var i = 0; i < pairs.length; i++) { 2742 var pair = pairs[i].split("="); 2743 cookieslist[(pair[0] + '').trim()] = unescape(pair[1]); 2744 } 2745 return cookieslist; 2746 } 2747} 2748var CLI= 2749{ 2750 bar_config:{}, 2751 consent:{}, 2752 allowedCategories:[], 2753 showagain_config:{}, 2754 set:function(args) 2755 { 2756 if(typeof JSON.parse !== "function") 2757 { 2758 console.log("CookieLawInfo requires JSON.parse but your browser doesn't support it"); 2759 return; 2760 } 2761 if(typeof args.settings!=='object') 2762 { 2763 this.settings = JSON.parse(args.settings); 2764 }else 2765 { 2766 this.settings = args.settings; 2767 } 2768 this.bar_elm=jQuery(this.settings.notify_div_id); 2769 this.showagain_elm = jQuery(this.settings.showagain_div_id); 2770 2771 //buttons 2772 this.main_button=jQuery('.cli-plugin-main-button'); 2773 this.main_link = jQuery('.cli-plugin-main-link'); 2774 this.reject_link = jQuery('.cookie_action_close_header_reject'); 2775 this.settings_link = jQuery('.cli_settings_button'); 2776 this.delete_link=jQuery(".cookielawinfo-cookie-delete"); 2777 2778 if(this.settings.cookie_bar_as=='popup') 2779 { 2780 CLI_COOKIEBAR_AS_POPUP=true; 2781 } 2782 this.cliRenewConsent(); 2783 2784 this.configBar(); 2785 this.toggleBar(); 2786 this.attachDelete(); 2787 this.attachEvents(); 2788 this.configButtons(); 2789 this.addStyleAttribute(); 2790 this.settingsPopUp(); 2791 this.cookieLawInfoRunCallBacks(); 2792 var cli_hidebar_on_readmore=this.hideBarInReadMoreLink(); 2793 if(this.settings.scroll_close===true && cli_hidebar_on_readmore===false) 2794 { 2795 window.addEventListener("scroll",CLI.closeOnScroll, false); 2796 } 2797 }, 2798 hideBarInReadMoreLink:function() 2799 { 2800 if(CLI.settings.button_2_hidebar===true && this.main_link.length>0 && this.main_link.hasClass('cli-minimize-bar')) 2801 { 2802 jQuery('.wt-cli-cookie-bar-container').addClass('wt-cli-hide-bar'); 2803 this.hideHeader(); 2804 this.showagain_elm.slideDown(this.settings.animate_speed_show); 2805 return true; 2806 } 2807 return false; 2808 }, 2809 settingsPopUp:function() 2810 { 2811 jQuery('.cli_settings_button').click(function (e) { 2812 e.preventDefault(); 2813 if(CLI.settings.cookie_setting_popup==true) 2814 { 2815 jQuery('#cliSettingsPopup').addClass("cli-show").css({'opacity':0}).animate({'opacity':1}); 2816 jQuery('#cliSettingsPopup').removeClass('cli-blowup cli-out').addClass("cli-blowup"); 2817 jQuery('body').addClass("cli-modal-open"); 2818 jQuery(".cli-settings-overlay").addClass("cli-show"); 2819 jQuery("#cookie-law-info-bar").css({'opacity':.1}); 2820 if(!jQuery('.cli-settings-mobile').is(':visible')) 2821 { 2822 jQuery('#cliSettingsPopup').find('.cli-nav-link:eq(0)').click(); 2823 } 2824 } 2825 else 2826 { 2827 jQuery('#cookie-law-info-bar .cli-tab-container').slideToggle(CLI.settings.animate_speed_show); 2828 } 2829 2830 2831 }); 2832 jQuery('#cliModalClose').click(function(){ 2833 CLI.settingsPopUpClose(); 2834 }); 2835 jQuery("#cliSettingsPopup").click(function(e){ 2836 if(!(document.getElementsByClassName('cli-modal-dialog')[0].contains(e.target))) 2837 { 2838 CLI.settingsPopUpClose(); 2839 } 2840 }); 2841 jQuery('.cli_enable_all_btn').click(function(){ 2842 var cli_toggle_btn = jQuery(this); 2843 var enable_text = cli_toggle_btn.attr('data-enable-text'); 2844 var disable_text= cli_toggle_btn.attr('data-disable-text'); 2845 if(cli_toggle_btn.hasClass('cli-enabled')){ 2846 CLI.disableAllCookies(); 2847 cli_toggle_btn.html(enable_text); 2848 } 2849 else 2850 { 2851 CLI.enableAllCookies(); 2852 cli_toggle_btn.html(disable_text); 2853 2854 } 2855 jQuery(this).toggleClass('cli-enabled'); 2856 }); 2857 this.settingsTabbedAccordion(); 2858 this.toggleUserPreferenceCheckBox(); 2859 this.privacyReadmore(); 2860 }, 2861 settingsTabbedAccordion:function() 2862 { 2863 jQuery(".cli-tab-header").on("click", function(e) { 2864 if(!(jQuery(e.target).hasClass('cli-slider') || jQuery(e.target).hasClass('cli-user-preference-checkbox'))) 2865 { 2866 if (jQuery(this).hasClass("cli-tab-active")) { 2867 jQuery(this).removeClass("cli-tab-active"); 2868 jQuery(this) 2869 .siblings(".cli-tab-content") 2870 .slideUp(200); 2871 2872 } else { 2873 jQuery(".cli-tab-header").removeClass("cli-tab-active"); 2874 jQuery(this).addClass("cli-tab-active"); 2875 jQuery(".cli-tab-content").slideUp(200); 2876 jQuery(this) 2877 .siblings(".cli-tab-content") 2878 .slideDown(200); 2879 } 2880 } 2881 }); 2882 }, 2883 settingsPopUpClose:function() 2884 { 2885 jQuery('#cliSettingsPopup').removeClass('cli-show'); 2886 jQuery('#cliSettingsPopup').addClass('cli-out'); 2887 jQuery('body').removeClass("cli-modal-open"); 2888 jQuery(".cli-settings-overlay").removeClass("cli-show"); 2889 jQuery("#cookie-law-info-bar").css({'opacity':1}); 2890 }, 2891 toggleUserPreferenceCheckBox:function() 2892 { 2893 2894 jQuery('.cli-user-preference-checkbox').each(function(){ 2895 if(jQuery(this).is(':checked')) 2896 { 2897 CLI_Cookie.set('cookielawinfo-'+jQuery(this).attr('data-id'),'yes',CLI_ACCEPT_COOKIE_EXPIRE); 2898 }else 2899 { 2900 CLI_Cookie.set('cookielawinfo-'+jQuery(this).attr('data-id'),'no',CLI_ACCEPT_COOKIE_EXPIRE); 2901 } 2902 }); 2903 jQuery('.cli-user-preference-checkbox').click(function(){ 2904 var dataID = jQuery(this).attr('data-id'); 2905 var currentToggleElm = jQuery('.cli-user-preference-checkbox[data-id='+dataID+']'); 2906 if(jQuery(this).is(':checked')) 2907 { 2908 CLI_Cookie.set('cookielawinfo-'+dataID,'yes',CLI_ACCEPT_COOKIE_EXPIRE); 2909 currentToggleElm.prop('checked',true); 2910 }else 2911 { 2912 CLI_Cookie.set('cookielawinfo-'+dataID,'no',CLI_ACCEPT_COOKIE_EXPIRE);
2913 currentToggleElm.prop('checked',false); 2914 } 2915 CLI.checkCategories(); 2916 CLI.generate_user_preference_cookie(); 2917 CLI.generateConsent(); 2918 }); 2919 }, 2920 attachEvents:function() 2921 { 2922 jQuery('.cli_setting_save_button').click(function(){ 2923 jQuery('.cli_action_button[data-cli_action=accept]').trigger('click'); 2924 }); 2925 2926 jQuery('.cli_action_button').on('click',function(e){ 2927 e.preventDefault(); 2928 var elm=jQuery(this); 2929 var button_action=elm.attr('data-cli_action'); 2930 var open_link=elm[0].hasAttribute("href") && elm.attr("href") != '#' ? true : false; 2931 var new_window=false; 2932 if(button_action=='accept') 2933 { 2934 if (e.originalEvent !== undefined) { 2935 2936 if(CLI.settings.accept_all==true) 2937 { 2938 CLI.enableAllCookies(); 2939 } 2940 2941 } 2942 else 2943 { 2944 CLI.settingsPopUpClose(); 2945 } 2946 CLI.accept_close(); 2947 new_window=CLI.settings.button_1_new_win ? true : false; 2948 }else if(button_action=='reject') 2949 { 2950 CLI.disableAllCookies(); 2951 CLI.reject_close(); 2952 new_window=CLI.settings.button_3_new_win ? true : false; 2953 } 2954 CLI.saveLog(button_action); 2955 if(open_link) 2956 { 2957 if(new_window) 2958 { 2959 window.open(elm.attr("href"),'_blank'); 2960 }else 2961 { 2962 window.location.href =elm.attr("href"); 2963 } 2964 } 2965 }); 2966 jQuery('.cli_cookie_close_button').click(function(e){ 2967 e.preventDefault(); 2968 var elm=jQuery(this); 2969 var button_action=elm.attr('data-cli_action'); 2970 CLI.accept_close(); 2971 CLI.saveLog(button_action); 2972 }); 2973 }, 2974 saveLog:function(button_action) 2975 { 2976 if(CLI.settings.logging_on) 2977 { 2978 jQuery.ajax({ 2979 url: log_object.ajax_url, 2980 type: 'POST', 2981 data:{ 2982 action: 'wt_log_visitor_action', 2983 wt_clicked_button_id: '', 2984 wt_user_action:button_action, 2985 cookie_list:CLI_Cookie.getallcookies() 2986 }, 2987 success:function (response) 2988 { 2989 2990 } 2991 }); 2992 } 2993 }, 2994 attachDelete:function() 2995 { 2996 this.delete_link.click(function () { 2997 CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME); 2998 for(var k in Cli_Data.nn_cookie_ids) 2999 { 3000 CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]); 3001 } 3002 CLI.generate_user_preference_cookie(); 3003 CLI.generateConsent(); 3004 window.location.reload(); 3005 return false; 3006 }); 3007 }, 3008 configButtons:function() 3009 { 3010 //[cookie_button] 3011 this.main_button.css('color',this.settings.button_1_link_colour); 3012 if(this.settings.button_1_as_button) 3013 { 3014 this.main_button.css('background-color',this.settings.button_1_button_colour); 3015 this.main_button.hover(function () { 3016 jQuery(this).css('background-color',CLI.settings.button_1_button_hover); 3017 },function (){ 3018 jQuery(this).css('background-color',CLI.settings.button_1_button_colour); 3019 }); 3020 } 3021 3022 //[cookie_link] 3023 this.main_link.css('color',this.settings.button_2_link_colour); 3024 if(this.settings.button_2_as_button) 3025 { 3026 this.main_link.css('background-color',this.settings.button_2_button_colour); 3027 this.main_link.hover(function () { 3028 jQuery(this).css('background-color',CLI.settings.button_2_button_hover); 3029 },function (){ 3030 jQuery(this).css('background-color',CLI.settings.button_2_button_colour); 3031 }); 3032 } 3033 3034 3035 //[cookie_reject] 3036 this.reject_link.css('color',this.settings.button_3_link_colour); 3037 if(this.settings.button_3_as_button) 3038 { 3039 this.reject_link.css('background-color',this.settings.button_3_button_colour); 3040 this.reject_link.hover(function () { 3041 jQuery(this).css('background-color',CLI.settings.button_3_button_hover); 3042 },function () { 3043 jQuery(this).css('background-color',CLI.settings.button_3_button_colour); 3044 }); 3045 } 3046 3047 //[cookie_settings] 3048 this.settings_link.css('color',this.settings.button_4_link_colour); 3049 if(this.settings.button_4_as_button) 3050 { 3051 this.settings_link.css('background-color',this.settings.button_4_button_colour); 3052 this.settings_link.hover(function () { 3053 jQuery(this).css('background-color',CLI.settings.button_4_button_hover); 3054 },function () { 3055 jQuery(this).css('background-color',CLI.settings.button_4_button_colour); 3056 }); 3057 } 3058 }, 3059 toggleBar:function() 3060 { 3061 if(CLI_COOKIEBAR_AS_POPUP) 3062 { 3063 this.barAsPopUp(1); 3064 } 3065 if(CLI.settings.cookie_bar_as=='widget') 3066 { 3067 this.barAsWidget(1); 3068 } 3069 if(!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) 3070 { 3071 this.displayHeader(); 3072 }else 3073 { 3074 this.hideHeader(); 3075 } 3076 if(this.settings.show_once_yn) 3077 { 3078 3079 setTimeout(function(){ 3080 CLI.close_header(); 3081 },CLI.settings.show_once); 3082 } 3083 this.showagain_elm.click(function (e) { 3084 e.preventDefault(); 3085 CLI.showagain_elm.slideUp(CLI.settings.animate_speed_hide,function() 3086 { 3087 CLI.bar_elm.slideDown(CLI.settings.animate_speed_show); 3088 if(CLI_COOKIEBAR_AS_POPUP) 3089 { 3090 CLI.showPopupOverlay(); 3091 } 3092 }); 3093 }); 3094 }, 3095 configShowAgain:function() 3096 { 3097 this.showagain_config = { 3098 'background-color': this.settings.background, 3099 'color':this.settings.text, 3100 'position': 'fixed', 3101 'font-family': this.settings.font_family 3102 }; 3103 if(this.settings.border_on) 3104 { 3105 var border_to_hide = 'border-' + this.settings.notify_position_vertical; 3106 this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border); 3107 this.showagain_config[border_to_hide] = 'none'; 3108 } 3109 var cli_win=jQuery(window); 3110 var cli_winw=cli_win.width(); 3111 var showagain_x_pos=this.settings.showagain_x_position; 3112 if(cli_winw<300) 3113 { 3114 showagain_x_pos=10; 3115 this.showagain_config.width=cli_winw-20; 3116 }else 3117 { 3118 this.showagain_config.width='auto'; 3119 } 3120 var cli_defw=cli_winw>400 ? 500 : cli_winw-20; 3121 if(CLI_COOKIEBAR_AS_POPUP) //cookie bar as popup 3122 { 3123 var sa_pos=this.settings.popup_showagain_position; 3124 var sa_pos_arr=sa_pos.split('-'); 3125 if(sa_pos_arr[1]=='left') 3126 { 3127 this.showagain_config.left=showagain_x_pos; 3128 }else if(sa_pos_arr[1]=='right') 3129 { 3130 this.showagain_config.right=showagain_x_pos; 3131 } 3132 if(sa_pos_arr[0]=='top') 3133 { 3134 this.showagain_config.top=0; 3135 3136 }else if(sa_pos_arr[0]=='bottom') 3137 { 3138 this.showagain_config.bottom=0; 3139 } 3140 this.bar_config['position'] = 'fixed'; 3141 3142 }else if(this.settings.cookie_bar_as=='widget') 3143 { 3144 this.showagain_config.bottom=0; 3145 if(this.settings.widget_position=='left') 3146 { 3147 this.showagain_config.left=showagain_x_pos; 3148 }else if(this.settings.widget_position=='right') 3149 { 3150 this.showagain_config.right=showagain_x_pos; 3151 } 3152 } 3153 else 3154 { 3155 if(this.settings.notify_position_vertical == "top") 3156 { 3157 this.showagain_config.top = '0'; 3158 } 3159 else if(this.settings.notify_position_vertical == "bottom") 3160 { 3161 this.bar_config['position'] = 'fixed'; 3162 this.bar_config['bottom'] = '0'; 3163 this.showagain_config.bottom = '0'; 3164 } 3165 if(this.settings.notify_position_horizontal == "left") 3166 { 3167 this.showagain_config.left =showagain_x_pos; 3168 }else if(this.settings.notify_position_horizontal == "right") 3169 { 3170 this.showagain_config.right =showagain_x_pos; 3171 } 3172 } 3173 this.showagain_elm.css(this.showagain_config); 3174 }, 3175 configBar:function() 3176 { 3177 var templateID = ''; 3178 this.bar_config = { 3179 'background-color':this.settings.background, 3180 'color':this.settings.text, 3181 'font-family':this.settings.font_family 3182 }; 3183 if (jQuery(".wt-cli-template")[0]) 3184 { 3185 var templateElm = jQuery(".wt-cli-template"); 3186 var templateClasses = templateElm.attr('class'); 3187 var templateClasses = templateClasses.split(" "); 3188 var matchingID = templateClasses.filter(function (value) { 3189 3190 return value.match(/\bcli-style/); 3191 3192 }); 3193 templateID = matchingID[0]; 3194 this.bar_elm.attr('data-template-id',templateID); 3195 } 3196 if(jQuery(".wt-cli-category-widget")[0]) 3197 { 3198 this.bar_elm.addClass('wt-cli-category-widget-active'); 3199 } 3200 if(this.settings.cookie_setting_popup===false) 3201 { 3202 this.barPopupStyle(); 3203 } 3204 if(this.settings.notify_position_vertical=="top") 3205 { 3206 this.bar_config['top'] = '0'; 3207 if(this.settings.header_fix === true) 3208 { 3209 this.bar_config['position'] = 'fixed'; 3210 } 3211 }else 3212 { 3213 this.bar_config['bottom'] = '0'; 3214 } 3215 this.configShowAgain(); 3216 this.bar_elm.css(this.bar_config).hide(); 3217 }, 3218 l1hs:function(str) 3219 { 3220 if (str.charAt(0) == "#") { 3221 str = str.substring(1, str.length); 3222 } else { 3223 return "#" + str; 3224 } 3225 return this.l1hs(str); 3226 }, 3227 close_header:function() 3228 { 3229 CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME,'yes',CLI_ACCEPT_COOKIE_EXPIRE); 3230 this.hideHeader(); 3231 cliBlocker.runScripts(); 3232 CLI.saveLog('accept'); 3233 3234 }, 3235 accept_close:function() 3236 { 3237 if(cliBlocker.blockingStatus === true) 3238 { 3239 this.hidePopupOverlay(); 3240 CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME,'yes',CLI_ACCEPT_COOKIE_EXPIRE); 3241 if(this.settings.notify_animate_hide) 3242 { 3243 this.bar_elm.slideUp(this.settings.animate_speed_hide,cliBlocker.runScripts); 3244 }else 3245 { 3246 this.bar_elm.hide(cliBlocker.runScripts); 3247 } 3248 if(this.settings.showagain_tab) 3249 { 3250 this.showagain_elm.slideDown(this.settings.animate_speed_show); 3251 } 3252 this.generate_user_preference_cookie(); 3253 this.generateConsent(); 3254 CLI.cookieLawInfoRunCallBacks(); 3255 if(this.settings.accept_close_reload === true) 3256 { 3257 this.reload_current_page(); 3258 } 3259 } 3260 3261 return false;
3262 }, 3263 reject_close:function() 3264 { 3265 this.hidePopupOverlay(); 3266 for(var k in Cli_Data.nn_cookie_ids) 3267 { 3268 CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]); 3269 } 3270 CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME,'no',CLI_ACCEPT_COOKIE_EXPIRE); 3271 if(this.settings.notify_animate_hide) 3272 { 3273 this.bar_elm.slideUp(this.settings.animate_speed_hide,cliBlocker.runScripts); 3274 }else 3275 { 3276 this.bar_elm.hide(cliBlocker.runScripts); 3277 } 3278 if(this.settings.showagain_tab) 3279 { 3280 this.showagain_elm.slideDown(this.settings.animate_speed_show); 3281 } 3282 this.generate_user_preference_cookie(); 3283 CLI.generateConsent(); 3284 if(this.settings.reject_close_reload === true) 3285 { 3286 this.reload_current_page(); 3287 } 3288 return false; 3289 }, 3290 generate_user_preference_cookie:function() 3291 { 3292 var cli_user_preference_arr=new Array(); 3293 var cli_user_preference_val=''; 3294 if(CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) 3295 { 3296 cli_user_preference_arr.push('cli-'+CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)); 3297 } 3298 jQuery('.cli-user-preference-checkbox').each(function(){ 3299 if(jQuery(this).is(':checked')) 3300 { 3301 cli_user_preference_arr.push(jQuery(this).attr('data-id')+'-yes'); 3302 }else 3303 { 3304 cli_user_preference_arr.push(jQuery(this).attr('data-id')+'-no'); 3305 } 3306 }); 3307 if(cli_user_preference_arr.length>0) 3308 { 3309 cli_user_preference_val=Cli_Data.current_lang+'-'+cli_user_preference_arr.join('-'); 3310 } 3311 CLI_Cookie.set('cli_user_preference',cli_user_preference_val,CLI_ACCEPT_COOKIE_EXPIRE); 3312 }, 3313 generateConsent:function() 3314 { 3315 cliConsent = {};
3316 cliConsent.ver = Cli_Data.consentVersion; 3317 categories = []; 3318 jQuery('.cli-user-preference-checkbox').each(function(){ 3319 categoryVal = ''; 3320 cli_chkbox_data_id = jQuery(this).attr('data-id'); 3321 cli_chkbox_data_id = cli_chkbox_data_id.replace('checkbox-',''); 3322 if(jQuery(this).is(':checked')) 3323 { 3324 categoryVal = 'true'; 3325 } 3326 else 3327 { 3328 categoryVal = 'false'; 3329 } 3330 cliConsent[cli_chkbox_data_id] = categoryVal; 3331 3332 }); 3333 cliConsent = JSON.stringify(cliConsent); 3334 cliConsent = encodeURIComponent(cliConsent); 3335 CLI_Cookie.set('CookieLawInfoConsent',cliConsent,CLI_ACCEPT_COOKIE_EXPIRE); 3336 }, 3337 cliRenewConsent:function() 3338 { 3339 var preferenceCookie = CLI_Cookie.read('CookieLawInfoConsent'); 3340 if(preferenceCookie !== null) 3341 { 3342 cliConsent = decodeURIComponent(preferenceCookie); 3343 cliConsent = JSON.parse(cliConsent); 3344 consentCurrentVersion = parseInt(cliConsent.ver); 3345 consentRenewVersion = parseInt(Cli_Data.consentVersion); 3346 if(cliConsent.ver !== Cli_Data.consentVersion) 3347 { 3348 CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME); 3349 CLI_Cookie.erase('CookieLawInfoConsent'); 3350 CLI_Cookie.erase('cli_user_preference'); 3351 for(var k in Cli_Data.nn_cookie_ids) 3352 { 3353 CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]); 3354 } 3355 } 3356 3357 } 3358 3359 3360 }, 3361 reload_current_page:function() 3362 { 3363 if(typeof cli_flush_cache!=='undefined' && cli_flush_cache==1) 3364 { 3365 window.location.href=this.add_clear_cache_url_query(); 3366 }else 3367 { 3368 window.location.reload(true); 3369 } 3370 }, 3371 add_clear_cache_url_query:function() 3372 { 3373 var cli_rand=new Date().getTime()/1000; 3374 var cli_url=window.location.href; 3375 var cli_hash_arr=cli_url.split('#'); 3376 var cli_urlparts= cli_hash_arr[0].split('?'); 3377 if(cli_urlparts.length>=2) 3378 { 3379 var cli_url_arr=cli_urlparts[1].split('&'); 3380 cli_url_temp_arr=new Array(); 3381 for(var cli_i=0; cli_i<cli_url_arr.length; cli_i++) 3382 { 3383 var cli_temp_url_arr=cli_url_arr[cli_i].split('='); 3384 if(cli_temp_url_arr[0]=='cli_action') 3385 { 3386 3387 }else 3388 { 3389 cli_url_temp_arr.push(cli_url_arr[cli_i]); 3390 } 3391 } 3392 cli_urlparts[1]=cli_url_temp_arr.join('&'); 3393 cli_url=cli_urlparts.join('?')+(cli_url_temp_arr.length>0 ? '&': '')+'cli_action='; 3394 }else 3395 { 3396 cli_url=cli_hash_arr[0]+'?cli_action='; 3397 } 3398 cli_url+=cli_rand; 3399 if(cli_hash_arr.length>1) 3400 { 3401 cli_url+='#'+cli_hash_arr[1]; 3402 } 3403 return cli_url; 3404 }, 3405 closeOnScroll:function() 3406 { 3407 if(window.pageYOffset > 100 && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) 3408 { 3409 CLI.accept_close(); 3410 CLI.saveLog('accept'); 3411 if(CLI.settings.scroll_close_reload === true) 3412 { 3413 window.location.reload(); 3414 } 3415 window.removeEventListener("scroll",CLI.closeOnScroll,false); 3416 } 3417 }, 3418 displayHeader:function() 3419 { 3420 if(this.settings.notify_animate_show) 3421 { 3422 this.bar_elm.slideDown(this.settings.animate_speed_show); 3423 }else 3424 { 3425 this.bar_elm.show(); 3426 } 3427 this.showagain_elm.hide(); 3428 if(CLI_COOKIEBAR_AS_POPUP) 3429 { 3430 this.showPopupOverlay(); 3431 } 3432 }, 3433 hideHeader:function() 3434 { 3435 if(this.settings.showagain_tab) 3436 { 3437 if(this.settings.notify_animate_show) 3438 { 3439 this.showagain_elm.slideDown(this.settings.animate_speed_show); 3440 } else { 3441 this.showagain_elm.show(); 3442 } 3443 }else 3444 { 3445 this.showagain_elm.hide(); 3446 } 3447 this.bar_elm.slideUp(this.settings.animate_speed_show); 3448 this.hidePopupOverlay(); 3449 }, 3450 hidePopupOverlay:function() 3451 { 3452 jQuery('body').removeClass("cli-barmodal-open"); 3453 jQuery(".cli-popupbar-overlay").removeClass("cli-show"); 3454 }, 3455 showPopupOverlay:function() 3456 { 3457 if(this.settings.popup_overlay) 3458 { 3459 3460 jQuery('body').addClass("cli-barmodal-open"); 3461 jQuery(".cli-popupbar-overlay").addClass("cli-show"); 3462 3463 } 3464 }, 3465 barAsWidget:function(a) 3466 { 3467 var cli_elm=this.bar_elm; 3468 cli_elm.attr('data-cli-type','widget'); 3469 var cli_win=jQuery(window); 3470 var cli_winh=cli_win.height()-40; 3471 var cli_winw=cli_win.width(); 3472 var cli_defw=cli_winw>465 ? 445 : cli_winw-60; 3473 cli_elm.css({ 3474 'width':cli_defw,'height':'auto','max-height':cli_winh,'overflow':'auto','position':'fixed','box-shadow':'rgba(0,0,0,.5) 0px 5px 10px','box-sizing':'border-box' 3475 }); 3476 if(this.settings.widget_position=='left') 3477 { 3478 cli_elm.css({ 3479 'left':'30px','right':'auto','bottom':'30px','top':'auto' 3480 }); 3481 }else 3482 { 3483 cli_elm.css({ 3484 'left':'auto','right':'30px','bottom':'30px','top':'auto' 3485 }); 3486 } 3487 if(a) 3488 { 3489 this.setResize(); 3490 } 3491 }, 3492 barAsPopUp:function(a) 3493 { 3494 if(typeof cookie_law_info_bar_as_popup==='function') 3495 { 3496 return false;
3497 } 3498 var cli_elm=this.bar_elm; 3499 cli_elm.attr('data-cli-type','popup'); 3500 var cli_win=jQuery(window); 3501 var cli_winh=cli_win.height(); 3502 var cli_defh = cli_winh > 500 ? 500 : cli_winh; 3503 var cli_winw=cli_win.width(); 3504 var cli_defw=cli_winw>700 ? 500 : cli_winw-20; 3505 //var cli_defw=cli_defw<500 ? 500 : cli_defw; 3506 cli_elm.css({ 3507 'width':cli_defw,'height':'auto','max-height':cli_defh,'bottom':'','top':'50%','left':'50%','transform':'translate(-50%, -50%)','overflow':'auto' 3508 }); 3509 if(a) 3510 { 3511 this.setResize(); 3512 } 3513 }, 3514 setResize:function() 3515 { 3516 var resizeTmr=null; 3517 jQuery(window).resize(function() { 3518 clearTimeout(resizeTmr); 3519 resizeTmr=setTimeout(function() 3520 { 3521 if(CLI_COOKIEBAR_AS_POPUP) 3522 { 3523 CLI.barAsPopUp(); 3524 } 3525 if(CLI.settings.cookie_bar_as=='widget') 3526 { 3527 CLI.barAsWidget(); 3528 } 3529 CLI.configShowAgain(); 3530 },500); 3531 }); 3532 }, 3533 ColorLuminance:function(hex, lum) { 3534 // validate hex string 3535 hex = String(hex).replace(/[^0-9a-f]/gi, ''); 3536 if (hex.length < 6) { 3537 hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; 3538 } 3539 lum = lum || 0; 3540 // convert to decimal and change luminosity 3541 var rgb = "#", c, i; 3542 for (i = 0; i < 3; i++) { 3543 c = parseInt(hex.substr(i*2,2), 16); 3544 c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); 3545 rgb += ("00"+c).substr(c.length); 3546 } 3547 return rgb; 3548 }, 3549 rgb2hex:function(rgb){ 3550 rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i); 3551 return (rgb && rgb.length === 4) ? "#" + 3552 ("0" + parseInt(rgb[1],10).toString(16)).slice(-2) + 3553 ("0" + parseInt(rgb[2],10).toString(16)).slice(-2) + 3554 ("0" + parseInt(rgb[3],10).toString(16)).slice(-2) : ''; 3555 }, 3556 lightOrDark:function(color) { 3557 3558 // Variables for red, green, blue values 3559 var r, g, b, hsp; 3560 3561 // Check the format of the color, HEX or RGB? 3562 if (color.match(/^rgb/)) { 3563 3564 // If HEX --> store the red, green, blue values in separate variables 3565 color = color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/); 3566 3567 r = color[1]; 3568 g = color[2]; 3569 b = color[3]; 3570 } 3571 else { 3572 3573 // If RGB --> Convert it to HEX: http://gist.github.com/983661 3574 color = +("0x" + color.slice(1).replace( 3575 color.length < 5 && /./g, '$&$&')); 3576 3577 r = color >> 16; 3578 g = color >> 8 & 255; 3579 b = color & 255; 3580 } 3581 3582 // HSP (Highly Sensitive Poo) equation from http://alienryderflex.com/hsp.html 3583 hsp = Math.sqrt( 3584 0.299 * (r * r) + 3585 0.587 * (g * g) + 3586 0.114 * (b * b) 3587 ); 3588 3589 // Using the HSP value, determine whether the color is light or dark 3590 if (hsp>127.5) { 3591 3592 return 'light'; 3593 } 3594 else { 3595 3596 return 'dark'; 3597 } 3598 }, 3599 barPopupStyle:function() 3600 { 3601 var acceptBtn = jQuery('.cli_action_button[data-cli_action=accept]'); 3602 var primaryColor = this.settings.button_1_button_colour; 3603 var primaryLinkColor = this.settings.button_1_link_colour; 3604 var barColor = this.settings.background; 3605 var extractedStyle = ''; 3606 var primaryBtnStyle = this.settings.button_1_style; 3607 Object.keys(primaryBtnStyle).forEach(function(element) { 3608 extractedStyle+=primaryBtnStyle[element][0]+':'+primaryBtnStyle[element][1]+';'; 3609 }); 3610 var isHex = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(barColor); 3611 var shadeColor; 3612 if(!isHex) 3613 { 3614 barColor=CLI.rgb2hex(barColor); 3615 } 3616 if(barColor=="#000000") 3617 { 3618 shadeColor='#191919'; 3619 } 3620 else 3621 { 3622 var intensity=CLI.lightOrDark(barColor); 3623 if(intensity=='light') 3624 { 3625 shadeColor = CLI.ColorLuminance(barColor, -0.05); 3626 } 3627 else 3628 { 3629 shadeColor = CLI.ColorLuminance(barColor, 0.4); 3630 } 3631 } 3632 jQuery("<style>") 3633 .prop("type", "text/css") 3634 .html("\ 3635 #cookie-law-info-bar .cli-switch input:checked + .cli-slider{\ 3636 background-color: "+primaryColor+";\ 3637 }\ 3638 #cookie-law-info-bar .cli-tab-header{\ 3639 background-color: "+shadeColor+"\ 3640 }\ 3641 #cookie-law-info-bar .cli-switch .cli-slider:before{\ 3642 background-color: "+barColor+";\ 3643 }\ 3644 #cookie-law-info-bar .cli-tab-footer .cli-btn{\ 3645 background-color:"+primaryColor+";"+extractedStyle+"\ 3646 }\ 3647 ").appendTo("head"); 3648 3649 }, 3650 enableAllCookies:function() 3651 { 3652 3653 jQuery('.cli-user-preference-checkbox').each(function(){ 3654 var cli_chkbox_elm=jQuery(this); 3655 var cli_chkbox_data_id=cli_chkbox_elm.attr('data-id'); 3656 if(cli_chkbox_data_id!='checkbox-necessary') 3657 { 3658 cli_chkbox_elm.prop('checked',true); 3659 CLI_Cookie.set('cookielawinfo-'+cli_chkbox_data_id,'yes',CLI_ACCEPT_COOKIE_EXPIRE); 3660 } 3661 }); 3662 }, 3663 disableAllCookies:function() 3664 { 3665 jQuery('.cli-user-preference-checkbox').each(function(){ 3666 3667 var cli_chkbox_elm=jQuery(this); 3668 var cli_chkbox_data_id=cli_chkbox_elm.attr('data-id'); 3669 cliCategorySlug = cli_chkbox_data_id.replace('checkbox-',''); 3670 if(Cli_Data.strictlyEnabled.indexOf(cliCategorySlug) === -1) 3671 {
3672 cli_chkbox_elm.prop('checked',false); 3673 CLI_Cookie.set('cookielawinfo-'+cli_chkbox_data_id,'no',CLI_ACCEPT_COOKIE_EXPIRE); 3674 } 3675 }); 3676 }, 3677 privacyReadmore:function() 3678 { 3679 var el= jQuery('.cli-privacy-content .cli-privacy-content-text'), 3680 clone= el.clone(), 3681 originalHtml= clone.html(), 3682 originalHeight= el.outerHeight(), 3683 Trunc = { 3684 addReadmore:function(textBlock) 3685 { 3686 if(textBlock.html().length > 250) 3687 { 3688 jQuery('.cli-privacy-readmore').show(); 3689 } 3690 else 3691 { 3692 jQuery('.cli-privacy-readmore').hide(); 3693 } 3694 }, 3695 truncateText : function( textBlock ) { 3696 var strippedText = jQuery('<div />').html(textBlock.html()); 3697 strippedText.find('table').remove(); 3698 textBlock.html(strippedText.html()); 3699 while (textBlock.text().length > 250 ) 3700 { 3701 textBlock.text(function(index, text) { 3702 return text.replace(/\W*\s(\S)*$/, '...'); 3703 }); 3704 } 3705 }, 3706 replaceText: function ( textBlock, original ){ 3707 return textBlock.html(original); 3708 } 3709 3710 }; 3711 Trunc.addReadmore(el); 3712 Trunc.truncateText(el); 3713 jQuery('a.cli-privacy-readmore').click(function(e){ 3714 e.preventDefault(); 3715 if(jQuery('.cli-privacy-overview').hasClass('cli-collapsed')) 3716 { 3717 Trunc.truncateText(el); 3718 jQuery('.cli-privacy-overview').removeClass('cli-collapsed'); 3719 el.css('height', '100%'); 3720 } 3721 else 3722 { 3723 jQuery('.cli-privacy-overview').addClass('cli-collapsed'); 3724 Trunc.replaceText(el, originalHtml); 3725 } 3726 3727 3728 }); 3729 }, 3730 checkCategories:function() 3731 { 3732 var cliAllowedCategories = []; 3733 var cli_categories = {}; 3734 jQuery('.cli-user-preference-checkbox').each(function() 3735 { var status=false; 3736 cli_chkbox_elm=jQuery(this); 3737 cli_chkbox_data_id=cli_chkbox_elm.attr('data-id'); 3738 cli_chkbox_data_id=cli_chkbox_data_id.replace('checkbox-',''); 3739 cli_chkbox_data_id_trimmed=cli_chkbox_data_id.replace('-','_') 3740 if(jQuery(cli_chkbox_elm).is(':checked')) 3741 { 3742 status=true; 3743 cliAllowedCategories.push(cli_chkbox_data_id); 3744 } 3745 3746 cli_categories[cli_chkbox_data_id_trimmed]= status; 3747 }); 3748 CLI.allowedCategories = cliAllowedCategories; 3749 CLI.consent=cli_categories; 3750 },
3751 cookieLawInfoRunCallBacks:function() 3752 { 3753 this.checkCategories(); 3754 if(CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)=='yes') 3755 { 3756 if("function" == typeof CookieLawInfo_Accept_Callback){ 3757 CookieLawInfo_Accept_Callback(); 3758 } 3759 } 3760 }, 3761 addStyleAttribute:function() 3762 { 3763 var bar=this.bar_elm; 3764 var styleClass=''; 3765 if(jQuery(bar).find('.cli-bar-container').length > 0) 3766 { 3767 styleClass=jQuery('.cli-bar-container').attr('class'); 3768 styleClass=jQuery.trim(styleClass.replace('cli-bar-container','')); 3769 jQuery(bar).attr('data-cli-style',styleClass); 3770 } 3771 }, 3772} 3773var cliBlocker = 3774{ 3775 blockingStatus: true, 3776 geoIP: false, 3777 scriptsLoaded: false, 3778 checkPluginStatus:function(callbackA , callbackB ) 3779 { 3780 var euCountries = Cli_Data.eu_countries; 3781 if(Cli_Data.geoIP === 'enabled') 3782 { 3783 jQuery.getJSON('https://ipapi.co/json/', function(data) 3784 { 3785 if( (data.in_eu === false ) && (euCountries.indexOf(data.country) === -1)) 3786 { 3787 cliBlocker.blockingStatus = false; 3788 cliBlocker.removeAllPreferenceCookies(); 3789 jQuery('body').addClass('wt-cli-geoip-on wt-cli-non-eu-country'); 3790 CLI.hidePopupOverlay(); 3791 jQuery('.wt-cli-geoip-on.wt-cli-non-eu-country').find('.wt-cli-element').remove(); 3792 } 3793 else 3794 { 3795 jQuery('body').addClass('wt-cli-geoip-on wt-cli-eu-country'); 3796 } 3797 callbackA(); 3798 callbackB(); 3799 }); 3800 } 3801 else 3802 { 3803 callbackA(); 3804 callbackB(); 3805 } 3806 3807 }, 3808 cookieBar: function() 3809 { 3810 if(cliBlocker.blockingStatus === false) 3811 { 3812 jQuery('.wt-cli-cookie-bar-container').remove(); 3813 } 3814 else 3815 { 3816 jQuery('.wt-cli-cookie-bar-container').show(); 3817 } 3818 }, 3819 removeAllPreferenceCookies : function() 3820 { 3821 cliPreferenceCookies = Cli_Data.cookielist; 3822 for (var key in cliPreferenceCookies ) { 3823 CLI_Cookie.erase('cookielawinfo-checkbox-'+key); 3824 } 3825 }, 3826 removeCookieByCategory : function() 3827 { 3828 3829 if(cliBlocker.blockingStatus === true) 3830 { 3831 if(CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) !== null) 3832 { 3833 non_necessary_cookies = Cli_Data.non_necessary_cookies; 3834 for (var key in non_necessary_cookies) { 3835 currentCategory = key; 3836 if(CLI.allowedCategories.indexOf(currentCategory) === -1) 3837 {
3838 var nonNecessaryCookies = non_necessary_cookies[currentCategory]; 3839 for(i=0; i < nonNecessaryCookies.length; i++) 3840 { 3841 CLI_Cookie.erase(nonNecessaryCookies[i]); 3842 } 3843 } 3844 } 3845 } 3846 } 3847 }, 3848 runScripts:function() 3849 { 3850 srcReplaceableElms = ['iframe','IFRAME','EMBED','embed','OBJECT','object','IMG','img']; 3851 var genericFuncs = 3852 { 3853 3854 renderByElement: function(callback) 3855 { 3856 cliScriptFuncs.renderScripts(); 3857 cliHtmlElmFuncs.renderSrcElement(); 3858 callback(); 3859 cliBlocker.scriptsLoaded = true; 3860 }, 3861 reviewConsent : function() 3862 { 3863 jQuery(document).on('click','.cli_manage_current_consent',function(){ 3864 CLI.bar_elm.slideDown(CLI.settings.animate_speed_show); 3865 }); 3866 } 3867 3868 }; 3869 var cliScriptFuncs = 3870 { 3871 // trigger DOMContentLoaded 3872 scriptsDone:function() 3873 { 3874 3875 var DOMContentLoadedEvent = document.createEvent('Event') 3876 DOMContentLoadedEvent.initEvent('DOMContentLoaded', true, true) 3877 window.document.dispatchEvent(DOMContentLoadedEvent) 3878 3879 }, 3880 seq :function(arr, callback, index) { 3881 // first call, without an index 3882 if (typeof index === 'undefined') { 3883 index = 0 3884 } 3885 3886 arr[index](function () { 3887 index++ 3888 if (index === arr.length) { 3889 callback() 3890 } else { 3891 cliScriptFuncs.seq(arr, callback, index) 3892 } 3893 }) 3894 }, 3895 /* script runner */ 3896 insertScript:function($script,callback) { 3897 3898 var s =''; 3899 var allowedAttributes = [ 3900 'data-cli-class', 3901 'data-cli-label', 3902 'data-cli-placeholder', 3903 'data-cli-script-type', 3904 'data-cli-src' 3905 ]; 3906 var scriptType = $script.getAttribute('data-cli-script-type'); 3907 var elementPosition = $script.getAttribute('data-cli-element-position'); 3908 var isBlock = $script.getAttribute('data-cli-block'); 3909 var s = document.createElement('script'); 3910 s.type = 'text/plain'; 3911 if($script.async) 3912 { 3913 s.async = $script.async; 3914 } 3915 if($script.defer) 3916 { 3917 s.defer = $script.defer; 3918 } 3919 if ($script.src) { 3920 s.onload = callback 3921 s.onerror = callback 3922 s.src = $script.src 3923 } else { 3924 s.textContent = $script.innerText 3925 } 3926 var attrs = jQuery($script).prop("attributes"); 3927 for (var ii = 0; ii < attrs.length; ++ii) { 3928 if (attrs[ii].nodeName !== 'id') { 3929 if(allowedAttributes.indexOf(attrs[ii].nodeName) !== -1){ 3930 s.setAttribute(attrs[ii].nodeName,attrs[ii].value); 3931 } 3932 } 3933 } 3934 if(cliBlocker.blockingStatus === true) 3935 { 3936 3937 if(( CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)=='yes' && CLI.allowedCategories.indexOf(scriptType) !== -1 ) || ( CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null && isBlock==='false') ) 3938 { 3939 s.setAttribute('data-cli-consent','accepted'); 3940 s.type = 'text/javascript'; 3941 } 3942 } 3943 else 3944 { 3945 s.type = 'text/javascript'; 3946 } 3947 if($script.type != s.type) 3948 { 3949 if(elementPosition === 'head') 3950 { 3951 3952 document.head.appendChild(s); 3953 if (!$script.src) 3954 { 3955 callback() 3956 } 3957 $script.parentNode.removeChild($script); 3958 } 3959 else 3960 { 3961 3962 document.body.appendChild(s); 3963 if (!$script.src) 3964 { 3965 callback() 3966 } 3967 $script.parentNode.removeChild($script); 3968 } 3969 3970 } 3971 }, 3972 renderScripts:function() 3973 { 3974 var $scripts = document.querySelectorAll('script[data-cli-class="cli-blocker-script"]'); 3975 if($scripts.length > 0) 3976 { 3977 var runList = [] 3978 var typeAttr 3979 Array.prototype.forEach.call($scripts, function ($script) { 3980 3981 // only run script tags without the type attribute 3982 // or with a javascript mime attribute value 3983 typeAttr = $script.getAttribute('type') 3984 var elmType = $script.tagName; 3985 runList.push(function (callback) { 3986 cliScriptFuncs.insertScript($script, callback) 3987 }) 3988 }) 3989 cliScriptFuncs.seq(runList, cliScriptFuncs.scriptsDone); 3990 } 3991 } 3992 }; 3993 var cliHtmlElmFuncs = { 3994 renderSrcElement: function() 3995 { 3996 var blockingElms = document.querySelectorAll('[data-cli-class="cli-blocker-script"]'); 3997 for (var i = 0; i < blockingElms.length; i++) 3998 { 3999 var currentElm = blockingElms[i]; 4000 var elmType = currentElm.tagName; 4001 if(srcReplaceableElms.indexOf(elmType) !== -1) 4002 { 4003 var elmCategory = currentElm.getAttribute('data-cli-script-type'); 4004 var isBlock = currentElm.getAttribute('data-cli-block'); 4005 if(cliBlocker.blockingStatus === true) 4006 { 4007 if((CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)=='yes' && CLI.allowedCategories.indexOf(elmCategory) !== -1 ) || ( CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null && isBlock==='false') ) 4008 { 4009 this.replaceSrc(currentElm); 4010 } 4011 else 4012 { 4013 this.addPlaceholder(currentElm); 4014 } 4015 } 4016 else 4017 { 4018 this.replaceSrc(currentElm); 4019 } 4020 } 4021 } 4022 4023 }, 4024 addPlaceholder:function(htmlElm) 4025 { 4026 if(jQuery(htmlElm).prev('.wt-cli-iframe-placeholder').length === 0) 4027 { 4028 var htmlElemName = htmlElm.getAttribute('data-cli-label'); 4029 var htmlElemType = htmlElm.getAttribute('data-cli-placeholder'); 4030 var htmlElemWidth = htmlElm.getAttribute('width'); 4031 var htmlElemHeight = htmlElm.getAttribute('height'); 4032 if(htmlElemWidth == null) 4033 { 4034 htmlElemWidth = htmlElm.offsetWidth; 4035 } 4036 if(htmlElemHeight == null) 4037 { 4038 htmlElemHeight = htmlElm.offsetHeight; 4039 } 4040 pixelPattern = /px/; 4041 htmlElemWidth = ((pixelPattern.test(htmlElemWidth)) ? htmlElemWidth : htmlElemWidth+'px'); 4042 htmlElemHeight = ((pixelPattern.test(htmlElemHeight)) ? htmlElemHeight : htmlElemHeight+'px'); 4043 var addPlaceholder = '<div style="width:'+htmlElemWidth+'; height:'+htmlElemHeight+';" class="wt-cli-iframe-placeholder"><div class="wt-cli-inner-text">'+htmlElemType+'</div></div>'; 4044 addPlaceholder.width = htmlElemWidth; 4045 addPlaceholder.height = htmlElemHeight; 4046 if(htmlElm.tagName !== 'IMG') 4047 { 4048 jQuery(addPlaceholder).insertBefore(htmlElm); 4049 } 4050 htmlElm.removeAttribute('src'); 4051 htmlElm.style.display = 'none'; 4052 } 4053 }, 4054 replaceSrc: function(htmlElm) 4055 { 4056 if(!htmlElm.hasAttribute('src')) 4057 { 4058 var htmlElemSrc = htmlElm.getAttribute('data-cli-src'); 4059 htmlElm.setAttribute('src',htmlElemSrc); 4060 if(jQuery(htmlElm).prev('.wt-cli-iframe-placeholder').length > 0) 4061 { 4062 jQuery(htmlElm).prev('.wt-cli-iframe-placeholder').remove(); 4063 } 4064 htmlElm.style.display = 'block'; 4065 } 4066 } 4067 }; 4068 4069 genericFuncs.reviewConsent(); 4070 genericFuncs.renderByElement(cliBlocker.removeCookieByCategory); 4071 } 4072} 4073jQuery(document).ready(function() { 4074 if(typeof cli_cookiebar_settings!='undefined') 4075 { 4076 CLI.set({ 4077 settings:cli_cookiebar_settings 4078 }); 4079 } 4080 else 4081 { 4082 var data = { 4083 action: 'cli_get_settings_json', 4084 }; 4085 jQuery.ajax({ 4086 url: Cli_Data.ajax_url, 4087 data: data, 4088 dataType: 'json', 4089 type: 'GET', 4090 success: function (response) { 4091 CLI.set({ 4092 settings:response 4093 }); 4094 } 4095 }); 4096 } 4097 cliBlocker.checkPluginStatus(cliBlocker.cookieBar,cliBlocker.runScripts); 4098}); 4099 4100/*! UIkit 3.0.0-beta.42 | http://www.getuikit.com | (c) 2014 - 2017 YOOtheme | MIT License */ 4101 4102(function (global, factory) { 4103 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 4104 typeof define === 'function' && define.amd ? define('uikit', factory) : 4105 (global.UIkit = factory()); 4106}(this, (function () { 'use strict'; 4107 4108function bind(fn, context) { 4109 return function (a) { 4110 var l = arguments.length; 4111 return l ? l > 1 ? fn.apply(context, arguments) : fn.call(context, a) : fn.call(context); 4112 }; 4113} 4114 4115var ref = Object.prototype; 4116var hasOwnProperty = ref.hasOwnProperty; 4117 4118function hasOwn(obj, key) { 4119 return hasOwnProperty.call(obj, key); 4120} 4121 4122var hyphenateRe = /([a-z\d])([A-Z])/g; 4123 4124function hyphenate(str) { 4125 return str 4126 .replace(hyphenateRe, '$1-$2') 4127 .toLowerCase(); 4128} 4129 4130var camelizeRE = /-(\w)/g; 4131 4132function camelize(str) { 4133 return str.replace(camelizeRE, toUpper); 4134} 4135 4136function toUpper(_, c) { 4137 return c ? c.toUpperCase() : ''; 4138} 4139 4140function ucfirst(str) { 4141 return str.length ? toUpper(null, str.charAt(0)) + str.slice(1) : ''; 4142} 4143 4144var strPrototype = String.prototype; 4145var startsWithFn = strPrototype.startsWith || function (search) { return this.lastIndexOf(search, 0) === 0; }; 4146 4147function startsWith(str, search) { 4148 return startsWithFn.call(str, search); 4149} 4150 4151var endsWithFn = strPrototype.endsWith || function (search) { return this.substr(-search.length) === search; }; 4152 4153function endsWith(str, search) { 4154 return endsWithFn.call(str, search); 4155} 4156 4157var includesFn = function (search) { return ~this.indexOf(search); }; 4158var includesStr = strPrototype.includes || includesFn; 4159var includesArray = Array.prototype.includes || includesFn; 4160 4161function includes(obj, search) { 4162 return obj && (isString(obj) ? includesStr : includesArray).call(obj, search); 4163} 4164 4165var isArray = Array.isArray; 4166 4167function isFunction(obj) { 4168 return typeof obj === 'function'; 4169} 4170 4171function isObject(obj) { 4172 return obj !== null && typeof obj === 'object'; 4173} 4174 4175function isPlainObject(obj) { 4176 return isObject(obj) && Object.getPrototypeOf(obj) === Object.prototype; 4177} 4178 4179function isWindow(obj) { 4180 return isObject(obj) && obj === obj.window; 4181} 4182 4183function isDocument(obj) { 4184 return isObject(obj) && obj.nodeType === 9; 4185} 4186 4187function isJQuery(obj) { 4188 return isObject(obj) && !!obj.jquery; 4189} 4190 4191function isNode(element) { 4192 return element instanceof Node || isObject(element) && element.nodeType === 1; 4193} 4194 4195function isNodeCollection(element) { 4196 return element instanceof NodeList || element instanceof HTMLCollection; 4197} 4198 4199function isBoolean(value) { 4200 return typeof value === 'boolean'; 4201} 4202 4203function isString(value) { 4204 return typeof value === 'string'; 4205} 4206 4207function isNumber(value) { 4208 return typeof value === 'number'; 4209} 4210 4211function isNumeric(value) { 4212 return isNumber(value) || isString(value) && !isNaN(value - parseFloat(value)); 4213} 4214 4215function isUndefined(value) { 4216 return value === void 0; 4217} 4218 4219function toBoolean(value) { 4220 return isBoolean(value) 4221 ? value 4222 : value === 'true' || value === '1' || value === '' 4223 ? true 4224 : value === 'false' || value === '0' 4225 ? false 4226 : value; 4227} 4228 4229function toNumber(value) { 4230 var number = Number(value); 4231 return !isNaN(number) ? number : false;
4232} 4233 4234function toFloat(value) { 4235 return parseFloat(value) || 0; 4236} 4237 4238function toNode(element) { 4239 return isNode(element) || isWindow(element) || isDocument(element) 4240 ? element 4241 : isNodeCollection(element) || isJQuery(element) 4242 ? element[0] 4243 : isArray(element) 4244 ? toNode(element[0]) 4245 : null; 4246} 4247 4248var arrayProto = Array.prototype; 4249function toNodes(element) { 4250 return isNode(element) 4251 ? [element] 4252 : isNodeCollection(element) 4253 ? arrayProto.slice.call(element) 4254 : isArray(element) 4255 ? element.map(toNode).filter(Boolean) 4256 : isJQuery(element) 4257 ? element.toArray() 4258 : []; 4259} 4260 4261function toList(value) { 4262 return isArray(value) 4263 ? value 4264 : isString(value) 4265 ? value.split(/,(?![^(]*\))/).map(function (value) { return isNumeric(value) 4266 ? toNumber(value) 4267 : toBoolean(value.trim()); }) 4268 : [value]; 4269} 4270 4271function toMs(time) { 4272 return !time 4273 ? 0 4274 : endsWith(time, 'ms') 4275 ? toFloat(time) 4276 : toFloat(time) * 1000; 4277} 4278 4279function swap(value, a, b) { 4280 return value.replace(new RegExp((a + "|" + b), 'mg'), function (match) { 4281 return match === a ? b : a; 4282 }); 4283} 4284 4285var assign = Object.assign || function (target) { 4286 var args = [], len = arguments.length - 1; 4287 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 4288 4289 target = Object(target); 4290 for (var i = 0; i < args.length; i++) { 4291 var source = args[i]; 4292 if (source !== null) { 4293 for (var key in source) { 4294 if (hasOwn(source, key)) { 4295 target[key] = source[key]; 4296 } 4297 } 4298 } 4299 } 4300 return target; 4301}; 4302 4303function each(obj, cb) { 4304 for (var key in obj) { 4305 if (cb.call(obj[key], obj[key], key) === false) { 4306 break; 4307 } 4308 } 4309} 4310 4311// Compare by numbers only
4312function sortBy(collection, prop) { 4313 return collection.sort(function (a, b) { return a[prop] - b[prop]; }); 4314} 4315 4316function clamp(number, min, max) { 4317 if ( min === void 0 ) min = 0; 4318 if ( max === void 0 ) max = 1; 4319 4320 return Math.min(Math.max(number, min), max); 4321} 4322 4323function noop() {} 4324 4325function intersectRect(r1, r2) { 4326 return r1.left <= r2.right && 4327 r2.left <= r1.right && 4328 r1.top <= r2.bottom && 4329 r2.top <= r1.bottom; 4330} 4331 4332function pointInRect(point, rect) { 4333 return intersectRect({top: point.y, bottom: point.y, left: point.x, right: point.x}, rect); 4334} 4335 4336var Dimensions = { 4337 4338 ratio: function ratio(dimensions, prop, value) { 4339 var obj; 4340 4341 4342 var aProp = prop === 'width' ? 'height' : 'width'; 4343 4344 return ( obj = {}, obj[aProp] = Math.round(value * dimensions[aProp] / dimensions[prop]), obj[prop] = value, obj); 4345 }, 4346 4347 contain: function contain(dimensions, maxDimensions) { 4348 var this$1 = this; 4349 4350 dimensions = assign({}, dimensions); 4351 4352 each(dimensions, function (_, prop) { return dimensions = dimensions[prop] > maxDimensions[prop] 4353 ? this$1.ratio(dimensions, prop, maxDimensions[prop]) 4354 : dimensions; } 4355 ); 4356 4357 return dimensions; 4358 }, 4359 4360 cover: function cover(dimensions, maxDimensions) { 4361 var this$1 = this; 4362 4363 dimensions = this.contain(dimensions, maxDimensions); 4364 4365 each(dimensions, function (_, prop) { return dimensions = dimensions[prop] < maxDimensions[prop] 4366 ? this$1.ratio(dimensions, prop, maxDimensions[prop]) 4367 : dimensions; } 4368 ); 4369 4370 return dimensions; 4371 } 4372 4373}; 4374 4375function attr(element, name, value) { 4376 4377 if (isObject(name)) { 4378 for (var key in name) { 4379 attr(element, key, name[key]); 4380 } 4381 return; 4382 } 4383 4384 if (isUndefined(value)) { 4385 element = toNode(element); 4386 return element && element.getAttribute(name); 4387 } else { 4388 toNodes(element).forEach(function (element) { 4389 4390 if (isFunction(value)) { 4391 value = value.call(element, attr(element, name)); 4392 } 4393 4394 if (value === null) { 4395 removeAttr(element, name); 4396 } else { 4397 element.setAttribute(name, value); 4398 } 4399 }); 4400 } 4401 4402} 4403 4404function hasAttr(element, name) { 4405 return toNodes(element).some(function (element) { return element.hasAttribute(name); }); 4406} 4407 4408function removeAttr(element, name) { 4409 element = toNodes(element); 4410 name.split(' ').forEach(function (name) { return element.forEach(function (element) { return element.removeAttribute(name); } 4411 ); } 4412 ); 4413} 4414 4415function filterAttr(element, attribute, pattern, replacement) { 4416 attr(element, attribute, function (value) { return value ? value.replace(pattern, replacement) : value; }); 4417} 4418 4419function data(element, attribute) { 4420 for (var i = 0, attrs = [attribute, ("data-" + attribute)]; i < attrs.length; i++) { 4421 if (hasAttr(element, attrs[i])) { 4422 return attr(element, attrs[i]); 4423 } 4424 } 4425} 4426 4427function query(selector, context) { 4428 return toNode(selector) || find(selector, isContextSelector(selector) ? context : document); 4429} 4430 4431function queryAll(selector, context) { 4432 var nodes = toNodes(selector); 4433 return nodes.length && nodes || findAll(selector, isContextSelector(selector) ? context : document); 4434} 4435 4436function find(selector, context) { 4437 return toNode(_query(selector, context, 'querySelector')); 4438} 4439 4440function findAll(selector, context) { 4441 return toNodes(_query(selector, context, 'querySelectorAll')); 4442} 4443 4444function _query(selector, context, queryFn) { 4445 if ( context === void 0 ) context = document; 4446 4447 4448 if (!selector || !isString(selector)) { 4449 return null; 4450 } 4451 4452 selector = selector.replace(contextSanitizeRe, '$1 *'); 4453 4454 var removes; 4455 4456 if (isContextSelector(selector)) { 4457 4458 removes = []; 4459 4460 selector = selector.split(',').map(function (selector, i) { 4461 4462 var ctx = context; 4463 4464 selector = selector.trim(); 4465 4466 if (selector[0] === '!') { 4467 4468 var selectors = selector.substr(1).trim().split(' '); 4469 ctx = closest(context.parentNode, selectors[0]); 4470 selector = selectors.slice(1).join(' '); 4471 4472 } 4473 4474 if (!ctx) { 4475 return null; 4476 } 4477 4478 if (!ctx.id) { 4479 ctx.id = "uk-" + (Date.now()) + i; 4480 removes.push(function () { return removeAttr(ctx, 'id'); }); 4481 } 4482 4483 return ("#" + (escape(ctx.id)) + " " + selector); 4484 4485 }
4485).filter(Boolean).join(','); 4486 4487 context = document; 4488 4489 } 4490 4491 try { 4492 4493 return context[queryFn](selector); 4494 4495 } catch (e) { 4496 4497 return null; 4498 4499 } finally { 4500 4501 removes && removes.forEach(function (remove) { return remove(); }); 4502 4503 } 4504 4505} 4506 4507var contextSelectorRe = /(^|,)\s*[!>+~]/; 4508var contextSanitizeRe = /([!>+~])(?=\s+[!>+~]|\s*$)/g; 4509 4510function isContextSelector(selector) { 4511 return isString(selector) && selector.match(contextSelectorRe); 4512} 4513 4514var elProto = Element.prototype; 4515var matchesFn = elProto.matches || elProto.webkitMatchesSelector || elProto.msMatchesSelector; 4516 4517function matches(element, selector) { 4518 return toNodes(element).some(function (element) { return matchesFn.call(element, selector); }); 4519} 4520 4521var closestFn = elProto.closest || function (selector) { 4522 var ancestor = this; 4523 4524 do { 4525 4526 if (matches(ancestor, selector)) { 4527 return ancestor; 4528 } 4529 4530 ancestor = ancestor.parentNode; 4531 4532 } while (ancestor && ancestor.nodeType === 1); 4533}; 4534 4535function closest(element, selector) { 4536 4537 if (startsWith(selector, '>')) { 4538 selector = selector.slice(1); 4539 } 4540 4541 return isNode(element) 4542 ? element.parentNode && closestFn.call(element, selector) 4543 : toNodes(element).map(function (element) { return element.parentNode && closestFn.call(element, selector); }).filter(Boolean); 4544} 4545 4546function parents(element, selector) { 4547 var elements = []; 4548 var parent = toNode(element).parentNode; 4549 4550 while (parent && parent.nodeType === 1) { 4551 4552 if (matches(parent, selector)) { 4553 elements.push(parent); 4554 } 4555 4556 parent = parent.parentNode; 4557 } 4558 4559 return elements; 4560} 4561 4562var escapeFn = window.CSS && CSS.escape || function (css) { return css.replace(/([^\x7f-\uFFFF\w-])/g, function (match) { return ("\\" + match); }); }; 4563function escape(css) { 4564 return isString(css) ? escapeFn.call(null, css) : ''; 4565} 4566 4567var voidElements = { 4568 area: true, 4569 base: true, 4570 br: true, 4571 col: true, 4572 embed: true, 4573 hr: true, 4574 img: true, 4575 input: true, 4576 keygen: true, 4577 link: true, 4578 menuitem: true, 4579 meta: true, 4580 param: true, 4581 source: true, 4582 track: true, 4583 wbr: true 4584}; 4585function isVoidElement(element) { 4586 return toNodes(element).some(function (element) { return voidElements[element.tagName.toLowerCase()]; }); 4587} 4588 4589function isVisible(element) { 4590 return toNodes(element).some(function (element) { return element.offsetHeight || element.getBoundingClientRect().height; }); 4591} 4592 4593var selInput = 'input,select,textarea,button'; 4594function isInput(element) { 4595 return toNodes(element).some(function (element) { return matches(element, selInput); }); 4596} 4597 4598function filter(element, selector) { 4599 return toNodes(element).filter(function (element) { return matches(element, selector); }); 4600} 4601 4602function within(element, selector) { 4603 return !isString(selector) 4604 ? element === selector || (isDocument(selector) 4605 ? selector.documentElement 4606 : toNode(selector)).contains(toNode(element)) // IE 11 document does not implement contains 4607 : matches(element, selector) || closest(element, selector); 4608} 4609 4610function on() { 4611 var args = [], len = arguments.length; 4612 while ( len-- ) args[ len ] = arguments[ len ]; 4613 4614 4615 var ref = getArgs(args); 4616 var target = ref[0]; 4617 var type = ref[1]; 4618 var selector = ref[2]; 4619 var listener = ref[3]; 4620 var useCapture = ref[4]; 4621 4622 target = toEventTarget(target); 4623 4624 if (selector) { 4625 listener = delegate(target, selector, listener); 4626 } 4627 4628 if (listener.length > 1) { 4629 listener = detail(listener); 4630 } 4631 4632 type.split(' ').forEach(function (type) { return target && target.addEventListener(type, listener, useCapture); }); 4633 return function () { return off(target, type, listener, useCapture); }; 4634} 4635 4636function off(target, type, listener, useCapture) { 4637 if ( useCapture === void 0 ) useCapture = false; 4638 4639 target = toEventTarget(target); 4640 target && type.split(' ').forEach(function (type) { return target.removeEventListener(type, listener, useCapture); }); 4641} 4642 4643function once() { 4644 var args = [], len = arguments.length; 4645 while ( len-- ) args[ len ] = arguments[ len ]; 4646 4647 4648 var ref = getArgs(args); 4649 var element = ref[0]; 4650 var type = ref[1]; 4651 var selector = ref[2]; 4652 var listener = ref[3]; 4653 var useCapture = ref[4]; 4654 var condition = ref[5]; 4655 var off = on(element, type, selector, function (e) { 4656 var result = !condition || condition(e); 4657 if (result) { 4658 off(); 4659 listener(e, result); 4660 } 4661 }, useCapture); 4662 4663 return off; 4664} 4665 4666function trigger(target, event, detail) { 4667 return toEventTargets(target).reduce(function (notCanceled, target) { return notCanceled && target.dispatchEvent(createEvent(event, true, true, detail)); } 4668 , true); 4669} 4670
4671function createEvent(e, bubbles, cancelable, detail) { 4672 if ( bubbles === void 0 ) bubbles = true; 4673 if ( cancelable === void 0 ) cancelable = false; 4674 4675 if (isString(e)) { 4676 var event = document.createEvent('CustomEvent'); // IE 11 4677 event.initCustomEvent(e, bubbles, cancelable, detail); 4678 e = event; 4679 } 4680 4681 return e; 4682} 4683 4684function getArgs(args) { 4685 4686 if (isString(args[0])) { 4687 args[0] = find(args[0]); 4688 } 4689 4690 if (isFunction(args[2])) { 4691 args.splice(2, 0, false); 4692 } 4693 return args; 4694} 4695 4696function delegate(element, selector, listener) { 4697 var this$1 = this; 4698 4699 return function (e) { 4700 4701 var target = e.target; 4702 var current = selector[0] === '>' 4703 ? findAll(selector, element).reverse().filter(function (element) { return within(target, element); })[0] 4704 : closest(target, selector); 4705 4706 if (current) { 4707 e.delegate = element; 4708 e.current = current; 4709 4710 listener.call(this$1, e); 4711 } 4712 }; 4713} 4714 4715function detail(listener) { 4716 return function (e) { return isArray(e.detail) ? listener.apply(listener, [e].concat(e.detail)) : listener(e); }; 4717} 4718 4719function isEventTarget(target) { 4720 return 'EventTarget' in window 4721 ? target instanceof EventTarget 4722 : target && 'addEventListener' in target; 4723} 4724 4725function toEventTarget(target) { 4726 return isEventTarget(target) ? target : toNode(target); 4727} 4728 4729function toEventTargets(target) { 4730 return isEventTarget(target) 4731 ? [target] 4732 : isArray(target) 4733 ? target.map(toEventTarget).filter(Boolean) 4734 : toNodes(target); 4735} 4736 4737function preventClick() { 4738 4739 var timer = setTimeout(once(document, 'click', function (e) { 4740 4741 e.preventDefault(); 4742 e.stopImmediatePropagation(); 4743 4744 clearTimeout(timer); 4745 4746 }, true)); 4747 4748 trigger(document, 'touchcancel'); 4749 4750} 4751 4752/* global setImmediate */ 4753var Promise = 'Promise' in window ? window.Promise : PromiseFn; 4754 4755var Deferred = function Deferred() { 4756 var this$1 = this; 4757 4758 this.promise = new Promise(function (resolve, reject) { 4759 this$1.reject = reject; 4760 this$1.resolve = resolve; 4761 }); 4762}; 4763 4764/** 4765 * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis) 4766 */ 4767 4768var RESOLVED = 0; 4769var REJECTED = 1; 4770var PENDING = 2; 4771 4772var async = 'setImmediate' in window ? setImmediate : setTimeout; 4773 4774function PromiseFn(executor) { 4775 4776 this.state = PENDING; 4777 this.value = undefined; 4778 this.deferred = []; 4779 4780 var promise = this; 4781 4782 try { 4783 executor( 4784 function (x) { 4785 promise.resolve(x); 4786 }, 4787 function (r) { 4788 promise.reject(r); 4789 } 4790 ); 4791 } catch (e) { 4792 promise.reject(e); 4793 } 4794} 4795 4796PromiseFn.reject = function (r) { 4797 return new PromiseFn(function (resolve, reject) { 4798 reject(r); 4799 }); 4800}; 4801 4802PromiseFn.resolve = function (x) { 4803 return new PromiseFn(function (resolve, reject) { 4804 resolve(x); 4805 }); 4806}; 4807 4808PromiseFn.all = function all(iterable) { 4809 return new PromiseFn(function (resolve, reject) { 4810 var result = []; 4811 var count = 0; 4812 4813 if (iterable.length === 0) { 4814 resolve(result); 4815 } 4816 4817 function resolver(i) { 4818 return function (x) { 4819 result[i] = x; 4820 count += 1; 4821 4822 if (count === iterable.length) { 4823 resolve(result); 4824 } 4825 }; 4826 } 4827 4828 for (var i = 0; i < iterable.length; i += 1) { 4829 PromiseFn.resolve(iterable[i]).then(resolver(i), reject); 4830 } 4831 }); 4832}; 4833 4834PromiseFn.race = function race(iterable) { 4835 return new PromiseFn(function (resolve, reject) { 4836 for (var i = 0; i < iterable.length; i += 1) { 4837 PromiseFn.resolve(iterable[i]).then(resolve, reject); 4838 } 4839 }); 4840}; 4841 4842var p = PromiseFn.prototype; 4843 4844p.resolve = function resolve(x) { 4845 var promise = this; 4846 4847 if (promise.state === PENDING) { 4848 if (x === promise) { 4849 throw new TypeError('Promise settled with itself.'); 4850 } 4851 4852 var called = false;
4853 4854 try { 4855 var then = x && x.then; 4856 4857 if (x !== null && isObject(x) && isFunction(then)) { 4858 then.call( 4859 x, 4860 function (x) { 4861 if (!called) { 4862 promise.resolve(x); 4863 } 4864 called = true; 4865 }, 4866 function (r) { 4867 if (!called) { 4868 promise.reject(r); 4869 } 4870 called = true; 4871 } 4872 ); 4873 return; 4874 } 4875 } catch (e) { 4876 if (!called) { 4877 promise.reject(e); 4878 } 4879 return; 4880 } 4881 4882 promise.state = RESOLVED; 4883 promise.value = x; 4884 promise.notify(); 4885 } 4886}; 4887 4888p.reject = function reject(reason) { 4889 var promise = this; 4890 4891 if (promise.state === PENDING) { 4892 if (reason === promise) { 4893 throw new TypeError('Promise settled with itself.'); 4894 } 4895 4896 promise.state = REJECTED; 4897 promise.value = reason; 4898 promise.notify(); 4899 } 4900}; 4901 4902p.notify = function notify() { 4903 var this$1 = this; 4904 4905 async(function () { 4906 if (this$1.state !== PENDING) { 4907 while (this$1.deferred.length) { 4908 var ref = this$1.deferred.shift(); 4909 var onResolved = ref[0]; 4910 var onRejected = ref[1]; 4911 var resolve = ref[2]; 4912 var reject = ref[3]; 4913 4914 try { 4915 if (this$1.state === RESOLVED) { 4916 if (isFunction(onResolved)) { 4917 resolve(onResolved.call(undefined, this$1.value)); 4918 } else { 4919 resolve(this$1.value); 4920 } 4921 } else if (this$1.state === REJECTED) { 4922 if (isFunction(onRejected)) { 4923 resolve(onRejected.call(undefined, this$1.value)); 4924 } else { 4925 reject(this$1.value); 4926 } 4927 } 4928 } catch (e) { 4929 reject(e); 4930 } 4931 } 4932 } 4933 }); 4934}; 4935 4936p.then = function then(onResolved, onRejected) { 4937 var this$1 = this; 4938 4939 return new PromiseFn(function (resolve, reject) { 4940 this$1.deferred.push([onResolved, onRejected, resolve, reject]); 4941 this$1.notify(); 4942 }); 4943}; 4944 4945p.catch = function (onRejected) { 4946 return this.then(undefined, onRejected); 4947}; 4948 4949function ajax(url, options) { 4950 return new Promise(function (resolve, reject) { 4951 4952 var env = assign({ 4953 data: null, 4954 method: 'GET', 4955 headers: {}, 4956 xhr: new XMLHttpRequest(), 4957 beforeSend: noop, 4958 responseType: '' 4959 }, options); 4960 4961 env.beforeSend(env); 4962 4963 var xhr = env.xhr; 4964 4965 for (var prop in env) { 4966 if (prop in xhr) { 4967 try { 4968 4969 xhr[prop] = env[prop]; 4970 4971 } catch (e) {} 4972 } 4973 } 4974 4975 xhr.open(env.method.toUpperCase(), url); 4976 4977 for (var header in env.headers) { 4978 xhr.setRequestHeader(header, env.headers[header]); 4979 } 4980 4981 on(xhr, 'load', function () { 4982 4983 if (xhr.status === 0 || xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) { 4984 resolve(xhr); 4985 } else { 4986 reject(assign(Error(xhr.statusText), { 4987 xhr: xhr, 4988 status: xhr.status 4989 })); 4990 } 4991 4992 }); 4993 4994 on(xhr, 'error', function () { return reject(assign(Error('Network Error'), {xhr: xhr})); }); 4995 on(xhr, 'timeout', function () { return reject(assign(Error('Network Timeout'), {xhr: xhr})); }); 4996 4997 xhr.send(env.data); 4998 }); 4999} 5000 5001function getImage(src) { 5002 5003 return new Promise(function (resolve, reject) { 5004 var img = new Image(); 5005 5006 img.onerror = reject; 5007 img.onload = function () { return resolve(img); }; 5008 5009 img.src = src; 5010 }); 5011 5012} 5013 5014function isReady() { 5015 return document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll; 5016} 5017 5018function ready(fn) { 5019 5020 if (isReady()) { 5021 fn(); 5022 return; 5023 } 5024 5025 var handle = function () { 5026 unbind1(); 5027 unbind2(); 5028 fn(); 5029 }; 5030 var unbind1 = on(document, 'DOMContentLoaded', handle); 5031 var unbind2 = on(window, 'load', handle); 5032} 5033 5034function index(element, ref) { 5035 return ref 5036 ? toNodes(element).indexOf(toNode(ref)) 5037 : toNodes((element = toNode(element)) && element.parentNode.children).indexOf(element); 5038} 5039 5040function getIndex(i, elements, current, finite) { 5041 if ( current === void 0 ) current = 0; 5042 if ( finite === void 0 ) finite = false;
5043 5044 5045 elements = toNodes(elements); 5046 5047 var length = elements.length; 5048 5049 i = isNumeric(i) 5050 ? toNumber(i) 5051 : i === 'next' 5052 ? current + 1 5053 : i === 'previous' 5054 ? current - 1 5055 : index(elements, i); 5056 5057 if (finite) { 5058 return clamp(i, 0, length - 1); 5059 } 5060 5061 i %= length; 5062 5063 return i < 0 ? i + length : i; 5064} 5065 5066function empty(element) { 5067 element = toNode(element); 5068 element.innerHTML = ''; 5069 return element; 5070} 5071 5072function html(parent, html) { 5073 parent = toNode(parent); 5074 return isUndefined(html) 5075 ? parent.innerHTML 5076 : append(parent.hasChildNodes() ? empty(parent) : parent, html); 5077} 5078 5079function prepend(parent, element) { 5080 5081 parent = toNode(parent); 5082 5083 if (!parent.hasChildNodes()) { 5084 return append(parent, element); 5085 } else { 5086 return insertNodes(element, function (element) { return parent.insertBefore(element, parent.firstChild); }); 5087 } 5088} 5089 5090function append(parent, element) { 5091 parent = toNode(parent); 5092 return insertNodes(element, function (element) { return parent.appendChild(element); }); 5093} 5094 5095function before(ref, element) { 5096 ref = toNode(ref); 5097 return insertNodes(element, function (element) { return ref.parentNode.insertBefore(element, ref); }); 5098} 5099 5100function after(ref, element) { 5101 ref = toNode(ref); 5102 return insertNodes(element, function (element) { return ref.nextSibling 5103 ? before(ref.nextSibling, element) 5104 : append(ref.parentNode, element); } 5105 ); 5106} 5107 5108function insertNodes(element, fn) { 5109 element = isString(element) ? fragment(element) : element; 5110 return element 5111 ? 'length' in element 5112 ? toNodes(element).map(fn) 5113 : fn(element) 5114 : null; 5115} 5116 5117function remove(element) { 5118 toNodes(element).map(function (element) { return element.parentNode && element.parentNode.removeChild(element); }); 5119} 5120 5121function wrapAll(element, structure) { 5122 5123 structure = toNode(before(element, structure)); 5124 5125 while (structure.firstChild) { 5126 structure = structure.firstChild; 5127 } 5128 5129 append(structure, element); 5130 5131 return structure; 5132} 5133 5134function wrapInner(element, structure) { 5135 return toNodes(toNodes(element).map(function (element) { return element.hasChildNodes ? wrapAll(toNodes(element.childNodes), structure) : append(element, structure); } 5136 )); 5137} 5138 5139function unwrap(element) { 5140 toNodes(element) 5141 .map(function (element) { return element.parentNode; }) 5142 .filter(function (value, index, self) { return self.indexOf(value) === index; }) 5143 .forEach(function (parent) { 5144 before(parent, parent.childNodes); 5145 remove(parent); 5146 }); 5147} 5148 5149var fragmentRE = /^\s*<(\w+|!)[^>]*>/; 5150var singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>)?$/; 5151 5152function fragment(html) { 5153 5154 var matches = singleTagRE.exec(html); 5155 if (matches) { 5156 return document.createElement(matches[1]); 5157 } 5158 5159 var container = document.createElement('div'); 5160 if (fragmentRE.test(html)) { 5161 container.insertAdjacentHTML('beforeend', html.trim()); 5162 } else { 5163 container.textContent = html; 5164 } 5165 5166 return container.childNodes.length > 1 ? toNodes(container.childNodes) : container.firstChild; 5167 5168} 5169 5170function apply(node, fn) { 5171 5172 if (!node || node.nodeType !== 1) { 5173 return; 5174 } 5175 5176 fn(node); 5177 node = node.firstElementChild; 5178 while (node) { 5179 apply(node, fn); 5180 node = node.nextElementSibling; 5181 } 5182} 5183 5184function addClass(element) { 5185 var args = [], len = arguments.length - 1; 5186 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 5187 5188 apply$1(element, args, 'add'); 5189} 5190 5191function removeClass(element) { 5192 var args = [], len = arguments.length - 1; 5193 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 5194 5195 apply$1(element, args, 'remove'); 5196} 5197 5198function removeClasses(element, cls) { 5199 filterAttr(element, 'class', new RegExp(("(^|\\s)" + cls + "(?!\\S)"), 'g'), ''); 5200} 5201 5202function replaceClass(element) { 5203 var args = [], len = arguments.length - 1; 5204 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 5205 5206 args[0] && removeClass(element, args[0]);
5207 args[1] && addClass(element, args[1]); 5208} 5209 5210function hasClass(element, cls) { 5211 return toNodes(element).some(function (element) { return element.classList.contains(cls); }); 5212} 5213 5214function toggleClass(element) { 5215 var args = [], len = arguments.length - 1; 5216 while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; 5217 5218 5219 if (!args.length) { 5220 return; 5221 } 5222 5223 args = getArgs$1(args); 5224 5225 var force = !isString(args[args.length - 1]) ? args.pop() : []; // in iOS 9.3 force === undefined evaluates to false 5226 5227 args = args.filter(Boolean); 5228 5229 toNodes(element).forEach(function (ref) { 5230 var classList = ref.classList; 5231 5232 for (var i = 0; i < args.length; i++) { 5233 supports.Force 5234 ? classList.toggle.apply(classList, [args[i]].concat(force)) 5235 : (classList[(!isUndefined(force) ? force : !classList.contains(args[i])) ? 'add' : 'remove'](args[i])); 5236 } 5237 }); 5238 5239} 5240 5241function apply$1(element, args, fn) { 5242 args = getArgs$1(args).filter(Boolean); 5243 5244 args.length && toNodes(element).forEach(function (ref) { 5245 var classList = ref.classList; 5246 5247 supports.Multiple 5248 ? classList[fn].apply(classList, args) 5249 : args.forEach(function (cls) { return classList[fn](cls); }); 5250 }); 5251} 5252 5253function getArgs$1(args) { 5254 return args.reduce(function (args, arg) { return args.concat.call(args, isString(arg) && includes(arg, ' ') ? arg.trim().split(' ') : arg); } 5255 , []); 5256} 5257 5258var supports = {}; 5259 5260// IE 11 5261(function () { 5262 5263 var list = document.createElement('_').classList; 5264 if (list) { 5265 list.add('a', 'b'); 5266 list.toggle('c', false); 5267 supports.Multiple = list.contains('b'); 5268 supports.Force = !list.contains('c'); 5269 } 5270 list = null; 5271 5272})(); 5273 5274var cssNumber = { 5275 'animation-iteration-count': true, 5276 'column-count': true, 5277 'fill-opacity': true, 5278 'flex-grow': true, 5279 'flex-shrink': true, 5280 'font-weight': true, 5281 'line-height': true, 5282 'opacity': true, 5283 'order': true, 5284 'orphans': true, 5285 'widows': true, 5286 'z-index': true, 5287 'zoom': true 5288}; 5289 5290function css(element, property, value) { 5291 5292 return toNodes(element).map(function (element) { 5293 5294 if (isString(property)) { 5295 5296 property = propName(property); 5297 5298 if (isUndefined(value)) { 5299 return getStyle(element, property); 5300 } else if (!value && value !== 0) { 5301 element.style.removeProperty(property); 5302 } else { 5303 element.style[property] = isNumeric(value) && !cssNumber[property] ? (value + "px") : value; 5304 } 5305 5306 } else if (isArray(property)) { 5307 5308 var styles = getStyles(element); 5309 5310 return property.reduce(function (props, property) { 5311 props[property] = styles[propName(property)]; 5312 return props; 5313 }, {}); 5314 5315 } else if (isObject(property)) { 5316 each(property, function (value, property) { return css(element, property, value); }); 5317 } 5318 5319 return element; 5320 5321 })[0]; 5322 5323} 5324 5325function getStyles(element, pseudoElt) { 5326 element = toNode(element); 5327 return element.ownerDocument.defaultView.getComputedStyle(element, pseudoElt); 5328} 5329 5330function getStyle(element, property, pseudoElt) { 5331 return getStyles(element, pseudoElt)[property]; 5332} 5333 5334var vars = {}; 5335 5336function getCssVar(name) { 5337 5338 if (!(name in vars)) { 5339 5340 /* usage in css: .var-name:before { content:"xyz" } */ 5341 5342 var element = append(document.documentElement, document.createElement('div')); 5343 5344 addClass(element, ("var-" + name)); 5345 5346 try { 5347 5348 vars[name] = getStyle(element, 'content', ':before').replace(/^["'](.*)["']$/, '$1'); 5349 vars[name] = JSON.parse(vars[name]); 5350 5351 } catch (e) {} 5352 5353 document.documentElement.removeChild(element); 5354 5355 } 5356 5357 return vars[name]; 5358 5359} 5360 5361var cssProps = {}; 5362 5363function propName(name) { 5364 5365 var ret = cssProps[name]; 5366 if (!ret) { 5367 ret = cssProps[name] = vendorPropName(name) || name; 5368 } 5369 return ret; 5370} 5371 5372var cssPrefixes = ['webkit', 'moz', 'ms']; 5373var ref$1 = document.createElement('_'); 5374var style = ref$1.style; 5375 5376function vendorPropName(name) { 5377 5378 name = hyphenate(name); 5379 5380 if (name in style) { 5381 return name; 5382 } 5383 5384 var i = cssPrefixes.length, prefixedName; 5385 5386 while (i--) { 5387 prefixedName = "-" + (cssPrefixes[i]) + "-" + name; 5388 if (prefixedName in style) { 5389 return prefixedName; 5390 } 5391 } 5392} 5393 5394function transition(element, props, duration, timing) { 5395 if ( duration === void 0 ) duration = 400; 5396 if ( timing === void 0 ) timing = 'linear'; 5397 5398 5399 return Promise.all(toNodes(element).map(function (element) { return new Promise(function (resolve, reject) { 5400 5401 for (var name in props) { 5402 var value = css(element, name); 5403 if (value === '') { 5404 css(element, name, value); 5405 } 5406 } 5407 5408 var timer = setTimeout(function () { return trigger(element, 'transitionend'); }, duration); 5409 5410 once(element, 'transitionend transitioncanceled', function (ref) { 5411 var type = ref.type; 5412 5413 clearTimeout(timer); 5414 removeClass(element, 'uk-transition'); 5415 css(element, { 5416 'transition-property': '', 5417 'transition-duration': '', 5418 'transition-timing-function': '' 5419 }); 5420 type === 'transitioncanceled' ? reject() : resolve(); 5421 }, false, function (ref) { 5422 var target = ref.target; 5423 5424 return element === target; 5425 }); 5426 5427 addClass(element, 'uk-transition'); 5428 css(element, assign({ 5429 'transition-property': Object.keys(props).map(propName).join(','), 5430 'transition-duration': (duration + "ms"), 5431 'transition-timing-function': timing 5432 }, props)); 5433 5434 }); } 5435 )); 5436 5437} 5438 5439var Transition = { 5440 5441 start: transition, 5442 5443 stop: function stop(element) { 5444 trigger(element, 'transitionend'); 5445 return Promise.resolve(); 5446 }, 5447 5448 cancel: function cancel(element) { 5449 trigger(element, 'transitioncanceled'); 5450 }, 5451 5452 inProgress: function inProgress(element) { 5453 return hasClass(element, 'uk-transition'); 5454 } 5455 5456}; 5457 5458var animationPrefix = 'uk-animation-'; 5459var clsCancelAnimation = 'uk-cancel-animation'; 5460 5461function animate(element, animation, duration, origin, out) { 5462 var arguments$1 = arguments; 5463 if ( duration === void 0 ) duration = 200; 5464 5465 5466 return Promise.all(toNodes(element).map(function (element) { return new Promise(function (resolve, reject) { 5467 5468 if (hasClass(element, clsCancelAnimation)) { 5469 requestAnimationFrame(function () { return Promise.resolve().then(function () { return animate.apply(void 0, arguments$1).then(resolve, reject); } 5470 ); } 5471 ); 5472 return; 5473 } 5474 5475 var cls = animation + " " + animationPrefix + (out ? 'leave' : 'enter'); 5476 5477 if (startsWith(animation, animationPrefix)) { 5478 5479 if (origin) { 5480 cls += " uk-transform-origin-" + origin; 5481 } 5482 5483 if (out) { 5484 cls += " " + animationPrefix + "reverse"; 5485 } 5486 5487 } 5488 5489 reset(); 5490 5491 once(element, 'animationend animationcancel', function (ref) { 5492 var type = ref.type; 5493 5494 5495 var hasReset = false;
5496 5497 if (type === 'animationcancel') { 5498 reject(); 5499 reset(); 5500 } else { 5501 resolve(); 5502 Promise.resolve().then(function () { 5503 hasReset = true; 5504 reset(); 5505 }); 5506 } 5507 5508 requestAnimationFrame(function () { 5509 if (!hasReset) { 5510 addClass(element, clsCancelAnimation); 5511 5512 requestAnimationFrame(function () { return removeClass(element, clsCancelAnimation); }); 5513 } 5514 }); 5515 5516 }, false, function (ref) { 5517 var target = ref.target; 5518 5519 return element === target; 5520 }); 5521 5522 css(element, 'animationDuration', (duration + "ms")); 5523 addClass(element, cls); 5524 5525 function reset() { 5526 css(element, 'animationDuration', ''); 5527 removeClasses(element, (animationPrefix + "\\S*")); 5528 } 5529 5530 }); } 5531 )); 5532 5533} 5534 5535var inProgress = new RegExp((animationPrefix + "(enter|leave)")); 5536var Animation = { 5537 5538 in: function in$1(element, animation, duration, origin) { 5539 return animate(element, animation, duration, origin, false); 5540 }, 5541 5542 out: function out(element, animation, duration, origin) { 5543 return animate(element, animation, duration, origin, true); 5544 }, 5545 5546 inProgress: function inProgress$1(element) { 5547 return inProgress.test(attr(element, 'class')); 5548 }, 5549 5550 cancel: function cancel(element) { 5551 trigger(element, 'animationcancel'); 5552 } 5553 5554}; 5555 5556function $(selector, context) { 5557 return !isString(selector) 5558 ? toNode(selector) 5559 : isHtml(selector) 5560 ? toNode(fragment(selector)) 5561 : find(selector, context); 5562} 5563 5564function $$(selector, context) { 5565 return !isString(selector) 5566 ? toNodes(selector) 5567 : isHtml(selector) 5568 ? toNodes(fragment(selector)) 5569 : findAll(selector, context); 5570} 5571 5572function isHtml(str) { 5573 return str[0] === '<' || str.match(/^\s*</); 5574} 5575 5576var dirs = { 5577 width: ['x', 'left', 'right'], 5578 height: ['y', 'top', 'bottom'] 5579}; 5580 5581function positionAt(element, target, elAttach, targetAttach, elOffset, targetOffset, flip, boundary) { 5582 5583 elAttach = getPos(elAttach); 5584 targetAttach = getPos(targetAttach); 5585 5586 var flipped = {element: elAttach, target: targetAttach}; 5587 5588 if (!element || !target) { 5589 return flipped; 5590 } 5591 5592 var dim = getDimensions(element); 5593 var targetDim = getDimensions(target); 5594 var position = targetDim; 5595 5596 moveTo(position, elAttach, dim, -1); 5597 moveTo(position, targetAttach, targetDim, 1); 5598 5599 elOffset = getOffsets(elOffset, dim.width, dim.height); 5600 targetOffset = getOffsets(targetOffset, targetDim.width, targetDim.height); 5601 5602 elOffset['x'] += targetOffset['x']; 5603 elOffset['y'] += targetOffset['y']; 5604 5605 position.left += elOffset['x']; 5606 position.top += elOffset['y']; 5607 5608 boundary = getDimensions(boundary || window$1(element)); 5609 5610 if (flip) { 5611 each(dirs, function (ref, prop) { 5612 var dir = ref[0]; 5613 var align = ref[1]; 5614 var alignFlip = ref[2]; 5615 5616 5617 if (!(flip === true || includes(flip, dir))) { 5618 return; 5619 } 5620 5621 var elemOffset = elAttach[dir] === align 5622 ? -dim[prop] 5623 : elAttach[dir] === alignFlip 5624 ? dim[prop] 5625 : 0; 5626 5627 var targetOffset = targetAttach[dir] === align 5628 ? targetDim[prop] 5629 : targetAttach[dir] === alignFlip 5630 ? -targetDim[prop] 5631 : 0; 5632 5633 if (position[align] < boundary[align] || position[align] + dim[prop] > boundary[alignFlip]) { 5634 5635 var centerOffset = dim[prop] / 2; 5636 var centerTargetOffset = targetAttach[dir] === 'center' ? -targetDim[prop] / 2 : 0; 5637 5638 elAttach[dir] === 'center' && ( 5639 apply(centerOffset, centerTargetOffset) 5640 || apply(-centerOffset, -centerTargetOffset) 5641 ) || apply(elemOffset, targetOffset); 5642 5643 } 5644 5645 function apply(elemOffset, targetOffset) { 5646 5647 var newVal = position[align] + elemOffset + targetOffset - elOffset[dir] * 2; 5648 5649 if (newVal >= boundary[align] && newVal + dim[prop] <= boundary[alignFlip]) { 5650 position[align] = newVal; 5651 5652 ['element', 'target'].forEach(function (el) { 5653 flipped[el][dir] = !elemOffset 5654 ? flipped[el][dir] 5655 : flipped[el][dir] === dirs[prop][1] 5656 ? dirs[prop][2] 5657 : dirs[prop][1]; 5658 }); 5659 5660 return true; 5661 } 5662 5663 } 5664 5665 }); 5666 } 5667 5668 offset(element, position); 5669 5670 return flipped; 5671} 5672 5673function offset(element, coordinates) { 5674 5675 element = toNode(element); 5676 5677 if (coordinates) { 5678 5679 var currentOffset = offset(element); 5680 var pos = css(element, 'position'); 5681 5682 ['left', 'top'].forEach(function (prop) { 5683 if (prop in coordinates) { 5684 var value = css(element, prop); 5685 element.style[prop] = ((coordinates[prop] - currentOffset[prop]) 5686 + toFloat(pos === 'absolute' && value === 'auto' ? position(element)[prop] : value)) + "px"; 5687 } 5688 }); 5689 5690 return; 5691 } 5692 5693 return getDimensions(element); 5694} 5695 5696function getDimensions(element) { 5697 5698 element = toNode(element); 5699 5700 var ref = window$1(element); 5701 var top = ref.pageYOffset; 5702 var left = ref.pageXOffset; 5703 5704 if (isWindow(element)) { 5705
5706 var height = element.innerHeight; 5707 var width = element.innerWidth; 5708 5709 return { 5710 top: top, 5711 left: left, 5712 height: height, 5713 width: width, 5714 bottom: top + height, 5715 right: left + width, 5716 }; 5717 } 5718 5719 var display = false; 5720 if (!isVisible(element)) { 5721 display = element.style.display; 5722 element.style.display = 'block'; 5723 } 5724 5725 var rect = element.getBoundingClientRect(); 5726 5727 if (display !== false) { 5728 element.style.display = display; 5729 } 5730 5731 return { 5732 height: rect.height, 5733 width: rect.width, 5734 top: rect.top + top, 5735 left: rect.left + left, 5736 bottom: rect.bottom + top, 5737 right: rect.right + left, 5738 }; 5739} 5740 5741function position(element) { 5742 element = toNode(element); 5743 5744 var parent = offsetParent(element); 5745 var parentOffset = parent === docEl(element) ? {top: 0, left: 0} : offset(parent); 5746 var ref = ['top', 'left'].reduce(function (props, prop) { 5747 var propName$$1 = ucfirst(prop); 5748 props[prop] -= parentOffset[prop] 5749 + (toFloat(css(element, ("margin" + propName$$1))) || 0) 5750 + (toFloat(css(parent, ("border" + propName$$1 + "Width"))) || 0); 5751 return props; 5752 }, offset(element)); 5753 var top = ref.top; 5754 var left = ref.left; 5755 5756 return {top: top, left: left}; 5757} 5758 5759function offsetParent(element) { 5760 5761 var parent = toNode(element).offsetParent; 5762 5763 while (parent && css(parent, 'position') === 'static') { 5764 parent = parent.offsetParent; 5765 } 5766 5767 return parent || docEl(element); 5768} 5769 5770var height = dimension('height'); 5771var width = dimension('width'); 5772 5773function dimension(prop) { 5774 var propName$$1 = ucfirst(prop); 5775 return function (element, value) { 5776 5777 element = toNode(element); 5778 5779 if (isUndefined(value)) { 5780 5781 if (isWindow(element)) { 5782 return element[("inner" + propName$$1)]; 5783 } 5784 5785 if (isDocument(element)) { 5786 var doc = element.documentElement; 5787 return Math.max(doc[("offset" + propName$$1)], doc[("scroll" + propName$$1)]); 5788 } 5789 5790 value = css(element, prop); 5791 value = value === 'auto' ? element[("offset" + propName$$1)] : toFloat(value) || 0; 5792 5793 return value - boxModelAdjust(prop, element); 5794 5795 } else { 5796 5797 css(element, prop, !value && value !== 0 5798 ? '' 5799 : +value + boxModelAdjust(prop, element) + 'px' 5800 ); 5801 5802 } 5803 5804 }; 5805} 5806 5807function boxModelAdjust(prop, element) { 5808 return css(element, 'boxSizing') === 'border-box' 5809 ? dirs[prop].slice(1).map(ucfirst).reduce(function (value, prop) { return value 5810 + toFloat(css(element, ("padding" + prop))) 5811 + toFloat(css(element, ("border" + prop + "Width"))); } 5812 , 0) 5813 : 0; 5814} 5815 5816function moveTo(position, attach, dim, factor) { 5817 each(dirs, function (ref, prop) { 5818 var dir = ref[0]; 5819 var align = ref[1]; 5820 var alignFlip = ref[2]; 5821 5822 if (attach[dir] === alignFlip) { 5823 position[align] += dim[prop] * factor; 5824 } else if (attach[dir] === 'center') { 5825 position[align] += dim[prop] * factor / 2; 5826 } 5827 }); 5828} 5829 5830function getPos(pos) { 5831 5832 var x = /left|center|right/; 5833 var y = /top|center|bottom/; 5834 5835 pos = (pos || '').split(' '); 5836 5837 if (pos.length === 1) { 5838 pos = x.test(pos[0]) 5839 ? pos.concat(['center']) 5840 : y.test(pos[0]) 5841 ? ['center'].concat(pos) 5842 : ['center', 'center']; 5843 } 5844 5845 return { 5846 x: x.test(pos[0]) ? pos[0] : 'center', 5847 y: y.test(pos[1]) ? pos[1] : 'center' 5848 }; 5849} 5850 5851function getOffsets(offsets, width, height) { 5852 5853 var ref = (offsets || '').split(' '); 5854 var x = ref[0]; 5855 var y = ref[1]; 5856 5857 return { 5858 x: x ? toFloat(x) * (endsWith(x, '%') ? width / 100 : 1) : 0, 5859 y: y ? toFloat(y) * (endsWith(y, '%') ? height / 100 : 1) : 0 5860 }; 5861} 5862 5863function flipPosition(pos) { 5864 switch (pos) { 5865 case 'left': 5866 return 'right'; 5867 case 'right': 5868 return 'left'; 5869 case 'top': 5870 return 'bottom'; 5871 case 'bottom': 5872 return 'top'; 5873 default: 5874 return pos; 5875 } 5876} 5877 5878function isInView(element, top, left) { 5879 if ( top === void 0 ) top = 0; 5880 if ( left === void 0 ) left = 0; 5881 5882 5883 element = toNode(element); 5884 5885 var win = window$1(element); 5886 return isVisible(element) && intersectRect(element.getBoundingClientRect(), { 5887 top: top, 5888 left: left, 5889 bottom: top + height(win), 5890 right: left + width(win) 5891 }); 5892} 5893 5894function scrolledOver(element) { 5895 5896 if (!isVisible(element)) { 5897 return 0; 5898 } 5899 5900 element = toNode(element); 5901 5902 var win = window$1(element); 5903 var doc = document$1(element); 5904 var elHeight = element.offsetHeight; 5905 var top = positionTop(element); 5906 var vp = height(win); 5907 var vh = vp + Math.min(0, top - vp); 5908 var diff = Math.max(0, vp - (height(doc) - (top + elHeight))); 5909 5910 return clamp(((vh + win.pageYOffset - top) / ((vh + (elHeight - (diff < vp ? diff : 0))) / 100)) / 100); 5911} 5912 5913function positionTop(element) { 5914 var top = 0; 5915 5916 do { 5917 5918 top += element.offsetTop; 5919 5920 } while ((element = element.offsetParent)); 5921 5922 return top; 5923} 5924 5925function window$1(element) { 5926 return isWindow(element) ? element : document$1(element).defaultView; 5927} 5928 5929function document$1(element) { 5930 return toNode(element).ownerDocument; 5931} 5932 5933function docEl(element) { 5934 return document$1(element).documentElement; 5935} 5936
5937/* global DocumentTouch */ 5938var isRtl = attr(document.documentElement, 'dir') === 'rtl'; 5939 5940var hasTouchEvents = 'ontouchstart' in window; 5941var hasPointerEvents = window.PointerEvent; 5942var hasTouch = hasTouchEvents 5943 || window.DocumentTouch && document instanceof DocumentTouch 5944 || navigator.maxTouchPoints; // IE >=11 5945 5946var pointerDown = !hasTouch ? 'mousedown' : ("mousedown " + (hasTouchEvents ? 'touchstart' : 'pointerdown')); 5947var pointerMove = !hasTouch ? 'mousemove' : ("mousemove " + (hasTouchEvents ? 'touchmove' : 'pointermove')); 5948var pointerUp = !hasTouch ? 'mouseup' : ("mouseup " + (hasTouchEvents ? 'touchend' : 'pointerup')); 5949var pointerEnter = hasTouch && hasPointerEvents ? 'pointerenter' : 'mouseenter'; 5950var pointerLeave = hasTouch && hasPointerEvents ? 'pointerleave' : 'mouseleave'; 5951 5952/* 5953 Based on: 5954 Copyright (c) 2016 Wilson Page [email protected] 5955 https://github.com/wilsonpage/fastdom 5956*/ 5957 5958var fastdom = { 5959 5960 reads: [], 5961 writes: [], 5962 5963 read: function read(task) { 5964 this.reads.push(task); 5965 scheduleFlush(); 5966 return task; 5967 }, 5968 5969 write: function write(task) { 5970 this.writes.push(task); 5971 scheduleFlush(); 5972 return task; 5973 }, 5974 5975 clear: function clear(task) { 5976 return remove$1(this.reads, task) || remove$1(this.writes, task); 5977 }, 5978 5979 flush: function flush() { 5980 5981 runTasks(this.reads); 5982 runTasks(this.writes.splice(0, this.writes.length)); 5983 5984 this.scheduled = false; 5985 5986 if (this.reads.length || this.writes.length) { 5987 scheduleFlush(); 5988 } 5989 5990 } 5991 5992}; 5993 5994function scheduleFlush() { 5995 if (!fastdom.scheduled) { 5996 fastdom.scheduled = true; 5997 requestAnimationFrame(fastdom.flush.bind(fastdom)); 5998 } 5999} 6000 6001function runTasks(tasks) { 6002 var task; 6003 while ((task = tasks.shift())) { 6004 task(); 6005 } 6006} 6007 6008function remove$1(array, item) { 6009 var index = array.indexOf(item); 6010 return !!~index && !!array.splice(index, 1); 6011} 6012 6013function MouseTracker() {} 6014 6015MouseTracker.prototype = { 6016 6017 positions: [], 6018 position: null, 6019 6020 init: function init() { 6021 var this$1 = this; 6022 6023 6024 this.positions = []; 6025 this.position = null; 6026 6027 var ticking = false; 6028 this.unbind = on(document, 'mousemove', function (e) { 6029 6030 if (ticking) { 6031 return; 6032 } 6033 6034 setTimeout(function () { 6035 6036 var time = Date.now(); 6037 var ref = this$1.positions; 6038 var length = ref.length; 6039 6040 if (length && (time - this$1.positions[length - 1].time > 100)) { 6041 this$1.positions.splice(0, length); 6042 } 6043 6044 this$1.positions.push({time: time, x: e.pageX, y: e.pageY}); 6045 6046 if (this$1.positions.length > 5) { 6047 this$1.positions.shift(); 6048 } 6049 6050 ticking = false; 6051 }, 5); 6052 6053 ticking = true; 6054 }); 6055 6056 }, 6057 6058 cancel: function cancel() { 6059 if (this.unbind) { 6060 this.unbind(); 6061 } 6062 }, 6063 6064 movesTo: function movesTo(target) { 6065 6066 if (this.positions.length < 2) { 6067 return false; 6068 } 6069 6070 var p = offset(target); 6071 var position$$1 = this.positions[this.positions.length - 1]; 6072 var ref = this.positions; 6073 var prevPos = ref[0]; 6074 6075 if (p.left <= position$$1.x && position$$1.x <= p.right && p.top <= position$$1.y && position$$1.y <= p.bottom) { 6076 return false; 6077 } 6078 6079 var points = [ 6080 [{x: p.left, y: p.top}, {x: p.right, y: p.bottom}], 6081 [{x: p.right, y: p.top}, {x: p.left, y: p.bottom}] 6082 ]; 6083 6084 if (p.right <= position$$1.x) { 6085 // empty 6086 } else if (p.left >= position$$1.x) { 6087 points[0].reverse(); 6088 points[1].reverse(); 6089 } else if (p.bottom <= position$$1.y) { 6090 points[0].reverse(); 6091 } else if (p.top >= position$$1.y) { 6092 points[1].reverse(); 6093 } 6094 6095 return !!points.reduce(function (result, point) { 6096 return result + (slope(prevPos, point[0]) < slope(position$$1, point[0]) && slope(prevPos, point[1]) > slope(position$$1, point[1])); 6097 }, 0); 6098 } 6099 6100}; 6101 6102function slope(a, b) { 6103 return (b.y - a.y) / (b.x - a.x); 6104} 6105 6106var strats = {}; 6107 6108// concat strategy 6109strats.args = 6110strats.events = 6111strats.init = 6112strats.created = 6113strats.beforeConnect = 6114strats.connected = 6115strats.ready = 6116strats.beforeDisconnect = 6117strats.disconnected = 6118strats.destroy = function (parentVal, childVal) { 6119 6120 parentVal = parentVal && !isArray(parentVal) ? [parentVal] : parentVal;
6121 6122 return childVal 6123 ? parentVal 6124 ? parentVal.concat(childVal) 6125 : isArray(childVal) 6126 ? childVal 6127 : [childVal] 6128 : parentVal; 6129}; 6130 6131// update strategy 6132strats.update = function (parentVal, childVal) { 6133 return strats.args(parentVal, isFunction(childVal) ? {read: childVal} : childVal); 6134}; 6135 6136// property strategy 6137strats.props = function (parentVal, childVal) { 6138 6139 if (isArray(childVal)) { 6140 childVal = childVal.reduce(function (value, key) { 6141 value[key] = String; 6142 return value; 6143 }, {}); 6144 } 6145 6146 return strats.methods(parentVal, childVal); 6147}; 6148 6149// extend strategy 6150strats.computed = 6151strats.defaults = 6152strats.methods = function (parentVal, childVal) { 6153 return childVal 6154 ? parentVal 6155 ? assign({}, parentVal, childVal) 6156 : childVal 6157 : parentVal; 6158}; 6159 6160// default strategy 6161var defaultStrat = function (parentVal, childVal) { 6162 return isUndefined(childVal) ? parentVal : childVal; 6163}; 6164 6165function mergeOptions(parent, child) { 6166 6167 var options = {}; 6168 6169 if (child.mixins) { 6170 for (var i = 0, l = child.mixins.length; i < l; i++) { 6171 parent = mergeOptions(parent, child.mixins[i]); 6172 } 6173 } 6174 6175 for (var key in parent) { 6176 mergeKey(key); 6177 } 6178 6179 for (var key$1 in child) { 6180 if (!hasOwn(parent, key$1)) { 6181 mergeKey(key$1); 6182 } 6183 } 6184 6185 function mergeKey(key) { 6186 options[key] = (strats[key] || defaultStrat)(parent[key], child[key]); 6187 } 6188 6189 return options; 6190} 6191 6192var id = 0; 6193 6194var Player = function Player(el) { 6195 this.id = ++id; 6196 this.el = toNode(el); 6197}; 6198 6199Player.prototype.isVideo = function isVideo () { 6200 return this.isYoutube() || this.isVimeo() || this.isHTML5(); 6201}; 6202 6203Player.prototype.isHTML5 = function isHTML5 () { 6204 return this.el.tagName === 'VIDEO'; 6205}; 6206 6207Player.prototype.isIFrame = function isIFrame () { 6208 return this.el.tagName === 'IFRAME'; 6209}; 6210 6211Player.prototype.isYoutube = function isYoutube () { 6212 return this.isIFrame() && !!this.el.src.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/); 6213}; 6214 6215Player.prototype.isVimeo = function isVimeo () { 6216 return this.isIFrame() && !!this.el.src.match(/vimeo\.com\/video\/.*/); 6217}; 6218 6219Player.prototype.enableApi = function enableApi () { 6220 var this$1 = this; 6221 6222 6223 if (this.ready) { 6224 return this.ready; 6225 } 6226 6227 var youtube = this.isYoutube(); 6228 var vimeo = this.isVimeo(); 6229 6230 var poller; 6231 6232 if (youtube || vimeo) { 6233 6234 return this.ready = new Promise(function (resolve) { 6235 6236 once(this$1.el, 'load', function () { 6237 if (youtube) { 6238 var listener = function () { return post(this$1.el, {event: 'listening', id: this$1.id}); }; 6239 poller = setInterval(listener, 100); 6240 listener(); 6241 } 6242 }); 6243 6244 listen(function (data$$1) { return youtube && data$$1.id === this$1.id && data$$1.event === 'onReady' || vimeo && Number(data$$1.player_id) === this$1.id; }) 6245 .then(function () { 6246 resolve(); 6247 poller && clearInterval(poller); 6248 }); 6249 6250 attr(this$1.el, 'src', ("" + (this$1.el.src) + (includes(this$1.el.src, '?') ? '&' : '?') + (youtube ? 'enablejsapi=1' : ("api=1&player_id=" + (this$1.id))))); 6251 6252 }); 6253 6254 } 6255 6256 return Promise.resolve(); 6257 6258}; 6259 6260Player.prototype.play = function play () { 6261 var this$1 = this; 6262 6263 6264 if (!this.isVideo()) { 6265 return; 6266 } 6267 6268 if (this.isIFrame()) { 6269 this.enableApi().then(function () { return post(this$1.el, {func: 'playVideo', method: 'play'}); }); 6270 } else if (this.isHTML5()) { 6271 try { 6272 var promise = this.el.play(); 6273 if (promise) { 6274 promise.catch(noop); 6275 } 6276 } catch (e) {} 6277 } 6278}; 6279 6280Player.prototype.pause = function pause () { 6281 var this$1 = this; 6282 6283 6284 if (!this.isVideo()) { 6285 return; 6286 } 6287 6288 if (this.isIFrame()) { 6289 this.enableApi().then(function () { return post(this$1.el, {func: 'pauseVideo', method: 'pause'}); }); 6290 } else if (this.isHTML5()) { 6291 this.el.pause(); 6292 } 6293}; 6294 6295Player.prototype.mute = function mute () { 6296 var this$1 = this; 6297 6298 6299 if (!this.isVideo()) { 6300 return; 6301 } 6302 6303 if (this.isIFrame()) { 6304 this.enableApi().then(function () { return post(this$1.el, {func: 'mute', method: 'setVolume', value: 0}); }); 6305 } else if (this.isHTML5()) { 6306 this.el.muted = true; 6307 attr(this.el, 'muted', ''); 6308 } 6309 6310}; 6311 6312function post(el, cmd) { 6313 try { 6314 el.contentWindow.postMessage(JSON.stringify(assign({event: 'command'}, cmd)), '*'); 6315 } catch (e) {} 6316} 6317 6318function listen(cb) { 6319 6320 return new Promise(function (resolve) { 6321 6322 once(window, 'message', function (_, data$$1) { return resolve(data$$1); }, false, function (ref) { 6323 var data$$1 = ref.data; 6324 6325 6326 if (!data$$1 || !isString(data$$1)) { 6327 return; 6328 } 6329 6330 try { 6331 data$$1 = JSON.parse(data$$1); 6332 } catch (e) { 6333 return; 6334 } 6335 6336 return data$$1 && cb(data$$1); 6337 6338 }); 6339 6340 }); 6341 6342} 6343 6344/* 6345 Based on: 6346 Copyright (c) 2010-2016 Thomas Fuchs 6347 http://zeptojs.com/ 6348*/ 6349var touch = {}; 6350var clickTimeout; 6351var swipeTimeout; 6352var tapTimeout; 6353var clicked; 6354 6355function swipeDirection(ref) { 6356 var x1 = ref.x1; 6357 var x2 = ref.x2; 6358 var y1 = ref.y1; 6359 var y2 = ref.y2; 6360 6361 return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down'); 6362} 6363 6364function cancelAll() { 6365 clickTimeout && clearTimeout(clickTimeout); 6366 swipeTimeout && clearTimeout(swipeTimeout); 6367 tapTimeout && clearTimeout(tapTimeout); 6368 clickTimeout = swipeTimeout = tapTimeout = null; 6369 touch = {}; 6370} 6371 6372ready(function () { 6373 6374 on(document, 'click', function () { return clicked = true; }, true); 6375 6376 on(document, pointerDown, function (e) { 6377 6378 var target = e.target; 6379 var ref = getPos$1(e); 6380 var x = ref.x; 6381 var y = ref.y; 6382 var now = Date.now(); 6383 var type = getType(e.type); 6384 6385 if (touch.type && touch.type !== type) { 6386 return; 6387 } 6388 6389 touch.el = 'tagName' in target ? target : target.parentNode; 6390 6391 clickTimeout && clearTimeout(clickTimeout); 6392 6393 touch.x1 = x; 6394 touch.y1 = y; 6395 6396 if (touch.last && now - touch.last <= 250) { 6397 touch = {}; 6398 } 6399 6400 touch.type = type; 6401 touch.last = now; 6402 6403 clicked = e.button > 0; 6404 6405 }); 6406 6407 on(document, pointerMove, function (e) { 6408 6409 if (e.defaultPrevented) { 6410 return; 6411 } 6412 6413 var ref = getPos$1(e); 6414 var x = ref.x; 6415 var y = ref.y; 6416 6417 touch.x2 = x;
6418 touch.y2 = y; 6419 6420 }); 6421 6422 on(document, pointerUp, function (ref) { 6423 var type = ref.type; 6424 var target = ref.target; 6425 6426 6427 if (touch.type !== getType(type)) { 6428 return; 6429 } 6430 6431 // swipe 6432 if (touch.x2 && Math.abs(touch.x1 - touch.x2) > 30 || touch.y2 && Math.abs(touch.y1 - touch.y2) > 30) { 6433 6434 swipeTimeout = setTimeout(function () { 6435 if (touch.el) { 6436 trigger(touch.el, 'swipe'); 6437 trigger(touch.el, ("swipe" + (swipeDirection(touch)))); 6438 } 6439 touch = {}; 6440 }); 6441 6442 // normal tap 6443 } else if ('last' in touch) { 6444 6445 tapTimeout = setTimeout(function () { return trigger(touch.el, 'tap'); }); 6446 6447 // trigger single click after 350ms of inactivity 6448 if (touch.el && type !== 'mouseup' && within(target, touch.el)) { 6449 clickTimeout = setTimeout(function () { 6450 clickTimeout = null; 6451 if (touch.el && !clicked) { 6452 trigger(touch.el, 'click'); 6453 } 6454 touch = {}; 6455 }, 350); 6456 } 6457 6458 } else { 6459 touch = {}; 6460 } 6461 6462 }); 6463 6464 on(document, 'touchcancel', cancelAll); 6465 on(window, 'scroll', cancelAll); 6466 6467}); 6468 6469var touching = false; 6470on(document, 'touchstart', function () { return touching = true; }, true); 6471on(document, 'click', function () {touching = false;}); 6472on(document, 'touchcancel', function () { return touching = false; }, true); 6473 6474function isTouch(e) { 6475 return touching || e.pointerType === 'touch'; 6476} 6477 6478function getPos$1(e) { 6479 var touches = e.touches; 6480 var changedTouches = e.changedTouches; 6481 var ref = touches && touches[0] || changedTouches && changedTouches[0] || e; 6482 var x = ref.pageX; 6483 var y = ref.pageY; 6484 6485 return {x: x, y: y}; 6486} 6487 6488function getType(type) { 6489 return type.slice(0, 5); 6490} 6491 6492 6493 6494var util = Object.freeze({ 6495 ajax: ajax, 6496 getImage: getImage, 6497 transition: transition, 6498 Transition: Transition, 6499 animate: animate, 6500 Animation: Animation, 6501 attr: attr, 6502 hasAttr: hasAttr, 6503 removeAttr: removeAttr, 6504 filterAttr: filterAttr, 6505 data: data, 6506 addClass: addClass, 6507 removeClass: removeClass, 6508 removeClasses: removeClasses, 6509 replaceClass: replaceClass, 6510 hasClass: hasClass, 6511 toggleClass: toggleClass, 6512 $: $, 6513 $$: $$, 6514 positionAt: positionAt, 6515 offset: offset, 6516 position: position, 6517 height: height, 6518 width: width, 6519 flipPosition: flipPosition, 6520 isInView: isInView, 6521 scrolledOver: scrolledOver, 6522 isReady: isReady, 6523 ready: ready, 6524 index: index, 6525 getIndex: getIndex, 6526 empty: empty, 6527 html: html, 6528 prepend: prepend, 6529 append: append, 6530 before: before, 6531 after: after, 6532 remove: remove, 6533 wrapAll: wrapAll, 6534 wrapInner: wrapInner, 6535 unwrap: unwrap, 6536 fragment: fragment, 6537 apply: apply, 6538 isRtl: isRtl, 6539 hasTouch: hasTouch, 6540 pointerDown: pointerDown, 6541 pointerMove: pointerMove, 6542 pointerUp: pointerUp, 6543 pointerEnter: pointerEnter, 6544 pointerLeave: pointerLeave, 6545 on: on, 6546 off: off, 6547 once: once, 6548 trigger: trigger, 6549 createEvent: createEvent, 6550 toEventTargets: toEventTargets, 6551 preventClick: preventClick, 6552 fastdom: fastdom, 6553 isVoidElement: isVoidElement, 6554 isVisible: isVisible, 6555 selInput: selInput, 6556 isInput: isInput, 6557 filter: filter, 6558 within: within, 6559 bind: bind, 6560 hasOwn: hasOwn, 6561 hyphenate: hyphenate, 6562 camelize: camelize, 6563 ucfirst: ucfirst, 6564 startsWith: startsWith, 6565 endsWith: endsWith, 6566 includes: includes, 6567 isArray: isArray, 6568 isFunction: isFunction, 6569 isObject: isObject, 6570 isPlainObject: isPlainObject, 6571 isWindow: isWindow, 6572 isDocument: isDocument, 6573 isJQuery: isJQuery, 6574 isNode: isNode, 6575 isNodeCollection: isNodeCollection, 6576 isBoolean: isBoolean, 6577 isString: isString, 6578 isNumber: isNumber, 6579 isNumeric: isNumeric, 6580 isUndefined: isUndefined, 6581 toBoolean: toBoolean, 6582 toNumber: toNumber, 6583 toFloat: toFloat, 6584 toNode: toNode, 6585 toNodes: toNodes, 6586 toList: toList, 6587 toMs: toMs, 6588 swap: swap, 6589 assign: assign, 6590 each: each, 6591 sortBy: sortBy, 6592 clamp: clamp, 6593 noop: noop, 6594 intersectRect: intersectRect, 6595 pointInRect: pointInRect, 6596 Dimensions: Dimensions, 6597 MouseTracker: MouseTracker, 6598 mergeOptions: mergeOptions, 6599 Player: Player, 6600 Promise: Promise, 6601 Deferred: Deferred, 6602 query: query, 6603 queryAll: queryAll, 6604 find: find, 6605 findAll: findAll, 6606 matches: matches, 6607 closest: closest, 6608 parents: parents, 6609 escape: escape, 6610 css: css, 6611 getStyles: getStyles, 6612 getStyle: getStyle, 6613 getCssVar: getCssVar, 6614 propName: propName, 6615 isTouch: isTouch, 6616 getPos: getPos$1 6617}); 6618 6619function componentAPI (UIkit) { 6620 6621 var DATA = UIkit.data; 6622 6623 UIkit.components = {}; 6624 6625 UIkit.component = function (id, options) { 6626 6627 var name = camelize(id); 6628 6629 if (isPlainObject(options)) { 6630 options.name = name;
6631 options = UIkit.extend(options); 6632 } else if (isUndefined(options)) { 6633 return UIkit.components[name]; 6634 } else { 6635 options.options.name = name; 6636 } 6637 6638 UIkit.components[name] = options; 6639 6640 UIkit[name] = function (element, data) { 6641 var i = arguments.length, argsArray = Array(i); 6642 while ( i-- ) argsArray[i] = arguments[i]; 6643 6644 6645 if (isPlainObject(element)) { 6646 return new UIkit.components[name]({data: element}); 6647 } 6648 6649 if (UIkit.components[name].options.functional) { 6650 return new UIkit.components[name]({data: [].concat( argsArray )}); 6651 } 6652 6653 return element && element.nodeType ? init(element) : $$(element).map(init)[0]; 6654 6655 function init(element) { 6656 6657 var cmp = UIkit.getComponent(element, name); 6658 6659 if (cmp && data) { 6660 cmp.$reset(data); 6661 } 6662 6663 return cmp || new UIkit.components[name]({el: element, data: data || {}}); 6664 } 6665 6666 }; 6667 6668 if (UIkit._initialized && !options.options.functional) { 6669 fastdom.read(function () { return UIkit[name](("[uk-" + id + "],[data-uk-" + id + "]")); }); 6670 } 6671 6672 return UIkit.components[name]; 6673 }; 6674 6675 UIkit.getComponents = function (element) { return element && element[DATA] || {}; }; 6676 UIkit.getComponent = function (element, name) { return UIkit.getComponents(element)[name]; }; 6677 6678 UIkit.connect = function (node) { 6679 6680 if (node[DATA]) { 6681 for (var name in node[DATA]) { 6682 node[DATA][name]._callConnected(); 6683 } 6684 } 6685 6686 for (var i = 0; i < node.attributes.length; i++) { 6687 6688 var name$1 = getComponentName(node.attributes[i].name); 6689 6690 if (name$1 && name$1 in UIkit.components) { 6691 UIkit[name$1](node); 6692 } 6693 6694 } 6695 6696 }; 6697 6698 UIkit.disconnect = function (node) { 6699 for (var name in node[DATA]) { 6700 node[DATA][name]._callDisconnected(); 6701 } 6702 }; 6703 6704} 6705 6706function getComponentName(attribute) { 6707 return startsWith(attribute, 'uk-') || startsWith(attribute, 'data-uk-') 6708 ? camelize(attribute.replace('data-uk-', '').replace('uk-', '')) 6709 : false; 6710} 6711 6712function boot (UIkit) { 6713 6714 var connect = UIkit.connect; 6715 var disconnect = UIkit.disconnect; 6716 6717 if (!('MutationObserver' in window)) { 6718 return; 6719 } 6720 6721 if (document.body) { 6722 6723 init(); 6724 6725 } else { 6726 6727 (new MutationObserver(function () { 6728 6729 if (document.body) { 6730 this.disconnect(); 6731 init(); 6732 } 6733 6734 })).observe(document, {childList: true, subtree: true}); 6735 6736 } 6737 6738 function init() { 6739 6740 apply(document.body, connect); 6741 6742 fastdom.flush(); 6743 6744 (new MutationObserver(function (mutations) { return mutations.forEach(applyMutation); })).observe(document, { 6745 childList: true, 6746 subtree: true, 6747 characterData: true, 6748 attributes: true 6749 }); 6750 6751 UIkit._initialized = true; 6752 } 6753 6754 function applyMutation(mutation) { 6755 6756 var target = mutation.target; 6757 var type = mutation.type; 6758 6759 var update = type !== 'attributes' 6760 ? applyChildList(mutation) 6761 : applyAttribute(mutation); 6762 6763 update && UIkit.update(target); 6764 6765 } 6766 6767 function applyAttribute(ref) { 6768 var target = ref.target; 6769 var attributeName = ref.attributeName; 6770 6771 6772 if (attributeName === 'href') { 6773 return true; 6774 } 6775 6776 var name = getComponentName(attributeName); 6777 6778 if (!name || !(name in UIkit.components)) { 6779 return; 6780 } 6781 6782 if (hasAttr(target, attributeName)) { 6783 UIkit[name](target); 6784 return true; 6785 } 6786 6787 var component = UIkit.getComponent(target, name); 6788 6789 if (component) { 6790 component.$destroy(); 6791 return true; 6792 } 6793 6794 } 6795 6796 function applyChildList(ref) { 6797 var addedNodes = ref.addedNodes; 6798 var removedNodes = ref.removedNodes; 6799 6800 6801 for (var i = 0; i < addedNodes.length; i++) { 6802 apply(addedNodes[i], connect); 6803 } 6804 6805 for (var i$1 = 0; i$1 < removedNodes.length; i$1++) { 6806 apply(removedNodes[i$1], disconnect); 6807 } 6808 6809 return true; 6810 } 6811 6812 function apply(node, fn) { 6813 6814 if (node.nodeType !== 1 || hasAttr(node, 'uk-no-boot')) { 6815 return; 6816 } 6817 6818 fn(node); 6819 node = node.firstElementChild; 6820 while (node) { 6821 var next = node.nextElementSibling; 6822 apply(node, fn); 6823 node = next; 6824 } 6825 } 6826 6827} 6828 6829function globalAPI (UIkit) { 6830 6831 var DATA = UIkit.data; 6832 6833 UIkit.use = function (plugin) { 6834 6835 if (plugin.installed) { 6836 return; 6837 } 6838 6839 plugin.call(null, this); 6840 plugin.installed = true; 6841 6842 return this; 6843 }; 6844 6845 UIkit.mixin = function (mixin, component) { 6846 component = (isString(component) ? UIkit.components[component] : component) || this; 6847 mixin = mergeOptions({}, mixin); 6848 mixin.mixins = component.options.mixins; 6849 delete component.options.mixins; 6850 component.options = mergeOptions(mixin, component.options); 6851 }; 6852 6853 UIkit.extend = function (options) { 6854 6855 options = options || {}; 6856 6857 var Super = this; 6858 var Sub = function UIkitComponent (options) { 6859 this._init(options); 6860 }; 6861 6862 Sub.prototype = Object.create(Super.prototype); 6863 Sub.prototype.constructor = Sub; 6864 Sub.options = mergeOptions(Super.options, options); 6865 6866 Sub['super'] = Super; 6867 Sub.extend = Super.extend; 6868 6869 return Sub; 6870 }; 6871 6872 UIkit.update = function (element, e) { 6873 6874 e = createEvent(e || 'update'); 6875 element = element ? toNode(element) : document.body; 6876 6877 apply(element, function (element) { return update(element[DATA], e); }); 6878 6879 while (element && element.parentNode) { 6880 6881 update(element.parentNode[DATA], e); 6882 element = element.parentNode; 6883 6884 } 6885 6886 }; 6887 6888 var container; 6889 Object.defineProperty(UIkit, 'container', { 6890 6891 get: function get() { 6892 return container || document.body; 6893 }, 6894 6895 set: function set(element) { 6896 container = $(element); 6897 } 6898 6899 }); 6900 6901 function update(data, e) { 6902 6903 if (!data) { 6904 return; 6905 } 6906 6907 for (var name in data) { 6908 if (data[name]._isReady) { 6909 data[name]._callUpdate(e); 6910 } 6911 } 6912 6913 } 6914 6915} 6916 6917function hooksAPI (UIkit) { 6918 6919 UIkit.prototype._callHook = function (hook) { 6920 var this$1 = this; 6921 6922 6923 var handlers = this.$options[hook]; 6924 6925 if (handlers) {
6926 handlers.forEach(function (handler) { return handler.call(this$1); }); 6927 } 6928 }; 6929 6930 UIkit.prototype._callConnected = function () { 6931 var this$1 = this; 6932 6933 6934 if (this._connected) { 6935 return; 6936 } 6937 6938 this._data = {}; 6939 6940 this._callHook('beforeConnect'); 6941 this._connected = true; 6942 6943 this._initEvents(); 6944 this._initObserver(); 6945 6946 this._callHook('connected'); 6947 6948 if (!this._isReady) { 6949 ready(function () { return this$1._callReady(); }); 6950 } 6951 6952 this._callUpdate(); 6953 }; 6954 6955 UIkit.prototype._callDisconnected = function () { 6956 6957 if (!this._connected) { 6958 return; 6959 } 6960 6961 this._callHook('beforeDisconnect'); 6962 6963 if (this._observer) { 6964 this._observer.disconnect(); 6965 this._observer = null; 6966 } 6967 6968 this._unbindEvents(); 6969 this._callHook('disconnected'); 6970 6971 this._connected = false; 6972 6973 }; 6974 6975 UIkit.prototype._callReady = function () { 6976 6977 if (this._isReady) { 6978 return; 6979 } 6980 6981 this._isReady = true; 6982 this._callHook('ready'); 6983 this._resetComputeds(); 6984 this._callUpdate(); 6985 }; 6986 6987 UIkit.prototype._callUpdate = function (e) { 6988 var this$1 = this; 6989 6990 6991 e = createEvent(e || 'update'); 6992 6993 var type = e.type; 6994 6995 if (includes(['update', 'load', 'resize'], type)) { 6996 this._resetComputeds(); 6997 } 6998 6999 var updates = this.$options.update; 7000 var ref = this._frames; 7001 var reads = ref.reads; 7002 var writes = ref.writes; 7003 7004 if (!updates) { 7005 return; 7006 } 7007 7008 updates.forEach(function (ref, i) { 7009 var read = ref.read; 7010 var write = ref.write; 7011 var events = ref.events; 7012 7013 7014 if (type !== 'update' && !includes(events, type)) { 7015 return; 7016 } 7017 7018 if (read && !includes(fastdom.reads, reads[i])) { 7019 reads[i] = fastdom.read(function () { 7020 7021 var result = read.call(this$1, this$1._data, e); 7022 7023 if (result === false && write) { 7024 fastdom.clear(writes[i]); 7025 delete writes[i]; 7026 } else if (isPlainObject(result)) { 7027 assign(this$1._data, result); 7028 } 7029 delete reads[i]; 7030 }); 7031 } 7032 7033 if (write && !includes(fastdom.writes, writes[i])) { 7034 writes[i] = fastdom.write(function () { 7035 write.call(this$1, this$1._data, e); 7036 delete writes[i]; 7037 }); 7038 } 7039 7040 }); 7041 7042 }; 7043 7044} 7045 7046function stateAPI (UIkit) { 7047 7048 var uid = 0; 7049 7050 UIkit.prototype.props = {}; 7051 7052 UIkit.prototype._init = function (options) { 7053 7054 options = options || {}; 7055 options = this.$options = mergeOptions(this.constructor.options, options, this); 7056 7057 this.$el = null; 7058 this.$name = UIkit.prefix + hyphenate(this.$options.name); 7059 this.$props = {}; 7060 7061 this._frames = {reads: {}, writes: {}}; 7062 this._events = []; 7063 7064 this._uid = uid++; 7065 this._initData(); 7066 this._initMethods(); 7067 this._initComputeds(); 7068 this._callHook('created'); 7069 7070 if (options.el) { 7071 this.$mount(options.el); 7072 } 7073 }; 7074 7075 UIkit.prototype._initData = function () { 7076 var this$1 = this; 7077 7078 7079 var ref = this.$options; 7080 var defaults = ref.defaults; 7081 var data$$1 = ref.data; if ( data$$1 === void 0 ) data$$1 = {}; 7082 var args = ref.args; if ( args === void 0 ) args = []; 7083 var props = ref.props; if ( props === void 0 ) props = {}; 7084 var el = ref.el; 7085 7086 if (args.length && isArray(data$$1)) { 7087 data$$1 = data$$1.slice(0, args.length).reduce(function (data$$1, value, index) { 7088 if (isPlainObject(value)) { 7089 assign(data$$1, value); 7090 } else { 7091 data$$1[args[index]] = value; 7092 } 7093 return data$$1; 7094 }, {}); 7095 } 7096 7097 for (var key in assign({}, defaults, props)) { 7098 this$1.$props[key] = this$1[key] = hasOwn(data$$1, key) && !isUndefined(data$$1[key]) 7099 ? coerce(props[key], data$$1[key], el) 7100 : defaults 7101 ? defaults[key] && isArray(defaults[key]) 7102 ? defaults[key].concat() 7103 : defaults[key] 7104 : null; 7105 } 7106 }; 7107 7108 UIkit.prototype._initMethods = function () { 7109 var this$1 = this; 7110 7111 7112 var ref = this.$options; 7113 var methods = ref.methods; 7114 7115 if (methods) { 7116 for (var key in methods) { 7117 this$1[key] = bind(methods[key], this$1); 7118 } 7119 } 7120 }; 7121 7122 UIkit.prototype._initComputeds = function () { 7123 var this$1 = this; 7124 7125 7126 var ref = this.$options; 7127 var computed = ref.computed; 7128 7129 this._resetComputeds(); 7130 7131 if (computed) { 7132 for (var key in computed) { 7133 registerComputed(this$1, key, computed[key]); 7134 } 7135 } 7136 }; 7137 7138 UIkit.prototype._resetComputeds = function () { 7139 this._computeds = {}; 7140 }; 7141 7142 UIkit.prototype._initProps = function (props) { 7143 var this$1 = this; 7144 7145 7146 var key; 7147 7148 this._resetComputeds(); 7149 7150 props = props || getProps(this.$options, this.$name); 7151 7152 for (key in props) { 7153 if (!isUndefined(props[key])) { 7154 this$1.$props[key] = props[key]; 7155 } 7156 } 7157 7158 var exclude = [this.$options.computed, this.$options.methods]; 7159 for (key in this$1.$props) { 7160 if (key in props && notIn(exclude, key)) { 7161 this$1[key] = this$1.$props[key]; 7162 } 7163 } 7164 }; 7165 7166 UIkit.prototype._initEvents = function () { 7167 var this$1 = this; 7168 7169 7170 var ref = this.$options; 7171 var events = ref.events; 7172 7173 if (events) { 7174
7175 events.forEach(function (event) { 7176 7177 if (!hasOwn(event, 'handler')) { 7178 for (var key in event) { 7179 registerEvent(this$1, event[key], key); 7180 } 7181 } else { 7182 registerEvent(this$1, event); 7183 } 7184 7185 }); 7186 } 7187 }; 7188 7189 UIkit.prototype._unbindEvents = function () { 7190 this._events.forEach(function (unbind) { return unbind(); }); 7191 this._events = []; 7192 }; 7193 7194 UIkit.prototype._initObserver = function () { 7195 var this$1 = this; 7196 7197 7198 var ref = this.$options; 7199 var attrs = ref.attrs; 7200 var props = ref.props; 7201 var el = ref.el; 7202 if (this._observer || !props || !attrs) { 7203 return; 7204 } 7205 7206 attrs = isArray(attrs) ? attrs : Object.keys(props).map(function (key) { return hyphenate(key); }); 7207 7208 this._observer = new MutationObserver(function () { 7209 7210 var data$$1 = getProps(this$1.$options, this$1.$name); 7211 if (attrs.some(function (key) { return !isUndefined(data$$1[key]) && data$$1[key] !== this$1.$props[key]; })) { 7212 this$1.$reset(data$$1); 7213 } 7214 7215 }); 7216 7217 this._observer.observe(el, {attributes: true, attributeFilter: attrs.concat([this.$name, ("data-" + (this.$name))])}); 7218 }; 7219 7220 function getProps(opts, name) { 7221 7222 var data$$1 = {}; 7223 var args = opts.args; if ( args === void 0 ) args = []; 7224 var props = opts.props; if ( props === void 0 ) props = {}; 7225 var el = opts.el; 7226 7227 if (!props) { 7228 return data$$1; 7229 } 7230 7231 for (var key in props) { 7232 var prop = hyphenate(key); 7233 if (hasAttr(el, prop)) { 7234 7235 var value = coerce(props[key], attr(el, prop), el); 7236 7237 if (prop === 'target' && (!value || startsWith(value, '_'))) { 7238 continue; 7239 } 7240 7241 data$$1[key] = value; 7242 } 7243 } 7244 7245 var options = parseOptions(data(el, name), args); 7246 7247 for (var key$1 in options) { 7248 var prop$1 = camelize(key$1); 7249 if (props[prop$1] !== undefined) { 7250 data$$1[prop$1] = coerce(props[prop$1], options[key$1], el); 7251 } 7252 } 7253 7254 return data$$1; 7255 } 7256 7257 function parseOptions(options, args) { 7258 var obj; 7259 7260 if ( args === void 0 ) args = []; 7261 7262 try { 7263 7264 return !options 7265 ? {} 7266 : startsWith(options, '{') 7267 ? JSON.parse(options) 7268 : args.length && !includes(options, ':') 7269 ? (( obj = {}, obj[args[0]] = options, obj)) 7270 : options.split(';').reduce(function (options, option) { 7271 var ref = option.split(/:(.+)/); 7272 var key = ref[0]; 7273 var value = ref[1]; 7274 if (key && value) { 7275 options[key.trim()] = value.trim(); 7276 } 7277 return options; 7278 }, {}); 7279 7280 } catch (e) { 7281 return {}; 7282 } 7283 7284 } 7285 7286 function registerComputed(component, key, cb) { 7287 Object.defineProperty(component, key, { 7288 7289 enumerable: true, 7290 7291 get: function get() { 7292 7293 var _computeds = component._computeds; 7294 var $props = component.$props; 7295 var $el = component.$el; 7296 7297 if (!hasOwn(_computeds, key)) { 7298 _computeds[key] = cb.call(component, $props, $el); 7299 } 7300 7301 return _computeds[key]; 7302 }, 7303 7304 set: function set(value) { 7305 component._computeds[key] = value; 7306 } 7307 7308 }); 7309 } 7310 7311 function registerEvent(component, event, key) { 7312 7313 if (!isPlainObject(event)) { 7314 event = ({name: key, handler: event}); 7315 } 7316 7317 var name = event.name; 7318 var el = event.el; 7319 var handler = event.handler; 7320 var capture = event.capture; 7321 var delegate = event.delegate; 7322 var filter = event.filter; 7323 var self = event.self; 7324 el = isFunction(el) 7325 ? el.call(component) 7326 : el || component.$el; 7327 7328 if (isArray(el)) { 7329 el.forEach(function (el) { return registerEvent(component, assign({}, event, {el: el}), key); }); 7330 return; 7331 } 7332 7333 if (!el || filter && !filter.call(component)) { 7334 return; 7335 } 7336 7337 handler = detail(isString(handler) ? component[handler] : bind(handler, component)); 7338 7339 if (self) { 7340 handler = selfFilter(handler); 7341 } 7342 7343 component._events.push( 7344 on( 7345 el, 7346 name, 7347 !delegate 7348 ? null 7349 : isString(delegate) 7350 ? delegate 7351 : delegate.call(component), 7352 handler, 7353 capture 7354 ) 7355 ); 7356 7357 } 7358 7359 function selfFilter(handler) { 7360 return function selfHandler(e) { 7361 if (e.target === e.currentTarget || e.target === e.current) { 7362 return handler.call(null, e); 7363 } 7364 }; 7365 } 7366 7367 function notIn(options, key) { 7368 return options.every(function (arr) { return !arr || !hasOwn(arr, key); }); 7369 } 7370 7371 function detail(listener) { 7372 return function (e) { return isArray(e.detail) ? listener.apply(void 0, [e].concat(e.detail)) : listener(e); }; 7373 } 7374 7375 function coerce(type, value, context) { 7376 7377 if (type === Boolean) { 7378 return toBoolean(value); 7379 } else if (type === Number) { 7380 return toNumber(value); 7381 } else if (type === 'query') { 7382 return query(value, context); 7383 } else if (type === 'list') { 7384 return toList(value); 7385 } else if (type === 'media') { 7386 return toMedia(value); 7387 } 7388 7389 return type ? type(value) : value; 7390 } 7391 7392 function toMedia(value) { 7393 7394 if (isString(value)) { 7395 if (value[0] === '@') { 7396 var name = "media-" + (value.substr(1)); 7397 value = toFloat(getCssVar(name)); 7398 } else if (isNaN(value)) { 7399 return value; 7400 } 7401 } 7402 7403 return value && !isNaN(value) ? ("(min-width: " + value + "px)") : false;
7404 } 7405 7406} 7407 7408function instanceAPI (UIkit) { 7409 7410 var DATA = UIkit.data; 7411 7412 UIkit.prototype.$mount = function (el) { 7413 7414 var ref = this.$options; 7415 var name = ref.name; 7416 7417 if (!el[DATA]) { 7418 el[DATA] = {}; 7419 } 7420 7421 if (el[DATA][name]) { 7422 return; 7423 } 7424 7425 el[DATA][name] = this; 7426 7427 this.$el = this.$options.el = this.$options.el || el; 7428 7429 this._initProps(); 7430 7431 this._callHook('init'); 7432 7433 if (within(el, document)) { 7434 this._callConnected(); 7435 } 7436 }; 7437 7438 UIkit.prototype.$emit = function (e) { 7439 this._callUpdate(e); 7440 }; 7441 7442 UIkit.prototype.$reset = function (data) { 7443 this._callDisconnected(); 7444 this._initProps(data); 7445 this._callConnected(); 7446 }; 7447 7448 UIkit.prototype.$destroy = function (removeEl) { 7449 if ( removeEl === void 0 ) removeEl = false; 7450 7451 7452 var ref = this.$options; 7453 var el = ref.el; 7454 var name = ref.name; 7455 7456 if (el) { 7457 this._callDisconnected(); 7458 } 7459 7460 this._callHook('destroy'); 7461 7462 if (!el || !el[DATA]) { 7463 return; 7464 } 7465 7466 delete el[DATA][name]; 7467 7468 if (!Object.keys(el[DATA]).length) { 7469 delete el[DATA]; 7470 } 7471 7472 if (removeEl) { 7473 remove(this.$el); 7474 } 7475 }; 7476 7477} 7478 7479var UIkit$2 = function (options) { 7480 this._init(options); 7481}; 7482 7483UIkit$2.util = util; 7484UIkit$2.data = '__uikit__'; 7485UIkit$2.prefix = 'uk-'; 7486UIkit$2.options = {}; 7487 7488globalAPI(UIkit$2); 7489hooksAPI(UIkit$2); 7490stateAPI(UIkit$2); 7491instanceAPI(UIkit$2); 7492componentAPI(UIkit$2); 7493 7494var Class = { 7495 7496 init: function init() { 7497 addClass(this.$el, this.$name); 7498 } 7499 7500}; 7501 7502var Container = { 7503 7504 props: { 7505 container: Boolean 7506 }, 7507 7508 defaults: { 7509 container: true 7510 }, 7511 7512 computed: { 7513 7514 container: function container(ref) { 7515 var container = ref.container; 7516 7517 return container === true && UIkit$2.container || container && $(container); 7518 } 7519 7520 } 7521 7522}; 7523 7524var Togglable = { 7525 7526 props: { 7527 cls: Boolean, 7528 animation: 'list', 7529 duration: Number, 7530 origin: String, 7531 transition: String, 7532 queued: Boolean 7533 }, 7534 7535 defaults: { 7536 cls: false, 7537 animation: [false], 7538 duration: 200, 7539 origin: false, 7540 transition: 'linear', 7541 queued: false, 7542 7543 initProps: { 7544 overflow: '', 7545 height: '', 7546 paddingTop: '', 7547 paddingBottom: '', 7548 marginTop: '', 7549 marginBottom: '' 7550 }, 7551 7552 hideProps: { 7553 overflow: 'hidden', 7554 height: 0, 7555 paddingTop: 0, 7556 paddingBottom: 0, 7557 marginTop: 0, 7558 marginBottom: 0 7559 } 7560 7561 }, 7562 7563 computed: { 7564 7565 hasAnimation: function hasAnimation(ref) { 7566 var animation = ref.animation; 7567 7568 return !!animation[0]; 7569 }, 7570 7571 hasTransition: function hasTransition(ref) { 7572 var animation = ref.animation; 7573 7574 return this.hasAnimation && animation[0] === true; 7575 } 7576 7577 }, 7578 7579 methods: { 7580 7581 toggleElement: function toggleElement(targets, show, animate) { 7582 var this$1 = this; 7583 7584 return new Promise(function (resolve) { 7585 7586 targets = toNodes(targets); 7587 7588 var all = function (targets) { return Promise.all(targets.map(function (el) { return this$1._toggleElement(el, show, animate); })); }; 7589 var toggled = targets.filter(function (el) { return this$1.isToggled(el); }); 7590 var untoggled = targets.filter(function (el) { return !includes(toggled, el); }); 7591 7592 var p; 7593 7594 if (!this$1.queued || !isUndefined(animate) || !isUndefined(show) || !this$1.hasAnimation || targets.length < 2) { 7595 7596 p = all(untoggled.concat(toggled)); 7597 7598 } else { 7599 7600 var body = document.body; 7601 var scroll = body.scrollTop; 7602 var el = toggled[0]; 7603 var inProgress = Animation.inProgress(el) && hasClass(el, 'uk-animation-leave') 7604 || Transition.inProgress(el) && el.style.height === '0px'; 7605 7606 p = all(toggled); 7607 7608 if (!inProgress) { 7609 p = p.then(function () { 7610 var p = all(untoggled); 7611 body.scrollTop = scroll; 7612 return p; 7613 }); 7614 } 7615 7616 } 7617 7618 p.then(resolve, noop); 7619 7620 }); 7621 }, 7622 7623 toggleNow: function toggleNow(targets, show) { 7624 var this$1 = this; 7625 7626 return new Promise(function (resolve) { return Promise.all(toNodes(targets).map(function (el) { return this$1._toggleElement(el, show, false); })).then(resolve, noop); }); 7627 }, 7628 7629 isToggled: function isToggled(el) { 7630 var nodes = toNodes(el || this.$el); 7631 return this.cls 7632 ? hasClass(nodes, this.cls.split(' ')[0]) 7633 : !hasAttr(nodes, 'hidden'); 7634 }, 7635 7636 updateAria: function updateAria(el) { 7637 if (this.cls === false) { 7638 attr(el, 'aria-hidden', !this.isToggled(el)); 7639 } 7640 }, 7641 7642 _toggleElement: function _toggleElement(el, show, animate) { 7643 var this$1 = this; 7644 7645 7646 show = isBoolean(show) 7647 ? show 7648 : Animation.inProgress(el) 7649 ? hasClass(el, 'uk-animation-leave') 7650 : Transition.inProgress(el) 7651 ? el.style.height === '0px' 7652 : !this.isToggled(el); 7653 7654 if (!trigger(el, ("before" + (show ? 'show' : 'hide')), [this])) { 7655 return Promise.reject(); 7656 } 7657 7658 var promise = (animate === false || !this.hasAnimation 7659 ? this._toggleImmediate 7660 : this.hasTransition 7661 ? this._toggleHeight 7662 : this._toggleAnimation 7663 )(el, show); 7664 7665 trigger(el, show ? 'show' : 'hide', [this]); 7666 7667 return promise.then(function () { 7668 trigger(el, show ? 'shown' : 'hidden', [this$1]); 7669 trigger(el, 'resize'); 7670 }); 7671 }, 7672 7673 _toggle: function _toggle(el, toggled) { 7674 7675 if (!el) { 7676 return; 7677 } 7678 7679 var changed; 7680 if (this.cls) { 7681 changed = includes(this.cls, ' ') || Boolean(toggled) !== hasClass(el, this.cls); 7682 changed && toggleClass(el, this.cls, includes(this.cls, ' ') ? undefined : toggled); 7683 } else { 7684 changed = Boolean(toggled) === hasAttr(el, 'hidden'); 7685 changed && attr(el, 'hidden', !toggled ? '' : null); 7686 } 7687 7688 $$('[autofocus]', el).some(function (el) { return isVisible(el) && (el.focus() || true); }); 7689 7690 this.updateAria(el); 7691 changed && trigger(el, 'resize'); 7692 }, 7693 7694 _toggleImmediate: function _toggleImmediate(el, show) { 7695 this._toggle(el, show); 7696 return Promise.resolve(); 7697 }, 7698 7699 _toggleHeight: function _toggleHeight(el, show) { 7700 var this$1 = this; 7701 7702 7703 var inProgress = Transition.inProgress(el);
7704 var inner = el.hasChildNodes ? toFloat(css(el.firstElementChild, 'marginTop')) + toFloat(css(el.lastElementChild, 'marginBottom')) : 0; 7705 var currentHeight = isVisible(el) ? height(el) + (inProgress ? 0 : inner) : 0; 7706 7707 Transition.cancel(el); 7708 7709 if (!this.isToggled(el)) { 7710 this._toggle(el, true); 7711 } 7712 7713 height(el, ''); 7714 7715 // Update child components first 7716 fastdom.flush(); 7717 7718 var endHeight = height(el) + (inProgress ? 0 : inner); 7719 height(el, currentHeight); 7720 7721 return (show 7722 ? Transition.start(el, assign({}, this.initProps, {overflow: 'hidden', height: endHeight}), Math.round(this.duration * (1 - currentHeight / endHeight)), this.transition) 7723 : Transition.start(el, this.hideProps, Math.round(this.duration * (currentHeight / endHeight)), this.transition).then(function () { return this$1._toggle(el, false); }) 7724 ).then(function () { return css(el, this$1.initProps); }); 7725 7726 }, 7727 7728 _toggleAnimation: function _toggleAnimation(el, show) { 7729 var this$1 = this; 7730 7731 7732 Animation.cancel(el); 7733 7734 if (show) { 7735 this._toggle(el, true); 7736 return Animation.in(el, this.animation[0], this.duration, this.origin); 7737 } 7738 7739 return Animation.out(el, this.animation[1] || this.animation[0], this.duration, this.origin).then(function () { return this$1._toggle(el, false); }); 7740 } 7741 7742 } 7743 7744}; 7745 7746var active; 7747 7748var Modal = { 7749 7750 mixins: [Class, Container, Togglable], 7751 7752 props: { 7753 selPanel: String, 7754 selClose: String, 7755 escClose: Boolean, 7756 bgClose: Boolean, 7757 stack: Boolean 7758 }, 7759 7760 defaults: { 7761 cls: 'uk-open', 7762 escClose: true, 7763 bgClose: true, 7764 overlay: true, 7765 stack: false 7766 }, 7767 7768 computed: { 7769 7770 panel: function panel(ref, $el) { 7771 var selPanel = ref.selPanel; 7772 7773 return $(selPanel, $el); 7774 }, 7775 7776 transitionElement: function transitionElement() { 7777 return this.panel; 7778 }, 7779 7780 transitionDuration: function transitionDuration() { 7781 return toMs(css(this.transitionElement, 'transitionDuration')); 7782 } 7783 7784 }, 7785 7786 events: [ 7787 7788 { 7789 7790 name: 'click', 7791 7792 delegate: function delegate() { 7793 return this.selClose; 7794 }, 7795 7796 handler: function handler(e) { 7797 e.preventDefault(); 7798 this.hide(); 7799 } 7800 7801 }, 7802 7803 { 7804 7805 name: 'toggle', 7806 7807 self: true, 7808 7809 handler: function handler(e) { 7810 7811 if (e.defaultPrevented) { 7812 return; 7813 } 7814 7815 e.preventDefault(); 7816 this.toggle(); 7817 } 7818 7819 }, 7820 7821 { 7822 name: 'beforeshow', 7823 7824 self: true, 7825 7826 handler: function handler(e) { 7827 7828 var prev = active && active !== this && active; 7829 7830 active = this; 7831 7832 if (prev) { 7833 if (this.stack) { 7834 this.prev = prev; 7835 } else { 7836 prev.hide().then(this.show); 7837 e.preventDefault(); 7838 return; 7839 } 7840 } 7841 7842 registerEvents(); 7843 7844 } 7845 7846 }, 7847 7848 { 7849 name: 'beforehide', 7850 7851 self: true, 7852 7853 handler: function handler() { 7854 7855 active = active && active !== this && active || this.prev; 7856 7857 if (!active) { 7858 deregisterEvents(); 7859 } 7860 7861 } 7862 7863 }, 7864 7865 { 7866 7867 name: 'show', 7868 7869 self: true, 7870 7871 handler: function handler() { 7872 7873 if (!hasClass(document.documentElement, this.clsPage)) { 7874 this.scrollbarWidth = width(window) - width(document); 7875 css(document.body, 'overflowY', this.scrollbarWidth && this.overlay ? 'scroll' : ''); 7876 } 7877 7878 addClass(document.documentElement, this.clsPage); 7879 7880 } 7881 7882 }, 7883 7884 { 7885 7886 name: 'hidden', 7887 7888 self: true, 7889 7890 handler: function handler() { 7891 var this$1 = this; 7892 7893 7894 var found; 7895 var ref = this; 7896 var prev = ref.prev; 7897 7898 while (prev) { 7899 7900 if (prev.clsPage === this$1.clsPage) { 7901 found = true; 7902 break; 7903 } 7904 7905 prev = prev.prev; 7906 7907 } 7908 7909 if (!found) { 7910 removeClass(document.documentElement, this.clsPage); 7911 7912 } 7913 7914 !this.prev && css(document.body, 'overflowY', ''); 7915 } 7916 7917 } 7918 7919 ], 7920 7921 methods: { 7922
7923 toggle: function toggle() { 7924 return this.isToggled() ? this.hide() : this.show(); 7925 }, 7926 7927 show: function show() { 7928 7929 if (this.isToggled()) { 7930 return; 7931 } 7932 7933 if (this.container && this.$el.parentNode !== this.container) { 7934 append(this.container, this.$el); 7935 this._callConnected(); 7936 } 7937 7938 return this.toggleNow(this.$el, true); 7939 }, 7940 7941 hide: function hide() { 7942 if (this.isToggled()) { 7943 return this.toggleNow(this.$el, false); 7944 } 7945 }, 7946 7947 getActive: function getActive() { 7948 return active; 7949 }, 7950 7951 _toggleImmediate: function _toggleImmediate(el, show) { 7952 var this$1 = this; 7953 7954 return new Promise(function (resolve) { return requestAnimationFrame(function () { 7955 this$1._toggle(el, show); 7956 7957 if (this$1.transitionDuration) { 7958 once(this$1.transitionElement, 'transitionend', resolve, false, function (e) { return e.target === this$1.transitionElement; }); 7959 } else { 7960 resolve(); 7961 } 7962 }); } 7963 ); 7964 } 7965 7966 } 7967 7968}; 7969 7970var events; 7971 7972function registerEvents() { 7973 7974 if (events) { 7975 return; 7976 } 7977 7978 events = [ 7979 on(document, 'click', function (ref) { 7980 var target = ref.target; 7981 var defaultPrevented = ref.defaultPrevented; 7982 7983 if (active && active.bgClose && !defaultPrevented && (!active.overlay || within(target, active.$el)) && (!active.panel || !within(target, active.panel))) { 7984 active.hide(); 7985 } 7986 }), 7987 on(document, 'keydown', function (e) { 7988 if (e.keyCode === 27 && active && active.escClose) { 7989 e.preventDefault(); 7990 active.hide(); 7991 } 7992 }) 7993 ]; 7994} 7995 7996function deregisterEvents() { 7997 events && events.forEach(function (unbind) { return unbind(); }); 7998 events = null; 7999} 8000 8001var Position = { 8002 8003 props: { 8004 pos: String, 8005 offset: null, 8006 flip: Boolean, 8007 clsPos: String 8008 }, 8009 8010 defaults: { 8011 pos: ("bottom-" + (!isRtl ? 'left' : 'right')), 8012 flip: true, 8013 offset: false, 8014 clsPos: '' 8015 }, 8016 8017 computed: { 8018 8019 pos: function pos(ref) { 8020 var pos = ref.pos; 8021 8022 return (pos + (!includes(pos, '-') ? '-center' : '')).split('-'); 8023 }, 8024 8025 dir: function dir() { 8026 return this.pos[0]; 8027 }, 8028 8029 align: function align() { 8030 return this.pos[1]; 8031 } 8032 8033 }, 8034 8035 methods: { 8036 8037 positionAt: function positionAt$1(element, target, boundary) { 8038 8039 removeClasses(element, ((this.clsPos) + "-(top|bottom|left|right)(-[a-z]+)?")); 8040 css(element, {top: '', left: ''}); 8041 8042 var node; 8043 var ref = this; 8044 var offset$$1 = ref.offset; 8045 8046 offset$$1 = isNumeric(offset$$1) 8047 ? offset$$1 8048 : (node = $(offset$$1)) 8049 ? offset(node)[axis === 'x' ? 'left' : 'top'] - offset(target)[axis === 'x' ? 'right' : 'bottom'] 8050 : 0; 8051 8052 var axis = this.getAxis(); 8053 var ref$1 = positionAt( 8054 element, 8055 target, 8056 axis === 'x' ? ((flipPosition(this.dir)) + " " + (this.align)) : ((this.align) + " " + (flipPosition(this.dir))), 8057 axis === 'x' ? ((this.dir) + " " + (this.align)) : ((this.align) + " " + (this.dir)), 8058 axis === 'x' ? ("" + (this.dir === 'left' ? -offset$$1 : offset$$1)) : (" " + (this.dir === 'top' ? -offset$$1 : offset$$1)), 8059 null, 8060 this.flip, 8061 boundary 8062 ).target; 8063 var x = ref$1.x; 8064 var y = ref$1.y; 8065 8066 this.dir = axis === 'x' ? x : y; 8067 this.align = axis === 'x' ? y : x; 8068 8069 toggleClass(element, ((this.clsPos) + "-" + (this.dir) + "-" + (this.align)), this.offset === false); 8070 8071 }, 8072 8073 getAxis: function getAxis() { 8074 return this.dir === 'top' || this.dir === 'bottom' ? 'y' : 'x'; 8075 } 8076 8077 } 8078 8079}; 8080 8081function mixin (UIkit) { 8082 8083 UIkit.mixin.class = Class; 8084 UIkit.mixin.container = Container; 8085 UIkit.mixin.modal = Modal; 8086 UIkit.mixin.position = Position; 8087 UIkit.mixin.togglable = Togglable; 8088 8089} 8090 8091function Accordion (UIkit) { 8092 8093 UIkit.component('accordion', { 8094 8095 mixins: [Class, Togglable], 8096 8097 props: { 8098 targets: String, 8099 active: null, 8100 collapsible: Boolean, 8101 multiple: Boolean, 8102 toggle: String, 8103 content: String, 8104 transition: String 8105 }, 8106 8107 defaults: { 8108 targets: '> *', 8109 active: false, 8110 animation: [true], 8111 collapsible: true, 8112 multiple: false, 8113 clsOpen: 'uk-open', 8114 toggle: '> .uk-accordion-title', 8115 content: '> .uk-accordion-content', 8116 transition: 'ease' 8117 }, 8118 8119 computed: { 8120 8121 items: function items(ref, $el) { 8122 var targets = ref.targets; 8123 8124 return $$(targets, $el); 8125 } 8126 8127 }, 8128 8129 events: [ 8130 8131 { 8132 8133 name: 'click', 8134 8135 delegate: function delegate() { 8136 return ((this.targets) + " " + (this.$props.toggle)); 8137 }, 8138 8139 handler: function handler(e) { 8140 e.preventDefault(); 8141 this.toggle(index($$(((this.targets) + " " + (this.$props.toggle)), this.$el), e.current)); 8142 } 8143 8144 } 8145 8146 ], 8147 8148 connected: function connected() { 8149 8150 if (this.active === false) { 8151 return; 8152 } 8153 8154 var active = this.items[Number(this.active)]; 8155 if (active && !hasClass(active, this.clsOpen)) { 8156 this.toggle(active, false); 8157 } 8158 }, 8159
8160 update: function update() { 8161 var this$1 = this; 8162 8163 8164 this.items.forEach(function (el) { return this$1._toggleImmediate($(this$1.content, el), hasClass(el, this$1.clsOpen)); }); 8165 8166 var active = !this.collapsible && !hasClass(this.items, this.clsOpen) && this.items[0]; 8167 if (active) { 8168 this.toggle(active, false); 8169 } 8170 }, 8171 8172 methods: { 8173 8174 toggle: function toggle(item, animate) { 8175 var this$1 = this; 8176 8177 8178 var index = getIndex(item, this.items); 8179 var active = filter(this.items, ("." + (this.clsOpen))); 8180 8181 item = this.items[index]; 8182 8183 item && [item] 8184 .concat(!this.multiple && !includes(active, item) && active || []) 8185 .forEach(function (el) { 8186 8187 var isItem = el === item; 8188 var state = isItem && !hasClass(el, this$1.clsOpen); 8189 8190 if (!state && isItem && !this$1.collapsible && active.length < 2) { 8191 return; 8192 } 8193 8194 toggleClass(el, this$1.clsOpen, state); 8195 8196 var content = el._wrapper ? el._wrapper.firstElementChild : $(this$1.content, el); 8197 8198 if (!el._wrapper) { 8199 el._wrapper = wrapAll(content, '<div>'); 8200 attr(el._wrapper, 'hidden', state ? '' : null); 8201 } 8202 8203 this$1._toggleImmediate(content, true); 8204 this$1.toggleElement(el._wrapper, state, animate).then(function () { 8205 if (hasClass(el, this$1.clsOpen) === state) { 8206 8207 if (!state) { 8208 this$1._toggleImmediate(content, false); 8209 } 8210 8211 el._wrapper = null; 8212 unwrap(content); 8213 } 8214 }); 8215 8216 }); 8217 } 8218 8219 } 8220 8221 }); 8222 8223} 8224 8225function Alert (UIkit) { 8226 8227 UIkit.component('alert', { 8228 8229 attrs: true, 8230 8231 mixins: [Class, Togglable], 8232 8233 args: 'animation', 8234 8235 props: { 8236 close: String 8237 }, 8238 8239 defaults: { 8240 animation: [true], 8241 selClose: '.uk-alert-close', 8242 duration: 150, 8243 hideProps: assign({opacity: 0}, Togglable.defaults.hideProps) 8244 }, 8245 8246 events: [ 8247 8248 { 8249 8250 name: 'click', 8251 8252 delegate: function delegate() { 8253 return this.selClose; 8254 }, 8255 8256 handler: function handler(e) { 8257 e.preventDefault(); 8258 this.close(); 8259 } 8260 8261 } 8262 8263 ], 8264 8265 methods: { 8266 8267 close: function close() { 8268 var this$1 = this; 8269 8270 this.toggleElement(this.$el).then(function () { return this$1.$destroy(true); }); 8271 } 8272 8273 } 8274 8275 }); 8276 8277} 8278 8279function Core (UIkit) { 8280 8281 ready(function () { 8282 8283 var scroll = 0; 8284 var started = 0; 8285 8286 on(window, 'load resize', function (e) { return UIkit.update(null, e); }); 8287 on(window, 'scroll', function (e) { 8288 e.dir = scroll <= window.pageYOffset ? 'down' : 'up'; 8289 e.scrollY = scroll = window.pageYOffset; 8290 UIkit.update(null, e); 8291 }); 8292 8293 on(document, 'animationstart', function (ref) { 8294 var target = ref.target; 8295 8296 if ((css(target, 'animationName') || '').match(/^uk-.*(left|right)/)) { 8297 8298 started++; 8299 css(document.body, 'overflowX', 'hidden'); 8300 setTimeout(function () { 8301 if (!--started) { 8302 css(document.body, 'overflowX', ''); 8303 } 8304 }, toMs(css(target, 'animationDuration')) + 100); 8305 } 8306 }, true); 8307 8308 if (!hasTouch) { 8309 return; 8310 } 8311 8312 var cls = 'uk-hover'; 8313 8314 on(document, 'tap', function (ref) { 8315 var target = ref.target; 8316
8317 return $$(("." + cls)).forEach(function (el) { return !within(target, el) && removeClass(el, cls); } 8318 ); 8319 } 8320 ); 8321 8322 Object.defineProperty(UIkit, 'hoverSelector', { 8323 8324 set: function set(selector) { 8325 on(document, 'tap', selector, function (ref) { 8326 var current = ref.current; 8327 8328 return addClass(current, cls); 8329 }); 8330 } 8331 8332 }); 8333 8334 UIkit.hoverSelector = '.uk-animation-toggle, .uk-transition-toggle, [uk-hover]'; 8335 8336 }); 8337 8338} 8339 8340function Cover (UIkit) { 8341 8342 UIkit.component('cover', { 8343 8344 mixins: [Class, UIkit.components.video.options], 8345 8346 props: { 8347 width: Number, 8348 height: Number 8349 }, 8350 8351 defaults: { 8352 automute: true 8353 }, 8354 8355 update: { 8356 8357 write: function write() { 8358 8359 var el = this.$el; 8360 8361 if (!isVisible(el)) { 8362 return; 8363 } 8364 8365 var ref = el.parentNode; 8366 var height = ref.offsetHeight; 8367 var width = ref.offsetWidth; 8368 8369 css( 8370 css(el, {width: '', height: ''}), 8371 Dimensions.cover( 8372 { 8373 width: this.width || el.clientWidth, 8374 height: this.height || el.clientHeight 8375 }, 8376 { 8377 width: width + (width % 2 ? 1 : 0), 8378 height: height + (height % 2 ? 1 : 0) 8379 } 8380 ) 8381 ); 8382 8383 }, 8384 8385 events: ['load', 'resize'] 8386 8387 }, 8388 8389 events: { 8390 8391 loadedmetadata: function loadedmetadata() { 8392 this.$emit(); 8393 } 8394 8395 } 8396 8397 }); 8398 8399} 8400 8401function Drop (UIkit) { 8402 8403 var active; 8404 8405 UIkit.component('drop', { 8406 8407 mixins: [Position, Togglable], 8408 8409 args: 'pos', 8410 8411 props: { 8412 mode: 'list', 8413 toggle: Boolean, 8414 boundary: 'query', 8415 boundaryAlign: Boolean, 8416 delayShow: Number, 8417 delayHide: Number, 8418 clsDrop: String 8419 }, 8420 8421 defaults: { 8422 mode: ['click', 'hover'], 8423 toggle: true, 8424 boundary: window, 8425 boundaryAlign: false, 8426 delayShow: 0, 8427 delayHide: 800, 8428 clsDrop: false, 8429 hoverIdle: 200, 8430 animation: ['uk-animation-fade'], 8431 cls: 'uk-open' 8432 }, 8433 8434 computed: { 8435 8436 clsDrop: function clsDrop(ref) { 8437 var clsDrop = ref.clsDrop; 8438 8439 return clsDrop || ("uk-" + (this.$options.name)); 8440 }, 8441 8442 clsPos: function clsPos() { 8443 return this.clsDrop; 8444 } 8445 8446 }, 8447 8448 init: function init() { 8449 this.tracker = new MouseTracker(); 8450 addClass(this.$el, this.clsDrop); 8451 }, 8452 8453 connected: function connected() { 8454 8455 var ref = this.$props; 8456 var toggle = ref.toggle; 8457 this.toggle = toggle && UIkit.toggle(isString(toggle) ? query(toggle, this.$el) : this.$el.previousElementSibling, { 8458 target: this.$el, 8459 mode: this.mode 8460 }); 8461 8462 this.updateAria(this.$el); 8463 8464 }, 8465 8466 events: [ 8467 8468 { 8469 8470 name: 'click', 8471 8472 delegate: function delegate() { 8473 return ("." + (this.clsDrop) + "-close"); 8474 }, 8475 8476 handler: function handler(e) { 8477 e.preventDefault(); 8478 this.hide(false); 8479 } 8480 8481 }, 8482 8483 { 8484 8485 name: 'click', 8486 8487 delegate: function delegate() { 8488 return 'a[href^="#"]'; 8489 }, 8490 8491 handler: function handler(e) { 8492 8493 if (e.defaultPrevented) { 8494 return; 8495 } 8496 8497 var id = e.target.hash; 8498 8499 if (!id) { 8500 e.preventDefault(); 8501 } 8502 8503 if (!id || !within(id, this.$el)) { 8504 this.hide(false); 8505 } 8506 } 8507 8508 }, 8509 8510 { 8511 8512 name: 'beforescroll', 8513 8514 handler: function handler() { 8515 this.hide(false); 8516 } 8517 8518 }, 8519 8520 { 8521 8522 name: 'toggle', 8523 8524 self: true, 8525 8526 handler: function handler(e, toggle) { 8527 8528 e.preventDefault(); 8529 8530 if (this.isToggled()) { 8531 this.hide(false); 8532 } else { 8533 this.show(toggle, false); 8534 } 8535 } 8536 8537 }, 8538 8539 { 8540 8541 name: pointerEnter, 8542 8543 filter: function filter() { 8544 return includes(this.mode, 'hover'); 8545 }, 8546 8547 handler: function handler(e) { 8548 8549 if (isTouch(e)) { 8550 return; 8551 } 8552 8553 if (active 8554 && active !== this 8555 && active.toggle 8556 && includes(active.toggle.mode, 'hover') 8557 && !within(e.target, active.toggle.$el) 8558 && !pointInRect({x: e.pageX, y: e.pageY}, offset(active.$el)) 8559 ) { 8560 active.hide(false); 8561 } 8562 8563 e.preventDefault(); 8564 this.show(this.toggle); 8565 } 8566 8567 }, 8568 8569 { 8570 8571 name: 'toggleshow', 8572 8573 handler: function handler(e, toggle) { 8574 8575 if (toggle && !includes(toggle.target, this.$el)) { 8576 return; 8577 } 8578 8579 e.preventDefault(); 8580 this.show(toggle || this.toggle); 8581 } 8582 8583 }, 8584 8585 { 8586 8587 name: ("togglehide " + pointerLeave), 8588 8589 handler: function handler(e, toggle) { 8590 8591 if (isTouch(e) || toggle && !includes(toggle.target, this.$el)) { 8592 return; 8593 } 8594 8595 e.preventDefault(); 8596 8597 if (this.toggle && includes(this.toggle.mode, 'hover')) { 8598 this.hide(); 8599 } 8600 } 8601 8602 }, 8603 8604 { 8605 8606 name: 'beforeshow', 8607 8608 self: true, 8609 8610 handler: function handler() { 8611 this.clearTimers(); 8612 Animation.cancel(this.$el); 8613 this.position(); 8614 } 8615 8616 }, 8617 8618 { 8619 8620 name: 'show', 8621 8622 self: true, 8623 8624 handler: function handler() { 8625 this.tracker.init(); 8626 if (this.toggle) { 8627 addClass(this.toggle.$el, this.cls); 8628 attr(this.toggle.$el, 'aria-expanded', 'true'); 8629 } 8630 registerEvent(); 8631 } 8632 8633 }, 8634 8635 { 8636 8637 name: 'beforehide', 8638 8639 self: true, 8640 8641 handler: function handler() { 8642 this.clearTimers(); 8643 } 8644 8645 }, 8646 8647 { 8648 8649 name: 'hide', 8650 8651 handler: function handler(ref) { 8652 var target = ref.target; 8653 8654 8655 if (this.$el !== target) { 8656 active = active === null && within(target, this.$el) && this.isToggled() ? this
8656: active; 8657 return; 8658 } 8659 8660 active = this.isActive() ? null : active; 8661 8662 if (this.toggle) { 8663 removeClass(this.toggle.$el, this.cls); 8664 attr(this.toggle.$el, 'aria-expanded', 'false'); 8665 this.toggle.$el.blur(); 8666 $$('a, button', this.toggle.$el).forEach(function (el) { return el.blur(); }); 8667 } 8668 8669 this.tracker.cancel(); 8670 } 8671 8672 } 8673 8674 ], 8675 8676 update: { 8677 8678 write: function write() { 8679 8680 if (this.isToggled() && !Animation.inProgress(this.$el)) { 8681 this.position(); 8682 } 8683 8684 }, 8685 8686 events: ['resize'] 8687 8688 }, 8689 8690 methods: { 8691 8692 show: function show(toggle, delay) { 8693 var this$1 = this; 8694 if ( delay === void 0 ) delay = true; 8695 8696 8697 var show = function () { return !this$1.isToggled() && this$1.toggleElement(this$1.$el, true); }; 8698 var tryShow = function () { 8699 8700 this$1.toggle = toggle || this$1.toggle; 8701 8702 this$1.clearTimers(); 8703 8704 if (this$1.isActive()) { 8705 return; 8706 } else if (delay && active && active !== this$1 && active.isDelaying) { 8707 this$1.showTimer = setTimeout(this$1.show, 10); 8708 return; 8709 } else if (this$1.isParentOf(active)) { 8710 8711 if (active.hideTimer) { 8712 active.hide(false); 8713 } else { 8714 return; 8715 } 8716 8717 } else if (active && !this$1.isChildOf(active) && !this$1.isParentOf(active)) { 8718 8719 var prev; 8720 while (active && active !== prev && !this$1.isChildOf(active)) { 8721 prev = active; 8722 active.hide(false); 8723 } 8724 8725 } 8726 8727 if (delay && this$1.delayShow) { 8728 this$1.showTimer = setTimeout(show, this$1.delayShow); 8729 } else { 8730 show(); 8731 } 8732 8733 active = this$1; 8734 }; 8735 8736 if (toggle && this.toggle && toggle.$el !== this.toggle.$el) { 8737 8738 once(this.$el, 'hide', tryShow); 8739 this.hide(false); 8740 8741 } else { 8742 tryShow(); 8743 } 8744 }, 8745 8746 hide: function hide(delay) { 8747 var this$1 = this; 8748 if ( delay === void 0 ) delay = true; 8749 8750 8751 var hide = function () { return this$1.toggleNow(this$1.$el, false); }; 8752 8753 this.clearTimers(); 8754 8755 this.isDelaying = this.tracker.movesTo(this.$el); 8756 8757 if (delay && this.isDelaying) { 8758 this.hideTimer = setTimeout(this.hide, this.hoverIdle); 8759 } else if (delay && this.delayHide) { 8760 this.hideTimer = setTimeout(hide, this.delayHide); 8761 } else { 8762 hide(); 8763 } 8764 }, 8765 8766 clearTimers: function clearTimers() { 8767 clearTimeout(this.showTimer); 8768 clearTimeout(this.hideTimer); 8769 this.showTimer = null; 8770 this.hideTimer = null; 8771 this.isDelaying = false; 8772 }, 8773 8774 isActive: function isActive() { 8775 return active === this; 8776 }, 8777 8778 isChildOf: function isChildOf(drop) { 8779 return drop && drop !== this && within(this.$el, drop.$el); 8780 }, 8781 8782 isParentOf: function isParentOf(drop) { 8783 return drop && drop !== this && within(drop.$el, this.$el); 8784 }, 8785 8786 position: function position() { 8787 8788 removeClasses(this.$el, ((this.clsDrop) + "-(stack|boundary)")); 8789 css(this.$el, {top: '', left: '', display: 'block'}); 8790 toggleClass(this.$el, ((this.clsDrop) + "-boundary"), this.boundaryAlign); 8791 8792 var boundary = offset(this.boundary); 8793 var alignTo = this.boundaryAlign ? boundary : offset(this.toggle.$el); 8794 8795 if (this.align === 'justify') { 8796 var prop = this.getAxis() === 'y' ? 'width' : 'height';
8797 css(this.$el, prop, alignTo[prop]); 8798 } else if (this.$el.offsetWidth > Math.max(boundary.right - alignTo.left, alignTo.right - boundary.left)) { 8799 addClass(this.$el, ((this.clsDrop) + "-stack")); 8800 } 8801 8802 this.positionAt(this.$el, this.boundaryAlign ? this.boundary : this.toggle.$el, this.boundary); 8803 8804 css(this.$el, 'display', ''); 8805 8806 } 8807 8808 } 8809 8810 }); 8811 8812 UIkit.drop.getActive = function () { return active; }; 8813 8814 var registered; 8815 8816 function registerEvent() { 8817 8818 if (registered) { 8819 return; 8820 } 8821 8822 registered = true; 8823 on(document, 'click', function (ref) { 8824 var target = ref.target; 8825 var defaultPrevented = ref.defaultPrevented; 8826 8827 var prev; 8828 8829 if (defaultPrevented) { 8830 return; 8831 } 8832 8833 while (active && active !== prev && !within(target, active.$el) && !(active.toggle && within(target, active.toggle.$el))) { 8834 prev = active; 8835 active.hide(false); 8836 } 8837 }); 8838 } 8839 8840} 8841 8842function Dropdown (UIkit) { 8843 8844 UIkit.component('dropdown', UIkit.components.drop.extend({name: 'dropdown'})); 8845 8846} 8847 8848function FormCustom (UIkit) { 8849 8850 UIkit.component('form-custom', { 8851 8852 mixins: [Class], 8853 8854 args: 'target', 8855 8856 props: { 8857 target: Boolean 8858 }, 8859 8860 defaults: { 8861 target: false 8862 }, 8863 8864 computed: { 8865 8866 input: function input(_, $el) { 8867 return $(selInput, $el); 8868 }, 8869 8870 state: function state() { 8871 return this.input.nextElementSibling; 8872 }, 8873 8874 target: function target(ref, $el) { 8875 var target = ref.target; 8876 8877 return target && (target === true 8878 && this.input.parentNode === $el 8879 && this.input.nextElementSibling 8880 || query(target, $el)); 8881 } 8882 8883 }, 8884 8885 update: function update() { 8886 8887 var ref = this; 8888 var target = ref.target; 8889 var input = ref.input; 8890 8891 if (!target) { 8892 return; 8893 } 8894 8895 var option; 8896 8897 target[isInput(target) ? 'value' : 'textContent'] = input.files && input.files[0] 8898 ? input.files[0].name 8899 : matches(input, 'select') && (option = $$('option', input).filter(function (el) { return el.selected; })[0]) 8900 ? option.textContent 8901 : input.value; 8902 8903 }, 8904 8905 events: [ 8906 8907 { 8908 8909 name: 'focusin focusout mouseenter mouseleave', 8910 8911 delegate: selInput, 8912 8913 handler: function handler(ref) { 8914 var type = ref.type; 8915 var current = ref.current; 8916 8917 if (current === this.input) { 8918 toggleClass( 8919 this.state, 8920 ("uk-" + (includes(type, 'focus') ? 'focus' : 'hover')), 8921 includes(['focusin', 'mouseenter'], type) 8922 ); 8923 } 8924 } 8925 8926 }, 8927 8928 { 8929 8930 name: 'change', 8931 8932 handler: function handler() { 8933 this.$emit(); 8934 } 8935 8936 } 8937 8938 ] 8939 8940 }); 8941 8942} 8943 8944function Gif (UIkit) { 8945 8946 // Deprecated 8947 UIkit.component('gif', { 8948 8949 update: { 8950 8951 read: function read(data) { 8952 8953 var inview = isInView(this.$el); 8954 8955 if (!inview || data.isInView === inview) { 8956 return false; 8957 } 8958 8959 data.isInView = inview; 8960 }, 8961 8962 write: function write() { 8963 this.$el.src = this.$el.src; 8964 }, 8965 8966 events: ['scroll', 'load', 'resize'] 8967 } 8968 8969 }); 8970 8971} 8972 8973function Grid (UIkit) { 8974 8975 UIkit.component('grid', UIkit.components.margin.extend({ 8976 8977 mixins: [Class], 8978 8979 name: 'grid', 8980 8981 defaults: { 8982 margin: 'uk-grid-margin', 8983 clsStack: 'uk-grid-stack' 8984 }, 8985 8986 update: { 8987 8988 write: function write(ref) { 8989 var stacks = ref.stacks; 8990 8991 8992 toggleClass(this.$el, this.clsStack, stacks); 8993 8994 }, 8995 8996 events: ['load', 'resize'] 8997 8998 } 8999 9000 })); 9001 9002} 9003 9004function HeightMatch (UIkit) { 9005 9006 UIkit.component('height-match', { 9007 9008 args: 'target', 9009 9010 props: { 9011 target: String, 9012 row: Boolean 9013 }, 9014 9015 defaults: { 9016 target: '> *', 9017 row: true 9018 }, 9019 9020 computed: { 9021 9022 elements: function elements(ref, $el) { 9023 var target = ref.target; 9024 9025 return $$(target, $el); 9026 } 9027 9028 }, 9029 9030 update: { 9031 9032 read: function read() { 9033 var this$1 = this; 9034 9035 9036 var lastOffset = false;
9037 9038 css(this.elements, 'minHeight', ''); 9039 9040 return { 9041 rows: !this.row 9042 ? [this.match(this.elements)] 9043 : this.elements.reduce(function (rows, el) { 9044 9045 if (lastOffset !== el.offsetTop) { 9046 rows.push([el]); 9047 } else { 9048 rows[rows.length - 1].push(el); 9049 } 9050 9051 lastOffset = el.offsetTop; 9052 9053 return rows; 9054 9055 }, []).map(function (elements) { return this$1.match(elements); }) 9056 }; 9057 }, 9058 9059 write: function write(ref) { 9060 var rows = ref.rows; 9061 9062 9063 rows.forEach(function (ref) { 9064 var height = ref.height; 9065 var elements = ref.elements; 9066 9067 return css(elements, 'minHeight', height); 9068 }); 9069 9070 }, 9071 9072 events: ['load', 'resize'] 9073 9074 }, 9075 9076 methods: { 9077 9078 match: function match(elements) { 9079 9080 if (elements.length < 2) { 9081 return {}; 9082 } 9083 9084 var heights = []; 9085 var max = 0; 9086 9087 elements 9088 .forEach(function (el) { 9089 9090 var style, hidden; 9091 9092 if (!isVisible(el)) { 9093 style = attr(el, 'style'); 9094 hidden = attr(el, 'hidden'); 9095 9096 attr(el, { 9097 style: ((style || '') + ";display:block !important;"), 9098 hidden: null 9099 }); 9100 } 9101 9102 max = Math.max(max, el.offsetHeight); 9103 heights.push(el.offsetHeight); 9104 9105 if (!isUndefined(style)) { 9106 attr(el, {style: style, hidden: hidden}); 9107 } 9108 9109 }); 9110 9111 elements = elements.filter(function (el, i) { return heights[i] < max; }); 9112 9113 return {height: max, elements: elements}; 9114 } 9115 } 9116 9117 }); 9118 9119} 9120 9121function HeightViewport (UIkit) { 9122 9123 UIkit.component('height-viewport', { 9124 9125 props: { 9126 expand: Boolean, 9127 offsetTop: Boolean, 9128 offsetBottom: Boolean, 9129 minHeight: Number 9130 }, 9131 9132 defaults: { 9133 expand: false, 9134 offsetTop: false, 9135 offsetBottom: false, 9136 minHeight: 0 9137 }, 9138 9139 update: { 9140 9141 write: function write() { 9142 9143 css(this.$el, 'boxSizing', 'border-box'); 9144 9145 var viewport = height(window); 9146 var minHeight, offsetTop = 0; 9147 9148 if (this.expand) { 9149 9150 css(this.$el, {height: '', minHeight: ''}); 9151 9152 var diff = viewport - offsetHeight(document.documentElement); 9153 9154 if (diff > 0) { 9155 minHeight = offsetHeight(this.$el) + diff; 9156 } 9157 9158 } else { 9159 9160 var ref = offset(this.$el); 9161 var top = ref.top; 9162 9163 if (top < viewport / 2 && this.offsetTop) { 9164 offsetTop += top; 9165 } 9166 9167 if (this.offsetBottom === true) { 9168 9169 offsetTop += offsetHeight(this.$el.nextElementSibling); 9170 9171 } else if (isNumeric(this.offsetBottom)) { 9172 9173 offsetTop += (viewport / 100) * this.offsetBottom; 9174 9175 } else if (this.offsetBottom && endsWith(this.offsetBottom, 'px')) { 9176 9177 offsetTop += toFloat(this.offsetBottom); 9178 9179 } else if (isString(this.offsetBottom)) { 9180 9181 offsetTop += offsetHeight(query(this.offsetBottom, this.$el)); 9182 9183 } 9184 9185 // on mobile devices (iOS and Android) window.innerHeight !== 100vh 9186 minHeight = offsetTop ? ("calc(100vh - " + offsetTop + "px)") : '100vh'; 9187 9188 } 9189 9190 if (!minHeight) { 9191 return; 9192 } 9193 9194 css(this.$el, {height: '', minHeight: minHeight}); 9195 9196 var elHeight = this.$el.offsetHeight; 9197 if (this.minHeight && this.minHeight > elHeight) { 9198 css(this.$el, 'minHeight', this.minHeight); 9199 } 9200 9201 // IE 11 fix (min-height on a flex container won't apply to its flex items) 9202 if (viewport - offsetTop >= elHeight) { 9203 css(this.$el, 'height', minHeight); 9204 } 9205 9206 }, 9207 9208 events: ['load', 'resize'] 9209 9210 } 9211 9212 }); 9213 9214 function offsetHeight(el) { 9215 return el && el.offsetHeight || 0; 9216 } 9217 9218} 9219 9220var closeIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"1\" y1=\"1\" x2=\"13\" y2=\"13\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13\" y1=\"1\" x2=\"1\" y2=\"13\"/></svg>"; 9221 9222var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>"; 9223 9224var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>"; 9225 9226var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"9\" width=\"20\" height=\"2\"/><rect y=\"3\" width=\"20\" height=\"2\"/><rect y=\"15\" width=\"20\" height=\"2\"/></svg>"; 9227 9228var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>"; 9229 9230var paginationNext = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 1 6 6 1 11\"/></svg>"; 9231 9232var paginationPrevious = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"6 1 1 6 6 11\"/></svg>"; 9233 9234var searchIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9\" cy=\"9\" r=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M14,14 L18,18 L14,14 Z\"/></svg>"; 9235 9236var searchLarge = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" cx=\"17.5\" cy=\"17.5\" r=\"16.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" x1=\"38\" y1=\"39\" x2=\"29\" y2=\"30\"/></svg>"; 9237 9238var searchNavbar = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10.5\" cy=\"10.5\" r=\"9.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"23\" y1=\"23\" x2=\"17\" y2=\"17\"/></svg>"; 9239 9240var slidenavNext = "<svg width=\"14px\" height=\"24px\" viewBox=\"0 0 14 24\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"1.225,23 12.775,12 1.225,1 \"/></svg>"; 9241 9242var slidenavNextLarge = "<svg width=\"25px\" height=\"40px\" viewBox=\"0 0 25 40\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"4.002,38.547 22.527,20.024 4,1.5 \"/></svg>"; 9243 9244var slidenavPrevious = "<svg width=\"14px\" height=\"24px\" viewBox=\"0 0 14 24\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"12.775,1 1.225,12 12.775,23 \"/></svg>"; 9245 9246var slidenavPreviousLarge = "<svg width=\"25px\" height=\"40px\" viewBox=\"0 0 25 40\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"20.527,1.5 2,20.024 20.525,38.547 \"/></svg>"; 9247 9248var spinner = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 30 30\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" cx=\"15\" cy=\"15\" r=\"14\"/></svg>"; 9249 9250var totop = "<svg width=\"18\" height=\"10\" viewBox=\"0 0 18 10\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 9 9 1 17 9 \"/></svg>"; 9251 9252function Icon (UIkit) { 9253 9254 var parsed = {}; 9255 var icons = { 9256 spinner: spinner, 9257 totop: totop, 9258 marker: marker, 9259 'close-icon': closeIcon, 9260 'close-large': closeLarge, 9261 'navbar-toggle-icon': navbarToggleIcon, 9262 'overlay-icon': overlayIcon, 9263 'pagination-next': paginationNext, 9264 'pagination-previous': paginationPrevious, 9265 'search-icon': searchIcon, 9266 'search-large': searchLarge, 9267 'search-navbar': searchNavbar, 9268 'slidenav-next': slidenavNext, 9269 'slidenav-next-large': slidenavNextLarge, 9270 'slidenav-previous': slidenavPrevious, 9271 'slidenav-previous-large': slidenavPreviousLarge 9272 }; 9273 9274 UIkit.component('icon', UIkit.components.svg.extend({ 9275 9276 attrs: ['icon', 'ratio'], 9277 9278 mixins: [Class], 9279 9280 name: 'icon', 9281 9282 args: 'icon', 9283 9284 props: ['icon'], 9285 9286 defaults: {exclude: ['id', 'style', 'class', 'src', 'icon']}, 9287
9288 init: function init() { 9289 addClass(this.$el, 'uk-icon'); 9290 9291 if (isRtl) { 9292 this.icon = swap(swap(this.icon, 'left', 'right'), 'previous', 'next'); 9293 } 9294 }, 9295 9296 methods: { 9297 9298 getSvg: function getSvg() { 9299 9300 var icon = getIcon(this.icon); 9301 9302 if (!icon) { 9303 return Promise.reject('Icon not found.'); 9304 } 9305 9306 return Promise.resolve(icon); 9307 } 9308 9309 } 9310 9311 })); 9312 9313 [ 9314 'marker', 9315 'navbar-toggle-icon', 9316 'overlay-icon', 9317 'pagination-previous', 9318 'pagination-next', 9319 'totop' 9320 ].forEach(function (name) { return registerComponent(name); }); 9321 9322 [ 9323 'slidenav-previous', 9324 'slidenav-next' 9325 ].forEach(function (name) { return registerComponent(name, { 9326 9327 init: function init() { 9328 addClass(this.$el, 'uk-slidenav'); 9329 9330 if (hasClass(this.$el, 'uk-slidenav-large')) { 9331 this.icon += '-large'; 9332 } 9333 } 9334 9335 }); }); 9336 9337 registerComponent('search-icon', { 9338 9339 init: function init() { 9340 if (hasClass(this.$el, 'uk-search-icon') && parents(this.$el, '.uk-search-large').length) { 9341 this.icon = 'search-large'; 9342 } else if (parents(this.$el, '.uk-search-navbar').length) { 9343 this.icon = 'search-navbar'; 9344 } 9345 } 9346 9347 }); 9348 9349 registerComponent('close', { 9350 9351 init: function init() { 9352 this.icon = "close-" + (hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon'); 9353 } 9354 9355 }); 9356 9357 registerComponent('spinner', { 9358 9359 connected: function connected() { 9360 var this$1 = this; 9361 9362 this.svg.then(function (svg) { return this$1.ratio !== 1 && css($('circle', svg), 'stroke-width', 1 / this$1.ratio); }, noop); 9363 } 9364 9365 }); 9366 9367 UIkit.icon.add = function (added) { 9368 Object.keys(added).forEach(function (name) { 9369 icons[name] = added[name]; 9370 delete parsed[name]; 9371 }); 9372 9373 if (UIkit._initialized) { 9374 apply(document.body, function (el) { 9375 var icon = UIkit.getComponent(el, 'icon'); 9376 if (icon) { 9377 icon.$reset(); 9378 } 9379 }); 9380 } 9381 }; 9382 9383 function registerComponent(name, mixin$$1) { 9384 9385 UIkit.component(name, UIkit.components.icon.extend({ 9386 9387 name: name, 9388 9389 mixins: mixin$$1 ? [mixin$$1] : [], 9390 9391 defaults: { 9392 icon: name 9393 } 9394 9395 })); 9396 } 9397 9398 function getIcon(icon) { 9399 9400 if (!icons[icon]) { 9401 return null; 9402 } 9403 9404 if (!parsed[icon]) { 9405 parsed[icon] = $(icons[icon].trim()); 9406 } 9407 9408 return parsed[icon]; 9409 } 9410 9411} 9412 9413function Leader (UIkit) { 9414 9415 UIkit.component('leader', { 9416 9417 mixins: [Class], 9418 9419 props: { 9420 fill: String, 9421 media: 'media' 9422 }, 9423 9424 defaults: { 9425 fill: '', 9426 media: false, 9427 clsWrapper: 'uk-leader-fill', 9428 clsHide: 'uk-leader-hide', 9429 attrFill: 'data-fill' 9430 }, 9431 9432 computed: { 9433 9434 fill: function fill(ref) { 9435 var fill = ref.fill; 9436 9437 return fill || getCssVar('leader-fill'); 9438 } 9439 9440 }, 9441 9442 connected: function connected() { 9443 var assign; 9444 (assign = wrapInner(this.$el, ("<span class=\"" + (this.clsWrapper) + "\">")), this.wrapper = assign[0]); 9445 }, 9446 9447 disconnected: function disconnected() { 9448 unwrap(this.wrapper.childNodes); 9449 }, 9450 9451 update: [ 9452 9453 { 9454 9455 read: function read(ref) { 9456 var changed = ref.changed; 9457 var width = ref.width; 9458 9459 9460 var prev = width; 9461 9462 width = Math.floor(this.$el.offsetWidth / 2); 9463 9464 return { 9465 width: width, 9466 changed: changed || prev !== width, 9467 hide: this.media && !window.matchMedia(this.media).matches 9468 }; 9469 }, 9470 9471 write: function write(data) { 9472 9473 toggleClass(this.wrapper, this.clsHide, data.hide); 9474 9475 if (data.changed) { 9476 data.changed = false;
9477 attr(this.wrapper, this.attrFill, new Array(data.width).join(this.fill)); 9478 } 9479 9480 }, 9481 9482 events: ['load', 'resize'] 9483 9484 } 9485 ] 9486 }); 9487 9488} 9489 9490function Margin (UIkit) { 9491 9492 UIkit.component('margin', { 9493 9494 props: { 9495 margin: String, 9496 firstColumn: Boolean 9497 }, 9498 9499 defaults: { 9500 margin: 'uk-margin-small-top', 9501 firstColumn: 'uk-first-column' 9502 }, 9503 9504 update: { 9505 9506 read: function read(data) { 9507 9508 var items = this.$el.children; 9509 9510 if (!items.length || !isVisible(this.$el)) { 9511 return data.rows = false; 9512 } 9513 9514 data.stacks = true; 9515 9516 var rows = [[]]; 9517 9518 for (var i = 0; i < items.length; i++) { 9519 9520 var el = items[i]; 9521 var dim = el.getBoundingClientRect(); 9522 9523 if (!dim.height) { 9524 continue; 9525 } 9526 9527 for (var j = rows.length - 1; j >= 0; j--) { 9528 9529 var row = rows[j]; 9530 9531 if (!row[0]) { 9532 row.push(el); 9533 break; 9534 } 9535 9536 var leftDim = row[0].getBoundingClientRect(); 9537 9538 if (dim.top >= Math.floor(leftDim.bottom)) { 9539 rows.push([el]); 9540 break; 9541 } 9542 9543 if (Math.floor(dim.bottom) > leftDim.top) { 9544 9545 data.stacks = false; 9546 9547 if (dim.left < leftDim.left && !isRtl) { 9548 row.unshift(el); 9549 break; 9550 } 9551 9552 row.push(el); 9553 break; 9554 } 9555 9556 if (j === 0) { 9557 rows.unshift([el]); 9558 break; 9559 } 9560 9561 } 9562 9563 } 9564 9565 data.rows = rows; 9566 9567 }, 9568 9569 write: function write(ref) { 9570 var this$1 = this; 9571 var rows = ref.rows; 9572 9573 9574 rows.forEach(function (row, i) { return row.forEach(function (el, j) { 9575 toggleClass(el, this$1.margin, i !== 0); 9576 toggleClass(el, this$1.firstColumn, j === 0); 9577 }); } 9578 ); 9579 9580 }, 9581 9582 events: ['load', 'resize'] 9583 9584 } 9585 9586 }); 9587 9588} 9589 9590function Modal$1 (UIkit) { 9591 9592 UIkit.component('modal', { 9593 9594 mixins: [Modal], 9595 9596 defaults: { 9597 clsPage: 'uk-modal-page', 9598 selPanel: '.uk-modal-dialog', 9599 selClose: '.uk-modal-close, .uk-modal-close-default, .uk-modal-close-outside, .uk-modal-close-full' 9600 }, 9601 9602 events: [ 9603 9604 { 9605 name: 'show', 9606 9607 self: true, 9608 9609 handler: function handler() { 9610 9611 if (hasClass(this.panel, 'uk-margin-auto-vertical')) { 9612 addClass(this.$el, 'uk-flex'); 9613 } else { 9614 css(this.$el, 'display', 'block'); 9615 } 9616 9617 height(this.$el); // force reflow 9618 } 9619 }, 9620 9621 { 9622 name: 'hidden', 9623 9624 self: true, 9625 9626 handler: function handler() { 9627 9628 css(this.$el, 'display', ''); 9629 removeClass(this.$el, 'uk-flex'); 9630 9631 } 9632 } 9633 9634 ] 9635 9636 }); 9637 9638 UIkit.component('overflow-auto', { 9639 9640 mixins: [Class], 9641 9642 computed: { 9643 9644 modal: function modal(_, $el) { 9645 return closest($el, '.uk-modal'); 9646 }, 9647 9648 panel: function panel(_, $el) { 9649 return closest($el, '.uk-modal-dialog'); 9650 } 9651 9652 }, 9653 9654 connected: function connected() { 9655 css(this.$el, 'minHeight', 150); 9656 }, 9657 9658 update: { 9659 9660 write: function write() { 9661 9662 if (!this.panel || !this.modal) { 9663 return; 9664 } 9665 9666 var current = css(this.$el, 'maxHeight'); 9667 9668 css(css(this.$el, 'maxHeight', 150), 'maxHeight', Math.max(150, 150 + height(this.modal) - this.panel.offsetHeight)); 9669 if (current !== css(this.$el, 'maxHeight')) { 9670 trigger(this.$el, 'resize'); 9671 } 9672 }, 9673 9674 events: ['load', 'resize'] 9675 9676 } 9677 9678 }); 9679 9680 UIkit.modal.dialog = function (content, options) { 9681 9682 var dialog = UIkit.modal((" <div class=\"uk-modal\"> <div class=\"uk-modal-dialog\">" + content + "</div> </div> "), options); 9683 9684 dialog.show(); 9685 9686 on(dialog.$el, 'hidden', function (ref) { 9687 var target = ref.target; 9688 var currentTarget = ref.currentTarget; 9689 9690 if (target === currentTarget) { 9691 dialog.$destroy(true); 9692 } 9693 }); 9694 9695 return dialog; 9696 }; 9697 9698 UIkit.modal.alert = function (message, options) { 9699 9700 options = assign({bgClose: false, escClose: false, labels: UIkit.modal.labels}, options); 9701 9702 return new Promise( 9703 function (resolve) { return on(UIkit.modal.dialog((" <div class=\"uk-modal-body\">" + (isString(message) ? message : html(message)) + "</div> <div class=\"uk-modal-footer uk-text-right\"> <button class=\"uk-button uk-button-primary uk-modal-close\" autofocus>" + (options.labels.ok) + "</button> </div> "), options).$el, 'hide', resolve); } 9704 ); 9705 }; 9706 9707 UIkit.modal.confirm = function (message, options) { 9708 9709 options = assign({bgClose: false, escClose: true, labels: UIkit.modal.labels}, options); 9710 9711 return new Promise(function (resolve, reject) { 9712 9713 var confirm = UIkit.modal.dialog((" <form> <div class=\"uk-modal-body\">" + (isString(message) ? message : html(message)) + "</div> <div class=\"uk-modal-footer uk-text-right\"> <button class=\"uk-button uk-button-default uk-modal-close\" type=\"button\">" + (options.labels.cancel) + "</button> <button class=\"uk-button uk-button-primary\" autofocus>" + (options.labels.ok) + "</button> </div> </form> "), options); 9714 9715 var resolved = false;
9716 9717 on(confirm.$el, 'submit', 'form', function (e) { 9718 e.preventDefault(); 9719 resolve(); 9720 resolved = true; 9721 confirm.hide(); 9722 }); 9723 on(confirm.$el, 'hide', function () { 9724 if (!resolved) { 9725 reject(); 9726 } 9727 }); 9728 9729 }); 9730 }; 9731 9732 UIkit.modal.prompt = function (message, value, options) { 9733 9734 options = assign({bgClose: false, escClose: true, labels: UIkit.modal.labels}, options); 9735 9736 return new Promise(function (resolve) { 9737 9738 var prompt = UIkit.modal.dialog((" <form class=\"uk-form-stacked\"> <div class=\"uk-modal-body\"> <label>" + (isString(message) ? message : html(message)) + "</label> <input class=\"uk-input\" autofocus> </div> <div class=\"uk-modal-footer uk-text-right\"> <button class=\"uk-button uk-button-default uk-modal-close\" type=\"button\">" + (options.labels.cancel) + "</button> <button class=\"uk-button uk-button-primary\">" + (options.labels.ok) + "</button> </div> </form> "), options), 9739 input = $('input', prompt.$el); 9740 9741 input.value = value; 9742 9743 var resolved = false; 9744 9745 on(prompt.$el, 'submit', 'form', function (e) { 9746 e.preventDefault(); 9747 resolve(input.value); 9748 resolved = true; 9749 prompt.hide(); 9750 }); 9751 on(prompt.$el, 'hide', function () { 9752 if (!resolved) { 9753 resolve(null); 9754 } 9755 }); 9756 9757 }); 9758 }; 9759 9760 UIkit.modal.labels = { 9761 ok: 'Ok', 9762 cancel: 'Cancel' 9763 }; 9764 9765} 9766 9767function Nav (UIkit) { 9768 9769 UIkit.component('nav', UIkit.components.accordion.extend({ 9770 9771 name: 'nav', 9772 9773 defaults: { 9774 targets: '> .uk-parent', 9775 toggle: '> a', 9776 content: '> ul' 9777 } 9778 9779 })); 9780 9781} 9782 9783function Navbar (UIkit) { 9784 9785 UIkit.component('navbar', { 9786 9787 mixins: [Class], 9788 9789 props: { 9790 dropdown: String, 9791 mode: 'list', 9792 align: String, 9793 offset: Number, 9794 boundary: Boolean, 9795 boundaryAlign: Boolean, 9796 clsDrop: String, 9797 delayShow: Number, 9798 delayHide: Number, 9799 dropbar: Boolean, 9800 dropbarMode: String, 9801 dropbarAnchor: 'query', 9802 duration: Number 9803 }, 9804 9805 defaults: { 9806 dropdown: '.uk-navbar-nav > li', 9807 align: !isRtl ? 'left' : 'right', 9808 clsDrop: 'uk-navbar-dropdown', 9809 mode: undefined, 9810 offset: undefined, 9811 delayShow: undefined, 9812 delayHide: undefined, 9813 boundaryAlign: undefined, 9814 flip: 'x', 9815 boundary: true, 9816 dropbar: false, 9817 dropbarMode: 'slide', 9818 dropbarAnchor: false, 9819 duration: 200, 9820 }, 9821 9822 computed: { 9823 9824 boundary: function boundary(ref, $el) { 9825 var boundary = ref.boundary; 9826 var boundaryAlign = ref.boundaryAlign; 9827 9828 return (boundary === true || boundaryAlign) ? $el : boundary; 9829 }, 9830 9831 pos: function pos(ref) { 9832 var align = ref.align; 9833 9834 return ("bottom-" + align); 9835 } 9836 9837 }, 9838 9839 beforeConnect: function beforeConnect() { 9840 9841 var ref = this.$props; 9842 var dropbar = ref.dropbar; 9843 9844 this.dropbar = dropbar && (isString(dropbar) && query(dropbar, this.$el) || $('<div></div>')); 9845 9846 if (this.dropbar) { 9847 9848 addClass(this.dropbar, 'uk-navbar-dropbar'); 9849 9850 if (this.dropbarMode === 'slide') { 9851 addClass(this.dropbar, 'uk-navbar-dropbar-slide'); 9852 } 9853 } 9854 9855 }, 9856 9857 disconnected: function disconnected() { 9858 this.dropbar && remove(this.dropbar); 9859 }, 9860 9861 update: function update() { 9862 9863 UIkit.drop( 9864 $$(((this.dropdown) + " ." + (this.clsDrop)), this.$el).filter(function (el) { return !UIkit.getComponent(el, 'drop') && !UIkit.getComponent(el, 'dropdown'); }), 9865 assign({}, this.$props, {boundary: this.boundary, pos: this.pos, offset: this.dropbar || this.offset}) 9866 ); 9867 9868 }, 9869 9870 events: [ 9871 9872 { 9873 name: 'mouseover', 9874 9875 delegate: function delegate() { 9876 return this.dropdown; 9877 }, 9878 9879 handler: function handler(ref) { 9880 var current = ref.current; 9881 9882 var active = this.getActive(); 9883 if (active && active.toggle && !within(active.toggle.$el, current) && !active.tracker.movesTo(active.$el)) { 9884 active.hide(false); 9885 } 9886 } 9887 9888 }, 9889 9890 { 9891 name: 'mouseleave', 9892 9893 el: function el() { 9894 return this.dropbar; 9895 }, 9896 9897 handler: function handler() { 9898 var active = this.getActive(); 9899 9900 if (active && !matches(this.dropbar, ':hover')) { 9901 active.hide(); 9902 } 9903 } 9904 }, 9905 9906 { 9907 name: 'beforeshow', 9908 9909 capture: true, 9910 9911 filter: function filter() { 9912 return this.dropbar; 9913 }, 9914 9915 handler: function handler() { 9916 9917 if (!this.dropbar.parentNode) { 9918 after(this.dropbarAnchor || this.$el, this.dropbar); 9919 } 9920 9921 } 9922 }, 9923 9924 { 9925 name: 'show', 9926 9927 capture: true, 9928 9929 filter: function filter() { 9930 return this.dropbar; 9931 }, 9932 9933 handler: function handler(_, drop) { 9934 9935 var $el = drop.$el; 9936 var dir = drop.dir; 9937 9938 this.clsDrop && addClass($el, ((this.clsDrop) + "-dropbar")); 9939 9940 if (dir === 'bottom') { 9941 this.transitionTo($el.offsetHeight + toFloat(css($el, 'marginTop')) + toFloat(css($el, 'marginBottom')), $el); 9942 } 9943 } 9944 }, 9945 9946 { 9947 name: 'beforehide', 9948 9949 filter: function filter() { 9950 return this.dropbar; 9951 }, 9952 9953 handler: function handler(e, ref) { 9954 var $el = ref.$el; 9955 9956 9957 var active = this.getActive(); 9958 9959 if (matches(this.dropbar, ':hover') && active && active.$el === $el) { 9960 e.preventDefault(); 9961 } 9962 } 9963 }, 9964 9965 { 9966 name: 'hide', 9967 9968 filter: function filter() { 9969 return this.dropbar; 9970 }, 9971 9972 handler: function handler(_, ref) { 9973 var $el = ref.$el; 9974 9975 9976 var active = this.getActive(); 9977 9978 if (!active || active && active.$el === $el) { 9979 this.transitionTo(0); 9980 } 9981 } 9982 } 9983 9984 ], 9985 9986 methods: { 9987 9988 getActive: function getActive() { 9989 var active = UIkit.drop.getActive(); 9990 return active && includes(active.mode, 'hover') && within(active.toggle.$el, this.$el) && active; 9991 }, 9992 9993 transitionTo: function transitionTo(newHeight, el) { 9994 9995 var ref = this; 9996 var dropbar = ref.dropbar; 9997 var oldHeight = isVisible(dropbar) ? height(dropbar) : 0; 9998 9999 el = oldHeight < newHeight && el; 10000 10001 css(el, {height: oldHeight, overflow: 'hidden'}); 10002 height(dropbar, oldHeight); 10003 10004 Transition.cancel([el, dropbar]); 10005 return Transition 10006 .start([el, dropbar], {height: newHeight}, this.duration) 10007 .catch(noop) 10008 .then(function () { return css(el, {height: '', overflow: ''}); }); 10009 } 10010 10011 } 10012 10013 }); 10014 10015} 10016 10017var scroll; 10018 10019function Offcanvas (UIkit) { 10020 10021 UIkit.component('offcanvas', { 10022 10023 mixins: [Modal], 10024 10025 args: 'mode', 10026 10027 props: { 10028 content: String, 10029 mode: String, 10030 flip: Boolean, 10031 overlay: Boolean 10032 }, 10033 10034 defaults: { 10035 content: '.uk-offcanvas-content',
10036 mode: 'slide', 10037 flip: false, 10038 overlay: false, 10039 clsPage: 'uk-offcanvas-page', 10040 clsContainer: 'uk-offcanvas-container', 10041 selPanel: '.uk-offcanvas-bar', 10042 clsFlip: 'uk-offcanvas-flip', 10043 clsContent: 'uk-offcanvas-content', 10044 clsContentAnimation: 'uk-offcanvas-content-animation', 10045 clsSidebarAnimation: 'uk-offcanvas-bar-animation', 10046 clsMode: 'uk-offcanvas', 10047 clsOverlay: 'uk-offcanvas-overlay', 10048 selClose: '.uk-offcanvas-close' 10049 }, 10050 10051 computed: { 10052 10053 content: function content(ref) { 10054 var content = ref.content; 10055 10056 return $(content) || document.body; 10057 }, 10058 10059 clsFlip: function clsFlip(ref) { 10060 var flip = ref.flip; 10061 var clsFlip = ref.clsFlip; 10062 10063 return flip ? clsFlip : ''; 10064 }, 10065 10066 clsOverlay: function clsOverlay(ref) { 10067 var overlay = ref.overlay; 10068 var clsOverlay = ref.clsOverlay; 10069 10070 return overlay ? clsOverlay : ''; 10071 }, 10072 10073 clsMode: function clsMode(ref) { 10074 var mode = ref.mode; 10075 var clsMode = ref.clsMode; 10076 10077 return (clsMode + "-" + mode); 10078 }, 10079 10080 clsSidebarAnimation: function clsSidebarAnimation(ref) { 10081 var mode = ref.mode; 10082 var clsSidebarAnimation = ref.clsSidebarAnimation; 10083 10084 return mode === 'none' || mode === 'reveal' ? '' : clsSidebarAnimation; 10085 }, 10086 10087 clsContentAnimation: function clsContentAnimation(ref) { 10088 var mode = ref.mode; 10089 var clsContentAnimation = ref.clsContentAnimation; 10090 10091 return mode !== 'push' && mode !== 'reveal' ? '' : clsContentAnimation; 10092 }, 10093 10094 transitionElement: function transitionElement(ref) { 10095 var mode = ref.mode; 10096 10097 return mode === 'reveal' ? this.panel.parentNode : this.panel; 10098 } 10099 10100 }, 10101 10102 update: { 10103 10104 write: function write() { 10105 10106 if (this.getActive() === this) { 10107 10108 if (this.overlay || this.clsContentAnimation) { 10109 width(this.content, width(window) - this.scrollbarWidth); 10110 } 10111 10112 if (this.overlay) { 10113 height(this.content, height(window)); 10114 if (scroll) { 10115 this.content.scrollTop = scroll.y; 10116 } 10117 } 10118 10119 } 10120 10121 }, 10122 10123 events: ['resize'] 10124 10125 }, 10126 10127 events: [ 10128 10129 { 10130 10131 name: 'click', 10132 10133 delegate: function delegate() { 10134 return 'a[href^="#"]'; 10135 }, 10136 10137 handler: function handler(ref) { 10138 var current = ref.current; 10139 10140 if (current.hash && $(current.hash, this.content)) { 10141 scroll = null; 10142 this.hide(); 10143 } 10144 } 10145 10146 }, 10147 10148 { 10149 10150 name: 'beforescroll', 10151 10152 filter: function filter() { 10153 return this.overlay; 10154 }, 10155 10156 handler: function handler(e, scroll, target) { 10157 if (scroll && target && this.isToggled() && $(target, this.content)) { 10158 once(this.$el, 'hidden', function () { return scroll.scrollTo(target); }); 10159 e.preventDefault(); 10160 } 10161 } 10162 10163 }, 10164 10165 { 10166 name: 'show', 10167 10168 self: true, 10169 10170 handler: function handler() { 10171 10172 scroll = scroll || {x: window.pageXOffset, y: window.pageYOffset}; 10173 10174 if (this.mode === 'reveal' && !hasClass(this.panel, this.clsMode)) { 10175 wrapAll(this.panel, '<div>'); 10176 addClass(this.panel.parentNode, this.clsMode); 10177 } 10178 10179 css(document.documentElement, 'overflowY', (!this.clsContentAnimation || this.flip) && this.scrollbarWidth && this.overlay ? 'scroll' : ''); 10180 addClass(document.body, this.clsContainer, this.clsFlip, this.clsOverlay); 10181 height(document.body); // force reflow 10182 addClass(this.content, this.clsContentAnimation); 10183 addClass(this.panel, this.clsSidebarAnimation, this.mode !== 'reveal' ? this.clsMode : ''); 10184 addClass(this.$el, this.clsOverlay); 10185 css(this.$el, 'display', 'block'); 10186 height(this.$el); // force reflow 10187 10188 } 10189 }, 10190 10191 { 10192 name: 'hide', 10193 10194 self: true, 10195 10196 handler: function handler() { 10197 removeClass(this.content, this.clsContentAnimation); 10198 10199 var active = this.getActive(); 10200 if (this.mode === 'none' || active && active !== this && active !== this.prev) { 10201 trigger(this.panel, 'transitionend'); 10202 } 10203 } 10204 }, 10205 10206 { 10207 name: 'hidden', 10208 10209 self: true, 10210 10211 handler: function handler() { 10212 10213 if (this.mode === 'reveal') { 10214 unwrap(this.panel); 10215 } 10216 10217 if (!this.overlay) {
10218 scroll = {x: window.pageXOffset, y: window.pageYOffset}; 10219 } else if (!scroll) { 10220 var ref = this.content; 10221 var x = ref.scrollLeft; 10222 var y = ref.scrollTop; 10223 scroll = {x: x, y: y}; 10224 } 10225 10226 removeClass(this.panel, this.clsSidebarAnimation, this.clsMode); 10227 removeClass(this.$el, this.clsOverlay); 10228 css(this.$el, 'display', ''); 10229 removeClass(document.body, this.clsContainer, this.clsFlip, this.clsOverlay); 10230 document.body.scrollTop = scroll.y; 10231 10232 css(document.documentElement, 'overflowY', ''); 10233 10234 width(this.content, ''); 10235 height(this.content, ''); 10236 10237 window.scrollTo(scroll.x, scroll.y); 10238 10239 scroll = null; 10240 10241 } 10242 }, 10243 10244 { 10245 name: 'swipeLeft swipeRight', 10246 10247 handler: function handler(e) { 10248 10249 if (this.isToggled() && isTouch(e) && (e.type === 'swipeLeft' && !this.flip || e.type === 'swipeRight' && this.flip)) { 10250 this.hide(); 10251 } 10252 10253 } 10254 } 10255 10256 ] 10257 10258 }); 10259 10260} 10261 10262function Responsive (UIkit) { 10263 10264 UIkit.component('responsive', { 10265 10266 props: ['width', 'height'], 10267 10268 init: function init() { 10269 addClass(this.$el, 'uk-responsive-width'); 10270 }, 10271 10272 update: { 10273 10274 read: function read() { 10275 return isVisible(this.$el) && this.width && this.height 10276 ? {width: width(this.$el.parentNode), height: this.height} 10277 : false; 10278 }, 10279 10280 write: function write(dim) { 10281 height(this.$el, Dimensions.contain({height: this.height, width: this.width}, dim).height); 10282 }, 10283 10284 events: ['load', 'resize'] 10285 10286 } 10287 10288 }); 10289 10290} 10291 10292function Scroll (UIkit) { 10293 10294 UIkit.component('scroll', { 10295 10296 props: { 10297 duration: Number, 10298 offset: Number 10299 }, 10300 10301 defaults: { 10302 duration: 1000, 10303 offset: 0 10304 }, 10305 10306 methods: { 10307 10308 scrollTo: function scrollTo(el) { 10309 var this$1 = this; 10310 10311 10312 el = el && $(el) || document.body; 10313 10314 var docHeight = height(document); 10315 var winHeight = height(window); 10316 10317 var target = offset(el).top - this.offset; 10318 if (target + winHeight > docHeight) { 10319 target = docHeight - winHeight; 10320 } 10321 10322 if (!trigger(this.$el, 'beforescroll', [this, el])) { 10323 return; 10324 } 10325 10326 var start = Date.now(); 10327 var startY = window.pageYOffset; 10328 var step = function () { 10329 10330 var currentY = startY + (target - startY) * ease(clamp((Date.now() - start) / this$1.duration)); 10331 10332 window.scrollTo(window.pageXOffset, currentY); 10333 10334 // scroll more if we have not reached our destination 10335 if (currentY !== target) { 10336 requestAnimationFrame(step); 10337 } else { 10338 trigger(this$1.$el, 'scrolled', [this$1, el]); 10339 } 10340 10341 }; 10342 10343 step(); 10344 10345 } 10346 10347 }, 10348 10349 events: { 10350 10351 click: function click(e) { 10352 10353 if (e.defaultPrevented) { 10354 return; 10355 } 10356 10357 e.preventDefault(); 10358 this.scrollTo(escape(this.$el.hash).substr(1)); 10359 } 10360 10361 } 10362 10363 }); 10364 10365 function ease(k) { 10366 return 0.5 * (1 - Math.cos(Math.PI * k)); 10367 } 10368 10369} 10370 10371function Scrollspy (UIkit) { 10372 10373 UIkit.component('scrollspy', { 10374 10375 args: 'cls', 10376 10377 props: { 10378 cls: 'list', 10379 target: String, 10380 hidden: Boolean, 10381 offsetTop: Number, 10382 offsetLeft: Number, 10383 repeat: Boolean, 10384 delay: Number 10385 }, 10386 10387 defaults: { 10388 cls: [], 10389 target: false, 10390 hidden: true, 10391 offsetTop: 0, 10392 offsetLeft: 0, 10393 repeat: false, 10394 delay: 0, 10395 inViewClass: 'uk-scrollspy-inview' 10396 }, 10397 10398 computed: { 10399 10400 elements: function elements(ref, $el) { 10401 var target = ref.target; 10402 10403 return target ? $$(target, $el) : [$el]; 10404 } 10405 10406 }, 10407 10408 update: [ 10409 10410 { 10411 10412 write: function write() { 10413 if (this.hidden) { 10414 css(filter(this.elements, (":not(." + (this.inViewClass) + ")")), 'visibility', 'hidden'); 10415 } 10416 } 10417 10418 }, 10419 10420 { 10421 10422 read: function read(els) { 10423 var this$1 = this; 10424 10425 10426 // Let child components be applied at least once first 10427 if (!UIkit._initialized) { 10428 10429 if (document.readyState === 'complete') { 10430 requestAnimationFrame(function () { return this$1.$emit(); }); 10431 } 10432 10433 return false;
10434 } 10435 10436 this.elements.forEach(function (el, i) { 10437 10438 var elData = els[i]; 10439 10440 if (!elData || elData.el !== el) { 10441 var cls = data(el, 'uk-scrollspy-class'); 10442 elData = {el: el, toggles: cls && cls.split(',') || this$1.cls}; 10443 } 10444 10445 elData.show = isInView(el, this$1.offsetTop, this$1.offsetLeft); 10446 els[i] = elData; 10447 10448 }); 10449 }, 10450 10451 write: function write(els) { 10452 var this$1 = this; 10453 10454 10455 var index = this.elements.length === 1 ? 1 : 0; 10456 10457 this.elements.forEach(function (el, i) { 10458 10459 var elData = els[i]; 10460 var cls = elData.toggles[i] || elData.toggles[0]; 10461 10462 if (elData.show && !elData.inview && !elData.timer) { 10463 10464 var show = function () { 10465 css(el, 'visibility', ''); 10466 addClass(el, this$1.inViewClass); 10467 toggleClass(el, cls); 10468 10469 trigger(el, 'inview'); 10470 10471 UIkit.update(el); 10472 10473 elData.inview = true; 10474 delete elData.timer; 10475 }; 10476 10477 if (this$1.delay && index) { 10478 elData.timer = setTimeout(show, this$1.delay * index); 10479 } else { 10480 show(); 10481 } 10482 10483 index++; 10484 10485 } else if (!elData.show && elData.inview && this$1.repeat) { 10486 10487 if (elData.timer) { 10488 clearTimeout(elData.timer); 10489 delete elData.timer; 10490 } 10491 10492 css(el, 'visibility', this$1.hidden ? 'hidden' : ''); 10493 removeClass(el, this$1.inViewClass); 10494 toggleClass(el, cls); 10495 10496 trigger(el, 'outview'); 10497 10498 UIkit.update(el); 10499 10500 elData.inview = false; 10501 10502 } 10503 10504 10505 }); 10506 10507 }, 10508 10509 events: ['scroll', 'load', 'resize'] 10510 10511 } 10512 10513 ] 10514 10515 }); 10516 10517} 10518 10519function ScrollspyNav (UIkit) { 10520 10521 UIkit.component('scrollspy-nav', { 10522 10523 props: { 10524 cls: String, 10525 closest: String, 10526 scroll: Boolean, 10527 overflow: Boolean, 10528 offset: Number 10529 }, 10530 10531 defaults: { 10532 cls: 'uk-active', 10533 closest: false, 10534 scroll: false, 10535 overflow: true, 10536 offset: 0 10537 }, 10538 10539 computed: { 10540 10541 links: function links(_, $el) { 10542 return $$('a[href^="#"]', $el).filter(function (el) { return el.hash; }); 10543 }, 10544 10545 elements: function elements() { 10546 return this.closest ? closest(this.links, this.closest) : this.links; 10547 }, 10548 10549 targets: function targets() { 10550 return $$(this.links.map(function (el) { return el.hash; }).join(',')); 10551 } 10552 10553 }, 10554 10555 update: [ 10556 10557 { 10558 10559 read: function read() { 10560 if (this.scroll) { 10561 UIkit.scroll(this.links, {offset: this.offset || 0}); 10562 } 10563 } 10564 10565 }, 10566 10567 { 10568 10569 read: function read(data) { 10570 var this$1 = this; 10571 10572 10573 var scroll = window.pageYOffset + this.offset + 1; 10574 var max = height(document) - height(window) + this.offset; 10575 10576 data.active = false; 10577 10578 this.targets.every(function (el, i) { 10579 10580 var ref = offset(el); 10581 var top = ref.top; 10582 var last = i + 1 === this$1.targets.length; 10583 10584 if (!this$1.overflow && (i === 0 && top > scroll || last && top + el.offsetTop < scroll)) { 10585 return false;
10586 } 10587 10588 if (!last && offset(this$1.targets[i + 1]).top <= scroll) { 10589 return true; 10590 } 10591 10592 if (scroll >= max) { 10593 for (var j = this$1.targets.length - 1; j > i; j--) { 10594 if (isInView(this$1.targets[j])) { 10595 el = this$1.targets[j]; 10596 break; 10597 } 10598 } 10599 } 10600 10601 return !(data.active = $(filter(this$1.links, ("[href=\"#" + (el.id) + "\"]")))); 10602 10603 }); 10604 10605 }, 10606 10607 write: function write(ref) { 10608 var active = ref.active; 10609 10610 10611 this.links.forEach(function (el) { return el.blur(); }); 10612 removeClass(this.elements, this.cls); 10613 10614 if (active) { 10615 trigger(this.$el, 'active', [active, addClass(this.closest ? closest(active, this.closest) : active, this.cls)]); 10616 } 10617 10618 }, 10619 10620 events: ['scroll', 'load', 'resize'] 10621 10622 } 10623 10624 ] 10625 10626 }); 10627 10628} 10629 10630function Sticky (UIkit) { 10631 10632 UIkit.component('sticky', { 10633 10634 mixins: [Class], 10635 10636 attrs: true, 10637 10638 props: { 10639 top: null, 10640 bottom: Boolean, 10641 offset: Number, 10642 animation: String, 10643 clsActive: String, 10644 clsInactive: String, 10645 clsFixed: String, 10646 clsBelow: String, 10647 selTarget: String, 10648 widthElement: 'query', 10649 showOnUp: Boolean, 10650 media: 'media', 10651 target: Number 10652 }, 10653 10654 defaults: { 10655 top: 0, 10656 bottom: false, 10657 offset: 0, 10658 animation: '', 10659 clsActive: 'uk-active', 10660 clsInactive: '', 10661 clsFixed: 'uk-sticky-fixed', 10662 clsBelow: 'uk-sticky-below', 10663 selTarget: '', 10664 widthElement: false, 10665 showOnUp: false, 10666 media: false, 10667 target: false 10668 }, 10669 10670 computed: { 10671 10672 selTarget: function selTarget(ref, $el) { 10673 var selTarget = ref.selTarget; 10674 10675 return selTarget && $(selTarget, $el) || $el; 10676 } 10677 10678 }, 10679 10680 connected: function connected() { 10681 10682 this.placeholder = $('<div class="uk-sticky-placeholder"></div>'); 10683 this.widthElement = this.$props.widthElement || this.placeholder; 10684 10685 if (!this.isActive) { 10686 this.hide(); 10687 } 10688 }, 10689 10690 disconnected: function disconnected() { 10691 10692 if (this.isActive) { 10693 this.isActive = false; 10694 this.hide(); 10695 removeClass(this.selTarget, this.clsInactive); 10696 } 10697 10698 remove(this.placeholder); 10699 this.placeholder = null; 10700 this.widthElement = null; 10701 }, 10702 10703 ready: function ready() { 10704 var this$1 = this; 10705 10706 10707 if (!(this.target && location.hash && window.pageYOffset > 0)) { 10708 return; 10709 } 10710 10711 var target = $(location.hash); 10712 10713 if (target) { 10714 fastdom.read(function () { 10715 10716 var ref = offset(target); 10717 var top = ref.top; 10718 var elTop = offset(this$1.$el).top; 10719 var elHeight = this$1.$el.offsetHeight; 10720 10721 if (elTop + elHeight >= top && elTop <= top + target.offsetHeight) { 10722 window.scrollTo(0, top - elHeight - this$1.target - this$1.offset); 10723 } 10724 10725 }); 10726 } 10727 10728 }, 10729 10730 events: [ 10731 10732 { 10733 name: 'active', 10734 10735 self: true, 10736 10737 handler: function handler() { 10738 replaceClass(this.selTarget, this.clsInactive, this.clsActive); 10739 } 10740 10741 }, 10742 10743 { 10744 name: 'inactive', 10745 10746 self: true, 10747 10748 handler: function handler() { 10749 replaceClass(this.selTarget, this.clsActive, this.clsInactive); 10750 } 10751 10752 } 10753 10754 ], 10755 10756 update: [ 10757 10758 { 10759 10760 write: function write() { 10761 10762 var ref = this; 10763 var placeholder = ref.placeholder; 10764 var outerHeight = (this.isActive ? placeholder : this.$el).offsetHeight; 10765 10766 css(placeholder, assign( 10767 {height: css(this.$el, 'position') !== 'absolute' ? outerHeight : ''}, 10768 css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight']) 10769 )); 10770 10771 if (!within(placeholder, document)) { 10772 after(this.$el, placeholder); 10773 attr(placeholder, 'hidden', ''); 10774 } 10775 10776 attr(this.widthElement, 'hidden', null); 10777 this.width = this.widthElement.offsetWidth; 10778 attr(this.widthElement, 'hidden', this.isActive ? null : ''); 10779 10780 this.topOffset = offset(this.isActive ? placeholder : this.$el).top; 10781 this.bottomOffset = this.topOffset + outerHeight; 10782 10783 var bottom = parseProp('bottom', this); 10784 10785 this.top = Math.max(toFloat(parseProp('top', this)), this.topOffset) - this.offset; 10786 this.bottom = bottom && bottom - outerHeight; 10787 this.inactive = this.media && !window.matchMedia(this.media).matches; 10788 10789 if (this.isActive) { 10790 this.update(); 10791 } 10792 }, 10793 10794 events: ['load', 'resize'] 10795 10796 }, 10797 10798 { 10799 10800 read: function read(_, ref) { 10801 var scrollY = ref.scrollY; if ( scrollY === void 0 ) scrollY = window.pageYOffset; 10802 10803 return { 10804 scroll: this.scroll = scrollY, 10805 visible: isVisible(this.$el) 10806 }; 10807 }, 10808 10809 write: function write(ref, ref$1) { 10810 var this$1 = this; 10811 var visible = ref.visible; 10812 var scroll = ref.scroll; 10813 if ( ref$1 === void 0 ) ref$1 = {}; 10814 var dir = ref$1.dir; 10815 10816 10817 if (scroll < 0 || !visible || this.disabled || this.showOnUp && !dir) { 10818 return; 10819 } 10820 10821 if (this.inactive 10822 || scroll < this.top 10823 || this.showOnUp && (scroll <= this.top || dir === 'down' || dir === 'up' && !this.isActive && scroll <= this.bottomOffset) 10824 ) { 10825 10826 if (!this.isActive) { 10827 return; 10828 } 10829 10830 this.isActive = false;
10831 10832 if (this.animation && scroll > this.topOffset) { 10833 Animation.cancel(this.$el); 10834 Animation.out(this.$el, this.animation).then(function () { return this$1.hide(); }, noop); 10835 } else { 10836 this.hide(); 10837 } 10838 10839 } else if (this.isActive) { 10840 10841 this.update(); 10842 10843 } else if (this.animation) { 10844 10845 Animation.cancel(this.$el); 10846 this.show(); 10847 Animation.in(this.$el, this.animation).catch(noop); 10848 10849 } else { 10850 this.show(); 10851 } 10852 10853 }, 10854 10855 events: ['scroll'] 10856 10857 } ], 10858 10859 methods: { 10860 10861 show: function show() { 10862 10863 this.isActive = true; 10864 this.update(); 10865 attr(this.placeholder, 'hidden', null); 10866 10867 }, 10868 10869 hide: function hide() { 10870 10871 if (!this.isActive || hasClass(this.selTarget, this.clsActive)) { 10872 trigger(this.$el, 'inactive'); 10873 } 10874 10875 removeClass(this.$el, this.clsFixed, this.clsBelow); 10876 css(this.$el, {position: '', top: '', width: ''}); 10877 attr(this.placeholder, 'hidden', ''); 10878 10879 }, 10880 10881 update: function update() { 10882 10883 var active = this.top !== 0 || this.scroll > this.top; 10884 var top = Math.max(0, this.offset); 10885 10886 if (this.bottom && this.scroll > this.bottom - this.offset) { 10887 top = this.bottom - this.scroll; 10888 } 10889 10890 css(this.$el, { 10891 position: 'fixed', 10892 top: (top + "px"), 10893 width: this.width 10894 }); 10895 10896 if (hasClass(this.selTarget, this.clsActive)) { 10897 10898 if (!active) { 10899 trigger(this.$el, 'inactive'); 10900 } 10901 10902 } else if (active) { 10903 trigger(this.$el, 'active'); 10904 } 10905 10906 toggleClass(this.$el, this.clsBelow, this.scroll > this.bottomOffset); 10907 addClass(this.$el, this.clsFixed); 10908 10909 } 10910 10911 } 10912 10913 }); 10914 10915 function parseProp(prop, ref) { 10916 var $props = ref.$props; 10917 var $el = ref.$el; 10918 var propOffset = ref[(prop + "Offset")]; 10919 10920 10921 var value = $props[prop]; 10922 10923 if (!value) { 10924 return; 10925 } 10926 10927 if (isNumeric(value)) { 10928 10929 return propOffset + toFloat(value); 10930 10931 } else if (isString(value) && value.match(/^-?\d+vh$/)) { 10932 10933 return height(window) * toFloat(value) / 100; 10934 10935 } else { 10936 10937 var el = value === true ? $el.parentNode : query(value, $el); 10938 10939 if (el) { 10940 return offset(el).top + el.offsetHeight; 10941 } 10942 10943 } 10944 } 10945 10946} 10947 10948var svgs = {}; 10949 10950function Svg (UIkit) { 10951 10952 UIkit.component('svg', { 10953 10954 attrs: true, 10955 10956 props: { 10957 id: String, 10958 icon: String, 10959 src: String, 10960 style: String, 10961 width: Number, 10962 height: Number, 10963 ratio: Number, 10964 'class': String 10965 }, 10966 10967 defaults: { 10968 ratio: 1, 10969 id: false, 10970 exclude: ['src'], 10971 'class': '' 10972 }, 10973 10974 init: function init() { 10975 this.class += ' uk-svg'; 10976 }, 10977 10978 connected: function connected() { 10979 var this$1 = this; 10980 10981 10982 if (!this.icon && includes(this.src, '#')) { 10983 10984 var parts = this.src.split('#'); 10985 10986 if (parts.length > 1) { 10987 var assign; 10988 (assign = parts, this.src = assign[0], this.icon = assign[1]); 10989 } 10990 } 10991 10992 this.svg = this.getSvg().then(function (svg) { 10993 10994 var el; 10995 10996 if (isString(svg)) { 10997 10998 if (this$1.icon && includes(svg, '<symbol')) { 10999 svg = parseSymbols(svg, this$1.icon) || svg; 11000 } 11001 11002 el = $(svg.substr(svg.indexOf('<svg'))); 11003 11004 } else { 11005 el = svg.cloneNode(true); 11006 } 11007 11008 if (!el) { 11009 return Promise.reject('SVG not found.'); 11010 } 11011 11012 var dimensions = attr(el, 'viewBox'); 11013 11014 if (dimensions) { 11015 dimensions = dimensions.split(' '); 11016 this$1.width = this$1.$props.width || dimensions[2]; 11017 this$1.height = this$1.$props.height || dimensions[3]; 11018 } 11019 11020 this$1.width *= this$1.ratio; 11021 this$1.height *= this$1.ratio; 11022 11023 for (var prop in this$1.$options.props) { 11024 if (this$1[prop] && !includes(this$1.exclude, prop)) { 11025 attr(el, prop, this$1[prop]); 11026 } 11027 } 11028 11029 if (!this$1.id) { 11030 removeAttr(el, 'id'); 11031 } 11032 11033 if (this$1.width && !this$1.height) { 11034 removeAttr(el, 'height'); 11035 } 11036 11037 if (this$1.height && !this$1.width) { 11038 removeAttr(el, 'width'); 11039 } 11040 11041 var root = this$1.$el; 11042 if (isVoidElement(root) || root.tagName === 'CANVAS') { 11043 11044 attr(root, {hidden: true, id: null}); 11045 11046 var next = root.nextElementSibling; 11047 if (next && el.isEqualNode(next)) { 11048 el = next; 11049 } else { 11050 after(root, el); 11051 } 11052 11053 } else { 11054 11055 var last = root.lastElementChild; 11056 if (last && el.isEqualNode(last)) { 11057 el = last; 11058 } else { 11059 append(root, el); 11060 } 11061 11062 } 11063 11064 this$1.svgEl = el; 11065 11066 return el; 11067 11068 }, noop); 11069 11070 }, 11071 11072 disconnected: function disconnected() { 11073 var this$1 = this; 11074 11075 11076 if (isVoidElement(this.$el)) { 11077 attr(this.$el, {hidden: null, id: this.id || null}); 11078 } 11079 11080 if (this.svg) { 11081 this.svg.then(function (svg) { return (!this$1._connected || svg !== this$1.svgEl) && remove(svg); }, noop); 11082 } 11083 11084 this.svg = this.svgEl = null; 11085 11086 }, 11087 11088 methods: { 11089 11090 getSvg: function getSvg() { 11091 var this$1 = this; 11092 11093 11094 if (!this.src) { 11095 return Promise.reject(); 11096 } 11097 11098 if (svgs[this.src]) { 11099 return svgs[this.src]; 11100 } 11101 11102 svgs[this.src] = new Promise(function (resolve, reject) { 11103 11104 if (startsWith(this$1.src, 'data:')) { 11105 resolve(decodeURIComponent(this$1.src.split(',')[1])); 11106 } else { 11107 11108 ajax(this$1.src).then( 11109 function (xhr) { return resolve(xhr.response); }, 11110 function () { return reject('SVG not found.'); } 11111 ); 11112 11113 } 11114 11115 }); 11116 11117 return svgs[this.src]; 11118 11119 } 11120 11121 } 11122 11123 }); 11124 11125 var symbolRe = /<symbol(.*?id=(['"])(.*?)\2[^]*?<\/)symbol>/g; 11126 var symbols = {}; 11127 11128 function parseSymbols(svg, icon) { 11129 11130 if (!symbols[svg]) { 11131 11132 symbols[svg] = {}; 11133 11134 var match; 11135 while ((match = symbolRe.exec(svg))) { 11136 symbols[svg][match[3]] = "<svg xmlns=\"http://www.w3.org/2000/svg\"" + (match[1]) + "svg>"; 11137 } 11138 11139 } 11140 11141 return symbols[svg][icon]; 11142 } 11143 11144} 11145 11146function Switcher (UIkit) { 11147 11148 UIkit.component('switcher', { 11149 11150 mixins: [Togglable], 11151 11152 args: 'connect', 11153 11154 props: { 11155 connect: String, 11156 toggle: String, 11157 active: Number, 11158 swiping: Boolean 11159 }, 11160 11161 defaults: { 11162 connect: '~.uk-switcher', 11163 toggle: '> *', 11164 active: 0, 11165 swiping: true, 11166 cls: 'uk-active', 11167 clsContainer: 'uk-switcher', 11168 attrItem: 'uk-switcher-item', 11169 queued: true 11170 }, 11171 11172 computed: { 11173 11174 connects: function connects(ref, $el) { 11175 var connect = ref.connect; 11176 11177 return queryAll(connect, $el); 11178 }, 11179 11180 toggles: function toggles(ref, $el) { 11181 var toggle = ref.toggle; 11182 11183 return $$(toggle, $el); 11184 } 11185 11186 }, 11187 11188 events: [ 11189 11190 { 11191 11192 name: 'click', 11193 11194 delegate: function delegate() { 11195 return ((this.toggle) + ":not(.uk-disabled)"); 11196 }, 11197 11198 handler: function handler(e) { 11199 e.preventDefault(); 11200 this.show(e.current); 11201 } 11202 11203 }, 11204 11205 { 11206 name: 'click', 11207 11208 el: function el() { 11209 return this.connects; 11210 }, 11211 11212 delegate: function delegate() { 11213 return ("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]"); 11214 }, 11215 11216 handler: function handler(e) { 11217 e.preventDefault(); 11218 this.show(data(e.current, this.attrItem)); 11219 } 11220 }, 11221 11222 { 11223 name: 'swipeRight swipeLeft', 11224 11225 filter: function filter() { 11226 return this.swiping; 11227 }, 11228 11229 el: function el() { 11230 return this.connects; 11231 }, 11232 11233 handler: function handler(e) { 11234 if (!isTouch(e)) { 11235 return; 11236 } 11237 11238 e.preventDefault(); 11239 if (!window.getSelection().toString()) { 11240 this.show(e.type === 'swipeLeft' ? 'next' : 'previous'); 11241 } 11242 } 11243 } 11244 11245 ], 11246
11247 update: function update() { 11248 var this$1 = this; 11249 11250 11251 this.connects.forEach(function (list) { return this$1.updateAria(list.children); }); 11252 this.show(filter(this.toggles, ("." + (this.cls)))[0] || this.toggles[this.active] || this.toggles[0]); 11253 11254 }, 11255 11256 methods: { 11257 11258 show: function show(item) { 11259 var this$1 = this; 11260 11261 11262 var ref = this.toggles; 11263 var length = ref.length; 11264 var prev = !!this.connects.length && index(filter(this.connects[0].children, ("." + (this.cls)))[0]); 11265 var hasPrev = prev >= 0; 11266 var dir = item === 'previous' ? -1 : 1; 11267 11268 var toggle, next = getIndex(item, this.toggles, prev); 11269 11270 for (var i = 0; i < length; i++, next = (next + dir + length) % length) { 11271 if (!matches(this$1.toggles[next], '.uk-disabled, [disabled]')) { 11272 toggle = this$1.toggles[next]; 11273 break; 11274 } 11275 } 11276 11277 if (!toggle || prev >= 0 && hasClass(toggle, this.cls) || prev === next) { 11278 return; 11279 } 11280 11281 removeClass(this.toggles, this.cls); 11282 attr(this.toggles, 'aria-expanded', false); 11283 addClass(toggle, this.cls); 11284 attr(toggle, 'aria-expanded', true); 11285 11286 this.connects.forEach(function (list) { 11287 if (!hasPrev) { 11288 this$1.toggleNow(list.children[next]); 11289 } else { 11290 this$1.toggleElement([list.children[prev], list.children[next]]); 11291 } 11292 }); 11293 11294 } 11295 11296 } 11297 11298 }); 11299 11300} 11301 11302function Tab (UIkit) { 11303 11304 UIkit.component('tab', UIkit.components.switcher.extend({ 11305 11306 mixins: [Class], 11307 11308 name: 'tab', 11309 11310 props: { 11311 media: 'media' 11312 }, 11313 11314 defaults: { 11315 media: 960, 11316 attrItem: 'uk-tab-item' 11317 }, 11318 11319 init: function init() { 11320 11321 var cls = hasClass(this.$el, 'uk-tab-left') 11322 ? 'uk-tab-left' 11323 : hasClass(this.$el, 'uk-tab-right') 11324 ? 'uk-tab-right' 11325 : false; 11326 11327 if (cls) { 11328 UIkit.toggle(this.$el, {cls: cls, mode: 'media', media: this.media}); 11329 } 11330 } 11331 11332 })); 11333 11334} 11335 11336function Toggle (UIkit) { 11337 11338 UIkit.component('toggle', { 11339 11340 mixins: [UIkit.mixin.togglable], 11341 11342 args: 'target', 11343 11344 props: { 11345 href: String, 11346 target: null, 11347 mode: 'list', 11348 media: 'media' 11349 }, 11350 11351 defaults: { 11352 href: false, 11353 target: false, 11354 mode: 'click', 11355 queued: true, 11356 media: false 11357 }, 11358 11359 computed: { 11360 11361 target: function target(ref, $el) { 11362 var href = ref.href; 11363 var target = ref.target; 11364 11365 target = queryAll(target || href, $el); 11366 return target.length && target || [$el]; 11367 } 11368 11369 }, 11370 11371 events: [ 11372 11373 { 11374 11375 name: (pointerEnter + " " + pointerLeave), 11376 11377 filter: function filter() { 11378 return includes(this.mode, 'hover'); 11379 }, 11380 11381 handler: function handler(e) { 11382 if (!isTouch(e)) { 11383 this.toggle(("toggle" + (e.type === pointerEnter ? 'show' : 'hide'))); 11384 } 11385 } 11386 11387 }, 11388 11389 { 11390 11391 name: 'click', 11392 11393 filter: function filter() { 11394 return includes(this.mode, 'click') || hasTouch; 11395 }, 11396 11397 handler: function handler(e) { 11398 11399 if (!isTouch(e) && !includes(this.mode, 'click')) { 11400 return; 11401 } 11402 11403 // TODO better isToggled handling 11404 var link; 11405 if (closest(e.target, 'a[href="#"], button') 11406 || (link = closest(e.target, 'a[href]')) && ( 11407 this.cls 11408 || !isVisible(this.target) 11409 || link.hash && matches(this.target, link.hash) 11410 ) 11411 ) { 11412 once(document, 'click', function (e) { return e.preventDefault(); }); 11413 } 11414 11415 this.toggle(); 11416 } 11417 11418 } 11419 ], 11420 11421 update: { 11422 11423 write: function write() { 11424 11425 if (!includes(this.mode, 'media') || !this.media) { 11426 return; 11427 } 11428 11429 var toggled = this.isToggled(this.target); 11430 if (window.matchMedia(this.media).matches ? !toggled : toggled) { 11431 this.toggle(); 11432 } 11433 11434 }, 11435 11436 events: ['load', 'resize'] 11437 11438 }, 11439 11440 methods: { 11441 11442 toggle: function toggle(type) { 11443 if (trigger(this.target, type || 'toggle', [this])) { 11444 this.toggleElement(this.target); 11445 } 11446 } 11447 11448 } 11449 11450 }); 11451 11452} 11453 11454function Video (UIkit) { 11455 11456 UIkit.component('video', { 11457 11458 args: 'autoplay', 11459 11460 props: { 11461 automute: Boolean, 11462 autoplay: Boolean, 11463 }, 11464 11465 defaults: { 11466 automute: false, 11467 autoplay: true 11468 }, 11469 11470 computed: { 11471 11472 inView: function inView(ref) { 11473 var autoplay = ref.autoplay; 11474 11475 return autoplay === 'inview'; 11476 } 11477 11478 }, 11479 11480 connected: function connected() { 11481 11482 if (this.inView && !hasAttr(this.$el, 'preload')) { 11483 this.$el.preload = 'none'; 11484 } 11485 11486 }, 11487 11488 ready: function ready() { 11489 11490 this.player = new Player(this.$el); 11491 11492 if (this.automute) { 11493 this.player.mute(); 11494 } 11495 11496 }, 11497 11498 update: [ 11499 11500 { 11501 11502 read: function read(_, ref) { 11503 var type = ref.type; 11504 11505 11506 return !this.player || (type === 'scroll' || type === 'resize') && !this.inView 11507 ? false 11508 : { 11509 visible: isVisible(this.$el) && css(this.$el, 'visibility') !== 'hidden', 11510 inView: this.inView && isInView(this.$el) 11511 }; 11512 }, 11513 11514 write: function write(ref) { 11515 var visible = ref.visible; 11516 var inView = ref.inView; 11517 11518 11519 if (!visible || this.inView && !inView) { 11520 this.player.pause(); 11521 } else if (this.autoplay === true || this.inView && inView) { 11522 this.player.play(); 11523 } 11524 11525 }, 11526 11527 events: ['load', 'resize', 'scroll'] 11528 11529 } 11530 11531 ], 11532 11533 }); 11534 11535} 11536 11537function core (UIkit) { 11538 11539 // core components 11540 UIkit.use(Toggle); 11541 UIkit.use(Accordion); 11542 UIkit.use(Alert); 11543 UIkit.use(Video); 11544 UIkit.use(Cover); 11545 UIkit.use(Drop); 11546 UIkit.use(Dropdown); 11547 UIkit.use(FormCustom); 11548 UIkit.use(HeightMatch); 11549 UIkit.use(HeightViewport); 11550 UIkit.use(Margin); 11551 UIkit.use(Gif); 11552 UIkit.use(Grid); 11553 UIkit.use(Leader); 11554 UIkit.use(Modal$1); 11555 UIkit.use(Nav); 11556 UIkit.use(Navbar); 11557 UIkit.use(Offcanvas); 11558 UIkit.use(Responsive); 11559 UIkit.use(Scroll); 11560 UIkit.use(Scrollspy); 11561 UIkit.use(ScrollspyNav); 11562 UIkit.use(Sticky); 11563 UIkit.use(Svg); 11564 UIkit.use(Icon); 11565 UIkit.use(Switcher); 11566 UIkit.use(Tab); 11567 11568 // core functionality 11569 UIkit.use(Core); 11570 11571} 11572 11573UIkit$2.version = '3.0.0-beta.42'; 11574 11575mixin(UIkit$2); 11576core(UIkit$2); 11577 11578function plugin(UIkit) { 11579 11580 if (plugin.installed) { 11581 return; 11582 } 11583 11584 var ref = UIkit.util; 11585 var $ = ref.$; 11586 var empty = ref.empty; 11587 var html = ref.html; 11588 11589 UIkit.component('countdown', { 11590 11591 mixins: [UIkit.mixin.class], 11592 11593 attrs: true, 11594 11595 props: { 11596 date: String, 11597 clsWrapper: String 11598 }, 11599 11600 defaults: { 11601 date: '', 11602 clsWrapper: '.uk-countdown-%unit%' 11603 }, 11604 11605 computed: { 11606 11607 date: function date(ref) { 11608 var date = ref.date; 11609 11610 return Date.parse(date); 11611 }, 11612 11613 days: function days(ref, $el) { 11614 var clsWrapper = ref.clsWrapper; 11615 11616 return $(clsWrapper.replace('%unit%', 'days'), $el); 11617 }, 11618 11619 hours: function hours(ref, $el) { 11620 var clsWrapper = ref.clsWrapper; 11621 11622 return $(clsWrapper.replace('%unit%', 'hours'), $el); 11623 }, 11624 11625 minutes: function minutes(ref, $el) { 11626 var clsWrapper = ref.clsWrapper; 11627 11628 return $(clsWrapper.replace('%unit%', 'minutes'), $el); 11629 }, 11630 11631 seconds: function seconds(ref, $el) { 11632 var clsWrapper = ref.clsWrapper; 11633 11634 return $(clsWrapper.replace('%unit%', 'seconds'), $el); 11635 }, 11636 11637 units: function units() { 11638 var this$1 = this; 11639 11640 return ['days', 'hours', 'minutes', 'seconds'].filter(function (unit) { return this$1[unit]; }); 11641 } 11642 11643 }, 11644 11645 connected: function connected() { 11646 this.start(); 11647 }, 11648 11649 disconnected: function disconnected() { 11650 var this$1 = this; 11651 11652 this.stop();
11653 this.units.forEach(function (unit) { return empty(this$1[unit]); }); 11654 }, 11655 11656 events: [ 11657 11658 { 11659 11660 name: 'visibilitychange', 11661 11662 el: document, 11663 11664 handler: function handler() { 11665 if (document.hidden) { 11666 this.stop(); 11667 } else { 11668 this.start(); 11669 } 11670 } 11671 11672 } 11673 11674 ], 11675 11676 update: { 11677 11678 write: function write() { 11679 var this$1 = this; 11680 11681 11682 var timespan = getTimeSpan(this.date); 11683 11684 if (timespan.total <= 0) { 11685 11686 this.stop(); 11687 11688 timespan.days 11689 = timespan.hours 11690 = timespan.minutes 11691 = timespan.seconds 11692 = 0; 11693 } 11694 11695 this.units.forEach(function (unit) { 11696 11697 var digits = String(Math.floor(timespan[unit])); 11698 11699 digits = digits.length < 2 ? ("0" + digits) : digits; 11700 11701 var el = this$1[unit]; 11702 if (el.textContent !== digits) { 11703 digits = digits.split(''); 11704 11705 if (digits.length !== el.children.length) { 11706 html(el, digits.map(function () { return '<span></span>'; }).join('')); 11707 } 11708 11709 digits.forEach(function (digit, i) { return el.children[i].textContent = digit; }); 11710 } 11711 11712 }); 11713 11714 } 11715 11716 }, 11717 11718 methods: { 11719 11720 start: function start() { 11721 var this$1 = this; 11722 11723 11724 this.stop(); 11725 11726 if (this.date && this.units.length) { 11727 this.$emit(); 11728 this.timer = setInterval(function () { return this$1.$emit(); }, 1000); 11729 } 11730 11731 }, 11732 11733 stop: function stop() { 11734 11735 if (this.timer) { 11736 clearInterval(this.timer); 11737 this.timer = null; 11738 } 11739 11740 } 11741 11742 } 11743 11744 }); 11745 11746 function getTimeSpan(date) { 11747 11748 var total = date - Date.now(); 11749 11750 return { 11751 total: total, 11752 seconds: total / 1000 % 60, 11753 minutes: total / 1000 / 60 % 60, 11754 hours: total / 1000 / 60 / 60 % 24, 11755 days: total / 1000 / 60 / 60 / 24 11756 }; 11757 } 11758 11759} 11760 11761function plugin$1(UIkit) { 11762 11763 if (plugin$1.installed) { 11764 return; 11765 } 11766 11767 var ref = UIkit.util; 11768 var addClass = ref.addClass; 11769 var css = ref.css; 11770 var scrolledOver = ref.scrolledOver; 11771 var sortBy = ref.sortBy; 11772 var toFloat = ref.toFloat; 11773 11774 UIkit.component('grid-parallax', UIkit.components.grid.extend({ 11775 11776 props: { 11777 target: String, 11778 translate: Number 11779 }, 11780 11781 defaults: { 11782 target: false, 11783 translate: 150 11784 }, 11785 11786 computed: { 11787 11788 translate: function translate(ref) { 11789 var translate = ref.translate; 11790 11791 return Math.abs(translate); 11792 } 11793 11794 }, 11795 11796 init: function init() { 11797 addClass(this.$el, 'uk-grid'); 11798 }, 11799 11800 disconnected: function disconnected() { 11801 this.reset(); 11802 css(this.$el, 'marginBottom', ''); 11803 }, 11804 11805 update: [ 11806 11807 { 11808 11809 read: function read(ref) { 11810 var rows = ref.rows; 11811 11812 return { 11813 columns: rows && rows[0] && rows[0].length || 0, 11814 rows: rows && rows.map(function (elements) { return sortBy(elements, 'offsetLeft'); }) 11815 }; 11816 }, 11817 11818 write: function write(ref) { 11819 var columns = ref.columns; 11820 11821 css(this.$el, 'marginBottom', columns > 1 11822 ? this.translate + toFloat(css(css(this.$el, 'marginBottom', ''), 'marginBottom')) 11823 : ''); 11824 }, 11825 11826 events: ['load', 'resize'] 11827 }, 11828 11829 { 11830 11831 read: function read() { 11832 return {scrolled: scrolledOver(this.$el) * this.translate}; 11833 }, 11834 11835 write: function write(ref) { 11836 var rows = ref.rows; 11837 var columns = ref.columns; 11838 var scrolled = ref.scrolled; 11839 11840 11841 if (!rows || columns === 1 || !scrolled) { 11842 return this.reset(); 11843 } 11844 11845 rows.forEach(function (row) { return row.forEach(function (el, i) { return css(el, 'transform', ("translateY(" + (i % 2 ? scrolled : scrolled / 8) + "px)")); } 11846 ); } 11847 ); 11848 11849 }, 11850 11851 events: ['scroll', 'load', 'resize'] 11852 } 11853 ], 11854 11855 methods: { 11856 11857 reset: function reset() { 11858 css(this.$el.children, 'transform', ''); 11859 } 11860 11861 } 11862 11863 })); 11864 11865 UIkit.components.gridParallax.options.update.unshift({ 11866 11867 read: function read() { 11868 this.reset(); 11869 }, 11870 11871 events: ['load', 'resize'] 11872 11873 }); 11874 11875} 11876 11877function AnimationsPlugin (UIkit) { 11878 11879 var ref = UIkit.util; 11880 var css = ref.css; 11881 11882 var Animations = { 11883 11884 slide: { 11885 11886 show: function show(dir) { 11887 return [ 11888 {transform: translate(dir * -100)}, 11889 {transform: translate()} 11890 ]; 11891 }, 11892 11893 percent: function percent(current) { 11894 return Animations.translated(current); 11895 }, 11896 11897 translate: function translate$1(percent, dir) { 11898 return [ 11899 {transform: translate(dir * -100 * percent)}
11899, 11900 {transform: translate(dir * 100 * (1 - percent))} 11901 ]; 11902 } 11903 11904 }, 11905 11906 translated: function translated(el) { 11907 return Math.abs(css(el, 'transform').split(',')[4] / el.offsetWidth) || 0; 11908 } 11909 11910 }; 11911 11912 return Animations; 11913 11914} 11915 11916function translate(value, unit) { 11917 if ( value === void 0 ) value = 0; 11918 if ( unit === void 0 ) unit = '%'; 11919 11920 return ("translateX(" + value + (value ? unit : '') + ")"); // currently not translate3d to support IE, translate3d within translate3d does not work while transitioning 11921} 11922 11923function scale3d(value) { 11924 return ("scale3d(" + value + ", " + value + ", 1)"); 11925} 11926 11927function TransitionerPlugin (UIkit) { 11928 11929 var ref = UIkit.util; 11930 var createEvent = ref.createEvent; 11931 var clamp = ref.clamp; 11932 var css = ref.css; 11933 var Deferred = ref.Deferred; 11934 var noop = ref.noop; 11935 var Promise = ref.Promise; 11936 var Transition = ref.Transition; 11937 var trigger = ref.trigger; 11938 11939 function Transitioner(prev, next, dir, ref) { 11940 var animation = ref.animation; 11941 var easing = ref.easing; 11942 11943 11944 var percent = animation.percent; 11945 var translate = animation.translate; 11946 var show = animation.show; if ( show === void 0 ) show = noop; 11947 var props = show(dir); 11948 var deferred = new Deferred(); 11949 11950 return { 11951 11952 dir: dir, 11953 11954 show: function show(duration, percent, linear) { 11955 var this$1 = this; 11956 if ( percent === void 0 ) percent = 0; 11957 11958 11959 var timing = linear ? 'linear' : easing; 11960 duration -= Math.round(duration * clamp(percent, -1, 1)); 11961 11962 this.translate(percent); 11963 11964 triggerUpdate(next, 'itemin', {percent: percent, duration: duration, timing: timing, dir: dir}); 11965 triggerUpdate(prev, 'itemout', {percent: 1 - percent, duration: duration, timing: timing, dir: dir}); 11966 11967 Promise.all([ 11968 Transition.start(next, props[1], duration, timing), 11969 Transition.start(prev, props[0], duration, timing) 11970 ]).then(function () { 11971 this$1.reset(); 11972 deferred.resolve(); 11973 }, noop); 11974 11975 return deferred.promise; 11976 }, 11977 11978 stop: function stop() { 11979 return Transition.stop([next, prev]); 11980 }, 11981 11982 cancel: function cancel() { 11983 Transition.cancel([next, prev]); 11984 }, 11985 11986 reset: function reset() { 11987 for (var prop in props[0]) { 11988 css([next, prev], prop, ''); 11989 } 11990 }, 11991 11992 forward: function forward(duration, percent) { 11993 if ( percent === void 0 ) percent = this.percent(); 11994 11995 Transition.cancel([next, prev]); 11996 return this.show(duration, percent, true); 11997 11998 }, 11999 12000 translate: function translate$1(percent) { 12001 12002 this.reset(); 12003 12004 var props = translate(percent, dir); 12005 css(next, props[1]); 12006 css(prev, props[0]); 12007 triggerUpdate(next, 'itemtranslatein', {percent: percent, dir: dir}); 12008 triggerUpdate(prev, 'itemtranslateout', {percent: 1 - percent, dir: dir}); 12009 12010 }, 12011 12012 percent: function percent$1() { 12013 return percent(prev || next, next, dir); 12014 }, 12015 12016 getDistance: function getDistance() { 12017 return prev.offsetWidth; 12018 } 12019 12020 }; 12021 12022 } 12023 12024 function triggerUpdate(el, type, data) { 12025 trigger(el, createEvent(type, false, false, data)); 12026 } 12027 12028 return Transitioner; 12029 12030} 12031 12032function AutoplayMixin (UIkit) { 12033 12034 var ref = UIkit.util; 12035 var pointerDown = ref.pointerDown; 12036 12037 return { 12038 12039 props: { 12040 autoplay: Boolean, 12041 autoplayInterval: Number, 12042 pauseOnHover: Boolean 12043 }, 12044 12045 defaults: { 12046 autoplay: false, 12047 autoplayInterval: 7000, 12048 pauseOnHover: true 12049 }, 12050 12051 connected: function connected() { 12052 this.startAutoplay(); 12053 }, 12054 12055 disconnected: function disconnected() { 12056 this.stopAutoplay(); 12057 }, 12058 12059 events: [ 12060 12061 { 12062 12063 name: 'visibilitychange', 12064 12065 el: document, 12066 12067 handler: function handler() { 12068 if (document.hidden) { 12069 this.stopAutoplay(); 12070 } else { 12071 this.startAutoplay(); 12072 } 12073 } 12074 12075 }, 12076 12077 { 12078 12079 name: pointerDown, 12080 handler: 'stopAutoplay' 12081 12082 }, 12083 12084 { 12085 12086 name: 'mouseenter', 12087 12088 filter: function filter() { 12089 return this.autoplay; 12090 }, 12091 12092 handler: function handler() { 12093 this.isHovering = true; 12094 } 12095 12096 }, 12097 12098 { 12099 12100 name: 'mouseleave', 12101 12102 filter: function filter() { 12103 return this.autoplay; 12104 }, 12105 12106 handler: function handler() { 12107 this.isHovering = false;
12108 } 12109 12110 } 12111 12112 ], 12113 12114 methods: { 12115 12116 startAutoplay: function startAutoplay() { 12117 var this$1 = this; 12118 12119 12120 this.stopAutoplay(); 12121 12122 if (this.autoplay) { 12123 this.interval = setInterval( 12124 function () { return !(this$1.isHovering && this$1.pauseOnHover) && !this$1.stack.length && this$1.show('next'); }, 12125 this.autoplayInterval 12126 ); 12127 } 12128 12129 }, 12130 12131 stopAutoplay: function stopAutoplay() { 12132 if (this.interval) { 12133 clearInterval(this.interval); 12134 } 12135 } 12136 12137 } 12138 12139 }; 12140} 12141 12142function DragMixin (UIkit) { 12143 12144 var ref = UIkit.util; 12145 var getPos = ref.getPos; 12146 var includes = ref.includes; 12147 var isRtl = ref.isRtl; 12148 var isTouch = ref.isTouch; 12149 var off = ref.off; 12150 var on = ref.on; 12151 var pointerDown = ref.pointerDown; 12152 var pointerMove = ref.pointerMove; 12153 var pointerUp = ref.pointerUp; 12154 var preventClick = ref.preventClick; 12155 var trigger = ref.trigger; 12156 12157 return { 12158 12159 defaults: { 12160 threshold: 10, 12161 preventCatch: false 12162 }, 12163 12164 init: function init() { 12165 var this$1 = this; 12166 12167 12168 ['start', 'move', 'end'].forEach(function (key) { 12169 12170 var fn = this$1[key]; 12171 this$1[key] = function (e) { 12172 12173 var pos = getPos(e).x * (isRtl ? -1 : 1); 12174 12175 this$1.prevPos = pos !== this$1.pos ? this$1.pos : this$1.prevPos; 12176 this$1.pos = pos; 12177 12178 fn(e); 12179 }; 12180 12181 }); 12182 12183 }, 12184 12185 events: [ 12186 12187 { 12188 12189 name: pointerDown, 12190 12191 delegate: function delegate() { 12192 return this.slidesSelector; 12193 }, 12194 12195 handler: function handler(e) { 12196 12197 if (!isTouch(e) && hasTextNodesOnly(e.target) 12198 || e.button > 0 12199 || this.length < 2 12200 || this.preventCatch 12201 ) { 12202 return; 12203 } 12204 12205 this.start(e); 12206 } 12207 12208 }, 12209 12210 { 12211 name: 'dragstart', 12212 12213 handler: function handler(e) { 12214 e.preventDefault(); 12215 } 12216 } 12217 12218 ], 12219 12220 methods: { 12221 12222 start: function start() { 12223 12224 this.drag = this.pos; 12225 12226 if (this._transitioner) { 12227 12228 this.percent = this._transitioner.percent(); 12229 this.drag += this._transitioner.getDistance() * this.percent * this.dir; 12230 12231 this._transitioner.translate(this.percent); 12232 this._transitioner.cancel(); 12233 12234 this.dragging = true; 12235 12236 this.stack = []; 12237 12238 } else { 12239 this.prevIndex = this.index; 12240 } 12241 12242 this.unbindMove = on(document, pointerMove, this.move, {capture: true, passive: false}); 12243 on(window, 'scroll', this.unbindMove); 12244 on(document, pointerUp, this.end, true); 12245 12246 }, 12247 12248 move: function move(e) { 12249 var this$1 = this; 12250 12251 12252 var distance = this.pos - this.drag; 12253 12254 if (distance === 0 || this.prevPos === this.pos || !this.dragging && Math.abs(distance) < this.threshold) { 12255 return; 12256 } 12257 12258 e.cancelable && e.preventDefault(); 12259 12260 this.dragging = true; 12261 this.dir = (distance < 0 ? 1 : -1); 12262 12263 var ref = this; 12264 var slides = ref.slides; 12265 var ref$1 = this; 12266 var prevIndex = ref$1.prevIndex; 12267 var dis = Math.abs(distance); 12268 var nextIndex = this.getIndex(prevIndex + this.dir, prevIndex); 12269 var width = this._getDistance(prevIndex, nextIndex) || slides[prevIndex].offsetWidth; 12270 12271 while (nextIndex !== prevIndex && dis > width) { 12272 12273 this$1.drag -= width * this$1.dir; 12274 12275 prevIndex = nextIndex; 12276 dis -= width; 12277 nextIndex = this$1.getIndex(prevIndex + this$1.dir, prevIndex); 12278 width = this$1._getDistance(prevIndex, nextIndex) || slides[prevIndex].offsetWidth; 12279 12280 } 12281 12282 this.percent = dis / width; 12283 12284 var prev = slides[prevIndex]; 12285 var next = slides[nextIndex]; 12286 var changed = this.index !== nextIndex; 12287 var edge = prevIndex === nextIndex; 12288 12289 var itemShown; 12290 12291 [this.index, this.prevIndex].filter(function (i) { return !includes([nextIndex, prevIndex], i); }
12291).forEach(function (i) { 12292 trigger(slides[i], 'itemhidden', [this$1]); 12293 12294 if (edge) { 12295 itemShown = true; 12296 this$1.prevIndex = prevIndex; 12297 } 12298 12299 }); 12300 12301 if (this.index === prevIndex && this.prevIndex !== prevIndex || itemShown) { 12302 trigger(slides[this.index], 'itemshown', [this]); 12303 } 12304 12305 if (changed) { 12306 this.prevIndex = prevIndex; 12307 this.index = nextIndex; 12308 12309 !edge && trigger(prev, 'beforeitemhide', [this]); 12310 trigger(next, 'beforeitemshow', [this]); 12311 } 12312 12313 this._transitioner = this._translate(Math.abs(this.percent), prev, !edge && next); 12314 12315 if (changed) { 12316 !edge && trigger(prev, 'itemhide', [this]); 12317 trigger(next, 'itemshow', [this]); 12318 } 12319 12320 }, 12321 12322 end: function end() { 12323 12324 off(window, 'scroll', this.unbindMove); 12325 this.unbindMove(); 12326 off(document, pointerUp, this.end, true); 12327 12328 if (this.dragging) { 12329 12330 this.dragging = null; 12331 12332 if (this.index === this.prevIndex) { 12333 this.percent = 1 - this.percent; 12334 this.dir *= -1; 12335 this._show(false, this.index, true); 12336 this._transitioner = null; 12337 } else { 12338 12339 var dirChange = (isRtl ? this.dir * (isRtl ? 1 : -1) : this.dir) < 0 === this.prevPos > this.pos; 12340 this.index = dirChange ? this.index : this.prevIndex; 12341 12342 if (dirChange) { 12343 this.percent = 1 - this.percent; 12344 } 12345 12346 this.show(this.dir > 0 && !dirChange || this.dir < 0 && dirChange ? 'next' : 'previous', true); 12347 } 12348 12349 preventClick(); 12350 12351 } 12352 12353 this.drag 12354 = this.percent 12355 = null; 12356 12357 } 12358 12359 } 12360 12361 }; 12362 12363 function hasTextNodesOnly(el) { 12364 return !el.children.length && el.childNodes.length; 12365 } 12366 12367} 12368 12369function NavMixin (UIkit) { 12370 12371 var ref = UIkit.util; 12372 var $ = ref.$; 12373 var $$ = ref.$$; 12374 var data = ref.data; 12375 var html = ref.html; 12376 var toggleClass = ref.toggleClass; 12377 var toNumber = ref.toNumber; 12378 12379 return { 12380 12381 defaults: { 12382 selNav: false 12383 }, 12384 12385 computed: { 12386 12387 nav: function nav(ref, $el) { 12388 var selNav = ref.selNav; 12389 12390 return $(selNav, $el); 12391 }, 12392 12393 navItemSelector: function navItemSelector(ref) { 12394 var attrItem = ref.attrItem; 12395 12396 return ("[" + attrItem + "],[data-" + attrItem + "]"); 12397 }, 12398 12399 navItems: function navItems(_, $el) { 12400 return $$(this.navItemSelector, $el); 12401 } 12402 12403 }, 12404 12405 update: [ 12406 12407 { 12408 12409 write: function write() { 12410 var this$1 = this; 12411 12412 12413 if (this.nav && this.length !== this.nav.children.length) { 12414 html(this.nav, this.slides.map(function (_, i) { return ("<li " + (this$1.attrItem) + "=\"" + i + "\"><a href=\"#\"></a></li>"); }).join('')); 12415 } 12416 12417 toggleClass($$(this.navItemSelector, this.$el).concat(this.nav), 'uk-hidden', !this.maxIndex); 12418 12419 this.updateNav(); 12420 12421 }, 12422 12423 events: ['load', 'resize'] 12424 12425 } 12426 12427 ], 12428 12429 events: [ 12430 12431 { 12432 12433 name: 'click', 12434 12435 delegate: function delegate() { 12436 return this.navItemSelector; 12437 }, 12438 12439 handler: function handler(e) { 12440 e.preventDefault(); 12441 e.current.blur(); 12442 this.show(data(e.current, this.attrItem)); 12443 } 12444 12445 }, 12446 12447 { 12448 12449 name: 'itemshow', 12450 handler: 'updateNav' 12451 12452 } 12453 12454 ], 12455 12456 methods: { 12457 12458 updateNav: function updateNav() { 12459 var this$1 = this; 12460 12461 12462 var i = this.getValidIndex();
12463 this.navItems.forEach(function (el) { 12464 12465 var cmd = data(el, this$1.attrItem); 12466 12467 toggleClass(el, this$1.clsActive, toNumber(cmd) === i); 12468 toggleClass(el, 'uk-invisible', this$1.finite && (cmd === 'previous' && i === 0 || cmd === 'next' && i >= this$1.maxIndex)); 12469 }); 12470 12471 } 12472 12473 } 12474 12475 }; 12476 12477} 12478 12479function plugin$5(UIkit) { 12480 12481 if (plugin$5.installed) { 12482 return; 12483 } 12484 12485 var ref = UIkit.util; 12486 var $ = ref.$; 12487 var assign = ref.assign; 12488 var clamp = ref.clamp; 12489 var fastdom = ref.fastdom; 12490 var getIndex = ref.getIndex; 12491 var hasClass = ref.hasClass; 12492 var isNumber = ref.isNumber; 12493 var isRtl = ref.isRtl; 12494 var Promise = ref.Promise; 12495 var toNodes = ref.toNodes; 12496 var trigger = ref.trigger; 12497 12498 UIkit.mixin.slider = { 12499 12500 attrs: true, 12501 12502 mixins: [AutoplayMixin(UIkit), DragMixin(UIkit), NavMixin(UIkit)], 12503 12504 props: { 12505 clsActivated: Boolean, 12506 easing: String, 12507 index: Number, 12508 finite: Boolean, 12509 velocity: Number 12510 }, 12511 12512 defaults: { 12513 easing: 'ease', 12514 finite: false, 12515 velocity: 1, 12516 index: 0, 12517 stack: [], 12518 percent: 0, 12519 clsActive: 'uk-active', 12520 clsActivated: false, 12521 Transitioner: false, 12522 transitionOptions: {} 12523 }, 12524 12525 computed: { 12526 12527 duration: function duration(ref, $el) { 12528 var velocity = ref.velocity; 12529 12530 return speedUp($el.offsetWidth / velocity); 12531 }, 12532 12533 length: function length() { 12534 return this.slides.length; 12535 }, 12536 12537 list: function list(ref, $el) { 12538 var selList = ref.selList; 12539 12540 return $(selList, $el); 12541 }, 12542 12543 maxIndex: function maxIndex() { 12544 return this.length - 1; 12545 }, 12546 12547 slidesSelector: function slidesSelector(ref) { 12548 var selList = ref.selList; 12549 12550 return (selList + " > *"); 12551 }, 12552 12553 slides: function slides() { 12554 return toNodes(this.list.children); 12555 } 12556 12557 }, 12558 12559 methods: { 12560 12561 show: function show(index, force) { 12562 var this$1 = this; 12563 if ( force === void 0 ) force = false; 12564 12565 12566 if (this.dragging || !this.length) { 12567 return; 12568 } 12569 12570 var ref = this; 12571 var stack = ref.stack; 12572 var queueIndex = force ? 0 : stack.length; 12573 var reset = function () { 12574 stack.splice(queueIndex, 1); 12575 12576 if (stack.length) { 12577 this$1.show(stack.shift(), true); 12578 } 12579 }; 12580 12581 stack[force ? 'unshift' : 'push'](index); 12582 12583 if (!force && stack.length > 1) { 12584 12585 if (stack.length === 2) { 12586 this._transitioner.forward(Math.min(this.duration, 200)); 12587 } 12588 12589 return; 12590 } 12591 12592 var prevIndex = this.index; 12593 var prev = hasClass(this.slides, this.clsActive) && this.slides[prevIndex]; 12594 var nextIndex = this.getIndex(index, this.index); 12595 var next = this.slides[nextIndex]; 12596 12597 if (prev === next) { 12598 reset(); 12599 return; 12600 } 12601 12602 this.dir = getDirection(index, prevIndex); 12603 this.prevIndex = prevIndex; 12604 this.index = nextIndex; 12605 12606 prev && trigger(prev, 'beforeitemhide', [this]); 12607 if (!trigger(next, 'beforeitemshow', [this, prev])) { 12608 this.index = this.prevIndex; 12609 reset(); 12610 return; 12611 } 12612 12613 var promise = this._show(prev, next, force).then(function () { 12614 12615 prev && trigger(prev, 'itemhidden', [this$1]); 12616 trigger(next, 'itemshown', [this$1]); 12617 12618 return new Promise(function (resolve) { 12619 fastdom.write(function () { 12620 stack.shift(); 12621 if (stack.length) { 12622 this$1.show(stack.shift(), true); 12623 } else { 12624 this$1._transitioner = null; 12625 } 12626 resolve(); 12627 }); 12628 }); 12629 12630 }); 12631 12632 prev && trigger(prev, 'itemhide', [this]); 12633 trigger(next, 'itemshow', [this]); 12634 12635 return promise; 12636 12637 }, 12638 12639 getIndex: function getIndex$1(index, prev) { 12640 if ( index === void 0 ) index = this.index; 12641 if ( prev === void 0 ) prev = this.index; 12642 12643 return clamp(getIndex(index, this.slides, prev, this.finite), 0, this.maxIndex); 12644 }, 12645 12646 getValidIndex: function getValidIndex(index, prevIndex) { 12647 if ( index === void 0 ) index = this.index; 12648 if ( prevIndex === void 0 ) prevIndex = this.prevIndex; 12649 12650 return this.getIndex(index, prevIndex); 12651 }, 12652 12653 _show: function _show(prev, next, force) { 12654 12655 this._transitioner = this._getTransitioner( 12656 prev, 12657 next, 12658 this.dir, 12659 assign({ 12660 easing: force 12661 ? next.offsetWidth < 600 12662 ? 'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */ 12663 : 'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */ 12664 : this.easing 12665 }, this.transitionOptions) 12666 ); 12667 12668 if (!force && !prev) { 12669 this._transitioner.translate(1); 12670 return Promise.resolve(); 12671 } 12672 12673 var ref = this.stack; 12674 var length = ref.length; 12675 return this._transitioner[length > 1 ? 'forward' : 'show'](length > 1 ? Math.min(this.duration, 75 + 75 / (length - 1)) : this.duration, this.percent); 12676 12677 }, 12678 12679 _getDistance: function _getDistance(prev, next) { 12680 return new this._getTransitioner(prev, prev !== next && next).getDistance(); 12681 }, 12682 12683 _translate: function _translate(percent, prev, next) { 12684 if ( prev === void 0 ) prev = this.prevIndex; 12685 if ( next === void 0 ) next = this.index; 12686 12687 var transitioner = this._getTransitioner(prev !== next ? prev : false, next); 12688 transitioner.translate(percent); 12689 return transitioner; 12690 }, 12691 12692 _getTransitioner: function _getTransitioner(prev, next, dir, options) { 12693 if ( prev === void 0 ) prev = this.prevIndex; 12694 if ( next === void 0 ) next = this.index; 12695 if ( dir === void 0 ) dir = this.dir || 1; 12696 if ( options === void 0 ) options = this.transitionOptions; 12697 12698 return new this.Transitioner( 12699 isNumber(prev) ? this.slides[prev] : prev, 12700 isNumber(next) ? this.slides[next] : next, 12701 dir * (isRtl ? -1 : 1), 12702 options 12703 ); 12704 } 12705 12706 } 12707 12708 }; 12709 12710 function getDirection(index, prevIndex) { 12711 return index === 'next' 12712 ? 1 12713 : index === 'previous' 12714 ? -1 12715 : index < prevIndex 12716 ? -1 12717 : 1; 12718 } 12719 12720} 12721 12722function speedUp(x) { 12723 return .5 * x + 300; // parabola through (400,500; 600,600; 1800,1200) 12724} 12725 12726function plugin$4(UIkit) { 12727 12728 if (plugin$4.installed) { 12729 return; 12730 } 12731 12732 UIkit.use(plugin$5); 12733
12734 var mixin = UIkit.mixin; 12735 var UIkit_util = UIkit.util; 12736 var addClass = UIkit_util.addClass; 12737 var assign = UIkit_util.assign; 12738 var fastdom = UIkit_util.fastdom; 12739 var isNumber = UIkit_util.isNumber; 12740 var removeClass = UIkit_util.removeClass; 12741 12742 var Animations = AnimationsPlugin(UIkit); 12743 var Transitioner = TransitionerPlugin(UIkit); 12744 12745 UIkit.mixin.slideshow = { 12746 12747 mixins: [mixin.slider], 12748 12749 props: { 12750 animation: String 12751 }, 12752 12753 defaults: { 12754 animation: 'slide', 12755 clsActivated: 'uk-transition-active', 12756 Animations: Animations, 12757 Transitioner: Transitioner 12758 }, 12759 12760 computed: { 12761 12762 animation: function animation(ref) { 12763 var animation = ref.animation; 12764 var Animations = ref.Animations; 12765 12766 return assign(animation in Animations ? Animations[animation] : Animations.slide, {name: animation}); 12767 }, 12768 12769 transitionOptions: function transitionOptions() { 12770 return {animation: this.animation}; 12771 } 12772 12773 }, 12774 12775 events: { 12776 12777 'itemshow itemhide itemshown itemhidden': function itemshowitemhideitemshownitemhidden(ref) { 12778 var target = ref.target; 12779 12780 UIkit.update(target); 12781 }, 12782 12783 itemshow: function itemshow() { 12784 isNumber(this.prevIndex) && fastdom.flush(); // iOS 10+ will honor the video.play only if called from a gesture handler 12785 }, 12786 12787 beforeitemshow: function beforeitemshow(ref) { 12788 var target = ref.target; 12789 12790 addClass(target, this.clsActive); 12791 }, 12792 12793 itemshown: function itemshown(ref) { 12794 var target = ref.target; 12795 12796 addClass(target, this.clsActivated); 12797 }, 12798 12799 itemhidden: function itemhidden(ref) { 12800 var target = ref.target; 12801 12802 removeClass(target, this.clsActive, this.clsActivated); 12803 } 12804 12805 } 12806 12807 }; 12808 12809} 12810 12811function AnimationsPlugin$1 (UIkit) { 12812 12813 var mixin = UIkit.mixin; 12814 var UIkit_util = UIkit.util; 12815 var assign = UIkit_util.assign; 12816 var css = UIkit_util.css; 12817 12818 return assign({}, mixin.slideshow.defaults.Animations, { 12819 12820 fade: { 12821 12822 show: function show() { 12823 return [ 12824 {opacity: 0}, 12825 {opacity: 1} 12826 ]; 12827 }, 12828 12829 percent: function percent(current) { 12830 return 1 - css(current, 'opacity'); 12831 }, 12832 12833 translate: function translate$$1(percent) { 12834 return [ 12835 {opacity: 1 - percent}, 12836 {opacity: percent} 12837 ]; 12838 } 12839 12840 }, 12841 12842 scale: { 12843 12844 show: function show() { 12845 return [ 12846 {opacity: 0, transform: scale3d(1 - .2)}, 12847 {opacity: 1, transform: scale3d(1)} 12848 ]; 12849 }, 12850 12851 percent: function percent(current) { 12852 return 1 - css(current, 'opacity'); 12853 }, 12854 12855 translate: function translate$$1(percent) { 12856 return [ 12857 {opacity: 1 - percent, transform: scale3d(1 - .2 * percent)}, 12858 {opacity: percent, transform: scale3d(1 - .2 + .2 * percent)} 12859 ]; 12860 } 12861 12862 } 12863 12864 }); 12865 12866} 12867 12868function plugin$3(UIkit) { 12869 12870 if (plugin$3.installed) { 12871 return; 12872 } 12873 12874 UIkit.use(plugin$4); 12875 12876 var mixin = UIkit.mixin; 12877 var util = UIkit.util; 12878 var $ = util.$; 12879 var addClass = util.addClass; 12880 var ajax = util.ajax; 12881 var append = util.append; 12882 var assign = util.assign; 12883 var attr = util.attr; 12884 var css = util.css; 12885 var getImage = util.getImage; 12886 var html = util.html; 12887 var index = util.index; 12888 var on = util.on; 12889 var pointerDown = util.pointerDown; 12890 var pointerMove = util.pointerMove; 12891 var removeClass = util.removeClass; 12892 var Transition = util.Transition; 12893 var trigger = util.trigger; 12894 12895 var Animations = AnimationsPlugin$1(UIkit); 12896 12897 UIkit.component('lightbox-panel', { 12898 12899 mixins: [mixin.container, mixin.modal, mixin.togglable, mixin.slideshow], 12900 12901 functional: true, 12902 12903 props: { 12904 delayControls: Number, 12905 preload: Number, 12906 videoAutoplay: Boolean,
12907 template: String 12908 }, 12909 12910 defaults: { 12911 preload: 1, 12912 videoAutoplay: false, 12913 delayControls: 3000, 12914 items: [], 12915 cls: 'uk-open', 12916 clsPage: 'uk-lightbox-page', 12917 selList: '.uk-lightbox-items', 12918 attrItem: 'uk-lightbox-item', 12919 selClose: '.uk-close-large', 12920 pauseOnHover: false, 12921 velocity: 2, 12922 Animations: Animations, 12923 template: "<div class=\"uk-lightbox uk-overflow-hidden\"> <ul class=\"uk-lightbox-items\"></ul> <div class=\"uk-lightbox-toolbar uk-position-top uk-text-right uk-transition-slide-top uk-transition-opaque\"> <button class=\"uk-lightbox-toolbar-icon uk-close-large\" type=\"button\" uk-close></button> </div> <a class=\"uk-lightbox-button uk-position-center-left uk-position-medium uk-transition-fade\" href=\"#\" uk-slidenav-previous uk-lightbox-item=\"previous\"></a> <a class=\"uk-lightbox-button uk-position-center-right uk-position-medium uk-transition-fade\" href=\"#\" uk-slidenav-next uk-lightbox-item=\"next\"></a> <div class=\"uk-lightbox-toolbar uk-lightbox-caption uk-position-bottom uk-text-center uk-transition-sli
12923de-bottom uk-transition-opaque\"></div> </div>" 12924 }, 12925 12926 created: function created() { 12927 var this$1 = this; 12928 12929 12930 this.$mount(append(this.container, this.template)); 12931 12932 this.caption = $('.uk-lightbox-caption', this.$el); 12933 12934 this.items.forEach(function () { return append(this$1.list, '<li></li>'); }); 12935 12936 }, 12937 12938 events: [ 12939 12940 { 12941 12942 name: (pointerMove + " " + pointerDown + " keydown"), 12943 12944 handler: 'showControls' 12945 12946 }, 12947 12948 { 12949 12950 name: 'click', 12951 12952 self: true, 12953 12954 delegate: function delegate() { 12955 return this.slidesSelector; 12956 }, 12957 12958 handler: function handler(e) { 12959 e.preventDefault(); 12960 this.hide(); 12961 } 12962 12963 }, 12964 12965 { 12966 12967 name: 'shown', 12968 12969 self: true, 12970 12971 handler: 'showControls' 12972 }, 12973 12974 { 12975 12976 name: 'hide', 12977 12978 self: true, 12979 12980 handler: function handler() { 12981 12982 this.hideControls(); 12983 12984 removeClass(this.slides, this.clsActive); 12985 Transition.stop(this.slides); 12986 12987 } 12988 }, 12989 12990 { 12991 12992 name: 'keyup', 12993 12994 el: document, 12995 12996 handler: function handler(e) { 12997 12998 if (!this.isToggled(this.$el)) { 12999 return; 13000 } 13001 13002 switch (e.keyCode) { 13003 case 37: 13004 this.show('previous'); 13005 break; 13006 case 39: 13007 this.show('next'); 13008 break; 13009 } 13010 } 13011 }, 13012 13013 { 13014 13015 name: 'beforeitemshow', 13016 13017 handler: function handler(e) { 13018 13019 if (this.isToggled()) { 13020 return; 13021 } 13022 13023 this.preventCatch = true; 13024 13025 e.preventDefault(); 13026 13027 this.toggleNow(this.$el, true); 13028 13029 this.animation = Animations['scale']; 13030 removeClass(e.target, this.clsActive); 13031 this.stack.splice(1, 0, this.index); 13032 13033 } 13034 13035 }, 13036 13037 { 13038 13039 name: 'itemshow', 13040 13041 handler: function handler(ref) { 13042 var this$1 = this; 13043 var target = ref.target; 13044 13045 13046 var i = index(target); 13047 var ref$1 = this.getItem(i); 13048 var caption = ref$1.caption; 13049
13050 css(this.caption, 'display', caption ? '' : 'none'); 13051 html(this.caption, caption); 13052 13053 for (var j = 0; j <= this.preload; j++) { 13054 this$1.loadItem(this$1.getIndex(i + j)); 13055 this$1.loadItem(this$1.getIndex(i - j)); 13056 } 13057 13058 } 13059 13060 }, 13061 13062 { 13063 13064 name: 'itemshown', 13065 13066 handler: function handler() { 13067 this.preventCatch = false; 13068 } 13069 13070 }, 13071 13072 { 13073 13074 name: 'itemload', 13075 13076 handler: function handler(_, item) { 13077 var this$1 = this; 13078 13079 13080 var source = item.source; 13081 var type = item.type; 13082 var alt = item.alt; 13083 13084 this.setItem(item, '<span uk-spinner></span>'); 13085 13086 if (!source) { 13087 return; 13088 } 13089 13090 var matches; 13091 13092 // Image 13093 if (type === 'image' || source.match(/\.(jp(e)?g|png|gif|svg)$/i)) { 13094 13095 getImage(source).then( 13096 function (img) { return this$1.setItem(item, ("<img width=\"" + (img.width) + "\" height=\"" + (img.height) + "\" src=\"" + source + "\" alt=\"" + (alt ? alt : '') + "\">")); }, 13097 function () { return this$1.setError(item); } 13098 ); 13099 13100 // Video 13101 } else if (type === 'video' || source.match(/\.(mp4|webm|ogv)$/i)) { 13102 13103 var video = $(("<video controls playsinline" + (item.poster ? (" poster=\"" + (item.poster) + "\"") : '') + " uk-video=\"" + (this.videoAutoplay) + "\"></video>")); 13104 attr(video, 'src', source); 13105 13106 on(video, 'error', function () { return this$1.setError(item); }); 13107 on(video, 'loadedmetadata', function () { 13108 attr(video, {width: video.videoWidth, height: video.videoHeight}); 13109 this$1.setItem(item, video); 13110 }); 13111 13112 // Iframe 13113 } else if (type === 'iframe') { 13114 13115 this.setItem(item, ("<iframe class=\"uk-lightbox-iframe\" src=\"" + source + "\" frameborder=\"0\" allowfullscreen></iframe>")); 13116 13117 // YouTube 13118 } else if ((matches = source.match(/\/\/.*?youtube(-nocookie)?\.[a-z]+\/watch\?v=([^&\s]+)/) || source.match(/()youtu\.be\/(.*)/))) { 13119 13120 var id = matches[2]; 13121 var setIframe = function (width, height) { 13122 if ( width === void 0 ) width = 640; 13123 if ( height === void 0 ) height = 450; 13124 13125 return this$1.setItem(item, getIframe(("https://www.youtube" + (matches[1] || '') + ".com/embed/" + id), width, height, this$1.videoAutoplay)); 13126 }; 13127 13128 getImage(("https://img.youtube.com/vi/" + id + "/maxresdefault.jpg")).then( 13129 function (ref) { 13130 var width = ref.width; 13131 var height = ref.height; 13132 13133 // YouTube default 404 thumb, fall back to low resolution 13134 if (width === 120 && height === 90) { 13135 getImage(("https://img.youtube.com/vi/" + id + "/0.jpg")).then( 13136 function (ref) { 13137 var width = ref.width; 13138 var height = ref.height; 13139 13140 return setIframe(width, height); 13141 }, 13142 setIframe 13143 ); 13144 } else { 13145 setIframe(width, height); 13146 } 13147 }, 13148 setIframe 13149 ); 13150 13151 // Vimeo 13152 } else if ((matches = source.match(/(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/))) { 13153 13154 ajax(("https://vimeo.com/api/oembed.json?maxwidth=1920&url=" + (encodeURI(source))), {responseType: 'json'}) 13155 .then(function (ref) { 13156 var ref_response = ref.response; 13157 var height = ref_response.height; 13158 var width = ref_response.width; 13159 13160 return this$1.setItem(item, getIframe(("https://player.vimeo.com/video/" + (matches[2])), width, height, this$1.videoAutoplay)); 13161 } 13162 ); 13163 13164 } 13165 13166 } 13167 13168 } 13169 13170 ], 13171 13172 methods: { 13173 13174 loadItem: function loadItem(index) { 13175 if ( index === void 0 ) index = this.index; 13176 13177 13178 var item = this.getItem(index); 13179 13180 if (item.content) { 13181 return; 13182 } 13183 13184 trigger(this.$el, 'itemload', [item]); 13185 }, 13186 13187 getItem: function getItem(index) { 13188 if ( index === void 0 ) index = this.index; 13189 13190 return this.items[index] || {}; 13191 }, 13192 13193 setItem: function setItem(item, content) { 13194 assign(item, {content: content}); 13195 var el = html(this.slides[this.items.indexOf(item)], content); 13196 trigger(this.$el, 'itemloaded', [this, el]); 13197 UIkit.update(el); 13198 }, 13199 13200 setError: function setError(item) { 13201 this.setItem(item, '<span uk-icon="icon: bolt; ratio: 2"></span>'); 13202 }, 13203 13204 showControls: function showControls() { 13205 13206 clearTimeout(this.controlsTimer); 13207 this.controlsTimer = setTimeout(this.hideControls, this.delayControls); 13208 13209 addClass(this.$el, 'uk-active', 'uk-transition-active'); 13210 13211 }, 13212 13213 hideControls: function hideControls() { 13214 removeClass(this.$el, 'uk-active', 'uk-transition-active'); 13215 } 13216 13217 } 13218 13219 }); 13220 13221 function getIframe(src, width, height, autoplay) { 13222 return ("<iframe src=\"" + src + "\" width=\"" + width + "\" height=\"" + height + "\" style=\"max-width: 100%; box-sizing: border-box;\" frameborder=\"0\" allowfullscreen uk-video=\"autoplay: " + autoplay + "\" uk-responsive></iframe>"); 13223 } 13224 13225} 13226 13227function plugin$2(UIkit) { 13228 13229 if (plugin$2.installed) { 13230 return; 13231 } 13232 13233 UIkit.use(plugin$3); 13234 13235 var util = UIkit.util; 13236 var $$ = util.$$; 13237 var assign = util.assign; 13238 var data = util.data; 13239 var index = util.index; 13240 var ref = UIkit.components.lightboxPanel; 13241 var options = ref.options; 13242 13243 UIkit.component('lightbox', { 13244 13245 attrs: true, 13246 13247 props: assign({toggle: String}, options.props), 13248 13249 defaults: assign({toggle: 'a'}, Object.keys(options.props).reduce(function (defaults, key) { 13250 defaults[key] = options.defaults[key]; 13251 return defaults; 13252 }, {})), 13253 13254 computed: { 13255 13256 toggles: function toggles(ref, $el) { 13257 var toggle = ref.toggle; 13258 13259 return $$(toggle, $el); 13260 } 13261 13262 }, 13263 13264 disconnected: function disconnected() { 13265 this._destroy(); 13266 }, 13267 13268 events: [ 13269 13270 { 13271 13272 name: 'click', 13273 13274 delegate: function delegate() { 13275 return ((this.toggle) + ":not(.uk-disabled)"); 13276 }, 13277 13278 handler: function handler(e) { 13279 e.preventDefault(); 13280 e.current.blur(); 13281 this.show(index(this.toggles, e.current)); 13282 } 13283 13284 } 13285 13286 ], 13287 13288 update: function update(data) { 13289 13290 data.toggles = data.toggles || this.toggles; 13291 13292 if (this.panel && this.animation) { 13293 this.panel.$props.animation = this.animation; 13294 this.panel.$emit(); 13295 } 13296 13297 if (!this.panel || isEqualList(data.toggles, this.toggles)) { 13298 return; 13299 } 13300 13301 data.toggles = this.toggles; 13302 this._destroy(); 13303 this._init(); 13304 13305 }, 13306 13307 methods: { 13308 13309 _init: function _init() { 13310 return this.panel = this.panel || UIkit.lightboxPanel(assign({}, this.$props, { 13311 items: this.toggles.reduce(function (items, el) { 13312 items.push(['href', 'caption', 'type', 'poster', 'alt'].reduce(function (obj, attr) { 13313 obj[attr === 'href' ? 'source' : attr] = data(el, attr); 13314 return obj; 13315 }, {})); 13316 return items; 13317 }, []) 13318 })); 13319 }, 13320 13321 _destroy: function _destroy() { 13322 if (this.panel) { 13323 this.panel.$destroy(true); 13324 this.panel = null; 13325 } 13326 }, 13327 13328 show: function show(index) { 13329 13330 if (!this.panel) { 13331 this._init(); 13332 } 13333 13334 return this.panel.show(index); 13335 13336 }, 13337 13338 hide: function hide() { 13339 13340 return this.panel && this.panel.hide(); 13341 13342 } 13343 13344 } 13345 13346 }); 13347 13348 function isEqualList(listA, listB) { 13349 return listA.length === listB.length 13350 && listA.every(function (el, i) { return el === listB[i]; }); 13351 } 13352 13353} 13354 13355function plugin$6(UIkit) { 13356 var obj; 13357 13358 13359 if (plugin$6.installed) { 13360 return; 13361 } 13362 13363 var ref = UIkit.util; 13364 var append = ref.append; 13365 var apply = ref.apply; 13366 var closest = ref.closest; 13367 var css = ref.css; 13368 var pointerEnter = ref.pointerEnter; 13369 var pointerLeave = ref.pointerLeave; 13370 var remove = ref.remove; 13371 var toFloat = ref.toFloat; 13372 var Transition = ref.Transition; 13373 var trigger = ref.trigger; 13374 var containers = {}; 13375 13376 UIkit.component('notification', { 13377 13378 functional: true, 13379 13380 args: ['message', 'status'], 13381 13382 defaults: { 13383 message: '', 13384 status: '', 13385 timeout: 5000, 13386 group: null, 13387 pos: 'top-center', 13388 clsClose: 'uk-notification-close', 13389 clsMsg: 'uk-notification-message' 13390 }, 13391 13392 created: function created() { 13393 13394 if (!containers[this.pos]) { 13395 containers[this.pos] = append(UIkit.container, ("<div class=\"uk-notification uk-notification-" + (this.pos) + "\"></div>")); 13396 } 13397 13398 var container = css(containers[this.pos], 'display', 'block'); 13399 13400 this.$mount(append(container, 13401 ("<div class=\"" + (this.clsMsg) + (this.status ? (" " + (this.clsMsg) + "-" + (this.status)) : '') + "\"> <a href=\"#\" class=\"" + (this.clsClose) + "\" data-uk-close></a> <div>" + (this.message) + "</div> </div>") 13402 )); 13403 13404 }, 13405 13406 ready: function ready() { 13407 var this$1 = this; 13408 13409 13410 var marginBottom = toFloat(css(this.$el, 'marginBottom')); 13411 Transition.start(
13412 css(this.$el, {opacity: 0, marginTop: -this.$el.offsetHeight, marginBottom: 0}), 13413 {opacity: 1, marginTop: 0, marginBottom: marginBottom} 13414 ).then(function () { 13415 if (this$1.timeout) { 13416 this$1.timer = setTimeout(this$1.close, this$1.timeout); 13417 } 13418 }); 13419 13420 }, 13421 13422 events: ( obj = { 13423 13424 click: function click(e) { 13425 if (closest(e.target, 'a[href="#"]')) { 13426 e.preventDefault(); 13427 } 13428 this.close(); 13429 } 13430 13431 }, obj[pointerEnter] = function () { 13432 if (this.timer) { 13433 clearTimeout(this.timer); 13434 } 13435 }, obj[pointerLeave] = function () { 13436 if (this.timeout) { 13437 this.timer = setTimeout(this.close, this.timeout); 13438 } 13439 }, obj), 13440 13441 methods: { 13442 13443 close: function close(immediate) { 13444 var this$1 = this; 13445 13446 13447 var removeFn = function () { 13448 13449 trigger(this$1.$el, 'close', [this$1]); 13450 remove(this$1.$el); 13451 13452 if (!containers[this$1.pos].children.length) { 13453 css(containers[this$1.pos], 'display', 'none'); 13454 } 13455 13456 }; 13457 13458 if (this.timer) { 13459 clearTimeout(this.timer); 13460 } 13461 13462 if (immediate) { 13463 removeFn(); 13464 } else { 13465 Transition.start(this.$el, { 13466 opacity: 0, 13467 marginTop: -this.$el.offsetHeight, 13468 marginBottom: 0 13469 }).then(removeFn); 13470 } 13471 } 13472 13473 } 13474 13475 }); 13476 13477 UIkit.notification.closeAll = function (group, immediate) { 13478 apply(document.body, function (el) { 13479 var notification = UIkit.getComponent(el, 'notification'); 13480 if (notification && (!group || group === notification.group)) { 13481 notification.close(immediate); 13482 } 13483 }); 13484 }; 13485 13486} 13487 13488function plugin$8(UIkit) { 13489 13490 if (plugin$8.installed) { 13491 return; 13492 } 13493 13494 var mixin = UIkit.mixin; 13495 var util = UIkit.util; 13496 var css = util.css; 13497 var Dimensions = util.Dimensions; 13498 var each = util.each; 13499 var getImage = util.getImage; 13500 var includes = util.includes; 13501 var isNumber = util.isNumber; 13502 var isUndefined = util.isUndefined; 13503 var toFloat = util.toFloat; 13504 13505 var props = ['x', 'y', 'bgx', 'bgy', 'rotate', 'scale', 'color', 'backgroundColor', 'borderColor', 'opacity', 'blur', 'hue', 'grayscale', 'invert', 'saturate', 'sepia', 'fopacity']; 13506 13507 mixin.parallax = { 13508 13509 props: props.reduce(function (props, prop) { 13510 props[prop] = 'list'; 13511 return props; 13512 }, { 13513 media: 'media' 13514 }), 13515 13516 defaults: props.reduce(function (defaults, prop) { 13517 defaults[prop] = undefined; 13518 return defaults; 13519 }, { 13520 media: false 13521 }), 13522 13523 computed: { 13524 13525 props: function props$1(properties, $el) { 13526 var this$1 = this; 13527 13528 13529 return props.reduce(function (props, prop) { 13530 13531 if (isUndefined(properties[prop])) { 13532 return props; 13533 } 13534 13535 var isColor = prop.match(/color/i); 13536 var isCssProp = isColor || prop === 'opacity'; 13537 13538 var pos, bgPos, diff; 13539 var steps = properties[prop].slice(0); 13540 13541 if (isCssProp) { 13542 css($el, prop, ''); 13543 } 13544 13545 if (steps.length < 2) { 13546 steps.unshift((prop === 'scale' 13547 ? 1 13548 : isCssProp 13549 ? css($el, prop) 13550 : 0) || 0); 13551 } 13552 13553 var unit = includes(steps.join(''), '%') ? '%' : 'px'; 13554 13555 if (isColor) { 13556 13557 var ref = $el.style; 13558 var color = ref.color; 13559 steps = steps.map(function (step) { return parseColor($el, step); }); 13560 $el.style.color = color; 13561 13562 } else { 13563 13564 steps = steps.map(toFloat); 13565 13566 } 13567 13568 if (prop.match(/^bg/)) { 13569 13570 css($el, ("background-position-" + (prop[2])), ''); 13571 bgPos = css($el, 'backgroundPosition').split(' ')[prop[2] === 'x' ? 0 : 1]; // IE 11 can't read background-position-[x|y] 13572 13573 if (this$1.covers) { 13574 13575 var min = Math.min.apply(Math, steps); 13576 var max = Math.max.apply(Math, steps); 13577 var down = steps.indexOf(min) < steps.indexOf(max); 13578 13579 diff = max - min; 13580 13581 steps = steps.map(function (step) { return step - (down ? min : max); }); 13582 pos = (down ? -diff : 0) + "px"; 13583 13584 } else { 13585 13586 pos = bgPos; 13587 13588 } 13589 } 13590 13591 props[prop] = {steps: steps, unit: unit, pos: pos, bgPos: bgPos, diff: diff}; 13592 13593 return props; 13594 13595 }, {}); 13596 13597 }, 13598 13599 bgProps: function bgProps() { 13600 var this$1 = this; 13601 13602 return ['bgx', 'bgy'].filter(function (bg) { return bg in this$1.props; }); 13603 }, 13604 13605 covers: function covers$1(_, $el) { 13606 return covers($el); 13607 } 13608 13609 }, 13610 13611 disconnected: function disconnected() { 13612 delete this._image; 13613 }, 13614 13615 update: [ 13616 13617 { 13618 13619 read: function read(data) { 13620 var this$1 = this; 13621 13622 13623 data.active = !this.media || window.matchMedia(this.media).matches; 13624 13625 if (data.image) { 13626 data.image.dimEl = { 13627 width: this.$el.offsetWidth, 13628 height: this.$el.offsetHeight 13629 }; 13630 } 13631 13632 if ('image' in data || !this.covers || !this.bgProps.length) { 13633 return; 13634 } 13635 13636 var src = css(this.$el, 'backgroundImage').replace(/^none|url\(["']?(.+?)["']?\)$/, '$1'); 13637 13638 if (!src) { 13639 return; 13640 } 13641 13642 data.image = false;
13643 13644 getImage(src).then(function (img) { 13645 data.image = { 13646 width: img.naturalWidth, 13647 height: img.naturalHeight 13648 }; 13649 13650 this$1.$emit(); 13651 }); 13652 13653 }, 13654 13655 write: function write(ref) { 13656 var this$1 = this; 13657 var image = ref.image; 13658 var active = ref.active; 13659 13660 13661 if (!image) { 13662 return; 13663 } 13664 13665 if (!active) { 13666 css(this.$el, {backgroundSize: '', backgroundRepeat: ''}); 13667 return; 13668 } 13669 13670 var dimEl = image.dimEl; 13671 13672 var dim = Dimensions.cover(image, dimEl); 13673 13674 this.bgProps.forEach(function (prop) { 13675 13676 var ref = this$1.props[prop]; 13677 var diff = ref.diff; 13678 var bgPos = ref.bgPos; 13679 var steps = ref.steps; 13680 var attr = prop === 'bgy' ? 'height' : 'width'; 13681 var span = dim[attr] - dimEl[attr]; 13682 13683 if (!bgPos.match(/%$|0px/)) { 13684 return; 13685 } 13686 13687 if (span < diff) { 13688 dimEl[attr] = dim[attr] + diff - span; 13689 } else if (span > diff) { 13690 13691 var bgPosFloat = parseFloat(bgPos); 13692 13693 if (bgPosFloat) { 13694 this$1.props[prop].steps = steps.map(function (step) { return step - (span - diff) / (100 / bgPosFloat); }); 13695 } 13696 } 13697 13698 dim = Dimensions.cover(image, dimEl); 13699 }); 13700 13701 css(this.$el, { 13702 backgroundSize: ((dim.width) + "px " + (dim.height) + "px"), 13703 backgroundRepeat: 'no-repeat' 13704 }); 13705 13706 }, 13707 13708 events: ['load', 'resize'] 13709 13710 } 13711 13712 ], 13713 13714 methods: { 13715 13716 reset: function reset() { 13717 var this$1 = this; 13718 13719 each(this.getCss(0), function (_, prop) { return css(this$1.$el, prop, ''); }); 13720 }, 13721 13722 getCss: function getCss(percent) { 13723 13724 var ref = this; 13725 var props = ref.props; 13726 var translated = false; 13727 13728 return Object.keys(props).reduce(function (css, prop) { 13729 13730 var ref = props[prop]; 13731 var steps = ref.steps; 13732 var unit = ref.unit; 13733 var pos = ref.pos; 13734 var value = getValue(steps, percent); 13735 13736 switch (prop) { 13737 13738 // transforms 13739 case 'x': 13740 case 'y': 13741 13742 if (translated) { 13743 break; 13744 } 13745 13746 var ref$1 = ['x', 'y'].map(function (dir) { return prop === dir 13747 ? value + unit 13748 : props[dir] 13749 ? getValue(props[dir].steps, percent) + props[dir].unit 13750 : 0; } 13751 ); 13752 var x = ref$1[0]; 13753 var y = ref$1[1]; 13754 13755 translated = css.transform += " translate3d(" + x + ", " + y + ", 0)"; 13756 break; 13757 case 'rotate': 13758 css.transform += " rotate(" + value + "deg)"; 13759 break; 13760 case 'scale': 13761 css.transform += " scale(" + value + ")"; 13762 break; 13763 13764 // bg image 13765 case 'bgy': 13766 case 'bgx': 13767 css[("background-position-" + (prop[2]))] = "calc(" + pos + " + " + (value + unit) + ")"; 13768 break; 13769 13770 // color 13771 case 'color': 13772 case 'backgroundColor': 13773 case 'borderColor': 13774 13775 var ref$2 = getStep(steps, percent); 13776 var start = ref$2[0]; 13777 var end = ref$2[1]; 13778 var p = ref$2[2]; 13779 13780 css[prop] = "rgba(" + (start.map(function (value, i) { 13781 value = value + p * (end[i] - value);
13782 return i === 3 ? toFloat(value) : parseInt(value, 10); 13783 }).join(',')) + ")"; 13784 break; 13785 13786 // CSS Filter 13787 case 'blur': 13788 css.filter += " blur(" + value + "px)"; 13789 break; 13790 case 'hue': 13791 css.filter += " hue-rotate(" + value + "deg)"; 13792 break; 13793 case 'fopacity': 13794 css.filter += " opacity(" + value + "%)"; 13795 break; 13796 case 'grayscale': 13797 case 'invert': 13798 case 'saturate': 13799 case 'sepia': 13800 css.filter += " " + prop + "(" + value + "%)"; 13801 break; 13802 13803 default: 13804 css[prop] = value; 13805 } 13806 13807 return css; 13808 13809 }, {transform: '', filter: ''}); 13810 13811 } 13812 13813 } 13814 13815 }; 13816 13817 function parseColor(el, color) { 13818 return css(css(el, 'color', color), 'color').split(/[(),]/g).slice(1, -1).concat(1).slice(0, 4).map(function (n) { return toFloat(n); }); 13819 } 13820 13821 function getStep(steps, percent) { 13822 var count = steps.length - 1; 13823 var index = Math.min(Math.floor(count * percent), count - 1); 13824 var step = steps.slice(index, index + 2); 13825 13826 step.push(percent === 1 ? 1 : percent % (1 / count) * count); 13827 13828 return step; 13829 } 13830 13831 function getValue(steps, percent) { 13832 var ref = getStep(steps, percent); 13833 var start = ref[0]; 13834 var end = ref[1]; 13835 var p = ref[2]; 13836 return (isNumber(start) 13837 ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) 13838 : +end 13839 ).toFixed(2); 13840 } 13841 13842 function covers(el) { 13843 var ref = el.style; 13844 var backgroundSize = ref.backgroundSize; 13845 var covers = css(css(el, 'backgroundSize', ''), 'backgroundSize') === 'cover'; 13846 el.style.backgroundSize = backgroundSize; 13847 return covers; 13848 } 13849 13850} 13851 13852function plugin$7(UIkit) { 13853 13854 if (plugin$7.installed) { 13855 return; 13856 } 13857 13858 UIkit.use(plugin$8); 13859 13860 var mixin = UIkit.mixin; 13861 var util = UIkit.util; 13862 var clamp = util.clamp; 13863 var css = util.css; 13864 var scrolledOver = util.scrolledOver; 13865 var query = util.query; 13866 13867 UIkit.component('parallax', { 13868 13869 mixins: [mixin.parallax], 13870 13871 props: { 13872 target: String, 13873 viewport: Number, 13874 easing: Number, 13875 }, 13876 13877 defaults: { 13878 target: false, 13879 viewport: 1, 13880 easing: 1, 13881 }, 13882 13883 computed: { 13884 13885 target: function target(ref, $el) { 13886 var target = ref.target; 13887 13888 return target && query(target, $el) || $el; 13889 } 13890 13891 }, 13892 13893 update: [ 13894 13895 { 13896 13897 read: function read(ref) { 13898 var percent = ref.percent; 13899 13900 return { 13901 prev: percent, 13902 percent: ease(scrolledOver(this.target) / (this.viewport || 1), this.easing) 13903 }; 13904 }, 13905 13906 write: function write(ref, ref$1) { 13907 var prev = ref.prev; 13908 var percent = ref.percent; 13909 var active = ref.active; 13910 var type = ref$1.type; 13911 13912 13913 if (type !== 'scroll') { 13914 prev = false; 13915 } 13916 13917 if (!active) { 13918 this.reset(); 13919 return; 13920 } 13921 13922 if (prev !== percent) { 13923 css(this.$el, this.getCss(percent)); 13924 } 13925 13926 }, 13927 13928 events: ['scroll', 'load', 'resize'] 13929 } 13930 13931 ] 13932 13933 }); 13934 13935 function ease(percent, easing) { 13936 return clamp(percent * (1 - (easing - easing * percent))); 13937 } 13938 13939} 13940 13941function SliderReactive (UIkit) { 13942 13943 var ref = UIkit.util; 13944 var removeClass = ref.removeClass; 13945 13946 return { 13947 13948 update: [ 13949 13950 { 13951 13952 write: function write() { 13953 13954 if (this.stack.length || this.dragging) { 13955 return; 13956 } 13957 13958 var index = this.getValidIndex(); 13959 delete this.index; 13960 removeClass(this.slides, this.clsActive, this.clsActivated); 13961 this.show(index); 13962 13963 }, 13964 13965 events: ['load', 'resize'] 13966 13967 } 13968 13969 ] 13970 13971 }; 13972 13973} 13974 13975function TransitionerPlugin$1 (UIkit) { 13976 13977 var ref = UIkit.util; 13978 var assign = ref.assign; 13979 var clamp = ref.clamp; 13980 var createEvent = ref.createEvent; 13981 var css = ref.css; 13982 var Deferred = ref.Deferred; 13983 var includes = ref.includes; 13984 var index = ref.index; 13985 var isRtl = ref.isRtl; 13986 var noop = ref.noop; 13987 var sortBy = ref.sortBy; 13988 var toNodes = ref.toNodes; 13989 var Transition = ref.Transition; 13990 var trigger = ref.trigger; 13991 13992 var Transitioner = assign(function (prev, next, dir, ref) { 13993 var center = ref.center; 13994 var easing = ref.easing; 13995 var list = ref.list; 13996 13997 13998 var deferred = new Deferred(); 13999 14000 var from = prev 14001 ? Transitioner.getLeft(prev, list, center) 14002 : Transitioner.getLeft(next, list, center) + next.offsetWidth * dir, 14003 to = next 14004 ? Transitioner.getLeft(next, list, center) 14005 : from + prev.offsetWidth * dir * (isRtl ? -1 : 1); 14006 14007 return { 14008 14009 dir: dir, 14010 14011 show: function show(duration, percent, linear) { 14012 if ( percent === void 0 ) percent = 0; 14013 14014 14015 var timing = linear ? 'linear' : easing; 14016 duration -= Math.round(duration * clamp(percent, -1, 1)); 14017 14018 this.translate(percent); 14019 14020 prev && this.updateTranslates(); 14021 percent = prev ? percent : clamp(percent, 0, 1); 14022 triggerUpdate(this.getItemIn(), 'itemin', {percent: percent, duration: duration, timing: timing, dir: dir}); 14023 prev && triggerUpdate(this.getItemIn(true), 'itemout', {percent: 1 - percent, duration: duration, timing: timing, dir: dir}); 14024 14025 Transition 14026 .start(list, {transform: translate(-to * (isRtl ? -1 : 1), 'px')}, duration, timing) 14027 .then(deferred.resolve, noop); 14028 14029 return deferred.promise; 14030 14031 }, 14032 14033 stop: function stop() { 14034 return Transition.stop(list); 14035 }, 14036 14037 cancel: function cancel() { 14038 Transition.cancel(list); 14039 }, 14040 14041 reset: function reset() {
14042 css(list, 'transform', ''); 14043 }, 14044 14045 forward: function forward(duration, percent) { 14046 if ( percent === void 0 ) percent = this.percent(); 14047 14048 Transition.cancel(list); 14049 return this.show(duration, percent, true); 14050 }, 14051 14052 translate: function translate$1(percent) { 14053 14054 var distance = this.getDistance() * dir * (isRtl ? -1 : 1); 14055 14056 css(list, 'transform', translate(clamp( 14057 -to + (distance - distance * percent), 14058 -Transitioner.getWidth(list), 14059 list.offsetWidth 14060 ) * (isRtl ? -1 : 1), 'px')); 14061 14062 this.updateTranslates(); 14063 14064 if (prev) { 14065 percent = clamp(percent, -1, 1); 14066 triggerUpdate(this.getItemIn(), 'itemtranslatein', {percent: percent, dir: dir}); 14067 triggerUpdate(this.getItemIn(true), 'itemtranslateout', {percent: 1 - percent, dir: dir}); 14068 } 14069 14070 }, 14071 14072 percent: function percent() { 14073 return Math.abs((css(list, 'transform').split(',')[4] * (isRtl ? -1 : 1) + from) / (to - from)); 14074 }, 14075 14076 getDistance: function getDistance() { 14077 return Math.abs(to - from); 14078 }, 14079 14080 getItemIn: function getItemIn(out) { 14081 if ( out === void 0 ) out = false; 14082 14083 14084 var actives = this.getActives(); 14085 var all = sortBy(slides(list), 'offsetLeft'); 14086 var i = index(all, actives[dir * (out ? -1 : 1) > 0 ? actives.length - 1 : 0]); 14087 14088 return ~i && all[i + (prev && !out ? dir : 0)]; 14089 14090 }, 14091 14092 getActives: function getActives() { 14093 14094 var left = Transitioner.getLeft(prev || next, list, center); 14095 14096 return sortBy(slides(list).filter(function (slide) { 14097 var slideLeft = Transitioner.getElLeft(slide, list); 14098 return slideLeft >= left && slideLeft + slide.offsetWidth <= list.offsetWidth + left; 14099 }), 'offsetLeft'); 14100 14101 }, 14102 14103 updateTranslates: function updateTranslates() { 14104 14105 var actives = this.getActives(); 14106 14107 slides(list).forEach(function (slide) { 14108 var isActive = includes(actives, slide); 14109 14110 triggerUpdate(slide, ("itemtranslate" + (isActive ? 'in' : 'out')), { 14111 percent: isActive ? 1 : 0, 14112 dir: slide.offsetLeft <= next.offsetLeft ? 1 : -1 14113 }); 14114 }); 14115 } 14116 14117 }; 14118 14119 }, { 14120 14121 getLeft: function getLeft(el, list, center) { 14122 14123 var left = this.getElLeft(el, list); 14124 14125 return center 14126 ? left - this.center(el, list) 14127 : Math.min(left, this.getMax(list)); 14128 14129 }, 14130 14131 getMax: function getMax(list) { 14132 return Math.max(0, this.getWidth(list) - list.offsetWidth); 14133 }, 14134 14135 getWidth: function getWidth(list) { 14136 return slides(list).reduce(function (right, el) { return el.offsetWidth + right; }, 0); 14137 }, 14138 14139 getMaxWidth: function getMaxWidth(list) { 14140 return slides(list).reduce(function (right, el) { return Math.max(right, el.offsetWidth); }, 0); 14141 }, 14142 14143 center: function center(el, list) { 14144 return list.offsetWidth / 2 - el.offsetWidth / 2; 14145 }, 14146 14147 getElLeft: function getElLeft(el, list) { 14148 return (el.offsetLeft + (isRtl ? el.offsetWidth - list.offsetWidth : 0)) * (isRtl ? -1 : 1); 14149 } 14150 14151 }); 14152 14153 function triggerUpdate(el, type, data) { 14154 trigger(el, createEvent(type, false, false, data)); 14155 } 14156 14157 function slides(list) { 14158 return toNodes(list.children); 14159 } 14160 14161 return Transitioner; 14162 14163} 14164 14165function ParallaxPlugin (UIkit, parent) { 14166 14167 UIkit.use(plugin$8); 14168 14169 var mixin = UIkit.mixin; 14170 var UIkit_util = UIkit.util; 14171 var closest = UIkit_util.closest; 14172 var css = UIkit_util.css; 14173 var endsWith = UIkit_util.endsWith; 14174 var noop = UIkit_util.noop; 14175 var Transition = UIkit_util.Transition; 14176 14177 return { 14178 14179 mixins: [mixin.parallax], 14180 14181 computed: { 14182 14183 item: function item() { 14184 var slider = UIkit.getComponent(closest(this.$el, (".uk-" + parent)), parent); 14185 return slider && closest(this.$el, slider.slidesSelector); 14186 } 14187 14188 }, 14189 14190 events: [ 14191 14192 { 14193 14194 name: 'itemshown', 14195 14196 self: true, 14197 14198 el: function el() { 14199 return this.item; 14200 }, 14201 14202 handler: function handler() { 14203 css(this.$el, this.getCss(.5)); 14204 } 14205 14206 }, 14207 14208 { 14209 name: 'itemin itemout', 14210 14211 self: true, 14212 14213 el: function el() { 14214 return this.item; 14215 }, 14216 14217 handler: function handler(ref) { 14218 var type = ref.type; 14219 var ref_detail = ref.detail; 14220 var percent = ref_detail.percent; 14221 var duration = ref_detail.duration; 14222 var timing = ref_detail.timing; 14223 var dir = ref_detail.dir; 14224 14225 14226 Transition.cancel(this.$el); 14227 css(this.$el, this.getCss(getCurrent(type, dir, percent))); 14228 14229 Transition.start(this.$el, this.getCss(isIn(type) 14230 ? .5 14231 : dir > 0 14232 ? 1 14233 : 0
14234 ), duration, timing).catch(noop); 14235 14236 } 14237 }, 14238 14239 { 14240 name: 'transitioncanceled transitionend', 14241 14242 self: true, 14243 14244 el: function el() { 14245 return this.item; 14246 }, 14247 14248 handler: function handler() { 14249 Transition.cancel(this.$el); 14250 } 14251 14252 }, 14253 14254 { 14255 name: 'itemtranslatein itemtranslateout', 14256 14257 self: true, 14258 14259 el: function el() { 14260 return this.item; 14261 }, 14262 14263 handler: function handler(ref) { 14264 var type = ref.type; 14265 var ref_detail = ref.detail; 14266 var percent = ref_detail.percent; 14267 var dir = ref_detail.dir; 14268 14269 Transition.cancel(this.$el); 14270 css(this.$el, this.getCss(getCurrent(type, dir, percent))); 14271 } 14272 } 14273 14274 ] 14275 14276 }; 14277 14278 function isIn(type) { 14279 return endsWith(type, 'in'); 14280 } 14281 14282 function getCurrent(type, dir, percent) { 14283 14284 percent /= 2; 14285 14286 return !isIn(type) 14287 ? dir < 0 14288 ? percent 14289 : 1 - percent 14290 : dir < 0 14291 ? 1 - percent 14292 : percent; 14293 } 14294 14295} 14296 14297function plugin$9(UIkit) { 14298 14299 if (plugin$9.installed) { 14300 return; 14301 } 14302 14303 UIkit.use(plugin$5); 14304 14305 var mixin = UIkit.mixin; 14306 var UIkit_util = UIkit.util; 14307 var $ = UIkit_util.$; 14308 var $$ = UIkit_util.$$; 14309 var addClass = UIkit_util.addClass; 14310 var css = UIkit_util.css; 14311 var data = UIkit_util.data; 14312 var includes = UIkit_util.includes; 14313 var isNumeric = UIkit_util.isNumeric; 14314 var isUndefined = UIkit_util.isUndefined; 14315 var offset = UIkit_util.offset; 14316 var toggleClass = UIkit_util.toggleClass; 14317 var toFloat = UIkit_util.toFloat; 14318 var Transitioner = TransitionerPlugin$1(UIkit); 14319 14320 UIkit.component('slider-parallax', ParallaxPlugin(UIkit, 'slider')); 14321 14322 UIkit.component('slider', { 14323 14324 mixins: [mixin.class, mixin.slider, SliderReactive(UIkit)], 14325 14326 props: { 14327 center: Boolean, 14328 sets: Boolean, 14329 }, 14330 14331 defaults: { 14332 center: false, 14333 sets: false, 14334 attrItem: 'uk-slider-item', 14335 selList: '.uk-slider-items', 14336 selNav: '.uk-slider-nav', 14337 clsContainer: 'uk-slider-container', 14338 Transitioner: Transitioner 14339 }, 14340 14341 computed: { 14342 14343 avgWidth: function avgWidth() { 14344 return Transitioner.getWidth(this.list) / this.length; 14345 }, 14346 14347 finite: function finite(ref) { 14348 var finite = ref.finite; 14349 14350 return finite || Transitioner.getWidth(this.list) < this.list.offsetWidth + Transitioner.getMaxWidth(this.list) + this.center; 14351 }, 14352 14353 maxIndex: function maxIndex() { 14354 var this$1 = this; 14355 14356 14357 if (!this.finite || this.center && !this.sets) { 14358 return this.length - 1; 14359 } 14360 14361 if (this.center) { 14362 return this.sets[this.sets.length - 1]; 14363 } 14364 14365 css(this.slides, 'order', ''); 14366 14367 var max = Transitioner.getMax(this.list); 14368 var i = this.length; 14369 14370 while (i--) { 14371 if (Transitioner.getElLeft(this$1.list.children[i], this$1.list) < max) { 14372 return Math.min(i + 1, this$1.length - 1); 14373 } 14374 } 14375 14376 return 0; 14377 }, 14378 14379 sets: function sets(ref) { 14380 var this$1 = this; 14381 var sets = ref.sets; 14382 14383 14384 var width = this.list.offsetWidth / (this.center ? 2 : 1); 14385 14386 var left = 0; 14387 var leftCenter = width; 14388 14389 sets = sets && this.slides.reduce(function (sets, slide, i) { 14390 14391 var dim = offset(slide); 14392 14393 if (dim.right > left) { 14394 14395 if (!this$1.center && i > this$1.maxIndex) { 14396 i = this$1.maxIndex; 14397 } 14398 14399 if (!includes(sets, i)) { 14400 14401 var cmp = this$1.slides[i + 1]; 14402 if (this$1.center && cmp && dim.width < leftCenter - offset(cmp).width / 2) { 14403 leftCenter -= dim.width; 14404 } else { 14405 leftCenter = width; 14406 sets.push(i); 14407 left = dim.left + width + (this$1.center ? dim.width / 2 : 0); 14408 } 14409 14410 } 14411 } 14412 14413 return sets; 14414 14415 }, []); 14416
14417 return sets && sets.length && sets; 14418 14419 }, 14420 14421 transitionOptions: function transitionOptions() { 14422 return { 14423 center: this.center, 14424 list: this.list 14425 }; 14426 } 14427 14428 }, 14429 14430 connected: function connected() { 14431 toggleClass(this.$el, this.clsContainer, !$(("." + (this.clsContainer)), this.$el)); 14432 }, 14433 14434 update: { 14435 14436 write: function write() { 14437 var this$1 = this; 14438 14439 14440 $$(("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]"), this.$el).forEach(function (el) { 14441 var index = data(el, this$1.attrItem); 14442 this$1.maxIndex && toggleClass(el, 'uk-hidden', isNumeric(index) && (this$1.sets && !includes(this$1.sets, toFloat(index)) || index > this$1.maxIndex)); 14443 }); 14444 14445 }, 14446 14447 events: ['load', 'resize'] 14448 14449 }, 14450 14451 events: { 14452 14453 beforeitemshow: function beforeitemshow(e) { 14454 var this$1 = this; 14455 14456 14457 if (!this.dragging && this.sets && this.stack.length < 2 && !includes(this.sets, this.index)) { 14458 this.index = this.getValidIndex(); 14459 } 14460 14461 var diff = Math.abs( 14462 this.index 14463 - this.prevIndex 14464 + (this.dir > 0 && this.index < this.prevIndex || this.dir < 0 && this.index > this.prevIndex ? (this.maxIndex + 1) * this.dir : 0) 14465 ); 14466 14467 if (!this.dragging && diff > 1) { 14468 14469 for (var i = 0; i < diff; i++) { 14470 this$1.stack.splice(1, 0, this$1.dir > 0 ? 'next' : 'previous'); 14471 } 14472 14473 e.preventDefault(); 14474 return; 14475 } 14476 14477 this.duration = speedUp(this.avgWidth / this.velocity) 14478 * (( 14479 this.dir < 0 || !this.slides[this.prevIndex] 14480 ? this.slides[this.index] 14481 : this.slides[this.prevIndex] 14482 ).offsetWidth / this.avgWidth); 14483 14484 this.reorder(); 14485 14486 }, 14487 14488 itemshow: function itemshow() { 14489 !isUndefined(this.prevIndex) && addClass(this._getTransitioner().getItemIn(), this.clsActive); 14490 }, 14491 14492 itemshown: function itemshown() { 14493 var this$1 = this; 14494 14495 var actives = this._getTransitioner(this.index).getActives(); 14496 this.slides.forEach(function (slide) { return toggleClass(slide, this$1.clsActive, includes(actives, slide)); }); 14497 (!this.sets || includes(this.sets, toFloat(this.index))) && this.slides.forEach(function (slide) { return toggleClass(slide, this$1.clsActivated, includes(actives, slide)); }); 14498 } 14499 14500 }, 14501 14502 methods: { 14503 14504 reorder: function reorder() { 14505 var this$1 = this; 14506 14507 14508 css(this.slides, 'order', ''); 14509 14510 if (this.finite) { 14511 return; 14512 } 14513 14514 var index = this.dir > 0 && this.slides[this.prevIndex] ? this.prevIndex : this.index; 14515 14516 this.slides.forEach(function (slide, i) { return css(slide, 'order', this$1.dir > 0 && i < index 14517 ? 1 14518 : this$1.dir < 0 && i >= this$1.index 14519 ? -1 14520 : '' 14521 ); } 14522 ); 14523 14524 if (!this.center) { 14525 return; 14526 } 14527 14528 var next = this.slides[index]; 14529 var width = this.list.offsetWidth / 2 - next.offsetWidth / 2; 14530 var j = 0; 14531 14532 while (width > 0) { 14533 var slideIndex = this$1.getIndex(--j + index, index); 14534 var slide = this$1.slides[slideIndex]; 14535 14536 css(slide, 'order', slideIndex > index ? -2 : -1); 14537 width -= slide.offsetWidth; 14538 } 14539 14540 }, 14541 14542 getValidIndex: function getValidIndex(index, prevIndex) { 14543 var this$1 = this; 14544 if ( index === void 0 ) index = this.index; 14545 if ( prevIndex === void 0 ) prevIndex = this.prevIndex; 14546 14547 14548 index = this.getIndex(index, prevIndex); 14549 14550 if (!this.sets) { 14551 return index; 14552 } 14553 14554 var prev; 14555 14556 do { 14557 14558 if (includes(this$1.sets, index)) { 14559 return index; 14560 } 14561 14562 prev = index; 14563 index = this$1.getIndex(index + this$1.dir, prevIndex); 14564 14565 } while (index !== prev); 14566 14567 return index; 14568 } 14569 14570 } 14571 14572 }); 14573 14574} 14575 14576function AnimationsPlugin$2 (UIkit) { 14577
14578 var mixin = UIkit.mixin; 14579 var UIkit_util = UIkit.util; 14580 var assign = UIkit_util.assign; 14581 var css = UIkit_util.css; 14582 14583 var Animations = assign({}, mixin.slideshow.defaults.Animations, { 14584 14585 fade: { 14586 14587 show: function show() { 14588 return [ 14589 {opacity: 0, zIndex: 0}, 14590 {zIndex: -1} 14591 ]; 14592 }, 14593 14594 percent: function percent(current) { 14595 return 1 - css(current, 'opacity'); 14596 }, 14597 14598 translate: function translate$$1(percent) { 14599 return [ 14600 {opacity: 1 - percent, zIndex: 0}, 14601 {zIndex: -1} 14602 ]; 14603 } 14604 14605 }, 14606 14607 scale: { 14608 14609 show: function show() { 14610 return [ 14611 {opacity: 0, transform: scale3d(1 + .5), zIndex: 0}, 14612 {zIndex: -1} 14613 ]; 14614 }, 14615 14616 percent: function percent(current) { 14617 return 1 - css(current, 'opacity'); 14618 }, 14619 14620 translate: function translate$$1(percent) { 14621 return [ 14622 {opacity: 1 - percent, transform: scale3d(1 + .5 * percent), zIndex: 0}, 14623 {zIndex: -1} 14624 ]; 14625 } 14626 14627 }, 14628 14629 pull: { 14630 14631 show: function show(dir) { 14632 return dir < 0 14633 ? [ 14634 {transform: translate(30), zIndex: -1}, 14635 {transform: translate(), zIndex: 0} ] 14636 : [ 14637 {transform: translate(-100), zIndex: 0}, 14638 {transform: translate(), zIndex: -1} 14639 ]; 14640 }, 14641 14642 percent: function percent(current, next, dir) { 14643 return dir < 0 14644 ? 1 - Animations.translated(next) 14645 : Animations.translated(current); 14646 }, 14647 14648 translate: function translate$1(percent, dir) { 14649 return dir < 0 14650 ? [ 14651 {transform: translate(30 * percent), zIndex: -1}, 14652 {transform: translate(-100 * (1 - percent)), zIndex: 0} ] 14653 : [ 14654 {transform: translate(-percent * 100), zIndex: 0}, 14655 {transform: translate(30 * (1 - percent)), zIndex: -1} 14656 ]; 14657 } 14658 14659 }, 14660 14661 push: { 14662 14663 show: function show(dir) { 14664 return dir < 0 14665 ? [ 14666 {transform: translate(100), zIndex: 0}, 14667 {transform: translate(), zIndex: -1} ] 14668 : [ 14669 {transform: translate(-30), zIndex: -1}, 14670 {transform: translate(), zIndex: 0} 14671 ]; 14672 }, 14673 14674 percent: function percent(current, next, dir) { 14675 return dir > 0 14676 ? 1 - Animations.translated(next) 14677 : Animations.translated(current); 14678 }, 14679 14680 translate: function translate$2(percent, dir) { 14681 return dir < 0 14682 ? [ 14683 {transform: translate(percent * 100), zIndex: 0}, 14684 {transform: translate(-30 * (1 - percent)), zIndex: -1} ] 14685 : [ 14686 {transform: translate(-30 * percent), zIndex: -1}, 14687 {transform: translate(100 * (1 - percent)), zIndex: 0} 14688 ]; 14689 } 14690 14691 } 14692 14693 }); 14694 14695 return Animations; 14696 14697} 14698 14699function plugin$10(UIkit) { 14700 14701 if (plugin$10.installed) { 14702 return; 14703 } 14704 14705 UIkit.use(plugin$4); 14706 14707 var mixin = UIkit.mixin; 14708 var height = UIkit.util.height; 14709 14710 var Animations = AnimationsPlugin$2(UIkit); 14711 14712 UIkit.component('slideshow-parallax', ParallaxPlugin(UIkit, 'slideshow')); 14713 14714 UIkit.component('slideshow', { 14715 14716 mixins: [mixin.class, mixin.slideshow, SliderReactive(UIkit)], 14717 14718 props: { 14719 ratio: String, 14720 minHeight: Boolean, 14721 maxHeight: Boolean, 14722 }, 14723 14724 defaults: { 14725 ratio: '16:9', 14726 minHeight: false, 14727 maxHeight: false, 14728 selList: '.uk-slideshow-items', 14729 attrItem: 'uk-slideshow-item', 14730 selNav: '.uk-slideshow-nav', 14731 Animations: Animations 14732 }, 14733 14734 update: { 14735 14736 read: function read() { 14737 14738 var ref = this.ratio.split(':').map(Number); 14739 var width = ref[0]; 14740 var height = ref[1]; 14741 14742 height = height * this.$el.offsetWidth / width; 14743 14744 if (this.minHeight) { 14745 height = Math.max(this.minHeight, height); 14746 } 14747 14748 if (this.maxHeight) { 14749 height = Math.min(this.maxHeight, height); 14750 } 14751 14752 return {height: height}; 14753 }, 14754 14755 write: function write(ref) { 14756 var hgt = ref.height; 14757 14758 height(this.list, Math.floor(hgt)); 14759 }, 14760 14761 events: ['load', 'resize'] 14762 14763 } 14764 14765 }); 14766 14767} 14768 14769function plugin$11(UIkit) { 14770 var obj; 14771 14772 14773 if (plugin$11.installed) { 14774 return; 14775 } 14776
14777 var mixin = UIkit.mixin; 14778 var util = UIkit.util; 14779 var addClass = util.addClass; 14780 var after = util.after; 14781 var assign = util.assign; 14782 var append = util.append; 14783 var attr = util.attr; 14784 var before = util.before; 14785 var closest = util.closest; 14786 var css = util.css; 14787 var height = util.height; 14788 var fastdom = util.fastdom; 14789 var getPos = util.getPos; 14790 var includes = util.includes; 14791 var index = util.index; 14792 var isInput = util.isInput; 14793 var noop = util.noop; 14794 var offset = util.offset; 14795 var off = util.off; 14796 var on = util.on; 14797 var pointerDown = util.pointerDown; 14798 var pointerMove = util.pointerMove; 14799 var pointerUp = util.pointerUp; 14800 var position = util.position; 14801 var preventClick = util.preventClick; 14802 var Promise = util.Promise; 14803 var remove = util.remove; 14804 var removeClass = util.removeClass; 14805 var toggleClass = util.toggleClass; 14806 var toNodes = util.toNodes; 14807 var Transition = util.Transition; 14808 var trigger = util.trigger; 14809 var within = util.within; 14810 14811 UIkit.component('sortable', { 14812 14813 mixins: [mixin.class], 14814 14815 props: { 14816 group: String, 14817 animation: Number, 14818 threshold: Number, 14819 clsItem: String, 14820 clsPlaceholder: String, 14821 clsDrag: String, 14822 clsDragState: String, 14823 clsBase: String, 14824 clsNoDrag: String, 14825 clsEmpty: String, 14826 clsCustom: String, 14827 handle: String 14828 }, 14829 14830 defaults: { 14831 group: false, 14832 animation: 150, 14833 threshold: 5, 14834 clsItem: 'uk-sortable-item', 14835 clsPlaceholder: 'uk-sortable-placeholder', 14836 clsDrag: 'uk-sortable-drag', 14837 clsDragState: 'uk-drag', 14838 clsBase: 'uk-sortable', 14839 clsNoDrag: 'uk-sortable-nodrag', 14840 clsEmpty: 'uk-sortable-empty', 14841 clsCustom: '', 14842 handle: false 14843 }, 14844 14845 init: function init() { 14846 var this$1 = this; 14847 14848 ['init', 'start', 'move', 'end'].forEach(function (key) { 14849 var fn = this$1[key]; 14850 this$1[key] = function (e) { 14851 this$1.scrollY = window.pageYOffset; 14852 var ref = getPos(e); 14853 var x = ref.x; 14854 var y = ref.y; 14855 this$1.pos = {x: x, y: y}; 14856 14857 fn(e); 14858 }; 14859 }); 14860 }, 14861 14862 events: ( obj = {}, obj[pointerDown] = 'init', obj), 14863 14864 update: { 14865 14866 write: function write() { 14867 14868 if (this.clsEmpty) { 14869 toggleClass(this.$el, this.clsEmpty, !this.$el.children.length); 14870 } 14871 14872 if (!this.drag) { 14873 return; 14874 } 14875 14876 offset(this.drag, {top: this.pos.y + this.origin.top, left: this.pos.x + this.origin.left}); 14877 14878 var ref = offset(this.drag); 14879 var top = ref.top; 14880 var bottom = top + this.drag.offsetHeight; 14881 var scroll; 14882 14883 if (top > 0 && top < this.scrollY) { 14884 scroll = this.scrollY - 5; 14885 } else if (bottom < height(document) && bottom > height(window) + this.scrollY) { 14886 scroll = this.scrollY + 5; 14887 } 14888 14889 scroll && setTimeout(function () { return window.scrollTo(window.scrollX, scroll); }, 5); 14890 } 14891 14892 }, 14893 14894 methods: { 14895 14896 init: function init(e) { 14897 14898 var target = e.target; 14899 var button = e.button; 14900 var defaultPrevented = e.defaultPrevented; 14901 var ref = toNodes(this.$el.children).filter(function (el) { return within(target, el); }); 14902 var placeholder = ref[0]; 14903 14904 if (!placeholder 14905 || isInput(e.target) 14906 || this.handle && !within(target, this.handle) 14907 || button > 0 14908 || within(target, ("." + (this.clsNoDrag))) 14909 || defaultPrevented 14910 ) { 14911 return; 14912 } 14913 14914 e.preventDefault(); 14915 14916 this.touched = [this]; 14917 this.placeholder = placeholder; 14918 this.origin = assign({target: target, index: index(placeholder)}, this.pos); 14919 14920 on(document, pointerMove, this.move); 14921 on(document, pointerUp, this.end); 14922 on(window, 'scroll', this.scroll); 14923 14924 if (!this.threshold) { 14925 this.start(e); 14926 } 14927 14928 }, 14929 14930 start: function start(e) { 14931 14932 this.drag = append(UIkit.container, this.placeholder.outerHTML.replace(/^<li/i, '<div').replace(/li>$/i, 'div>')); 14933 14934 css(this.drag, assign({ 14935 boxSizing: 'border-box', 14936 width: this.placeholder.offsetWidth, 14937 height: this.placeholder.offsetHeight 14938 }, css(this.placeholder, ['paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom']))); 14939 attr(this.drag, 'uk-no-boot', ''); 14940 addClass(this.drag, this.clsDrag, this.clsCustom); 14941 14942 height(this.drag.firstElementChild, height(this.placeholder.firstElementChild)); 14943 14944 var ref = offset(this.placeholder); 14945 var left = ref.left; 14946 var top = ref.top; 14947 assign(this.origin, {left: left - this.pos.x, top: top - this.pos.y}); 14948 14949 addClass(this.placeholder, this.clsPlaceholder); 14950 addClass(this.$el.children, this.clsItem); 14951 addClass(document.documentElement, this.clsDragState); 14952 14953 trigger(this.$el, 'start', [this, this.placeholder, this.drag]); 14954 14955 this.move(e); 14956 }, 14957 14958 move: function move(e) { 14959 14960 if (!this.drag) { 14961 14962 if (Math.abs(this.pos.x - this.origin.x) > this.threshold || Math.abs(this.pos.y - this.origin.y) > this.threshold) { 14963 this.start(e); 14964 } 14965 14966 return; 14967 } 14968 14969 this.$emit(); 14970 14971 var target = e.type === 'mousemove' ? e.target : document.elementFromPoint(this.pos.x - document.body.scrollLeft, this.pos.y - document.body.scrollTop); 14972 14973 var sortable = getSortable(target); 14974 var previous = getSortable(this.placeholder); 14975 var move = sortable !== previous; 14976 14977 if (!sortable || within(target, this.placeholder) || move && (!sortable.group || sortable.group !== previous.group)) { 14978 return; 14979 } 14980 14981 target = sortable.$el === target.parentNode && target || toNodes(sortable.$el.children).filter(function (element) { return within(target, element); })[0]; 14982 14983 if (move) { 14984 previous.remove(this.placeholder); 14985 } else if (!target) { 14986 return; 14987 } 14988 14989 sortable.insert(this.placeholder, target); 14990 14991 if (!includes(this.touched, sortable)) { 14992 this.touched.push(sortable); 14993 } 14994 14995 }, 14996 14997 scroll: function scroll() { 14998 var scroll = window.pageYOffset; 14999 if (scroll !== this.scrollY) { 15000 this.pos.y += scroll - this.scrollY; 15001 this.scrollY = scroll; 15002 this.$emit(); 15003 } 15004 }, 15005 15006 end: function end(e) { 15007 15008 off(document, pointerMove, this.move); 15009 off(document, pointerUp, this.end); 15010 off(window, 'scroll', this.scroll); 15011 15012 if (!this.drag) { 15013 15014 if (e.type !== 'mouseup' && within(e.target, 'a[href]')) { 15015 location.href = closest(e.target, 'a[href]').href; 15016 } 15017 15018 return; 15019 } 15020 15021 preventClick(); 15022 15023 var sortable = getSortable(this.placeholder); 15024 15025 if (this === sortable) { 15026 if (this.origin.index !== index(this.placeholder)) { 15027 trigger(this.$el, 'moved', [this, this.placeholder]); 15028 } 15029 } else { 15030 trigger(sortable.$el, 'added', [sortable, this.placeholder]); 15031 trigger(this.$el, 'removed', [this, this.placeholder]); 15032 } 15033 15034 trigger(this.$el, 'stop', [this]); 15035 15036 remove(this.drag); 15037 this.drag = null; 15038 15039 var classes = this.touched.map(function (sortable) { return ((sortable.clsPlaceholder) + " " + (sortable.clsItem)); }).join(' '); 15040 this.touched.forEach(function (sortable) { return removeClass(sortable.$el.children, classes); }); 15041 15042 removeClass(document.documentElement, this.clsDragState); 15043 15044 }, 15045 15046 insert: function insert(element, target) { 15047 var this$1 = this; 15048 15049 15050 addClass(this.$el.children, this.clsItem); 15051 15052 var insert = function () { 15053 15054 if (target) { 15055 15056 if (!within(element, this$1.$el) || isPredecessor(element, target)) { 15057 before(target, element); 15058 } else { 15059 after(target, element); 15060 } 15061 15062 } else { 15063 append(this$1.$el, element); 15064 } 15065 15066 }; 15067 15068 if (this.animation) { 15069 this.animate(insert); 15070 } else { 15071 insert(); 15072 } 15073 15074 }, 15075 15076 remove: function remove$1(element) { 15077 15078 if (!within(element, this.$el)) { 15079 return; 15080 } 15081 15082 if (this.animation) { 15083 this.animate(function () { return remove(element); }); 15084 } else { 15085 remove(element); 15086 } 15087 15088 }, 15089 15090 animate: function animate(action) { 15091 var this$1 = this; 15092 15093 15094 var props = []; 15095 var children = toNodes(this.$el.children); 15096 var reset = {position: '', width: '', height: '', pointerEvents: '', top: '', left: '', bottom: '', right: ''}; 15097
15098 children.forEach(function (el) { 15099 props.push(assign({ 15100 position: 'absolute', 15101 pointerEvents: 'none', 15102 width: el.offsetWidth, 15103 height: el.offsetHeight 15104 }, position(el))); 15105 }); 15106 15107 action(); 15108 15109 children.forEach(Transition.cancel); 15110 css(this.$el.children, reset); 15111 UIkit.update(this.$el); 15112 fastdom.flush(); 15113 15114 css(this.$el, 'minHeight', height(this.$el)); 15115 15116 var positions = children.map(function (el) { return position(el); }); 15117 Promise.all(children.map(function (el, i) { return Transition.start(css(el, props[i]), positions[i], this$1.animation); })) 15118 .then(function () { 15119 css(this$1.$el, 'minHeight', ''); 15120 css(children, reset); 15121 UIkit.update(this$1.$el); 15122 fastdom.flush(); 15123 }, noop); 15124 15125 } 15126 15127 } 15128 15129 }); 15130 15131 function getSortable(element) { 15132 return element && (UIkit.getComponent(element, 'sortable') || getSortable(element.parentNode)); 15133 } 15134 15135 function isPredecessor(element, target) { 15136 return element.parentNode === target.parentNode && index(element) > index(target); 15137 } 15138 15139} 15140 15141function plugin$12(UIkit) { 15142 var obj; 15143 15144 15145 if (plugin$12.installed) { 15146 return; 15147 } 15148 15149 var util = UIkit.util; 15150 var mixin = UIkit.mixin; 15151 var append = util.append; 15152 var attr = util.attr; 15153 var flipPosition = util.flipPosition; 15154 var hasAttr = util.hasAttr; 15155 var includes = util.includes; 15156 var isTouch = util.isTouch; 15157 var isVisible = util.isVisible; 15158 var matches = util.matches; 15159 var on = util.on; 15160 var pointerDown = util.pointerDown; 15161 var pointerEnter = util.pointerEnter; 15162 var pointerLeave = util.pointerLeave; 15163 var remove = util.remove; 15164 var within = util.within; 15165 15166 var actives = []; 15167 15168 UIkit.component('tooltip', { 15169 15170 attrs: true, 15171 15172 args: 'title', 15173 15174 mixins: [mixin.container, mixin.togglable, mixin.position], 15175 15176 props: { 15177 delay: Number, 15178 title: String 15179 }, 15180 15181 defaults: { 15182 pos: 'top', 15183 title: '', 15184 delay: 0, 15185 animation: ['uk-animation-scale-up'], 15186 duration: 100, 15187 cls: 'uk-active', 15188 clsPos: 'uk-tooltip' 15189 }, 15190 15191 beforeConnect: function beforeConnect() { 15192 this._hasTitle = hasAttr(this.$el, 'title'); 15193 attr(this.$el, {title: '', 'aria-expanded': false}); 15194 }, 15195 15196 disconnected: function disconnected() { 15197 this.hide(); 15198 attr(this.$el, {title: this._hasTitle ? this.title : null, 'aria-expanded': null}); 15199 }, 15200 15201 methods: { 15202 15203 show: function show() { 15204 var this$1 = this; 15205 15206 15207 if (includes(actives, this)) { 15208 return; 15209 } 15210 15211 actives.forEach(function (active) { return active.hide(); }); 15212 actives.push(this); 15213 15214 this._unbind = on(document, 'click', function (e) { return !within(e.target, this$1.$el) && this$1.hide(); }); 15215 15216 clearTimeout(this.showTimer); 15217 15218 this.tooltip = append(this.container, ("<div class=\"" + (this.clsPos) + "\" aria-hidden><div class=\"" + (this.clsPos) + "-inner\">" + (this.title) + "</div></div>")); 15219 15220 attr(this.$el, 'aria-expanded', true); 15221 15222 this.positionAt(this.tooltip, this.$el); 15223 15224 this.origin = this.getAxis() === 'y' ? ((flipPosition(this.dir)) + "-" + (this.align)) : ((this.align) + "-" + (flipPosition(this.dir))); 15225 15226 this.showTimer = setTimeout(function () { 15227 15228 this$1.toggleElement(this$1.tooltip, true); 15229 15230 this$1.hideTimer = setInterval(function () { 15231 15232 if (!isVisible(this$1.$el)) { 15233 this$1.hide(); 15234 } 15235 15236 }, 150); 15237 15238 }, this.delay); 15239 }, 15240 15241 hide: function hide() { 15242 15243 var index = actives.indexOf(this); 15244 15245 if (!~index || matches(this.$el, 'input') && this.$el === document.activeElement) { 15246 return; 15247 } 15248 15249 actives.splice(index, 1); 15250 15251 clearTimeout(this.showTimer); 15252 clearInterval(this.hideTimer); 15253 attr(this.$el, 'aria-expanded', false); 15254 this.toggleElement(this.tooltip, false); 15255 this.tooltip && remove(this.tooltip); 15256 this.tooltip = false;
15257 this._unbind(); 15258 15259 } 15260 15261 }, 15262 15263 events: ( obj = {}, obj[("focus " + pointerEnter + " " + pointerDown)] = function (e) { 15264 if (e.type !== pointerDown || !isTouch(e)) { 15265 this.show(); 15266 } 15267 }, obj.blur = 'hide', obj[pointerLeave] = function (e) { 15268 if (!isTouch(e)) { 15269 this.hide(); 15270 } 15271 }, obj) 15272 15273 }); 15274 15275} 15276 15277function plugin$13(UIkit) { 15278 15279 if (plugin$13.installed) { 15280 return; 15281 } 15282 15283 var ref = UIkit.util; 15284 var addClass = ref.addClass; 15285 var ajax = ref.ajax; 15286 var matches = ref.matches; 15287 var noop = ref.noop; 15288 var on = ref.on; 15289 var removeClass = ref.removeClass; 15290 var trigger = ref.trigger; 15291 15292 UIkit.component('upload', { 15293 15294 props: { 15295 allow: String, 15296 clsDragover: String, 15297 concurrent: Number, 15298 maxSize: Number, 15299 method: String, 15300 mime: String, 15301 msgInvalidMime: String, 15302 msgInvalidName: String, 15303 msgInvalidSize: String, 15304 multiple: Boolean, 15305 name: String, 15306 params: Object, 15307 type: String, 15308 url: String, 15309 }, 15310 15311 defaults: { 15312 allow: false, 15313 clsDragover: 'uk-dragover', 15314 concurrent: 1, 15315 maxSize: 0, 15316 method: 'POST', 15317 mime: false, 15318 msgInvalidMime: 'Invalid File Type: %s', 15319 msgInvalidName: 'Invalid File Name: %s', 15320 msgInvalidSize: 'Invalid File Size: %s Bytes Max', 15321 multiple: false, 15322 name: 'files[]', 15323 params: {}, 15324 type: '', 15325 url: '', 15326 abort: noop, 15327 beforeAll: noop, 15328 beforeSend: noop, 15329 complete: noop, 15330 completeAll: noop, 15331 error: noop, 15332 fail: noop, 15333 load: noop, 15334 loadEnd: noop, 15335 loadStart: noop, 15336 progress: noop 15337 }, 15338 15339 events: { 15340 15341 change: function change(e) { 15342 15343 if (!matches(e.target, 'input[type="file"]')) { 15344 return; 15345 } 15346 15347 e.preventDefault(); 15348 15349 if (e.target.files) { 15350 this.upload(e.target.files); 15351 } 15352 15353 e.target.value = ''; 15354 }, 15355 15356 drop: function drop(e) { 15357 stop(e); 15358 15359 var transfer = e.dataTransfer; 15360 15361 if (!transfer || !transfer.files) { 15362 return; 15363 } 15364 15365 removeClass(this.$el, this.clsDragover); 15366 15367 this.upload(transfer.files); 15368 }, 15369 15370 dragenter: function dragenter(e) { 15371 stop(e); 15372 }, 15373 15374 dragover: function dragover(e) { 15375 stop(e); 15376 addClass(this.$el, this.clsDragover); 15377 }, 15378 15379 dragleave: function dragleave(e) { 15380 stop(e); 15381 removeClass(this.$el, this.clsDragover); 15382 } 15383 15384 }, 15385 15386 methods: { 15387 15388 upload: function upload(files) { 15389 var this$1 = this; 15390 15391 15392 if (!files.length) { 15393 return; 15394 } 15395 15396 trigger(this.$el, 'upload', [files]); 15397 15398 for (var i = 0; i < files.length; i++) { 15399 15400 if (this$1.maxSize && this$1.maxSize * 1000 < files[i].size) { 15401 this$1.fail(this$1.msgInvalidSize.replace('%s', this$1.allow)); 15402 return; 15403 } 15404 15405 if (this$1.allow && !match(this$1.allow, files[i].name)) { 15406 this$1.fail(this$1.msgInvalidName.replace('%s', this$1.allow)); 15407 return; 15408 } 15409 15410 if (this$1.mime && !match(this$1.mime, files[i].type)) { 15411 this$1.fail(this$1.msgInvalidMime.replace('%s', this$1.mime)); 15412 return; 15413 } 15414 15415 } 15416 15417 if (!this.multiple) { 15418 files = [files[0]]; 15419 } 15420 15421 this.beforeAll(this, files); 15422 15423 var chunks = chunk(files, this.concurrent); 15424 var upload = function (files) { 15425 15426 var data = new FormData(); 15427
15428 files.forEach(function (file) { return data.append(this$1.name, file); }); 15429 15430 for (var key in this$1.params) { 15431 data.append(key, this$1.params[key]); 15432 } 15433 15434 ajax(this$1.url, { 15435 data: data, 15436 method: this$1.method, 15437 responseType: this$1.type, 15438 beforeSend: function (env) { 15439 15440 var xhr = env.xhr; 15441 xhr.upload && on(xhr.upload, 'progress', this$1.progress); 15442 ['loadStart', 'load', 'loadEnd', 'abort'].forEach(function (type) { return on(xhr, type.toLowerCase(), this$1[type]); } 15443 ); 15444 15445 this$1.beforeSend(env); 15446 15447 } 15448 }).then( 15449 function (xhr) { 15450 15451 this$1.complete(xhr); 15452 15453 if (chunks.length) { 15454 upload(chunks.shift()); 15455 } else { 15456 this$1.completeAll(xhr); 15457 } 15458 15459 }, 15460 function (e) { return this$1.error(e.message); } 15461 ); 15462 15463 }; 15464 15465 upload(chunks.shift()); 15466 15467 } 15468 15469 } 15470 15471 }); 15472 15473 function match(pattern, path) { 15474 return path.match(new RegExp(("^" + (pattern.replace(/\//g, '\\/').replace(/\*\*/g, '(\\/[^\\/]+)*').replace(/\*/g, '[^\\/]+').replace(/((?!\\))\?/g, '$1.')) + "$"), 'i')); 15475 } 15476 15477 function chunk(files, size) { 15478 var chunks = []; 15479 for (var i = 0; i < files.length; i += size) { 15480 var chunk = []; 15481 for (var j = 0; j < size; j++) { 15482 chunk.push(files[i + j]); 15483 } 15484 chunks.push(chunk); 15485 } 15486 return chunks; 15487 } 15488 15489 function stop(e) { 15490 e.preventDefault(); 15491 e.stopPropagation(); 15492 } 15493 15494} 15495 15496UIkit$2.use(plugin); 15497UIkit$2.use(plugin$1); 15498UIkit$2.use(plugin$2); 15499UIkit$2.use(plugin$6); 15500UIkit$2.use(plugin$7); 15501UIkit$2.use(plugin$9); 15502UIkit$2.use(plugin$10); 15503UIkit$2.use(plugin$11); 15504UIkit$2.use(plugin$12); 15505UIkit$2.use(plugin$13); 15506 15507{ 15508 boot(UIkit$2); 15509} 15510 15511return UIkit$2; 15512 15513}))); 15514 15515 15516/*! UIkit 3.0.0-beta.42 | http://www.getuikit.com | (c) 2014 - 2017 YOOtheme | MIT License */ 15517 15518!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define("uikiticons",i):t.UIkitIcons=i()}(this,function(){"use strict";var t={album:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="5" y="2" width="10" height="1" /> <rect x="3" y="4" width="14" height="1" /> <rect fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11" /></svg>',ban:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9" /> <line fill="none" stroke="#000" stroke-width="1.1" x1="4" y1="3.5" x2="16" y2="16.5" /></svg>',behance:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M9.5,10.6c-0.4-0.5-0.9-0.9-1.6-1.1c1.7-1,2.2-3.2,0.7-4.7C7.8,4,6.3,4,5.2,4C3.5,4,1.7,4,0,4v12c1.7,0,3.4,0,5.2,0 c1,0,2.1,0,3.1-0.5C10.2,14.6,10.5,12.3,9.5,10.6L9.5,10.6z M5.6,6.1c1.8,0,1.8,2.7-0.1,2.7c-1,0-2,0-2.9,0V6.1H5.6z M2.6,13.8v-3.1 c1.1,0,2.1,0,3.2,0c2.1,0,2.1,3.2,0.1,3.2L2.6,13.8z" /> <path d="M19.9,10.9C19.7,9.2,18.7,7.6,17,7c-4.2-1.3-7.3,3.4-5.3,7.1c0.9,1.7,2.8,2.3,4.7,2.1c1.7-0.2,2.9-1.3,3.4-2.9h-2.2 c-0.4,1.3-2.4,1.5-3.5,0.6c-0.4-0.4-0.6-1.1-0.6-1.7H20C20,11.7,19.9,10.9,19.9,10.9z M13.5,10.6c0-1.6,2.3-2.7,3.5-1.4 c0.4,0.4,0.5,0.9,0.6,1.4H13.5L13.5,10.6z" /> <rect x="13" y="4" width="5" height="1.4" /></svg>',bell:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.1" d="M17,15.5 L3,15.5 C2.99,14.61 3.79,13.34 4.1,12.51 C4.58,11.3 4.72,10.35 5.19,7.01 C5.54,4.53 5.89,3.2 7.28,2.16 C8.13,1.56 9.37,1.5 9.81,1.5 L9.96,1.5 C9.96,1.5 11.62,1.41 12.67,2.17 C14.08,3.2 14.42,4.54 14.77,7.02 C15.26,10.35 15.4,11.31 15.87,12.52 C16.2,13.34 17.01,14.61 17,15.5 L17,15.5 Z" /> <path fill="none" stroke="#000" d="M12.39,16 C12.39,17.37 11.35,18.43 9.91,18.43 C8.48,18.43 7.42,17.37 7.42,16" /></svg>',bold:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M5,15.3 C5.66,15.3 5.9,15 5.9,14.53 L5.9,5.5 C5.9,4.92 5.56,4.7 5,4.7 L5,4 L8.95,4 C12.6,4 13.7,5.37 13.7,6.9 C13.7,7.87 13.14,9.17 10.86,9.59 L10.86,9.7 C13.25,9.86 14.29,11.28 14.3,12.54 C14.3,14.47 12.94,16 9,16 L5,16 L5,15.3 Z M9,9.3 C11.19,9.3 11.8,8.5 11.85,7 C11.85,5.65 11.3,4.8 9,4.8 L7.67,4.8 L7.67,9.3 L9,9.3 Z M9.185,15.22 C11.97,15 12.39,14 12.4,12.58 C12.4,11.
1551815 11.39,10 9,10 L7.67,10 L7.67,15 L9.18,15 Z" /></svg>',bolt:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M4.74,20 L7.73,12 L3,12 L15.43,1 L12.32,9 L17.02,9 L4.74,20 L4.74,20 L4.74,20 Z M9.18,11 L7.1,16.39 L14.47,10 L10.86,10 L12.99,4.67 L5.61,11 L9.18,11 L9.18,11 L9.18,11 Z" /></svg>',bookmark:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon fill="none" stroke="#000" points="5.5 1.5 15.5 1.5 15.5 17.5 10.5 12.5 5.5 17.5" /></svg>',calendar:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M 2,3 2,17 18,17 18,3 2,3 Z M 17,16 3,16 3,8 17,8 17,16 Z M 17,7 3,7 3,4 17,4 17,7 Z" /> <rect width="1" height="3" x="6" y="2" /> <rect width="1" height="3" x="13" y="2" /></svg>',camera:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10.8" r="3.8" /> <path fill="none" stroke="#000" d="M1,4.5 C0.7,4.5 0.5,4.7 0.5,5 L0.5,17 C0.5,17.3 0.7,17.5 1,17.5 L19,17.5 C19.3,17.5 19.5,17.3 19.5,17 L19.5,5 C19.5,4.7 19.3,4.5 19,4.5 L13.5,4.5 L13.5,2.9 C13.5,2.6 13.3,2.5 13,2.5 L7,2.5 C6.7,2.5 6.5,2.6 6.5,2.9 L6.5,4.5 L1,4.5 L1,4.5 Z" /></svg>',cart:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle cx="7.3" cy="17.3" r="1.4" /> <circle cx="13.3" cy="17.3" r="1.4" /> <polyline fill="none" stroke="#000" points="0 2 3.2 4 5.3 12.5 16 12.5 18 6.5 8 6.5" /></svg>',check:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" stroke-width="1.1" points="4,10 8,15 17,4" /></svg>',clock:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9" /> <rect x="9" y="4" width="1" height="7" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M13.018,14.197 L9.445,10.625" /></svg>',close:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4" /> <path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16" /></svg>',code:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" stroke-width="1.01" points="13,4 19,10 13,16" /> <polyline fill="none" stroke="#000" stroke-width="1.01" points="7,4 1,10 7,16" /></svg>',cog:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" cx="9.997" cy="10" r="3.31" /> <path fill="none" stroke="#000" d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z" /></svg>',comment:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M6,18.71 L6,14 L1,14 L1,1 L19,1 L19,14 L10.71,14 L6,18.71 L6,18.71 Z M2,13 L7,13 L7,16.29 L10.29,13 L18,13 L18,2 L2,2 L2,13 L2,13 Z" /></svg>',commenting:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon fill="none" stroke="#000" points="1.5,1.5 18.5,1.5 18.5,13.5 10.5,13.5 6.5,17.5 6.5,13.5 1.5,13.5" /> <circle cx="10" cy="8" r="1" /> <circle cx="6" cy="8" r="1" /> <circle cx="14" cy="8" r="1" /></svg>',comments:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" points="2 0.5 19.5 0.5 19.5 13" /> <path d="M5,19.71 L5,15 L0,15 L0,2 L18,2 L18,15 L9.71,15 L5,19.71 L5,19.71 L5,19.71 Z M1,14 L6,14 L6,17.29 L9.29,14 L17,14 L17,3 L1,3 L1,14 L1,14 L1,14 Z" /></svg>',copy:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16" /> <polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17" /></svg>',database:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <ellipse fill="none" stroke="#000" cx="10" cy="4.64" rx="7.5" ry="3.14" /> <path fill="none" stroke="#000" d="M17.5,8.11 C17.5,9.85 14.14,11.25 10,11.25 C5.86,11.25 2.5,9.84 2.5,8.11" /> <path fill="none" stroke="#000" d="M17.5,11.25 C17.5,12.99 14.14,14.39 10,14.39 C5.86,14.39 2.5,12.98 2.5,11.25" /> <path fill="none" stroke="#000" d="M17.49,4.64 L17.5,14.36 C17.5,16.1 14.14,17.5 10,17.5 C5.86,17.5 2.5,16.
1551809 2.5,14.36 L2.5,4.64" /></svg>',desktop:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="8" y="15" width="1" height="2" /> <rect x="11" y="15" width="1" height="2" /> <rect x="5" y="16" width="10" height="1" /> <rect fill="none" stroke="#000" x="1.5" y="3.5" width="17" height="11" /></svg>',download:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10" /> <rect x="3" y="17" width="13" height="1" /> <line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3" /></svg>',dribbble:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.4" d="M1.3,8.9c0,0,5,0.1,8.6-1c1.4-0.4,2.6-0.9,4-1.9 c1.4-1.1,2.5-2.5,2.5-2.5" /> <path fill="none" stroke="#000" stroke-width="1.4" d="M3.9,16.6c0,0,1.7-2.8,3.5-4.2 c1.8-1.3,4-2,5.7-2.2C16,10,19,10.6,19,10.6" /> <path fill="none" stroke="#000" stroke-width="1.4" d="M6.9,1.6c0,0,3.3,4.6,4.2,6.8 c0.4,0.9,1.3,3.1,1.9,5.2c0.6,2,0.9,4.4,0.9,4.4" /> <circle fill="none" stroke="#000" stroke-width="1.4" cx="10" cy="10" r="9" /></svg>',expand:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="13 2 18 2 18 7 17 7 17 3 13 3" /> <polygon points="2 13 3 13 3 17 7 17 7 18 2 18" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M11,9 L17,3" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M3,17 L9,11" /></svg>',facebook:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M11,10h2.6l0.4-3H11V5.3c0-0.9,0.2-1.5,1.5-1.5H14V1.1c-0.3,0-1-0.1-2.1-0.1C9.6,1,8,2.4,8,5v2H5.5v3H8v8h3V10z" /></svg>',file:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect fill="none" stroke="#000" x="3.5" y="1.5" width="13" height="17" /></svg>',flickr:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle cx="5.5" cy="9.5" r="3.5" /> <circle cx="14.5" cy="9.5" r="3.5" /></svg>',folder:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon fill="none" stroke="#000" points="9.5 5.5 8.5 3.5 1.5 3.5 1.5 16.5 18.5 16.5 18.5 5.5" /></svg>',forward:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M2.47,13.11 C4.02,10.02 6.27,7.85 9.04,6.61 C9.48,6.41 10.27,6.13 11,5.91 L11,2 L18.89,9 L11,16 L11,12.13 C9.25,12.47 7.58,13.19 6.02,14.25 C3.03,16.28 1.63,18.54 1.63,18.54 C1.63,18.54 1.38,15.28 2.47,13.11 L2.47,13.11 Z M5.3,13.53 C6.92,12.4 9.04,11.4 12,10.92 L12,13.63 L17.36,9 L12,4.25 L12,6.8 C11.71,6.86 10.86,7.02 9.67,7.49 C6.79,8.65 4.58,10.96 3.49,13.08 C3.18,13.7 2.68,14.87 2.49,16 C3.28,15.05 4.4,14.15 5.3,13.53 L5.3,13.53 Z" /></svg>',foursquare:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M15.23,2 C15.96,2 16.4,2.41 16.5,2.86 C16.57,3.15 16.56,3.44 16.51,3.73 C16.46,4.04 14.86,11.72 14.75,12.03 C14.56,12.56 14.16,12.82 13.61,12.83 C13.03,12.84 11.09,12.51 10.69,13 C10.38,13.38 7.79,16.39 6.81,17.53 C6.61,17.76 6.4,17.96 6.08,17.99 C5.68,18.04 5.29,17.87 5.17,17.45 C5.12,17.28 5.1,17.09 5.1,16.91 C5.1,12.4 4.86,7.81 5.11,3.31 C5.17,2.5 5.81,2.12 6.53,2 L15.23,2 L15.23,2 Z M9.76,11.42 C9.94,11.19 10.17,11.1 10.45,11.1 L12.86,11.1 C13.12,11.1 13.31,10.94 13.36,10.69 C13.37,10.64 13.62,9.41 13.74,8.83 C13.81,8.52 13.53,8.28 13.27,8.28 C12.35,8.29 11.42,8.28 10.5,8.28 C9.84,8.28 9.83,7.69 9.82,7.21 C9.8,6.85 10.13,6.55 10.5,6.55 C11.59,6.56 12.67,6.55 13.76,6.55 C14.03,6.55 14.23,6.4 14.28,6.14 C14.34,5.87 14.67,4.29 14.67,4.29 C14.67,4.29 14.82,3.74 14.19,3.74 L7.34,3.74 C7,3.75 6.84,4.02 6.84,4.33 C6.84,7.58 6.85,14.95 6.85,14.99 C6.87,15 8.89,12.51 9.76,11.42 L9.76,11.42 Z" /></svg>',future:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline points="19 2 18 2 18 6 14 6 14 7 19 7 19 2" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M18,6.548 C16.709,3.29 13.354,1 9.6,1 C4.6,1 0.6,5 0.6,10 C0.6,15 4.6,19 9.6,19 C14.6,19 18.6,15 18.6,10" /> <rect x="9" y="4" width="1" height="7" /> <path d="M13.018,14.197 L9.445,10.625" fill="none" stroke="#000" stroke-width="1.1" /></svg>',github:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M10,1 C5.03,1 1,5.03 1,10 C1,13.98 3.58,17.35 7.16,18.54 C7.61,18.62 7.77,18.34 7.77,18.11 C7.77,17.9 7.76,17.33 7.76,16.58 C5.26,17.12 4.73,15.37 4.73,15.37 C4.32,14.33 3.73,14.05 3.73,14.05 C2.91,13.5 3.79,13.5 3.79,13.5 C4.69,13.56 5.17,14.43 5.17,14.43 C5.97,15.8 7.28,15.41 7.79,15.18 C7.87,14.6 8.1,14.2 8.36,13.98 C6.36,13.75 4.26,12.98 4.26,9.53 C4.26,8.55 4.61,7.74 5.19,7.11 C5.1,6.88 4.79,5.97 5.28,4.73 C5.28,4.73 6.04,4.49 7.75,5.65 C8.47,5.45 9.24,5.35 10,5.35 C10.76,5.35 11.53,5.45 12.25,5.65 C13.97,4.48 14.72,4.73 14.72,4.73 C15.21,5.97 14.9,6.88 14.81,7.11 C15.39,7.74 15.73,8.54 15.73,9.53 C15.73,12.99 13.63,13.75 11.62,13.97 C11.94,14.25 12.23,14.8 12.23,15.64 C12.23,16.84 12.22,17.81 12.22,18.11 C12.22,18.35 12.38,18.63 12.84,18.54 C16.42,17.35 19,13.98 19,10 C19,5.03 14.97,1 10,1 L10,1 Z" /></svg>',gitter:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="3.5" y="1" width="1.531" height="11.471" /> <rect x="7.324" y="4.059" width="1.529" height="15.294" /> <rect x="11.148" y="4.059" width="1.527" height="15.294" /> <rect x="14.971" y="4.059" width="1.529" height="8.412" /></svg>',google:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M17.86,9.09 C18.46,12.12 17.14,16.05 13.81,17.56 C9.45,19.53 4.13,17.68 2.47,12.87 C0.68,7.68 4.22,2.42 9.5,2.03 C11.57,1.88 13.42,2.37 15.05,3.65 C15.22,3.78 15.37,3.93 15.61,4.14 C14.9,4.81 14.23,5.45 13.5,6.14 C12.27,5.08 10.84,4.72 9.28,4.98 C8.12,5.17 7.16,5.76 6.37,6.63 C4.88,8.27 4.62,10.86 5.76,12.82 C6.95,14.87 9.17,15.8 11.57,15.25 C13.27,14.87 14.76,13.33 14.89,11.75 L10.51,11.75 L10.51,9.09 L17.86,9.09 L17.86,9.09 Z" /></svg>',grid:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="2" y="2" width="3" height="3" /> <rect x="8" y="2" width="3" height="3" /> <rect x="14" y="2" width="3" height="3" /> <rect x="2" y="8" width="3" height="3" /> <rect x="8" y="8" width="3" height="3" /> <rect x="14" y="8" width="3" height="3" /> <rect x="2" y="14" width="3" height="3" /> <rect x="8" y="14" width="3" height="3" /> <rect x="14" y="14" width="3" height="3" /></svg>',happy:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle cx="13" cy="7" r="1" /> <circle cx="7" cy="7" r="1" /> <circle fill="none" stroke="#000" cx="10" cy="10" r="8.5" /> <path fill="none" stroke="#000" d="M14.6,11.4 C13.9,13.3 12.1,14.5 10,14.5 C7.9,14.5 6.1,13.3 5.4,11.4" /></svg>',hashtag:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M15.431,8 L15.661,7 L12.911,7 L13.831,3 L12.901,3 L11.98,7 L9.29,7 L10.21,3 L9.281,3 L8.361,7 L5.23,7 L5,8 L8.13,8 L7.21,12 L4.23,12 L4,13 L6.98,13 L6.061,17 L6.991,17 L7.911,13 L10.601,13 L9.681,17 L10.611,17 L11.531,13 L14.431,13 L14.661,12 L11.76,12 L12.681,8 L15.431,8 Z M10.831,12 L8.141,12 L9.061,8 L11.75,8 L10.831,12 Z" /></svg>',heart:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.03" d="M10,4 C10,4 8.1,2 5.74,2 C3.38,2 1,3.5
155185 1,6.73 C1,8.84 2.67,10.44 2.67,10.44 L10,18 L17.33,10.44 C17.33,10.44 19,8.84 19,6.73 C19,3.55 16.62,2 14.26,2 C11.9,2 10,4 10,4 L10,4 Z" /></svg>',history:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="#000" points="1 2 2 2 2 6 6 6 6 7 1 7 1 2" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M2.1,6.548 C3.391,3.29 6.746,1 10.5,1 C15.5,1 19.5,5 19.5,10 C19.5,15 15.5,19 10.5,19 C5.5,19 1.5,15 1.5,10" /> <rect x="9" y="4" width="1" height="7" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M13.018,14.197 L9.445,10.625" id="Shape" /></svg>',home:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="18.65 11.35 10 2.71 1.35 11.35 0.65 10.65 10 1.29 19.35 10.65" /> <polygon points="15 4 18 4 18 7 17 7 17 5 15 5" /> <polygon points="3 11 4 11 4 18 7 18 7 12 12 12 12 18 16 18 16 11 17 11 17 19 11 19 11 13 8 13 8 19 3 19" /></svg>',image:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle cx="16.1" cy="6.1" r="1.1" /> <rect fill="none" stroke="#000" x="0.5" y="2.5" width="19" height="15" /> <polyline fill="none" stroke="#000" stroke-width="1.01" points="4,13 8,9 13,14" /> <polyline fill="none" stroke="#000" stroke-width="1.01" points="11,12 12.5,10.5 16,14" /></svg>',info:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z" /> <circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9" /></svg>',instagram:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M13.55,1H6.46C3.45,1,1,3.44,1,6.44v7.12c0,3,2.45,5.44,5.46,5.44h7.08c3.02,0,5.46-2.44,5.46-5.44V6.44 C19.01,3.44,16.56,1,13.55,1z M17.5,14c0,1.93-1.57,3.5-3.5,3.5H6c-1.93,0-3.5-1.57-3.5-3.5V6c0-1.93,1.57-3.5,3.5-3.5h8 c1.93,0,3.5,1.57,3.5,3.5V14z" /> <circle cx="14.87" cy="5.26" r="1.09" /> <path d="M10.03,5.45c-2.55,0-4.63,2.06-4.63,4.6c0,2.55,2.07,4.61,4.63,4.61c2.56,0,4.63-2.061,4.63-4.61 C14.65,7.51,12.58,5.45,10.03,5.45L10.03,5.45L10.03,5.45z M10.08,13c-1.66,0-3-1.34-3-2.99c0-1.65,1.34-2.99,3-2.99s3,1.34,3,2.99 C13.08,11.66,11.74,13,10.08,13L10.08,13L10.08,13z" /></svg>',italic:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M12.63,5.48 L10.15,14.52 C10,15.08 10.37,15.25 11.92,15.3 L11.72,16 L6,16 L6.2,15.31 C7.78,15.26 8.19,15.09 8.34,14.53 L10.82,5.49 C10.97,4.92 10.63,4.76 9.09,4.71 L9.28,4 L15,4 L14.81,4.69 C13.23,4.75 12.78,4.91 12.63,5.48 L12.63,5.48 Z" /></svg>',joomla:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M7.8,13.4l1.7-1.7L5.9,8c-0.6-0.5-0.6-1.5,0-2c0.6-0.6,1.4-0.6,2,0l1.7-1.7c-1-1-2.3-1.3-3.6-1C5.8,2.2,4.8,1.4,3.7,1.4 c-1.3,0-2.3,1-2.3,2.3c0,1.1,0.8,2,1.8,2.3c-0.4,1.3-0.1,2.8,1,3.8L7.8,13.4L7.8,13.4z" /> <path d="M10.2,4.3c1-1,2.5-1.4,3.8-1c0.2-1.1,1.1-2,2.3-2c1.3,0,2.3,1,2.3,2.3c0,1.2-0.9,2.2-2,2.3c0.4,1.3,0,2.8-1,3.8L13.9,8 c0.6-0.5,0.6-1.5,0-2c-0.5-0.6-1.5-0.6-2,0L8.2,9.7L6.5,8" /> <path d="M14.1,16.8c-1.3,0.4-2.8,0.1-3.8-1l1.7-1.7c0.6,0.6,1.5,0.6,2,0c0.5-0.6,0.6-1.5,0-2l-3.7-3.7L12,6.7l3.7,3.7 c1,1,1.3,2.4,1,3.6c1.1,0.2,2,1.1,2,2.3c0,1.3-1,2.3-2.3,2.3C15.2,18.6,14.3,17.8,14.1,16.8" /> <path d="M13.2,12.2l-3.7,3.7c-1,1-2.4,1.3-3.6,1c-0.2,1-1.2,1.8-2.2,1.8c-1.3,0-2.3-1-2.3-2.3c0-1.1,0.8-2,1.8-2.3 c-0.3-1.3,0-2.7,1-3.7l1.7,1.7c-0.6,0.6-0.6,1.5,0,2c0.6,0.6,1.4,0.6,2,0l3.7-3.7" /></svg>',laptop:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect y="16" width="20" height="1" /> <rect fill="none" stroke="#000" x="2.5" y="4.5" width="15" height="10" /></svg>',lifesaver:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
15518 <path d="M10,0.5 C4.76,0.5 0.5,4.76 0.5,10 C0.5,15.24 4.76,19.5 10,19.5 C15.24,19.5 19.5,15.24 19.5,10 C19.5,4.76 15.24,0.5 10,0.5 L10,0.5 Z M10,1.5 C11.49,1.5 12.89,1.88 14.11,2.56 L11.85,4.82 C11.27,4.61 10.65,4.5 10,4.5 C9.21,4.5 8.47,4.67 7.79,4.96 L5.58,2.75 C6.87,1.95 8.38,1.5 10,1.5 L10,1.5 Z M4.96,7.8 C4.67,8.48 4.5,9.21 4.5,10 C4.5,10.65 4.61,11.27 4.83,11.85 L2.56,14.11 C1.88,12.89 1.5,11.49 1.5,10 C1.5,8.38 1.95,6.87 2.75,5.58 L4.96,7.79 L4.96,7.8 L4.96,7.8 Z M10,18.5 C8.25,18.5 6.62,17.97 5.27,17.06 L7.46,14.87 C8.22,15.27 9.08,15.5 10,15.5 C10.79,15.5 11.53,15.33 12.21,15.04 L14.42,17.25 C13.13,18.05 11.62,18.5 10,18.5 L10,18.5 Z M10,14.5 C7.52,14.5 5.5,12.48 5.5,10 C5.5,7.52 7.52,5.5 10,5.5 C12.48,5.5 14.5,7.52 14.5,10 C14.5,12.48 12.48,14.5 10,14.5 L10,14.5 Z M15.04,12.21 C15.33,11.53 15.5,10.79 15.5,10 C15.5,9.08 15.27,8.22 14.87,7.46 L17.06,5.27 C17.97,6.62 18.5,8.25 18.5,10 C18.5,11.62 18.05,13.13 17.25,14.42 L15.04,12.21 L15.04,12.21 Z" /></svg>',link:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.1" d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M7.925,11.875 L11.925,7.975" /></svg>',linkedin:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M5.77,17.89 L5.77,7.17 L2.21,7.17 L2.21,17.89 L5.77,17.89 L5.77,17.89 Z M3.99,5.71 C5.23,5.71 6.01,4.89 6.01,3.86 C5.99,2.8 5.24,2 4.02,2 C2.8,2 2,2.8 2,3.85 C2,4.88 2.77,5.7 3.97,5.7 L3.99,5.7 L3.99,5.71 L3.99,5.71 Z" /> <path d="M7.75,17.89 L11.31,17.89 L11.31,11.9 C11.31,11.58 11.33,11.26 11.43,11.03 C11.69,10.39 12.27,9.73 13.26,9.73 C14.55,9.73 15.06,10.71 15.06,12.15 L15.06,17.89 L18.62,17.89 L18.62,11.74 C18.62,8.45 16.86,6.92 14.52,6.92 C12.6,6.92 11.75,7.99 11.28,8.73 L11.3,8.73 L11.3,7.17 L7.75,7.17 C7.79,8.17 7.75,17.89 7.75,17.89 L7.75,17.89 L7.75,17.89 Z" /></svg>',list:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="6" y="4" width="12" height="1" /> <rect x="6" y="9" width="12" height="1" /> <rect x="6" y="14" width="12" height="1" /> <rect x="2" y="4" width="2" height="1" /> <rect x="2" y="9" width="2" height="1" /> <rect x="2" y="14" width="2" height="1" /></svg>',location:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.01" d="M10,0.5 C6.41,0.5 3.5,3.39 3.5,6.98 C3.5,11.83 10,19 10,19 C10,19 16.5,11.83 16.5,6.98 C16.5,3.39 13.59,0.5 10,0.5 L10,0.5 Z" /> <circle fill="none" stroke="#000" cx="10" cy="6.8" r="2.3" /></svg>',lock:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect fill="none" stroke="#000" height="10" width="13" y="8.5" x="3.5" /> <path fill="none" stroke="#000" d="M6.5,8 L6.5,4.88 C6.5,3.01 8.07,1.5 10,1.5 C11.93,1.5 13.5,3.01 13.5,4.88 L13.5,8" /></svg>',mail:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" points="1.4,6.5 10,11 18.6,6.5" /> <path d="M 1,4 1,16 19,16 19,4 1,4 Z M 18,15 2,15 2,5 18,5 18,15 Z" /></svg>',menu:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="2" y="4" width="16" height="1" /> <rect x="2" y="9" width="16" height="1" /> <rect x="2" y="14" width="16" height="1" /></svg>',minus:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect height="1" width="18" y="9" x="1" /></svg>',more:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle cx="3" cy="10" r="2" /> <circle cx="10" cy="10" r="2" /> <circle cx="17" cy="10" r="2" /></svg>',move:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="4,5 1,5 1,9 2,9 2,6 4,6 " /> <polygon points="1,16 2,16 2,18 4,18 4,19 1,19 " /> <polygon points="14,16 14,19 11,19 11,18 13,18 13,16 " /> <rect fill="none" stroke="#000" x="5.5" y="1.5" width="13" height="13" /> <rect x="1" y="11" width="1" height="3" /> <rect x="6" y="18" width="3" height="1" /></svg>',nut:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon fill="none" stroke="#000" points="2.5,5.7 10,1.3 17.5,5.7 17.5,14.3 10,18.7 2.5,14.3" /> <circle fill="none" stroke="#000" cx="10" cy="10" r="3.5" /></svg>',pagekit:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="3,1 17,1 17,16 10,16 10,13 14,13 14,4 6,4 6,16 10,16 10,19 3,19 " /></svg>',pencil:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" d="M17.25,6.01 L7.12,16.1 L3.82,17.2 L5.02,13.9 L15.12,3.88 C15.71,3.29 16.66,3.29 17.25,3.88 C17.83,4.47 17.83,5.42 17.25,6.01 L17.25,6.01 Z" /> <path fill="none" stroke="#000" d="M15.98,7.268 L13.851,5.148" /></svg>',phone:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" d="M15.5,17 C15.5,17.8 14.8,18.5 14,18.5 L7,18.5 C6.2,18.5 5.5,17.8 5.5,17 L5.5,3 C5.5,2.2 6.2,1.5 7,1.5 L14,1.5 C14.8,1.5 15.5,2.2 15.5,3 L15.5,17 L15.5,17 L15.5,17 Z" /> <circle cx="10.5" cy="16.5" r="0.8" /></svg>',pinterest:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M10.21,1 C5.5,1 3,4.16 3,7.61 C3,9.21 3.85,11.2 5.22,11.84 C5.43,11.94 5.54,11.89 5.58,11.69 C5.62,11.54 5.8,10.8 5.88,10.45 C5.91,10.34 5.89,10.24 5.8,10.14 C5.36,9.59 5,8.58 5,7.65 C5,5.24 6.82,2.91 9.93,2.91 C12.61,2.91 14.49,4.74 14.49,7.35 C14.49,10.3 13,12.35 11.06,12.35 C9.99,12.35 9.19,11.47 9.44,10.38 C9.75,9.08 10.35,7.68 10.35,6.75 C10.35,5.91 9.9,5.21 8.97,5.21 C7.87,5.21 6.99,6.34 6.99,7.86 C6.99,8.83 7.32,9.48 7.32,9.48 C7.32,9.48 6.24,14.06 6.04,14.91 C5.7,16.35 6.08,18.7 6.12,18.9 C6.14,19.01 6.26,19.05 6.33,18.95 C6.44,18.81 7.74,16.85 8.11,15.44 C8.24,14.93 8.79,12.84 8.79,12.84 C9.15,13.52 10.19,14.09 11.29,14.09 C14.58,14.09 16.96,11.
1551806 16.96,7.3 C16.94,3.7 14,1 10.21,1" /></svg>',play:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon fill="none" stroke="#000" points="6.5,5 14.5,10 6.5,15" /></svg>',plus:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="9" y="1" width="1" height="17" /> <rect x="1" y="9" width="17" height="1" /></svg>',pull:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="6.85,8 9.5,10.6 12.15,8 12.85,8.7 9.5,12 6.15,8.7" /> <line fill="none" stroke="#000" x1="9.5" y1="11" x2="9.5" y2="2" /> <polyline fill="none" stroke="#000" points="6,5.5 3.5,5.5 3.5,18.5 15.5,18.5 15.5,5.5 13,5.5" /></svg>',push:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="12.15,4 9.5,1.4 6.85,4 6.15,3.3 9.5,0 12.85,3.3" /> <line fill="none" stroke="#000" x1="9.5" y1="10" x2="9.5" y2="1" /> <polyline fill="none" stroke="#000" points="6 5.5 3.5 5.5 3.5 18.5 15.5 18.5 15.5 5.5 13 5.5" /></svg>',question:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9" /> <circle cx="10.44" cy="14.42" r="1.05" /> <path fill="none" stroke="#000" stroke-width="1.2" d="M8.17,7.79 C8.17,4.75 12.72,4.73 12.72,7.72 C12.72,8.67 11.81,9.15 11.23,9.75 C10.75,10.24 10.51,10.73 10.45,11.4 C10.44,11.53 10.43,11.64 10.43,11.75" /></svg>',receiver:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.01" d="M6.189,13.611C8.134,15.525 11.097,18.239 13.867,18.257C16.47,18.275 18.2,16.241 18.2,16.241L14.509,12.551L11.539,13.639L6.189,8.29L7.313,5.355L3.76,1.8C3.76,1.8 1.732,3.537 1.7,6.092C1.667,8.809 4.347,11.738 6.189,13.611" /></svg>',refresh:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.1" d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5" /> <polyline fill="none" stroke="#000" points="9.9 2 12.79 4.89 9.79 7.9" /></svg>',reply:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M17.7,13.11 C16.12,10.02 13.84,7.85 11.02,6.61 C10.57,6.41 9.75,6.13 9,5.91 L9,2 L1,9 L9,16 L9,12.13 C10.78,12.47 12.5,13.19 14.09,14.25 C17.13,16.28 18.56,18.54 18.56,18.54 C18.56,18.54 18.81,15.28 17.7,13.11 L17.7,13.11 Z M14.82,13.53 C13.17,12.4 11.01,11.4 8,10.92 L8,13.63 L2.55,9 L8,4.25 L8,6.8 C8.3,6.86 9.16,7.02 10.37,7.49 C13.3,8.65 15.54,10.96 16.65,13.08 C16.97,13.7 17.48,14.86 17.68,16 C16.87,15.05 15.73,14.15 14.82,13.53 L14.82,13.53 Z" /></svg>',rss:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle cx="3.12" cy="16.8" r="1.85" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M1.5,8.2 C1.78,8.18 2.06,8.16 2.35,8.16 C7.57,8.16 11.81,12.37 11.81,17.57 C11.81,17.89 11.79,18.19 11.76,18.5" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M1.5,2.52 C1.78,2.51 2.06,2.5 2.35,2.5 C10.72,2.5 17.5,9.24 17.5,17.57 C17.5,17.89 17.49,18.19 17.47,18.5" /></svg>',search:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z" /></svg>',server:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="3" y="3" width="1" height="2" /> <rect x="5" y="3" width="1" height="2" /> <rect x="7" y="3" width="1" height="2" /> <rect x="16" y="3" width="1" height="1" /> <rect x="16" y="10" width="1" height="1" /> <circle fill="none" stroke="#000" cx="9.9" cy="17.4" r="1.4" /> <rect x="3" y="10" width="1" height="2" /> <rect x="5" y="10" width="1" height="2" /> <rect x="9.5" y="14" width="1" height="2" /> <rect x="3" y="17" width="6" height="1" /> <rect x="11" y="17" width="6" height="1" /> <rect fill="none" stroke="#000" x="1.5" y="1.5" width="17" height="5" /> <rect fill="none" stroke="#000" x="1.5" y="8.5" width="17" height="5" /></svg>',settings:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <ellipse fill="none" stroke="#000" cx="6.11" cy="3.55" rx="2.11" ry="2.15" /> <ellipse fill="none" stroke="#000" cx="6.11" cy="15.55" rx="2.11" ry="2.15" />
15518 <circle fill="none" stroke="#000" cx="13.15" cy="9.55" r="2.15" /> <rect x="1" y="3" width="3" height="1" /> <rect x="10" y="3" width="8" height="1" /> <rect x="1" y="9" width="8" height="1" /> <rect x="15" y="9" width="3" height="1" /> <rect x="1" y="15" width="3" height="1" /> <rect x="10" y="15" width="8" height="1" /></svg>',shrink:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="11 4 12 4 12 8 16 8 16 9 11 9" /> <polygon points="4 11 9 11 9 16 8 16 8 12 4 12" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M12,8 L18,2" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M2,18 L8,12" /></svg>',social:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <line fill="none" stroke="#000" stroke-width="1.1" x1="13.4" y1="14" x2="6.3" y2="10.7" /> <line fill="none" stroke="#000" stroke-width="1.1" x1="13.5" y1="5.5" x2="6.5" y2="8.8" /> <circle fill="none" stroke="#000" stroke-width="1.1" cx="15.5" cy="4.6" r="2.3" /> <circle fill="none" stroke="#000" stroke-width="1.1" cx="15.5" cy="14.8" r="2.3" /> <circle fill="none" stroke="#000" stroke-width="1.1" cx="4.5" cy="9.8" r="2.3" /></svg>',soundcloud:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M17.2,9.4c-0.4,0-0.8,0.1-1.101,0.2c-0.199-2.5-2.399-4.5-5-4.5c-0.6,0-1.2,0.1-1.7,0.3C9.2,5.5,9.1,5.6,9.1,5.6V15h8
15518c1.601,0,2.801-1.2,2.801-2.8C20,10.7,18.7,9.4,17.2,9.4L17.2,9.4z" /> <rect x="6" y="6.5" width="1.5" height="8.5" /> <rect x="3" y="8" width="1.5" height="7" /> <rect y="10" width="1.5" height="5" /></svg>',star:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon fill="none" stroke="#000" stroke-width="1.01" points="10 2 12.63 7.27 18.5 8.12 14.25 12.22 15.25 18 10 15.27 4.75 18 5.75 12.22 1.5 8.12 7.37 7.27" /></svg>',strikethrough:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M6,13.02 L6.65,13.02 C7.64,15.16 8.86,16.12 10.41,16.12 C12.22,16.12 12.92,14.93 12.92,13.89 C12.92,12.55 11.99,12.03 9.74,11.23 C8.05,10.64 6.23,10.11 6.23,7.83 C6.23,5.5 8.09,4.09 10.4,4.09 C11.44,4.09 12.13,4.31 12.72,4.54 L13.33,4 L13.81,4 L13.81,7.59 L13.16,7.59 C12.55,5.88 11.52,4.89 10.07,4.89 C8.84,4.89 7.89,5.69 7.89,7.03 C7.89,8.29 8.89,8.78 10.88,9.45 C12.57,10.03 14.38,10.6 14.38,12.91 C14.38,14.75 13.27,16.93 10.18,16.93 C9.18,16.93 8.17,16.69 7.46,16.39 L6.52,17 L6,17 L6,13.02 L6,13.02 Z" /> <rect x="3" y="10" width="15" height="1" /></svg>',table:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="1" y="3" width="18" height="1" /> <rect x="1" y="7" width="18" height="1" /> <rect x="1" y="11" width="18" height="1" /> <rect x="1" y="15" width="18" height="1" /></svg>',tablet:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" d="M5,18.5 C4.2,18.5 3.5,17.8 3.5,17 L3.5,3 C3.5,2.2 4.2,1.5 5,1.5 L16,1.5 C16.8,1.5 17.5,2.2 17.5,3 L17.5,17 C17.5,17.8 16.8,18.5 16,18.5 L5,18.5 L5,18.5 L5,18.5 Z" /> <circle cx="10.5" cy="16.3" r="0.8" /></svg>',tag:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.1" d="M17.5,3.71 L17.5,7.72 C17.5,7.96 17.4,8.2 17.21,8.39 L8.39,17.2 C7.99,17.6 7.33,17.6 6.93,17.2 L2.8,13.07 C2.4,12.67 2.4,12.01 2.8,11.61 L11.61,2.8 C11.81,2.6 12.08,2.5 12.34,2.5 L16.19,2.5 C16.52,2.5 16.86,2.63 17.11,2.88 C17.35,3.11 17.48,3.4 17.5,3.71 L17.5,3.71 Z" /> <circle cx="14" cy="6" r="1" /></svg>',thumbnails:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect fill="none" stroke="#000" x="3.5" y="3.5" width="5" height="5" /> <rect fill="none" stroke="#000" x="11.5" y="3.5" width="5" height="5" /> <rect fill="none" stroke="#000" x="11.5" y="11.5" width="5" height="5" /> <rect fill="none" stroke="#000" x="3.5" y="11.5" width="5" height="5" /></svg>',trash:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" points="6.5 3 6.5 1.5 13.5 1.5 13.5 3" /> <polyline fill="none" stroke="#000" points="4.5 4 4.5 18.5 15.5 18.5 15.5 4" /> <rect x="8" y="7" width="1" height="9" /> <rect x="11" y="7" width="1" height="9" /> <rect x="2" y="3" width="16" height="1" /></svg>',tripadvisor:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M19.021,7.866C19.256,6.862,20,5.854,20,5.854h-3.346C14.781,4.641,12.504,4,9.98,4C7.363,4,4.999,4.651,3.135,5.876H0\tc0,0,0.738,0.987,0.976,1.988c-0.611,0.837-0.973,1.852-0.973,2.964c0,2.763,2.249,5.009,5.011,5.009\tc1.576,0,2.976-0.737,3.901-1.879l1.063,1.599l1.075-1.615c0.475,0.611,1.1,1.111,1.838,1.451c1.213,0.547,2.574,0.612,3.825,0.15\tc2.589-0.963,3.913-3.852,2.964-6.439c-0.175-0.463-0.4-0.876-0.675-1.238H19.021z M16.38,14.594\tc-1.002,0.371-2.088,0.328-3.06-0.119c-0.688-0.317-1.252-0.817-1.657-1.438c-0.164-0.25-0.313-0.52-0.417-0.811\tc-0.124-0.328-0.186-0.668-0.217-1.014c-0.063-0.689,0.037-1.396,0.339-2.043c0.448-0.971,1.251-1.71,2.25-2.079\tc2.075-0.765,4.375,0.3,5.14,2.366c0.762,2.066-0.301,4.37-2.363,5.134L16.38,14.594L16.38,14.594z M8.322,13.066\tc-0.72,1.059-1.935,1.76-3.309,1.76c-2.207,0-4.001-1.797-4.001-3.996c0-2.203,1.795-4.002,4.001-4.002\tc2.204,0,3.999,1.8,3.999,4.002c0,0.137-0.024,0.261-0.04,0.396c-0.067,0.678-0.284,1.313-0.648,1.853v-0.013H8.322z M2.472,10.775\tc0,1.367,1.112,2.479,2.476,2.479c1.363,0,2.472-1.11,2.472-2.479c0-1.359-1.11-2.468-2.472-2.468\tC3.584,8.306,2.473,9.416,2.472,10.775L2.472,10.775z M12.514,10.775c0,1.367,1.104,2.479,2.471,2.479\tc1.363,0,2.474-1.108,2.474-2.479c0-1.359-1.11-2.468-2.474-2.468c-1.364,0-2.477,1.109-2.477,2.468H12.514z M3.324,10.775\tc0-0.893,0.726-1.618,1.614-1.618c0.889,0,1.625,0.727,1.625,1.618c0,0.898-0.725,1.627-1.625,1.627\tc-0.901,0-1.625-0.729-1.625-1.627H3.324z M13.354,10.775c0-0.893,0.726-1.618,1.627-1.618c0.886,0,1.61,0.727,1.61,1.618\tc0,0.898-0.726,1.627-1.626,1.627s-1.625-0.729-1.625-1.627H13.354z M9.977,4.875c1.798,0,3.425,0.324,4.849,0.968\tc-0.535,0.015-1.061,0.108-1.586,0.3c-1.264,0.463-2.264,1.388-2.815,2.604c-0.262,0.551-0.398,1.133-0.448,1.72\tC9.79,7.905,7.677,5.873,5.076,5.82C6.501,5.208,8.153,4.875,9.94,4.875H9.977z" /></svg>',tumblr:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M6.885,8.598c0,0,0,3.393,0,4.996c0,0.282,0,0.66,0.094,0.942c0.377,1.509,1.131,2.545,2.545,3.11 c1.319,0.472,2.356,0.472,3.676,0c0.565-0.188,1.132-0.659,1.132-0.659l-0.849-2.263c0,0-1.036,0.378-1.603,0.283 c-0.56
155185-0.094-1.226-0.66-1.226-1.508c0-1.603,0-4.902,0-4.902h2.828V5.771h-2.828V2H8.205c0,0-0.094,0.66-0.188,0.942 C7.828,3.791,7.262,4.733,6.603,5.394C5.848,6.147,5,6.43,5,6.43v2.168H6.885z" /></svg>',tv:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect x="7" y="16" width="6" height="1" /> <rect fill="none" stroke="#000" x="0.5" y="3.5" width="19" height="11" /></svg>',twitter:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M19,4.74 C18.339,5.029 17.626,5.229 16.881,5.32 C17.644,4.86 18.227,4.139 18.503,3.28 C17.79,3.7 17.001,4.009 16.159,4.17 C15.485,3.45 14.526,3 13.464,3 C11.423,3 9.771,4.66 9.771,6.7 C9.771,6.99 9.804,7.269 9.868,7.539 C6.795,7.38 4.076,5.919 2.254,3.679 C1.936,4.219 1.754,4.86 1.754,5.539 C1.754,6.82 2.405,7.95 3.397,8.61 C2.79,8.589 2.22,8.429 1.723,8.149 L1.723,8.189 C1.723,9.978 2.997,11.478 4.686,11.82 C4.376,11.899 4.049,11.939 3.713,11.939 C3.475,11.939 3.245,11.919 3.018,11.88 C3.49,13.349 4.852,14.419 6.469,14.449 C5.205,15.429 3.612,16.019 1.882,16.019 C1.583,16.019 1.29,16.009 1,15.969 C2.635,17.019 4.576,17.629 6.662,17.629 C13.454,17.629 17.17,12 17.17,7.129 C17.17,6.969 17.166,6.809 17.157,6.649 C17.879,6.129 18.504,5.478 19,4.74" /></svg>',uikit:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="14.4,3.1 11.3,5.1 15,7.3 15,12.9 10,15.7 5,12.9 5,8.5 2,6.8 2,14.8 9.9,19.5 18,14.8 18,5.3" /> <polygon points="9.8,4.2 6.7,2.4 9.8,0.4 12.9,2.3" /></svg>',unlock:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect fill="none" stroke="#000" x="3.5" y="8.5" width="13" height="10" /> <path fill="none" stroke="#000" d="M6.5,8.5 L6.5,4.9 C6.5,3 8.1,1.5 10,1.5 C11.9,1.5 13.5,3 13.5,4.9" /></svg>',upload:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 " /> <rect x="3" y="17" width="13" height="1" /> <line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4" /></svg>',user:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="9.9" cy="6.4" r="4.4" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M1.5,19 C2.3,14.5 5.8,11.2 10,11.2 C14.2,11.2 17.7,14.6 18.5,19.2" /></svg>',users:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7" cy="8.6" r="3.5" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1" /></svg>',vimeo:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M2.065,7.59C1.84,7.367,1.654,7.082,1.468,6.838c-0.332-0.42-0.137-0.411,0.274-0.772c1.026-0.91,2.004-1.896,3.127-2.688 c1.017-0.713,2.365-1.173,3.286-0.039c0.849,1.045,0.869,2.629,1.084,3.891c0.215,1.309,0.421,2.648,0.88,3.901 c0.127,0.352,0.37,1.018,0.81,1.074c0.567,0.078,1.145-0.917,1.408-1.289c0.684-0.987,1.611-2.317,1.494-3.587 c-0.115-1.349-1.572-1.095-2.482-0.773c0.146-1.514,1.555-3.216,2.912-3.792c1.439-0.597,3.579-0.587,4.302,1.036 c0.772,1.759,0.078,3.802-0.763,5.396c-0.918,1.731-2.1,3.333-3.363,4.829c-1.114,1.329-2.432,2.787-4.093,3.422 c-1.897,0.723-3.021-0.686-3.667-2.318c-0.705-1.777-1.056-3.771-1.565-5.621C4.898,8.726,4.644,7.836,4.136,7.191 C3.473,6.358,2.72,7.141,2.065,7.59C1.977,7.502,2.115,7.551,2.065,7.59L2.065,7.59z" /></svg>',warning:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle cx="10" cy="14" r="1" /> <circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9" /> <path d="M10.97,7.72 C10.85,9.54 10.56,11.29 10.56,11.29 C10.51,11.87 10.27,12 9.99,12 C9.69,12 9.49,11.87 9.43,11.29 C9.43,11.29 9.16,9.54 9.03,7.72 C8.96,6.54 9.03,6 9.03,6 C9.03,5.45 9.46,5.02 9.99,5 C10.53,5.01 10.97,5.44 10.97,6 C10.97,6 11.04,6.54 10.97,7.72 L10.97,7.72 Z" /></svg>',whatsapp:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M16.7,3.3c-1.8-1.8-4.1-2.8-6.7-2.8c-5.2,0-9.4,4.2-9.4,9.4c0,1.7,0.4,3.3,1.3,4.7l-1.3,4.9l5-1.3c1.4,0.8,2.9,1.2,4.5,1.2 l0,0l0,0c5.2,0,9.4-4.2,9.4-9.4C19.5,7.4,18.5,5,16.7,3.3 M10.1,17.7L10.1,17.7c-1.4,0-2.8-0.4-4-1.1l-0.3-0.2l-3,0.8l0.8-2.9 l-0.2-0.3c-0.8-1.2-1.2-2.7-1.2-4.2c0-4.3,3.5-7.8,7.8-7.8c2.1,0,4.1,0.8,5.5,2.3
15518c1.5,1.5,2.3,3.4,2.3,5.5 C17.9,14.2,14.4,17.7,10.1,17.7 M14.4,11.9c-0.2-0.1-1.4-0.7-1.6-0.8c-0.2-0.1-0.4-0.1-0.5,0.1c-0.2,0.2-0.6,0.8-0.8,0.9 c-0.1,0.2-0.3,0.2-0.5,0.1c-0.2-0.1-1-0.4-1.9-1.2c-0.7-0.6-1.2-1.4-1.3-1.6c-0.1-0.2,0-0.4,0.1-0.5C8,8.8,8.1,8.7,8.2,8.5 c0.1-0.1,0.2-0.2,0.2-0.4c0.1-0.2,0-0.3,0-0.4C8.4,7.6,7.9,6.5,7.7,6C7.5,5.5,7.3,5.6,7.2,5.6c-0.1,0-0.3,0-0.4,0 c-0.2,0-0.4,0.1-0.6,0.3c-0.2,0.2-0.8,0.8-0.8,2c0,1.2,0.8,2.3,1,2.4c0.1,0.2,1.7,2.5,4,3.5c0.6,0.2,1,0.4,1.3,0.5 c0.6,0.2,1.1,0.2,1.5,0.1c0.5-0.1,1.4-0.6,1.6-1.1c0.2-0.5,0.2-1,0.1-1.1C14.8,12.1,14.6,12,14.4,11.9" /></svg>',wordpress:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M10,0.5c-5.2,0-9.5,4.3-9.5,9.5s4.3,9.5,9.5,9.5c5.2,0,9.5-4.3,9.5-9.5S15.2,0.5,10,0.5L10,0.5L10,0.5z M15.6,3.9h-0.1 c-0.8,0-1.4,0.7-1.4,1.5c0,0.7,0.4,1.3,0.8,1.9c0.3,0.6,0.7,1.3,0.7,2.3c0,0.7-0.3,1.5-0.6,2.7L14.1,15l-3-8.9 c0.5,0,0.9-0.1,0.9-0.1C12.5,6,12.5,5.3,12,5.4c0,0-1.3,0.1-2.2,0.1C9,5.5,7.7,5.4,7.7,5.4C7.2,5.3,7.2,6,7.6,6c0,0,0.4,0.1,0.9,0.1 l1.3,3.5L8,15L5,6.1C5.5,6.1,5.9,6,5.9,6C6.4,6,6.3,5.3,5.9,5.4c0,0-1.3,0.1-2.2,0.1c-0.2,0-0.3,0-0.5,0c1.5-2.2,4-3.7,6.9-3.7 C12.2,1.7,14.1,2.6,15.6,3.9L15.6,3.9L15.6,3.9z M2.5,6.6l3.9,10.8c-2.7-1.3-4.6-4.2-4.6-7.4C1.8,8.8,2,7.6,2.5,6.6L2.5,6.6L2.5,6.6 z M10.2,10.7l2.5,6.9c0,0,0,0.1,0.1,0.1C11.9,18,11,18.2,10,18.2c-0.8,0-1.6-0.1-2.3-0.3L10.2,10.7L10.2,10.7L10.2,10.7z M14.2,17.1 l2.5-7.3c0.5-1.2,0.6-2.1,0.6-2.9c0-0.3,0-0.6-0.1-0.8c0.6,1.2,1,2.5,1,4C18.3,13,16.6,15.7,14.2,17.1L14.2,17.1L14.2,17.1z" /></svg>',world:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" d="M1,10.5 L19,10.5" /> <path fill="none" stroke="#000" d="M2.35,15.5 L17.65,15.5" /> <path fill="none" stroke="#000" d="M2.35,5.5 L17.523,5.5" /> <path fill="none" stroke="#000" d="M10,19.46 L9.98,19.46 C7.31,17.33 5.61,14.141 5.61,10.58 C5.61,7.02 7.33,3.83 10,1.7 C10.01,1.7 9.99,1.7 10,1.7 L10,1.7 C12.67,3.83 14.4,7.02 14.4,10.58 C14.4,14.141 12.67,17.33 10,19.46 L10,19.46 L10,19.46 L10,19.46 Z" /> <circle fill="none" stroke="#000" cx="10" cy="10.5" r="9" /></svg>',xing:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M4.4,4.56 C4.24,4.56 4.11,4.61 4.05,4.72 C3.98,4.83 3.99,4.97 4.07,5.12 L5.82,8.16 L5.82,8.17 L3.06,13.04 C2.99,13.18 2.99,13.33 3.06,13.44 C3.12,13.55 3.24,13.62 3.4,13.62 L6,13.62 C6.39,13.62 6.57,13.36 6.71,13.12 C6.71,13.12 9.41,8.35 9.51,8.16 C9.49,8.14 7.72,5.04 7.72,5.04 C7.58,4.81 7.39,4.56 6.99,4.56 L4.4,4.56 L4.4,4.56 Z" /> <path d="M15.3,1 C14.91,1 14.74,1.25 14.6,1.5 C14.6,1.5 9.01,11.42 8.82,11.74 C8.83,11.76 12.51,18.51 12.51,18.51 C12.64,18.74 12.84,19 13.23,19 L15.82,19 C15.98,19 16.1,18.94 16.16,18.83 C16.23,18.72 16.23,18.57 16.16,18.43 L12.5,11.74 L12.5,11.72 L18.25,1.56 C18.32,1.42 18.32,1.27 18.25,1.16 C18.21,1.06 18.08,1 17.93,1 L15.3,1 L15.3,1 Z" /></svg>',yelp:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M17.175,14.971c-0.112,0.77-1.686,2.767-2.406,3.054c-0.246,0.1-0.487,0.076-0.675-0.069\tc-0.122-0.096-2.446-3.859-2.446-3.859c-0.194-0.293-0.157-0.682,0.083-0.978c0.234-0.284,0.581-0.393,0.881-0.276\tc0.016,0.01,4.21,1.394,4.332,1.482c0.178,0.148,0.263,0.379,0.225,0.646L17.175,14.971L17.175,14.971z M11.464,10.789\tc-0.203-0.307-0.199-0.666,0.009-0.916c0,0,2.625-3.574,2.745-3.657c0.203-0.135,0.452-0.141,0.69-0.025\tc0.691,0.335,2.085,2.405,2.167,3.199v0.027c0.024,0.271-0.082,0.491-0.273,0.623c-0.132,0.083-4.43,1.155-4.43,1.155\tc-0.322,0.096-0.68-0.06-0.882-0.381L11.464,10.789z M9.475,9.563C9.32,9.609,8.848,9.757,8.269,8.817c0,0-3.916-6.16-4.007-6.351\tc-0.057-0.212,0.011-0.455,0.202-0.65C5.047,1.211,8.21,0.327,9.037,0.529c0.27,0.069,0.457,0.238,0.522,0.479\tc0.047,0.266,0.433,5.982,0.488,7.264C10.098,9.368,9.629,9.517,9.475,9.563z M9.927,19.066c-0.083,0.225-0.273,0.373-0.54,0.421\tc-0.762,0.13-3.15-0.751-3.647-1.342c-0.096-0.131-0.155-0.262-0.167-0.394c-0.011-0.095,0-0.189,0.036-0.272\tc0.061-0.155,2.917-3.538,2.917-3.538c0.214-0.272,0.595-0.355,0.952-0.213c0.345,0.13,0.56,0.428,0.536,0.749\tC10.014,14.479,9.977,18.923,9.927,19.066z M3.495,13.912c-0.235-0.009-0.444-0.148-0.568-0.382c-0.089-0.17-0.151-0.453-0.19-0.794\tC2.63,11.701,2.761,10.144,3.07,9.648c0.145-0.226,0.357-0.345,0.592-0.336c0.154,0,4.255,1.667,4.255,1.667\tc0.321,0.118,0.521,0.453,0.5,0.833c-0.023,0.37-0.236,0.655-0.551,0.738L3.495,13.912z" /></svg>',youtube:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M15,4.1c1,0.1,2.3,0,3,0.8c0.8,0.8,0.9,2.1,0.9,3.1C19,9.2,19,10.9,19,12c-0.1,1.1,0,2.4-0.5,3.4c-0.5,1.1-1.4,1.5-2.5,1.6 c-1.2,0.1-8.6,0.1-11,0c-1.1-0.1-2.4-0.1-3.2-1c-0.7-0.8-0.7-2-0.8-3C1,11.8,1,10.1,1,8.9c0-1.1,0-2.4,0.5-3.4C2,4.5,3,4.3,4.1,4.2 C5.3,4.1,12.6,4,15,4.1z M8,7.5v6l5.5-3L8,7.5z" /></svg>',"500px":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M9.624,11.866c-0.141,0.132,0.479,0.658,0.662,0.418c0.051-0.046,0.607-0.61,0.662-0.664c0,0,0.738,0.719,0.814,0.719\t\tc0.1,0,0.207-0.055,0.322-0.17c0.27-0.269,0.135-0.416,0.066-0.495l-0.631-0.616l0.658-0.668c0.146-0.156,0.021-0.314-0.
155181-0.449\t\tc-0.182-0.18-0.359-0.226-0.471-0.125l-0.656,0.654l-0.654-0.654c-0.033-0.034-0.08-0.045-0.124-0.045\t\tc-0.079,0-0.191,0.068-0.307,0.181c-0.202,0.202-0.247,0.351-0.133,0.462l0.665,0.665L9.624,11.866z" /> <path d="M11.066,2.884c-1.061,0-2.185,0.248-3.011,0.604c-0.087,0.034-0.141,0.106-0.15,0.205C7.893,3.784,7.919,3.909,7.982,4.066\t\tc0.05,0.136,0.187,0.474,0.452,0.372c0.844-0.326,1.779-0.507,2.633-0.507c0.963,0,1.9,0.191,2.781,0.564\t\tc0.695,0.292,1.357,0.719,2.078,1.34c0.051,0.044,0.105,0.068,0.164,0.068c0.143,0,0.273-0.137,0.389-0.271\t\tc0.191-0.214,0.324-0.395,0.135-0.575c-0.686-0.654-1.436-1.138-2.363-1.533C13.24,3.097,12.168,2.884,11.066,2.884z" /> <path d="M16.43,15.747c-0.092-0.028-0.242,0.05-0.309,0.119l0,0c-0.652,0.652-1.42,1.169-2.268,1.521\t\tc-0.877,0.371-1.814,0.551-2.779,0.551c-0.961,0-1.896-0.189-2.775-0.564c-0.848-0.36-1.612-0.879-2.268-1.53\t\tc-0.682-0.688-1.196-1.455-1.529-2.268c-0.325-0.799-0.471-1.643-0.471-1.643c-0.045-0.24-0.258-0.249-0.567-0.203\t\tc-0.128,0.021-0.519,0.079-0.483,0.36v0.01c0.105,0.644,0.289,1.284,0.545,1.895c0.417,0.969,1.002,1.849,1.756,2.604\t\tc0.757,0.754,1.636,1.34,2.604,1.757C8.901,18.785,9.97,19,11.088,19c1.104,0,2.186-0.215,3.188-0.645\t\tc1.838-0.896,2.604-1.757,2.604-1.757c0.182-0.204,0.227-0.317-0.1-0.643C16.779,15.956,16.525,15.774,16.43,15.747z" /> <path d="M5.633,13.287c0.293,0.71,0.723,1.341,1.262,1.882c0.54,0.54,1.172,0.971,1.882,1.264c0.731,0.303,1.509,0.461,2.298,0.461\t\tc0.801,0,1.578-0.158,2.297-0.461c0.711-0.293,1.344-0.724,1.883-1.264c0.543-0.541,0.971-1.172,1.264-1.882\t\tc0.314-0.721,0.463-1.5,0.463-2.298c0-0.79-0.148-1.569-0.463-2.289c-0.293-0.699-0.721-1.329-1.264-1.881\t\tc-0.539-0.541-1.172-0.959-1.867-1.263c-0.721-0.303-1.5-0.461-2.299-0.461c-0.802,0-1.613,0.159-2.322,0.461\t\tc-0.577,0.25-1.544,0.867-2.119,1.454v0.012V2.108h8.16C15.1,2.104,15.1,1.69,15.1,1.552C15.1,1.417,15.1,1,14.809,1H5.915\t\tC5.676,1,5.527,1.192,5.527,1.384v6.84c0,0.214,0.273,0.372,0.529,0.428c0.5,0.105,0.614-0.056,0.737-0.224l0,0\t\tc0.18-0.273,0.776-0.884,0.787-0.894c0.901-0.905,2.117-1.408,3.416-1.408c1.285,0,2.5,0.501,3.412,1.408\t\tc0.914,0.914,1.408,2.122,1.408,3.405c0,1.288-0.508,2.496-1.408,3.405c-0.9,0.896-2.152,1.406-3.438,1.406\t\tc-0.877,0-1.711-0.229-2.433-0.671v-4.158c0-0.553,0.237-1.151,0.643-1.614c0.462-0.519,1.094-0.799,1.782-0.799\t\tc0.664,0,1.293,0.253,1.758,0.715c0.459,0.459,0.709,1.071,0.709,1.723c0,1.385-1.094,2.468-2.488,2.468\t\tc-0.273,0-0.769-0.121-0.781-0.125c-0.281-0.087-0.405,0.306-0.438,0.436c-0.159,0.496,0.079,0.585,0.123,0.607\t\tc0.452,0.137,0.743,0.157,1.129,0.157c1.973,0,3.572-1.6,3.572-3.57c0-1.964-1.6-3.552-3.572-3.552c-0.97,0-1.872,0.36-2.546,1.038\t\tc-0.656,0.631-1.027,1.487-1.027,2.322v3.438v-0.011c-0.372-0.42-0.732-1.041-0.981-1.682c-0.102-0.248-0.315-0.202-0.607-0.113\t\tc-0.135,0.035-0.519,0.157-0.44,0.439C5.372,12.799,5.577,13.164,5.633,13.287z" /></svg>',"arrow-down":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="10.5,16.08 5.63,10.66 6.37,10 10.5,14.58 14.63,10 15.37,10.66" /> <line fill="none" stroke="#000" x1="10.5" y1="4" x2="10.5" y2="15" /></svg>',"arrow-left":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" points="10 14 5 9.5 10 5" /> <line fill="none" stroke="#000" x1="16" y1="9.5" x2="5" y2="9.52" /></svg>',"arrow-right":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" points="10 5 15 9.5 10 14" /> <line fill="none" stroke="#000" x1="4" y1="9.5" x2="15" y2="9.5" /></svg>',"arrow-up":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="10.5,4 15.37,9.4 14.63,10.08 10.5,5.49 6.37,10.08 5.63,9.4" /> <line fill="none" stroke="#000" x1="10.5" y1="16" x2="10.5" y2="5" /></svg>',"chevron-down":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7" /></svg>',"chevron-left":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4" /></svg>',"chevron-right":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16" /></svg>',"chevron-up":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" stroke-width="1.03" points="4 13 10 7 16 13" /></svg>',"cloud-download":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.1" d="M6.5,14.61 L3.75,14.61 C1.96,14.61 0.5,13.17 0.5,11.39 C0.5,9.76 1.72,8.41 3.3,8.2 C3.38,5.31 5.75,3 8.68,3 C11.19,3 13.3
155181,4.71 13.89,7.02 C14.39,6.8 14.93,6.68 15.5,6.68 C17.71,6.68 19.5,8.45 19.5,10.64 C19.5,12.83 17.71,14.6 15.5,14.6 L12.5,14.6" /> <polyline fill="none" stroke="#000" points="11.75 16 9.5 18.25 7.25 16" /> <path fill="none" stroke="#000" d="M9.5,18 L9.5,9.5" /></svg>',"cloud-upload":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" stroke-width="1.1" d="M6.5,14.61 L3.75,14.61 C1.96,14.61 0.5,13.17 0.5,11.39 C0.5,9.76 1.72,8.41 3.31,8.2 C3.38,5.31 5.75,3 8.68,3 C11.19,3 13.31,4.71 13.89,7.02 C14.39,6.8 14.93,6.68 15.5,6.68 C17.71,6.68 19.5,8.45 19.5,10.64 C19.5,12.83 17.71,14.6 15.5,14.6 L12.5,14.6" /> <polyline fill="none" stroke="#000" points="7.25 11.75 9.5 9.5 11.75 11.75" /> <path fill="none" stroke="#000" d="M9.5,18 L9.5,9.5" /></svg>',"credit-card":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <rect fill="none" stroke="#000" x="1.5" y="4.5" width="17" height="12" /> <rect x="1" y="7" width="18" height="3" /></svg>',"file-edit":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" d="M18.65,1.68 C18.41,1.45 18.109,1.33 17.81,1.33 C17.499,1.33 17.209,1.45 16.98,1.68 L8.92,9.76 L8,12.33 L10.55,11.41 L18.651,3.34 C19.12,2.87 19.12,2.15 18.65,1.68 L18.65,1.68 L18.65,1.68 Z" /> <polyline fill="none" stroke="#000" points="16.5 8.482 16.5 18.5 3.5 18.5 3.5 1.5 14.211 1.5" /></svg>',"git-branch":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.2" cx="7" cy="3" r="2" /> <circle fill="none" stroke="#000" stroke-width="1.2" cx="14" cy="6" r="2" /> <circle fill="none" stroke="#000" stroke-width="1.2" cx="7" cy="17" r="2" /> <path fill="none" stroke="#000" stroke-width="2" d="M14,8 C14,10.41 12.43,10.87 10.56,11.25 C9.09,11.54 7,12.06 7,15 L7,5" /></svg>',"git-fork":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.2" cx="5.79" cy="2.79" r="1.79" /> <circle fill="none" stroke="#000" stroke-width="1.2" cx="14.19" cy="2.79" r="1.79" /> <ellipse fill="none" stroke="#000" stroke-width="1.2" cx="10.03" cy="16.79" rx="1.79" ry="1.79" /> <path fill="none" stroke="#000" stroke-width="2" d="M5.79,4.57 L5.79,6.56 C5.79,9.19 10.03,10.22 10.03,13.31 C10.03,14.86 10.04,14.55 10.04,14.55 C10.04,14.37 10.04,14.86 10.04,13.31 C10.04,10.22 14.2,9.19 14.2,6.56 L14.2,4.57" /></svg>',"github-alt":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M10,0.5 C4.75,0.5 0.5,4.76 0.5,10.01 C0.5,15.26 4.75,19.51 10,19.51 C15.24,19.51 19.5,15.26 19.5,10.01 C19.5,4.76 15.25,0.5 10,0.5 L10,0.5 Z M12.81,17.69 C12.81,17.69 12.81,17.7 12.79,17.69 C12.47,17.75 12.35,17.59 12.35,17.36 L12.35,16.17 C12.35,15.45 12.09,14.92 11.58,14.56 C12.2,14.51 12.77,14.39 13.26,14.21 C13.87,13.98 14.36,13.69 14.74,13.29 C15.42,12.59 15.76,11.55 15.76,10.17 C15.76,9.25 15.45,8.46 14.83,7.8 C15.1,7.08 15.07,6.29 14.75,5.44 L14.51,5.42 C14.34,5.4 14.06,5.46 13.67,5.61 C13.25,5.78 12.79,6.03 12.31,6.35 C11.55,6.16 10.81,6.05 10.09,6.05 C9.36,6.05 8.61,6.15 7.88,6.35 C7.28,5.96 6.75,5.68 6.26,5.54 C6.07,5.47 5.9,5.44 5.78,5.44 L5.42,5.44 C5.06,6.29 5.04,7.08 5.32,7.8 C4.7,8.46 4.4,9.25 4.4,10.17 C4.4,11.94 4.96,13.16 6.08,13.84 C6.53,14.13 7.05,14.32 7.69,14.43 C8.03,14.5 8.32,14.54 8.55,14.55 C8.07,14.89 7.82,15.42 7.82,16.16 L7.82,17.51 C7.8,17.69 7.7,17.8 7.51,17.8 C4.21,16.74 1.82,13.65 1.82,10.01 C1.82,5.5 5.49,1.83 10,1.83 C14.5,1.83 18.17,5.5 18.17,10.01 C18.18,13.53 15.94,16.54 12.81,17.69 L12.81,17.69 Z" /></svg>',"google-plus":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M12.9,9c0,2.7-0.6,5-3.2,6.3c-3.7,1.8-8.1,0.2-9.4-3.6C-1.1,7.6,1.9,3.3,6.1,3c1.7-0.1,3.2,0.3,4.6,1.3 c0.1,0.1,0.3,0.2,0.4,0.4c-0.5,0.5-1.2,1-1.7,1.6c-1-0.8-2.1-1.1-3.5-0.9C5,5.6,4.2,6,3.6,6.7c-1.3,1.3-1.5,3.4-0.5,5 c1,1.7,2.6,2.3,4.6,1.9c1.4-0.3,2.4-1.2,2.6-2.6H6.9V9H12.9z" /> <polygon points="20,9 20,11 18,11 18,13 16,13 16,11 14,11 14,9 16,9 16,7 18,7 18,9 " /></svg>',"minus-circle":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="9.5" cy="9.5" r="9" /> <line fill="none" stroke="#000" x1="5" y1="9.5" x2="14" y2="9.5" /></svg>',"more-vertical":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle cx="10" cy="3" r="2" /> <circle cx="10" cy="10" r="2" /> <circle cx="10" cy="17" r="2" /></svg>',"paint-bucket":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M10.21,1 L0,11.21 L8.1,19.31 L18.31,9.1 L10.21,1 L10.21,1 Z M16.89,9.1 L15,11 L1.7,11 L10.21,2.42 L16.89,9.1 Z" /> <path fill="none" stroke="#000" stroke-width="1.1" d="M6.42,2.33 L11.7,7.61" /> <path d="M18.49,12 C18.49,12 20,14.06 20,15.36 C20,16.28 19.24,17 18.49,17 L18.49,17 C17.74,17 17,16.28 17,15.36 C17,14.06 18.49,12 18.49,12 L18.49,12 Z" /></svg>',"phone-landscape":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" d="M17,5.5 C17.8,5.5 18.5,6.2 18.5,7 L18.5,14 C18.5,14.8 17.8,15.5 17,15.5 L3,15.5 C2.2,15.5 1.5,14.8 1.5,14 L1.5,7 C1.5,6.2 2.2,5.5 3,5.5 L17,5.5 L17,5.5 L17,5.5 Z" /> <circle cx="3.8" cy="10.5" r="0.8" /></svg>',"play-circle":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon fill="none" stroke="#000" stroke-width="1.1" points="8.5 7 13.5 10 8.5 13" /> <circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9" /></svg>',"plus-circle":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <circle fill="none" stroke="#000" stroke-width="1.1" cx="9.5" cy="9.5" r="9" /> <line fill="none" stroke="#000" x1="9.5" y1="5" x2="9.5" y2="14" /> <line fill="none" stroke="#000" x1="5" y1="9.5" x2="14" y2="9.5" /></svg>',"quote-right":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M17.27,7.79 C17.27,9.45 16.97,10.43 15.99,12.02 C14.98,13.64 13,15.23 11.56,15.97 L11.1,15.08 C12.34,14.2 13.14,13.51 14.02,11.82 C14.27,11.34 14.41,10.92 14.49,10.54 C14.3,10.58 14.09,10.6 13.88,10.6 C12.06,10.6 10.59,9.12 10.59,7.3 C10.59,5.48 12.06,4 13.88,4 C15.39,4 16.67,5.02 17.05,6.42 C17.19,6.82 17.27,7.27 17.27,7.79 L17.27,7.79 Z" /> <path d="M8.68,7.79 C8.68,9.45 8.38,10.43 7.4,12.02 C6.39,13.64 4.41,15.23 2.97,15.97 L2.51,15.08 C3.75,14.2 4.55,13.51 5.43,11.82 C5.68,11.34 5.82,10.92 5.9,10.54 C5.71,10.58 5.5,10.6 5.29,10.6 C3.47,10.6 2,9.12 2,7.3 C2,5.48 3.47,4 5.29,4 C6.8,4 8.08,5.02 8.46,6.42 C8.6,6.82 8.68,7.27 8.68,7.79 L8.68,7.79 Z" /></svg>',"sign-in":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="7 2 17 2 17 17 7 17 7 16 16 16 16 3 7 3" /> <polygon points="9.1 13.4 8.5 12.8 11.28 10 4 10 4 9 11.28 9 8.5 6.2 9.1 5.62 13 9.5" /></svg>',"sign-out":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="13.1 13.4 12.5 12.8 15.28 10 8 10 8 9 15.28 9 12.5 6.2 13.1 5.62 17 9.5" /> <polygon points="13 2 3 2 3 17 13 17 13 16 4 16 4 3 13 3" /></svg>',"tablet-landscape":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="#000" d="M1.5,5 C1.5,4.2 2.2,3.5 3,3.5 L17,3.5 C17.8,3.5 18.5,4.2 18.5,5 L18.5,16 C18.5,16.8 17.8,17.5 17,17.5 L3,17.5 C2.2,17.5 1.5,16.8 1.5,16 L1.5,5
15518L1.5,5 L1.5,5 Z" /> <circle cx="3.7" cy="10.5" r="0.8" /></svg>',"triangle-down":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="5 7 15 7 10 12" /></svg>',"triangle-left":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="12 5 7 10 12 15" /></svg>',"triangle-right":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="8 5 13 10 8 15" /></svg>',"triangle-up":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="5 13 10 8 15 13" /></svg>',"video-camera":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon points="18,6 18,14 12,10 " /> <rect x="2" y="5" width="12" height="10" /></svg>'};function i(e){i.installed||e.icon.add(t)}return"undefined"!=typeof window&&window.UIkit&&window.UIkit.use(i),i}); 15519 15520/* <![CDATA[ */ 15521var data = {"ajax":"https:\/\/de.hostelman.com\/wp-admin\/admin-ajax.php"}; 15522/* ]]> */ 15523 15524//UIkit.icon(element).svg.then(function(svg) { svg.querySelector('path').style.stroke = 'red'; }); 15525 15526jQuery(document).ready(function() { 15527 15528 //UIkit.dropdown('.uk-navbar-dropdown'); 15529 15530 locationSPage = []; 15531 locationSPage['city'] = 1; 15532 locationSPage['region'] = 1; 15533 locationSPage['country'] = 1; 15534 locationSPage['neighbourhood'] = 1; 15535 locationSActive = false; 15536 15537 setTimeout(function() { 15538 jQuery('.hostelman-locations').each(function(){ 15539 jQuery(this).find('.geodir-chosen-container .chosen-results').scroll(function(){ 15540 if (jQuery(this).scrollTop() + jQuery(this).innerHeight() >= jQuery(this)[0].scrollHeight) { 15541 if (locationSActive) { 15542 return; 15543 } 15544 15545 if (jQuery(this).scrollTop() == 0) { 15546 return; 15547 } 15548 15549 obj = this; 15550 var tempScrollTop = jQuery(this).scrollTop(); 15551 var term = ''; 15552 var ajax_url = geodir_location_all_js_msg.geodir_location_admin_ajax_url; 15553 var attach_term = term != '' ? '&term=' + term : ''; 15554 //var cont = jQuery(obj).closest(".geodir_location_tab_container"); 15555 var tab = jQuery(this).parents('.geodir-chosen-container').siblings('.hostelman-locations-select'); 15556 15557 var tab_id = jQuery(tab).data('type'); 15558 // var tab_id = jQuery(tab).data('location'); 15559 var autoredirect = jQuery(tab).data('autoredirect'); 15560 var show_every_where = jQuery(tab).data('showeverywhere'); 15561 15562 if (locationSPage[tab_id] == '0') { 15563 return; 15564 } 15565 15566 locationSActive = true; 15567 15568 jQuery(obj).addClass('loading_div_loc'); 15569 15570 jQuery.post(ajax_url + '?action=geodir_location_ajax&gd_loc_ajax_action=fill_location&autoredirect=' + autoredirect + '&gd_which_location=' + tab_id + "&show_every_where=" + show_every_where + attach_term + "&lscroll=true&spage=" + locationSPage[tab_id], function(data) { 15571 jQuery(obj).removeClass('loading_div_loc'); 15572 locationSPage[tab_id]++; 15573 15574 if (data == '') { 15575 locationSPage[tab_id] = '0'; 15576 } 15577 15578 var orig_data = jQuery(tab).html(); 15579 15580 jQuery(tab).html(orig_data + data).chosen().trigger("chosen:updated"); 15581 geodir_enable_click_on_chosen_list_item(); 15582 geodir_expand_option(jQuery(this).parents('.hostelman-locations')); 15583 15584 jQuery(jQuery(this).parents('.hostelman-locations')).find('.hostelman-locations-select option').each(function() { 15585 jQuery(this).bind('click', function() { 15586 if (jQuery(this).attr('selected') == 'selected' || jQuery(this).attr('value') == geodir_location_all_js_msg.gd_base_location) { 15587 jQuery(this).closest('select').removeAttr('size'); 15588 jQuery(this).closest('select').removeClass('geodir-loc-select-list'); 15589 } 15590 }); 15591 }); 15592 15593 jQuery(obj).scrollTop(tempScrollTop); 15594 locationSActive = false;
15595 }); 15596 geodir_location_switcher_chosen_ajax(); 15597 } 15598 }); 15599 }); 15600 }, 1000); 15601 15602 jQuery('.hostelman-locations-select').each( function(){ 15603 var curr_chosen = jQuery(this); 15604 var autoredirect = curr_chosen.data('autoredirect'); 15605 var countrysearch = curr_chosen.data('countrysearch'); 15606 var ajax_url = geodir_location_all_js_msg.geodir_location_admin_ajax_url; 15607 15608 if(curr_chosen.data('ajaxchosen') == '1' || curr_chosen.data('ajaxchosen') === undefined) { 15609 var listfor = curr_chosen.data('type'); 15610 var show_every_where = curr_chosen.data('showeverywhere'); 15611 15612 curr_chosen.ajaxChosen({ 15613 keepTypingMsg: geodir_location_all_js_msg.LOCATION_CHOSEN_KEEP_TYPE_TEXT, 15614 lookingForMsg: geodir_location_all_js_msg.LOCATION_CHOSEN_LOOKING_FOR_TEXT, 15615 type: 'GET', 15616 url: ajax_url + '?action=geodir_location_ajax&gd_loc_ajax_action=fill_location&autoredirect=' + autoredirect + '&gd_which_location=' + listfor + '&show_every_where=' + show_every_where, 15617 dataType: 'html', 15618 success: function(data) { 15619 curr_chosen.html(data).chosen().trigger("chosen:updated"); 15620 geodir_enable_click_on_chosen_list_item(); 15621 } 15622 }, null, {}); 15623 } 15624 }); 15625 15626 if (!hostelman_lm_chosen_supported()) { 15627 hostelman_no_chosen_add_search(); 15628 } 15629 15630}); 15631 15632function hostelman_lm_chosen_supported(){ 15633 if(window.navigator.appName === "Microsoft Internet Explorer") { 15634 return document.documentMode >= 8; 15635 } 15636 if(/iP(od|hone|ad)/i.test(window.navigator.userAgent)) { 15637 return false; 15638 } 15639 if(/Android/i.test(window.navigator.userAgent)) { 15640 if(/Mobile/i.test(window.navigator.userAgent)) { 15641 return false; 15642 } 15643 } 15644 15645 return true; 15646} 15647 15648function hostelman_no_chosen_add_search(){ 15649 jQuery('.hostelman-locations').each(function(){ 15650 jQuery(this).find('.geodir-chosen-container .gd-no-chosen-seach').remove(); 15651 var inputSearch = '<div class="chosen-search"><input type="text" name="term" class="gd-no-chosen-seach" value="" onkeyup="javascript:hostelman_no_chosen_search(this);" /></div>'; 15652 jQuery(this).find('hostelman-locations-select').before(inputSearch); 15653 }); 15654} 15655 15656function hostelman_no_chosen_search(el){ 15657 var term = jQuery(obj).val(); 15658 if(typeof term != 'undefined' && term != '') { 15659 term = term.replace(/^\s+/, '');; 15660 } else { 15661 term = ''; 15662 } 15663 var ajax_url = geodir_location_all_js_msg.geodir_location_admin_ajax_url; 15664 var attach_term = term != '' ? '&term=' + term : ''; 15665 var tab = jQuery(el).siblings('.hostelman-locations-select'); 15666 var tab_id = jQuery(tab).data('location'); 15667 var autoredirect = jQuery(tab).data('autoredirect'); 15668 var show_every_where = jQuery(tab).data('showeverywhere'); 15669 15670 jQuery.post(ajax_url + '?action=geodir_location_ajax&gd_loc_ajax_action=fill_location&autoredirect=' + autoredirect + '&gd_which_location=' + tab_id + "&show_every_where=" + show_every_where + attach_term, function(data) { 15671 jQuery(tab).html(data).chosen().trigger("chosen:updated"); 15672 geodir_enable_click_on_chosen_list_item(); 15673 geodir_expand_option(cont); 15674 jQuery(tab).find('option').each(function() { 15675 jQuery(this).bind('click', function() { 15676 if(jQuery(this).attr('selected') == 'selected' || jQuery(this).attr('value') == geodir_location_all_js_msg.gd_base_location) { 15677 jQuery(this).closest('select').removeAttr('size'); 15678 jQuery(this).closest('select').removeClass('geodir-loc-select-list'); 15679 } 15680 }); 15681 }); 15682 }); 15683 15684 geodir_location_switcher_chosen_ajax(); 15685} 15686 15687function hostelman_switch_currency(el){ 15688 var cur = jQuery(el).data('currency'), 15689 spinner = jQuery(el).find('hostelman-currency-spinner'); 15690 if(switcher){ 15691 return; 15692 } 15693 spinner.removeClass('hostelman-invisible'); 15694 var switcher = jQuery.post( 15695 data.ajax, 15696 { 15697 action: 'hostelman_switch_currency', 15698 cur: cur 15699 }, 15700 function(responce){ 15701 if(responce && 1==responce){ 15702 window.location.reload(); 15703 } 15704 } 15705 ).always(function(){ 15706 spinner.addClass('hostelman-invisible'); 15707 }); 15708} 15709 15710 15711if (typeof window.gdShowFilters === 'undefined') { 15712 window.gdShowFilters = function (fbutton) { 15713 var $form = jQuery(fbutton).closest('form'); 15714 var $adv_show = jQuery($form).closest('.geodir_advance_search_widget').attr('data-show-adv'); 15715 if ($adv_show == 'always') { 15716 } else { 15717 jQuery(".customize_filter", $form).slideToggle("slow", function () { 15718 if (jQuery(this).is(":visible")) { 15719 jQuery('.geodir_submit_search:first', $form).css({'visibility': 'hidden'}); 15720 } else { 15721 jQuery('.geodir_submit_search:first', $form).css({'visibility': 'visible'}); 15722 } 15723 }); 15724 } 15725 } 15726 } 15727 15728jQuery(function ($) { 15729 var gd_datepicker_loaded = $('body').hasClass('gd-multi-datepicker') ? true : false;
15730 if (!gd_datepicker_loaded) { 15731 $('body').addClass('gd-multi-datepicker'); 15732 } 15733 15734 var gdcnt = 0; 15735 $('.geodir-listing-search [name="event_start"]').each(function () { 15736 gdcnt++; 15737 var $this = this; 15738 $($this).attr('id', 'event_start' + gdcnt); 15739 $($this).addClass('gd-datepicker-event-start'); 15740 15741 if (!$($this).hasClass('hasDatepicker')) { 15742 $($this).datepicker({ 15743 dateFormat: 'yy-mm-dd', 15744 changeMonth: true, 15745 changeYear: true, 15746 onClose: function (selectedDate) { 15747 $($this).closest('div').find('.gd-datepicker-event-end').datepicker("option", "minDate", selectedDate); 15748 } 15749 }); 15750 } 15751 }); 15752 15753 var gdcnt = 0; 15754 $('.geodir-listing-search [name="event_end"]').each(function () { 15755 gdcnt++; 15756 var $this = this; 15757 $($this).attr('id', 'event_end' + gdcnt); 15758 $($this).addClass('gd-datepicker-event-end'); 15759 15760 if (!$($this).hasClass('hasDatepicker')) { 15761 $($this).datepicker({ 15762 changeMonth: true, 15763 changeYear: true, 15764 dateFormat: 'yy-mm-dd' 15765 }); 15766 } 15767 }); 15768 }); 15769 15770var geodir_advanced_search_js_msg = {"geodir_advanced_search_plugin_url":"https:\/\/de.hostelman.com\/wp-content\/plugins\/geodir_advance_search_filters","geodir_plugin_url":"https:\/\/de.hostelman.com\/wp-content\/plugins\/geodirectory","geodir_admin_ajax_url":"https:\/\/de.hostelman.com\/wp-admin\/admin-ajax.php","request_param":"{\"geo_url\":\"is_location\"}","msg_Near":"Near:","default_Near":"Reiseziel...","msg_Me":"Me","unom_dist":"km","autocomplete_field_name":"s","geodir_enable_autocompleter_near":"1","geodir_enable_autocompleter":"1","geodir_autocompleter_autosubmit_near":"0","geodir_autocompleter_autosubmit":"1","geodir_location_manager_active":"1","msg_User_defined":"User defined","ask_for_share_location":"","geodir_autolocate_ask":"","geodir_autolocate_ask_msg":"Do you wish to be geolocated to listings near you?","UNKNOWN_ERROR":"Unable to find your location.","PERMISSION_DENINED":"Permission denied in finding your location.","POSITION_UNAVAILABLE":"Your location is currently unknown.","BREAK":"Attempt to find location took too long.","GEOLOCATION_NOT_SUPPORTED":"Geolocation is not supported by this browser.","DEFAUTL_ERROR":"Browser unable to find your location.","text_more":"More","text_less":"Less","msg_In":"In:","txt_in_country":"(Country)","txt_in_region":"(Region)","txt_in_city":"(City)","txt_in_hood":"(Neighbourhood)","compass_active_color":"#087CC9","onload_redirect":"no","onload_askRedirect":"","onload_redirectLocation":""}; 15771 15772map_id_arr = []; 15773gdUmarker = ''; 15774my_location = ''; 15775lat = ''; 15776lon = ''; 15777gdUmarker = ''; 15778userMarkerActive = false; 15779gdLocationOptions = { 15780 enableHighAccuracy: true, 15781 timeout: 5000, 15782 maximumAge: 0 15783}; 15784geodir_insert_compass(); 15785gdSetupUserLoc(); 15786jQuery(window).load(function() { 15787 geodir_reposition_compass();// set compass position after images loaded so not to change position 15788 }); 15789jQuery("body").on("map_show", function(event, map_id) { 15790 map_id_arr.push(map_id); 15791 if (lat && lon) { 15792 setTimeout(function(map_id) { 15793 setusermarker(lat, lon, map_id); //createUserMarker(lat,lon,true);//set marker on map<br /> 15794 }, 1, map_id); 15795 } 15796}); 15797 15798var geodir_claim_all_js_msg = {"geodir_claim_admin_url":"https:\/\/de.hostelman.com\/wp-admin\/admin.php","geodir_claim_admin_ajax_url":"https:\/\/de.hostelman.com\/wp-admin\/admin-ajax.php","geodir_claim_admin_ajax_url_form":"https:\/\/de.hostelman.com\/wp-admin\/admin-ajax.php?action=geodir_claim_ajax_action","geodir_want_to_delete_claim":"Are you sure want to delete this claim?","geodir_want_to_approve_claim":"Are you sure want to approve this claim?","geodir_want_to_reject_claim":"Are you sure want to reject this claim?","geodir_want_to_undo_claim":"Are you sure want to undo this claim and restore original author?","geodir_what_is_claim_process":"What is the claim process?","geodir_claim_process_hide":"Hide claim process.","geodir_claim_field_id_required":"This field is required.","geodir_claim_valid_email_address_msg":"Please enter valid email address."}; 15799 15800var geodir_custom_post_type_all_js_msg = {"geodir_cp_post_type_char_validation":"Post Type can not be more than 17 characters.","geodir_cp_post_type_illegal_characters_validation":"Post Type contains illegal characters.","geodir_cp_post_type_blank_validation":"Post Type must not be blank.","geodir_cp_listing_slug_illegal_characters_validation":"Listing Slug contains illegal characters.","geodir_cp_listing_slug_blank_validation":"Listing Slug must not be blank.","geodir_cp_listing_order_value_validation":"Enter valid order value."};jQuery(document).ready(function(){ 15801 jQuery('.gd-post-no-geo').each(function(){ 15802 jQuery(this).find('.geodir-addinfo .geodir-pinpoint').remove(); 15803 jQuery(this).find('.geodir-addinfo .geodir-pinpoint-link').remove(); 15804 }); 15805 15806 }); 15807 15808var geodir_location_all_js_msg = {"geodir_location_admin_url":"https:\/\/de.hostelman.com\/wp-admin\/admin.php","geodir_location_plugin_url":"https:\/\/de.hostelman.com\/wp-content\/plugins\/geodir_location_manager","geodir_location_admin_ajax_url":"https:\/\/de.hostelman.com\/wp-admin\/admin-ajax.php","select_merge_city_msg":"Please select merge city.","set_location_default_city_confirmation":"Are sure you want to make this city default?","LISTING_URL_PREFIX":"Please enter listing url prefix","LISTING_URL_PREFIX_INVALID_CHAR":"Invalid character in listing url prefix","LOCATION_URL_PREFIX":"Please enter location url prefix","LOCATOIN_PREFIX_INVALID_CHAR":"Invalid character in location url prefix","LOCATION_CAT_URL_SEP":"Please enter location and category url separator","LOCATION_CAT_URL_SEP_INVALID_CHAR":"Invalid character in location and category url separator","LISTING_DETAIL_URL_SEP":"Please enter listing detail url separator","LISTING_DETAIL_URL_SEP_INVALID_CHAR":"Invalid character in listing detail url separator","LOCATION_PLEASE_WAIT"
15808:"Please wait...","LOCATION_CHOSEN_NO_RESULT_TEXT":"Sorry, nothing found!","LOCATION_CHOSEN_KEEP_TYPE_TEXT":"Please wait...","LOCATION_CHOSEN_LOOKING_FOR_TEXT":"We are searching for","select_location_translate_msg":"Please select country to update translation.","select_location_translate_confirm_msg":"Are you sure?","gd_text_search_city":"Search City","gd_text_search_region":"Search Region","gd_text_search_country":"Search Country","gd_text_search_location":"Search location","gd_base_location":"https:\/\/de.hostelman.com\/location\/","UNKNOWN_ERROR":"Unable to find your location.","PERMISSION_DENINED":"Permission denied in finding your location.","POSITION_UNAVAILABLE":"Your location is currently unknown.","BREAK":"Attempt to find location took too long.","DEFAUTL_ERROR":"Browser unable to find your location.","msg_Near":"Near:","msg_Me":"Me","msg_User_defined":"User defined","delete_location_msg":"Deleting location will also DELETE any LISTINGS in this location. Are you sure want to DELETE this location?","delete_bulk_location_select_msg":"Please select at least one location."}; 15809 15810var geodir_all_js_msg = {"geodir_plugin_url":"https:\/\/de.hostelman.com\/wp-content\/plugins\/geodirectory","geodir_admin_ajax_url":"https:\/\/de.hostelman.com\/wp-admin\/admin-ajax.php","custom_field_not_blank_var":"HTML Variable Name must not be blank","custom_field_not_special_char":"Please do not use special character and spaces in HTML Variable Name.","custom_field_unique_name":"HTML Variable Name should be a unique name.","custom_field_delete":"Are you wish to delete this field?","tax_meta_class_succ_del_msg":"File has been successfully deleted.","tax_meta_class_not_permission_to_del_msg":"You do NOT have permission to delete this file.","tax_meta_class_order_save_msg":"Order saved!","tax_meta_class_not_permission_record_img_msg":"You do not have permission to reorder images.","address_not_found_on_map_msg":"Address not found for:","my_place_listing_del":"Are you sure you wish to delete this listing?","my_main_listing_del":"Deleting the main listing of a franchise will turn all franchises in regular listings. Are you sure wish to delete this main listing?","rating_error_msg":"Error : please retry","listing_url_prefix_msg":"Please enter listing url prefix","invalid_listing_prefix_msg":"Invalid character in listing url prefix","location_url_prefix_msg":"Please enter location url prefix","invalid_location_prefix_msg":"Invalid character in location url prefix","location_and_cat_url_separator_msg":"Please enter location and category url separator","invalid_char_and_cat_url_separator_msg":"Invalid character in location and category url separator","listing_det_url_separator_msg":"Please enter listing detail url separator","invalid_char_listing_det_url_separator_msg":"Invalid character in listing detail url separator","loading_listing_error_favorite":"Error loading listing.","geodir_field_id_required":"This field is required.","geodir_valid_email_address_msg":"Please enter valid email address.","geodir_default_marker_icon":"http:\/\/de.hostelman.com\/wp-content\/plugins\/geodirectory\/geodirectory-functions\/map-functions\/icons\/pin.png","geodir_default_marker_w":"20","geodir_default_marker_h":"34","geodir_latitude_error_msg":"A numeric value is required. Please make sure you have either dragged the marker or clicked the button: Set Address On Map","geodir_longgitude_error_msg":"A numeric value is required. Please make sure you have either dragged the marker or clicked the button: Set Address On Map","geodir_default_rating_star_icon":"http:\/\/de.hostelman.com\/wp-content\/plugins\/geodirectory\/geodirectory-assets\/images\/stars.png","gd_cmt_btn_post_reply":"Post Reply","gd_cmt_btn_reply_text":"Reply text","gd_cmt_btn_post_review":"Post Review","gd_cmt_btn_review_text":"Review text","gd_cmt_err_no_rating":"Please select star rating, you can't leave a review without stars.","err_empty_review":"Please type a review.","err_empty_reply":"Please type a reply.","geodir_onoff_dragging":"","geodir_is_mobile":"","geodir_on_dragging_text":"Enable Dragging","geodir_off_dragging_text":"Disable Dragging","geodir_err_max_file_size":"File size error : You tried to upload a file over %s","geodir_err_file_upload_limit":"You have reached your upload limit of %s files.","geodir_err_pkg_upload_limit":"You may only upload %s files with this package, please try again.","geodir_action_remove":"Remove","geodir_txt_all_files":"Allowed files","geodir_err_file_type":"File type error. Allowed file types: %s","gd_allowed_img_types":"jpg,jpeg,jpe,gif,png","geodir_txt_form_wait":"Wait...","geodir_txt_form_searching":"Searching...","fa_rating":"","reviewrating":"","multirating":"","geodir_map_name":"osm","osmStart":"Start","osmVia":"Via {viaNumber}","osmEnd":"Enter Your Location","ga_delete_check":"Do you wish to Deauthorize and break Analytics?","geoMyLocation":"My Location","geoErrUNKNOWN_ERROR":"Unable to find your location","geoErrPERMISSION_DENINED":"Permission denied in finding your location","geoErrPOSITION_UNAVAILABLE":"Your location is currently unknown","geoErrBREAK":"Attempt to find location took too long","geoErrDEFAULT":"Location detection not supported in browser"}; 15811 15812var default_location = 'Berlin'; 15813 var latlng; 15814 var address; 15815 var dist = 0; 15816 var Sgeocoder = (typeof google!=='undefined' && typeof google.maps!=='undefined') ? new google.maps.Geocoder() : {}; 15817 15818 function geodir_setup_submit_search() { 15819 jQuery('.geodir_submit_search').unbind('click');// unbind any other click events 15820 jQuery('.geodir_submit_search').click(function(e) { 15821 15822 e.preventDefault(); 15823 15824 var s = ' '; 15825 var $form = jQuery(this).closest('form'); 15826 15827 if (jQuery("#sdist input[type='radio']:checked").length != 0) dist = jQuery("#sdist input[type='radio']:checked").val(); 15828 if (jQuery('.search_text', $form).val() == '' || jQuery('.search_text', $form).val() == 'Name ...') jQuery('.search_text', $form).val(s); 15829 15830 // Disable location based search for disabled location post type. 15831 if (jQuery('.search_by_post', $form).val() != '' && typeof gd_cpt_no_location == 'function') { 15832 if (gd_cpt_no_location(jQuery('.search_by_post', $form).val())) { 15833 jQuery('.snear', $form).remove(); 15834 jQuery('.sgeo_lat', $form).remove(); 15835 jQuery('.sgeo_lon', $form).remove(); 15836 jQuery('select[name="sort_by"]', $form).remove(); 15837 jQuery($form).submit(); 15838 return; 15839 } 15840 } 15841 15842 if (dist > 0 || (jQuery('select[name="sort_by"]').val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest') || (jQuery(".snear", $form).val() != '' && jQuery(".snear", $form).val() != 'Reiseziel...')) { 15843 geodir_setsearch($form); 15844 } else { 15845 jQuery(".snear", $form).val(''); 15846 jQuery($form).submit(); 15847 } 15848 }); 15849 } 15850 15851 jQuery(document).ready(function() { 15852 geodir_setup_submit_search(); 15853 //setup advanced search form on form ajax load 15854 jQuery("body").on("geodir_setup_search_form", function(){ 15855 geodir_setup_submit_search(); 15856 }); 15857 }); 15858 15859 function geodir_setsearch($form) { 15860 if ((dist > 0 || (jQuery('select[name="sort_by"]', $form).val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest')) && (jQuery(".snear", $form).val() == '' || jQuery(".snear", $form).val() == 'Reiseziel...')) jQuery(".snear", $form).val(default_location); 15861 geocodeAddress($form); 15862 } 15863 15864 function updateSearchPosition(latLng, $form) { 15865 if (window.gdMaps === 'google') { 15866 jQuery('.sgeo_lat').val(latLng.lat()); 15867 jQuery('.sgeo_lon').val(latLng.lng()); 15868 } else if (window.gdMaps === 'osm') { 15869 jQuery('.sgeo_lat').val(latLng.lat); 15870 jQuery('.sgeo_lon').val(latLng.lon); 15871 } 15872 jQuery($form).submit(); // submit form after insering the lat long positions 15873 } 15874 15875 function geocodeAddress($form) { 15876 // Call the geocode function 15877 Sgeocoder = window.gdMaps == 'google' ? new google.maps.Geocoder() : null; 15878 15879 if (jQuery('.snear', $form).val() == '' || ( jQuery('.sgeo_lat').val() != '' && jQuery('.sgeo_lon').val() != '' ) || jQuery('.snear', $form).val().match("^In:")) { 15880 if (jQuery('.snear', $form).val().match("^In:")) { 15881 jQuery(".snear", $form).val(''); 15882 } 15883 jQuery($form).submit(); 15884 } else { 15885 var address = jQuery(".snear", $form).val(); 15886 15887 if (jQuery('.snear', $form).val() == 'Reiseziel...') { 15888 initialise2(); 15889 } else { 15890 if (window.gdMaps === 'google') { 15891 Sgeocoder.geocode({'address': address}, 15892 function (results, status) { 15893 if (status == google.maps.GeocoderStatus.OK) { 15894 updateSearchPosition(results[0].geometry.location, $form); 15895 } else { 15896 alert("Search was not successful for the following reason :" + status); 15897 } 15898 }); 15899 } else if (window.gdMaps === 'osm') { 15900 geocodePositionOSM(false, address, false, false, 15901 function(geo) { 15902 if (typeof geo !== 'undefined' && geo.lat && geo.lon) { 15903 updateSearchPosition(geo, $form); 15904 } else { 15905 alert("Search was not successful for the requested address."); 15906 } 15907 }); 15908 } else { 15909 jQuery($form).submit(); 15910 } 15911 } 15912 } 15913 } 15914 15915 function initialise2() { 15916 if (!window.gdMaps) { 15917 return; 15918 } 15919 15920 if (window.gdMaps === 'google') { 15921 var latlng = new google.maps.LatLng(56.494343, -4.205446); 15922 var myOptions = { 15923 zoom: 4, 15924 mapTypeId: google.maps.MapTypeId.TERRAIN, 15925 disableDefaultUI: true 15926 } 15927 } else if (window.gdMaps === 'osm') { 15928 var latlng = new L.LatLng(56.494343, -4.205446); 15929 var myOptions = { 15930 zoom: 4, 15931 mapTypeId: 'TERRAIN', 15932 disableDefaultUI: true 15933 } 15934 } 15935 try { prepareGeolocation(); } catch (e) {} 15936 doGeolocation(); 15937 } 15938 15939 function doGeolocation() { 15940 if (navigator.geolocation) { 15941 navigator.geolocation.getCurrentPosition(positionSuccess, positionError); 15942 } else { 15943 positionError(-1); 15944 } 15945 } 15946 15947 function positionError(err) { 15948 var msg; 15949 switch (err.code) { 15950 case err.UNKNOWN_ERROR: 15951 msg = "Unable to find your location"; 15952 break; 15953 case err.PERMISSION_DENINED: 15954 msg = "Permission denied in finding your location"; 15955 break; 15956 case err.POSITION_UNAVAILABLE: 15957 msg = "Your location is currently unknown"; 15958 break; 15959 case err.BREAK: 15960 msg = "Attempt to find location took too long"; 15961 break; 15962 default: 15963 msg = "Location detection not supported in browser"; 15964 } 15965 jQuery('#info').html(msg); 15966 } 15967 15968 function positionSuccess(position) { 15969 var coords = position.coords || position.coordinate || position; 15970 jQuery('.sgeo_lat').val(coords.latitude); 15971 jQuery('.sgeo_lon').val(coords.longitude); 15972 15973 jQuery('.geodir-listing-search').submit(); 15974 } 15975 15976 /** 15977 * On unload page do some cleaning so back button cache does not store these values. 15978 */ 15979 window.onunload = function(){ 15980 if(jQuery('.sgeo_lat').length ){ 15981 jQuery('.sgeo_lat').val(''); 15982 jQuery('.sgeo_lon').val(''); 15983 } 15984 }; 15985 15986/* <![CDATA[ */ 15987 cli_cookiebar_settings='{"animate_speed_hide":"500","animate_speed_show":"500","background":"#fff","border":"#444","border_on":false,"button_1_button_colour":"#996699","button_1_button_hover":"#7a527a","button_1_link_colour":"#fff","button_1_as_button":true,"button_1_new_win":false,"button_2_button_colour":"#996699","button_2_button_hover":"#7a527a","button_2_link_colour":"#ffffff","button_2_as_button":true,"button_2_hidebar":"fffffff","button_2_nofollow":false,"button_3_button_colour":"#996699","button_3_button_hover":"#7a527a","button_3_link_colour":"#fff","button_3_as_button":true,"button_3_new_win":false,"button_4_button_colour":"#996699","button_4_button_hover":"#7a527a","button_4_link_colour":"#fff","button_4_as_button":true,"font_family":"inherit","header_fix":false,"notify_animate_hide":true,"notify_animate_show":false,"notify_div_id":"#cookie-law-info-bar","notify_position_horizontal":"right","notify_position_vertical":"bottom","scroll_close":false,"scroll_close_reload":false,"accept_close_reload":false,"reject_close_reload":false,"showagain_tab":true,"showagain_background":"#fff","showagain_border":"#000","showagain_div_id":"#cookie-law-info-again","showagain_x_position":"83px","text":"#000","show_once_yn":false,"show_once":"10000","logging_on":false,"as_popup":false,"popup_overlay":true,"bar_heading_text":"","cookie_bar_as":"banner","cookie_setting_popup":true,"accept_all":true,"js_script_blocker":false,"popup_showagain_position":"bottom-right","widget_position":"left","button_1_style":[["margin","5px 5px 5px 30px"],["border-radius","0"],["padding","8px 25px 8px 25px"]],"button_2_style":[],"button_3_style":[["margin","5px 5px 5px 5px"],["border-radius","0"],["padding","8px 25px 8px 25px"]],"button_4_style":[["border-bottom","1px solid"]],"button_5_style":[]}'; 15988 /* ]]> */
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.