Version Description
- Image parser - now handles array (of images) values from custom field sources
- Scrolling now does not trigger checkbox selection on mobile devices
- Scrollbar script updated to a newer release (IE Edge only support)
Download this release
Release Info
Developer | wpdreams |
Plugin | Ajax Search Lite |
Version | 4.9.5 |
Comparing to | |
See all releases |
Code changes from version 4.9.4 to 4.9.5
- ajax-search-lite.php +3 -3
- includes/classes/search/class-asl-search-cpt.php +3 -0
- includes/views/asl.shortcode.php +12 -16
- js/min-scoped/jquery.ajaxsearchlite.min.js +2 -2
- js/min/jquery.ajaxsearchlite.min.js +2 -2
- js/nomin-scoped/jquery.ajaxsearchlite.js +10 -11
- js/nomin-scoped/simplebar.js +2955 -5295
- js/nomin/jquery.ajaxsearchlite.js +10 -11
- js/nomin/simplebar.js +731 -5295
ajax-search-lite.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Ajax Search Lite
|
4 |
Plugin URI: http://wp-dreams.com
|
5 |
Description: The lite version of the most powerful ajax powered search engine for WordPress.
|
6 |
-
Version: 4.9.
|
7 |
Author: Ernest Marcinko
|
8 |
Author URI: http://wp-dreams.com
|
9 |
Text Domain: ajax-search-lite
|
@@ -26,8 +26,8 @@ define(
|
|
26 |
str_replace('http://', 'https://', plugin_dir_url(__FILE__)) : plugin_dir_url(__FILE__)
|
27 |
);
|
28 |
define('ASL_URL_NP', str_replace(array("http://", "https://"), "//", plugin_dir_url(__FILE__)));
|
29 |
-
define('ASL_CURRENT_VERSION',
|
30 |
-
define('ASL_CURR_VER_STRING', "4.9.
|
31 |
define('ASL_DEBUG', 0);
|
32 |
define('ASL_DEMO', get_option('wd_asl_demo', 0) );
|
33 |
|
3 |
Plugin Name: Ajax Search Lite
|
4 |
Plugin URI: http://wp-dreams.com
|
5 |
Description: The lite version of the most powerful ajax powered search engine for WordPress.
|
6 |
+
Version: 4.9.5
|
7 |
Author: Ernest Marcinko
|
8 |
Author URI: http://wp-dreams.com
|
9 |
Text Domain: ajax-search-lite
|
26 |
str_replace('http://', 'https://', plugin_dir_url(__FILE__)) : plugin_dir_url(__FILE__)
|
27 |
);
|
28 |
define('ASL_URL_NP', str_replace(array("http://", "https://"), "//", plugin_dir_url(__FILE__)));
|
29 |
+
define('ASL_CURRENT_VERSION', 4750);
|
30 |
+
define('ASL_CURR_VER_STRING', "4.9.5");
|
31 |
define('ASL_DEBUG', 0);
|
32 |
define('ASL_DEMO', get_option('wd_asl_demo', 0) );
|
33 |
|
includes/classes/search/class-asl-search-cpt.php
CHANGED
@@ -1794,6 +1794,9 @@ if ( ! class_exists( 'ASL_Search_CPT' ) ) {
|
|
1794 |
case "custom":
|
1795 |
if ( $image_settings['image_custom_field'] != "" ) {
|
1796 |
$val = get_post_meta( $post->id, $image_settings['image_custom_field'], true );
|
|
|
|
|
|
|
1797 |
if ( $val != null && $val != "" ) {
|
1798 |
if ( is_numeric($val) ) {
|
1799 |
$im = wp_get_attachment_image_url( $val, $size );
|
1794 |
case "custom":
|
1795 |
if ( $image_settings['image_custom_field'] != "" ) {
|
1796 |
$val = get_post_meta( $post->id, $image_settings['image_custom_field'], true );
|
1797 |
+
if ( is_array($val) && !empty($val) ) {
|
1798 |
+
$val = reset($val);
|
1799 |
+
}
|
1800 |
if ( $val != null && $val != "" ) {
|
1801 |
if ( is_numeric($val) ) {
|
1802 |
$im = wp_get_attachment_image_url( $val, $size );
|
includes/views/asl.shortcode.php
CHANGED
@@ -78,23 +78,19 @@
|
|
78 |
<?php
|
79 |
// Search redirection, memorize general options
|
80 |
if ( isset($style['_fo']) ) {
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
"set_inpages" => isset($style['_fo']["set_inpages"]) ? ' checked="checked"' : "",
|
88 |
-
);
|
89 |
} else {
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
"set_inpages" => in_array('page', $style['customtypes']) ? ' checked="checked"' : "",
|
97 |
-
);
|
98 |
}
|
99 |
|
100 |
if ( function_exists('qtranxf_getLanguage') ) {
|
78 |
<?php
|
79 |
// Search redirection, memorize general options
|
80 |
if ( isset($style['_fo']) ) {
|
81 |
+
$_checked = array(
|
82 |
+
"set_exactonly" => in_array('exact', $style['_fo']['asl_gen']) ? ' checked="checked"' : "",
|
83 |
+
"set_intitle" => in_array('title', $style['_fo']['asl_gen']) ? ' checked="checked"' : "",
|
84 |
+
"set_incontent" => in_array('content', $style['_fo']['asl_gen']) ? ' checked="checked"' : "",
|
85 |
+
"set_inexcerpt" => in_array('excerpt', $style['_fo']['asl_gen']) ? ' checked="checked"' : ""
|
86 |
+
);
|
|
|
|
|
87 |
} else {
|
88 |
+
$_checked = array(
|
89 |
+
"set_exactonly" => $style['exactonly'] == 1 ? ' checked="checked"' : "",
|
90 |
+
"set_intitle" => $style['searchintitle'] == 1 ? ' checked="checked"' : "",
|
91 |
+
"set_incontent" => $style['searchincontent'] == 1 ? ' checked="checked"' : "",
|
92 |
+
"set_inexcerpt" => $style['searchinexcerpt'] == 1 ? ' checked="checked"' : ""
|
93 |
+
);
|
|
|
|
|
94 |
}
|
95 |
|
96 |
if ( function_exists('qtranxf_getLanguage') ) {
|
js/min-scoped/jquery.ajaxsearchlite.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
2 |
-
!function(n,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){var c=[],l=c.slice,ki=c.concat,ni=c.push,di=c.indexOf,ct={},hf=ct.toString,nt=ct.hasOwnProperty,r={},gi="1.11.1",i=function(n,t){return new i.fn.init(n,t)},cf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,lf=/^-ms-/,af=/-([\da-z])/gi,vf=function(n,t){return t.toUpperCase()};i.fn=i.prototype={jquery:gi,constructor:i,selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return null!=n?0>n?this[n+this.length]:this[n]:l.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ni,sort:c.sort,splice:c.splice};i.extend=i.fn.extend=function(){var r,e,t,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"==typeof n||i.isFunction(n)||(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],t=o[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(e=i.isArray(t)))?(e?(e=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(gi+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!i.isArray(n)&&n-parseFloat(n)>=0},isEmptyObject:function(n){for(var t in n)return!1;return!0},isPlainObject:function(n){var t;if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!nt.call(n,"constructor")&&!nt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(r.ownLast)for(t in n)return nt.call(n,t);for(t in n);return void 0===t||nt.call(n,t)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ct[hf.call(n)]||"object":typeof n},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(lf,"ms-").replace(af,vf)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=ti(n);if(i){if(e){for(;f>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;f>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:function(n){return null==n?"":(n+"").replace(cf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(ti(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ni.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(di)return di.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)while(void 0!==t[i])n[u++]=t[i++];return n.length=u,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;e>r;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=ti(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return ki.apply([],f)},guid:1,proxy:function(n,t){var u,r,f;return"string"==typeof t&&(f=n[t],t=n,n=f),i.isFunction(n)?(u=l.call(arguments,2),r=function(){return n.apply(t||this,u.concat(l.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r):void 0},now:function(){return+new Date},support:r});i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ct["[object "+t+"]"]=t.toLowerCase()});function ti(n){var t=n.length,r=i.type(n);return"function"===r||i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n}var tt=function(n){var it,u,t,ht,oi,et,wt,si,ct,y,rt,p,e,l,a,o,g,lt,ot,f="sizzle"+-new Date,s=n.document,v=0,ki=0,hi=ni(),ci=ni(),li=ni(),bt=function(n,t){return n===t&&(rt=!0),0},ut="undefined",ai=1<<31,di={}.hasOwnProperty,w=[],gi=w.pop,nr=w.push,b=w.push,vi=w.slice,nt=w.indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(this[t]===n)return t;return-1},kt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",i="[\\x20\\t\\r\\n\\f]",ft="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",yi=ft.replace("w","w#"),pi="\\["+i+"*("+ft+")(?:"+i+"*([*^$|!~]?=)"+i+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+yi+"))|)"+i+"*\\]",dt=":("+ft+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+pi+")*)|.*)\\)|)",at=new RegExp("^"+i+"+|((?:^|[^\\\\])(?:\\\\.)*)"+i+"+$","g"),tr=new RegExp("^"+i+"*,"+i+"*"),ir=new RegExp("^"+i+"*([>+~]|"+i+")"+i+"*"),rr=new RegExp("="+i+"*([^\\]'\"]*?)"+i+"*\\]","g"),ur=new RegExp(dt),fr=new RegExp("^"+yi+"$"),vt={ID:new RegExp("^#("+ft+")"),CLASS:new RegExp("^\\.("+ft+")"),TAG:new RegExp("^("+ft.replace("w","w*")+")"),ATTR:new RegExp("^"+pi),PSEUDO:new RegExp("^"+dt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+i+"*(even|odd|(([+-]|)(\\d*)n|)"+i+"*(?:([+-]|)"+i+"*(\\d+)|))"+i+"*\\)|)","i"),bool:new RegExp("^(?:"+kt+")$","i"),needsContext:new RegExp("^"+i+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+i+"*((?:-\\d)?\\d*)"+i+"*\\)|)(?=[^-]|$)","i")},er=/^(?:input|select|textarea|button)$/i,or=/^h\d$/i,st=/^[^{]+\{\s*\[native \w/,sr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,hr=/'|\\/g,k=new RegExp("\\\\([\\da-f]{1,6}"+i+"?|("+i+")|.)","ig"),d=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{b.apply(w=vi.call(s.childNodes),s.childNodes);w[s.childNodes.length].nodeType}catch(yr){b={apply:w.length?function(n,t){nr.apply(n,vi.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}function r(n,t,i,r){var w,h,c,v,k,y,d,l,nt,g;if((t?t.ownerDocument||t:s)!==e&&p(t),t=t||e,i=i||[],!n||"string"!=typeof n)return i;if(1!==(v=t.nodeType)&&9!==v)return[];if(a&&!r){if(w=sr.exec(n))if(c=w[1]){if(9===v){if(h=t.getElementById(c),!h||!h.parentNode)return i;if(h.id===c)return i.push(h),i}else if(t.ownerDocument&&(h=t.ownerDocument.getElementById(c))&&ot(t,h)&&h.id===c)return i.push(h),i}else{if(w[2])return b.apply(i,t.getElementsByTagName(n)),i;if((c=w[3])&&u.getElementsByClassName&&t.getElementsByClassName)return b.apply(i,t.getElementsByClassName(c)),i}if(u.qsa&&(!o||!o.test(n))){if(l=d=f,nt=t,g=9===v&&n,1===v&&"object"!==t.nodeName.toLowerCase()){for(y=et(n),(d=t.getAttribute("id"))?l=d.replace(hr,"\\$&"):t.setAttribute("id",l),l="[id='"+l+"'] ",k=y.length;k--;)y[k]=l+yt(y[k]);nt=gt.test(n)&&ii(t.parentNode)||t;g=y.join(",")}if(g)try{return b.apply(i,nt.querySelectorAll(g)),i}catch(tt){}finally{d||t.removeAttribute("id")}}}return si(n.replace(at,"$1"),t,i,r)}function ni(){var i=[];function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}return n}function h(n){return n[f]=!0,n}function c(n){var t=e.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ti(n,i){for(var u=n.split("|"),r=n.length;r--;)t.attrHandle[u[r]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||ai)-(~n.sourceIndex||ai);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function cr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function tt(n){return h(function(t){return t=+t,h(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ii(n){return n&&typeof n.getElementsByTagName!==ut&&n}u=r.support={};oi=r.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};p=r.setDocument=function(n){var v,r=n?n.ownerDocument||n:s,h=r.defaultView;return r!==e&&9===r.nodeType&&r.documentElement?(e=r,l=r.documentElement,a=!oi(r),h&&h!==h.top&&(h.addEventListener?h.addEventListener("unload",function(){p()},!1):h.attachEvent&&h.attachEvent("onunload",function(){p()})),u.attributes=c(function(n){return n.className="i",!n.getAttribute("className")}),u.getElementsByTagName=c(function(n){return n.appendChild(r.createComment("")),!n.getElementsByTagName("*").length}),u.getElementsByClassName=st.test(r.getElementsByClassName)&&c(function(n){return n.innerHTML="<div class='a'><\/div><div class='a i'><\/div>",n.firstChild.className="i",2===n.getElementsByClassName("i").length}),u.getById=c(function(n){return l.appendChild(n).id=f,!r.getElementsByName||!r.getElementsByName(f).length}),u.getById?(t.find.ID=function(n,t){if(typeof t.getElementById!==ut&&a){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},t.filter.ID=function(n){var t=n.replace(k,d);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(k,d);return function(n){var i=typeof n.getAttributeNode!==ut&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=u.getElementsByTagName?function(n,t){if(typeof t.getElementsByTagName!==ut)return t.getElementsByTagName(n)}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=u.getElementsByClassName&&function(n,t){if(typeof t.getElementsByClassName!==ut&&a)return t.getElementsByClassName(n)},g=[],o=[],(u.qsa=st.test(r.querySelectorAll))&&(c(function(n){n.innerHTML="<select msallowclip=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowclip^='']").length&&o.push("[*^$]="+i+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+i+"*(?:value|"+kt+")");n.querySelectorAll(":checked").length||o.push(":checked")}),c(function(n){var t=r.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+i+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(u.matchesSelector=st.test(lt=l.matches||l.webkitMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector||l.msMatchesSelector))&&c(function(n){u.disconnectedMatch=lt.call(n,"div");lt.call(n,"[s!='']:x");g.push("!=",dt)}),o=o.length&&new RegExp(o.join("|")),g=g.length&&new RegExp(g.join("|")),v=st.test(l.compareDocumentPosition),ot=v||st.test(l.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},bt=v?function(n,t){if(n===t)return rt=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&i||!u.sortDetached&&t.compareDocumentPosition(n)===i?n===r||n.ownerDocument===s&&ot(s,n)?-1:t===r||t.ownerDocument===s&&ot(s,t)?1:y?nt.call(y,n)-nt.call(y,t):0:4&i?-1:1)}:function(n,t){if(n===t)return rt=!0,0;var i,u=0,o=n.parentNode,h=t.parentNode,f=[n],e=[t];if(!o||!h)return n===r?-1:t===r?1:o?-1:h?1:y?nt.call(y,n)-nt.call(y,t):0;if(o===h)return wi(n,t);for(i=n;i=i.parentNode;)f.unshift(i);for(i=t;i=i.parentNode;)e.unshift(i);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===s?-1:e[u]===s?1:0},r):e};r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){if((n.ownerDocument||n)!==e&&p(n),t=t.replace(rr,"='$1']"),!(!u.matchesSelector||!a||g&&g.test(t)||o&&o.test(t)))try{var i=lt.call(n,t);if(i||u.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(f){}return r(t,e,null,[n]).length>0};r.contains=function(n,t){return(n.ownerDocument||n)!==e&&p(n),ot(n,t)};r.attr=function(n,i){(n.ownerDocument||n)!==e&&p(n);var f=t.attrHandle[i.toLowerCase()],r=f&&di.call(t.attrHandle,i.toLowerCase())?f(n,i,!a):void 0;return void 0!==r?r:u.attributes||!a?n.getAttribute(i):(r=n.getAttributeNode(i))&&r.specified?r.value:null};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};r.uniqueSort=function(n){var r,f=[],t=0,i=0;if(rt=!u.detectDuplicates,y=!u.sortStable&&n.slice(0),n.sort(bt),rt){while(r=n[i++])r===n[i]&&(t=f.push(i));while(t--)n.splice(f[t],1)}return y=null,n};ht=r.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=ht(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=ht(r);return i};t=r.selectors={cacheLength:50,createPseudo:h,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(k,d),n[3]=(n[3]||n[4]||n[5]||"").replace(k,d),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||r.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&r.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return vt.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&ur.test(t)&&(i=et(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(k,d).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=hi[n+" "];return t||(t=new RegExp("(^|"+i+")"+n+"("+i+"|$)"))&&hi(n,function(n){return t.test("string"==typeof n.className&&n.className||typeof n.getAttribute!==ut&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),a=k[n]||[],y=a[0]===v&&a[1],l=a[0]===v&&a[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[v,y,l];break}}else if(d&&(a=(t[f]||(t[f]={}))[n])&&a[0]===v)l=a[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[v,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,u=t.pseudos[n]||t.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return u[f]?u(i):u.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?h(function(n,t){for(var r,f=u(n,i),e=f.length;e--;)r=nt.call(n,f[e]),n[r]=!(t[r]=f[e])}):function(n){return u(n,0,e)}):u}},pseudos:{not:h(function(n){var i=[],r=[],t=wt(n.replace(at,"$1"));return t[f]?h(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:h(function(n){return function(t){return r(n,t).length>0}}),contains:h(function(n){return function(t){return(t.textContent||t.innerText||ht(t)).indexOf(n)>-1}}),lang:h(function(n){return fr.test(n||"")||r.error("unsupported lang: "+n),n=n.replace(k,d).toLowerCase(),function(t){var i;do if(i=a?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===l},focus:function(n){return n===e.activeElement&&(!e.hasFocus||e.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return or.test(n.nodeName)},input:function(n){return er.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:tt(function(){return[0]}),last:tt(function(n,t){return[t-1]}),eq:tt(function(n,t,i){return[0>i?i+t:i]}),even:tt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:tt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:tt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:tt(function(n,t,i){for(var r=0>i?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(it in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[it]=cr(it);for(it in{submit:!0,reset:!0})t.pseudos[it]=lr(it);function bi(){}bi.prototype=t.filters=t.pseudos;t.setFilters=new bi;et=r.tokenize=function(n,i){var e,f,s,o,u,h,c,l=ci[n+" "];if(l)return i?0:l.slice(0);for(u=n,h=[],c=t.preFilter;u;){(!e||(f=tr.exec(u)))&&(f&&(u=u.slice(f[0].length)||u),h.push(s=[]));e=!1;(f=ir.exec(u))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),u=u.slice(e.length));for(o in t.filter)(f=vt[o].exec(u))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),u=u.slice(e.length));if(!e)break}return i?u.length:u?r.error(n):ci(n,h).slice(0)};function yt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ri(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=ki++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var s,h,c=[v,e];if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u){if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===v&&s[1]===e)return c[2]=s[2];if(h[r]=c,c[2]=n(t,i,o))return!0}}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function ar(n,t,i){for(var u=0,f=t.length;f>u;u++)r(n,t[u],i);return i}function pt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function fi(n,t,i,r,u,e){return r&&!r[f]&&(r=fi(r)),u&&!u[f]&&(u=fi(u,e)),h(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||ar(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:pt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=pt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=pt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function ei(n){for(var s,u,r,o=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ri(function(n){return n===s},c,!0),a=ri(function(n){return nt.call(s,n)>-1},c,!0),e=[function(n,t,i){return!h&&(i||t!==ct)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];o>i;i++)if(u=t.relative[n[i].type])e=[ri(ui(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;o>r;r++)if(t.relative[n[r].type])break;return fi(i>1&&ui(e),i>1&&yt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(at,"$1"),u,r>i&&ei(n.slice(i,r)),o>r&&ei(n=n.slice(r)),o>r&&yt(n))}e.push(u)}return ui(e)}function vr(n,i){var u=i.length>0,f=n.length>0,o=function(o,s,h,c,l){var y,d,w,k=0,a="0",g=o&&[],p=[],nt=ct,tt=o||f&&t.find.TAG("*",l),it=v+=null==nt?1:Math.random()||.1,rt=tt.length;for(l&&(ct=s!==e&&s);a!==rt&&null!=(y=tt[a]);a++){if(f&&y){for(d=0;w=n[d++];)if(w(y,s,h)){c.push(y);break}l&&(v=it)}u&&((y=!w&&y)&&k--,o&&g.push(y))}if(k+=a,u&&a!==k){for(d=0;w=i[d++];)w(g,p,s,h);if(o){if(k>0)while(a--)g[a]||p[a]||(p[a]=gi.call(c));p=pt(p)}b.apply(c,p);l&&!o&&p.length>0&&k+i.length>1&&r.uniqueSort(c)}return l&&(v=it,ct=nt),g};return u?h(o):o}return wt=r.compile=function(n,t){var r,u=[],e=[],i=li[n+" "];if(!i){for(t||(t=et(n)),r=t.length;r--;)i=ei(t[r]),i[f]?u.push(i):e.push(i);i=li(n,vr(e,u));i.selector=n}return i},si=r.select=function(n,i,r,f){var s,e,o,l,v,c="function"==typeof n&&n,h=!f&&et(n=c.selector||n);if(r=r||[],1===h.length){if(e=h[0]=h[0].slice(0),e.length>2&&"ID"===(o=e[0]).type&&u.getById&&9===i.nodeType&&a&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(k,d),i)||[])[0],!i)return r;c&&(i=i.parentNode);n=n.slice(e.shift().value.length)}for(s=vt.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[l=o.type])break;if((v=t.find[l])&&(f=v(o.matches[0].replace(k,d),gt.test(e[0].type)&&ii(i.parentNode)||i))){if(e.splice(s,1),n=f.length&&yt(e),!n)return b.apply(r,f),r;break}}}return(c||wt(n,h))(f,i,!a,r,gt.test(n)&&ii(i.parentNode)||i),r},u.sortStable=f.split("").sort(bt).join("")===f,u.detectDuplicates=!!rt,p(),u.sortDetached=c(function(n){return 1&n.compareDocumentPosition(e.createElement("div"))}),c(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ti("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),u.attributes&&c(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ti("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),c(function(n){return null==n.getAttribute("disabled")})||ti(kt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),r}(n);i.find=tt;i.expr=tt.selectors;i.expr[":"]=i.expr.pseudos;i.unique=tt.uniqueSort;i.text=tt.getText;i.isXMLDoc=tt.isXML;i.contains=tt.contains;var nr=i.expr.match.needsContext,tr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,yf=/^.[^:#\[\.,]*$/;function ii(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(yf.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;f>t;t++)if(i.contains(u[t],this))return!0}));for(t=0;f>t;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ii(this,n||[],!1))},not:function(n){return this.pushStack(ii(this,n||[],!0))},is:function(n){return!!ii(this,"string"==typeof n&&nr.test(n)?i(n):n||[],!1).length}});var ft,u=n.document,pf=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,wf=i.fn.init=function(n,t){var r,f;if(!n)return this;if("string"==typeof n){if(r="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:pf.exec(n),!r||!r[1]&&t)return!t||t.jquery?(t||ft).find(n):this.constructor(t).find(n);if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),tr.test(r[1])&&i.isPlainObject(t))for(r in t)i.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(f=u.getElementById(r[2]),f&&f.parentNode){if(f.id!==r[2])return ft.find(n);this.length=1;this[0]=f}return this.context=u,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?"undefined"!=typeof ft.ready?ft.ready(n):n(i):(void 0!==n.selector&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};wf.prototype=i.fn;ft=i(u);var bf=/^(?:parents|prev(?:Until|All))/,kf={children:!0,contents:!0,next:!0,prev:!0};i.extend({dir:function(n,t,r){for(var f=[],u=n[t];u&&9!==u.nodeType&&(void 0===r||1!==u.nodeType||!i(u).is(r));)1===u.nodeType&&f.push(u),u=u[t];return f},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});i.fn.extend({has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=nr.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.unique(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});function ir(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return ir(n,"nextSibling")},prev:function(n){return ir(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(kf[n]||(f=i.unique(f)),bf.test(n)&&(f=f.reverse())),this.pushStack(f)}});var h=/\S+/g,rr={};function df(n){var t=rr[n]={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}i.Callbacks=function(n){n="string"==typeof n?rr[n]||df(n):i.extend({},n);var o,u,h,f,e,c,t=[],r=!n.once&&[],l=function(i){for(u=n.memory&&i,h=!0,e=c||0,c=0,f=t.length,o=!0;t&&f>e;e++)if(t[e].apply(i[0],i[1])===!1&&n.stopOnFalse){u=!1;break}o=!1;t&&(r?r.length&&l(r.shift()):u?t=[]:s.disable())},s={add:function(){if(t){var r=t.length;!function e(r){i.each(r,function(r,u){var f=i.type(u);"function"===f?n.unique&&s.has(u)||t.push(u):u&&u.length&&"string"!==f&&e(u)})}(arguments);o?f=t.length:u&&(c=r,l(u))}return this},remove:function(){return t&&i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),o&&(f>=u&&f--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,t)>-1:!(!t||!t.length)},empty:function(){return t=[],f=0,this},disable:function(){return t=r=u=void 0,this},disabled:function(){return!t},lock:function(){return r=void 0,u||s.disable(),this},locked:function(){return!r},fireWith:function(n,i){return!t||h&&!r||(i=i||[],i=[n,i.slice?i.slice():i],o?r.push(i):l(i)),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});var lt;i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!u.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(lt.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready")))}}});function ur(){u.addEventListener?(u.removeEventListener("DOMContentLoaded",a,!1),n.removeEventListener("load",a,!1)):(u.detachEvent("onreadystatechange",a),n.detachEvent("onload",a))}function a(){(u.addEventListener||"load"===event.type||"complete"===u.readyState)&&(ur(),i.ready())}i.ready.promise=function(t){if(!lt)if(lt=i.Deferred(),"complete"===u.readyState)setTimeout(i.ready);else if(u.addEventListener)u.addEventListener("DOMContentLoaded",a,!1),n.addEventListener("load",a,!1);else{u.attachEvent("onreadystatechange",a);n.attachEvent("onload",a);var r=!1;try{r=null==n.frameElement&&u.documentElement}catch(e){}r&&r.doScroll&&!function f(){if(!i.isReady){try{r.doScroll("left")}catch(n){return setTimeout(f,50)}ur();i.ready()}}()}return lt.promise(t)};var s="undefined";for(var gf in i(r))break;r.ownLast="0"!==gf;r.inlineBlockNeedsLayout=!1;i(function(){var f,t,n,i;n=u.getElementsByTagName("body")[0];n&&n.style&&(t=u.createElement("div"),i=u.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==s&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",r.inlineBlockNeedsLayout=f=3===t.offsetWidth,f&&(n.style.zoom=1)),n.removeChild(i))}),function(){var n=u.createElement("div");if(null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(t){r.deleteExpando=!1}}n=null}();i.acceptData=function(n){var t=i.noData[(n.nodeName+" ").toLowerCase()],r=+n.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&n.getAttribute("classid")===t};var ne=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/([A-Z])/g;function fr(n,t,r){if(void 0===r&&1===n.nodeType){var u="data-"+t.replace(te,"-$1").toLowerCase();if(r=n.getAttribute(u),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ne.test(r)?i.parseJSON(r):r}catch(f){}i.data(n,t,r)}else r=void 0}return r}function ri(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function er(n,t,r,u){if(i.acceptData(n)){var s,e,h=i.expando,l=n.nodeType,o=l?i.cache:n,f=l?n[h]:n[h]&&h;if(f&&o[f]&&(u||o[f].data)||void 0!==r||"string"!=typeof t)return f||(f=l?n[h]=c.pop()||i.guid++:h),o[f]||(o[f]=l?{}:{toJSON:i.noop}),("object"==typeof t||"function"==typeof t)&&(u?o[f]=i.extend(o[f],t):o[f].data=i.extend(o[f].data,t)),e=o[f],u||(e.data||(e.data={}),e=e.data),void 0!==r&&(e[i.camelCase(t)]=r),"string"==typeof t?(s=e[t],null==s&&(s=e[i.camelCase(t)])):s=e,s}}function or(n,t,u){if(i.acceptData(n)){var o,s,h=n.nodeType,f=h?i.cache:n,e=h?n[i.expando]:i.expando;if(f[e]){if(t&&(o=u?f[e]:f[e].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in o)?t=[t]:(t=i.camelCase(t),t=(t in o)?[t]:t.split(" ")),s=t.length;s--;)delete o[t[s]];if(u?!ri(o):!i.isEmptyObject(o))return}(u||(delete f[e].data,ri(f[e])))&&(h?i.cleanData([n],!0):r.deleteExpando||f!=f.window?delete f[e]:f[e]=null)}}}i.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ri(n)},data:function(n,t,i){return er(n,t,i)},removeData:function(n,t){return or(n,t)},_data:function(n,t,i){return er(n,t,i,!0)},_removeData:function(n,t){return or(n,t,!0)}});i.fn.extend({data:function(n,t){var f,u,e,r=this[0],o=r&&r.attributes;if(void 0===n){if(this.length&&(e=i.data(r),1===r.nodeType&&!i._data(r,"parsedAttrs"))){for(f=o.length;f--;)o[f]&&(u=o[f].name,0===u.indexOf("data-")&&(u=i.camelCase(u.slice(5)),fr(r,u,e[u])));i._data(r,"parsedAttrs",!0)}return e}return"object"==typeof n?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,t)}):r?fr(r,n,i.data(r,n)):void 0},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return(t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[])},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var r,f=1,e=i.Deferred(),u=this,o=this.length,s=function(){--f||e.resolveWith(u,[u])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";o--;)r=i._data(u[o],n+"queueHooks"),r&&r.empty&&(f++,r.empty.add(s));return s(),e.promise(t)}});var at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,p=["Top","Right","Bottom","Left"],et=function(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)},w=i.access=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)i.access(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;c>s;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e},ui=/^(?:checkbox|radio)$/i;!function(){var t=u.createElement("input"),n=u.createElement("div"),i=u.createDocumentFragment();if(n.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",r.leadingWhitespace=3===n.firstChild.nodeType,r.tbody=!n.getElementsByTagName("tbody").length,r.htmlSerialize=!!n.getElementsByTagName("link").length,r.html5Clone="<:nav><\/:nav>"!==u.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,i.appendChild(t),r.appendChecked=t.checked,n.innerHTML="<textarea>x<\/textarea>",r.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue,i.appendChild(n),n.innerHTML="<input type='radio' checked='checked' name='t'/>",r.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,r.noCloneEvent=!0,n.attachEvent&&(n.attachEvent("onclick",function(){r.noCloneEvent=!1}),n.cloneNode(!0).click()),null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(f){r.deleteExpando=!1}}}(),function(){var t,i,f=u.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})i="on"+t,(r[t+"Bubbles"]=i in n)||(f.setAttribute(i,"t"),r[t+"Bubbles"]=f.attributes[i].expando===!1);f=null}();var fi=/^(?:input|select|textarea)$/i,ie=/^key/,re=/^(?:mouse|pointer|contextmenu)|click/,sr=/^(?:focusinfocus|focusoutblur)$/,hr=/^([^.]*)(?:\.(.+)|)$/;function vt(){return!0}function it(){return!1}function cr(){try{return u.activeElement}catch(n){}}i.event={global:{},add:function(n,t,r,u,f){var w,y,b,p,o,c,l,a,e,k,d,v=i._data(n);if(v){for(r.handler&&(p=r,r=p.handler,f=p.selector),r.guid||(r.guid=i.guid++),(y=v.events)||(y=v.events={}),(c=v.handle)||(c=v.handle=function(n){if(typeof i!==s&&(!n||i.event.triggered!==n.type))return i.event.dispatch.apply(c.elem,arguments)},c.elem=n),t=(t||"").match(h)||[""],b=t.length;b--;)w=hr.exec(t[b])||[],e=d=w[1],k=(w[2]||"").split(".").sort(),e&&(o=i.event.special[e]||{},e=(f?o.delegateType:o.bindType)||e,o=i.event.special[e]||{},l=i.extend({type:e,origType:d,data:u,handler:r,guid:r.guid,selector:f,needsContext:f&&i.expr.match.needsContext.test(f),namespace:k.join(".")},p),(a=y[e])||(a=y[e]=[],a.delegateCount=0,o.setup&&o.setup.call(n,u,k,c)!==!1||(n.addEventListener?n.addEventListener(e,c,!1):n.attachEvent&&n.attachEvent("on"+e,c))),o.add&&(o.add.call(n,l),l.handler.guid||(l.handler.guid=r.guid)),f?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[e]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,s,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;)if(s=hr.exec(t[p])||[],e=k=s[1],w=(s[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],s=s[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||s&&!s.test(o.namespace)||u&&u!==o.selector&&("**"!==u||!o.selector)||(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(t,r,f,e){var l,a,o,p,c,h,w,y=[f||u],s=nt.call(t,"type")?t.type:t,v=nt.call(t,"namespace")?t.namespace.split("."):[];if(o=h=f=f||u,3!==f.nodeType&&8!==f.nodeType&&!sr.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(v=s.split("."),s=v.shift(),v.sort()),a=s.indexOf(":")<0&&"on"+s,t=t[i.expando]?t:new i.Event(s,"object"==typeof t&&t),t.isTrigger=e?2:3,t.namespace=v.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=f),r=null==r?[t]:i.makeArray(r,[t]),c=i.event.special[s]||{},e||!c.trigger||c.trigger.apply(f,r)!==!1)){if(!e&&!c.noBubble&&!i.isWindow(f)){for(p=c.delegateType||s,sr.test(p+s)||(o=o.parentNode);o;o=o.parentNode)y.push(o),h=o;h===(f.ownerDocument||u)&&y.push(h.defaultView||h.parentWindow||n)}for(w=0;(o=y[w++])&&!t.isPropagationStopped();)t.type=w>1?p:c.bindType||s,l=(i._data(o,"events")||{})[t.type]&&i._data(o,"handle"),l&&l.apply(o,r),l=a&&o[a],l&&l.apply&&i.acceptData(o)&&(t.result=l.apply(o,r),t.result===!1&&t.preventDefault());if(t.type=s,!e&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(y.pop(),r)===!1)&&i.acceptData(f)&&a&&f[s]&&!i.isWindow(f)){h=f[a];h&&(f[a]=null);i.event.triggered=s;try{f[s]()}catch(b){}i.event.triggered=void 0;h&&(f[a]=h)}return t.result}},dispatch:function(n){n=i.event.fix(n);var e,f,t,r,o,s=[],h=l.call(arguments),c=(i._data(this,"events")||{})[n.type]||[],u=i.event.special[n.type]||{};if(h[0]=n,n.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,n)!==!1){for(s=i.event.handlers.call(this,n,c),e=0;(r=s[e++])&&!n.isPropagationStopped();)for(n.currentTarget=r.elem,o=0;(t=r.handlers[o++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(t.namespace))&&(n.handleObj=t,n.data=t.data,f=((i.event.special[t.origType]||{}).handle||t.handler).apply(r.elem,h),void 0!==f&&(n.result=f)===!1&&(n.preventDefault(),n.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,n),n.result}},handlers:function(n,t){var f,e,u,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(!n.button||"click"!==n.type))for(;r!=this;r=r.parentNode||this)if(1===r.nodeType&&(r.disabled!==!0||"click"!==n.type)){for(u=[],o=0;s>o;o++)e=t[o],f=e.selector+" ",void 0===u[f]&&(u[f]=e.needsContext?i(f,this).index(r)>=0:i.find(f,this,null,[r]).length),u[f]&&u.push(e);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},fix:function(n){if(n[i.expando])return n;var e,o,s,r=n.type,f=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=re.test(r)?this.mouseHooks:ie.test(r)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||u),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var i,e,r,f=t.button,o=t.fromElement;return null==n.pageX&&null!=t.clientX&&(e=n.target.ownerDocument||u,r=e.documentElement,i=e.body,n.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),n.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!n.relatedTarget&&o&&(n.relatedTarget=o===n.target?t.toElement:o),n.which||void 0===f||(n.which=1&f?1:2&f?3:4&f?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===cr()&&this.blur)return(this.blur(),!1)},delegateType:"focusout"},click:{trigger:function(){if(i.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return(this.click(),!1)},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=u.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===s&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&n.returnValue===!1?vt:it):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={isDefaultPrevented:it,isPropagationStopped:it,isImmediatePropagationStopped:it,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=vt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=vt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=vt;n&&n.stopImmediatePropagation&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});r.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:void i.event.add(this,"click._submit keypress._submit",function(n){var r=n.target,t=i.nodeName(r,"input")||i.nodeName(r,"button")?r.form:void 0;t&&!i._data(t,"submitBubbles")&&(i.event.add(t,"submit._submit",function(n){n._submit_bubble=!0}),i._data(t,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:void i.event.remove(this,"._submit")}});r.changeBubbles||(i.event.special.change={setup:function(){return fi.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1):void i.event.add(this,"beforeactivate._change",function(n){var t=n.target;fi.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!fi.test(this.nodeName)}});r.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var r=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){var u=this.ownerDocument||this,f=i._data(u,t);f||u.addEventListener(n,r,!0);i._data(u,t,(f||0)+1)},teardown:function(){var u=this.ownerDocument||this,f=i._data(u,t)-1;f?i._data(u,t,f):(u.removeEventListener(n,r,!0),i._removeData(u,t))}}});i.fn.extend({on:function(n,t,r,u,f){var o,e;if("object"==typeof n){"string"!=typeof t&&(r=r||t,t=void 0);for(o in n)this.on(o,t,r,n[o],f);return this}if(null==r&&null==u?(u=t,r=t=void 0):null==u&&("string"==typeof t?(u=r,r=void 0):(u=r,r=t,t=void 0)),u===!1)u=it;else if(!u)return this;return 1===f&&(e=u,u=function(n){return i().off(n),e.apply(this,arguments)},u.guid=e.guid||(e.guid=i.guid++)),this.each(function(){i.event.add(this,n,u,r,t)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=it),this.each(function(){i.event.remove(this,n,r,t)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});function lr(n){var i=ar.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}var ar="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ue=/ jQuery\d+="(?:null|\d+)"/g,vr=new RegExp("<(?:"+ar+")[\\s/>]","i"),ei=/^\s+/,yr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,pr=/<([\w:]+)/,wr=/<tbody/i,fe=/<|&#?\w+;/,ee=/<(?:script|style|link)/i,oe=/checked\s*(?:[^=]|=\s*.checked.)/i,br=/^$|\/(?:java|ecma)script/i,se=/^true\/(.*)/,he=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,o={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:r.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},ce=lr(u),oi=ce.appendChild(u.createElement("div"));o.optgroup=o.option;o.tbody=o.tfoot=o.colgroup=o.caption=o.thead;o.th=o.td;function f(n,t){var e,u,o=0,r=typeof n.getElementsByTagName!==s?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!==s?n.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],e=n.childNodes||n;null!=(u=e[o]);o++)!t||i.nodeName(u,t)?r.push(u):i.merge(r,f(u,t));return void 0===t||t&&i.nodeName(n,t)?i.merge([n],r):r}function le(n){ui.test(n.type)&&(n.defaultChecked=n.checked)}function kr(n,t){return i.nodeName(n,"table")&&i.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function dr(n){return n.type=(null!==i.find.attr(n,"type"))+"/"+n.type,n}function gr(n){var t=se.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function si(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function nu(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function ae(n,t){var u,e,f;if(1===t.nodeType){if(u=t.nodeName.toLowerCase(),!r.noCloneEvent&&t[i.expando]){f=i._data(t);for(e in f.events)i.removeEvent(t,e,f.handle);t.removeAttribute(i.expando)}"script"===u&&t.text!==n.text?(dr(t).text=n.text,gr(t)):"object"===u?(t.parentNode&&(t.outerHTML=n.outerHTML),r.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===u&&ui.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===u?t.defaultSelected=t.selected=n.defaultSelected:("input"===u||"textarea"===u)&&(t.defaultValue=n.defaultValue)}}i.extend({clone:function(n,t,u){var e,c,s,o,h,l=i.contains(n.ownerDocument,n);if(r.html5Clone||i.isXMLDoc(n)||!vr.test("<"+n.nodeName+">")?s=n.cloneNode(!0):(oi.innerHTML=n.outerHTML,oi.removeChild(s=oi.firstChild)),!(r.noCloneEvent&&r.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=f(s),h=f(n),o=0;null!=(c=h[o]);++o)e[o]&&ae(c,e[o]);if(t)if(u)for(h=h||f(n),e=e||f(s),o=0;null!=(c=h[o]);o++)nu(c,e[o]);else nu(n,s);return e=f(s,"script"),e.length>0&&si(e,!l&&f(n,"script")),e=h=c=null,s},buildFragment:function(n,t,u,e){for(var c,s,b,h,p,w,a,k=n.length,v=lr(t),l=[],y=0;k>y;y++)if(s=n[y],s||0===s)if("object"===i.type(s))i.merge(l,s.nodeType?[s]:s);else if(fe.test(s)){for(h=h||v.appendChild(t.createElement("div")),p=(pr.exec(s)||["",""])[1].toLowerCase(),a=o[p]||o._default,h.innerHTML=a[1]+s.replace(yr,"<$1><\/$2>")+a[2],c=a[0];c--;)h=h.lastChild;if(!r.leadingWhitespace&&ei.test(s)&&l.push(t.createTextNode(ei.exec(s)[0])),!r.tbody)for(s="table"!==p||wr.test(s)?"<table>"!==a[1]||wr.test(s)?0:h:h.firstChild,c=s&&s.childNodes.length;c--;)i.nodeName(w=s.childNodes[c],"tbody")&&!w.childNodes.length&&s.removeChild(w);for(i.merge(l,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=v.lastChild}else l.push(t.createTextNode(s));for(h&&v.removeChild(h),r.appendChecked||i.grep(f(l,"input"),le),y=0;s=l[y++];)if((!e||-1===i.inArray(s,e))&&(b=i.contains(s.ownerDocument,s),h=f(v.appendChild(s),"script"),b&&si(h),u))for(c=0;s=h[c++];)br.test(s.type||"")&&u.push(s);return h=null,v},cleanData:function(n,t){for(var u,e,f,o,a=0,h=i.expando,l=i.cache,v=r.deleteExpando,y=i.event.special;null!=(u=n[a]);a++)if((t||i.acceptData(u))&&(f=u[h],o=f&&l[f])){if(o.events)for(e in o.events)y[e]?i.event.remove(u,e):i.removeEvent(u,e,o.handle);l[f]&&(delete l[f],v?delete u[h]:typeof u.removeAttribute!==s?u.removeAttribute(h):u[h]=null,c.push(f))}}});i.fn.extend({text:function(n){return w(this,function(n){return void 0===n?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=kr(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=kr(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,u=0;null!=(r=e[u]);u++)t||1!==r.nodeType||i.cleanData(f(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&si(f(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(f(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return w(this,function(n){var t=this[0]||{},u=0,e=this.length;if(void 0===n)return 1===t.nodeType?t.innerHTML.replace(ue,""):void 0;if(!("string"!=typeof n||ee.test(n)||!r.htmlSerialize&&vr.test(n)||!r.leadingWhitespace&&ei.test(n)||o[(pr.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(yr,"<$1><\/$2>");try{for(;e>u;u++)t=this[u]||{},1===t.nodeType&&(i.cleanData(f(t,!1)),t.innerHTML=n);t=0}catch(s){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=arguments[0];return this.domManip(arguments,function(t){n=this.parentNode;i.cleanData(f(this));n&&n.replaceChild(t,this)}),n&&(n.length||n.nodeType)?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t){n=ki.apply([],n);var h,u,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||l>1&&"string"==typeof a&&!r.checkClone&&oe.test(a))return this.each(function(i){var r=p.eq(i);y&&(n[0]=a.call(this,i,r.html()));r.domManip(n,t)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),h=s.firstChild,1===s.childNodes.length&&(s=h),h)){for(o=i.map(f(s,"script"),dr),c=o.length;l>e;e++)u=s,e!==w&&(u=i.clone(u,!0,!0),c&&i.merge(o,f(u,"script"))),t.call(this[e],u,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,gr),e=0;c>e;e++)u=o[e],br.test(u.type||"")&&!i._data(u,"globalEval")&&i.contains(v,u)&&(u.src?i._evalUrl&&i._evalUrl(u.src):i.globalEval((u.text||u.textContent||u.innerHTML||"").replace(he,"")));s=h=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ni.apply(f,u.get());return this.pushStack(f)}});var ot,tu={};function iu(t,r){var f,u=i(r.createElement(t)).appendTo(r.body),e=n.getDefaultComputedStyle&&(f=n.getDefaultComputedStyle(u[0]))?f.display:i.css(u[0],"display");return u.detach(),e}function yt(n){var r=u,t=tu[n];return t||(t=iu(n,r),"none"!==t&&t||(ot=(ot||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=(ot[0].contentWindow||ot[0].contentDocument).document,r.write(),r.close(),t=iu(n,r),ot.detach()),tu[n]=t),t}!function(){var n;r.shrinkWrapBlocks=function(){if(null!=n)return n;n=!1;var t,i,r;return i=u.getElementsByTagName("body")[0],i&&i.style?(t=u.createElement("div"),r=u.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(r).appendChild(t),typeof t.style.zoom!==s&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(u.createElement("div")).style.width="5px",n=3!==t.offsetWidth),i.removeChild(r),n):void 0}}();var ru=/^margin/,pt=new RegExp("^("+at+")(?!px)[a-z%]+$","i"),b,k,ve=/^(top|right|bottom|left)$/;n.getComputedStyle?(b=function(n){return n.ownerDocument.defaultView.getComputedStyle(n,null)},k=function(n,t,r){var e,o,s,u,f=n.style;return r=r||b(n),u=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),pt.test(u)&&ru.test(t)&&(e=f.width,o=f.minWidth,s=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=r.width,f.width=e,f.minWidth=o,f.maxWidth=s)),void 0===u?u:u+""}):u.documentElement.currentStyle&&(b=function(n){return n.currentStyle},k=function(n,t,i){var o,f,e,r,u=n.style;return i=i||b(n),r=i?i[t]:void 0,null==r&&u&&u[t]&&(r=u[t]),pt.test(r)&&!ve.test(t)&&(o=u.left,f=n.runtimeStyle,e=f&&f.left,e&&(f.left=n.currentStyle.left),u.left="fontSize"===t?"1em":r,r=u.pixelLeft+"px",u.left=o,e&&(f.left=e)),void 0===r?r:r+""||"auto"});function uu(n,t){return{get:function(){var i=n();if(null!=i)return i?void delete this.get:(this.get=t).apply(this,arguments)}}}!function(){var f,t,l,o,s,e,h;if(f=u.createElement("div"),f.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",l=f.getElementsByTagName("a")[0],t=l&&l.style){t.cssText="float:left;opacity:.5";r.opacity="0.5"===t.opacity;r.cssFloat=!!t.cssFloat;f.style.backgroundClip="content-box";f.cloneNode(!0).style.backgroundClip="";r.clearCloneStyle="content-box"===f.style.backgroundClip;r.boxSizing=""===t.boxSizing||""===t.MozBoxSizing||""===t.WebkitBoxSizing;i.extend(r,{reliableHiddenOffsets:function(){return null==e&&c(),e},boxSizingReliable:function(){return null==s&&c(),s},pixelPosition:function(){return null==o&&c(),o},reliableMarginRight:function(){return null==h&&c(),h}});function c(){var i,r,f,t;r=u.getElementsByTagName("body")[0];r&&r.style&&(i=u.createElement("div"),f=u.createElement("div"),f.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(f).appendChild(i),i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,h=!0,n.getComputedStyle&&(o="1%"!==(n.getComputedStyle(i,null)||{}).top,s="4px"===(n.getComputedStyle(i,null)||{width:"4px"}).width,t=i.appendChild(u.createElement("div")),t.style.cssText=i.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",i.style.width="1px",h=!parseFloat((n.getComputedStyle(t,null)||{}).marginRight)),i.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",t=i.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",e=0===t[0].offsetHeight,e&&(t[0].style.display="",t[1].style.display="none",e=0===t[0].offsetHeight),r.removeChild(f))}}}();i.swap=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};var hi=/alpha\([^)]*\)/i,ye=/opacity\s*=\s*([^)]*)/,pe=/^(none|table(?!-c[ea]).+)/,we=new RegExp("^("+at+")(.*)$","i"),be=new RegExp("^([+-])=("+at+")","i"),ke={position:"absolute",visibility:"hidden",display:"block"},fu={letterSpacing:"0",fontWeight:"400"},eu=["Webkit","O","Moz","ms"];function ou(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=eu.length;i--;)if(t=eu[i]+r,t in n)return t;return u}function su(n,t){for(var f,r,o,e=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||"none"!==f||(r.style.display=""),""===r.style.display&&et(r)&&(e[u]=i._data(r,"olddisplay",yt(r.nodeName)))):(o=et(r),(f&&"none"!==f||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?e[u]||"":"none"));return n}function hu(n,t,i){var r=we.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function cu(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+p[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+p[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+p[e]+"Width",!0,f))):(o+=i.css(n,"padding"+p[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+p[e]+"Width",!0,f)));return o}function lu(n,t,u){var o=!0,f="width"===t?n.offsetWidth:n.offsetHeight,e=b(n),s=r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e);if(0>=f||null==f){if(f=k(n,t,e),(0>f||null==f)&&(f=n.style[t]),pt.test(f))return f;o=s&&(r.boxSizingReliable()||f===n.style[t]);f=parseFloat(f)||0}return f+cu(n,t,u||(s?"border":"content"),o,e)+"px"}i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=k(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:r.cssFloat?"cssFloat":"styleFloat"},style:function(n,t,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,h,e,s=i.camelCase(t),c=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=ou(c,s)),e=i.cssHooks[t]||i.cssHooks[s],void 0===u)return e&&"get"in e&&void 0!==(o=e.get(n,!1,f))?o:c[t];if(h=typeof u,"string"===h&&(o=be.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,t)),h="number"),null!=u&&u===u&&("number"!==h||i.cssNumber[s]||(u+="px"),r.clearCloneStyle||""!==u||0!==t.indexOf("background")||(c[t]="inherit"),!(e&&"set"in e&&void 0===(u=e.set(n,u,f)))))try{c[t]=u}catch(l){}}},css:function(n,t,r,u){var s,f,e,o=i.camelCase(t);return t=i.cssProps[o]||(i.cssProps[o]=ou(n.style,o)),e=i.cssHooks[t]||i.cssHooks[o],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=k(n,t,u)),"normal"===f&&t in fu&&(f=fu[t]),""===r||r?(s=parseFloat(f),r===!0||i.isNumeric(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return pe.test(i.css(n,"display"))&&0===n.offsetWidth?i.swap(n,ke,function(){return lu(n,t,u)}):lu(n,t,u)},set:function(n,u,f){var e=f&&b(n);return hu(n,u,f?cu(n,t,f,r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e),e):0)}}});r.opacity||(i.cssHooks.opacity={get:function(n,t){return ye.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(hi,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=hi.test(f)?f.replace(hi,e):f+" "+e)}});i.cssHooks.marginRight=uu(r.reliableMarginRight,function(n,t){if(t)return i.swap(n,{display:"inline-block"},k,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+p[r]+t]=u[r]||u[r-2]||u[0];return f}};ru.test(n)||(i.cssHooks[n+t].set=hu)});i.fn.extend({css:function(n,t){return w(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=b(n),e=t.length;e>u;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return su(this,!0)},hide:function(){return su(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){et(this)?i(this).show():i(this).hide()})}});function e(n,t,i,r,u){return new e.prototype.init(n,t,i,r,u)}i.Tween=e;e.prototype={constructor:e,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=e.propHooks[this.prop];return n&&n.get?n.get(this):e.propHooks._default.get(this)},run:function(n){var r,t=e.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):e.propHooks._default.set(this),this}};e.prototype.init.prototype=e.prototype;e.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};e.propHooks.scrollTop=e.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.fx=e.prototype.init;i.fx.step={};var rt,wt,de=/^(?:toggle|show|hide)$/,au=new RegExp("^(?:([+-])=|)("+at+")([a-z%]*)$","i"),ge=/queueHooks$/,bt=[no],st={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=au.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&au.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3];r=r||[];u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};function vu(){return setTimeout(function(){rt=void 0}),rt=i.now()}function kt(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=p[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function yu(n,t,i){for(var u,f=(st[t]||[]).concat(st["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function no(n,t,u){var f,a,p,v,s,w,h,b,l=this,y={},o=n.style,c=n.nodeType&&et(n),e=i._data(n,"fxshow");u.queue||(s=i._queueHooks(n,"fx"),null==s.unqueued&&(s.unqueued=0,w=s.empty.fire,s.empty.fire=function(){s.unqueued||w()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--;i.queue(n,"fx").length||s.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(u.overflow=[o.overflow,o.overflowX,o.overflowY],h=i.css(n,"display"),b="none"===h?i._data(n,"olddisplay")||yt(n.nodeName):h,"inline"===b&&"none"===i.css(n,"float")&&(r.inlineBlockNeedsLayout&&"inline"!==yt(n.nodeName)?o.zoom=1:o.display="inline-block"));u.overflow&&(o.overflow="hidden",r.shrinkWrapBlocks()||l.always(function(){o.overflow=u.overflow[0];o.overflowX=u.overflow[1];o.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],de.exec(a)){if(delete t[f],p=p||"toggle"===a,a===(c?"hide":"show")){if("show"!==a||!e||void 0===e[f])continue;c=!0}y[f]=e&&e[f]||i.style(n,f)}else h=void 0;if(i.isEmptyObject(y))"inline"===("none"===h?yt(n.nodeName):h)&&(o.display=h);else{e?"hidden"in e&&(c=e.hidden):e=i._data(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;i._removeData(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=yu(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start="width"===f||"height"===f?1:0))}}function to(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function pu(n,t,r){var h,e,o=0,l=bt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=rt||vu(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:rt||vu(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(to(s,u.opts.specialEasing);l>o;o++)if(h=bt[o].call(u,n,s,u.opts))return h;return i.map(s,yu,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}i.Animation=i.extend(pu,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],st[r]=st[r]||[],st[r].unshift(t)},prefilter:function(n,t){t?bt.unshift(n):bt.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(et).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=pu(this,i.extend({},n),e);(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,t,r){var u=function(n){var t=n.stop;delete n.stop;t(r)};return"string"!=typeof n&&(r=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,f=i._data(this);if(t)f[t]&&f[t].stop&&u(f[t]);else for(t in f)f[t]&&f[t].stop&&ge.test(t)&&u(f[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(r),o=!1,e.splice(t,1));(o||!r)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(kt(t,!0),n,i,u)}});i.each({slideDown:kt("show"),slideUp:kt("hide"),slideToggle:kt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=i.timers,t=0;for(rt=i.now();t<n.length;t++)r=n[t],r()||n[t]!==r||n.splice(t--,1);n.length||i.fx.stop();rt=void 0};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){wt||(wt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(wt);wt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},function(){var n,t,f,i,e;t=u.createElement("div");t.setAttribute("className","t");t.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";i=t.getElementsByTagName("a")[0];f=u.createElement("select");e=f.appendChild(u.createElement("option"));n=t.getElementsByTagName("input")[0];i.style.cssText="top:1px";r.getSetAttribute="t"!==t.className;r.style=/top/.test(i.getAttribute("style"));r.hrefNormalized="/a"===i.getAttribute("href");r.checkOn=!!n.value;r.optSelected=e.selected;r.enctype=!!u.createElement("form").enctype;f.disabled=!0;r.optDisabled=!e.disabled;n=u.createElement("input");n.setAttribute("value","");r.input=""===n.getAttribute("value");n.value="t";n.setAttribute("type","radio");r.radioValue="t"===n.value}();var io=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":i.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(io,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:i.trim(i.text(n))}},select:{get:function(n){for(var o,t,s=n.options,u=n.selectedIndex,f="select-one"===n.type||0>u,h=f?null:[],c=f?u+1:s.length,e=0>u?c:f?u:0;c>e;e++)if(t=s[e],!(!t.selected&&e!==u||(r.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),f)return o;h.push(o)}return h},set:function(n,t){for(var f,r,u=n.options,o=i.makeArray(t),e=u.length;e--;)if(r=u[e],i.inArray(i.valHooks.option.get(r),o)>=0)try{r.selected=f=!0}catch(s){r.scrollHeight}else r.selected=!1;return f||(n.selectedIndex=-1),u}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};r.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});var ut,wu,v=i.expr.attrHandle,ci=/^(?:checked|selected)$/i,d=r.getSetAttribute,dt=r.input;i.fn.extend({attr:function(n,t){return w(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return typeof n.getAttribute===s?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(t=t.toLowerCase(),u=i.attrHooks[t]||(i.expr.match.bool.test(t)?wu:ut)),void 0===r?u&&"get"in u&&null!==(f=u.get(n,t))?f:(f=i.find.attr(n,t),null==f?void 0:f):null!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):void i.removeAttr(n,t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?dt&&d||!ci.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(d?r:u)},attrHooks:{type:{set:function(n,t){if(!r.radioValue&&"radio"===t&&i.nodeName(n,"input")){var u=n.value;return n.setAttribute("type",t),u&&(n.value=u),t}}}}});wu={set:function(n,t,r){return t===!1?i.removeAttr(n,r):dt&&d||!ci.test(r)?n.setAttribute(!d&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=v[t]||i.find.attr;v[t]=dt&&d||!ci.test(t)?function(n,t,i){var u,f;return i||(f=v[t],v[t]=u,u=null!=r(n,t,i)?t.toLowerCase():null,v[t]=f),u}:function(n,t,r){if(!r)return n[i.camelCase("default-"+t)]?t.toLowerCase():null}});dt&&d||(i.attrHooks.value={set:function(n,t,r){return i.nodeName(n,"input")?void(n.defaultValue=t):ut&&ut.set(n,t,r)}});d||(ut={set:function(n,t,i){var r=n.getAttributeNode(i);return r||n.setAttributeNode(r=n.ownerDocument.createAttribute(i)),r.value=t+="","value"===i||t===n.getAttribute(i)?t:void 0}},v.id=v.name=v.coords=function(n,t,i){var r;if(!i)return(r=n.getAttributeNode(t))&&""!==r.value?r.value:null},i.valHooks.button={get:function(n,t){var i=n.getAttributeNode(t);if(i&&i.specified)return i.value},set:ut.set},i.attrHooks.contenteditable={set:function(n,t,i){ut.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]={set:function(n,i){if(""===i)return(n.setAttribute(t,"auto"),i)}}}));r.style||(i.attrHooks.style={get:function(n){return n.style.cssText||void 0},set:function(n,t){return n.style.cssText=t+""}});var ro=/^(?:input|select|textarea|button|object)$/i,uo=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return w(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=void 0;delete this[n]}catch(t){}})}});i.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(n,t,r){var f,u,o,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return o=1!==e||!i.isXMLDoc(n),o&&(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ro.test(n.nodeName)||uo.test(n.nodeName)&&n.href?0:-1}}}});r.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}});r.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});r.enctype||(i.propFix.enctype="encoding");var li=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(li," "):" ")){for(s=0;u=o[s++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");f=i.trim(r);t.className!==f&&(t.className=f)}return this},removeClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(li," "):"")){for(s=0;u=o[s++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");f=n?i.trim(r):"";t.className!==f&&(t.className=f)}return this},toggleClass:function(n,t){var r=typeof n;return"boolean"==typeof t&&"string"===r?t?this.addClass(n):this.removeClass(n):this.each(i.isFunction(n)?function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,f=0,u=i(this),e=n.match(h)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===s||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(li," ").indexOf(i)>=0)return!0;return!1}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});var ai=i.now(),vi=/\?/,fo=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;i.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var f,r=null,u=i.trim(t+"");return u&&!i.trim(u.replace(fo,function(n,t,i,u){return f&&t&&(r=0),0===r?n:(f=i||t,r+=!u-!i,"")}))?Function("return "+u)():i.error("Invalid JSON: "+t)};i.parseXML=function(t){var r,u;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(u=new DOMParser,r=u.parseFromString(t,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t))}catch(f){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var g,y,eo=/#.*$/,bu=/([?&])_=[^&]*/,oo=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,so=/^(?:GET|HEAD)$/,ho=/^\/\//,ku=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,du={},yi={},gu="*/".concat("*");try{y=location.href}catch(ns){y=u.createElement("a");y.href="";y=y.href}g=ku.exec(y.toLowerCase())||[];function nf(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])"+"===u.charAt(0)?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function tf(n,t,r,u){var f={},o=n===yi;function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}return e(t.dataTypes[0])||!f["*"]&&e("*")}function pi(n,t){var u,r,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function co(n,t,i){for(var o,e,u,f,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(f in s)if(s[f]&&s[f].test(e)){r.unshift(f);break}if(r[0]in i)u=r[0];else{for(f in i){if(!r[0]||n.converters[f+" "+r[0]]){u=f;break}o||(o=f)}u=u||o}if(u)return(u!==r[0]&&r.unshift(u),i[u])}function lo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:y,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(g[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":gu,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?pi(pi(n,i.ajaxSettings),t):pi(i.ajaxSettings,n)},ajaxPrefilter:nf(du),ajaxTransport:nf(yi),ajax:function(n,t){"object"==typeof n&&(t=n,n=void 0);t=t||{};var s,c,f,b,k,l,a,v,r=i.ajaxSetup({},t),o=r.context||r,d=r.context&&(o.nodeType||o.jquery)?i(o):i.event,nt=i.Deferred(),tt=i.Callbacks("once memory"),p=r.statusCode||{},it={},rt={},e=0,ut="canceled",u={readyState:0,getResponseHeader:function(n){var t;if(2===e){if(!v)for(v={};t=oo.exec(b);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===e?b:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return e||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return e||(r.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>e)for(t in n)p[t]=[p[t],n[t]];else u.always(n[u.status]);return this},abort:function(n){var t=n||ut;return a&&a.abort(t),w(0,t),this}};if(nt.promise(u).complete=tt.add,u.success=u.done,u.error=u.fail,r.url=((n||r.url||y)+"").replace(eo,"").replace(ho,g[1]+"//"),r.type=t.method||t.type||r.method||r.type,r.dataTypes=i.trim(r.dataType||"*").toLowerCase().match(h)||[""],null==r.crossDomain&&(s=ku.exec(r.url.toLowerCase()),r.crossDomain=!(!s||s[1]===g[1]&&s[2]===g[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(g[3]||("http:"===g[1]?"80":"443")))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=i.param(r.data,r.traditional)),tf(du,r,t,u),2===e)return u;l=r.global;l&&0==i.active++&&i.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!so.test(r.type);f=r.url;r.hasContent||(r.data&&(f=r.url+=(vi.test(f)?"&":"?")+r.data,delete r.data),r.cache===!1&&(r.url=bu.test(f)?f.replace(bu,"$1_="+ai++):f+(vi.test(f)?"&":"?")+"_="+ai++));r.ifModified&&(i.lastModified[f]&&u.setRequestHeader("If-Modified-Since",i.lastModified[f]),i.etag[f]&&u.setRequestHeader("If-None-Match",i.etag[f]));(r.data&&r.hasContent&&r.contentType!==!1||t.contentType)&&u.setRequestHeader("Content-Type",r.contentType);u.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+gu+"; q=0.01":""):r.accepts["*"]);for(c in r.headers)u.setRequestHeader(c,r.headers[c]);if(r.beforeSend&&(r.beforeSend.call(o,u,r)===!1||2===e))return u.abort();ut="abort";for(c in{success:1,error:1,complete:1})u[c](r[c]);if(a=tf(yi,r,t,u)){u.readyState=1;l&&d.trigger("ajaxSend",[u,r]);r.async&&r.timeout>0&&(k=setTimeout(function(){u.abort("timeout")},r.timeout));try{e=1;a.send(it,w)}catch(ft){if(!(2>e))throw ft;w(-1,ft)}}else w(-1,"No Transport");function w(n,t,s,h){var v,it,g,y,w,c=t;2!==e&&(e=2,k&&clearTimeout(k),a=void 0,b=h||"",u.readyState=n>0?4:0,v=n>=200&&300>n||304===n,s&&(y=co(r,u,s)),y=lo(r,y,u,v),v?(r.ifModified&&(w=u.getResponseHeader("Last-Modified"),w&&(i.lastModified[f]=w),w=u.getResponseHeader("etag"),w&&(i.etag[f]=w)),204===n||"HEAD"===r.type?c="nocontent":304===n?c="notmodified":(c=y.state,it=y.data,g=y.error,v=!g)):(g=c,(n||!c)&&(c="error",0>n&&(n=0))),u.status=n,u.statusText=(t||c)+"",v?nt.resolveWith(o,[it,c,u]):nt.rejectWith(o,[u,c,g]),u.statusCode(p),p=void 0,l&&d.trigger(v?"ajaxSuccess":"ajaxError",[u,r,v?it:g]),tt.fireWith(o,[u,c]),l&&(d.trigger("ajaxComplete",[u,r]),--i.active||i.event.trigger("ajaxStop")))}return u},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax({url:n,type:t,dataType:f,data:r,success:u})}});i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return this.each(i.isFunction(n)?function(t){i(this).wrapInner(n.call(this,t))}:function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!r.reliableHiddenOffsets()&&"none"===(n.style&&n.style.display||i.css(n,"display"))};i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)};var ao=/%20/g,vo=/\[\]$/,rf=/\r?\n/g,yo=/^(?:submit|button|image|reset|file)$/i,po=/^(?:input|select|textarea|keygen)/i;function wi(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||vo.test(n)?u(n,i):wi(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)wi(n+"["+f+"]",t[f],r,u)}i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():null==t?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)wi(r,n[r],t,f);return u.join("&").replace(ao,"+")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&po.test(this.nodeName)&&!yo.test(n)&&(this.checked||!ui.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(rf,"\r\n")}}):{name:t.name,value:r.replace(rf,"\r\n")}}).get()}});i.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&uf()||bo()}:uf;var wo=0,gt={},ht=i.ajaxSettings.xhr();n.ActiveXObject&&i(n).on("unload",function(){for(var n in gt)gt[n](void 0,!0)});r.cors=!!ht&&"withCredentials"in ht;ht=r.ajax=!!ht;ht&&i.ajaxTransport(function(n){if(!n.crossDomain||r.cors){var t;return{send:function(r,u){var e,f=n.xhr(),o=++wo;if(f.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(e in n.xhrFields)f[e]=n.xhrFields[e];n.mimeType&&f.overrideMimeType&&f.overrideMimeType(n.mimeType);n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(e in r)void 0!==r[e]&&f.setRequestHeader(e,r[e]+"");f.send(n.hasContent&&n.data||null);t=function(r,e){var s,c,h;if(t&&(e||4===f.readyState))if(delete gt[o],t=void 0,f.onreadystatechange=i.noop,e)4!==f.readyState&&f.abort();else{h={};s=f.status;"string"==typeof f.responseText&&(h.text=f.responseText);try{c=f.statusText}catch(l){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=h.text?200:404}h&&u(s,c,h,f.getAllResponseHeaders())};n.async?4===f.readyState?setTimeout(t):f.onreadystatechange=gt[o]=t:t()},abort:function(){t&&t(void 0,!0)}}}});function uf(){try{return new n.XMLHttpRequest}catch(t){}}function bo(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var t,r=u.head||i("head")[0]||u.documentElement;return{send:function(i,f){t=u.createElement("script");t.async=!0;n.scriptCharset&&(t.charset=n.scriptCharset);t.src=n.url;t.onload=t.onreadystatechange=function(n,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||f(200,"success"))};r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ff=[],bi=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=ff.pop()||i.expando+"_"+ai++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,e,s=t.jsonp!==!1&&(bi.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&bi.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return(f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(bi,"$1"+f):t.jsonp!==!1&&(t.url+=(vi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return e||i.error(f+" was not called"),e[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){e=arguments},u.always(function(){n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,ff.push(f));e&&i.isFunction(o)&&o(e[0]);e=o=void 0}),"script")});i.parseHTML=function(n,t,r){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(r=t,t=!1);t=t||u;var f=tr.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))};var ef=i.fn.load;i.fn.load=function(n,t,r){if("string"!=typeof n&&ef)return ef.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>=0&&(u=i.trim(n.slice(e,n.length)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),f.length>0&&i.ajax({url:n,type:s,dataType:"html",data:t}).done(function(n){o=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).complete(r&&function(n,t){f.each(r,o||[n.responseText,t,n])}),this};i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length};var of=n.document.documentElement;function sf(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&i.inArray("auto",[s,c])>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,u));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}};i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,u={top:0,left:0},r=this[0],e=r&&r.ownerDocument;if(e)return t=e.documentElement,i.contains(t,r)?(typeof r.getBoundingClientRect!==s&&(u=r.getBoundingClientRect()),f=sf(e),{top:u.top+(f.pageYOffset||t.scrollTop)-(t.clientTop||0),left:u.left+(f.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):u},position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||of;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||of})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r=/Y/.test(t);i.fn[n]=function(u){return w(this,function(n,u,f){var e=sf(n);return void 0===f?e?t in e?e[t]:e.document.documentElement[u]:n[u]:void(e?e.scrollTo(r?i(e).scrollLeft():f,r?f:i(e).scrollTop()):n[u]=f)},n,u,arguments.length,null)}});i.each(["top","left"],function(n,t){i.cssHooks[t]=uu(r.pixelPosition,function(n,r){if(r)return(r=k(n,t),pt.test(r)?i(n).position()[t]+"px":r)})});i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||"boolean"!=typeof u),o=r||(u===!0||f===!0?"margin":"border");return w(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:9===t.nodeType?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):void 0===u?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:void 0,e,null)}})});i.fn.size=function(){return this.length};i.fn.andSelf=i.fn.addBack;"function"==typeof define&&define.amd&&define("asljQuery",[],function(){return i});var ko=n.jQuery,go=n.$;return i.noConflict=function(t){return n.$===i&&(n.$=go),t&&n.jQuery===i&&(n.asljQuery=ko),i},typeof t===s&&(n.asljQuery=n.$=i),i}),function(n){typeof n!="undefined"&&(n.extend({highlight:function(t,i,r,u,f){if(f=f==""?".exhghttt":f,t.nodeType===3){var c=t.data.normalize("NFD").replace(/[\u0300-\u036f]/g,""),e=c.match(i);if(e){var h=document.createElement(r||"span");if(h.className=u||"highlight",/\.|,|\s/.test(e[0].charAt(0)))var l=e.index+1;else var l=e.index;var o=t.splitText(l);o.splitText(e[1].length);var a=o.cloneNode(!0);return h.appendChild(a),o.parentNode.replaceChild(h,o),1}}else if(t.nodeType===1&&t.childNodes&&!/(script|style)/i.test(t.tagName)&&!n(t).closest(f).length>0&&!(t.tagName===r.toUpperCase()&&t.className===u))for(var s=0;s<t.childNodes.length;s++)s+=n.highlight(t.childNodes[s],i,r,u,f);return 0}}),n.fn.unhighlight=function(t){var i={className:"highlight",element:"span"};return n.extend(i,t),this.find(i.element+"."+i.className).each(function(){var n=this.parentNode;n.replaceChild(this.firstChild,this);n.normalize()}).end()},n.fn.highlight=function(t,i){var r={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1,excludeParents:""};if(n.extend(r,i),t.constructor===String&&(t=[t]),t=n.grep(t,function(n){return n!=""}),t=n.map(t,function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g,"")}),t.length==0)return this;var f=r.caseSensitive?"":"i",u="("+t.join("|")+")";r.wordsOnly&&(u="(?:,|^|\\s)"+u+"(?:,|$|\\s)");var e=new RegExp(u,f);return this.each(function(){n.highlight(this,e,r.element,r.className,r.excludeParents)})})}(asljQuery,asljQuery,window),function(n,t,i){(function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.asl_SimpleBar=t())})(this,function(){"use strict";var e=typeof globalThis!="undefined"?globalThis:typeof i!="undefined"?i:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function et(n,t){return t={exports:{}},n(t,t.exports),t.exports}var pt="object",wt=function(n){return n&&n.Math==Math&&n},t=wt(typeof globalThis==pt&&globalThis)||wt(typeof i==pt&&i)||wt(typeof self==pt&&self)||wt(typeof e==pt&&e)||Function("return this")(),f=function(n){try{return!!n()}catch(t){return!0}},v=!f(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),ff={}.propertyIsEnumerable,ef=Object.getOwnPropertyDescriptor,gs=ef&&!ff.call({1:2},1),nh=gs?function(n){var t=ef(this,n);return!!t&&t.enumerable}:ff,of={f:nh},or=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}},th={}.toString,k=function(n){return th.call(n).slice(8,-1)},ih="".split,bt=f(function(){return!Object("z").propertyIsEnumerable(0)})?function(n){return k(n)=="String"?ih.call(n,""):Object(n)}:Object,kt=function(n){if(n==undefined)throw TypeError("Can't call method on "+n);return n},dt=function(n){return bt(kt(n))},n=function(n){return typeof n=="object"?n!==null:typeof n=="function"},sf=function(t,i){if(!n(t))return t;var r,u;if(i&&typeof(r=t.toString)=="function"&&!n(u=r.call(t))||typeof(r=t.valueOf)=="function"&&!n(u=r.call(t))||!i&&typeof(r=t.toString)=="function"&&!n(u=r.call(t)))return u;throw TypeError("Can't convert object to primitive value");},rh={}.hasOwnProperty,u=function(n,t){return rh.call(n,t)},sr=t.document,uh=n(sr)&&n(sr.createElement),hf=function(n){return uh?sr.createElement(n):{}},cf=!v&&!f(function(){return Object.defineProperty(hf("div"),"a",{get:function(){return 7}}).a!=7}),lf=Object.getOwnPropertyDescriptor,fh=v?lf:function(n,t){if(n=dt(n),t=sf(t,!0),cf)try{return lf(n,t)}catch(i){}if(u(n,t))return or(!of.f.call(n,t),n[t])},af={f:fh},h=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t},vf=Object.defineProperty,eh=v?vf:function(n,t,i){if(h(n),t=sf(t,!0),h(i),cf)try{return vf(n,t,i)}catch(r){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(n[t]=i.value),n},d={f:eh},s=v?function(n,t,i){return d.f(n,t,or(1,i))}:function(n,t,i){return n[t]=i,n},hr=function(n,i){try{s(t,n,i)}catch(r){t[n]=i}return i},gt=et(function(n){var i="__core-js_shared__",r=t[i]||hr(i,{});(n.exports=function(n,t){return r[n]||(r[n]=t!==undefined?t:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),ni=gt("native-function-to-string",Function.toString),yf=t.WeakMap,pf=typeof yf=="function"&&/native code/.test(ni.call(yf)),oh=0,sh=Math.random(),cr=function(n){return"Symbol("+String(n===undefined?"":n)+")_"+(++oh+sh).toString(36)},wf=gt("keys"),lr=function(n){return wf[n]||(wf[n]=cr(n))},ti={},hh=t.WeakMap,ii,ot,ri,ch=function(n){return ri(n)?ot(n):ii(n,{})},lh=function(t){return function(i){var r;if(!n(i)||(r=ot(i)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}};if(pf){var g=new hh,ah=g.get,vh=g.has,yh=g.set;ii=function(n,t){return yh.call(g,n,t),t};ot=function(n){return ah.call(g,n)||{}};ri=function(n){return vh.call(g,n)}}else{var st=lr("state");ti[st]=!0;ii=function(n,t){return s(n,st,t),t};ot=function(n){return u(n,st)?n[st]:{}};ri=function(n){return u(n,st)}}var c={set:ii,get:ot,has:ri,enforce:ch,getterFor:lh},ht=et(function(n){var i=c.get,r=c.enforce,f=String(ni).split("toString");gt("inspectSource",function(n){return ni.call(n)});(n.exports=function(n,i,e,o){var c=o?!!o.unsafe:!1,h=o?!!o.enumerable:!1,l=o?!!o.noTargetGet:!1;if(typeof e=="function"&&(typeof i!="string"||u(e,"name")||s(e,"name",i),r(e).source=f.join(typeof i=="string"?i:"")),n===t){h?n[i]=e:hr(i,e);return}c?!l&&n[i]&&(h=!0):delete n[i];h?n[i]=e:s(n,i,e)})(Function.prototype,"toString",function(){return typeof this=="function"&&i(this).source||ni.call(this)})}),ar=t,bf=function(n){return typeof n=="function"?n:undefined},kf=function(n,i){return arguments.length<2?bf(ar[n])||bf(t[n]):ar[n]&&ar[n][i]||t[n]&&t[n][i]},ph=Math.ceil,wh=Math.floor,vr=function(n){return isNaN(n=+n)?0:(n>0?wh:ph)(n)},bh=Math.min,ui=function(n){return n>0?bh(vr(n),9007199254740991):0},kh=Math.max,dh=Math.min,gh=function(n,t){var i=vr(n);return i<0?kh(i+t,0):dh(i,t)},df=function(n){return function(t,i,r){var f=dt(t),e=ui(f.length),u=gh(r,e),o;if(n&&i!=i){while(e>u)if(o=f[u++],o!=o)return!0}else for(;e>u;u++)if((n||u in f)&&f[u]===i)return n||u||0;return!n&&-1}},nc={includes:df(!0),indexOf:df(!1)},tc=nc.indexOf,gf=function(n,t){var f=dt(n),e=0,r=[];for(var i in f)!u(ti,i)&&u(f,i)&&r.push(i);while(t.length>e)u(f,i=t[e++])&&(~tc(r,i)||r.push(i));return r},fi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ic=fi.concat("length","prototype"),rc=Object.getOwnPropertyNames||function(n){return gf(n,ic)},uc={f:rc},fc=Object.getOwnPropertySymbols,ne={f:fc},ec=kf("Reflect","ownKeys")||function(n){var t=uc.f(h(n)),i=ne.f;return i?t.concat(i(n)):t},oc=function(n,t){for(var f=ec(t),e=d.f,o=af.f,i=0;i<f.length;i++){var r=f[i];u(n,r)||e(n,r,o(t,r))}},sc=/#|\.prototype\./,ct=function(n,t){var i=cc[hc(n)];return i==ac?!0:i==lc?!1:typeof t=="function"?f(t):!!t},hc=ct.normalize=function(n){return String(n).replace(sc,".").toLowerCase()},cc=ct.data={},lc=ct.NATIVE="N",ac=ct.POLYFILL="P",yr=ct,vc=af.f,a=function(n,i){var o=n.target,c=n.global,l=n.stat,a,f,r,u,e,h;if(f=c?t:l?t[o]||hr(o,{}):(t[o]||{}).prototype,f)for(r in i){if(e=i[r],n.noTargetGet?(h=vc(f,r),u=h&&h.value):u=f[r],a=yr(c?r:o+(l?".":"#")+r,n.forced),!a&&u!==undefined){if(typeof e==typeof u)continue;oc(e,u)}(n.sham||u&&u.sham)&&s(e,"sham",!0);ht(f,r,e,n)}},te=function(n){if(typeof n!="function")throw TypeError(String(n)+" is not a function");return n},ie=function(n,t,i){if(te(n),t===undefined)return n;switch(i){case 0:return function(){return n.call(t)};case 1:return function(i){return n.call(t,i)};case 2:return function(i,r){return n.call(t,i,r)};case 3:return function(i,r,u){return n.call(t,i,r,u)}}return function(){return n.apply(t,arguments)}},ei=function(n){return Object(kt(n))},re=Array.isArray||function(n){return k(n)=="Array"},ue=!!Object.getOwnPropertySymbols&&!f(function(){return!String(Symbol())}),fe=t.Symbol,ee=gt("wks"),o=function(n){return ee[n]||(ee[n]=ue&&fe[n]||(ue?fe:cr)("Symbol."+n))},yc=o("species"),pc=function(t,i){var r;return re(t)&&(r=t.constructor,typeof r=="function"&&(r===Array||re(r.prototype))?r=undefined:n(r)&&(r=r[yc],r===null&&(r=undefined))),new(r===undefined?Array:r)(i===0?0:i)},wc=[].push,y=function(n){var i=n==1,u=n==2,f=n==3,t=n==4,r=n==6,e=n==5||r;return function(o,s,h,c){for(var w=ei(o),v=bt(w),d=ie(s,h,3),b=ui(v.length),l=0,k=c||pc,y=i?k(o,b):u?k(o,0):undefined,a,p;b>l;l++)if((e||l in v)&&(a=v[l],p=d(a,l,w),n))if(i)y[l]=p;else if(p)switch(n){case 3:return!0;case 5:return a;case 6:return l;case 2:wc.call(y,a)}else if(t)return!1;return r?-1:f||t?t:y}},oi={forEach:y(0),map:y(1),filter:y(2),some:y(3),every:y(4),find:y(5),findIndex:y(6)},oe=function(n,t){var i=[][n];return!i||!f(function(){i.call(null,t||function(){throw 1;},1)})},bc=oi.forEach,lt=oe("forEach")?function(n){return bc(this,n,arguments.length>1?arguments[1]:undefined)}:[].forEach;a({target:"Array",proto:!0,forced:[].forEach!=lt},{forEach:lt});var pr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var kc in pr){var se=t[kc],si=se&&se.prototype;if(si&&si.forEach!==lt)try{s(si,"forEach",lt)}catch(kb){si.forEach=lt}}var dc=!!(typeof i!="undefined"&&i.document&&i.document.createElement),wr=dc,gc=o("species"),nl=function(n){return!f(function(){var t=[],i=t.constructor={};return i[gc]=function(){return{foo:1}},t[n](Boolean).foo!==1})},tl=oi.filter;a({target:"Array",proto:!0,forced:!nl("filter")},{filter:function(n){return tl(this,n,arguments.length>1?arguments[1]:undefined)}});var hi=Object.keys||function(n){return gf(n,fi)},il=v?Object.defineProperties:function(n,t){h(n);for(var i=hi(t),f=i.length,r=0,u;f>r;)d.f(n,u=i[r++],t[u]);return n},rl=kf("document","documentElement"),he=lr("IE_PROTO"),br="prototype",kr=function(){},ci=function(){var t=hf("iframe"),r=fi.length,u="<",i="script",f=">",e="java"+i+":",n;for(t.style.display="none",rl.appendChild(t),t.src=String(e),n=t.contentWindow.document,n.open(),n.write(u+i+f+"document.F=Object"+u+"/"+i+f),n.close(),ci=n.F;r--;)delete ci[br][fi[r]];return ci()},ce=Object.create||function(n,t){var i;return n!==null?(kr[br]=h(n),i=new kr,kr[br]=null,i[he]=n):i=ci(),t===undefined?i:il(i,t)};ti[he]=!0;var dr=o("unscopables"),gr=Array.prototype;gr[dr]==undefined&&s(gr,dr,ce(null));var nu=function(n){gr[dr][n]=!0},nt={},ul=!f(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype}),le=lr("IE_PROTO"),fl=Object.prototype,li=ul?Object.getPrototypeOf:function(n){return(n=ei(n),u(n,le))?n[le]:typeof n.constructor=="function"&&n instanceof n.constructor?n.constructor.prototype:n instanceof Object?fl:null},ae=o("iterator"),ve=!1,el=function(){return this},tt,tu,iu;[].keys&&(iu=[].keys(),"next"in iu?(tu=li(li(iu)),tu!==Object.prototype&&(tt=tu)):ve=!0);tt==undefined&&(tt={});u(tt,ae)||s(tt,ae,el);var ru={IteratorPrototype:tt,BUGGY_SAFARI_ITERATORS:ve},ol=d.f,ye=o("toStringTag"),uu=function(n,t,i){n&&!u(n=i?n:n.prototype,ye)&&ol(n,ye,{configurable:!0,value:t})},sl=ru.IteratorPrototype,hl=function(){return this},cl=function(n,t,i){var r=t+" Iterator";return n.prototype=ce(sl,{next:or(1,i)}),uu(n,r,!1),nt[r]=hl,n},ll=function(t){if(!n(t)&&t!==null)throw TypeError("Can't set "+String(t)+" as a prototype");return t},ai=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},n;try{n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set;n.call(i,[]);t=i instanceof Array}catch(r){}return function(i,r){return h(i),ll(r),t?n.call(i,r):i.__proto__=r,i}}():undefined),fu=ru.IteratorPrototype,vi=ru.BUGGY_SAFARI_ITERATORS,at=o("iterator"),pe="keys",yi="values",we="entries",al=function(){return this},be=function(n,t,i,r,u,f,e){cl(i,t,r);var y=function(n){if(n===u&&h)return h;if(!vi&&n in o)return o[n];switch(n){case pe:return function(){return new i(this,n)};case yi:return function(){return new i(this,n)};case we:return function(){return new i(this,n)}}return function(){return new i(this)}},k=t+" Iterator",w=!1,o=n.prototype,l=o[at]||o["@@iterator"]||u&&o[u],h=!vi&&l||y(u),b=t=="Array"?o.entries||l:l,c,v,p;if(b&&(c=li(b.call(new n)),fu!==Object.prototype&&c.next&&(li(c)!==fu&&(ai?ai(c,fu):typeof c[at]!="function"&&s(c,at,al)),uu(c,k,!0))),u==yi&&l&&l.name!==yi&&(w=!0,h=function(){return l.call(this)}),o[at]!==h&&s(o,at,h),nt[t]=h,u)if(v={values:y(yi),keys:f?h:y(pe),entries:y(we)},e)for(p in v)!vi&&!w&&p in o||ht(o,p,v[p]);else a({target:t,proto:!0,forced:vi||w},v);return v},ke="Array Iterator",vl=c.set,yl=c.getterFor(ke),vt=be(Array,"Array",function(n,t){vl(this,{type:ke,target:dt(n),index:0,kind:t})},function(){var t=yl(this),i=t.target,r=t.kind,n=t.index++;return!i||n>=i.length?(t.target=undefined,{value:undefined,done:!0}):r=="keys"?{value:n,done:!1}:r=="values"?{value:i[n],done:!1}:{value:[n,i[n]],done:!1}},"values");nt.Arguments=nt.Array;nu("keys");nu("values");nu("entries");var pi=Object.assign,de=!pi||f(function(){var n={},t={},i=Symbol(),r="abcdefghijklmnopqrst";return n[i]=7,r.split("").forEach(function(n){t[n]=n}),pi({},n)[i]!=7||hi(pi({},t)).join("")!=r})?function(n){for(var r=ei(n),s=arguments.length,u=1,f=ne.f,h=of.f;s>u;)for(var t=bt(arguments[u++]),e=f?hi(t).concat(f(t)):hi(t),c=e.length,o=0,i;c>o;)i=e[o++],(!v||h.call(t,i))&&(r[i]=t[i]);return r}:pi;a({target:"Object",stat:!0,forced:Object.assign!==de},{assign:de});var pl=o("toStringTag"),wl=k(function(){return arguments}())=="Arguments",bl=function(n,t){try{return n[t]}catch(i){}},ge=function(n){var t,i,r;return n===undefined?"Undefined":n===null?"Null":typeof(i=bl(t=Object(n),pl))=="string"?i:wl?k(t):(r=k(t))=="Object"&&typeof t.callee=="function"?"Arguments":r},kl=o("toStringTag"),eu={};eu[kl]="z";var no=String(eu)!=="[object z]"?function(){return"[object "+ge(this)+"]"}:eu.toString,to=Object.prototype;no!==to.toString&&ht(to,"toString",no,{unsafe:!0});var ou="\t\n\x0b\f\r \u2028\u2029",wi="["+ou+"]",dl=RegExp("^"+wi+wi+"*"),gl=RegExp(wi+wi+"*$"),su=function(n){return function(t){var i=String(kt(t));return n&1&&(i=i.replace(dl,"")),n&2&&(i=i.replace(gl,"")),i}},na={start:su(1),end:su(2),trim:su(3)},ta=na.trim,bi=t.parseInt,ia=/^[+-]?0[Xx]/,ra=bi(ou+"08")!==8||bi(ou+"0x16")!==22,io=ra?function(n,t){var i=ta(String(n));return bi(i,t>>>0||(ia.test(i)?16:10))}:bi;a({global:!0,forced:parseInt!=io},{parseInt:io});var ro=function(n){return function(t,i){var u=String(kt(t)),r=vr(i),o=u.length,f,e;return r<0||r>=o?n?"":undefined:(f=u.charCodeAt(r),f<55296||f>56319||r+1===o||(e=u.charCodeAt(r+1))<56320||e>57343?n?u.charAt(r):f:n?u.slice(r,r+2):(f-55296<<10)+(e-56320)+65536)}},uo={codeAt:ro(!1),charAt:ro(!0)},ua=uo.charAt,fo="String Iterator",fa=c.set,ea=c.getterFor(fo);be(String,"String",function(n){fa(this,{type:fo,string:String(n),index:0})},function(){var n=ea(this),i=n.string,r=n.index,t;return r>=i.length?{value:undefined,done:!0}:(t=ua(i,r),n.index+=t.length,{value:t,done:!1})});var hu=function(n,t,i){for(var r in t)ht(n,r,t[r],i);return n},oa=!f(function(){return Object.isExtensible(Object.preventExtensions({}))}),p=et(function(t){var e=d.f,i=cr("meta"),o=0,r=Object.isExtensible||function(){return!0},f=function(n){e(n,i,{value:{objectID:"O"+ ++o,weakData:{}}})},s=function(t,e){if(!n(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!u(t,i)){if(!r(t))return"F";if(!e)return"E";f(t)}return t[i].objectID},h=function(n,t){if(!u(n,i)){if(!r(n))return!0;if(!t)return!1;f(n)}return n[i].weakData},c=function(n){return oa&&l.REQUIRED&&r(n)&&!u(n,i)&&f(n),n},l=t.exports={REQUIRED:!1,fastKey:s,getWeakData:h,onFreeze:c};ti[i]=!0}),rk=p.REQUIRED,uk=p.fastKey,fk=p.getWeakData,ek=p.onFreeze,sa=o("iterator"),ha=Array.prototype,ca=function(n){return n!==undefined&&(nt.Array===n||ha[sa]===n)},la=o("iterator"),aa=function(n){if(n!=undefined)return n[la]||n["@@iterator"]||nt[ge(n)]},va=function(n,t,i,r){try{return r?t(h(i)[0],i[1]):t(i)}catch(f){var u=n["return"];u!==undefined&&h(u.call(n));throw f;}},eo=et(function(n){var t=function(n,t){this.stopped=n;this.result=t},i=n.exports=function(n,i,r,u,f){var a=ie(i,r,u?2:1),s,c,o,v,e,l;if(f)s=n;else{if(c=aa(n),typeof c!="function")throw TypeError("Target is not iterable");if(ca(c)){for(o=0,v=ui(n.length);v>o;o++)if(e=u?a(h(l=n[o])[0],l[1]):a(n[o]),e&&e instanceof t)return e;return new t(!1)}s=c.call(n)}while(!(l=s.next()).done)if(e=va(s,a,l.value,u),e&&e instanceof t)return e;return new t(!1)};i.stop=function(n){return new t(!0,n)}}),oo=function(n,t,i){if(!(n instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return n},so=o("iterator"),ho=!1;try{var ya=0,co={next:function(){return{done:!!ya++}},"return":function(){ho=!0}};co[so]=function(){return this};Array.from(co,function(){throw 2;})}catch(kb){}var pa=function(n,t){if(!t&&!ho)return!1;var i=!1;try{var r={};r[so]=function(){return{next:function(){return{done:i=!0}}}};n(r)}catch(u){}return i},wa=function(t,i,r){var u,f;return ai&&typeof(u=i.constructor)=="function"&&u!==r&&n(f=u.prototype)&&f!==r.prototype&&ai(t,f),t},ba=function(i,r,u,e,o){var h=t[i],c=h&&h.prototype,s=h,l=e?"set":"add",w={},v=function(t){var i=c[t];ht(c,t,t=="add"?function(n){return i.call(this,n===0?0:n),this}:t=="delete"?function(t){return o&&!n(t)?!1:i.call(this,t===0?0:t)}:t=="get"?function(t){return o&&!n(t)?undefined:i.call(this,t===0?0:t)}:t=="has"?function(t){return o&&!n(t)?!1:i.call(this,t===0?0:t)}:function(n,t){return i.call(this,n===0?0:n,t),this})};if(yr(i,typeof h!="function"||!(o||c.forEach&&!f(function(){(new h).entries().next()}))))s=u.getConstructor(r,i,e,l),p.REQUIRED=!0;else if(yr(i,!0)){var y=new s,k=y[l](o?{}:-0,1)!=y,d=f(function(){y.has(1)}),g=pa(function(n){new h(n)}),b=!o&&f(function(){for(var t=new h,n=5;n--;)t[l](n,n);return!t.has(-0)});g||(s=r(function(n,t){oo(n,s,i);var r=wa(new h,n,s);return t!=undefined&&eo(t,r[l],r,e),r}),s.prototype=c,c.constructor=s);(d||b)&&(v("delete"),v("has"),e&&v("get"));(b||k)&&v(l);o&&c.clear&&delete c.clear}return w[i]=s,a({global:!0,forced:s!=h},w),uu(s,i),o||u.setStrong(s,i,e),s},ki=p.getWeakData,ka=c.set,da=c.getterFor,ga=oi.find,nv=oi.findIndex,tv=0,di=function(n){return n.frozen||(n.frozen=new lo)},lo=function(){this.entries=[]},cu=function(n,t){return ga(n.entries,function(n){return n[0]===t})};lo.prototype={get:function(n){var t=cu(this,n);if(t)return t[1]},has:function(n){return!!cu(this,n)},set:function(n,t){var i=cu(this,n);i?i[1]=t:this.entries.push([n,t])},"delete":function(n){var t=nv(this.entries,function(t){return t[0]===n});return~t&&this.entries.splice(t,1),!!~t}};var ao={getConstructor:function(t,i,r,f){var e=t(function(n,t){oo(n,e,i);ka(n,{type:i,id:tv++,frozen:undefined});t!=undefined&&eo(t,n[f],n,r)}),o=da(i),s=function(n,t,i){var r=o(n),u=ki(h(t),!0);return u===!0?di(r).set(t,i):u[r.id]=i,n};return hu(e.prototype,{"delete":function(t){var r=o(this);if(!n(t))return!1;var i=ki(t);return i===!0?di(r)["delete"](t):i&&u(i,r.id)&&delete i[r.id]},has:function(t){var r=o(this);if(!n(t))return!1;var i=ki(t);return i===!0?di(r).has(t):i&&u(i,r.id)}}),hu(e.prototype,r?{get:function(t){var r=o(this);if(n(t)){var i=ki(t);return i===!0?di(r).get(t):i?i[r.id]:undefined}},set:function(n,t){return s(this,n,t)}}:{add:function(n){return s(this,n,!0)}}),e}},ok=et(function(i){var f=c.enforce,v=!t.ActiveXObject&&"ActiveXObject"in t,e=Object.isExtensible,r,s=function(n){return function(){return n(this,arguments.length?arguments[0]:undefined)}},y=i.exports=ba("WeakMap",s,ao,!0,!0);if(pf&&v){r=ao.getConstructor(s,"WeakMap",!0);p.REQUIRED=!0;var u=y.prototype,h=u["delete"],o=u.has,l=u.get,a=u.set;hu(u,{"delete":function(t){if(n(t)&&!e(t)){var i=f(this);return i.frozen||(i.frozen=new r),h.call(this,t)||i.frozen["delete"](t)}return h.call(this,t)},has:function(t){if(n(t)&&!e(t)){var i=f(this);return i.frozen||(i.frozen=new r),o.call(this,t)||i.frozen.has(t)}return o.call(this,t)},get:function(t){if(n(t)&&!e(t)){var i=f(this);return i.frozen||(i.frozen=new r),o.call(this,t)?l.call(this,t):i.frozen.get(t)}return l.call(this,t)},set:function(t,i){if(n(t)&&!e(t)){var u=f(this);u.frozen||(u.frozen=new r);o.call(this,t)?a.call(this,t,i):u.frozen.set(t,i)}else a.call(this,t,i);return this}})}}),lu=o("iterator"),vo=o("toStringTag"),au=vt.values;for(var vu in pr){var yo=t[vu],l=yo&&yo.prototype;if(l){if(l[lu]!==au)try{s(l,lu,au)}catch(kb){l[lu]=au}if(l[vo]||s(l,vo,vu),pr[vu])for(var it in vt)if(l[it]!==vt[it])try{s(l,it,vt[it])}catch(kb){l[it]=vt[it]}}}var po="Expected a function",wo=0/0,iv="[object Symbol]",rv=/^\s+|\s+$/g,uv=/^[-+]0x[0-9a-f]+$/i,fv=/^0b[01]+$/i,ev=/^0o[0-7]+$/i,ov=parseInt,sv=typeof e=="object"&&e&&e.Object===Object&&e,hv=typeof self=="object"&&self&&self.Object===Object&&self,cv=sv||hv||Function("return this")(),lv=Object.prototype,av=lv.toString,vv=Math.max,yv=Math.min,yu=function(){return cv.Date.now()};function pv(n,t,i){var f,o,c,e,r,u,s=0,p=!1,h=!1,a=!0;if(typeof n!="function")throw new TypeError(po);t=bo(t)||0;gi(i)&&(p=!!i.leading,h="maxWait"in i,c=h?vv(bo(i.maxWait)||0,t):c,a="trailing"in i?!!i.trailing:a);function v(t){var i=f,r=o;return f=o=undefined,s=t,e=n.apply(r,i)}function k(n){return s=n,r=setTimeout(l,t),p?v(n):e}function d(n){var r=n-u,f=n-s,i=t-r;return h?yv(i,c-f):i}function w(n){var i=n-u,r=n-s;return u===undefined||i>=t||i<0||h&&r>=c}function l(){var n=yu();if(w(n))return b(n);r=setTimeout(l,d(n))}function b(n){return(r=undefined,a&&f)?v(n):(f=o=undefined,e)}function g(){r!==undefined&&clearTimeout(r);s=0;f=u=o=r=undefined}function nt(){return r===undefined?e:b(yu())}function y(){var n=yu(),i=w(n);if(f=arguments,o=this,u=n,i){if(r===undefined)return k(u);if(h)return r=setTimeout(l,t),v(u)}return r===undefined&&(r=setTimeout(l,t)),e}return y.cancel=g,y.flush=nt,y}function wv(n,t,i){var r=!0,u=!0;if(typeof n!="function")throw new TypeError(po);return gi(i)&&(r="leading"in i?!!i.leading:r,u="trailing"in i?!!i.trailing:u),pv(n,t,{leading:r,maxWait:t,trailing:u})}function gi(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function bv(n){return!!n&&typeof n=="object"}function kv(n){return typeof n=="symbol"||bv(n)&&av.call(n)==iv}function bo(n){if(typeof n=="number")return n;if(kv(n))return wo;if(gi(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=gi(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(rv,"");var i=fv.test(n);return i||ev.test(n)?ov(n.slice(2),i?2:8):uv.test(n)?wo:+n}var ko=wv,dv="Expected a function",go=0/0,gv="[object Symbol]",ny=/^\s+|\s+$/g,ty=/^[-+]0x[0-9a-f]+$/i,iy=/^0b[01]+$/i,ry=/^0o[0-7]+$/i,uy=parseInt,fy=typeof e=="object"&&e&&e.Object===Object&&e,ey=typeof self=="object"&&self&&self.Object===Object&&self,oy=fy||ey||Function("return this")(),sy=Object.prototype,hy=sy.toString,cy=Math.max,ly=Math.min,pu=function(){return oy.Date.now()};function ay(n,t,i){var f,o,c,e,r,u,s=0,p=!1,h=!1,a=!0;if(typeof n!="function")throw new TypeError(dv);t=ns(t)||0;wu(i)&&(p=!!i.leading,h="maxWait"in i,c=h?cy(ns(i.maxWait)||0,t):c,a="trailing"in i?!!i.trailing:a);function v(t){var i=f,r=o;return f=o=undefined,s=t,e=n.apply(r,i)}function k(n){return s=n,r=setTimeout(l,t),p?v(n):e}function d(n){var r=n-u,f=n-s,i=t-r;return h?ly(i,c-f):i}function w(n){var i=n-u,r=n-s;return u===undefined||i>=t||i<0||h&&r>=c}function l(){var n=pu();if(w(n))return b(n);r=setTimeout(l,d(n))}function b(n){return(r=undefined,a&&f)?v(n):(f=o=undefined,e)}function g(){r!==undefined&&clearTimeout(r);s=0;f=u=o=r=undefined}function nt(){return r===undefined?e:b(pu())}function y(){var n=pu(),i=w(n);if(f=arguments,o=this,u=n,i){if(r===undefined)return k(u);if(h)return r=setTimeout(l,t),v(u)}return r===undefined&&(r=setTimeout(l,t)),e}return y.cancel=g,y.flush=nt,y}function wu(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function vy(n){return!!n&&typeof n=="object"}function yy(n){return typeof n=="symbol"||vy(n)&&hy.call(n)==gv}function ns(n){if(typeof n=="number")return n;if(yy(n))return go;if(wu(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=wu(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(ny,"");var i=iy.test(n);return i||ry.test(n)?uy(n.slice(2),i?2:8):ty.test(n)?go:+n}var ts=ay,py="Expected a function",is="__lodash_hash_undefined__",wy="[object Function]",by="[object GeneratorFunction]",ky=/^\[object .+?Constructor\]$/,dy=typeof e=="object"&&e&&e.Object===Object&&e,gy=typeof self=="object"&&self&&self.Object===Object&&self,rs=dy||gy||Function("return this")();function np(n,t){return n==null?undefined:n[t]}function tp(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch(i){}return t}var ip=Array.prototype,rp=Function.prototype,us=Object.prototype,bu=rs["__core-js_shared__"],fs=function(){var n=/[^.]+$/.exec(bu&&bu.keys&&bu.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),es=rp.toString,ku=us.hasOwnProperty,up=us.toString,fp=RegExp("^"+es.call(ku).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ep=ip.splice,op=os(rs,"Map"),yt=os(Object,"create");function w(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function sp(){this.__data__=yt?yt(null):{}}function hp(n){return this.has(n)&&delete this.__data__[n]}function cp(n){var t=this.__data__;if(yt){var i=t[n];return i===is?undefined:i}return ku.call(t,n)?t[n]:undefined}function lp(n){var t=this.__data__;return yt?t[n]!==undefined:ku.call(t,n)}function ap(n,t){var i=this.__data__;return i[n]=yt&&t===undefined?is:t,this}w.prototype.clear=sp;w.prototype["delete"]=hp;w.prototype.get=cp;w.prototype.has=lp;w.prototype.set=ap;function rt(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function vp(){this.__data__=[]}function yp(n){var t=this.__data__,i=nr(t,n);if(i<0)return!1;var r=t.length-1;return i==r?t.pop():ep.call(t,i,1),!0}function pp(n){var t=this.__data__,i=nr(t,n);return i<0?undefined:t[i][1]}function wp(n){return nr(this.__data__,n)>-1}function bp(n,t){var i=this.__data__,r=nr(i,n);return r<0?i.push([n,t]):i[r][1]=t,this}rt.prototype.clear=vp;rt.prototype["delete"]=yp;rt.prototype.get=pp;rt.prototype.has=wp;rt.prototype.set=bp;function b(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function kp(){this.__data__={hash:new w,map:new(op||rt),string:new w}}function dp(n){return tr(this,n)["delete"](n)}function gp(n){return tr(this,n).get(n)}function nw(n){return tr(this,n).has(n)}function tw(n,t){return tr(this,n).set(n,t),this}b.prototype.clear=kp;b.prototype["delete"]=dp;b.prototype.get=gp;b.prototype.has=nw;b.prototype.set=tw;function nr(n,t){for(var i=n.length;i--;)if(ew(n[i][0],t))return i;return-1}function iw(n){if(!ss(n)||uw(n))return!1;var t=ow(n)||tp(n)?fp:ky;return t.test(fw(n))}function tr(n,t){var i=n.__data__;return rw(t)?i[typeof t=="string"?"string":"hash"]:i.map}function os(n,t){var i=np(n,t);return iw(i)?i:undefined}function rw(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function uw(n){return!!fs&&fs in n}function fw(n){if(n!=null){try{return es.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function du(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(py);var i=function(){var r=arguments,u=t?t.apply(this,r):r[0],f=i.cache;if(f.has(u))return f.get(u);var e=n.apply(this,r);return i.cache=f.set(u,e),e};return i.cache=new(du.Cache||b),i}du.Cache=b;function ew(n,t){return n===t||n!==n&&t!==t}function ow(n){var t=ss(n)?up.call(n):"";return t==wy||t==by}function ss(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}var sw=du,hs=function(){function n(n,t){var i=-1;return n.some(function(n,r){return n[0]===t?(i=r,!0):!1}),i}return typeof Map!="undefined"?Map:function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=n(this.__entries__,t),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(t,i){var r=n(this.__entries__,t);~r?this.__entries__[r][1]=i:this.__entries__.push([t,i])},t.prototype.delete=function(t){var i=this.__entries__,r=n(i,t);~r&&i.splice(r,1)},t.prototype.has=function(t){return!!~n(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,t){t===void 0&&(t=null);for(var i=0,r=this.__entries__;i<r.length;i++){var u=r[i];n.call(t,u[1],u[0])}},t}()}(),gu=typeof i!="undefined"&&typeof document!="undefined"&&i.document===document,ir=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof i!="undefined"&&i.Math===Math?i:Function("return this")()}(),hw=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(ir):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}}(),cw=2;function lw(n,t){var i=!1,r=!1,u=0;function e(){i&&(i=!1,n());r&&f()}function o(){hw(e)}function f(){var n=Date.now();if(i){if(n-u<cw)return;r=!0}else i=!0,r=!1,setTimeout(o,t);u=n}return f}var aw=20,vw=["top","right","bottom","left","width","height","size","weight"],yw=typeof MutationObserver!="undefined",pw=function(){function n(){this.connected_=!1;this.mutationEventsAdded_=!1;this.mutationsObserver_=null;this.observers_=[];this.onTransitionEnd_=this.onTransitionEnd_.bind(this);this.refresh=lw(this.refresh.bind(this),aw)}return n.prototype.addObserver=function(n){~this.observers_.indexOf(n)||this.observers_.push(n);this.connected_||this.connect_()},n.prototype.removeObserver=function(n){var t=this.observers_,i=t.indexOf(n);~i&&t.splice(i,1);!t.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var n=this.updateObservers_();n&&this.refresh()},n.prototype.updateObservers_=function(){var n=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return n.forEach(function(n){return n.broadcastActive()}),n.length>0},n.prototype.connect_=function(){gu&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),i.addEventListener("resize",this.refresh),yw?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){gu&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),i.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(n){var t=n.propertyName,i=t===void 0?"":t,r=vw.some(function(n){return!!~i.indexOf(n)});r&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),cs=function(n,t){for(var i=0,r=Object.keys(t);i<r.length;i++){var u=r[i];Object.defineProperty(n,u,{value:t[u],enumerable:!1,writable:!1,configurable:!0})}return n},ut=function(n){var t=n&&n.ownerDocument&&n.ownerDocument.defaultView;return t||ir},ls=ur(0,0,0,0);function rr(n){return parseFloat(n)||0}function as(n){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return i.reduce(function(t,i){var r=n["border-"+i+"-width"];return t+rr(r)},0)}function ww(n){for(var i={},t=0,r=["top","right","bottom","left"];t<r.length;t++){var u=r[t],f=n["padding-"+u];i[u]=rr(f)}return i}function bw(n){var t=n.getBBox();return ur(0,0,t.width,t.height)}function kw(n){var f=n.clientWidth,e=n.clientHeight;if(!f&&!e)return ls;var t=ut(n).getComputedStyle(n),i=ww(t),o=i.left+i.right,s=i.top+i.bottom,r=rr(t.width),u=rr(t.height);if(t.boxSizing==="border-box"&&(Math.round(r+o)!==f&&(r-=as(t,"left","right")+o),Math.round(u+s)!==e&&(u-=as(t,"top","bottom")+s)),!gw(n)){var h=Math.round(r+o)-f,c=Math.round(u+s)-e;Math.abs(h)!==1&&(r-=h);Math.abs(c)!==1&&(u-=c)}return ur(i.left,i.top,r,u)}var dw=function(){return typeof SVGGraphicsElement!="undefined"?function(n){return n instanceof ut(n).SVGGraphicsElement}:function(n){return n instanceof ut(n).SVGElement&&typeof n.getBBox=="function"}}();function gw(n){return n===ut(n).document.documentElement}function nb(n){return gu?dw(n)?bw(n):kw(n):ls}function tb(n){var t=n.x,i=n.y,r=n.width,u=n.height,e=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,f=Object.create(e.prototype);return cs(f,{x:t,y:i,width:r,height:u,top:i,right:t+r,bottom:u+i,left:t}),f}function ur(n,t,i,r){return{x:n,y:t,width:i,height:r}}var ib=function(){function n(n){this.broadcastWidth=0;this.broadcastHeight=0;this.contentRect_=ur(0,0,0,0);this.target=n}return n.prototype.isActive=function(){var n=nb(this.target);return this.contentRect_=n,n.width!==this.broadcastWidth||n.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var n=this.contentRect_;return this.broadcastWidth=n.width,this.broadcastHeight=n.height,n},n}(),rb=function(){function n(n,t){var i=tb(t);cs(this,{target:n,contentRect:i})}return n}(),ub=function(){function n(n,t,i){if(this.activeObservations_=[],this.observations_=new hs,typeof n!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=n;this.controller_=t;this.callbackCtx_=i}return n.prototype.observe=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element!="undefined"&&Element instanceof Object){if(!(n instanceof ut(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(n)||(t.set(n,new ib(n)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element!="undefined"&&Element instanceof Object){if(!(n instanceof ut(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(n)&&(t.delete(n),t.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive();this.observations_.clear();this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var n=this;this.clearActive();this.observations_.forEach(function(t){t.isActive()&&n.activeObservations_.push(t)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var n=this.callbackCtx_,t=this.activeObservations_.map(function(n){return new rb(n.target,n.broadcastRect())});this.callback_.call(n,t,n);this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),vs=typeof WeakMap!="undefined"?new WeakMap:new hs,ys=function(){function n(t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=pw.getInstance(),r=new ub(t,i,this);vs.set(this,r)}return n}();["observe","unobserve","disconnect"].forEach(function(n){ys.prototype[n]=function(){var t;return(t=vs.get(this))[n].apply(t,arguments)}});var fb=function(){return typeof ir.ResizeObserver!="undefined"?ir.ResizeObserver:ys}(),ft=null,ps=null;wr&&i.addEventListener("resize",function(){ps!==i.devicePixelRatio&&(ps=i.devicePixelRatio,ft=null)});function ws(){if(ft===null){if(typeof document=="undefined")return ft=0;var t=document.body,n=document.createElement("div");n.classList.add("asl_simplebar-hide-scrollbar");t.appendChild(n);var i=n.getBoundingClientRect().right;t.removeChild(n);ft=i}return ft}var r=function(){function t(n,r){var u=this;(this.onScroll=function(){u.scrollXTicking||(i.requestAnimationFrame(u.scrollX),u.scrollXTicking=!0);u.scrollYTicking||(i.requestAnimationFrame(u.scrollY),u.scrollYTicking=!0)},this.scrollX=function(){u.axis.x.isOverflowing&&(u.showScrollbar("x"),u.positionScrollbar("x"));u.scrollXTicking=!1},this.scrollY=function(){u.axis.y.isOverflowing&&(u.showScrollbar("y"),u.positionScrollbar("y"));u.scrollYTicking=!1},this.onMouseEnter=function(){u.showScrollbar("x");u.showScrollbar("y")},this.onMouseMove=function(n){if(u.mouseX=n.clientX,u.mouseY=n.clientY,u.axis.x.isOverflowing||u.axis.x.forceVisible)u.onMouseMoveForAxis("x");if(u.axis.y.isOverflowing||u.axis.y.forceVisible)u.onMouseMoveForAxis("y")},this.onMouseLeave=function(){if(u.onMouseMove.cancel(),u.axis.x.isOverflowing||u.axis.x.forceVisible)u.onMouseLeaveForAxis("x");if(u.axis.y.isOverflowing||u.axis.y.forceVisible)u.onMouseLeaveForAxis("y");u.mouseX=-1;u.mouseY=-1},this.onWindowResize=function(){u.scrollbarWidth=u.getScrollbarWidth();u.hideNativeScrollbar()},this.hideScrollbars=function(){u.axis.x.track.rect=u.axis.x.track.el.getBoundingClientRect();u.axis.y.track.rect=u.axis.y.track.el.getBoundingClientRect();u.isWithinBounds(u.axis.y.track.rect)||(u.axis.y.scrollbar.el.classList.remove(u.classNames.visible),u.axis.y.isVisible=!1);u.isWithinBounds(u.axis.x.track.rect)||(u.axis.x.scrollbar.el.classList.remove(u.classNames.visible),u.axis.x.isVisible=!1)},this.onPointerEvent=function(n){var t,i;if(u.axis.x.track.rect=u.axis.x.track.el.getBoundingClientRect(),u.axis.y.track.rect=u.axis.y.track.el.getBoundingClientRect(),(u.axis.x.isOverflowing||u.axis.x.forceVisible)&&(t=u.isWithinBounds(u.axis.x.track.rect)),(u.axis.y.isOverflowing||u.axis.y.forceVisible)&&(i=u.isWithinBounds(u.axis.y.track.rect)),(t||i)&&(n.preventDefault(),n.stopPropagation(),n.type==="mousedown")){if(t)if(u.axis.x.scrollbar.rect=u.axis.x.scrollbar.el.getBoundingClientRect(),u.isWithinBounds(u.axis.x.scrollbar.rect))u.onDragStart(n,"x");else u.onTrackClick(n,"x");if(i)if(u.axis.y.scrollbar.rect=u.axis.y.scrollbar.el.getBoundingClientRect(),u.isWithinBounds(u.axis.y.scrollbar.rect))u.onDragStart(n,"y");else u.onTrackClick(n,"y")}},this.drag=function(n){var r,f=u.axis[u.draggedAxis].track,e=f.rect[u.axis[u.draggedAxis].sizeAttr],o=u.axis[u.draggedAxis].scrollbar,s=u.contentWrapperEl[u.axis[u.draggedAxis].scrollSizeAttr],h=parseInt(u.elStyles[u.axis[u.draggedAxis].sizeAttr],10);n.preventDefault();n.stopPropagation();r=u.draggedAxis==="y"?n.pageY:n.pageX;var c=r-f.rect[u.axis[u.draggedAxis].offsetAttr]-u.axis[u.draggedAxis].dragOffset,l=c/(e-o.size),i=l*(s-h);u.draggedAxis==="x"&&(i=u.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?i-(e+o.size):i,i=u.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-i:i);u.contentWrapperEl[u.axis[u.draggedAxis].scrollOffsetAttr]=i},this.onEndDrag=function(n){n.preventDefault();n.stopPropagation();u.el.classList.remove(u.classNames.dragging);document.removeEventListener("mousemove",u.drag,!0);document.removeEventListener("mouseup",u.onEndDrag,!0);u.removePreventClickId=i.setTimeout(function(){document.removeEventListener("click",u.preventClick,!0);document.removeEventListener("dblclick",u.preventClick,!0);u.removePreventClickId=null})},this.preventClick=function(n){n.preventDefault();n.stopPropagation()},this.el=n,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},r),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el))||(this.recalculate=ko(this.recalculate.bind(this),64),this.onMouseMove=ko(this.onMouseMove.bind(this),64),this.hideScrollbars=ts(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=ts(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=sw(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var r=document.createElement("div");r.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"><\/div><\/div>';var n=r.firstElementChild;document.body.appendChild(n);var u=n.firstElementChild;n.scrollLeft=0;var f=t.getOffset(n),i=t.getOffset(u);n.scrollLeft=999;var e=t.getOffset(u);return{isRtlScrollingInverted:f.left!==i.left&&i.left-e.left!=0,isRtlScrollbarInverted:f.left!==i.left}};t.getOffset=function(n){var t=n.getBoundingClientRect();return{top:t.top+(i.pageYOffset||document.documentElement.scrollTop),left:t.left+(i.pageXOffset||document.documentElement.scrollLeft)}};var n=t.prototype;return n.init=function(){t.instances.set(this.el,this);wr&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},n.initDOM=function(){var i=this;if(Array.prototype.filter.call(this.el.children,function(n){return n.classList.contains(i.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl);this.offsetEl.appendChild(this.contentWrapperEl);this.maskEl.appendChild(this.offsetEl);this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);this.wrapperEl.appendChild(this.maskEl);this.wrapperEl.appendChild(this.placeholderEl);this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var n=document.createElement("div"),t=document.createElement("div");n.classList.add(this.classNames.track);t.classList.add(this.classNames.scrollbar);n.appendChild(t);this.axis.x.track.el=n.cloneNode(!0);this.axis.x.track.el.classList.add(this.classNames.horizontal);this.axis.y.track.el=n.cloneNode(!0);this.axis.y.track.el.classList.add(this.classNames.vertical);this.el.appendChild(this.axis.x.track.el);this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar);this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar);this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible));this.el.setAttribute("data-asl_simplebar","init")},n.initListeners=function(){var n=this;this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter);["mousedown","click","dblclick"].forEach(function(t){n.el.addEventListener(t,n.onPointerEvent,!0)});["touchstart","touchend","touchmove"].forEach(function(t){n.el.addEventListener(t,n.onPointerEvent,{capture:!0,passive:!0})});this.el.addEventListener("mousemove",this.onMouseMove);this.el.addEventListener("mouseleave",this.onMouseLeave);this.contentWrapperEl.addEventListener("scroll",this.onScroll);i.addEventListener("resize",this.onWindowResize);var t=!1;this.resizeObserver=new fb(function(){t&&n.recalculate()});this.resizeObserver.observe(this.el);this.resizeObserver.observe(this.contentEl);i.requestAnimationFrame(function(){t=!0});this.mutationObserver=new MutationObserver(this.recalculate);this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},n.recalculate=function(){this.elStyles=i.getComputedStyle(this.el);this.isRtl=this.elStyles.direction==="rtl";var f=this.heightAutoObserverEl.offsetHeight<=1,e=this.heightAutoObserverEl.offsetWidth<=1,t=this.contentEl.offsetWidth,o=this.contentWrapperEl.offsetWidth,s=this.elStyles.overflowX,h=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft;this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var n=this.contentEl.scrollHeight,r=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=f?"auto":"100%";this.placeholderEl.style.width=e?t+"px":"auto";this.placeholderEl.style.height=n+"px";var u=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r>t;this.axis.y.isOverflowing=n>u;this.axis.x.isOverflowing=s==="hidden"?!1:this.axis.x.isOverflowing;this.axis.y.isOverflowing=h==="hidden"?!1:this.axis.y.isOverflowing;this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0;this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0;this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,l=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&r>o-l;this.axis.y.isOverflowing=this.axis.y.isOverflowing&&n>u-c;this.axis.x.scrollbar.size=this.getScrollbarSize("x");this.axis.y.scrollbar.size=this.getScrollbarSize("y");this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px";this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px";this.positionScrollbar("x");this.positionScrollbar("y");this.toggleTrackVisibility("x");this.toggleTrackVisibility("y")},n.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var r=this.contentEl[this.axis[n].scrollSizeAttr],i=this.axis[n].track.el[this.axis[n].offsetSizeAttr],t,u=i/r;return t=Math.max(~~(u*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},n.positionScrollbar=function(n){if(n===void 0&&(n="y"),this.axis[n].isOverflowing){var e=this.contentWrapperEl[this.axis[n].scrollSizeAttr],f=this.axis[n].track.el[this.axis[n].offsetSizeAttr],o=parseInt(this.elStyles[this.axis[n].sizeAttr],10),u=this.axis[n].scrollbar,r=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];r=n==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-r:r;var s=r/(e-o),i=~~((f-u.size)*s);i=n==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?i+(f-u.size):i;u.el.style.transform=n==="x"?"translate3d("+i+"px, 0, 0)":"translate3d(0, "+i+"px, 0)"}},n.toggleTrackVisibility=function(n){n===void 0&&(n="y");var t=this.axis[n].track.el,i=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden");i.style.display=this.axis[n].isOverflowing?"block":"none"},n.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0;this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},n.onMouseMoveForAxis=function(n){n===void 0&&(n="y");this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect();this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var t=this.isWithinBounds(this.axis[n].scrollbar.rect);t?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover);this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},n.onMouseLeaveForAxis=function(n){n===void 0&&(n="y");this.axis[n].track.el.classList.remove(this.classNames.hover);this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},n.showScrollbar=function(n){n===void 0&&(n="y");var t=this.axis[n].scrollbar.el;this.axis[n].isVisible||(t.classList.add(this.classNames.visible),this.axis[n].isVisible=!0);this.options.autoHide&&this.hideScrollbars()},n.onDragStart=function(n,t){t===void 0&&(t="y");var r=this.axis[t].scrollbar,u=t==="y"?n.pageY:n.pageX;this.axis[t].dragOffset=u-r.rect[this.axis[t].offsetAttr];this.draggedAxis=t;this.el.classList.add(this.classNames.dragging);document.addEventListener("mousemove",this.drag,!0);document.addEventListener("mouseup",this.onEndDrag,!0);this.removePreventClickId===null?(document.addEventListener("click",this.preventClick,!0),document.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},n.onTrackClick=function(n,t){var u=this;t===void 0&&(t="y");this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var l=this.axis[t].scrollbar,e=l.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),r=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],a=t==="y"?this.mouseY-e:this.mouseX-e,s=a<0?-1:1,h=s===-1?r-o:r+o,c=40,f=function f(){if(s===-1){if(r>h){var n;r-=c;u.contentWrapperEl.scrollTo((n={},n[u.axis[t].offsetAttr]=r,n));i.requestAnimationFrame(f)}}else if(r<h){var e;r+=c;u.contentWrapperEl.scrollTo((e={},e[u.axis[t].offsetAttr]=r,e));i.requestAnimationFrame(f)}};f()},n.getContentElement=function(){return this.contentEl},n.getScrollElement=function(){return this.contentWrapperEl},n.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style?0:ws()}catch(n){return ws()}},n.removeListeners=function(){var n=this;this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter);["mousedown","click","dblclick"].forEach(function(t){n.el.removeEventListener(t,n.onPointerEvent,!0)});["touchstart","touchend","touchmove"].forEach(function(t){n.el.removeEventListener(t,n.onPointerEvent,{capture:!0,passive:!0})});this.el.removeEventListener("mousemove",this.onMouseMove);this.el.removeEventListener("mouseleave",this.onMouseLeave);this.contentWrapperEl.removeEventListener("scroll",this.onScroll);i.removeEventListener("resize",this.onWindowResize);this.mutationObserver.disconnect();this.resizeObserver.disconnect();this.recalculate.cancel();this.onMouseMove.cancel();this.hideScrollbars.cancel();this.onWindowResize.cancel()},n.unMount=function(){this.removeListeners();t.instances.delete(this.el)},n.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},n.findChild=function(n,t){var i=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(n){return i.call(n,t)})[0]},t}();r.defaultOptions={autoHide:!0,forceVisible:!1,classNames:{contentEl:"asl_simplebar-content",contentWrapper:"asl_simplebar-content-wrapper",offset:"asl_simplebar-offset",mask:"asl_simplebar-mask",wrapper:"asl_simplebar-wrapper",placeholder:"asl_simplebar-placeholder",scrollbar:"asl_simplebar-scrollbar",track:"asl_simplebar-track",heightAutoObserverWrapperEl:"asl_simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"asl_simplebar-height-auto-observer",visible:"asl_simplebar-visible",horizontal:"asl_simplebar-horizontal",vertical:"asl_simplebar-vertical",hover:"asl_simplebar-hover",dragging:"asl_simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};r.instances=new WeakMap;var bs=function(n){return function(t,i,r,u){te(i);var o=ei(t),e=bt(o),s=ui(o.length),f=n?s-1:0,h=n?-1:1;if(r<2)while(!0){if(f in e){u=e[f];f+=h;break}if(f+=h,n?f<0:s<=f)throw TypeError("Reduce of empty array with no initial value");}for(;n?f>=0:s>f;f+=h)f in e&&(u=i(u,e[f],f,o));return u}},eb={left:bs(!1),right:bs(!0)},ob=eb.left;a({target:"Array",proto:!0,forced:oe("reduce")},{reduce:function(n){return ob(this,n,arguments.length,arguments.length>1?arguments[1]:undefined)}});var sb=d.f,nf=Function.prototype,hb=nf.toString,cb=/^\s*function ([^ (]*)/,ks="name";!v||ks in nf||sb(nf,ks,{configurable:!0,get:function(){try{return hb.call(this).match(cb)[1]}catch(n){return""}}});var lb=function(){var t=h(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n},fr=RegExp.prototype.exec,ab=String.prototype.replace,ds=fr,tf=function(){var n=/a/,t=/b*/g;return fr.call(n,"a"),fr.call(t,"a"),n.lastIndex!==0||t.lastIndex!==0}(),rf=/()??/.exec("")[1]!==undefined,vb=tf||rf;vb&&(ds=function(n){var i=this,u,f,t,r;return rf&&(f=new RegExp("^"+i.source+"$(?!\\s)",lb.call(i))),tf&&(u=i.lastIndex),t=fr.call(i,n),tf&&t&&(i.lastIndex=i.global?t.index+t[0].length:u),rf&&t&&t.length>1&&ab.call(t[0],f,function(){for(r=1;r<arguments.length-2;r++)arguments[r]===undefined&&(t[r]=undefined)}),t});var uf=ds;a({target:"RegExp",proto:!0,forced:/./.exec!==uf},{exec:uf});var ck=o("species"),lk=!f(function(){var n=/./;return n.exec=function(){var n=[];return n.groups={a:"7"},n},"".replace(n,"$<a>")!=="7"}),ak=!f(function(){var n=/(?:)/,i=n.exec;n.exec=function(){return i.apply(this,arguments)};var t="ab".split(n);return t.length!==2||t[0]!=="a"||t[1]!=="b"}),yb=uo.charAt,vk=function(n,t,i){return t+(i?yb(n,t).length:1)},yk=function(n,t){var i=n.exec;if(typeof i=="function"){var r=i.call(n,t);if(typeof r!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return r}if(k(n)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return uf.call(n,t)},pk=Math.max,wk=Math.min,bk=Math.floor,kk=function(n){return n===undefined?n:String(n)},er=function(n){return Array.prototype.reduce.call(n,function(n,t){var r=t.name.match(/data-asl_simplebar-(.+)/);if(r){var i=r[1].replace(/\W+(.)/g,function(n,t){return t.toUpperCase()});switch(t.value){case"true":n[i]=!0;break;case"false":n[i]=!1;break;case undefined:n[i]=!0;break;default:n[i]=t.value}}return n},{})};return r.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements);i.removeEventListener("load",this.initDOMLoadedElements);Array.prototype.forEach.call(document.querySelectorAll('[data-asl_simplebar]:not([data-asl_simplebar="init"])'),function(n){r.instances.has(n)||new r(n,er(n.attributes))})},r.removeObserver=function(){this.globalObserver.disconnect()},r.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this);typeof MutationObserver!="undefined"&&(this.globalObserver=new MutationObserver(r.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0}));document.readyState!=="complete"&&(document.readyState==="loading"||document.documentElement.doScroll)?(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),i.addEventListener("load",this.initDOMLoadedElements)):i.setTimeout(this.initDOMLoadedElements)},r.handleMutations=function(n){n.forEach(function(n){Array.prototype.forEach.call(n.addedNodes,function(n){n.nodeType===1&&(n.hasAttribute("data-asl_simplebar")?r.instances.has(n)||new r(n,er(n.attributes)):Array.prototype.forEach.call(n.querySelectorAll('[data-asl_simplebar]:not([data-asl_simplebar="init"])'),function(n){r.instances.has(n)||new r(n,er(n.attributes))}))});Array.prototype.forEach.call(n.removedNodes,function(n){n.nodeType===1&&(n.hasAttribute('[data-asl_simplebar="init"]')?r.instances.has(n)&&r.instances.get(n).unMount():Array.prototype.forEach.call(n.querySelectorAll('[data-asl_simplebar="init"]'),function(n){r.instances.has(n)&&r.instances.get(n).unMount()}))})})},r.getOptions=er,wr&&r.initHtmlApi(),r})}(asljQuery,asljQuery,window),function(n,t,i){
|
3 |
/*! Ajax Search Lite 4.6 js */
|
4 |
-
typeof n!="undefined"&&function(t){var r,y=!0,c={init:function(n,i){var r=this;this.elem=i;this.$elem=t(i);r.searching=!1;r.o=t.extend({blocking:!1},n);r.n={};r.n.container=t(this.elem);r.o.rid=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.o.id=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.n.probox=t(".probox",r.n.container);r.n.proinput=t(".proinput",r.n.container);r.n.text=t(".proinput input.orig",r.n.container);r.n.textAutocomplete=t(".proinput input.autocomplete",r.n.container);r.n.loading=t(".proinput .loading",r.n.container);r.n.proloading=t(".proloading",r.n.container);r.n.proclose=t(".proclose",r.n.container);r.n.promagnifier=t(".promagnifier",r.n.container);r.n.prosettings=t(".prosettings",r.n.container);r.n.searchsettings=t("#ajaxsearchlitesettings"+r.o.rid);r.n.resultsDiv=t("#ajaxsearchliteres"+r.o.rid);r.n.hiddenContainer=t("#asl_hidden_data");r.n.aslItemOverlay=t(".asl_item_overlay",r.n.hiddenContainer);r.resizeTimeout=null;r.n.showmore=t(".showmore",r.n.resultsDiv);r.n.items=t(".item",r.n.resultsDiv);r.n.results=t(".results",r.n.resultsDiv);r.n.resdrg=t(".resdrg",r.n.resultsDiv);r.il={columns:3,itemsPerPage:6};r.post=null;r.postAuto=null;r.cleanUp();r.n.textAutocomplete.val("");r.o.resultitemheight=parseInt(r.o.resultitemheight);r.scroll={};r.savedScrollTop=0;r.savedContainerTop=0;r.is_scroll=typeof asl_SimpleBar!="undefined";typeof ASL.scrollbar!="undefined"&&ASL.scrollbar==0&&(r.is_scroll=!1);r.settScroll=null;r.n.resultsAppend=t("#wpdreams_asl_results_"+r.o.id);r.currentPage=1;r.isotopic=null;r.lastSuccesfulSearch="";r.lastSearchData={};r.triggerPrevState=!1;r.animation="bounceIn";switch(r.o.resultstype){case"vertical":r.animation=r.o.vresultanimation;break;default:r.animation=r.o.hresultanimation}return r.filterFns={number:function(){for(var n=t(this).parent();!n.hasClass("isotopic");)n=n.parent();var i=t(this).attr("data-itemnum"),u=r.currentPage,f=r.il.itemsPerPage;return parseInt(i,10)<f*u&&parseInt(i,10)>=f*(u-1)}},r.disableMobileScroll=!1,r.n.searchsettings.detach().appendTo("body"),r.o.resultsposition=="hover"?r.n.resultsDiv.detach().appendTo("body"):r.n.resultsAppend.length>0&&r.n.resultsDiv.detach().appendTo(r.n.resultsAppend),typeof ASL.resHTML=="undefined"&&(ASL.resHTML=r.n.resultsDiv.html()),typeof ASL.setHTML=="undefined"&&(ASL.setHTML=r.n.searchsettings.html()),t("fieldset",r.n.searchsettings).each(function(){t(".asl_option:not(.hiddend)",this).last().addClass("asl-o-last")}),ASL.js_retain_popstate==1&&r.initPrevState(),p()&&r.n.container.addClass("asl_msie"),r.initSettingsAnimations(),r.initResultsAnimations(),r.initEvents(),r.initAutop(),r.initEtc(),this},initPrevState:function(){var n=this;y&&r==null&&(r=localStorage.getItem("asl-"+e.encode(location.href)),r!=null&&(r=JSON.parse(r),r.settings=e.decode(r.settings)));r!=null&&typeof r.id!="undefined"&&r.id==n.o.id&&(r.phrase!=""&&(n.triggerPrevState=!0,n.n.text.val(r.phrase)),h(t("form",n.n.searchsettings))!=r.settings&&(n.triggerPrevState=!0,h(t("form",n.n.searchsettings),r.settings)));localStorage.removeItem("asl-"+e.encode(location.href));n.n.resultsDiv.on("click",".results .item",function(){var i=n.n.text.val();if(i!=""||n.settingsChanged){var r={id:n.o.id,phrase:i,settings:e.encode(h(t("form",n.n.searchsettings)))};localStorage.setItem("asl-"+e.encode(location.href),JSON.stringify(r))}})},duplicateCheck:function(){var i=this,n={};t("div[id*=ajaxsearchlite]").each(function(){n.hasOwnProperty(this.id)?t(this).remove():n[this.id]="true"})},gaPageview:function(n){var u=this,t=u.gaGetTrackingID();if(typeof ASL.analytics=="undefined"||ASL.analytics.method!="pageview")return!1;if(ASL.analytics.string!=""){var r=typeof __gaTracker=="function"?__gaTracker:typeof ga=="function"?ga:!1,f=typeof gtag=="function"?gtag:!1;i.location.origin||(i.location.origin=i.location.protocol+"//"+i.location.hostname+(i.location.port?":"+i.location.port:""));var e=u.o.homeurl.replace(i.location.origin,"");f!==!1?t!==!1&&f("config",t,{page_path:e+ASL.analytics.string.replace("{asl_term}",n)}):r!==!1&&(t!==!1&&r("create",t,"auto"),r("send","pageview",{page:e+ASL.analytics.string.replace("{asl_term}",n),title:"Ajax Search"}))}},gaEvent:function(n,i){var u=this,f=u.gaGetTrackingID();if(typeof ASL.analytics=="undefined"||ASL.analytics.method!="event")return!1;var e=typeof gtag=="function"?gtag:!1,o=typeof __gaTracker=="function"?__gaTracker:typeof ga=="function"?ga:!1;if(e===!1&&o===!1)return!1;if(typeof ASL.analytics.event[n]!="undefined"&&ASL.analytics.event[n].active==1&&typeof"gtag"!="undefined"){var s={search_id:u.o.id,search_name:u.o.name,phrase:u.n.text.val(),option_name:"",option_value:"",result_title:"",result_url:"",results_count:""},r={event_category:ASL.analytics.event[n].category,event_label:ASL.analytics.event[n].label,value:ASL.analytics.event[n].value};i=t.extend(s,i);t.each(i,function(n,i){i=String(i).replace(/[\s\n\r]+/g," ").trim();t.each(r,function(t,u){var f=new RegExp("{"+n+"}","gmi");r[t]=u.replace(f,i)})});e===!1?(f!==!1&&o("create",f,"auto"),o("send","event",r.event_category,ASL.analytics.event[n].action,r.event_label,r.value)):(f!==!1&&(r.send_to=f),e("event",ASL.analytics.event[n].action,r))}},gaGetTrackingID:function(){var r=this,n=!1;if(typeof ASL.analytics=="undefined")return n;if(typeof ASL.analytics.tracking_id!="undefined"&&ASL.analytics.tracking_id!="")return ASL.analytics.tracking_id;var i=typeof gtag=="function"?gtag:!1;if(i!==!1&&typeof ga!="undefined"&&typeof ga.getAll!="undefined"){var t=!1;return ga.getAll().forEach(function(n){t=n.get("trackingId")}),t}return n},createVerticalScroll:function(){var n=this;n.is_scroll&&typeof n.scroll.recalculate=="undefined"&&(n.scroll=new asl_SimpleBar(n.n.results.get(0),{direction:t("body").hasClass("rtl")?"rtl":"ltr",autoHide:!0}))},initEvents:function(){var r=this;if(u()&&s())r.n.text.on("touchstart",function(){r.savedScrollTop=t(i).scrollTop();r.savedContainerTop=r.n.container.offset().top});r.n.text.on("click",function(){t(this).trigger("focus");r.gaEvent("focus")});r.n.text.on("focus input",function(){r.searching||(t(this).val()!=""?r.n.proclose.css("display","block"):r.n.proclose.css({display:"none"}))});t(r.n.text.parent()).on("submit",function(t){if(t.preventDefault(),u())if(r.o.redirect_on_enter){var i=n.Event("keyup");i.keyCode=i.which=13;r.n.text.trigger(i)}else r.o.redirectEnterTo=="ajax_search"&&(r.search(),document.activeElement.blur());else r.o.redirectEnterTo=="ajax_search"&&r.search()});r.n.resultsDiv.css({opacity:0});t(document).on("click touchend",function(){(r.hideSettings(),r.opened!=!1&&r.o.closeOnDocClick==1)&&r.hideResults()});r.n.proclose.on("click touchend",function(){r.n.text.val("");r.n.textAutocomplete.val("");r.hideResults();r.n.text.trigger("focus")});t(r.elem).on("click touchend",function(n){n.stopImmediatePropagation()});r.n.resultsDiv.on("click touchend",function(n){n.stopImmediatePropagation()});r.n.searchsettings.on("click touchend",function(n){n.stopImmediatePropagation()});r.n.prosettings.on("click",function(){r.n.prosettings.data("opened")==0?r.showSettings():r.hideSettings()});var o=r.n.container.parents().filter(function(){return t(this).css("position")=="fixed"});if((o.length>0||r.n.container.css("position")=="fixed")&&(r.n.resultsDiv.css("position")=="absolute"&&r.n.resultsDiv.css("position","fixed"),r.n.resultsDiv.css("z-index",99999999999),r.o.blocking||r.n.searchsettings.css("position","fixed")),u())t(i).on("orientationchange",function(){r.orientationChange();setTimeout(function(){r.orientationChange()},800)});else{var f;t(i).on("resize",function(){clearTimeout(f);f=setTimeout(function(){r.resize()},100)})}var e;t(i).on("scroll",function(){clearTimeout(e);e=setTimeout(function(){r.scrolling(!1)},400)});s()&&u()&&parseInt(r.n.text.css("font-size"))<16&&(r.n.text.data("fontSize",r.n.text.css("font-size")).css("font-size","16px"),r.n.textAutocomplete.css("font-size","16px"),t("<style>#ajaxsearchlite"+r.o.rid+" input.orig::-webkit-input-placeholder{font-size: 16px !important;}<\/style>").appendTo("head"));r.initNavigationEvent();r.initMagnifierEvent();r.initAutocompleteEvent();r.initFacetEvents()},initAutop:function(){var n=this;if(r!=null&&n.triggerPrevState)return n.search(),r=null,!1},initEtc:function(){var n=this,i=null;t("div.asl_option",n.n.searchsettings).on("mouseup touchend",function(r){if(r.preventDefault(),r.stopImmediatePropagation(),n.dragging)return!1;t('input[type="checkbox"]',this).prop("checked",!t('input[type="checkbox"]',this).prop("checked"));clearTimeout(i);var u=this;i=setTimeout(function(){t('input[type="checkbox"]',u).trigger("asl_chbx_change")},50)});t("div.asl_option label",n.n.searchsettings).on("click",function(n){n.preventDefault()});n.n.resultsDiv.on("click",".results .item",function(){n.gaEvent("result_click",{result_title:t(this).find("a.asl_res_url").text(),result_url:t(this).find("a.asl_res_url").attr("href")});n.o.singleHighlight==1&&(localStorage.removeItem("asl_phrase_highlight"),a(n.n.text.val())!=""&&localStorage.setItem("asl_phrase_highlight",JSON.stringify({phrase:a(n.n.text.val()),id:n.o.id})))});if(u()&&n.o.mobile.menu_selector!="")t(n.o.mobile.menu_selector).on("touchend",function(){var i=this;setTimeout(function(){var r=t(i).find("input.orig");r=r.length==0?t(i).next().find("input.orig"):r;r=r.length==0?t(i).parent().find("input.orig"):r;r=r.length==0?n.n.text:r;n.n.container.is(":visible")&&r.get(0).focus()},300)})},initNavigationEvent:function(){var n=this;t(n.n.resultsDiv).on("mouseenter",".item",function(){t(".item",n.n.resultsDiv).removeClass("hovered");t(this).addClass("hovered")});t(n.n.resultsDiv).on("mouseleave",".item",function(){t(".item",n.n.resultsDiv).removeClass("hovered")});t(document).on("keydown",function(r){if(i.event)var u=i.event.keyCode,o=i.event.type;else if(r)var u=r.which,o=r.type;if(t(".item",n.n.resultsDiv).length>0&&n.n.resultsDiv.css("display")!="none"){if(u==40||u==38){u==40&&(n.n.text.blur(),t(".item.hovered",n.n.resultsDiv).length==0?t(".item",n.n.resultsDiv).first().addClass("hovered"):t(".item.hovered",n.n.resultsDiv).removeClass("hovered").next(".item").addClass("hovered"));u==38&&(n.n.text.blur(),t(".item.hovered",n.n.resultsDiv).length==0?t(".item",n.n.resultsDiv).last().addClass("hovered"):t(".item.hovered",n.n.resultsDiv).removeClass("hovered").prev(".item").addClass("hovered"));r.stopPropagation();r.preventDefault();var f=n.is_scroll?t(n.scroll.getScrollElement()):n.n.results,e=n.n.resultsDiv.find(".resdrg .item.hovered");e.length==0&&(e=n.n.resultsDiv.children().first());f.animate({scrollTop:e.offset().top-f.offset().top+f.scrollTop()},{duration:120})}u==13&&t(".item.hovered",n.n.resultsDiv).length>0&&(r.stopPropagation(),r.preventDefault(),t(".item.hovered a.asl_res_url",n.n.resultsDiv).get(0).click())}})},initMagnifierEvent:function(){var n=this,r,f,u=!1;n.n.text.on("keyup",function(e){if(i.event?(n.keycode=i.event.keyCode,n.ktype=i.event.type):e&&(n.keycode=e.which,n.ktype=e.type),n.keycode==13){if(clearTimeout(f),f=setTimeout(function(){u=!1},300),u)return!1;u=!0}var o=t(this).hasClass("orig");if(n.n.text.val().length>=n.o.charcount&&o&&n.ktype=="keyup"&&n.keycode==13){if(n.gaEvent("return"),n.o.redirect_on_enter==1)n.o.redirectEnterTo!="first_result"?n.doRedirectToResults(n.ktype):n.search();else{if(n.o.redirectEnterTo=="nothing")return!1;t("form",n.n.searchsettings).serialize()+n.n.text.val().trim()==n.lastSuccesfulSearch&&n.resultsOpened||n.search()}clearTimeout(r)}});n.n.promagnifier.add(n.n.text).on("click input",function(u){i.event?(n.keycode=i.event.keyCode,n.ktype=i.event.type):u&&(n.keycode=u.which,n.ktype=u.type);var f=t(this).hasClass("orig");if(n.n.text.val().length<n.o.charcount){n.n.proloading.css("display","none");n.hideResults();n.post!=null&&n.post.abort();clearTimeout(r);return}if(n.n.text.val().length>=n.o.charcount&&!f&&n.o.redirectonclick==1&&n.ktype=="click"&&n.o.redirectClickTo!="first_result"){n.doRedirectToResults(n.ktype);clearTimeout(r);return}if((!(n.keycode>=37)||!(n.keycode<=40))&&(!(n.keycode>=112)||!(n.keycode<=123))){if(f&&n.ktype=="click"||n.keycode==32){t("form",n.n.searchsettings).serialize()+n.n.text.val().trim()==n.lastSuccesfulSearch&&(n.n.proclose.css("display","block"),n.resultsOpened||n.showResults());return}t(this).hasClass("orig")&&n.ktype=="click"||(f||n.ktype!="click"||n.gaEvent("magnifier"),n.o.trigger_on_click!=0||n.ktype!="click")&&(n.o.triggerontype!=0||n.ktype!="input")&&(!f||n.ktype!="input"||n.o.redirectEnterTo!="nothing")&&(f||n.ktype!="click"||n.o.redirectClickTo!="nothing")&&(n.post!=null&&n.post.abort(),clearTimeout(r),n.hideLoader(),r=setTimeout(function(){if(t("form",n.n.searchsettings).serialize()+n.n.text.val().trim()!=n.lastSuccesfulSearch)n.search();else{if(n.n.proclose.css("display","block"),n.isRedirectToFirstResult())return n.doRedirectToFirstResult(),!1;n.resultsOpened||n.showResults()}},250))}})},initFacetEvents:function(){var n=this,i=null;if(n.o.trigger_on_facet_change==1){t("input[type!=checkbox], select",n.n.searchsettings).on("change slidechange",function(){n.n.text.val().length<n.o.charcount||(n.post!=null&&n.post.abort(),clearTimeout(i),i=setTimeout(function(){n.search()},50))});t("input[type=checkbox]",n.n.searchsettings).on("asl_chbx_change",function(){n.n.text.val().length<n.o.charcount||(n.post!=null&&n.post.abort(),n.gaEvent("facet_change",{option_label:t(this).closest("fieldset").find("legend").text(),option_value:t(this).closest(".asl_option").find(".asl_option_label").text()+(t(this).prop("checked")?"(checked)":"(unchecked)")}),clearTimeout(i),i=setTimeout(function(){n.search()},50))})}},isRedirectToFirstResult:function(){var n=this;return t(".asl_res_url",n.n.resultsDiv).length>0&&(n.o.redirectonclick==1&&n.ktype=="click"&&n.o.redirectClickTo=="first_result"||n.o.redirect_on_enter==1&&(n.ktype=="input"||n.ktype=="keyup")&&n.keycode==13&&n.o.redirectEnterTo=="first_result")?!0:!1},doRedirectToFirstResult:function(){var n=this,i;return i=n.ktype=="click"?n.o.redirectClickLoc:n.o.redirectEnterLoc,i=="same"?location.href=t(t(".asl_res_url",n.n.resultsDiv).get(0)).attr("href"):v(t(t(".asl_res_url",n.n.resultsDiv).get(0)).attr("href")),n.hideLoader(),n.hideResults(),!1},doRedirectToResults:function(n){var i=this,e=i.ktype=="click"?i.o.redirectClickTo:i.o.redirectEnterTo,u=n=="click"?i.o.redirectClickLoc:i.o.redirectEnterLoc;if(e=="results_page")var r="?s="+f(i.n.text.val());else if(e=="woo_results_page")var r="?post_type=product&s="+f(i.n.text.val());else var r=i.o.redirect_url.replace("{phrase}",f(i.n.text.val()));if(i.o.homeurl.indexOf("?")>1&&r.indexOf("?")===0&&(r=r.replace("?","&")),i.o.overridewpdefault)if(i.o.override_method=="post")o(i.o.homeurl+r,"post",{asl_active:1,p_asl_data:t("form",i.n.searchsettings).serialize()},u);else{var s=i.o.homeurl+r+"&asl_active=1&p_asid="+i.o.id+"&p_asl_data=1&"+t("form",i.n.searchsettings).serialize();u=="same"?location.href=s:v(s)}else o(i.o.homeurl+r,"post",{np_asl_data:t("form",i.n.searchsettings).serialize()},u);i.n.proloading.css("display","none");i.hideLoader();i.hideResults();i.post!=null&&i.post.abort()},destroy:function(){return this.each(function(){var n=t.extend({},this,c);t(i).unbind(n)})},searchfor:function(n){t(".proinput input",this).val(n).trigger("keyup")},initAutocompleteEvent:function(){var n=this;if(n.o.autocomplete.enabled==1&&!u())n.n.text.on("keyup",function(r){i.event?(n.keycode=i.event.keyCode,n.ktype=i.event.type):r&&(n.keycode=r.which,n.ktype=r.type);var u=39;t("body").hasClass("rtl")&&(u=37);n.keycode==u&&n.n.textAutocomplete.val()!=""?(r.preventDefault(),n.n.text.val(n.n.textAutocomplete.val()),n.post!=null&&n.post.abort(),n.search()):(n.postAuto!=null&&n.postAuto.abort(),n.autocompleteGoogleOnly())})},autocompleteGoogleOnly:function(){var n=this,i=n.n.text.val();if(n.n.text.val()==""){n.n.textAutocomplete.val("");return}var r=n.n.textAutocomplete.val();(r==""||r.indexOf(i)!=0)&&(n.n.textAutocomplete.val(""),t.ajax({url:"https://clients1.google.com/complete/search",dataType:"jsonp",data:{q:i,hl:n.o.autocomplete.lang,nolabels:"t",client:"hp",ds:""},success:function(r){r[1].length>0&&(response=r[1][0][0].replace(/(<([^>]+)>)/ig,""),response=t("<textarea />").html(response).text(),response=response.substr(i.length),n.n.textAutocomplete.val(i+response))}}))},search:function(){var n=this;if((!n.searching||!0)&&!(n.n.text.val().length<n.o.charcount)){n.searching=!0;n.n.proloading.css({display:"block"});n.n.proclose.css({display:"none"});var i={action:"ajaxsearchlite_search",aslp:n.n.text.val(),asid:n.o.id,options:t("form",n.n.searchsettings).serialize()};if(i=l("asl_search_data",i),JSON.stringify(i)===JSON.stringify(n.lastSearchData))return(n.resultsOpened||n.showResults(),n.hideLoader(),n.isRedirectToFirstResult())?(n.doRedirectToFirstResult(),!1):!1;n.gaEvent("search_start");n.post=t.post(ASL.ajaxurl,i,function(r){r=r.replace(/^\s*[\r\n]/gm,"");r=r.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1];r=l("asl_search_html",r);n.n.resdrg.html("");n.n.resdrg.html(r);t(".asl_keyword",n.n.resdrg).on("click",function(){n.n.text.val(t(this).html());t("input.orig",n.n.container).val(t(this).html()).trigger("keydown");t("form",n.n.container).trigger("submit","ajax");n.search()});if(n.n.items=t(".item",n.n.resultsDiv),n.gaEvent("search_end",{results_count:n.n.items.length}),n.gaPageview(n.n.text.val()),n.isRedirectToFirstResult())return n.doRedirectToFirstResult(),!1;if(n.hideLoader(),n.showResults(),n.scrollToResults(),n.lastSuccesfulSearch=t("form",n.n.searchsettings).serialize()+n.n.text.val().trim(),n.lastSearchData=i,n.n.items.length==0)n.n.showmore!=null&&n.n.showmore.css("display","none");else if(n.n.showmore!=null){n.n.showmore.css("display","block");t("a",n.n.showmore).off();t("a",n.n.showmore).on("click",function(){var r=n.o.redirectClickTo,i="?s="+f(n.n.text.val());i=r=="results_page"?"?s="+f(n.n.text.val()):r=="woo_results_page"?"?post_type=product&s="+f(n.n.text.val()):n.o.redirect_url.replace("{phrase}",f(n.n.text.val()));n.o.overridewpdefault?n.o.override_method=="post"?o(n.o.homeurl+i,"post",{asl_active:1,p_asl_data:t("form",n.n.searchsettings).serialize()}):location.href=n.o.homeurl+i+"&asl_active=1&p_asid="+n.o.id+"&p_asl_data=1&"+t("form",n.n.searchsettings).serialize():o(n.o.homeurl+i,"post",{np_asl_data:t("form",n.n.searchsettings).serialize()})})}},"text").fail(function(i,r){i.aborted||r=="abort"||(n.n.resdrg.html(""),n.n.resdrg.html('<div class="asl_nores">The request failed. Please check your connection! Status: '+i.status+"<\/div>"),n.n.items=t(".item",n.n.resultsDiv),n.hideLoader(),n.showResults(),n.scrollToResults())})}},showLoader:function(){var n=this;n.n.proloading.css({display:"block"})},hideLoader:function(){var n=this;n.n.proloading.css({display:"none"});n.n.results.css("display","")},showResultsBox:function(){var n=this;n.n.resultsDiv.css({display:"block",height:"auto"});n.n.items.addClass(n.animationOpacity);n.fixResultsPosition(!0);n.n.resultsDiv.css(n.resAnim.showCSS);n.n.resultsDiv.removeClass(n.resAnim.hideClass).addClass(n.resAnim.showClass)},showResults:function(){var n=this;n.createVerticalScroll();switch(n.o.resultstype){case"vertical":n.showVerticalResults();break;default:n.showHorizontalResults()}n.hideLoader();n.n.proclose.css({display:"block"});n.n.showmore!=null&&(n.n.items.length>0?n.n.showmore.css({display:"block"}):n.n.showmore.css({display:"none"}));n.is_scroll&&typeof n.scroll.recalculate!="undefined"&&setTimeout(function(){n.scroll.recalculate()},500);n.resultsOpened=!0},hideResults:function(){var n=this;if(!n.resultsOpened)return!1;n.n.resultsDiv.removeClass(n.resAnim.showClass).addClass(n.resAnim.hideClass);setTimeout(function(){n.n.resultsDiv.css(n.resAnim.hideCSS)},n.resAnim.duration);n.n.proclose.css({display:"none"});n.n.showmore!=null&&n.n.showmore.css({display:"none"});u()&&document.activeElement.blur();n.resultsOpened=!1},scrollToResults:function(){if(($this=this,this.o.scrollToResults==1)&&!this.$elem.parent().hasClass("asl_preview_data")){if($this.o.resultsposition=="hover")var n=$this.n.probox.offset().top-20;else var n=$this.n.resultsDiv.offset().top-20;t("#wpadminbar").length>0&&(n-=t("#wpadminbar").height());n=n<0?0:n;t("body, html").animate({scrollTop:n},{duration:500})}},createGroup:function(n){return"<div class='group'>"+n+"<\/div>"},showVerticalResults:function(){var n=this;if(n.showResultsBox(),n.n.items.length>0){var e=n.n.items.length<n.o.itemscount?n.n.items.length:n.o.itemscount,h=t(".group",n.n.resultsDiv);if(n.n.items.length<=n.o.itemscount)n.n.results.css({height:"auto"});else{n.n.results.css({height:30});n.resize();var i=0,r=0,u=0,f=0;n.n.items.each(function(){r+=t(this).outerHeight(!0);t(this).outerHeight(!0)>f&&(f=t(this).outerHeight(!0));i++});u=f*e;u>r&&(u=r);i=i<1?1:i;r=r/i*e;n.n.results.css({height:u})}if(n.resize(),n.n.items.last().addClass("asl_last_item"),n.o.highlight==1){var o=n.o.highlightwholewords==1?!0:!1;t("div.item",n.n.resultsDiv).highlight(n.n.text.val().split(" "),{element:"span",className:"highlighted",wordsOnly:o})}}n.resize();n.n.items.length==0&&n.n.results.css({height:"auto"});n.n.results.css({overflowY:"auto"});var s=n.is_scroll?t(n.scroll.getScrollElement()):n.n.results;s.scrollTop(0);n.addAnimation();n.fixResultsPosition(!0);n.searching=!1},addAnimation:function(){var i=this,n=0,r=1;i.n.items.each(function(){var u=this;setTimeout(function(){t(u).addClass(i.animation)},n);n=n+60;r++})},removeAnimation:function(){var n=this;n.n.items.each(function(){var i=this;t(i).removeClass(n.animation)})},initSettingsAnimations:function(){var n=this,t=300;n.settAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":t+"ms"},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:t};n.n.searchsettings.css({"-webkit-animation-duration":n.settAnim.duration+"ms","animation-duration":n.settAnim.duration+"ms"})},initResultsAnimations:function(){var t=this,n=300;t.resAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":n+"ms"},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:n};t.n.resultsDiv.css({"-webkit-animation-duration":n+"ms","animation-duration":n+"ms"})},showSettings:function(){var n=this;n.n.searchsettings.css(n.settAnim.showCSS);n.n.searchsettings.removeClass(n.settAnim.hideClass).addClass(n.settAnim.showClass);n.settScroll==null&&n.is_scroll&&(n.settScroll=[],t(".asl_sett_scroll",n.n.searchsettings).each(function(i){var r=this;setTimeout(function(){n.settScroll[i]=new asl_SimpleBar(t(r).get(0),{direction:t("body").hasClass("rtl")?"rtl":"ltr",autoHide:!0})},20)}));n.n.prosettings.data("opened",1);n.fixSettingsPosition(!0)},hideSettings:function(){var n=this;n.n.searchsettings.removeClass(n.settAnim.showClass).addClass(n.settAnim.hideClass);setTimeout(function(){n.n.searchsettings.css(n.settAnim.hideCSS)},n.settAnim.duration);n.n.prosettings.data("opened",0)},cleanUp:function(){var n=this;t(".searchsettings",n.n.container).length>0&&(t("body>#ajaxsearchlitesettings"+n.o.rid).remove(),t("body>#ajaxsearchliteres"+n.o.rid).remove())},orientationChange:function(){var n=this;n.fixSettingsPosition();n.fixResultsPosition();n.fixTryThisPosition()},resize:function(){var n=this;n.fixSettingsPosition();n.fixResultsPosition();n.fixTryThisPosition()},scrolling:function(n){var t=this;t.fixSettingsPosition(n);t.fixResultsPosition(n)},fixTryThisPosition:function(){},fixResultsPosition:function(n){n=typeof n=="undefined"?!1:n;var i=this,f=i.n.resultsDiv.css("position");if(f=="fixed"||f=="absolute"){var e=0;if(t("body").css("position")!="static"&&(e=t("body").offset().top),n==!0||i.n.resultsDiv.css("visibility")=="visible"){var o=0,h=0,r=i.n.container.offset();if(f=="fixed"&&(e=0,o=t(document).scrollTop(),h=t(document).scrollLeft(),u()&&s()&&i.n.text.is(":focus")&&(o=i.savedScrollTop,r.top=i.savedContainerTop)),typeof r!="undefined"){var c=i.n.container.outerWidth()<240?240:i.n.container.outerWidth();i.n.resultsDiv.outerWidth(c);i.n.resultsDiv.css({top:r.top+i.n.container.outerHeight(!0)+10-e-o,left:r.left-h})}}}},fixSettingsPosition:function(n){n=typeof n=="undefined"?!1:n;var r=this,h=0;if(t("body").css("position")!="static"&&(h=t("body").offset().top),(n==!0||r.n.prosettings.data("opened")!=0)&&r.o.blocking!=!0){if(r.fixSettingsWidth(),r.n.prosettings.css("display")!="none")var e=r.n.prosettings;else var e=r.n.promagnifier;var f=e.offset(),o=0,c=0;r.n.searchsettings.css("position")=="fixed"&&(o=t(i).scrollTop(),c=t(i).scrollLeft(),u()&&s()&&r.n.text.is(":focus")&&(f.top=r.savedContainerTop,o=r.savedScrollTop));r.o.settingsimagepos=="left"?r.n.searchsettings.css({display:"block",top:f.top+e.height()-2-h-o,left:f.left-c}):r.n.searchsettings.css({display:"block",top:f.top+e.height()-2-h-o,left:f.left+e.width()-r.n.searchsettings.width()-c})}},fixSettingsWidth:function(){}};function l(){return typeof wp!="undefined"&&typeof wp.hooks!="undefined"&&typeof wp.hooks.applyFilters!="undefined"?wp.hooks.applyFilters.apply(null,arguments):typeof arguments[1]!="undefined"?arguments[1]:!1}function u(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}}function h(n,i){var r=n.find(":input").get();return arguments.length===1?(i={},t.each(r,function(){!this.name||this.disabled||!(this.checked||/select|textarea/i.test(this.nodeName)||/text/i.test(this.type))||t(this).hasClass("asl_datepicker_field")||t(this).hasClass("asl_datepicker")||(i[this.name]==undefined&&(i[this.name]=[]),i[this.name].push(t(this).val()))}),JSON.stringify(i)):(typeof i!="object"&&(i=JSON.parse(i)),t.each(r,function(){if(this.name&&i[this.name]){var n=i[this.name],r=t(this);if(Object.prototype.toString.call(n)!=="[object Array]"&&(n=[n]),this.type=="checkbox"||this.type=="radio"){for(var e=r.val(),f=!1,u=0;u<n.length;u++)if(n[u]==e){f=!0;break}r.attr("checked",f)}else r.val(n[0])}}),n)}function f(n){return encodeURIComponent(n).replace(/\%20/g,"+")}function a(n){return n.replace(/"|'/g,"")}function o(n,i,r,u){"use strict";var f;f=t("<form />",{action:n,method:i,style:"display: none;"});typeof r!="undefined"&&r!==null&&t.each(r,function(n,i){t("<input />",{type:"hidden",name:n,value:i}).appendTo(f)});typeof u!="undefined"&&u=="new"&&f.attr("target","_blank");f.appendTo("body").trigger("submit")}function v(n){t('<a href="'+n+'" target="_blank">').get(0).click()}function s(){return typeof i.navigator!="undefined"&&typeof i.navigator.userAgent!="undefined"?i.navigator.userAgent.match(/(iPod|iPhone|iPad)/)!=null:!1}function p(){var n=i.navigator.userAgent,t=n.indexOf("MSIE ");return t>0?!0:!1}typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t});t.plugin=function(n,i){t.fn[n]=function(r){return this.each(function(){t.data(this,n)||t.data(this,n,Object.create(i).init(r,this))})}};t.plugin("ajaxsearchlite",c);var e={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(n){var f="",o,t,i,h,c,s,r,u=0;for(n=e._utf8_encode(n);u<n.length;)o=n.charCodeAt(u++),t=n.charCodeAt(u++),i=n.charCodeAt(u++),h=o>>2,c=(o&3)<<4|t>>4,s=(t&15)<<2|i>>6,r=i&63,isNaN(t)?s=r=64:isNaN(i)&&(r=64),f=f+this._keyStr.charAt(h)+this._keyStr.charAt(c)+this._keyStr.charAt(s)+this._keyStr.charAt(r);return f},decode:function(n){var t="",o,s,h,c,u,r,f,i=0;for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)c=this._keyStr.indexOf(n.charAt(i++)),u=this._keyStr.indexOf(n.charAt(i++)),r=this._keyStr.indexOf(n.charAt(i++)),f=this._keyStr.indexOf(n.charAt(i++)),o=c<<2|u>>4,s=(u&15)<<4|r>>2,h=(r&3)<<6|f,t=t+String.fromCharCode(o),r!=64&&(t=t+String.fromCharCode(s)),f!=64&&(t=t+String.fromCharCode(h));return e._utf8_decode(t)},_utf8_encode:function(n){n=n.replace(/\r\n/g,"\n");for(var i="",r=0;r<n.length;r++){var t=n.charCodeAt(r);t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128))}return i},_utf8_decode:function(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}}}(n)}(asljQuery,asljQuery,window),function(n,t,i){if(i.ASL=typeof i.ASL!="undefined"?i.ASL:{},i.ASL.getScope=function(){if(typeof n!="undefined")if(typeof n.fn.ajaxsearchlite=="undefined")for(var t=n,r=n,u=0;u<10;u++)if(typeof t.fn.ajaxsearchlite=="undefined")t=n.noConflict(!0),console.log("ASL: executed one noconflict");else return t.fn.jquery!=r.fn.jquery&&(i.jQuery=i.$=r),t;else return n;return typeof i[ASL.js_scope]!="undefined"?i[ASL.js_scope]:!1},i.ASL.initialized=!1,i.ASL.initialize=function(n){function f(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}function e(n){var t="",s,h,c,l,e,r,o,i=0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)l=u.indexOf(n.charAt(i++)),e=u.indexOf(n.charAt(i++)),r=u.indexOf(n.charAt(i++)),o=u.indexOf(n.charAt(i++)),s=l<<2|e>>4,h=(e&15)<<4|r>>2,c=(r&3)<<6|o,t=t+String.fromCharCode(s),r!=64&&(t=t+String.fromCharCode(h)),o!=64&&(t=t+String.fromCharCode(c));return f(t)}var i=this;if(typeof i.getScope=="undefined"||typeof i.version=="undefined")return!1;var t=i.getScope(),u=".asl_init_data";if(typeof ASL_INSTANCES!="undefined"&&Object.keys(ASL_INSTANCES).length>0?t.each(ASL_INSTANCES,function(n,i){return typeof i=="undefined"?!1:t("#ajaxsearchlite"+n).hasClass("hasASL")?!1:(t("#ajaxsearchlite"+n).addClass("hasASL"),t("#ajaxsearchlite"+n).ajaxsearchlite(i))}):(typeof n!="undefined"&&(u="div[id*=asl_init_id_"+n+"]"),t(u).each(function(){var i=t(this).attr("id").match(/^asl_init_id_(.*)/)[1],n=t(this).data("asldata");if(typeof n=="undefined"||(n=e(n),typeof n=="undefined"||n==""))return!1;var r=JSON.parse(n);return t("#ajaxsearchlite"+i).addClass("hasASL"),t("#ajaxsearchlite"+i).ajaxsearchlite(r)})),i.highlight.enabled){var r=localStorage.getItem("asl_phrase_highlight");localStorage.removeItem("asl_phrase_highlight");r!=null&&(r=JSON.parse(r),t.each(i.highlight.data,function(n,i){var f=i.selector!=""&&t(i.selector).length>0?i.selector:"article";if(f=t(f).length>0?f:"body",t(f).highlight(r.phrase,{element:"span",className:"asl_single_highlighted",wordsOnly:i.whole,excludeParents:".asl_w, .asl-try"}),i.scroll&&t(".asl_single_highlighted").length>0){var u=t(".asl_single_highlighted").offset().top-120;t("#wpadminbar").length>0&&(u-=t("#wpadminbar").height());u=u+i.scroll_offset;u=u<0?0:u;t("html").animate({scrollTop:u},{duration:500})}return!1}))}i.initialized=!0},i.ASL.fixClones=function(){var t=this;if((t.fix_duplicates=t.fix_duplicates||0,t.fix_duplicates==0)||typeof t.getScope=="undefined")return!1;var n=t.getScope(),i={};n(".asl_init_data").each(function(){var t=n(this).attr("id").match(/^asl_init_id_(.*)/)[1];typeof i[t]=="undefined"?i[t]={rid:t,id:t,count:1}:i[t].count++});n.each(i,function(i,r){r.count>1&&n(".asl_m_"+r.rid).each(function(i){if(i==0)return!0;for(var f=n(this).parent(),u=r.id;n("#ajaxsearchlite"+u).length!=0;)u++;n(this).attr("id","ajaxsearchlite"+u);n(this).removeClass("asl_m_"+r.rid).addClass("asl_m_"+u);n(this).removeClass("hasASL");n(".asl_r_"+r.rid,this).length==0&&n(".asl_r_"+r.rid).clone().appendTo(n(this));n(".asl_r_"+r.rid,this).attr("id","ajaxsearchliteres"+u);n(".asl_r_"+r.rid,this).attr("data-id",u);n(".asl_r_"+r.rid,this).removeClass("asl_r_"+r.rid).addClass("asl_r_"+u);typeof ASL.resHTML!="undefined"&&n("#ajaxsearchliteres"+u).html(ASL.resHTML);n(".asl_s_"+r.rid,this).length==0&&n(".asl_s_"+r.rid).length!=0&&n(".asl_s_"+r.rid).clone().appendTo(n(this));n(".asl_sb_"+r.rid,this).length==0&&n(".asl_sb_"+r.rid).length!=0&&n(".asl_sb_"+r.rid).clone().appendTo(n(this));n(".asl_s_"+r.rid,this).attr("id","ajaxsearchlitesettings"+u);typeof ASL.setHTML!="undefined"&&n("#ajaxsearchlitesettings"+u).html(ASL.setHTML);n(".asl_sb_"+r.rid,f).attr("id","ajaxsearchlitebsettings"+u);typeof ASL.setHTML!="undefined"&&n("#ajaxsearchlitebsettings"+u).html(ASL.setHTML);n(".asl_hidden_data",f).length>0&&n(".asl_hidden_data",f).attr("id","asl_hidden_data_"+u);n(".asl_init_data",f).length>0&&n(".asl_init_data",f).attr("id","asl_init_id_"+u);t.initialize(u)})})},i.ASL.ready=function(){var t=this,r=t.getScope(),u=null;if(r===!1)return!1;r(function(){var n,i=0;n=setInterval(function(){if(++i,i>20||t.initialized)return clearInterval(n),!1;console.log("tries",i);t.initialize();clearInterval(n)},200);t.initialize();setTimeout(function(){t.fixClones()},2500)});typeof ASL.detect_ajax!="undefined"&&ASL.detect_ajax==1&&r("body").bind("DOMSubtreeModified",function(){clearTimeout(u);u=setTimeout(function(){t.initialize()},500)});var f;r(i).on("resize",function(){clearTimeout(f);f=setTimeout(function(){t.fixClones()},2e3)});var e,n="#menu-item-search, .fa-search, .fa, .fas";n=n+", .fusion-flyout-menu-toggle, .fusion-main-menu-search-open";n=n+", #search_button";n=n+", .mini-search.popup-search";n=n+", .icon-search";n=n+", .menu-item-search-dropdown";n=n+", .mobile-menu-button";n=n+", .td-icon-search, .tdb-search-icon";n=n+", .side_menu_button, .search_button";n=n+", .raven-search-form-toggle";n=n+", [data-elementor-open-lightbox], .elementor-button-link, .elementor-button";r(function(){r("body").on("click touchend",n,function(){clearTimeout(e);e=setTimeout(function(){t.initialize()},500)})})},i.ASL.loadScriptStack=function(t){if(t.length>0){var r=document.createElement("script");r.src=t.splice(0,1);r.onload=t.length==0?function(){typeof n.fn.ajaxsearchlite!="undefined"&&(console.log("ASL: Initializing via onload.."),i.ASL.ready())}:function(){i.ASL.loadScriptStack(t)};console.log("ASL adding:",r.src);document.body.appendChild(r)}},i.ASL.init=function(){if(typeof n=="undefined"||typeof n.fn.ajaxsearchlite=="undefined"){console.log("ASL: jQuery script is probably deferred or delayed loading, trying to resolve");var t;i.asl_interval_tries=typeof i.asl_interval_tries!="undefined"?i.asl_interval_tries:0;t=setInterval(function(){return(++i.asl_interval_tries,i.asl_interval_tries>5)?(console.log("ASL: faliure, init tried",asl_interval_tries,"times"),clearInterval(t),typeof n!="undefined"&&typeof ASL.min_script_src!="undefined"&&ASL.min_script_src!==null&&(console.log("ASL: jQuery exists, adding ASL script dynamically & trying to load."),ASL.loadScriptStack(ASL.min_script_src),ASL.min_script_src=null),!1):typeof n!="undefined"&&typeof n.fn.ajaxsearchlite!="undefined"?(i.ASL.ready(),console.log("ASL: success at try: ",i.asl_interval_tries),clearInterval(t),!1):void 0},250)}else i.ASL.ready()},typeof i.ASL.version=="undefined"){var u,r=0;console.log("ASL: global not defined, trying to wait..");u=setInterval(function(){return++r,typeof i.ASL.version!="undefined"||r>10?(r>10?console.log("ASL: global found at try ",r):console.log("ASL: global not found, initializing anyways at try ",r),i.ASL.init(),clearInterval(u),!0):void 0},100)}else i.ASL.init()}(asljQuery,asljQuery,window);
|
1 |
/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
2 |
+
!function(n,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){var c=[],l=c.slice,ki=c.concat,ni=c.push,di=c.indexOf,ct={},hf=ct.toString,nt=ct.hasOwnProperty,r={},gi="1.11.1",i=function(n,t){return new i.fn.init(n,t)},cf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,lf=/^-ms-/,af=/-([\da-z])/gi,vf=function(n,t){return t.toUpperCase()};i.fn=i.prototype={jquery:gi,constructor:i,selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return null!=n?0>n?this[n+this.length]:this[n]:l.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ni,sort:c.sort,splice:c.splice};i.extend=i.fn.extend=function(){var r,e,t,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"==typeof n||i.isFunction(n)||(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],t=o[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(e=i.isArray(t)))?(e?(e=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(gi+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!i.isArray(n)&&n-parseFloat(n)>=0},isEmptyObject:function(n){for(var t in n)return!1;return!0},isPlainObject:function(n){var t;if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!nt.call(n,"constructor")&&!nt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(r.ownLast)for(t in n)return nt.call(n,t);for(t in n);return void 0===t||nt.call(n,t)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ct[hf.call(n)]||"object":typeof n},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(lf,"ms-").replace(af,vf)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=ti(n);if(i){if(e){for(;f>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;f>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:function(n){return null==n?"":(n+"").replace(cf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(ti(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ni.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(di)return di.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)while(void 0!==t[i])n[u++]=t[i++];return n.length=u,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;e>r;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=ti(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return ki.apply([],f)},guid:1,proxy:function(n,t){var u,r,f;return"string"==typeof t&&(f=n[t],t=n,n=f),i.isFunction(n)?(u=l.call(arguments,2),r=function(){return n.apply(t||this,u.concat(l.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r):void 0},now:function(){return+new Date},support:r});i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ct["[object "+t+"]"]=t.toLowerCase()});function ti(n){var t=n.length,r=i.type(n);return"function"===r||i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n}var tt=function(n){var it,u,t,ht,oi,et,wt,si,ct,y,rt,p,e,l,a,o,g,lt,ot,f="sizzle"+-new Date,s=n.document,v=0,ki=0,hi=ni(),ci=ni(),li=ni(),bt=function(n,t){return n===t&&(rt=!0),0},ut="undefined",ai=1<<31,di={}.hasOwnProperty,w=[],gi=w.pop,nr=w.push,b=w.push,vi=w.slice,nt=w.indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(this[t]===n)return t;return-1},kt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",i="[\\x20\\t\\r\\n\\f]",ft="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",yi=ft.replace("w","w#"),pi="\\["+i+"*("+ft+")(?:"+i+"*([*^$|!~]?=)"+i+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+yi+"))|)"+i+"*\\]",dt=":("+ft+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+pi+")*)|.*)\\)|)",at=new RegExp("^"+i+"+|((?:^|[^\\\\])(?:\\\\.)*)"+i+"+$","g"),tr=new RegExp("^"+i+"*,"+i+"*"),ir=new RegExp("^"+i+"*([>+~]|"+i+")"+i+"*"),rr=new RegExp("="+i+"*([^\\]'\"]*?)"+i+"*\\]","g"),ur=new RegExp(dt),fr=new RegExp("^"+yi+"$"),vt={ID:new RegExp("^#("+ft+")"),CLASS:new RegExp("^\\.("+ft+")"),TAG:new RegExp("^("+ft.replace("w","w*")+")"),ATTR:new RegExp("^"+pi),PSEUDO:new RegExp("^"+dt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+i+"*(even|odd|(([+-]|)(\\d*)n|)"+i+"*(?:([+-]|)"+i+"*(\\d+)|))"+i+"*\\)|)","i"),bool:new RegExp("^(?:"+kt+")$","i"),needsContext:new RegExp("^"+i+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+i+"*((?:-\\d)?\\d*)"+i+"*\\)|)(?=[^-]|$)","i")},er=/^(?:input|select|textarea|button)$/i,or=/^h\d$/i,st=/^[^{]+\{\s*\[native \w/,sr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,hr=/'|\\/g,k=new RegExp("\\\\([\\da-f]{1,6}"+i+"?|("+i+")|.)","ig"),d=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{b.apply(w=vi.call(s.childNodes),s.childNodes);w[s.childNodes.length].nodeType}catch(yr){b={apply:w.length?function(n,t){nr.apply(n,vi.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}function r(n,t,i,r){var w,h,c,v,k,y,d,l,nt,g;if((t?t.ownerDocument||t:s)!==e&&p(t),t=t||e,i=i||[],!n||"string"!=typeof n)return i;if(1!==(v=t.nodeType)&&9!==v)return[];if(a&&!r){if(w=sr.exec(n))if(c=w[1]){if(9===v){if(h=t.getElementById(c),!h||!h.parentNode)return i;if(h.id===c)return i.push(h),i}else if(t.ownerDocument&&(h=t.ownerDocument.getElementById(c))&&ot(t,h)&&h.id===c)return i.push(h),i}else{if(w[2])return b.apply(i,t.getElementsByTagName(n)),i;if((c=w[3])&&u.getElementsByClassName&&t.getElementsByClassName)return b.apply(i,t.getElementsByClassName(c)),i}if(u.qsa&&(!o||!o.test(n))){if(l=d=f,nt=t,g=9===v&&n,1===v&&"object"!==t.nodeName.toLowerCase()){for(y=et(n),(d=t.getAttribute("id"))?l=d.replace(hr,"\\$&"):t.setAttribute("id",l),l="[id='"+l+"'] ",k=y.length;k--;)y[k]=l+yt(y[k]);nt=gt.test(n)&&ii(t.parentNode)||t;g=y.join(",")}if(g)try{return b.apply(i,nt.querySelectorAll(g)),i}catch(tt){}finally{d||t.removeAttribute("id")}}}return si(n.replace(at,"$1"),t,i,r)}function ni(){var i=[];function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}return n}function h(n){return n[f]=!0,n}function c(n){var t=e.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ti(n,i){for(var u=n.split("|"),r=n.length;r--;)t.attrHandle[u[r]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||ai)-(~n.sourceIndex||ai);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function cr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function tt(n){return h(function(t){return t=+t,h(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ii(n){return n&&typeof n.getElementsByTagName!==ut&&n}u=r.support={};oi=r.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};p=r.setDocument=function(n){var v,r=n?n.ownerDocument||n:s,h=r.defaultView;return r!==e&&9===r.nodeType&&r.documentElement?(e=r,l=r.documentElement,a=!oi(r),h&&h!==h.top&&(h.addEventListener?h.addEventListener("unload",function(){p()},!1):h.attachEvent&&h.attachEvent("onunload",function(){p()})),u.attributes=c(function(n){return n.className="i",!n.getAttribute("className")}),u.getElementsByTagName=c(function(n){return n.appendChild(r.createComment("")),!n.getElementsByTagName("*").length}),u.getElementsByClassName=st.test(r.getElementsByClassName)&&c(function(n){return n.innerHTML="<div class='a'><\/div><div class='a i'><\/div>",n.firstChild.className="i",2===n.getElementsByClassName("i").length}),u.getById=c(function(n){return l.appendChild(n).id=f,!r.getElementsByName||!r.getElementsByName(f).length}),u.getById?(t.find.ID=function(n,t){if(typeof t.getElementById!==ut&&a){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},t.filter.ID=function(n){var t=n.replace(k,d);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(k,d);return function(n){var i=typeof n.getAttributeNode!==ut&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=u.getElementsByTagName?function(n,t){if(typeof t.getElementsByTagName!==ut)return t.getElementsByTagName(n)}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=u.getElementsByClassName&&function(n,t){if(typeof t.getElementsByClassName!==ut&&a)return t.getElementsByClassName(n)},g=[],o=[],(u.qsa=st.test(r.querySelectorAll))&&(c(function(n){n.innerHTML="<select msallowclip=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowclip^='']").length&&o.push("[*^$]="+i+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+i+"*(?:value|"+kt+")");n.querySelectorAll(":checked").length||o.push(":checked")}),c(function(n){var t=r.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+i+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(u.matchesSelector=st.test(lt=l.matches||l.webkitMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector||l.msMatchesSelector))&&c(function(n){u.disconnectedMatch=lt.call(n,"div");lt.call(n,"[s!='']:x");g.push("!=",dt)}),o=o.length&&new RegExp(o.join("|")),g=g.length&&new RegExp(g.join("|")),v=st.test(l.compareDocumentPosition),ot=v||st.test(l.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},bt=v?function(n,t){if(n===t)return rt=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&i||!u.sortDetached&&t.compareDocumentPosition(n)===i?n===r||n.ownerDocument===s&&ot(s,n)?-1:t===r||t.ownerDocument===s&&ot(s,t)?1:y?nt.call(y,n)-nt.call(y,t):0:4&i?-1:1)}:function(n,t){if(n===t)return rt=!0,0;var i,u=0,o=n.parentNode,h=t.parentNode,f=[n],e=[t];if(!o||!h)return n===r?-1:t===r?1:o?-1:h?1:y?nt.call(y,n)-nt.call(y,t):0;if(o===h)return wi(n,t);for(i=n;i=i.parentNode;)f.unshift(i);for(i=t;i=i.parentNode;)e.unshift(i);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===s?-1:e[u]===s?1:0},r):e};r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){if((n.ownerDocument||n)!==e&&p(n),t=t.replace(rr,"='$1']"),!(!u.matchesSelector||!a||g&&g.test(t)||o&&o.test(t)))try{var i=lt.call(n,t);if(i||u.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(f){}return r(t,e,null,[n]).length>0};r.contains=function(n,t){return(n.ownerDocument||n)!==e&&p(n),ot(n,t)};r.attr=function(n,i){(n.ownerDocument||n)!==e&&p(n);var f=t.attrHandle[i.toLowerCase()],r=f&&di.call(t.attrHandle,i.toLowerCase())?f(n,i,!a):void 0;return void 0!==r?r:u.attributes||!a?n.getAttribute(i):(r=n.getAttributeNode(i))&&r.specified?r.value:null};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};r.uniqueSort=function(n){var r,f=[],t=0,i=0;if(rt=!u.detectDuplicates,y=!u.sortStable&&n.slice(0),n.sort(bt),rt){while(r=n[i++])r===n[i]&&(t=f.push(i));while(t--)n.splice(f[t],1)}return y=null,n};ht=r.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=ht(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=ht(r);return i};t=r.selectors={cacheLength:50,createPseudo:h,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(k,d),n[3]=(n[3]||n[4]||n[5]||"").replace(k,d),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||r.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&r.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return vt.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&ur.test(t)&&(i=et(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(k,d).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=hi[n+" "];return t||(t=new RegExp("(^|"+i+")"+n+"("+i+"|$)"))&&hi(n,function(n){return t.test("string"==typeof n.className&&n.className||typeof n.getAttribute!==ut&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),a=k[n]||[],y=a[0]===v&&a[1],l=a[0]===v&&a[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[v,y,l];break}}else if(d&&(a=(t[f]||(t[f]={}))[n])&&a[0]===v)l=a[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[v,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,u=t.pseudos[n]||t.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return u[f]?u(i):u.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?h(function(n,t){for(var r,f=u(n,i),e=f.length;e--;)r=nt.call(n,f[e]),n[r]=!(t[r]=f[e])}):function(n){return u(n,0,e)}):u}},pseudos:{not:h(function(n){var i=[],r=[],t=wt(n.replace(at,"$1"));return t[f]?h(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:h(function(n){return function(t){return r(n,t).length>0}}),contains:h(function(n){return function(t){return(t.textContent||t.innerText||ht(t)).indexOf(n)>-1}}),lang:h(function(n){return fr.test(n||"")||r.error("unsupported lang: "+n),n=n.replace(k,d).toLowerCase(),function(t){var i;do if(i=a?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===l},focus:function(n){return n===e.activeElement&&(!e.hasFocus||e.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return or.test(n.nodeName)},input:function(n){return er.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:tt(function(){return[0]}),last:tt(function(n,t){return[t-1]}),eq:tt(function(n,t,i){return[0>i?i+t:i]}),even:tt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:tt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:tt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:tt(function(n,t,i){for(var r=0>i?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(it in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[it]=cr(it);for(it in{submit:!0,reset:!0})t.pseudos[it]=lr(it);function bi(){}bi.prototype=t.filters=t.pseudos;t.setFilters=new bi;et=r.tokenize=function(n,i){var e,f,s,o,u,h,c,l=ci[n+" "];if(l)return i?0:l.slice(0);for(u=n,h=[],c=t.preFilter;u;){(!e||(f=tr.exec(u)))&&(f&&(u=u.slice(f[0].length)||u),h.push(s=[]));e=!1;(f=ir.exec(u))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),u=u.slice(e.length));for(o in t.filter)(f=vt[o].exec(u))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),u=u.slice(e.length));if(!e)break}return i?u.length:u?r.error(n):ci(n,h).slice(0)};function yt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ri(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=ki++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var s,h,c=[v,e];if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u){if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===v&&s[1]===e)return c[2]=s[2];if(h[r]=c,c[2]=n(t,i,o))return!0}}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function ar(n,t,i){for(var u=0,f=t.length;f>u;u++)r(n,t[u],i);return i}function pt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function fi(n,t,i,r,u,e){return r&&!r[f]&&(r=fi(r)),u&&!u[f]&&(u=fi(u,e)),h(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||ar(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:pt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=pt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=pt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function ei(n){for(var s,u,r,o=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ri(function(n){return n===s},c,!0),a=ri(function(n){return nt.call(s,n)>-1},c,!0),e=[function(n,t,i){return!h&&(i||t!==ct)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];o>i;i++)if(u=t.relative[n[i].type])e=[ri(ui(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;o>r;r++)if(t.relative[n[r].type])break;return fi(i>1&&ui(e),i>1&&yt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(at,"$1"),u,r>i&&ei(n.slice(i,r)),o>r&&ei(n=n.slice(r)),o>r&&yt(n))}e.push(u)}return ui(e)}function vr(n,i){var u=i.length>0,f=n.length>0,o=function(o,s,h,c,l){var y,d,w,k=0,a="0",g=o&&[],p=[],nt=ct,tt=o||f&&t.find.TAG("*",l),it=v+=null==nt?1:Math.random()||.1,rt=tt.length;for(l&&(ct=s!==e&&s);a!==rt&&null!=(y=tt[a]);a++){if(f&&y){for(d=0;w=n[d++];)if(w(y,s,h)){c.push(y);break}l&&(v=it)}u&&((y=!w&&y)&&k--,o&&g.push(y))}if(k+=a,u&&a!==k){for(d=0;w=i[d++];)w(g,p,s,h);if(o){if(k>0)while(a--)g[a]||p[a]||(p[a]=gi.call(c));p=pt(p)}b.apply(c,p);l&&!o&&p.length>0&&k+i.length>1&&r.uniqueSort(c)}return l&&(v=it,ct=nt),g};return u?h(o):o}return wt=r.compile=function(n,t){var r,u=[],e=[],i=li[n+" "];if(!i){for(t||(t=et(n)),r=t.length;r--;)i=ei(t[r]),i[f]?u.push(i):e.push(i);i=li(n,vr(e,u));i.selector=n}return i},si=r.select=function(n,i,r,f){var s,e,o,l,v,c="function"==typeof n&&n,h=!f&&et(n=c.selector||n);if(r=r||[],1===h.length){if(e=h[0]=h[0].slice(0),e.length>2&&"ID"===(o=e[0]).type&&u.getById&&9===i.nodeType&&a&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(k,d),i)||[])[0],!i)return r;c&&(i=i.parentNode);n=n.slice(e.shift().value.length)}for(s=vt.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[l=o.type])break;if((v=t.find[l])&&(f=v(o.matches[0].replace(k,d),gt.test(e[0].type)&&ii(i.parentNode)||i))){if(e.splice(s,1),n=f.length&&yt(e),!n)return b.apply(r,f),r;break}}}return(c||wt(n,h))(f,i,!a,r,gt.test(n)&&ii(i.parentNode)||i),r},u.sortStable=f.split("").sort(bt).join("")===f,u.detectDuplicates=!!rt,p(),u.sortDetached=c(function(n){return 1&n.compareDocumentPosition(e.createElement("div"))}),c(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ti("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),u.attributes&&c(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ti("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),c(function(n){return null==n.getAttribute("disabled")})||ti(kt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),r}(n);i.find=tt;i.expr=tt.selectors;i.expr[":"]=i.expr.pseudos;i.unique=tt.uniqueSort;i.text=tt.getText;i.isXMLDoc=tt.isXML;i.contains=tt.contains;var nr=i.expr.match.needsContext,tr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,yf=/^.[^:#\[\.,]*$/;function ii(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(yf.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;f>t;t++)if(i.contains(u[t],this))return!0}));for(t=0;f>t;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ii(this,n||[],!1))},not:function(n){return this.pushStack(ii(this,n||[],!0))},is:function(n){return!!ii(this,"string"==typeof n&&nr.test(n)?i(n):n||[],!1).length}});var ft,u=n.document,pf=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,wf=i.fn.init=function(n,t){var r,f;if(!n)return this;if("string"==typeof n){if(r="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:pf.exec(n),!r||!r[1]&&t)return!t||t.jquery?(t||ft).find(n):this.constructor(t).find(n);if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),tr.test(r[1])&&i.isPlainObject(t))for(r in t)i.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(f=u.getElementById(r[2]),f&&f.parentNode){if(f.id!==r[2])return ft.find(n);this.length=1;this[0]=f}return this.context=u,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?"undefined"!=typeof ft.ready?ft.ready(n):n(i):(void 0!==n.selector&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};wf.prototype=i.fn;ft=i(u);var bf=/^(?:parents|prev(?:Until|All))/,kf={children:!0,contents:!0,next:!0,prev:!0};i.extend({dir:function(n,t,r){for(var f=[],u=n[t];u&&9!==u.nodeType&&(void 0===r||1!==u.nodeType||!i(u).is(r));)1===u.nodeType&&f.push(u),u=u[t];return f},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});i.fn.extend({has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=nr.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.unique(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});function ir(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return ir(n,"nextSibling")},prev:function(n){return ir(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(kf[n]||(f=i.unique(f)),bf.test(n)&&(f=f.reverse())),this.pushStack(f)}});var h=/\S+/g,rr={};function df(n){var t=rr[n]={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}i.Callbacks=function(n){n="string"==typeof n?rr[n]||df(n):i.extend({},n);var o,u,h,f,e,c,t=[],r=!n.once&&[],l=function(i){for(u=n.memory&&i,h=!0,e=c||0,c=0,f=t.length,o=!0;t&&f>e;e++)if(t[e].apply(i[0],i[1])===!1&&n.stopOnFalse){u=!1;break}o=!1;t&&(r?r.length&&l(r.shift()):u?t=[]:s.disable())},s={add:function(){if(t){var r=t.length;!function e(r){i.each(r,function(r,u){var f=i.type(u);"function"===f?n.unique&&s.has(u)||t.push(u):u&&u.length&&"string"!==f&&e(u)})}(arguments);o?f=t.length:u&&(c=r,l(u))}return this},remove:function(){return t&&i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),o&&(f>=u&&f--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,t)>-1:!(!t||!t.length)},empty:function(){return t=[],f=0,this},disable:function(){return t=r=u=void 0,this},disabled:function(){return!t},lock:function(){return r=void 0,u||s.disable(),this},locked:function(){return!r},fireWith:function(n,i){return!t||h&&!r||(i=i||[],i=[n,i.slice?i.slice():i],o?r.push(i):l(i)),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});var lt;i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!u.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(lt.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready")))}}});function ur(){u.addEventListener?(u.removeEventListener("DOMContentLoaded",a,!1),n.removeEventListener("load",a,!1)):(u.detachEvent("onreadystatechange",a),n.detachEvent("onload",a))}function a(){(u.addEventListener||"load"===event.type||"complete"===u.readyState)&&(ur(),i.ready())}i.ready.promise=function(t){if(!lt)if(lt=i.Deferred(),"complete"===u.readyState)setTimeout(i.ready);else if(u.addEventListener)u.addEventListener("DOMContentLoaded",a,!1),n.addEventListener("load",a,!1);else{u.attachEvent("onreadystatechange",a);n.attachEvent("onload",a);var r=!1;try{r=null==n.frameElement&&u.documentElement}catch(e){}r&&r.doScroll&&!function f(){if(!i.isReady){try{r.doScroll("left")}catch(n){return setTimeout(f,50)}ur();i.ready()}}()}return lt.promise(t)};var s="undefined";for(var gf in i(r))break;r.ownLast="0"!==gf;r.inlineBlockNeedsLayout=!1;i(function(){var f,t,n,i;n=u.getElementsByTagName("body")[0];n&&n.style&&(t=u.createElement("div"),i=u.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),typeof t.style.zoom!==s&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",r.inlineBlockNeedsLayout=f=3===t.offsetWidth,f&&(n.style.zoom=1)),n.removeChild(i))}),function(){var n=u.createElement("div");if(null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(t){r.deleteExpando=!1}}n=null}();i.acceptData=function(n){var t=i.noData[(n.nodeName+" ").toLowerCase()],r=+n.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&n.getAttribute("classid")===t};var ne=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/([A-Z])/g;function fr(n,t,r){if(void 0===r&&1===n.nodeType){var u="data-"+t.replace(te,"-$1").toLowerCase();if(r=n.getAttribute(u),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ne.test(r)?i.parseJSON(r):r}catch(f){}i.data(n,t,r)}else r=void 0}return r}function ri(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function er(n,t,r,u){if(i.acceptData(n)){var s,e,h=i.expando,l=n.nodeType,o=l?i.cache:n,f=l?n[h]:n[h]&&h;if(f&&o[f]&&(u||o[f].data)||void 0!==r||"string"!=typeof t)return f||(f=l?n[h]=c.pop()||i.guid++:h),o[f]||(o[f]=l?{}:{toJSON:i.noop}),("object"==typeof t||"function"==typeof t)&&(u?o[f]=i.extend(o[f],t):o[f].data=i.extend(o[f].data,t)),e=o[f],u||(e.data||(e.data={}),e=e.data),void 0!==r&&(e[i.camelCase(t)]=r),"string"==typeof t?(s=e[t],null==s&&(s=e[i.camelCase(t)])):s=e,s}}function or(n,t,u){if(i.acceptData(n)){var o,s,h=n.nodeType,f=h?i.cache:n,e=h?n[i.expando]:i.expando;if(f[e]){if(t&&(o=u?f[e]:f[e].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in o)?t=[t]:(t=i.camelCase(t),t=(t in o)?[t]:t.split(" ")),s=t.length;s--;)delete o[t[s]];if(u?!ri(o):!i.isEmptyObject(o))return}(u||(delete f[e].data,ri(f[e])))&&(h?i.cleanData([n],!0):r.deleteExpando||f!=f.window?delete f[e]:f[e]=null)}}}i.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ri(n)},data:function(n,t,i){return er(n,t,i)},removeData:function(n,t){return or(n,t)},_data:function(n,t,i){return er(n,t,i,!0)},_removeData:function(n,t){return or(n,t,!0)}});i.fn.extend({data:function(n,t){var f,u,e,r=this[0],o=r&&r.attributes;if(void 0===n){if(this.length&&(e=i.data(r),1===r.nodeType&&!i._data(r,"parsedAttrs"))){for(f=o.length;f--;)o[f]&&(u=o[f].name,0===u.indexOf("data-")&&(u=i.camelCase(u.slice(5)),fr(r,u,e[u])));i._data(r,"parsedAttrs",!0)}return e}return"object"==typeof n?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,t)}):r?fr(r,n,i.data(r,n)):void 0},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return(t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[])},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var r,f=1,e=i.Deferred(),u=this,o=this.length,s=function(){--f||e.resolveWith(u,[u])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";o--;)r=i._data(u[o],n+"queueHooks"),r&&r.empty&&(f++,r.empty.add(s));return s(),e.promise(t)}});var at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,p=["Top","Right","Bottom","Left"],et=function(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)},w=i.access=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)i.access(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;c>s;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e},ui=/^(?:checkbox|radio)$/i;!function(){var t=u.createElement("input"),n=u.createElement("div"),i=u.createDocumentFragment();if(n.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",r.leadingWhitespace=3===n.firstChild.nodeType,r.tbody=!n.getElementsByTagName("tbody").length,r.htmlSerialize=!!n.getElementsByTagName("link").length,r.html5Clone="<:nav><\/:nav>"!==u.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,i.appendChild(t),r.appendChecked=t.checked,n.innerHTML="<textarea>x<\/textarea>",r.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue,i.appendChild(n),n.innerHTML="<input type='radio' checked='checked' name='t'/>",r.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,r.noCloneEvent=!0,n.attachEvent&&(n.attachEvent("onclick",function(){r.noCloneEvent=!1}),n.cloneNode(!0).click()),null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(f){r.deleteExpando=!1}}}(),function(){var t,i,f=u.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})i="on"+t,(r[t+"Bubbles"]=i in n)||(f.setAttribute(i,"t"),r[t+"Bubbles"]=f.attributes[i].expando===!1);f=null}();var fi=/^(?:input|select|textarea)$/i,ie=/^key/,re=/^(?:mouse|pointer|contextmenu)|click/,sr=/^(?:focusinfocus|focusoutblur)$/,hr=/^([^.]*)(?:\.(.+)|)$/;function vt(){return!0}function it(){return!1}function cr(){try{return u.activeElement}catch(n){}}i.event={global:{},add:function(n,t,r,u,f){var w,y,b,p,o,c,l,a,e,k,d,v=i._data(n);if(v){for(r.handler&&(p=r,r=p.handler,f=p.selector),r.guid||(r.guid=i.guid++),(y=v.events)||(y=v.events={}),(c=v.handle)||(c=v.handle=function(n){if(typeof i!==s&&(!n||i.event.triggered!==n.type))return i.event.dispatch.apply(c.elem,arguments)},c.elem=n),t=(t||"").match(h)||[""],b=t.length;b--;)w=hr.exec(t[b])||[],e=d=w[1],k=(w[2]||"").split(".").sort(),e&&(o=i.event.special[e]||{},e=(f?o.delegateType:o.bindType)||e,o=i.event.special[e]||{},l=i.extend({type:e,origType:d,data:u,handler:r,guid:r.guid,selector:f,needsContext:f&&i.expr.match.needsContext.test(f),namespace:k.join(".")},p),(a=y[e])||(a=y[e]=[],a.delegateCount=0,o.setup&&o.setup.call(n,u,k,c)!==!1||(n.addEventListener?n.addEventListener(e,c,!1):n.attachEvent&&n.attachEvent("on"+e,c))),o.add&&(o.add.call(n,l),l.handler.guid||(l.handler.guid=r.guid)),f?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[e]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,s,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;)if(s=hr.exec(t[p])||[],e=k=s[1],w=(s[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],s=s[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||s&&!s.test(o.namespace)||u&&u!==o.selector&&("**"!==u||!o.selector)||(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(t,r,f,e){var l,a,o,p,c,h,w,y=[f||u],s=nt.call(t,"type")?t.type:t,v=nt.call(t,"namespace")?t.namespace.split("."):[];if(o=h=f=f||u,3!==f.nodeType&&8!==f.nodeType&&!sr.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(v=s.split("."),s=v.shift(),v.sort()),a=s.indexOf(":")<0&&"on"+s,t=t[i.expando]?t:new i.Event(s,"object"==typeof t&&t),t.isTrigger=e?2:3,t.namespace=v.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=f),r=null==r?[t]:i.makeArray(r,[t]),c=i.event.special[s]||{},e||!c.trigger||c.trigger.apply(f,r)!==!1)){if(!e&&!c.noBubble&&!i.isWindow(f)){for(p=c.delegateType||s,sr.test(p+s)||(o=o.parentNode);o;o=o.parentNode)y.push(o),h=o;h===(f.ownerDocument||u)&&y.push(h.defaultView||h.parentWindow||n)}for(w=0;(o=y[w++])&&!t.isPropagationStopped();)t.type=w>1?p:c.bindType||s,l=(i._data(o,"events")||{})[t.type]&&i._data(o,"handle"),l&&l.apply(o,r),l=a&&o[a],l&&l.apply&&i.acceptData(o)&&(t.result=l.apply(o,r),t.result===!1&&t.preventDefault());if(t.type=s,!e&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(y.pop(),r)===!1)&&i.acceptData(f)&&a&&f[s]&&!i.isWindow(f)){h=f[a];h&&(f[a]=null);i.event.triggered=s;try{f[s]()}catch(b){}i.event.triggered=void 0;h&&(f[a]=h)}return t.result}},dispatch:function(n){n=i.event.fix(n);var e,f,t,r,o,s=[],h=l.call(arguments),c=(i._data(this,"events")||{})[n.type]||[],u=i.event.special[n.type]||{};if(h[0]=n,n.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,n)!==!1){for(s=i.event.handlers.call(this,n,c),e=0;(r=s[e++])&&!n.isPropagationStopped();)for(n.currentTarget=r.elem,o=0;(t=r.handlers[o++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(t.namespace))&&(n.handleObj=t,n.data=t.data,f=((i.event.special[t.origType]||{}).handle||t.handler).apply(r.elem,h),void 0!==f&&(n.result=f)===!1&&(n.preventDefault(),n.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,n),n.result}},handlers:function(n,t){var f,e,u,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(!n.button||"click"!==n.type))for(;r!=this;r=r.parentNode||this)if(1===r.nodeType&&(r.disabled!==!0||"click"!==n.type)){for(u=[],o=0;s>o;o++)e=t[o],f=e.selector+" ",void 0===u[f]&&(u[f]=e.needsContext?i(f,this).index(r)>=0:i.find(f,this,null,[r]).length),u[f]&&u.push(e);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},fix:function(n){if(n[i.expando])return n;var e,o,s,r=n.type,f=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=re.test(r)?this.mouseHooks:ie.test(r)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||u),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var i,e,r,f=t.button,o=t.fromElement;return null==n.pageX&&null!=t.clientX&&(e=n.target.ownerDocument||u,r=e.documentElement,i=e.body,n.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),n.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!n.relatedTarget&&o&&(n.relatedTarget=o===n.target?t.toElement:o),n.which||void 0===f||(n.which=1&f?1:2&f?3:4&f?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===cr()&&this.blur)return(this.blur(),!1)},delegateType:"focusout"},click:{trigger:function(){if(i.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return(this.click(),!1)},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=u.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===s&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&n.returnValue===!1?vt:it):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={isDefaultPrevented:it,isPropagationStopped:it,isImmediatePropagationStopped:it,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=vt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=vt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=vt;n&&n.stopImmediatePropagation&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});r.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:void i.event.add(this,"click._submit keypress._submit",function(n){var r=n.target,t=i.nodeName(r,"input")||i.nodeName(r,"button")?r.form:void 0;t&&!i._data(t,"submitBubbles")&&(i.event.add(t,"submit._submit",function(n){n._submit_bubble=!0}),i._data(t,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:void i.event.remove(this,"._submit")}});r.changeBubbles||(i.event.special.change={setup:function(){return fi.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1):void i.event.add(this,"beforeactivate._change",function(n){var t=n.target;fi.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!fi.test(this.nodeName)}});r.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var r=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){var u=this.ownerDocument||this,f=i._data(u,t);f||u.addEventListener(n,r,!0);i._data(u,t,(f||0)+1)},teardown:function(){var u=this.ownerDocument||this,f=i._data(u,t)-1;f?i._data(u,t,f):(u.removeEventListener(n,r,!0),i._removeData(u,t))}}});i.fn.extend({on:function(n,t,r,u,f){var o,e;if("object"==typeof n){"string"!=typeof t&&(r=r||t,t=void 0);for(o in n)this.on(o,t,r,n[o],f);return this}if(null==r&&null==u?(u=t,r=t=void 0):null==u&&("string"==typeof t?(u=r,r=void 0):(u=r,r=t,t=void 0)),u===!1)u=it;else if(!u)return this;return 1===f&&(e=u,u=function(n){return i().off(n),e.apply(this,arguments)},u.guid=e.guid||(e.guid=i.guid++)),this.each(function(){i.event.add(this,n,u,r,t)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=it),this.each(function(){i.event.remove(this,n,r,t)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});function lr(n){var i=ar.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}var ar="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ue=/ jQuery\d+="(?:null|\d+)"/g,vr=new RegExp("<(?:"+ar+")[\\s/>]","i"),ei=/^\s+/,yr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,pr=/<([\w:]+)/,wr=/<tbody/i,fe=/<|&#?\w+;/,ee=/<(?:script|style|link)/i,oe=/checked\s*(?:[^=]|=\s*.checked.)/i,br=/^$|\/(?:java|ecma)script/i,se=/^true\/(.*)/,he=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,o={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:r.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},ce=lr(u),oi=ce.appendChild(u.createElement("div"));o.optgroup=o.option;o.tbody=o.tfoot=o.colgroup=o.caption=o.thead;o.th=o.td;function f(n,t){var e,u,o=0,r=typeof n.getElementsByTagName!==s?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!==s?n.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],e=n.childNodes||n;null!=(u=e[o]);o++)!t||i.nodeName(u,t)?r.push(u):i.merge(r,f(u,t));return void 0===t||t&&i.nodeName(n,t)?i.merge([n],r):r}function le(n){ui.test(n.type)&&(n.defaultChecked=n.checked)}function kr(n,t){return i.nodeName(n,"table")&&i.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function dr(n){return n.type=(null!==i.find.attr(n,"type"))+"/"+n.type,n}function gr(n){var t=se.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function si(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function nu(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function ae(n,t){var u,e,f;if(1===t.nodeType){if(u=t.nodeName.toLowerCase(),!r.noCloneEvent&&t[i.expando]){f=i._data(t);for(e in f.events)i.removeEvent(t,e,f.handle);t.removeAttribute(i.expando)}"script"===u&&t.text!==n.text?(dr(t).text=n.text,gr(t)):"object"===u?(t.parentNode&&(t.outerHTML=n.outerHTML),r.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===u&&ui.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===u?t.defaultSelected=t.selected=n.defaultSelected:("input"===u||"textarea"===u)&&(t.defaultValue=n.defaultValue)}}i.extend({clone:function(n,t,u){var e,c,s,o,h,l=i.contains(n.ownerDocument,n);if(r.html5Clone||i.isXMLDoc(n)||!vr.test("<"+n.nodeName+">")?s=n.cloneNode(!0):(oi.innerHTML=n.outerHTML,oi.removeChild(s=oi.firstChild)),!(r.noCloneEvent&&r.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=f(s),h=f(n),o=0;null!=(c=h[o]);++o)e[o]&&ae(c,e[o]);if(t)if(u)for(h=h||f(n),e=e||f(s),o=0;null!=(c=h[o]);o++)nu(c,e[o]);else nu(n,s);return e=f(s,"script"),e.length>0&&si(e,!l&&f(n,"script")),e=h=c=null,s},buildFragment:function(n,t,u,e){for(var c,s,b,h,p,w,a,k=n.length,v=lr(t),l=[],y=0;k>y;y++)if(s=n[y],s||0===s)if("object"===i.type(s))i.merge(l,s.nodeType?[s]:s);else if(fe.test(s)){for(h=h||v.appendChild(t.createElement("div")),p=(pr.exec(s)||["",""])[1].toLowerCase(),a=o[p]||o._default,h.innerHTML=a[1]+s.replace(yr,"<$1><\/$2>")+a[2],c=a[0];c--;)h=h.lastChild;if(!r.leadingWhitespace&&ei.test(s)&&l.push(t.createTextNode(ei.exec(s)[0])),!r.tbody)for(s="table"!==p||wr.test(s)?"<table>"!==a[1]||wr.test(s)?0:h:h.firstChild,c=s&&s.childNodes.length;c--;)i.nodeName(w=s.childNodes[c],"tbody")&&!w.childNodes.length&&s.removeChild(w);for(i.merge(l,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=v.lastChild}else l.push(t.createTextNode(s));for(h&&v.removeChild(h),r.appendChecked||i.grep(f(l,"input"),le),y=0;s=l[y++];)if((!e||-1===i.inArray(s,e))&&(b=i.contains(s.ownerDocument,s),h=f(v.appendChild(s),"script"),b&&si(h),u))for(c=0;s=h[c++];)br.test(s.type||"")&&u.push(s);return h=null,v},cleanData:function(n,t){for(var u,e,f,o,a=0,h=i.expando,l=i.cache,v=r.deleteExpando,y=i.event.special;null!=(u=n[a]);a++)if((t||i.acceptData(u))&&(f=u[h],o=f&&l[f])){if(o.events)for(e in o.events)y[e]?i.event.remove(u,e):i.removeEvent(u,e,o.handle);l[f]&&(delete l[f],v?delete u[h]:typeof u.removeAttribute!==s?u.removeAttribute(h):u[h]=null,c.push(f))}}});i.fn.extend({text:function(n){return w(this,function(n){return void 0===n?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=kr(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=kr(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,u=0;null!=(r=e[u]);u++)t||1!==r.nodeType||i.cleanData(f(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&si(f(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(f(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return w(this,function(n){var t=this[0]||{},u=0,e=this.length;if(void 0===n)return 1===t.nodeType?t.innerHTML.replace(ue,""):void 0;if(!("string"!=typeof n||ee.test(n)||!r.htmlSerialize&&vr.test(n)||!r.leadingWhitespace&&ei.test(n)||o[(pr.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(yr,"<$1><\/$2>");try{for(;e>u;u++)t=this[u]||{},1===t.nodeType&&(i.cleanData(f(t,!1)),t.innerHTML=n);t=0}catch(s){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=arguments[0];return this.domManip(arguments,function(t){n=this.parentNode;i.cleanData(f(this));n&&n.replaceChild(t,this)}),n&&(n.length||n.nodeType)?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t){n=ki.apply([],n);var h,u,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||l>1&&"string"==typeof a&&!r.checkClone&&oe.test(a))return this.each(function(i){var r=p.eq(i);y&&(n[0]=a.call(this,i,r.html()));r.domManip(n,t)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),h=s.firstChild,1===s.childNodes.length&&(s=h),h)){for(o=i.map(f(s,"script"),dr),c=o.length;l>e;e++)u=s,e!==w&&(u=i.clone(u,!0,!0),c&&i.merge(o,f(u,"script"))),t.call(this[e],u,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,gr),e=0;c>e;e++)u=o[e],br.test(u.type||"")&&!i._data(u,"globalEval")&&i.contains(v,u)&&(u.src?i._evalUrl&&i._evalUrl(u.src):i.globalEval((u.text||u.textContent||u.innerHTML||"").replace(he,"")));s=h=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ni.apply(f,u.get());return this.pushStack(f)}});var ot,tu={};function iu(t,r){var f,u=i(r.createElement(t)).appendTo(r.body),e=n.getDefaultComputedStyle&&(f=n.getDefaultComputedStyle(u[0]))?f.display:i.css(u[0],"display");return u.detach(),e}function yt(n){var r=u,t=tu[n];return t||(t=iu(n,r),"none"!==t&&t||(ot=(ot||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=(ot[0].contentWindow||ot[0].contentDocument).document,r.write(),r.close(),t=iu(n,r),ot.detach()),tu[n]=t),t}!function(){var n;r.shrinkWrapBlocks=function(){if(null!=n)return n;n=!1;var t,i,r;return i=u.getElementsByTagName("body")[0],i&&i.style?(t=u.createElement("div"),r=u.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(r).appendChild(t),typeof t.style.zoom!==s&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(u.createElement("div")).style.width="5px",n=3!==t.offsetWidth),i.removeChild(r),n):void 0}}();var ru=/^margin/,pt=new RegExp("^("+at+")(?!px)[a-z%]+$","i"),b,k,ve=/^(top|right|bottom|left)$/;n.getComputedStyle?(b=function(n){return n.ownerDocument.defaultView.getComputedStyle(n,null)},k=function(n,t,r){var e,o,s,u,f=n.style;return r=r||b(n),u=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),pt.test(u)&&ru.test(t)&&(e=f.width,o=f.minWidth,s=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=r.width,f.width=e,f.minWidth=o,f.maxWidth=s)),void 0===u?u:u+""}):u.documentElement.currentStyle&&(b=function(n){return n.currentStyle},k=function(n,t,i){var o,f,e,r,u=n.style;return i=i||b(n),r=i?i[t]:void 0,null==r&&u&&u[t]&&(r=u[t]),pt.test(r)&&!ve.test(t)&&(o=u.left,f=n.runtimeStyle,e=f&&f.left,e&&(f.left=n.currentStyle.left),u.left="fontSize"===t?"1em":r,r=u.pixelLeft+"px",u.left=o,e&&(f.left=e)),void 0===r?r:r+""||"auto"});function uu(n,t){return{get:function(){var i=n();if(null!=i)return i?void delete this.get:(this.get=t).apply(this,arguments)}}}!function(){var f,t,l,o,s,e,h;if(f=u.createElement("div"),f.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",l=f.getElementsByTagName("a")[0],t=l&&l.style){t.cssText="float:left;opacity:.5";r.opacity="0.5"===t.opacity;r.cssFloat=!!t.cssFloat;f.style.backgroundClip="content-box";f.cloneNode(!0).style.backgroundClip="";r.clearCloneStyle="content-box"===f.style.backgroundClip;r.boxSizing=""===t.boxSizing||""===t.MozBoxSizing||""===t.WebkitBoxSizing;i.extend(r,{reliableHiddenOffsets:function(){return null==e&&c(),e},boxSizingReliable:function(){return null==s&&c(),s},pixelPosition:function(){return null==o&&c(),o},reliableMarginRight:function(){return null==h&&c(),h}});function c(){var i,r,f,t;r=u.getElementsByTagName("body")[0];r&&r.style&&(i=u.createElement("div"),f=u.createElement("div"),f.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",r.appendChild(f).appendChild(i),i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=s=!1,h=!0,n.getComputedStyle&&(o="1%"!==(n.getComputedStyle(i,null)||{}).top,s="4px"===(n.getComputedStyle(i,null)||{width:"4px"}).width,t=i.appendChild(u.createElement("div")),t.style.cssText=i.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",i.style.width="1px",h=!parseFloat((n.getComputedStyle(t,null)||{}).marginRight)),i.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",t=i.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",e=0===t[0].offsetHeight,e&&(t[0].style.display="",t[1].style.display="none",e=0===t[0].offsetHeight),r.removeChild(f))}}}();i.swap=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};var hi=/alpha\([^)]*\)/i,ye=/opacity\s*=\s*([^)]*)/,pe=/^(none|table(?!-c[ea]).+)/,we=new RegExp("^("+at+")(.*)$","i"),be=new RegExp("^([+-])=("+at+")","i"),ke={position:"absolute",visibility:"hidden",display:"block"},fu={letterSpacing:"0",fontWeight:"400"},eu=["Webkit","O","Moz","ms"];function ou(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=eu.length;i--;)if(t=eu[i]+r,t in n)return t;return u}function su(n,t){for(var f,r,o,e=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||"none"!==f||(r.style.display=""),""===r.style.display&&et(r)&&(e[u]=i._data(r,"olddisplay",yt(r.nodeName)))):(o=et(r),(f&&"none"!==f||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?e[u]||"":"none"));return n}function hu(n,t,i){var r=we.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function cu(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+p[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+p[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+p[e]+"Width",!0,f))):(o+=i.css(n,"padding"+p[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+p[e]+"Width",!0,f)));return o}function lu(n,t,u){var o=!0,f="width"===t?n.offsetWidth:n.offsetHeight,e=b(n),s=r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e);if(0>=f||null==f){if(f=k(n,t,e),(0>f||null==f)&&(f=n.style[t]),pt.test(f))return f;o=s&&(r.boxSizingReliable()||f===n.style[t]);f=parseFloat(f)||0}return f+cu(n,t,u||(s?"border":"content"),o,e)+"px"}i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=k(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:r.cssFloat?"cssFloat":"styleFloat"},style:function(n,t,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,h,e,s=i.camelCase(t),c=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=ou(c,s)),e=i.cssHooks[t]||i.cssHooks[s],void 0===u)return e&&"get"in e&&void 0!==(o=e.get(n,!1,f))?o:c[t];if(h=typeof u,"string"===h&&(o=be.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,t)),h="number"),null!=u&&u===u&&("number"!==h||i.cssNumber[s]||(u+="px"),r.clearCloneStyle||""!==u||0!==t.indexOf("background")||(c[t]="inherit"),!(e&&"set"in e&&void 0===(u=e.set(n,u,f)))))try{c[t]=u}catch(l){}}},css:function(n,t,r,u){var s,f,e,o=i.camelCase(t);return t=i.cssProps[o]||(i.cssProps[o]=ou(n.style,o)),e=i.cssHooks[t]||i.cssHooks[o],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=k(n,t,u)),"normal"===f&&t in fu&&(f=fu[t]),""===r||r?(s=parseFloat(f),r===!0||i.isNumeric(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return pe.test(i.css(n,"display"))&&0===n.offsetWidth?i.swap(n,ke,function(){return lu(n,t,u)}):lu(n,t,u)},set:function(n,u,f){var e=f&&b(n);return hu(n,u,f?cu(n,t,f,r.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,e),e):0)}}});r.opacity||(i.cssHooks.opacity={get:function(n,t){return ye.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(hi,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=hi.test(f)?f.replace(hi,e):f+" "+e)}});i.cssHooks.marginRight=uu(r.reliableMarginRight,function(n,t){if(t)return i.swap(n,{display:"inline-block"},k,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+p[r]+t]=u[r]||u[r-2]||u[0];return f}};ru.test(n)||(i.cssHooks[n+t].set=hu)});i.fn.extend({css:function(n,t){return w(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=b(n),e=t.length;e>u;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return su(this,!0)},hide:function(){return su(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){et(this)?i(this).show():i(this).hide()})}});function e(n,t,i,r,u){return new e.prototype.init(n,t,i,r,u)}i.Tween=e;e.prototype={constructor:e,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=e.propHooks[this.prop];return n&&n.get?n.get(this):e.propHooks._default.get(this)},run:function(n){var r,t=e.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):e.propHooks._default.set(this),this}};e.prototype.init.prototype=e.prototype;e.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};e.propHooks.scrollTop=e.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.fx=e.prototype.init;i.fx.step={};var rt,wt,de=/^(?:toggle|show|hide)$/,au=new RegExp("^(?:([+-])=|)("+at+")([a-z%]*)$","i"),ge=/queueHooks$/,bt=[no],st={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=au.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&au.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3];r=r||[];u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};function vu(){return setTimeout(function(){rt=void 0}),rt=i.now()}function kt(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=p[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function yu(n,t,i){for(var u,f=(st[t]||[]).concat(st["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function no(n,t,u){var f,a,p,v,s,w,h,b,l=this,y={},o=n.style,c=n.nodeType&&et(n),e=i._data(n,"fxshow");u.queue||(s=i._queueHooks(n,"fx"),null==s.unqueued&&(s.unqueued=0,w=s.empty.fire,s.empty.fire=function(){s.unqueued||w()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--;i.queue(n,"fx").length||s.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(u.overflow=[o.overflow,o.overflowX,o.overflowY],h=i.css(n,"display"),b="none"===h?i._data(n,"olddisplay")||yt(n.nodeName):h,"inline"===b&&"none"===i.css(n,"float")&&(r.inlineBlockNeedsLayout&&"inline"!==yt(n.nodeName)?o.zoom=1:o.display="inline-block"));u.overflow&&(o.overflow="hidden",r.shrinkWrapBlocks()||l.always(function(){o.overflow=u.overflow[0];o.overflowX=u.overflow[1];o.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],de.exec(a)){if(delete t[f],p=p||"toggle"===a,a===(c?"hide":"show")){if("show"!==a||!e||void 0===e[f])continue;c=!0}y[f]=e&&e[f]||i.style(n,f)}else h=void 0;if(i.isEmptyObject(y))"inline"===("none"===h?yt(n.nodeName):h)&&(o.display=h);else{e?"hidden"in e&&(c=e.hidden):e=i._data(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;i._removeData(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=yu(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start="width"===f||"height"===f?1:0))}}function to(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function pu(n,t,r){var h,e,o=0,l=bt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=rt||vu(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:rt||vu(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(to(s,u.opts.specialEasing);l>o;o++)if(h=bt[o].call(u,n,s,u.opts))return h;return i.map(s,yu,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}i.Animation=i.extend(pu,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],st[r]=st[r]||[],st[r].unshift(t)},prefilter:function(n,t){t?bt.unshift(n):bt.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(et).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=pu(this,i.extend({},n),e);(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,t,r){var u=function(n){var t=n.stop;delete n.stop;t(r)};return"string"!=typeof n&&(r=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,f=i._data(this);if(t)f[t]&&f[t].stop&&u(f[t]);else for(t in f)f[t]&&f[t].stop&&ge.test(t)&&u(f[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(r),o=!1,e.splice(t,1));(o||!r)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(kt(t,!0),n,i,u)}});i.each({slideDown:kt("show"),slideUp:kt("hide"),slideToggle:kt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=i.timers,t=0;for(rt=i.now();t<n.length;t++)r=n[t],r()||n[t]!==r||n.splice(t--,1);n.length||i.fx.stop();rt=void 0};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){wt||(wt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(wt);wt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},function(){var n,t,f,i,e;t=u.createElement("div");t.setAttribute("className","t");t.innerHTML=" <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";i=t.getElementsByTagName("a")[0];f=u.createElement("select");e=f.appendChild(u.createElement("option"));n=t.getElementsByTagName("input")[0];i.style.cssText="top:1px";r.getSetAttribute="t"!==t.className;r.style=/top/.test(i.getAttribute("style"));r.hrefNormalized="/a"===i.getAttribute("href");r.checkOn=!!n.value;r.optSelected=e.selected;r.enctype=!!u.createElement("form").enctype;f.disabled=!0;r.optDisabled=!e.disabled;n=u.createElement("input");n.setAttribute("value","");r.input=""===n.getAttribute("value");n.value="t";n.setAttribute("type","radio");r.radioValue="t"===n.value}();var io=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":i.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(io,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:i.trim(i.text(n))}},select:{get:function(n){for(var o,t,s=n.options,u=n.selectedIndex,f="select-one"===n.type||0>u,h=f?null:[],c=f?u+1:s.length,e=0>u?c:f?u:0;c>e;e++)if(t=s[e],!(!t.selected&&e!==u||(r.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),f)return o;h.push(o)}return h},set:function(n,t){for(var f,r,u=n.options,o=i.makeArray(t),e=u.length;e--;)if(r=u[e],i.inArray(i.valHooks.option.get(r),o)>=0)try{r.selected=f=!0}catch(s){r.scrollHeight}else r.selected=!1;return f||(n.selectedIndex=-1),u}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};r.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});var ut,wu,v=i.expr.attrHandle,ci=/^(?:checked|selected)$/i,d=r.getSetAttribute,dt=r.input;i.fn.extend({attr:function(n,t){return w(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return typeof n.getAttribute===s?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(t=t.toLowerCase(),u=i.attrHooks[t]||(i.expr.match.bool.test(t)?wu:ut)),void 0===r?u&&"get"in u&&null!==(f=u.get(n,t))?f:(f=i.find.attr(n,t),null==f?void 0:f):null!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):void i.removeAttr(n,t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?dt&&d||!ci.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(d?r:u)},attrHooks:{type:{set:function(n,t){if(!r.radioValue&&"radio"===t&&i.nodeName(n,"input")){var u=n.value;return n.setAttribute("type",t),u&&(n.value=u),t}}}}});wu={set:function(n,t,r){return t===!1?i.removeAttr(n,r):dt&&d||!ci.test(r)?n.setAttribute(!d&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=v[t]||i.find.attr;v[t]=dt&&d||!ci.test(t)?function(n,t,i){var u,f;return i||(f=v[t],v[t]=u,u=null!=r(n,t,i)?t.toLowerCase():null,v[t]=f),u}:function(n,t,r){if(!r)return n[i.camelCase("default-"+t)]?t.toLowerCase():null}});dt&&d||(i.attrHooks.value={set:function(n,t,r){return i.nodeName(n,"input")?void(n.defaultValue=t):ut&&ut.set(n,t,r)}});d||(ut={set:function(n,t,i){var r=n.getAttributeNode(i);return r||n.setAttributeNode(r=n.ownerDocument.createAttribute(i)),r.value=t+="","value"===i||t===n.getAttribute(i)?t:void 0}},v.id=v.name=v.coords=function(n,t,i){var r;if(!i)return(r=n.getAttributeNode(t))&&""!==r.value?r.value:null},i.valHooks.button={get:function(n,t){var i=n.getAttributeNode(t);if(i&&i.specified)return i.value},set:ut.set},i.attrHooks.contenteditable={set:function(n,t,i){ut.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]={set:function(n,i){if(""===i)return(n.setAttribute(t,"auto"),i)}}}));r.style||(i.attrHooks.style={get:function(n){return n.style.cssText||void 0},set:function(n,t){return n.style.cssText=t+""}});var ro=/^(?:input|select|textarea|button|object)$/i,uo=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return w(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=void 0;delete this[n]}catch(t){}})}});i.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(n,t,r){var f,u,o,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return o=1!==e||!i.isXMLDoc(n),o&&(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ro.test(n.nodeName)||uo.test(n.nodeName)&&n.href?0:-1}}}});r.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}});r.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});r.enctype||(i.propFix.enctype="encoding");var li=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(li," "):" ")){for(s=0;u=o[s++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");f=i.trim(r);t.className!==f&&(t.className=f)}return this},removeClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(li," "):"")){for(s=0;u=o[s++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");f=n?i.trim(r):"";t.className!==f&&(t.className=f)}return this},toggleClass:function(n,t){var r=typeof n;return"boolean"==typeof t&&"string"===r?t?this.addClass(n):this.removeClass(n):this.each(i.isFunction(n)?function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,f=0,u=i(this),e=n.match(h)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===s||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(li," ").indexOf(i)>=0)return!0;return!1}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});var ai=i.now(),vi=/\?/,fo=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;i.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var f,r=null,u=i.trim(t+"");return u&&!i.trim(u.replace(fo,function(n,t,i,u){return f&&t&&(r=0),0===r?n:(f=i||t,r+=!u-!i,"")}))?Function("return "+u)():i.error("Invalid JSON: "+t)};i.parseXML=function(t){var r,u;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(u=new DOMParser,r=u.parseFromString(t,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t))}catch(f){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var g,y,eo=/#.*$/,bu=/([?&])_=[^&]*/,oo=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,so=/^(?:GET|HEAD)$/,ho=/^\/\//,ku=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,du={},yi={},gu="*/".concat("*");try{y=location.href}catch(ns){y=u.createElement("a");y.href="";y=y.href}g=ku.exec(y.toLowerCase())||[];function nf(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])"+"===u.charAt(0)?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function tf(n,t,r,u){var f={},o=n===yi;function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}return e(t.dataTypes[0])||!f["*"]&&e("*")}function pi(n,t){var u,r,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function co(n,t,i){for(var o,e,u,f,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(f in s)if(s[f]&&s[f].test(e)){r.unshift(f);break}if(r[0]in i)u=r[0];else{for(f in i){if(!r[0]||n.converters[f+" "+r[0]]){u=f;break}o||(o=f)}u=u||o}if(u)return(u!==r[0]&&r.unshift(u),i[u])}function lo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:y,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(g[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":gu,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?pi(pi(n,i.ajaxSettings),t):pi(i.ajaxSettings,n)},ajaxPrefilter:nf(du),ajaxTransport:nf(yi),ajax:function(n,t){"object"==typeof n&&(t=n,n=void 0);t=t||{};var s,c,f,b,k,l,a,v,r=i.ajaxSetup({},t),o=r.context||r,d=r.context&&(o.nodeType||o.jquery)?i(o):i.event,nt=i.Deferred(),tt=i.Callbacks("once memory"),p=r.statusCode||{},it={},rt={},e=0,ut="canceled",u={readyState:0,getResponseHeader:function(n){var t;if(2===e){if(!v)for(v={};t=oo.exec(b);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===e?b:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return e||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return e||(r.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>e)for(t in n)p[t]=[p[t],n[t]];else u.always(n[u.status]);return this},abort:function(n){var t=n||ut;return a&&a.abort(t),w(0,t),this}};if(nt.promise(u).complete=tt.add,u.success=u.done,u.error=u.fail,r.url=((n||r.url||y)+"").replace(eo,"").replace(ho,g[1]+"//"),r.type=t.method||t.type||r.method||r.type,r.dataTypes=i.trim(r.dataType||"*").toLowerCase().match(h)||[""],null==r.crossDomain&&(s=ku.exec(r.url.toLowerCase()),r.crossDomain=!(!s||s[1]===g[1]&&s[2]===g[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(g[3]||("http:"===g[1]?"80":"443")))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=i.param(r.data,r.traditional)),tf(du,r,t,u),2===e)return u;l=r.global;l&&0==i.active++&&i.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!so.test(r.type);f=r.url;r.hasContent||(r.data&&(f=r.url+=(vi.test(f)?"&":"?")+r.data,delete r.data),r.cache===!1&&(r.url=bu.test(f)?f.replace(bu,"$1_="+ai++):f+(vi.test(f)?"&":"?")+"_="+ai++));r.ifModified&&(i.lastModified[f]&&u.setRequestHeader("If-Modified-Since",i.lastModified[f]),i.etag[f]&&u.setRequestHeader("If-None-Match",i.etag[f]));(r.data&&r.hasContent&&r.contentType!==!1||t.contentType)&&u.setRequestHeader("Content-Type",r.contentType);u.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+gu+"; q=0.01":""):r.accepts["*"]);for(c in r.headers)u.setRequestHeader(c,r.headers[c]);if(r.beforeSend&&(r.beforeSend.call(o,u,r)===!1||2===e))return u.abort();ut="abort";for(c in{success:1,error:1,complete:1})u[c](r[c]);if(a=tf(yi,r,t,u)){u.readyState=1;l&&d.trigger("ajaxSend",[u,r]);r.async&&r.timeout>0&&(k=setTimeout(function(){u.abort("timeout")},r.timeout));try{e=1;a.send(it,w)}catch(ft){if(!(2>e))throw ft;w(-1,ft)}}else w(-1,"No Transport");function w(n,t,s,h){var v,it,g,y,w,c=t;2!==e&&(e=2,k&&clearTimeout(k),a=void 0,b=h||"",u.readyState=n>0?4:0,v=n>=200&&300>n||304===n,s&&(y=co(r,u,s)),y=lo(r,y,u,v),v?(r.ifModified&&(w=u.getResponseHeader("Last-Modified"),w&&(i.lastModified[f]=w),w=u.getResponseHeader("etag"),w&&(i.etag[f]=w)),204===n||"HEAD"===r.type?c="nocontent":304===n?c="notmodified":(c=y.state,it=y.data,g=y.error,v=!g)):(g=c,(n||!c)&&(c="error",0>n&&(n=0))),u.status=n,u.statusText=(t||c)+"",v?nt.resolveWith(o,[it,c,u]):nt.rejectWith(o,[u,c,g]),u.statusCode(p),p=void 0,l&&d.trigger(v?"ajaxSuccess":"ajaxError",[u,r,v?it:g]),tt.fireWith(o,[u,c]),l&&(d.trigger("ajaxComplete",[u,r]),--i.active||i.event.trigger("ajaxStop")))}return u},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax({url:n,type:t,dataType:f,data:r,success:u})}});i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return this.each(i.isFunction(n)?function(t){i(this).wrapInner(n.call(this,t))}:function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!r.reliableHiddenOffsets()&&"none"===(n.style&&n.style.display||i.css(n,"display"))};i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)};var ao=/%20/g,vo=/\[\]$/,rf=/\r?\n/g,yo=/^(?:submit|button|image|reset|file)$/i,po=/^(?:input|select|textarea|keygen)/i;function wi(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||vo.test(n)?u(n,i):wi(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)wi(n+"["+f+"]",t[f],r,u)}i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():null==t?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)wi(r,n[r],t,f);return u.join("&").replace(ao,"+")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&po.test(this.nodeName)&&!yo.test(n)&&(this.checked||!ui.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(rf,"\r\n")}}):{name:t.name,value:r.replace(rf,"\r\n")}}).get()}});i.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&uf()||bo()}:uf;var wo=0,gt={},ht=i.ajaxSettings.xhr();n.ActiveXObject&&i(n).on("unload",function(){for(var n in gt)gt[n](void 0,!0)});r.cors=!!ht&&"withCredentials"in ht;ht=r.ajax=!!ht;ht&&i.ajaxTransport(function(n){if(!n.crossDomain||r.cors){var t;return{send:function(r,u){var e,f=n.xhr(),o=++wo;if(f.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(e in n.xhrFields)f[e]=n.xhrFields[e];n.mimeType&&f.overrideMimeType&&f.overrideMimeType(n.mimeType);n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(e in r)void 0!==r[e]&&f.setRequestHeader(e,r[e]+"");f.send(n.hasContent&&n.data||null);t=function(r,e){var s,c,h;if(t&&(e||4===f.readyState))if(delete gt[o],t=void 0,f.onreadystatechange=i.noop,e)4!==f.readyState&&f.abort();else{h={};s=f.status;"string"==typeof f.responseText&&(h.text=f.responseText);try{c=f.statusText}catch(l){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=h.text?200:404}h&&u(s,c,h,f.getAllResponseHeaders())};n.async?4===f.readyState?setTimeout(t):f.onreadystatechange=gt[o]=t:t()},abort:function(){t&&t(void 0,!0)}}}});function uf(){try{return new n.XMLHttpRequest}catch(t){}}function bo(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var t,r=u.head||i("head")[0]||u.documentElement;return{send:function(i,f){t=u.createElement("script");t.async=!0;n.scriptCharset&&(t.charset=n.scriptCharset);t.src=n.url;t.onload=t.onreadystatechange=function(n,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||f(200,"success"))};r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ff=[],bi=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=ff.pop()||i.expando+"_"+ai++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,e,s=t.jsonp!==!1&&(bi.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&bi.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return(f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(bi,"$1"+f):t.jsonp!==!1&&(t.url+=(vi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return e||i.error(f+" was not called"),e[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){e=arguments},u.always(function(){n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,ff.push(f));e&&i.isFunction(o)&&o(e[0]);e=o=void 0}),"script")});i.parseHTML=function(n,t,r){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(r=t,t=!1);t=t||u;var f=tr.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))};var ef=i.fn.load;i.fn.load=function(n,t,r){if("string"!=typeof n&&ef)return ef.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>=0&&(u=i.trim(n.slice(e,n.length)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),f.length>0&&i.ajax({url:n,type:s,dataType:"html",data:t}).done(function(n){o=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).complete(r&&function(n,t){f.each(r,o||[n.responseText,t,n])}),this};i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length};var of=n.document.documentElement;function sf(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&i.inArray("auto",[s,c])>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,u));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}};i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,u={top:0,left:0},r=this[0],e=r&&r.ownerDocument;if(e)return t=e.documentElement,i.contains(t,r)?(typeof r.getBoundingClientRect!==s&&(u=r.getBoundingClientRect()),f=sf(e),{top:u.top+(f.pageYOffset||t.scrollTop)-(t.clientTop||0),left:u.left+(f.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):u},position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||of;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||of})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r=/Y/.test(t);i.fn[n]=function(u){return w(this,function(n,u,f){var e=sf(n);return void 0===f?e?t in e?e[t]:e.document.documentElement[u]:n[u]:void(e?e.scrollTo(r?i(e).scrollLeft():f,r?f:i(e).scrollTop()):n[u]=f)},n,u,arguments.length,null)}});i.each(["top","left"],function(n,t){i.cssHooks[t]=uu(r.pixelPosition,function(n,r){if(r)return(r=k(n,t),pt.test(r)?i(n).position()[t]+"px":r)})});i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||"boolean"!=typeof u),o=r||(u===!0||f===!0?"margin":"border");return w(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:9===t.nodeType?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):void 0===u?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:void 0,e,null)}})});i.fn.size=function(){return this.length};i.fn.andSelf=i.fn.addBack;"function"==typeof define&&define.amd&&define("asljQuery",[],function(){return i});var ko=n.jQuery,go=n.$;return i.noConflict=function(t){return n.$===i&&(n.$=go),t&&n.jQuery===i&&(n.asljQuery=ko),i},typeof t===s&&(n.asljQuery=n.$=i),i}),function(n){typeof n!="undefined"&&(n.extend({highlight:function(t,i,r,u,f){if(f=f==""?".exhghttt":f,t.nodeType===3){var c=t.data.normalize("NFD").replace(/[\u0300-\u036f]/g,""),e=c.match(i);if(e){var h=document.createElement(r||"span");if(h.className=u||"highlight",/\.|,|\s/.test(e[0].charAt(0)))var l=e.index+1;else var l=e.index;var o=t.splitText(l);o.splitText(e[1].length);var a=o.cloneNode(!0);return h.appendChild(a),o.parentNode.replaceChild(h,o),1}}else if(t.nodeType===1&&t.childNodes&&!/(script|style)/i.test(t.tagName)&&!n(t).closest(f).length>0&&!(t.tagName===r.toUpperCase()&&t.className===u))for(var s=0;s<t.childNodes.length;s++)s+=n.highlight(t.childNodes[s],i,r,u,f);return 0}}),n.fn.unhighlight=function(t){var i={className:"highlight",element:"span"};return n.extend(i,t),this.find(i.element+"."+i.className).each(function(){var n=this.parentNode;n.replaceChild(this.firstChild,this);n.normalize()}).end()},n.fn.highlight=function(t,i){var r={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1,excludeParents:""};if(n.extend(r,i),t.constructor===String&&(t=[t]),t=n.grep(t,function(n){return n!=""}),t=n.map(t,function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g,"")}),t.length==0)return this;var f=r.caseSensitive?"":"i",u="("+t.join("|")+")";r.wordsOnly&&(u="(?:,|^|\\s)"+u+"(?:,|$|\\s)");var e=new RegExp(u,f);return this.each(function(){n.highlight(this,e,r.element,r.className,r.excludeParents)})})}(asljQuery,asljQuery,window),function(n,t,i){(function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t(require("core-js/modules/es.array.for-each"),require("core-js/modules/web.dom-collections.for-each"),require("core-js/modules/es.array.filter"),require("core-js/modules/es.array.iterator"),require("core-js/modules/es.object.assign"),require("core-js/modules/es.object.to-string"),require("core-js/modules/es.parse-int"),require("core-js/modules/es.string.iterator"),require("core-js/modules/es.weak-map"),require("core-js/modules/web.dom-collections.iterator"),require("core-js/modules/es.array.reduce"),require("core-js/modules/es.function.name"),require("core-js/modules/es.regexp.exec"),require("core-js/modules/es.string.match"),require("core-js/modules/es.string.replace")):typeof define=="function"&&define.amd?define(["core-js/modules/es.array.for-each","core-js/modules/web.dom-collections.for-each","core-js/modules/es.array.filter","core-js/modules/es.array.iterator","core-js/modules/es.object.assign","core-js/modules/es.object.to-string","core-js/modules/es.parse-int","core-js/modules/es.string.iterator","core-js/modules/es.weak-map","core-js/modules/web.dom-collections.iterator","core-js/modules/es.array.reduce","core-js/modules/es.function.name","core-js/modules/es.regexp.exec","core-js/modules/es.string.match","core-js/modules/es.string.replace"],t):(n=n||self,n.asl_SimpleBar=t())})(this,function(){"use strict";var t=typeof globalThis!="undefined"?globalThis:typeof i!="undefined"?i:typeof global!="undefined"?global:typeof self!="undefined"?self:{},vt="Expected a function",yt=0/0,ir="[object Symbol]",rr=/^\s+|\s+$/g,ur=/^[-+]0x[0-9a-f]+$/i,fr=/^0b[01]+$/i,er=/^0o[0-7]+$/i,or=parseInt,sr=typeof t=="object"&&t&&t.Object===Object&&t,hr=typeof self=="object"&&self&&self.Object===Object&&self,cr=sr||hr||Function("return this")(),lr=Object.prototype,ar=lr.toString,vr=Math.max,yr=Math.min,rt=function(){return cr.Date.now()};function pr(n,t,i){var f,o,c,e,r,u,s=0,w=!1,h=!1,a=!0;if(typeof n!="function")throw new TypeError(vt);t=pt(t)||0;p(i)&&(w=!!i.leading,h="maxWait"in i,c=h?vr(pt(i.maxWait)||0,t):c,a="trailing"in i?!!i.trailing:a);function v(t){var i=f,r=o;return f=o=undefined,s=t,e=n.apply(r,i)}function d(n){return s=n,r=setTimeout(l,t),w?v(n):e}function g(n){var r=n-u,f=n-s,i=t-r;return h?yr(i,c-f):i}function b(n){var i=n-u,r=n-s;return u===undefined||i>=t||i<0||h&&r>=c}function l(){var n=rt();if(b(n))return k(n);r=setTimeout(l,g(n))}function k(n){return(r=undefined,a&&f)?v(n):(f=o=undefined,e)}function nt(){r!==undefined&&clearTimeout(r);s=0;f=u=o=r=undefined}function tt(){return r===undefined?e:k(rt())}function y(){var n=rt(),i=b(n);if(f=arguments,o=this,u=n,i){if(r===undefined)return d(u);if(h)return r=setTimeout(l,t),v(u)}return r===undefined&&(r=setTimeout(l,t)),e}return y.cancel=nt,y.flush=tt,y}function wr(n,t,i){var r=!0,u=!0;if(typeof n!="function")throw new TypeError(vt);return p(i)&&(r="leading"in i?!!i.leading:r,u="trailing"in i?!!i.trailing:u),pr(n,t,{leading:r,maxWait:t,trailing:u})}function p(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function br(n){return!!n&&typeof n=="object"}function kr(n){return typeof n=="symbol"||br(n)&&ar.call(n)==ir}function pt(n){if(typeof n=="number")return n;if(kr(n))return yt;if(p(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=p(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(rr,"");var i=fr.test(n);return i||er.test(n)?or(n.slice(2),i?2:8):ur.test(n)?yt:+n}var wt=wr,dr="Expected a function",bt=0/0,gr="[object Symbol]",nu=/^\s+|\s+$/g,tu=/^[-+]0x[0-9a-f]+$/i,iu=/^0b[01]+$/i,ru=/^0o[0-7]+$/i,uu=parseInt,fu=typeof t=="object"&&t&&t.Object===Object&&t,eu=typeof self=="object"&&self&&self.Object===Object&&self,ou=fu||eu||Function("return this")(),su=Object.prototype,hu=su.toString,cu=Math.max,lu=Math.min,ut=function(){return ou.Date.now()};function au(n,t,i){var f,o,c,e,r,u,s=0,p=!1,h=!1,a=!0;if(typeof n!="function")throw new TypeError(dr);t=kt(t)||0;ft(i)&&(p=!!i.leading,h="maxWait"in i,c=h?cu(kt(i.maxWait)||0,t):c,a="trailing"in i?!!i.trailing:a);function v(t){var i=f,r=o;return f=o=undefined,s=t,e=n.apply(r,i)}function k(n){return s=n,r=setTimeout(l,t),p?v(n):e}function d(n){var r=n-u,f=n-s,i=t-r;return h?lu(i,c-f):i}function w(n){var i=n-u,r=n-s;return u===undefined||i>=t||i<0||h&&r>=c}function l(){var n=ut();if(w(n))return b(n);r=setTimeout(l,d(n))}function b(n){return(r=undefined,a&&f)?v(n):(f=o=undefined,e)}function g(){r!==undefined&&clearTimeout(r);s=0;f=u=o=r=undefined}function nt(){return r===undefined?e:b(ut())}function y(){var n=ut(),i=w(n);if(f=arguments,o=this,u=n,i){if(r===undefined)return k(u);if(h)return r=setTimeout(l,t),v(u)}return r===undefined&&(r=setTimeout(l,t)),e}return y.cancel=g,y.flush=nt,y}function ft(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function vu(n){return!!n&&typeof n=="object"}function yu(n){return typeof n=="symbol"||vu(n)&&hu.call(n)==gr}function kt(n){if(typeof n=="number")return n;if(yu(n))return bt;if(ft(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=ft(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(nu,"");var i=iu.test(n);return i||ru.test(n)?uu(n.slice(2),i?2:8):tu.test(n)?bt:+n}var dt=au,pu="Expected a function",gt="__lodash_hash_undefined__",wu="[object Function]",bu="[object GeneratorFunction]",ku=/^\[object .+?Constructor\]$/,du=typeof t=="object"&&t&&t.Object===Object&&t,gu=typeof self=="object"&&self&&self.Object===Object&&self,ni=du||gu||Function("return this")();function nf(n,t){return n==null?undefined:n[t]}function tf(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch(i){}return t}var rf=Array.prototype,uf=Function.prototype,ti=Object.prototype,et=ni["__core-js_shared__"],ii=function(){var n=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ri=uf.toString,ot=ti.hasOwnProperty,ff=ti.toString,ef=RegExp("^"+ri.call(ot).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),of=rf.splice,sf=ui(ni,"Map"),a=ui(Object,"create");function f(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function hf(){this.__data__=a?a(null):{}}function cf(n){return this.has(n)&&delete this.__data__[n]}function lf(n){var t=this.__data__;if(a){var i=t[n];return i===gt?undefined:i}return ot.call(t,n)?t[n]:undefined}function af(n){var t=this.__data__;return a?t[n]!==undefined:ot.call(t,n)}function vf(n,t){var i=this.__data__;return i[n]=a&&t===undefined?gt:t,this}f.prototype.clear=hf;f.prototype["delete"]=cf;f.prototype.get=lf;f.prototype.has=af;f.prototype.set=vf;function h(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function yf(){this.__data__=[]}function pf(n){var t=this.__data__,i=w(t,n);if(i<0)return!1;var r=t.length-1;return i==r?t.pop():of.call(t,i,1),!0}function wf(n){var t=this.__data__,i=w(t,n);return i<0?undefined:t[i][1]}function bf(n){return w(this.__data__,n)>-1}function kf(n,t){var i=this.__data__,r=w(i,n);return r<0?i.push([n,t]):i[r][1]=t,this}h.prototype.clear=yf;h.prototype["delete"]=pf;h.prototype.get=wf;h.prototype.has=bf;h.prototype.set=kf;function e(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function df(){this.__data__={hash:new f,map:new(sf||h),string:new f}}function gf(n){return b(this,n)["delete"](n)}function ne(n){return b(this,n).get(n)}function te(n){return b(this,n).has(n)}function ie(n,t){return b(this,n).set(n,t),this}e.prototype.clear=df;e.prototype["delete"]=gf;e.prototype.get=ne;e.prototype.has=te;e.prototype.set=ie;function w(n,t){for(var i=n.length;i--;)if(oe(n[i][0],t))return i;return-1}function re(n){if(!fi(n)||fe(n))return!1;var t=se(n)||tf(n)?ef:ku;return t.test(ee(n))}function b(n,t){var i=n.__data__;return ue(t)?i[typeof t=="string"?"string":"hash"]:i.map}function ui(n,t){var i=nf(n,t);return re(i)?i:undefined}function ue(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function fe(n){return!!ii&&ii in n}function ee(n){if(n!=null){try{return ri.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function st(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(pu);var i=function(){var r=arguments,u=t?t.apply(this,r):r[0],f=i.cache;if(f.has(u))return f.get(u);var e=n.apply(this,r);return i.cache=f.set(u,e),e};return i.cache=new(st.Cache||e),i}st.Cache=e;function oe(n,t){return n===t||n!==n&&t!==t}function se(n){var t=fi(n)?ff.call(n):"";return t==wu||t==bu}function fi(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}var he=st,o=[],ce=function(){return o.some(function(n){return n.activeTargets.length>0})},le=function(){return o.some(function(n){return n.skippedTargets.length>0})},ei="ResizeObserver loop completed with undelivered notifications.",ae=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:ei}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=ei);i.dispatchEvent(n)},v;(function(n){n.BORDER_BOX="border-box";n.CONTENT_BOX="content-box";n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(v||(v={}));var s=function(n){return Object.freeze(n)},ve=function(){function n(n,t){this.inlineSize=n;this.blockSize=t;s(this)}return n}(),oi=function(){function n(n,t,i,r){return this.x=n,this.y=t,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,s(this)}return n.prototype.toJSON=function(){var n=this,t=n.x,i=n.y,r=n.top,u=n.right,f=n.bottom,e=n.left,o=n.width,s=n.height;return{x:t,y:i,top:r,right:u,bottom:f,left:e,width:o,height:s}},n.fromRect=function(t){return new n(t.x,t.y,t.width,t.height)},n}(),ht=function(n){return n instanceof SVGElement&&"getBBox"in n},si=function(n){if(ht(n)){var t=n.getBBox(),r=t.width,u=t.height;return!r&&!u}var i=n,f=i.offsetWidth,e=i.offsetHeight;return!(f||e||n.getClientRects().length)},hi=function(n){var t,i;if(n instanceof Element)return!0;var r=(i=(t=n)===null||t===void 0?void 0:t.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(r&&n instanceof r.Element)},ye=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},y=typeof i!="undefined"?i:{},k=new WeakMap,ci=/auto|scroll/,pe=/^tb|vertical/,we=/msie|trident/i.test(y.navigator&&y.navigator.userAgent),r=function(n){return parseFloat(n||"0")},c=function(n,t,i){return n===void 0&&(n=0),t===void 0&&(t=0),i===void 0&&(i=!1),new ve((i?t:n)||0,(i?n:t)||0)},li=s({devicePixelContentBoxSize:c(),borderBoxSize:c(),contentBoxSize:c(),contentRect:new oi(0,0,0,0)}),ai=function(n,t){if(t===void 0&&(t=!1),k.has(n)&&!t)return k.get(n);if(si(n))return k.set(n,li),li;var i=getComputedStyle(n),u=ht(n)&&n.ownerSVGElement&&n.getBBox(),a=!we&&i.boxSizing==="border-box",o=pe.test(i.writingMode||""),nt=!u&&ci.test(i.overflowY||""),tt=!u&&ci.test(i.overflowX||""),v=u?0:r(i.paddingTop),it=u?0:r(i.paddingRight),rt=u?0:r(i.paddingBottom),y=u?0:r(i.paddingLeft),ut=u?0:r(i.borderTopWidth),ft=u?0:r(i.borderRightWidth),et=u?0:r(i.borderBottomWidth),ot=u?0:r(i.borderLeftWidth),p=y+it,w=v+rt,h=ot+ft,l=ut+et,b=tt?n.offsetHeight-l-n.clientHeight:0,d=nt?n.offsetWidth-h-n.clientWidth:0,st=a?p+h:0,ct=a?w+l:0,f=u?u.width:r(i.width)-st-d,e=u?u.height:r(i.height)-ct-b,lt=f+p+d+h,at=e+w+b+l,g=s({devicePixelContentBoxSize:c(Math.round(f*devicePixelRatio),Math.round(e*devicePixelRatio),o),borderBoxSize:c(lt,at,o),contentBoxSize:c(f,e,o),contentRect:new oi(y,v,f,e)});return k.set(n,g),g},vi=function(n,t,i){var r=ai(n,i),u=r.borderBoxSize,f=r.contentBoxSize,e=r.devicePixelContentBoxSize;switch(t){case v.DEVICE_PIXEL_CONTENT_BOX:return e;case v.BORDER_BOX:return u;default:return f}},be=function(){function n(n){var t=ai(n);this.target=n;this.contentRect=t.contentRect;this.borderBoxSize=s([t.borderBoxSize]);this.contentBoxSize=s([t.contentBoxSize]);this.devicePixelContentBoxSize=s([t.devicePixelContentBoxSize])}return n}(),yi=function(n){if(si(n))return Infinity;for(var i=0,t=n.parentNode;t;)i+=1,t=t.parentNode;return i},ke=function(){var n=Infinity,i=[];o.forEach(function(t){if(t.activeTargets.length!==0){var r=[];t.activeTargets.forEach(function(t){var u=new be(t.target),i=yi(t.target);r.push(u);t.lastReportedSize=vi(t.target,t.observedBox);i<n&&(n=i)});i.push(function(){t.callback.call(t.observer,r,t.observer)});t.activeTargets.splice(0,t.activeTargets.length)}});for(var t=0,r=i;t<r.length;t++){var u=r[t];u()}return n},pi=function(n){o.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length);t.skippedTargets.splice(0,t.skippedTargets.length);t.observationTargets.forEach(function(i){i.isActive()&&(yi(i.target)>n?t.activeTargets.push(i):t.skippedTargets.push(i))})})},de=function(){var n=0;for(pi(n);ce();)n=ke(),pi(n);return le()&&ae(),n>0},ct,wi=[],ge=function(){return wi.splice(0).forEach(function(n){return n()})},no=function(n){if(!ct){var t=0,i=document.createTextNode("");new MutationObserver(function(){return ge()}).observe(i,{characterData:!0});ct=function(){i.textContent=""+(t?t--:t++)}}wi.push(n);ct()},to=function(n){no(function(){requestAnimationFrame(n)})},d=0,io=function(){return!!d},ro=250,uo={attributes:!0,characterData:!0,childList:!0,subtree:!0},bi=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ki=function(n){return n===void 0&&(n=0),Date.now()+n},lt=!1,fo=function(){function n(){var n=this;this.stopped=!0;this.listener=function(){return n.schedule()}}return n.prototype.run=function(n){var t=this;if(n===void 0&&(n=ro),!lt){lt=!0;var i=ki(n);to(function(){var r=!1;try{r=de()}finally{if(lt=!1,n=i-ki(),!io())return;r?t.run(1e3):n>0?t.run(n):t.start()}})}},n.prototype.schedule=function(){this.stop();this.run()},n.prototype.observe=function(){var n=this,t=function(){return n.observer&&n.observer.observe(document.body,uo)};document.body?t():y.addEventListener("DOMContentLoaded",t)},n.prototype.start=function(){var n=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),bi.forEach(function(t){return y.addEventListener(t,n.listener,!0)}))},n.prototype.stop=function(){var n=this;this.stopped||(this.observer&&this.observer.disconnect(),bi.forEach(function(t){return y.removeEventListener(t,n.listener,!0)}),this.stopped=!0)},n}(),at=new fo,di=function(n){!d&&n>0&&at.start();d+=n;d||at.stop()},eo=function(n){return!ht(n)&&!ye(n)&&getComputedStyle(n).display==="inline"},oo=function(){function n(n,t){this.target=n;this.observedBox=t||v.CONTENT_BOX;this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var n=vi(this.target,this.observedBox,!0);return(eo(this.target)&&(this.lastReportedSize=n),this.lastReportedSize.inlineSize!==n.inlineSize||this.lastReportedSize.blockSize!==n.blockSize)?!0:!1},n}(),so=function(){function n(n,t){this.activeTargets=[];this.skippedTargets=[];this.observationTargets=[];this.observer=n;this.callback=t}return n}(),g=new WeakMap,gi=function(n,t){for(var i=0;i<n.length;i+=1)if(n[i].target===t)return i;return-1},nt=function(){function n(){}return n.connect=function(n,t){var i=new so(n,t);g.set(n,i)},n.observe=function(n,t,i){var r=g.get(n),u=r.observationTargets.length===0;gi(r.observationTargets,t)<0&&(u&&o.push(r),r.observationTargets.push(new oo(t,i&&i.box)),di(1),at.schedule())},n.unobserve=function(n,t){var i=g.get(n),r=gi(i.observationTargets,t),u=i.observationTargets.length===1;r>=0&&(u&&o.splice(o.indexOf(i),1),i.observationTargets.splice(r,1),di(-1))},n.disconnect=function(n){var i=this,t=g.get(n);t.observationTargets.slice().forEach(function(t){return i.unobserve(n,t.target)});t.activeTargets.splice(0,t.activeTargets.length)},n}(),ho=function(){function n(n){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof n!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");nt.connect(this,n)}return n.prototype.observe=function(n,t){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hi(n))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");nt.observe(this,n,t)},n.prototype.unobserve=function(n){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hi(n))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");nt.unobserve(this,n)},n.prototype.disconnect=function(){nt.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}(),tt=function(n){return Array.prototype.reduce.call(n,function(n,t){var r=t.name.match(/data-asl_simplebar-(.+)/);if(r){var i=r[1].replace(/\W+(.)/g,function(n,t){return t.toUpperCase()});switch(t.value){case"true":n[i]=!0;break;case"false":n[i]=!1;break;case undefined:n[i]=!0;break;default:n[i]=t.value}}return n},{})};function u(n){return!n||!n.ownerDocument||!n.ownerDocument.defaultView?i:n.ownerDocument.defaultView}function it(n){return!n||!n.ownerDocument?document:n.ownerDocument}var l=null,nr=null;i.addEventListener("resize",function(){nr!==i.devicePixelRatio&&(nr=i.devicePixelRatio,l=null)});function tr(n){if(l===null){var i=it(n);if(typeof i=="undefined")return l=0;var r=i.body,t=i.createElement("div");t.classList.add("asl_simplebar-hide-scrollbar");r.appendChild(t);var u=t.getBoundingClientRect().right;r.removeChild(t);l=u}return l}var n=function(){function t(n,i){var r=this;(this.onScroll=function(){var n=u(r.el);r.scrollXTicking||(n.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0);r.scrollYTicking||(n.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x"));r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y"));r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x");r.showScrollbar("y")},this.onMouseMove=function(n){if(r.mouseX=n.clientX,r.mouseY=n.clientY,r.axis.x.isOverflowing||r.axis.x.forceVisible)r.onMouseMoveForAxis("x");if(r.axis.y.isOverflowing||r.axis.y.forceVisible)r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){if(r.onMouseMove.cancel(),r.axis.x.isOverflowing||r.axis.x.forceVisible)r.onMouseLeaveForAxis("x");if(r.axis.y.isOverflowing||r.axis.y.forceVisible)r.onMouseLeaveForAxis("y");r.mouseX=-1;r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth();r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect();r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect();r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1);r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(n){var t,i;if(r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(i=r.isWithinBounds(r.axis.y.track.rect)),(t||i)&&(n.preventDefault(),n.stopPropagation(),n.type==="mousedown")){if(t)if(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect))r.onDragStart(n,"x");else r.onTrackClick(n,"x");if(i)if(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect))r.onDragStart(n,"y");else r.onTrackClick(n,"y")}},this.drag=function(n){var u,f=r.axis[r.draggedAxis].track,e=f.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,s=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],h=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);n.preventDefault();n.stopPropagation();u=r.draggedAxis==="y"?n.pageY:n.pageX;var c=u-f.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset,l=c/(e-o.size),i=l*(s-h);r.draggedAxis==="x"&&(i=r.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?i-(e+o.size):i,i=r.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-i:i);r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=i},this.onEndDrag=function(n){var t=it(r.el),i=u(r.el);n.preventDefault();n.stopPropagation();r.el.classList.remove(r.classNames.dragging);t.removeEventListener("mousemove",r.drag,!0);t.removeEventListener("mouseup",r.onEndDrag,!0);r.removePreventClickId=i.setTimeout(function(){t.removeEventListener("click",r.preventClick,!0);t.removeEventListener("dblclick",r.preventClick,!0);r.removePreventClickId=null})},this.preventClick=function(n){n.preventDefault();n.stopPropagation()},this.el=n,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},i),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el))||(this.recalculate=wt(this.recalculate.bind(this),64),this.onMouseMove=wt(this.onMouseMove.bind(this),64),this.hideScrollbars=dt(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=dt(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=he(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var r=document.createElement("div");r.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"><\/div><\/div>';var n=r.firstElementChild;document.body.appendChild(n);var u=n.firstElementChild;n.scrollLeft=0;var f=t.getOffset(n),i=t.getOffset(u);n.scrollLeft=999;var e=t.getOffset(u);return{isRtlScrollingInverted:f.left!==i.left&&i.left-e.left!=0,isRtlScrollbarInverted:f.left!==i.left}};t.getOffset=function(n){var t=n.getBoundingClientRect(),i=it(n),r=u(n);return{top:t.top+(r.pageYOffset||i.documentElement.scrollTop),left:t.left+(r.pageXOffset||i.documentElement.scrollLeft)}};var n=t.prototype;return n.init=function(){t.instances.set(this.el,this);this.initDOM();this.scrollbarWidth=this.getScrollbarWidth();this.recalculate();this.initListeners()},n.initDOM=function(){var i=this;if(Array.prototype.filter.call(this.el.children,function(n){return n.classList.contains(i.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl);this.offsetEl.appendChild(this.contentWrapperEl);this.maskEl.appendChild(this.offsetEl);this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);this.wrapperEl.appendChild(this.maskEl);this.wrapperEl.appendChild(this.placeholderEl);this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var n=document.createElement("div"),t=document.createElement("div");n.classList.add(this.classNames.track);t.classList.add(this.classNames.scrollbar);n.appendChild(t);this.axis.x.track.el=n.cloneNode(!0);this.axis.x.track.el.classList.add(this.classNames.horizontal);this.axis.y.track.el=n.cloneNode(!0);this.axis.y.track.el.classList.add(this.classNames.vertical);this.el.appendChild(this.axis.x.track.el);this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar);this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar);this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible));this.el.setAttribute("data-asl_simplebar","init")},n.initListeners=function(){var n=this,t=u(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter);["mousedown","click","dblclick"].forEach(function(t){n.el.addEventListener(t,n.onPointerEvent,!0)});["touchstart","touchend","touchmove"].forEach(function(t){n.el.addEventListener(t,n.onPointerEvent,{capture:!0,passive:!0})});this.el.addEventListener("mousemove",this.onMouseMove);this.el.addEventListener("mouseleave",this.onMouseLeave);this.contentWrapperEl.addEventListener("scroll",this.onScroll);t.addEventListener("resize",this.onWindowResize);var i=!1,r=t.ResizeObserver||ho;this.resizeObserver=new r(function(){i&&n.recalculate()});this.resizeObserver.observe(this.el);this.resizeObserver.observe(this.contentEl);t.requestAnimationFrame(function(){i=!0});this.mutationObserver=new t.MutationObserver(this.recalculate);this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},n.recalculate=function(){var f=u(this.el);this.elStyles=f.getComputedStyle(this.el);this.isRtl=this.elStyles.direction==="rtl";var e=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1,t=this.contentEl.offsetWidth,s=this.contentWrapperEl.offsetWidth,h=this.elStyles.overflowX,c=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft;this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var n=this.contentEl.scrollHeight,i=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%";this.placeholderEl.style.width=o?t+"px":"auto";this.placeholderEl.style.height=n+"px";var r=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=i>t;this.axis.y.isOverflowing=n>r;this.axis.x.isOverflowing=h==="hidden"?!1:this.axis.x.isOverflowing;this.axis.y.isOverflowing=c==="hidden"?!1:this.axis.y.isOverflowing;this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0;this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0;this.hideNativeScrollbar();var l=this.axis.x.isOverflowing?this.scrollbarWidth:0,a=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&i>s-a;this.axis.y.isOverflowing=this.axis.y.isOverflowing&&n>r-l;this.axis.x.scrollbar.size=this.getScrollbarSize("x");this.axis.y.scrollbar.size=this.getScrollbarSize("y");this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px";this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px";this.positionScrollbar("x");this.positionScrollbar("y");this.toggleTrackVisibility("x");this.toggleTrackVisibility("y")},n.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var r=this.contentEl[this.axis[n].scrollSizeAttr],i=this.axis[n].track.el[this.axis[n].offsetSizeAttr],t,u=i/r;return t=Math.max(~~(u*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},n.positionScrollbar=function(n){if(n===void 0&&(n="y"),this.axis[n].isOverflowing){var e=this.contentWrapperEl[this.axis[n].scrollSizeAttr],f=this.axis[n].track.el[this.axis[n].offsetSizeAttr],o=parseInt(this.elStyles[this.axis[n].sizeAttr],10),u=this.axis[n].scrollbar,r=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];r=n==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-r:r;var s=r/(e-o),i=~~((f-u.size)*s);i=n==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?i+(f-u.size):i;u.el.style.transform=n==="x"?"translate3d("+i+"px, 0, 0)":"translate3d(0, "+i+"px, 0)"}},n.toggleTrackVisibility=function(n){n===void 0&&(n="y");var t=this.axis[n].track.el,i=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden");i.style.display=this.axis[n].isOverflowing?"block":"none"},n.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0;this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},n.onMouseMoveForAxis=function(n){n===void 0&&(n="y");this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect();this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var t=this.isWithinBounds(this.axis[n].scrollbar.rect);t?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover);this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},n.onMouseLeaveForAxis=function(n){n===void 0&&(n="y");this.axis[n].track.el.classList.remove(this.classNames.hover);this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},n.showScrollbar=function(n){n===void 0&&(n="y");var t=this.axis[n].scrollbar.el;this.axis[n].isVisible||(t.classList.add(this.classNames.visible),this.axis[n].isVisible=!0);this.options.autoHide&&this.hideScrollbars()},n.onDragStart=function(n,t){t===void 0&&(t="y");var i=it(this.el),r=u(this.el),f=this.axis[t].scrollbar,e=t==="y"?n.pageY:n.pageX;this.axis[t].dragOffset=e-f.rect[this.axis[t].offsetAttr];this.draggedAxis=t;this.el.classList.add(this.classNames.dragging);i.addEventListener("mousemove",this.drag,!0);i.addEventListener("mouseup",this.onEndDrag,!0);this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},n.onTrackClick=function(n,t){var r=this;if(t===void 0&&(t="y"),this.options.clickOnTrack){var e=u(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var l=this.axis[t].scrollbar,o=l.rect[this.axis[t].offsetAttr],s=parseInt(this.elStyles[this.axis[t].sizeAttr],10),i=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],a=t==="y"?this.mouseY-o:this.mouseX-o,h=a<0?-1:1,c=h===-1?i-s:i+s,f=function f(){if(h===-1){if(i>c){var n;i-=r.options.clickOnTrackSpeed;r.contentWrapperEl.scrollTo((n={},n[r.axis[t].offsetAttr]=i,n));e.requestAnimationFrame(f)}}else if(i<c){var u;i+=r.options.clickOnTrackSpeed;r.contentWrapperEl.scrollTo((u={},u[r.axis[t].offsetAttr]=i,u));e.requestAnimationFrame(f)}};f()}},n.getContentElement=function(){return this.contentEl},n.getScrollElement=function(){return this.contentWrapperEl},n.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:tr(this.el)}catch(n){return tr(this.el)}},n.removeListeners=function(){var n=this,t=u(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter);["mousedown","click","dblclick"].forEach(function(t){n.el.removeEventListener(t,n.onPointerEvent,!0)});["touchstart","touchend","touchmove"].forEach(function(t){n.el.removeEventListener(t,n.onPointerEvent,{capture:!0,passive:!0})});this.el.removeEventListener("mousemove",this.onMouseMove);this.el.removeEventListener("mouseleave",this.onMouseLeave);this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll);t.removeEventListener("resize",this.onWindowResize);this.mutationObserver&&this.mutationObserver.disconnect();this.resizeObserver&&this.resizeObserver.disconnect();this.recalculate.cancel();this.onMouseMove.cancel();this.hideScrollbars.cancel();this.onWindowResize.cancel()},n.unMount=function(){this.removeListeners();t.instances.delete(this.el)},n.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},n.findChild=function(n,t){var i=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(n){return i.call(n,t)})[0]},t}();return n.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"asl_simplebar-content",contentWrapper:"asl_simplebar-content-wrapper",offset:"asl_simplebar-offset",mask:"asl_simplebar-mask",wrapper:"asl_simplebar-wrapper",placeholder:"asl_simplebar-placeholder",scrollbar:"asl_simplebar-scrollbar",track:"asl_simplebar-track",heightAutoObserverWrapperEl:"asl_simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"asl_simplebar-height-auto-observer",visible:"asl_simplebar-visible",horizontal:"asl_simplebar-horizontal",vertical:"asl_simplebar-vertical",hover:"asl_simplebar-hover",dragging:"asl_simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},n.instances=new WeakMap,n.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements);i.removeEventListener("load",this.initDOMLoadedElements);Array.prototype.forEach.call(document.querySelectorAll("[data-asl_simplebar]"),function(t){t.getAttribute("data-asl_simplebar")==="init"||n.instances.has(t)||new n(t,tt(t.attributes))})},n.removeObserver=function(){this.globalObserver.disconnect()},n.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this);typeof MutationObserver!="undefined"&&(this.globalObserver=new MutationObserver(n.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0}));document.readyState!=="complete"&&(document.readyState==="loading"||document.documentElement.doScroll)?(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),i.addEventListener("load",this.initDOMLoadedElements)):i.setTimeout(this.initDOMLoadedElements)},n.handleMutations=function(t){t.forEach(function(t){Array.prototype.forEach.call(t.addedNodes,function(t){t.nodeType===1&&(t.hasAttribute("data-asl_simplebar")?!n.instances.has(t)&&document.documentElement.contains(t)&&new n(t,tt(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-asl_simplebar]"),function(t){t.getAttribute("data-asl_simplebar")!=="init"&&!n.instances.has(t)&&document.documentElement.contains(t)&&new n(t,tt(t.attributes))}))});Array.prototype.forEach.call(t.removedNodes,function(t){t.nodeType===1&&(t.getAttribute("data-asl_simplebar")==="init"?n.instances.has(t)&&!document.documentElement.contains(t)&&n.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-asl_simplebar="init"]'),function(t){n.instances.has(t)&&!document.documentElement.contains(t)&&n.instances.get(t).unMount()}))})})},n.getOptions=tt,n.initHtmlApi(),n})}(asljQuery,asljQuery,window),function(n,t,i){
|
3 |
/*! Ajax Search Lite 4.6 js */
|
4 |
+
typeof n!="undefined"&&function(t){var r,y=!0,c={init:function(n,i){var r=this;this.elem=i;this.$elem=t(i);r.searching=!1;r.o=t.extend({blocking:!1},n);r.n={};r.n.container=t(this.elem);r.o.rid=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.o.id=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.n.probox=t(".probox",r.n.container);r.n.proinput=t(".proinput",r.n.container);r.n.text=t(".proinput input.orig",r.n.container);r.n.textAutocomplete=t(".proinput input.autocomplete",r.n.container);r.n.loading=t(".proinput .loading",r.n.container);r.n.proloading=t(".proloading",r.n.container);r.n.proclose=t(".proclose",r.n.container);r.n.promagnifier=t(".promagnifier",r.n.container);r.n.prosettings=t(".prosettings",r.n.container);r.n.searchsettings=t("#ajaxsearchlitesettings"+r.o.rid);r.n.resultsDiv=t("#ajaxsearchliteres"+r.o.rid);r.n.hiddenContainer=t("#asl_hidden_data");r.n.aslItemOverlay=t(".asl_item_overlay",r.n.hiddenContainer);r.resizeTimeout=null;r.n.showmore=t(".showmore",r.n.resultsDiv);r.n.items=t(".item",r.n.resultsDiv);r.n.results=t(".results",r.n.resultsDiv);r.n.resdrg=t(".resdrg",r.n.resultsDiv);r.il={columns:3,itemsPerPage:6};r.post=null;r.postAuto=null;r.cleanUp();r.n.textAutocomplete.val("");r.o.resultitemheight=parseInt(r.o.resultitemheight);r.scroll={};r.savedScrollTop=0;r.savedContainerTop=0;r.is_scroll=typeof asl_SimpleBar!="undefined";typeof ASL.scrollbar!="undefined"&&ASL.scrollbar==0&&(r.is_scroll=!1);r.settScroll=null;r.n.resultsAppend=t("#wpdreams_asl_results_"+r.o.id);r.currentPage=1;r.isotopic=null;r.lastSuccesfulSearch="";r.lastSearchData={};r.triggerPrevState=!1;r.animation="bounceIn";switch(r.o.resultstype){case"vertical":r.animation=r.o.vresultanimation;break;default:r.animation=r.o.hresultanimation}return r.filterFns={number:function(){for(var n=t(this).parent();!n.hasClass("isotopic");)n=n.parent();var i=t(this).attr("data-itemnum"),u=r.currentPage,f=r.il.itemsPerPage;return parseInt(i,10)<f*u&&parseInt(i,10)>=f*(u-1)}},r.disableMobileScroll=!1,r.n.searchsettings.detach().appendTo("body"),r.o.resultsposition=="hover"?r.n.resultsDiv.detach().appendTo("body"):r.n.resultsAppend.length>0&&r.n.resultsDiv.detach().appendTo(r.n.resultsAppend),typeof ASL.resHTML=="undefined"&&(ASL.resHTML=r.n.resultsDiv.html()),typeof ASL.setHTML=="undefined"&&(ASL.setHTML=r.n.searchsettings.html()),t("fieldset",r.n.searchsettings).each(function(){t(".asl_option:not(.hiddend)",this).last().addClass("asl-o-last")}),ASL.js_retain_popstate==1&&r.initPrevState(),r.monitorTouchMove(),p()&&r.n.container.addClass("asl_msie"),r.initSettingsAnimations(),r.initResultsAnimations(),r.initEvents(),r.initAutop(),r.initEtc(),this},initPrevState:function(){var n=this;y&&r==null&&(r=localStorage.getItem("asl-"+e.encode(location.href)),r!=null&&(r=JSON.parse(r),r.settings=e.decode(r.settings)));r!=null&&typeof r.id!="undefined"&&r.id==n.o.id&&(r.phrase!=""&&(n.triggerPrevState=!0,n.n.text.val(r.phrase)),h(t("form",n.n.searchsettings))!=r.settings&&(n.triggerPrevState=!0,h(t("form",n.n.searchsettings),r.settings)));localStorage.removeItem("asl-"+e.encode(location.href));n.n.resultsDiv.on("click",".results .item",function(){var i=n.n.text.val();if(i!=""||n.settingsChanged){var r={id:n.o.id,phrase:i,settings:e.encode(h(t("form",n.n.searchsettings)))};localStorage.setItem("asl-"+e.encode(location.href),JSON.stringify(r))}})},monitorTouchMove:function(){var n=this,i=t("body");n.dragging=!1;i.on("touchmove",function(){n.dragging=!0});i.on("touchstart",function(){n.dragging=!1})},gaPageview:function(n){var u=this,t=u.gaGetTrackingID();if(typeof ASL.analytics=="undefined"||ASL.analytics.method!="pageview")return!1;if(ASL.analytics.string!=""){var r=typeof __gaTracker=="function"?__gaTracker:typeof ga=="function"?ga:!1,f=typeof gtag=="function"?gtag:!1;i.location.origin||(i.location.origin=i.location.protocol+"//"+i.location.hostname+(i.location.port?":"+i.location.port:""));var e=u.o.homeurl.replace(i.location.origin,"");f!==!1?t!==!1&&f("config",t,{page_path:e+ASL.analytics.string.replace("{asl_term}",n)}):r!==!1&&(t!==!1&&r("create",t,"auto"),r("send","pageview",{page:e+ASL.analytics.string.replace("{asl_term}",n),title:"Ajax Search"}))}},gaEvent:function(n,i){var u=this,f=u.gaGetTrackingID();if(typeof ASL.analytics=="undefined"||ASL.analytics.method!="event")return!1;var e=typeof gtag=="function"?gtag:!1,o=typeof __gaTracker=="function"?__gaTracker:typeof ga=="function"?ga:!1;if(e===!1&&o===!1)return!1;if(typeof ASL.analytics.event[n]!="undefined"&&ASL.analytics.event[n].active==1&&typeof"gtag"!="undefined"){var s={search_id:u.o.id,search_name:u.o.name,phrase:u.n.text.val(),option_name:"",option_value:"",result_title:"",result_url:"",results_count:""},r={event_category:ASL.analytics.event[n].category,event_label:ASL.analytics.event[n].label,value:ASL.analytics.event[n].value};i=t.extend(s,i);t.each(i,function(n,i){i=String(i).replace(/[\s\n\r]+/g," ").trim();t.each(r,function(t,u){var f=new RegExp("{"+n+"}","gmi");r[t]=u.replace(f,i)})});e===!1?(f!==!1&&o("create",f,"auto"),o("send","event",r.event_category,ASL.analytics.event[n].action,r.event_label,r.value)):(f!==!1&&(r.send_to=f),e("event",ASL.analytics.event[n].action,r))}},gaGetTrackingID:function(){var r=this,n=!1;if(typeof ASL.analytics=="undefined")return n;if(typeof ASL.analytics.tracking_id!="undefined"&&ASL.analytics.tracking_id!="")return ASL.analytics.tracking_id;var i=typeof gtag=="function"?gtag:!1;if(i!==!1&&typeof ga!="undefined"&&typeof ga.getAll!="undefined"){var t=!1;return ga.getAll().forEach(function(n){t=n.get("trackingId")}),t}return n},createVerticalScroll:function(){var n=this;n.is_scroll&&typeof n.scroll.recalculate=="undefined"&&(n.scroll=new asl_SimpleBar(n.n.results.get(0),{direction:t("body").hasClass("rtl")?"rtl":"ltr",autoHide:!0}))},initEvents:function(){var r=this;if(u()&&s())r.n.text.on("touchstart",function(){r.savedScrollTop=t(i).scrollTop();r.savedContainerTop=r.n.container.offset().top});r.n.text.on("click",function(){t(this).trigger("focus");r.gaEvent("focus")});r.n.text.on("focus input",function(){r.searching||(t(this).val()!=""?r.n.proclose.css("display","block"):r.n.proclose.css({display:"none"}))});t(r.n.text.parent()).on("submit",function(t){if(t.preventDefault(),u())if(r.o.redirect_on_enter){var i=n.Event("keyup");i.keyCode=i.which=13;r.n.text.trigger(i)}else r.o.redirectEnterTo=="ajax_search"&&(r.search(),document.activeElement.blur());else r.o.redirectEnterTo=="ajax_search"&&r.search()});r.n.resultsDiv.css({opacity:0});t(document).on("click touchend",function(){(r.hideSettings(),r.opened!=!1&&r.o.closeOnDocClick==1)&&r.hideResults()});r.n.proclose.on("click touchend",function(){r.n.text.val("");r.n.textAutocomplete.val("");r.hideResults();r.n.text.trigger("focus")});t(r.elem).on("click touchend",function(n){n.stopImmediatePropagation()});r.n.resultsDiv.on("click touchend",function(n){n.stopImmediatePropagation()});r.n.searchsettings.on("click touchend",function(n){n.stopImmediatePropagation()});r.n.prosettings.on("click",function(){r.n.prosettings.data("opened")==0?r.showSettings():r.hideSettings()});var o=r.n.container.parents().filter(function(){return t(this).css("position")=="fixed"});if((o.length>0||r.n.container.css("position")=="fixed")&&(r.n.resultsDiv.css("position")=="absolute"&&r.n.resultsDiv.css("position","fixed"),r.n.resultsDiv.css("z-index",99999999999),r.o.blocking||r.n.searchsettings.css("position","fixed")),u())t(i).on("orientationchange",function(){r.orientationChange();setTimeout(function(){r.orientationChange()},800)});else{var f;t(i).on("resize",function(){clearTimeout(f);f=setTimeout(function(){r.resize()},100)})}var e;t(i).on("scroll",function(){clearTimeout(e);e=setTimeout(function(){r.scrolling(!1)},400)});s()&&u()&&parseInt(r.n.text.css("font-size"))<16&&(r.n.text.data("fontSize",r.n.text.css("font-size")).css("font-size","16px"),r.n.textAutocomplete.css("font-size","16px"),t("<style>#ajaxsearchlite"+r.o.rid+" input.orig::-webkit-input-placeholder{font-size: 16px !important;}<\/style>").appendTo("head"));r.initNavigationEvent();r.initMagnifierEvent();r.initAutocompleteEvent();r.initFacetEvents()},initAutop:function(){var n=this;if(r!=null&&n.triggerPrevState)return n.search(),r=null,!1},initEtc:function(){var n=this,i=null;t("div.asl_option",n.n.searchsettings).on("mouseup touchend",function(r){if(r.preventDefault(),r.stopImmediatePropagation(),n.dragging)return!1;t('input[type="checkbox"]',this).prop("checked",!t('input[type="checkbox"]',this).prop("checked"));clearTimeout(i);var u=this;i=setTimeout(function(){t('input[type="checkbox"]',u).trigger("asl_chbx_change")},50)});t("div.asl_option label",n.n.searchsettings).on("click",function(n){n.preventDefault()});n.n.resultsDiv.on("click",".results .item",function(){n.gaEvent("result_click",{result_title:t(this).find("a.asl_res_url").text(),result_url:t(this).find("a.asl_res_url").attr("href")});n.o.singleHighlight==1&&(localStorage.removeItem("asl_phrase_highlight"),a(n.n.text.val())!=""&&localStorage.setItem("asl_phrase_highlight",JSON.stringify({phrase:a(n.n.text.val()),id:n.o.id})))});if(u()&&n.o.mobile.menu_selector!="")t(n.o.mobile.menu_selector).on("touchend",function(){var i=this;setTimeout(function(){var r=t(i).find("input.orig");r=r.length==0?t(i).next().find("input.orig"):r;r=r.length==0?t(i).parent().find("input.orig"):r;r=r.length==0?n.n.text:r;n.n.container.is(":visible")&&r.get(0).focus()},300)})},initNavigationEvent:function(){var n=this;t(n.n.resultsDiv).on("mouseenter",".item",function(){t(".item",n.n.resultsDiv).removeClass("hovered");t(this).addClass("hovered")});t(n.n.resultsDiv).on("mouseleave",".item",function(){t(".item",n.n.resultsDiv).removeClass("hovered")});t(document).on("keydown",function(r){if(i.event)var u=i.event.keyCode,o=i.event.type;else if(r)var u=r.which,o=r.type;if(t(".item",n.n.resultsDiv).length>0&&n.n.resultsDiv.css("display")!="none"){if(u==40||u==38){u==40&&(n.n.text.blur(),t(".item.hovered",n.n.resultsDiv).length==0?t(".item",n.n.resultsDiv).first().addClass("hovered"):t(".item.hovered",n.n.resultsDiv).removeClass("hovered").next(".item").addClass("hovered"));u==38&&(n.n.text.blur(),t(".item.hovered",n.n.resultsDiv).length==0?t(".item",n.n.resultsDiv).last().addClass("hovered"):t(".item.hovered",n.n.resultsDiv).removeClass("hovered").prev(".item").addClass("hovered"));r.stopPropagation();r.preventDefault();var f=n.is_scroll?t(n.scroll.getScrollElement()):n.n.results,e=n.n.resultsDiv.find(".resdrg .item.hovered");e.length==0&&(e=n.n.resultsDiv.children().first());f.animate({scrollTop:e.offset().top-f.offset().top+f.scrollTop()},{duration:120})}u==13&&t(".item.hovered",n.n.resultsDiv).length>0&&(r.stopPropagation(),r.preventDefault(),t(".item.hovered a.asl_res_url",n.n.resultsDiv).get(0).click())}})},initMagnifierEvent:function(){var n=this,r,f,u=!1;n.n.text.on("keyup",function(e){if(i.event?(n.keycode=i.event.keyCode,n.ktype=i.event.type):e&&(n.keycode=e.which,n.ktype=e.type),n.keycode==13){if(clearTimeout(f),f=setTimeout(function(){u=!1},300),u)return!1;u=!0}var o=t(this).hasClass("orig");if(n.n.text.val().length>=n.o.charcount&&o&&n.ktype=="keyup"&&n.keycode==13){if(n.gaEvent("return"),n.o.redirect_on_enter==1)n.o.redirectEnterTo!="first_result"?n.doRedirectToResults(n.ktype):n.search();else{if(n.o.redirectEnterTo=="nothing")return!1;t("form",n.n.searchsettings).serialize()+n.n.text.val().trim()==n.lastSuccesfulSearch&&n.resultsOpened||n.search()}clearTimeout(r)}});n.n.promagnifier.add(n.n.text).on("click input",function(u){i.event?(n.keycode=i.event.keyCode,n.ktype=i.event.type):u&&(n.keycode=u.which,n.ktype=u.type);var f=t(this).hasClass("orig");if(n.n.text.val().length<n.o.charcount){n.n.proloading.css("display","none");n.hideResults();n.post!=null&&n.post.abort();clearTimeout(r);return}if(n.n.text.val().length>=n.o.charcount&&!f&&n.o.redirectonclick==1&&n.ktype=="click"&&n.o.redirectClickTo!="first_result"){n.doRedirectToResults(n.ktype);clearTimeout(r);return}if((!(n.keycode>=37)||!(n.keycode<=40))&&(!(n.keycode>=112)||!(n.keycode<=123))){if(f&&n.ktype=="click"||n.keycode==32){t("form",n.n.searchsettings).serialize()+n.n.text.val().trim()==n.lastSuccesfulSearch&&(n.n.proclose.css("display","block"),n.resultsOpened||n.showResults());return}t(this).hasClass("orig")&&n.ktype=="click"||(f||n.ktype!="click"||n.gaEvent("magnifier"),n.o.trigger_on_click!=0||n.ktype!="click")&&(n.o.triggerontype!=0||n.ktype!="input")&&(!f||n.ktype!="input"||n.o.redirectEnterTo!="nothing")&&(f||n.ktype!="click"||n.o.redirectClickTo!="nothing")&&(n.post!=null&&n.post.abort(),clearTimeout(r),n.hideLoader(),r=setTimeout(function(){if(t("form",n.n.searchsettings).serialize()+n.n.text.val().trim()!=n.lastSuccesfulSearch)n.search();else{if(n.n.proclose.css("display","block"),n.isRedirectToFirstResult())return n.doRedirectToFirstResult(),!1;n.resultsOpened||n.showResults()}},250))}})},initFacetEvents:function(){var n=this,i=null;if(n.o.trigger_on_facet_change==1){t("input[type!=checkbox], select",n.n.searchsettings).on("change slidechange",function(){n.n.text.val().length<n.o.charcount||(n.post!=null&&n.post.abort(),clearTimeout(i),i=setTimeout(function(){n.search()},50))});t("input[type=checkbox]",n.n.searchsettings).on("asl_chbx_change",function(){n.n.text.val().length<n.o.charcount||(n.post!=null&&n.post.abort(),n.gaEvent("facet_change",{option_label:t(this).closest("fieldset").find("legend").text(),option_value:t(this).closest(".asl_option").find(".asl_option_label").text()+(t(this).prop("checked")?"(checked)":"(unchecked)")}),clearTimeout(i),i=setTimeout(function(){n.search()},50))})}},isRedirectToFirstResult:function(){var n=this;return t(".asl_res_url",n.n.resultsDiv).length>0&&(n.o.redirectonclick==1&&n.ktype=="click"&&n.o.redirectClickTo=="first_result"||n.o.redirect_on_enter==1&&(n.ktype=="input"||n.ktype=="keyup")&&n.keycode==13&&n.o.redirectEnterTo=="first_result")?!0:!1},doRedirectToFirstResult:function(){var n=this,i;return i=n.ktype=="click"?n.o.redirectClickLoc:n.o.redirectEnterLoc,i=="same"?location.href=t(t(".asl_res_url",n.n.resultsDiv).get(0)).attr("href"):v(t(t(".asl_res_url",n.n.resultsDiv).get(0)).attr("href")),n.hideLoader(),n.hideResults(),!1},doRedirectToResults:function(n){var i=this,e=i.ktype=="click"?i.o.redirectClickTo:i.o.redirectEnterTo,u=n=="click"?i.o.redirectClickLoc:i.o.redirectEnterLoc;if(e=="results_page")var r="?s="+f(i.n.text.val());else if(e=="woo_results_page")var r="?post_type=product&s="+f(i.n.text.val());else var r=i.o.redirect_url.replace("{phrase}",f(i.n.text.val()));if(i.o.homeurl.indexOf("?")>1&&r.indexOf("?")===0&&(r=r.replace("?","&")),i.o.overridewpdefault)if(i.o.override_method=="post")o(i.o.homeurl+r,"post",{asl_active:1,p_asl_data:t("form",i.n.searchsettings).serialize()},u);else{var s=i.o.homeurl+r+"&asl_active=1&p_asid="+i.o.id+"&p_asl_data=1&"+t("form",i.n.searchsettings).serialize();u=="same"?location.href=s:v(s)}else o(i.o.homeurl+r,"post",{np_asl_data:t("form",i.n.searchsettings).serialize()},u);i.n.proloading.css("display","none");i.hideLoader();i.hideResults();i.post!=null&&i.post.abort()},destroy:function(){return this.each(function(){var n=t.extend({},this,c);t(i).unbind(n)})},searchfor:function(n){t(".proinput input",this).val(n).trigger("keyup")},initAutocompleteEvent:function(){var n=this;if(n.o.autocomplete.enabled==1&&!u())n.n.text.on("keyup",function(r){i.event?(n.keycode=i.event.keyCode,n.ktype=i.event.type):r&&(n.keycode=r.which,n.ktype=r.type);var u=39;t("body").hasClass("rtl")&&(u=37);n.keycode==u&&n.n.textAutocomplete.val()!=""?(r.preventDefault(),n.n.text.val(n.n.textAutocomplete.val()),n.post!=null&&n.post.abort(),n.search()):(n.postAuto!=null&&n.postAuto.abort(),n.autocompleteGoogleOnly())})},autocompleteGoogleOnly:function(){var n=this,i=n.n.text.val();if(n.n.text.val()==""){n.n.textAutocomplete.val("");return}var r=n.n.textAutocomplete.val();(r==""||r.indexOf(i)!=0)&&(n.n.textAutocomplete.val(""),t.ajax({url:"https://clients1.google.com/complete/search",dataType:"jsonp",data:{q:i,hl:n.o.autocomplete.lang,nolabels:"t",client:"hp",ds:""},success:function(r){r[1].length>0&&(response=r[1][0][0].replace(/(<([^>]+)>)/ig,""),response=t("<textarea />").html(response).text(),response=response.substr(i.length),n.n.textAutocomplete.val(i+response))}}))},search:function(){var n=this;if((!n.searching||!0)&&!(n.n.text.val().length<n.o.charcount)){n.searching=!0;n.n.proloading.css({display:"block"});n.n.proclose.css({display:"none"});var i={action:"ajaxsearchlite_search",aslp:n.n.text.val(),asid:n.o.id,options:t("form",n.n.searchsettings).serialize()};if(i=l("asl_search_data",i),JSON.stringify(i)===JSON.stringify(n.lastSearchData))return(n.resultsOpened||n.showResults(),n.hideLoader(),n.isRedirectToFirstResult())?(n.doRedirectToFirstResult(),!1):!1;n.gaEvent("search_start");n.post=t.post(ASL.ajaxurl,i,function(r){r=r.replace(/^\s*[\r\n]/gm,"");r=r.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1];r=l("asl_search_html",r);n.n.resdrg.html("");n.n.resdrg.html(r);t(".asl_keyword",n.n.resdrg).on("click",function(){n.n.text.val(t(this).html());t("input.orig",n.n.container).val(t(this).html()).trigger("keydown");t("form",n.n.container).trigger("submit","ajax");n.search()});if(n.n.items=t(".item",n.n.resultsDiv),n.gaEvent("search_end",{results_count:n.n.items.length}),n.gaPageview(n.n.text.val()),n.isRedirectToFirstResult())return n.doRedirectToFirstResult(),!1;if(n.hideLoader(),n.showResults(),n.scrollToResults(),n.lastSuccesfulSearch=t("form",n.n.searchsettings).serialize()+n.n.text.val().trim(),n.lastSearchData=i,n.n.items.length==0)n.n.showmore!=null&&n.n.showmore.css("display","none");else if(n.n.showmore!=null){n.n.showmore.css("display","block");t("a",n.n.showmore).off();t("a",n.n.showmore).on("click",function(){var r=n.o.redirectClickTo,i="?s="+f(n.n.text.val());i=r=="results_page"?"?s="+f(n.n.text.val()):r=="woo_results_page"?"?post_type=product&s="+f(n.n.text.val()):n.o.redirect_url.replace("{phrase}",f(n.n.text.val()));n.o.overridewpdefault?n.o.override_method=="post"?o(n.o.homeurl+i,"post",{asl_active:1,p_asl_data:t("form",n.n.searchsettings).serialize()}):location.href=n.o.homeurl+i+"&asl_active=1&p_asid="+n.o.id+"&p_asl_data=1&"+t("form",n.n.searchsettings).serialize():o(n.o.homeurl+i,"post",{np_asl_data:t("form",n.n.searchsettings).serialize()})})}},"text").fail(function(i,r){i.aborted||r=="abort"||(n.n.resdrg.html(""),n.n.resdrg.html('<div class="asl_nores">The request failed. Please check your connection! Status: '+i.status+"<\/div>"),n.n.items=t(".item",n.n.resultsDiv),n.hideLoader(),n.showResults(),n.scrollToResults())})}},showLoader:function(){var n=this;n.n.proloading.css({display:"block"})},hideLoader:function(){var n=this;n.n.proloading.css({display:"none"});n.n.results.css("display","")},showResultsBox:function(){var n=this;n.n.resultsDiv.css({display:"block",height:"auto"});n.n.items.addClass(n.animationOpacity);n.fixResultsPosition(!0);n.n.resultsDiv.css(n.resAnim.showCSS);n.n.resultsDiv.removeClass(n.resAnim.hideClass).addClass(n.resAnim.showClass)},showResults:function(){var n=this;n.createVerticalScroll();switch(n.o.resultstype){case"vertical":n.showVerticalResults();break;default:n.showHorizontalResults()}n.hideLoader();n.n.proclose.css({display:"block"});n.n.showmore!=null&&(n.n.items.length>0?n.n.showmore.css({display:"block"}):n.n.showmore.css({display:"none"}));n.is_scroll&&typeof n.scroll.recalculate!="undefined"&&setTimeout(function(){n.scroll.recalculate()},500);n.resultsOpened=!0},hideResults:function(){var n=this;if(!n.resultsOpened)return!1;n.n.resultsDiv.removeClass(n.resAnim.showClass).addClass(n.resAnim.hideClass);setTimeout(function(){n.n.resultsDiv.css(n.resAnim.hideCSS)},n.resAnim.duration);n.n.proclose.css({display:"none"});n.n.showmore!=null&&n.n.showmore.css({display:"none"});u()&&document.activeElement.blur();n.resultsOpened=!1},scrollToResults:function(){if(($this=this,this.o.scrollToResults==1)&&!this.$elem.parent().hasClass("asl_preview_data")){if($this.o.resultsposition=="hover")var n=$this.n.probox.offset().top-20;else var n=$this.n.resultsDiv.offset().top-20;t("#wpadminbar").length>0&&(n-=t("#wpadminbar").height());n=n<0?0:n;t("body, html").animate({scrollTop:n},{duration:500})}},createGroup:function(n){return"<div class='group'>"+n+"<\/div>"},showVerticalResults:function(){var n=this;if(n.showResultsBox(),n.n.items.length>0){var e=n.n.items.length<n.o.itemscount?n.n.items.length:n.o.itemscount,h=t(".group",n.n.resultsDiv);if(n.n.items.length<=n.o.itemscount)n.n.results.css({height:"auto"});else{n.n.results.css({height:30});n.resize();var i=0,r=0,u=0,f=0;n.n.items.each(function(){r+=t(this).outerHeight(!0);t(this).outerHeight(!0)>f&&(f=t(this).outerHeight(!0));i++});u=f*e;u>r&&(u=r);i=i<1?1:i;r=r/i*e;n.n.results.css({height:u})}if(n.resize(),n.n.items.last().addClass("asl_last_item"),n.o.highlight==1){var o=n.o.highlightwholewords==1?!0:!1;t("div.item",n.n.resultsDiv).highlight(n.n.text.val().split(" "),{element:"span",className:"highlighted",wordsOnly:o})}}n.resize();n.n.items.length==0&&n.n.results.css({height:"auto"});n.n.results.css({overflowY:"auto"});var s=n.is_scroll?t(n.scroll.getScrollElement()):n.n.results;s.scrollTop(0);n.addAnimation();n.fixResultsPosition(!0);n.searching=!1},addAnimation:function(){var i=this,n=0,r=1;i.n.items.each(function(){var u=this;setTimeout(function(){t(u).addClass(i.animation)},n);n=n+60;r++})},removeAnimation:function(){var n=this;n.n.items.each(function(){var i=this;t(i).removeClass(n.animation)})},initSettingsAnimations:function(){var n=this,t=300;n.settAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":t+"ms"},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:t};n.n.searchsettings.css({"-webkit-animation-duration":n.settAnim.duration+"ms","animation-duration":n.settAnim.duration+"ms"})},initResultsAnimations:function(){var t=this,n=300;t.resAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":n+"ms"},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:n};t.n.resultsDiv.css({"-webkit-animation-duration":n+"ms","animation-duration":n+"ms"})},showSettings:function(){var n=this;n.n.searchsettings.css(n.settAnim.showCSS);n.n.searchsettings.removeClass(n.settAnim.hideClass).addClass(n.settAnim.showClass);n.settScroll==null&&n.is_scroll&&(n.settScroll=[],t(".asl_sett_scroll",n.n.searchsettings).each(function(i){var r=this;setTimeout(function(){n.settScroll[i]=new asl_SimpleBar(t(r).get(0),{direction:t("body").hasClass("rtl")?"rtl":"ltr",autoHide:!0})},20)}));n.n.prosettings.data("opened",1);n.fixSettingsPosition(!0)},hideSettings:function(){var n=this;n.n.searchsettings.removeClass(n.settAnim.showClass).addClass(n.settAnim.hideClass);setTimeout(function(){n.n.searchsettings.css(n.settAnim.hideCSS)},n.settAnim.duration);n.n.prosettings.data("opened",0)},cleanUp:function(){var n=this;t(".searchsettings",n.n.container).length>0&&(t("body>#ajaxsearchlitesettings"+n.o.rid).remove(),t("body>#ajaxsearchliteres"+n.o.rid).remove())},orientationChange:function(){var n=this;n.fixSettingsPosition();n.fixResultsPosition();n.fixTryThisPosition()},resize:function(){var n=this;n.fixSettingsPosition();n.fixResultsPosition();n.fixTryThisPosition()},scrolling:function(n){var t=this;t.fixSettingsPosition(n);t.fixResultsPosition(n)},fixTryThisPosition:function(){},fixResultsPosition:function(n){n=typeof n=="undefined"?!1:n;var i=this,f=i.n.resultsDiv.css("position");if(f=="fixed"||f=="absolute"){var e=0;if(t("body").css("position")!="static"&&(e=t("body").offset().top),n==!0||i.n.resultsDiv.css("visibility")=="visible"){var o=0,h=0,r=i.n.container.offset();if(f=="fixed"&&(e=0,o=t(document).scrollTop(),h=t(document).scrollLeft(),u()&&s()&&i.n.text.is(":focus")&&(o=i.savedScrollTop,r.top=i.savedContainerTop)),typeof r!="undefined"){var c=i.n.container.outerWidth()<240?240:i.n.container.outerWidth();i.n.resultsDiv.outerWidth(c);i.n.resultsDiv.css({top:r.top+i.n.container.outerHeight(!0)+10-e-o,left:r.left-h})}}}},fixSettingsPosition:function(n){n=typeof n=="undefined"?!1:n;var r=this,h=0;if(t("body").css("position")!="static"&&(h=t("body").offset().top),(n==!0||r.n.prosettings.data("opened")!=0)&&r.o.blocking!=!0){if(r.fixSettingsWidth(),r.n.prosettings.css("display")!="none")var e=r.n.prosettings;else var e=r.n.promagnifier;var f=e.offset(),o=0,c=0;r.n.searchsettings.css("position")=="fixed"&&(o=t(i).scrollTop(),c=t(i).scrollLeft(),u()&&s()&&r.n.text.is(":focus")&&(f.top=r.savedContainerTop,o=r.savedScrollTop));r.o.settingsimagepos=="left"?r.n.searchsettings.css({display:"block",top:f.top+e.height()-2-h-o,left:f.left-c}):r.n.searchsettings.css({display:"block",top:f.top+e.height()-2-h-o,left:f.left+e.width()-r.n.searchsettings.width()-c})}},fixSettingsWidth:function(){}};function l(){return typeof wp!="undefined"&&typeof wp.hooks!="undefined"&&typeof wp.hooks.applyFilters!="undefined"?wp.hooks.applyFilters.apply(null,arguments):typeof arguments[1]!="undefined"?arguments[1]:!1}function u(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}}function h(n,i){var r=n.find(":input").get();return arguments.length===1?(i={},t.each(r,function(){!this.name||this.disabled||!(this.checked||/select|textarea/i.test(this.nodeName)||/text/i.test(this.type))||t(this).hasClass("asl_datepicker_field")||t(this).hasClass("asl_datepicker")||(i[this.name]==undefined&&(i[this.name]=[]),i[this.name].push(t(this).val()))}),JSON.stringify(i)):(typeof i!="object"&&(i=JSON.parse(i)),t.each(r,function(){if(this.name&&i[this.name]){var n=i[this.name],r=t(this);if(Object.prototype.toString.call(n)!=="[object Array]"&&(n=[n]),this.type=="checkbox"||this.type=="radio"){for(var e=r.val(),f=!1,u=0;u<n.length;u++)if(n[u]==e){f=!0;break}r.attr("checked",f)}else r.val(n[0])}}),n)}function f(n){return encodeURIComponent(n).replace(/\%20/g,"+")}function a(n){return n.replace(/"|'/g,"")}function o(n,i,r,u){"use strict";var f;f=t("<form />",{action:n,method:i,style:"display: none;"});typeof r!="undefined"&&r!==null&&t.each(r,function(n,i){t("<input />",{type:"hidden",name:n,value:i}).appendTo(f)});typeof u!="undefined"&&u=="new"&&f.attr("target","_blank");f.appendTo("body").trigger("submit")}function v(n){t('<a href="'+n+'" target="_blank">').get(0).click()}function s(){return typeof i.navigator!="undefined"&&typeof i.navigator.userAgent!="undefined"?i.navigator.userAgent.match(/(iPod|iPhone|iPad)/)!=null:!1}function p(){var n=i.navigator.userAgent,t=n.indexOf("MSIE ");return t>0?!0:!1}typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t});t.plugin=function(n,i){t.fn[n]=function(r){return this.each(function(){t.data(this,n)||t.data(this,n,Object.create(i).init(r,this))})}};t.plugin("ajaxsearchlite",c);var e={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(n){var f="",o,t,i,h,c,s,r,u=0;for(n=e._utf8_encode(n);u<n.length;)o=n.charCodeAt(u++),t=n.charCodeAt(u++),i=n.charCodeAt(u++),h=o>>2,c=(o&3)<<4|t>>4,s=(t&15)<<2|i>>6,r=i&63,isNaN(t)?s=r=64:isNaN(i)&&(r=64),f=f+this._keyStr.charAt(h)+this._keyStr.charAt(c)+this._keyStr.charAt(s)+this._keyStr.charAt(r);return f},decode:function(n){var t="",o,s,h,c,u,r,f,i=0;for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)c=this._keyStr.indexOf(n.charAt(i++)),u=this._keyStr.indexOf(n.charAt(i++)),r=this._keyStr.indexOf(n.charAt(i++)),f=this._keyStr.indexOf(n.charAt(i++)),o=c<<2|u>>4,s=(u&15)<<4|r>>2,h=(r&3)<<6|f,t=t+String.fromCharCode(o),r!=64&&(t=t+String.fromCharCode(s)),f!=64&&(t=t+String.fromCharCode(h));return e._utf8_decode(t)},_utf8_encode:function(n){n=n.replace(/\r\n/g,"\n");for(var i="",r=0;r<n.length;r++){var t=n.charCodeAt(r);t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128))}return i},_utf8_decode:function(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}}}(n)}(asljQuery,asljQuery,window),function(n,t,i){if(i.ASL=typeof i.ASL!="undefined"?i.ASL:{},i.ASL.getScope=function(){if(typeof n!="undefined")if(typeof n.fn.ajaxsearchlite=="undefined")for(var t=n,r=n,u=0;u<10;u++)if(typeof t.fn.ajaxsearchlite=="undefined")t=n.noConflict(!0),console.log("ASL: executed one noconflict");else return t.fn.jquery!=r.fn.jquery&&(i.jQuery=i.$=r),t;else return n;return typeof i[ASL.js_scope]!="undefined"?i[ASL.js_scope]:!1},i.ASL.initialized=!1,i.ASL.initialize=function(n){function f(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}function e(n){var t="",s,h,c,l,e,r,o,i=0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)l=u.indexOf(n.charAt(i++)),e=u.indexOf(n.charAt(i++)),r=u.indexOf(n.charAt(i++)),o=u.indexOf(n.charAt(i++)),s=l<<2|e>>4,h=(e&15)<<4|r>>2,c=(r&3)<<6|o,t=t+String.fromCharCode(s),r!=64&&(t=t+String.fromCharCode(h)),o!=64&&(t=t+String.fromCharCode(c));return f(t)}var i=this;if(typeof i.getScope=="undefined"||typeof i.version=="undefined")return!1;var t=i.getScope(),u=".asl_init_data";if(typeof ASL_INSTANCES!="undefined"&&Object.keys(ASL_INSTANCES).length>0?t.each(ASL_INSTANCES,function(n,i){return typeof i=="undefined"?!1:t("#ajaxsearchlite"+n).hasClass("hasASL")?!1:(t("#ajaxsearchlite"+n).addClass("hasASL"),t("#ajaxsearchlite"+n).ajaxsearchlite(i))}):(typeof n!="undefined"&&(u="div[id*=asl_init_id_"+n+"]"),t(u).each(function(){var i=t(this).attr("id").match(/^asl_init_id_(.*)/)[1],n=t(this).data("asldata");if(typeof n=="undefined"||(n=e(n),typeof n=="undefined"||n==""))return!1;var r=JSON.parse(n);return t("#ajaxsearchlite"+i).addClass("hasASL"),t("#ajaxsearchlite"+i).ajaxsearchlite(r)})),i.highlight.enabled){var r=localStorage.getItem("asl_phrase_highlight");localStorage.removeItem("asl_phrase_highlight");r!=null&&(r=JSON.parse(r),t.each(i.highlight.data,function(n,i){var f=i.selector!=""&&t(i.selector).length>0?i.selector:"article";if(f=t(f).length>0?f:"body",t(f).highlight(r.phrase,{element:"span",className:"asl_single_highlighted",wordsOnly:i.whole,excludeParents:".asl_w, .asl-try"}),i.scroll&&t(".asl_single_highlighted").length>0){var u=t(".asl_single_highlighted").offset().top-120;t("#wpadminbar").length>0&&(u-=t("#wpadminbar").height());u=u+i.scroll_offset;u=u<0?0:u;t("html").animate({scrollTop:u},{duration:500})}return!1}))}i.initialized=!0},i.ASL.fixClones=function(){var t=this;if((t.fix_duplicates=t.fix_duplicates||0,t.fix_duplicates==0)||typeof t.getScope=="undefined")return!1;var n=t.getScope(),i={};n(".asl_init_data").each(function(){var t=n(this).attr("id").match(/^asl_init_id_(.*)/)[1];typeof i[t]=="undefined"?i[t]={rid:t,id:t,count:1}:i[t].count++});n.each(i,function(i,r){r.count>1&&n(".asl_m_"+r.rid).each(function(i){if(i==0)return!0;for(var f=n(this).parent(),u=r.id;n("#ajaxsearchlite"+u).length!=0;)u++;n(this).attr("id","ajaxsearchlite"+u);n(this).removeClass("asl_m_"+r.rid).addClass("asl_m_"+u);n(this).removeClass("hasASL");n(".asl_r_"+r.rid,this).length==0&&n(".asl_r_"+r.rid).clone().appendTo(n(this));n(".asl_r_"+r.rid,this).attr("id","ajaxsearchliteres"+u);n(".asl_r_"+r.rid,this).attr("data-id",u);n(".asl_r_"+r.rid,this).removeClass("asl_r_"+r.rid).addClass("asl_r_"+u);typeof ASL.resHTML!="undefined"&&n("#ajaxsearchliteres"+u).html(ASL.resHTML);n(".asl_s_"+r.rid,this).length==0&&n(".asl_s_"+r.rid).length!=0&&n(".asl_s_"+r.rid).clone().appendTo(n(this));n(".asl_sb_"+r.rid,this).length==0&&n(".asl_sb_"+r.rid).length!=0&&n(".asl_sb_"+r.rid).clone().appendTo(n(this));n(".asl_s_"+r.rid,this).attr("id","ajaxsearchlitesettings"+u);typeof ASL.setHTML!="undefined"&&n("#ajaxsearchlitesettings"+u).html(ASL.setHTML);n(".asl_sb_"+r.rid,f).attr("id","ajaxsearchlitebsettings"+u);typeof ASL.setHTML!="undefined"&&n("#ajaxsearchlitebsettings"+u).html(ASL.setHTML);n(".asl_hidden_data",f).length>0&&n(".asl_hidden_data",f).attr("id","asl_hidden_data_"+u);n(".asl_init_data",f).length>0&&n(".asl_init_data",f).attr("id","asl_init_id_"+u);t.initialize(u)})})},i.ASL.ready=function(){var t=this,r=t.getScope(),u=null;if(r===!1)return!1;r(function(){var n,i=0;n=setInterval(function(){if(++i,i>20||t.initialized)return clearInterval(n),!1;console.log("tries",i);t.initialize();clearInterval(n)},200);t.initialize();setTimeout(function(){t.fixClones()},2500)});typeof ASL.detect_ajax!="undefined"&&ASL.detect_ajax==1&&r("body").bind("DOMSubtreeModified",function(){clearTimeout(u);u=setTimeout(function(){t.initialize()},500)});var f;r(i).on("resize",function(){clearTimeout(f);f=setTimeout(function(){t.fixClones()},2e3)});var e,n="#menu-item-search, .fa-search, .fa, .fas";n=n+", .fusion-flyout-menu-toggle, .fusion-main-menu-search-open";n=n+", #search_button";n=n+", .mini-search.popup-search";n=n+", .icon-search";n=n+", .menu-item-search-dropdown";n=n+", .mobile-menu-button";n=n+", .td-icon-search, .tdb-search-icon";n=n+", .side_menu_button, .search_button";n=n+", .raven-search-form-toggle";n=n+", [data-elementor-open-lightbox], .elementor-button-link, .elementor-button";r(function(){r("body").on("click touchend",n,function(){clearTimeout(e);e=setTimeout(function(){t.initialize()},500)})})},i.ASL.loadScriptStack=function(t){if(t.length>0){var r=document.createElement("script");r.src=t.splice(0,1);r.onload=t.length==0?function(){typeof n.fn.ajaxsearchlite!="undefined"&&(console.log("ASL: Initializing via onload.."),i.ASL.ready())}:function(){i.ASL.loadScriptStack(t)};console.log("ASL adding:",r.src);document.body.appendChild(r)}},i.ASL.init=function(){if(typeof n=="undefined"||typeof n.fn.ajaxsearchlite=="undefined"){console.log("ASL: jQuery script is probably deferred or delayed loading, trying to resolve");var t;i.asl_interval_tries=typeof i.asl_interval_tries!="undefined"?i.asl_interval_tries:0;t=setInterval(function(){return(++i.asl_interval_tries,i.asl_interval_tries>5)?(console.log("ASL: faliure, init tried",asl_interval_tries,"times"),clearInterval(t),typeof n!="undefined"&&typeof ASL.min_script_src!="undefined"&&ASL.min_script_src!==null&&(console.log("ASL: jQuery exists, adding ASL script dynamically & trying to load."),ASL.loadScriptStack(ASL.min_script_src),ASL.min_script_src=null),!1):typeof n!="undefined"&&typeof n.fn.ajaxsearchlite!="undefined"?(i.ASL.ready(),console.log("ASL: success at try: ",i.asl_interval_tries),clearInterval(t),!1):void 0},250)}else i.ASL.ready()},typeof i.ASL.version=="undefined"){var u,r=0;console.log("ASL: global not defined, trying to wait..");u=setInterval(function(){return++r,typeof i.ASL.version!="undefined"||r>10?(r>10?console.log("ASL: global found at try ",r):console.log("ASL: global not found, initializing anyways at try ",r),i.ASL.init(),clearInterval(u),!0):void 0},100)}else i.ASL.init()}(asljQuery,asljQuery,window);
|
js/min/jquery.ajaxsearchlite.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
typeof jQuery!="undefined"&&(jQuery.extend({highlight:function(n,t,i,r,u){if(u=u==""?".exhghttt":u,n.nodeType===3){var h=n.data.normalize("NFD").replace(/[\u0300-\u036f]/g,""),f=h.match(t);if(f){var s=document.createElement(i||"span");if(s.className=r||"highlight",/\.|,|\s/.test(f[0].charAt(0)))var c=f.index+1;else var c=f.index;var e=n.splitText(c);e.splitText(f[1].length);var l=e.cloneNode(!0);return s.appendChild(l),e.parentNode.replaceChild(s,e),1}}else if(n.nodeType===1&&n.childNodes&&!/(script|style)/i.test(n.tagName)&&!jQuery(n).closest(u).length>0&&!(n.tagName===i.toUpperCase()&&n.className===r))for(var o=0;o<n.childNodes.length;o++)o+=jQuery.highlight(n.childNodes[o],t,i,r,u);return 0}}),jQuery.fn.unhighlight=function(n){var t={className:"highlight",element:"span"};return jQuery.extend(t,n),this.find(t.element+"."+t.className).each(function(){var n=this.parentNode;n.replaceChild(this.firstChild,this);n.normalize()}).end()},jQuery.fn.highlight=function(n,t){var i={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1,excludeParents:""};if(jQuery.extend(i,t),n.constructor===String&&(n=[n]),n=jQuery.grep(n,function(n){return n!=""}),n=jQuery.map(n,function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g,"")}),n.length==0)return this;var u=i.caseSensitive?"":"i",r="("+n.join("|")+")";i.wordsOnly&&(r="(?:,|^|\\s)"+r+"(?:,|$|\\s)");var f=new RegExp(r,u);return this.each(function(){jQuery.highlight(this,f,i.element,i.className,i.excludeParents)})}),function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.asl_SimpleBar=t())}(this,function(){"use strict";var f=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ft(n,t){return t={exports:{}},n(t,t.exports),t.exports}var yt="object",pt=function(n){return n&&n.Math==Math&&n},t=pt(typeof globalThis==yt&&globalThis)||pt(typeof window==yt&&window)||pt(typeof self==yt&&self)||pt(typeof f==yt&&f)||Function("return this")(),u=function(n){try{return!!n()}catch(t){return!0}},a=!u(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),uf={}.propertyIsEnumerable,ff=Object.getOwnPropertyDescriptor,ds=ff&&!uf.call({1:2},1),gs=ds?function(n){var t=ff(this,n);return!!t&&t.enumerable}:uf,ef={f:gs},er=function(n,t){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:t}},nh={}.toString,b=function(n){return nh.call(n).slice(8,-1)},th="".split,wt=u(function(){return!Object("z").propertyIsEnumerable(0)})?function(n){return b(n)=="String"?th.call(n,""):Object(n)}:Object,bt=function(n){if(n==undefined)throw TypeError("Can't call method on "+n);return n},kt=function(n){return wt(bt(n))},n=function(n){return typeof n=="object"?n!==null:typeof n=="function"},of=function(t,i){if(!n(t))return t;var r,u;if(i&&typeof(r=t.toString)=="function"&&!n(u=r.call(t))||typeof(r=t.valueOf)=="function"&&!n(u=r.call(t))||!i&&typeof(r=t.toString)=="function"&&!n(u=r.call(t)))return u;throw TypeError("Can't convert object to primitive value");},ih={}.hasOwnProperty,r=function(n,t){return ih.call(n,t)},or=t.document,rh=n(or)&&n(or.createElement),sf=function(n){return rh?or.createElement(n):{}},hf=!a&&!u(function(){return Object.defineProperty(sf("div"),"a",{get:function(){return 7}}).a!=7}),cf=Object.getOwnPropertyDescriptor,uh=a?cf:function(n,t){if(n=kt(n),t=of(t,!0),hf)try{return cf(n,t)}catch(i){}if(r(n,t))return er(!ef.f.call(n,t),n[t])},lf={f:uh},s=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t},af=Object.defineProperty,fh=a?af:function(n,t,i){if(s(n),t=of(t,!0),s(i),hf)try{return af(n,t,i)}catch(r){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(n[t]=i.value),n},k={f:fh},o=a?function(n,t,i){return k.f(n,t,er(1,i))}:function(n,t,i){return n[t]=i,n},sr=function(n,i){try{o(t,n,i)}catch(r){t[n]=i}return i},dt=ft(function(n){var i="__core-js_shared__",r=t[i]||sr(i,{});(n.exports=function(n,t){return r[n]||(r[n]=t!==undefined?t:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),gt=dt("native-function-to-string",Function.toString),vf=t.WeakMap,yf=typeof vf=="function"&&/native code/.test(gt.call(vf)),eh=0,oh=Math.random(),hr=function(n){return"Symbol("+String(n===undefined?"":n)+")_"+(++eh+oh).toString(36)},pf=dt("keys"),cr=function(n){return pf[n]||(pf[n]=hr(n))},ni={},sh=t.WeakMap,ti,et,ii,hh=function(n){return ii(n)?et(n):ti(n,{})},ch=function(t){return function(i){var r;if(!n(i)||(r=et(i)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}};if(yf){var d=new sh,lh=d.get,ah=d.has,vh=d.set;ti=function(n,t){return vh.call(d,n,t),t};et=function(n){return lh.call(d,n)||{}};ii=function(n){return ah.call(d,n)}}else{var ot=cr("state");ni[ot]=!0;ti=function(n,t){return o(n,ot,t),t};et=function(n){return r(n,ot)?n[ot]:{}};ii=function(n){return r(n,ot)}}var h={set:ti,get:et,has:ii,enforce:hh,getterFor:ch},st=ft(function(n){var i=h.get,u=h.enforce,f=String(gt).split("toString");dt("inspectSource",function(n){return gt.call(n)});(n.exports=function(n,i,e,s){var c=s?!!s.unsafe:!1,h=s?!!s.enumerable:!1,l=s?!!s.noTargetGet:!1;if(typeof e=="function"&&(typeof i!="string"||r(e,"name")||o(e,"name",i),u(e).source=f.join(typeof i=="string"?i:"")),n===t){h?n[i]=e:sr(i,e);return}c?!l&&n[i]&&(h=!0):delete n[i];h?n[i]=e:o(n,i,e)})(Function.prototype,"toString",function(){return typeof this=="function"&&i(this).source||gt.call(this)})}),lr=t,wf=function(n){return typeof n=="function"?n:undefined},bf=function(n,i){return arguments.length<2?wf(lr[n])||wf(t[n]):lr[n]&&lr[n][i]||t[n]&&t[n][i]},yh=Math.ceil,ph=Math.floor,ar=function(n){return isNaN(n=+n)?0:(n>0?ph:yh)(n)},wh=Math.min,ri=function(n){return n>0?wh(ar(n),9007199254740991):0},bh=Math.max,kh=Math.min,dh=function(n,t){var i=ar(n);return i<0?bh(i+t,0):kh(i,t)},kf=function(n){return function(t,i,r){var f=kt(t),e=ri(f.length),u=dh(r,e),o;if(n&&i!=i){while(e>u)if(o=f[u++],o!=o)return!0}else for(;e>u;u++)if((n||u in f)&&f[u]===i)return n||u||0;return!n&&-1}},gh={includes:kf(!0),indexOf:kf(!1)},nc=gh.indexOf,df=function(n,t){var f=kt(n),e=0,u=[];for(var i in f)!r(ni,i)&&r(f,i)&&u.push(i);while(t.length>e)r(f,i=t[e++])&&(~nc(u,i)||u.push(i));return u},ui=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tc=ui.concat("length","prototype"),ic=Object.getOwnPropertyNames||function(n){return df(n,tc)},rc={f:ic},uc=Object.getOwnPropertySymbols,gf={f:uc},fc=bf("Reflect","ownKeys")||function(n){var t=rc.f(s(n)),i=gf.f;return i?t.concat(i(n)):t},ec=function(n,t){for(var f=fc(t),e=k.f,o=lf.f,i=0;i<f.length;i++){var u=f[i];r(n,u)||e(n,u,o(t,u))}},oc=/#|\.prototype\./,ht=function(n,t){var i=hc[sc(n)];return i==lc?!0:i==cc?!1:typeof t=="function"?u(t):!!t},sc=ht.normalize=function(n){return String(n).replace(oc,".").toLowerCase()},hc=ht.data={},cc=ht.NATIVE="N",lc=ht.POLYFILL="P",vr=ht,ac=lf.f,l=function(n,i){var s=n.target,c=n.global,l=n.stat,a,f,r,u,e,h;if(f=c?t:l?t[s]||sr(s,{}):(t[s]||{}).prototype,f)for(r in i){if(e=i[r],n.noTargetGet?(h=ac(f,r),u=h&&h.value):u=f[r],a=vr(c?r:s+(l?".":"#")+r,n.forced),!a&&u!==undefined){if(typeof e==typeof u)continue;ec(e,u)}(n.sham||u&&u.sham)&&o(e,"sham",!0);st(f,r,e,n)}},ne=function(n){if(typeof n!="function")throw TypeError(String(n)+" is not a function");return n},te=function(n,t,i){if(ne(n),t===undefined)return n;switch(i){case 0:return function(){return n.call(t)};case 1:return function(i){return n.call(t,i)};case 2:return function(i,r){return n.call(t,i,r)};case 3:return function(i,r,u){return n.call(t,i,r,u)}}return function(){return n.apply(t,arguments)}},fi=function(n){return Object(bt(n))},ie=Array.isArray||function(n){return b(n)=="Array"},re=!!Object.getOwnPropertySymbols&&!u(function(){return!String(Symbol())}),ue=t.Symbol,fe=dt("wks"),e=function(n){return fe[n]||(fe[n]=re&&ue[n]||(re?ue:hr)("Symbol."+n))},vc=e("species"),yc=function(t,i){var r;return ie(t)&&(r=t.constructor,typeof r=="function"&&(r===Array||ie(r.prototype))?r=undefined:n(r)&&(r=r[vc],r===null&&(r=undefined))),new(r===undefined?Array:r)(i===0?0:i)},pc=[].push,v=function(n){var i=n==1,u=n==2,f=n==3,t=n==4,r=n==6,e=n==5||r;return function(o,s,h,c){for(var w=fi(o),v=wt(w),d=te(s,h,3),b=ri(v.length),l=0,k=c||yc,y=i?k(o,b):u?k(o,0):undefined,a,p;b>l;l++)if((e||l in v)&&(a=v[l],p=d(a,l,w),n))if(i)y[l]=p;else if(p)switch(n){case 3:return!0;case 5:return a;case 6:return l;case 2:pc.call(y,a)}else if(t)return!1;return r?-1:f||t?t:y}},ei={forEach:v(0),map:v(1),filter:v(2),some:v(3),every:v(4),find:v(5),findIndex:v(6)},ee=function(n,t){var i=[][n];return!i||!u(function(){i.call(null,t||function(){throw 1;},1)})},wc=ei.forEach,ct=ee("forEach")?function(n){return wc(this,n,arguments.length>1?arguments[1]:undefined)}:[].forEach;l({target:"Array",proto:!0,forced:[].forEach!=ct},{forEach:ct});var yr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var bc in yr){var oe=t[bc],oi=oe&&oe.prototype;if(oi&&oi.forEach!==ct)try{o(oi,"forEach",ct)}catch(bb){oi.forEach=ct}}var kc=!!(typeof window!="undefined"&&window.document&&window.document.createElement),pr=kc,dc=e("species"),gc=function(n){return!u(function(){var t=[],i=t.constructor={};return i[dc]=function(){return{foo:1}},t[n](Boolean).foo!==1})},nl=ei.filter;l({target:"Array",proto:!0,forced:!gc("filter")},{filter:function(n){return nl(this,n,arguments.length>1?arguments[1]:undefined)}});var si=Object.keys||function(n){return df(n,ui)},tl=a?Object.defineProperties:function(n,t){s(n);for(var i=si(t),f=i.length,r=0,u;f>r;)k.f(n,u=i[r++],t[u]);return n},il=bf("document","documentElement"),se=cr("IE_PROTO"),wr="prototype",br=function(){},hi=function(){var t=sf("iframe"),r=ui.length,u="<",i="script",f=">",e="java"+i+":",n;for(t.style.display="none",il.appendChild(t),t.src=String(e),n=t.contentWindow.document,n.open(),n.write(u+i+f+"document.F=Object"+u+"/"+i+f),n.close(),hi=n.F;r--;)delete hi[wr][ui[r]];return hi()},he=Object.create||function(n,t){var i;return n!==null?(br[wr]=s(n),i=new br,br[wr]=null,i[se]=n):i=hi(),t===undefined?i:tl(i,t)};ni[se]=!0;var kr=e("unscopables"),dr=Array.prototype;dr[kr]==undefined&&o(dr,kr,he(null));var gr=function(n){dr[kr][n]=!0},g={},rl=!u(function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype}),ce=cr("IE_PROTO"),ul=Object.prototype,ci=rl?Object.getPrototypeOf:function(n){return(n=fi(n),r(n,ce))?n[ce]:typeof n.constructor=="function"&&n instanceof n.constructor?n.constructor.prototype:n instanceof Object?ul:null},le=e("iterator"),ae=!1,fl=function(){return this},nt,nu,tu;[].keys&&(tu=[].keys(),"next"in tu?(nu=ci(ci(tu)),nu!==Object.prototype&&(nt=nu)):ae=!0);nt==undefined&&(nt={});r(nt,le)||o(nt,le,fl);var iu={IteratorPrototype:nt,BUGGY_SAFARI_ITERATORS:ae},el=k.f,ve=e("toStringTag"),ru=function(n,t,i){n&&!r(n=i?n:n.prototype,ve)&&el(n,ve,{configurable:!0,value:t})},ol=iu.IteratorPrototype,sl=function(){return this},hl=function(n,t,i){var r=t+" Iterator";return n.prototype=he(ol,{next:er(1,i)}),ru(n,r,!1),g[r]=sl,n},cl=function(t){if(!n(t)&&t!==null)throw TypeError("Can't set "+String(t)+" as a prototype");return t},li=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},n;try{n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set;n.call(i,[]);t=i instanceof Array}catch(r){}return function(i,r){return s(i),cl(r),t?n.call(i,r):i.__proto__=r,i}}():undefined),uu=iu.IteratorPrototype,ai=iu.BUGGY_SAFARI_ITERATORS,lt=e("iterator"),ye="keys",vi="values",pe="entries",ll=function(){return this},we=function(n,t,i,r,u,f,e){hl(i,t,r);var y=function(n){if(n===u&&h)return h;if(!ai&&n in s)return s[n];switch(n){case ye:return function(){return new i(this,n)};case vi:return function(){return new i(this,n)};case pe:return function(){return new i(this,n)}}return function(){return new i(this)}},k=t+" Iterator",w=!1,s=n.prototype,a=s[lt]||s["@@iterator"]||u&&s[u],h=!ai&&a||y(u),b=t=="Array"?s.entries||a:a,c,v,p;if(b&&(c=ci(b.call(new n)),uu!==Object.prototype&&c.next&&(ci(c)!==uu&&(li?li(c,uu):typeof c[lt]!="function"&&o(c,lt,ll)),ru(c,k,!0))),u==vi&&a&&a.name!==vi&&(w=!0,h=function(){return a.call(this)}),s[lt]!==h&&o(s,lt,h),g[t]=h,u)if(v={values:y(vi),keys:f?h:y(ye),entries:y(pe)},e)for(p in v)!ai&&!w&&p in s||st(s,p,v[p]);else l({target:t,proto:!0,forced:ai||w},v);return v},be="Array Iterator",al=h.set,vl=h.getterFor(be),at=we(Array,"Array",function(n,t){al(this,{type:be,target:kt(n),index:0,kind:t})},function(){var t=vl(this),i=t.target,r=t.kind,n=t.index++;return!i||n>=i.length?(t.target=undefined,{value:undefined,done:!0}):r=="keys"?{value:n,done:!1}:r=="values"?{value:i[n],done:!1}:{value:[n,i[n]],done:!1}},"values");g.Arguments=g.Array;gr("keys");gr("values");gr("entries");var yi=Object.assign,ke=!yi||u(function(){var n={},t={},i=Symbol(),r="abcdefghijklmnopqrst";return n[i]=7,r.split("").forEach(function(n){t[n]=n}),yi({},n)[i]!=7||si(yi({},t)).join("")!=r})?function(n){for(var r=fi(n),s=arguments.length,u=1,f=gf.f,h=ef.f;s>u;)for(var t=wt(arguments[u++]),e=f?si(t).concat(f(t)):si(t),c=e.length,o=0,i;c>o;)i=e[o++],(!a||h.call(t,i))&&(r[i]=t[i]);return r}:yi;l({target:"Object",stat:!0,forced:Object.assign!==ke},{assign:ke});var yl=e("toStringTag"),pl=b(function(){return arguments}())=="Arguments",wl=function(n,t){try{return n[t]}catch(i){}},de=function(n){var t,i,r;return n===undefined?"Undefined":n===null?"Null":typeof(i=wl(t=Object(n),yl))=="string"?i:pl?b(t):(r=b(t))=="Object"&&typeof t.callee=="function"?"Arguments":r},bl=e("toStringTag"),fu={};fu[bl]="z";var ge=String(fu)!=="[object z]"?function(){return"[object "+de(this)+"]"}:fu.toString,no=Object.prototype;ge!==no.toString&&st(no,"toString",ge,{unsafe:!0});var eu="\t\n\x0b\f\r \u2028\u2029",pi="["+eu+"]",kl=RegExp("^"+pi+pi+"*"),dl=RegExp(pi+pi+"*$"),ou=function(n){return function(t){var i=String(bt(t));return n&1&&(i=i.replace(kl,"")),n&2&&(i=i.replace(dl,"")),i}},gl={start:ou(1),end:ou(2),trim:ou(3)},na=gl.trim,wi=t.parseInt,ta=/^[+-]?0[Xx]/,ia=wi(eu+"08")!==8||wi(eu+"0x16")!==22,to=ia?function(n,t){var i=na(String(n));return wi(i,t>>>0||(ta.test(i)?16:10))}:wi;l({global:!0,forced:parseInt!=to},{parseInt:to});var io=function(n){return function(t,i){var u=String(bt(t)),r=ar(i),o=u.length,f,e;return r<0||r>=o?n?"":undefined:(f=u.charCodeAt(r),f<55296||f>56319||r+1===o||(e=u.charCodeAt(r+1))<56320||e>57343?n?u.charAt(r):f:n?u.slice(r,r+2):(f-55296<<10)+(e-56320)+65536)}},ro={codeAt:io(!1),charAt:io(!0)},ra=ro.charAt,uo="String Iterator",ua=h.set,fa=h.getterFor(uo);we(String,"String",function(n){ua(this,{type:uo,string:String(n),index:0})},function(){var n=fa(this),i=n.string,r=n.index,t;return r>=i.length?{value:undefined,done:!0}:(t=ra(i,r),n.index+=t.length,{value:t,done:!1})});var su=function(n,t,i){for(var r in t)st(n,r,t[r],i);return n},ea=!u(function(){return Object.isExtensible(Object.preventExtensions({}))}),y=ft(function(t){var e=k.f,i=hr("meta"),o=0,u=Object.isExtensible||function(){return!0},f=function(n){e(n,i,{value:{objectID:"O"+ ++o,weakData:{}}})},s=function(t,e){if(!n(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!r(t,i)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[i].objectID},h=function(n,t){if(!r(n,i)){if(!u(n))return!0;if(!t)return!1;f(n)}return n[i].weakData},c=function(n){return ea&&l.REQUIRED&&u(n)&&!r(n,i)&&f(n),n},l=t.exports={REQUIRED:!1,fastKey:s,getWeakData:h,onFreeze:c};ni[i]=!0}),ik=y.REQUIRED,rk=y.fastKey,uk=y.getWeakData,fk=y.onFreeze,oa=e("iterator"),sa=Array.prototype,ha=function(n){return n!==undefined&&(g.Array===n||sa[oa]===n)},ca=e("iterator"),la=function(n){if(n!=undefined)return n[ca]||n["@@iterator"]||g[de(n)]},aa=function(n,t,i,r){try{return r?t(s(i)[0],i[1]):t(i)}catch(f){var u=n["return"];u!==undefined&&s(u.call(n));throw f;}},fo=ft(function(n){var t=function(n,t){this.stopped=n;this.result=t},i=n.exports=function(n,i,r,u,f){var a=te(i,r,u?2:1),h,c,o,v,e,l;if(f)h=n;else{if(c=la(n),typeof c!="function")throw TypeError("Target is not iterable");if(ha(c)){for(o=0,v=ri(n.length);v>o;o++)if(e=u?a(s(l=n[o])[0],l[1]):a(n[o]),e&&e instanceof t)return e;return new t(!1)}h=c.call(n)}while(!(l=h.next()).done)if(e=aa(h,a,l.value,u),e&&e instanceof t)return e;return new t(!1)};i.stop=function(n){return new t(!0,n)}}),eo=function(n,t,i){if(!(n instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return n},oo=e("iterator"),so=!1;try{var va=0,ho={next:function(){return{done:!!va++}},"return":function(){so=!0}};ho[oo]=function(){return this};Array.from(ho,function(){throw 2;})}catch(bb){}var ya=function(n,t){if(!t&&!so)return!1;var i=!1;try{var r={};r[oo]=function(){return{next:function(){return{done:i=!0}}}};n(r)}catch(u){}return i},pa=function(t,i,r){var u,f;return li&&typeof(u=i.constructor)=="function"&&u!==r&&n(f=u.prototype)&&f!==r.prototype&&li(t,f),t},wa=function(i,r,f,e,o){var h=t[i],c=h&&h.prototype,s=h,a=e?"set":"add",w={},v=function(t){var i=c[t];st(c,t,t=="add"?function(n){return i.call(this,n===0?0:n),this}:t=="delete"?function(t){return o&&!n(t)?!1:i.call(this,t===0?0:t)}:t=="get"?function(t){return o&&!n(t)?undefined:i.call(this,t===0?0:t)}:t=="has"?function(t){return o&&!n(t)?!1:i.call(this,t===0?0:t)}:function(n,t){return i.call(this,n===0?0:n,t),this})};if(vr(i,typeof h!="function"||!(o||c.forEach&&!u(function(){(new h).entries().next()}))))s=f.getConstructor(r,i,e,a),y.REQUIRED=!0;else if(vr(i,!0)){var p=new s,k=p[a](o?{}:-0,1)!=p,d=u(function(){p.has(1)}),g=ya(function(n){new h(n)}),b=!o&&u(function(){for(var t=new h,n=5;n--;)t[a](n,n);return!t.has(-0)});g||(s=r(function(n,t){eo(n,s,i);var r=pa(new h,n,s);return t!=undefined&&fo(t,r[a],r,e),r}),s.prototype=c,c.constructor=s);(d||b)&&(v("delete"),v("has"),e&&v("get"));(b||k)&&v(a);o&&c.clear&&delete c.clear}return w[i]=s,l({global:!0,forced:s!=h},w),ru(s,i),o||f.setStrong(s,i,e),s},bi=y.getWeakData,ba=h.set,ka=h.getterFor,da=ei.find,ga=ei.findIndex,nv=0,ki=function(n){return n.frozen||(n.frozen=new co)},co=function(){this.entries=[]},hu=function(n,t){return da(n.entries,function(n){return n[0]===t})};co.prototype={get:function(n){var t=hu(this,n);if(t)return t[1]},has:function(n){return!!hu(this,n)},set:function(n,t){var i=hu(this,n);i?i[1]=t:this.entries.push([n,t])},"delete":function(n){var t=ga(this.entries,function(t){return t[0]===n});return~t&&this.entries.splice(t,1),!!~t}};var lo={getConstructor:function(t,i,u,f){var e=t(function(n,t){eo(n,e,i);ba(n,{type:i,id:nv++,frozen:undefined});t!=undefined&&fo(t,n[f],n,u)}),o=ka(i),h=function(n,t,i){var r=o(n),u=bi(s(t),!0);return u===!0?ki(r).set(t,i):u[r.id]=i,n};return su(e.prototype,{"delete":function(t){var u=o(this);if(!n(t))return!1;var i=bi(t);return i===!0?ki(u)["delete"](t):i&&r(i,u.id)&&delete i[u.id]},has:function(t){var u=o(this);if(!n(t))return!1;var i=bi(t);return i===!0?ki(u).has(t):i&&r(i,u.id)}}),su(e.prototype,u?{get:function(t){var r=o(this);if(n(t)){var i=bi(t);return i===!0?ki(r).get(t):i?i[r.id]:undefined}},set:function(n,t){return h(this,n,t)}}:{add:function(n){return h(this,n,!0)}}),e}},ek=ft(function(i){var f=h.enforce,v=!t.ActiveXObject&&"ActiveXObject"in t,e=Object.isExtensible,r,s=function(n){return function(){return n(this,arguments.length?arguments[0]:undefined)}},p=i.exports=wa("WeakMap",s,lo,!0,!0);if(yf&&v){r=lo.getConstructor(s,"WeakMap",!0);y.REQUIRED=!0;var u=p.prototype,c=u["delete"],o=u.has,l=u.get,a=u.set;su(u,{"delete":function(t){if(n(t)&&!e(t)){var i=f(this);return i.frozen||(i.frozen=new r),c.call(this,t)||i.frozen["delete"](t)}return c.call(this,t)},has:function(t){if(n(t)&&!e(t)){var i=f(this);return i.frozen||(i.frozen=new r),o.call(this,t)||i.frozen.has(t)}return o.call(this,t)},get:function(t){if(n(t)&&!e(t)){var i=f(this);return i.frozen||(i.frozen=new r),o.call(this,t)?l.call(this,t):i.frozen.get(t)}return l.call(this,t)},set:function(t,i){if(n(t)&&!e(t)){var u=f(this);u.frozen||(u.frozen=new r);o.call(this,t)?a.call(this,t,i):u.frozen.set(t,i)}else a.call(this,t,i);return this}})}}),cu=e("iterator"),ao=e("toStringTag"),lu=at.values;for(var au in yr){var vo=t[au],c=vo&&vo.prototype;if(c){if(c[cu]!==lu)try{o(c,cu,lu)}catch(bb){c[cu]=lu}if(c[ao]||o(c,ao,au),yr[au])for(var tt in at)if(c[tt]!==at[tt])try{o(c,tt,at[tt])}catch(bb){c[tt]=at[tt]}}}var yo="Expected a function",po=0/0,tv="[object Symbol]",iv=/^\s+|\s+$/g,rv=/^[-+]0x[0-9a-f]+$/i,uv=/^0b[01]+$/i,fv=/^0o[0-7]+$/i,ev=parseInt,ov=typeof f=="object"&&f&&f.Object===Object&&f,sv=typeof self=="object"&&self&&self.Object===Object&&self,hv=ov||sv||Function("return this")(),cv=Object.prototype,lv=cv.toString,av=Math.max,vv=Math.min,vu=function(){return hv.Date.now()};function yv(n,t,i){var f,o,c,e,r,u,s=0,p=!1,h=!1,a=!0;if(typeof n!="function")throw new TypeError(yo);t=wo(t)||0;di(i)&&(p=!!i.leading,h="maxWait"in i,c=h?av(wo(i.maxWait)||0,t):c,a="trailing"in i?!!i.trailing:a);function v(t){var i=f,r=o;return f=o=undefined,s=t,e=n.apply(r,i)}function k(n){return s=n,r=setTimeout(l,t),p?v(n):e}function d(n){var r=n-u,f=n-s,i=t-r;return h?vv(i,c-f):i}function w(n){var i=n-u,r=n-s;return u===undefined||i>=t||i<0||h&&r>=c}function l(){var n=vu();if(w(n))return b(n);r=setTimeout(l,d(n))}function b(n){return(r=undefined,a&&f)?v(n):(f=o=undefined,e)}function g(){r!==undefined&&clearTimeout(r);s=0;f=u=o=r=undefined}function nt(){return r===undefined?e:b(vu())}function y(){var n=vu(),i=w(n);if(f=arguments,o=this,u=n,i){if(r===undefined)return k(u);if(h)return r=setTimeout(l,t),v(u)}return r===undefined&&(r=setTimeout(l,t)),e}return y.cancel=g,y.flush=nt,y}function pv(n,t,i){var r=!0,u=!0;if(typeof n!="function")throw new TypeError(yo);return di(i)&&(r="leading"in i?!!i.leading:r,u="trailing"in i?!!i.trailing:u),yv(n,t,{leading:r,maxWait:t,trailing:u})}function di(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function wv(n){return!!n&&typeof n=="object"}function bv(n){return typeof n=="symbol"||wv(n)&&lv.call(n)==tv}function wo(n){if(typeof n=="number")return n;if(bv(n))return po;if(di(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=di(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(iv,"");var i=uv.test(n);return i||fv.test(n)?ev(n.slice(2),i?2:8):rv.test(n)?po:+n}var bo=pv,kv="Expected a function",ko=0/0,dv="[object Symbol]",gv=/^\s+|\s+$/g,ny=/^[-+]0x[0-9a-f]+$/i,ty=/^0b[01]+$/i,iy=/^0o[0-7]+$/i,ry=parseInt,uy=typeof f=="object"&&f&&f.Object===Object&&f,fy=typeof self=="object"&&self&&self.Object===Object&&self,ey=uy||fy||Function("return this")(),oy=Object.prototype,sy=oy.toString,hy=Math.max,cy=Math.min,yu=function(){return ey.Date.now()};function ly(n,t,i){var f,o,c,e,r,u,s=0,p=!1,h=!1,a=!0;if(typeof n!="function")throw new TypeError(kv);t=go(t)||0;pu(i)&&(p=!!i.leading,h="maxWait"in i,c=h?hy(go(i.maxWait)||0,t):c,a="trailing"in i?!!i.trailing:a);function v(t){var i=f,r=o;return f=o=undefined,s=t,e=n.apply(r,i)}function k(n){return s=n,r=setTimeout(l,t),p?v(n):e}function d(n){var r=n-u,f=n-s,i=t-r;return h?cy(i,c-f):i}function w(n){var i=n-u,r=n-s;return u===undefined||i>=t||i<0||h&&r>=c}function l(){var n=yu();if(w(n))return b(n);r=setTimeout(l,d(n))}function b(n){return(r=undefined,a&&f)?v(n):(f=o=undefined,e)}function g(){r!==undefined&&clearTimeout(r);s=0;f=u=o=r=undefined}function nt(){return r===undefined?e:b(yu())}function y(){var n=yu(),i=w(n);if(f=arguments,o=this,u=n,i){if(r===undefined)return k(u);if(h)return r=setTimeout(l,t),v(u)}return r===undefined&&(r=setTimeout(l,t)),e}return y.cancel=g,y.flush=nt,y}function pu(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function ay(n){return!!n&&typeof n=="object"}function vy(n){return typeof n=="symbol"||ay(n)&&sy.call(n)==dv}function go(n){if(typeof n=="number")return n;if(vy(n))return ko;if(pu(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=pu(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(gv,"");var i=ty.test(n);return i||iy.test(n)?ry(n.slice(2),i?2:8):ny.test(n)?ko:+n}var ns=ly,yy="Expected a function",ts="__lodash_hash_undefined__",py="[object Function]",wy="[object GeneratorFunction]",by=/^\[object .+?Constructor\]$/,ky=typeof f=="object"&&f&&f.Object===Object&&f,dy=typeof self=="object"&&self&&self.Object===Object&&self,is=ky||dy||Function("return this")();function gy(n,t){return n==null?undefined:n[t]}function np(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch(i){}return t}var tp=Array.prototype,ip=Function.prototype,rs=Object.prototype,wu=is["__core-js_shared__"],us=function(){var n=/[^.]+$/.exec(wu&&wu.keys&&wu.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),fs=ip.toString,bu=rs.hasOwnProperty,rp=rs.toString,up=RegExp("^"+fs.call(bu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fp=tp.splice,ep=es(is,"Map"),vt=es(Object,"create");function p(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function op(){this.__data__=vt?vt(null):{}}function sp(n){return this.has(n)&&delete this.__data__[n]}function hp(n){var t=this.__data__;if(vt){var i=t[n];return i===ts?undefined:i}return bu.call(t,n)?t[n]:undefined}function cp(n){var t=this.__data__;return vt?t[n]!==undefined:bu.call(t,n)}function lp(n,t){var i=this.__data__;return i[n]=vt&&t===undefined?ts:t,this}p.prototype.clear=op;p.prototype["delete"]=sp;p.prototype.get=hp;p.prototype.has=cp;p.prototype.set=lp;function it(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function ap(){this.__data__=[]}function vp(n){var t=this.__data__,i=gi(t,n);if(i<0)return!1;var r=t.length-1;return i==r?t.pop():fp.call(t,i,1),!0}function yp(n){var t=this.__data__,i=gi(t,n);return i<0?undefined:t[i][1]}function pp(n){return gi(this.__data__,n)>-1}function wp(n,t){var i=this.__data__,r=gi(i,n);return r<0?i.push([n,t]):i[r][1]=t,this}it.prototype.clear=ap;it.prototype["delete"]=vp;it.prototype.get=yp;it.prototype.has=pp;it.prototype.set=wp;function w(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function bp(){this.__data__={hash:new p,map:new(ep||it),string:new p}}function kp(n){return nr(this,n)["delete"](n)}function dp(n){return nr(this,n).get(n)}function gp(n){return nr(this,n).has(n)}function nw(n,t){return nr(this,n).set(n,t),this}w.prototype.clear=bp;w.prototype["delete"]=kp;w.prototype.get=dp;w.prototype.has=gp;w.prototype.set=nw;function gi(n,t){for(var i=n.length;i--;)if(fw(n[i][0],t))return i;return-1}function tw(n){if(!os(n)||rw(n))return!1;var t=ew(n)||np(n)?up:by;return t.test(uw(n))}function nr(n,t){var i=n.__data__;return iw(t)?i[typeof t=="string"?"string":"hash"]:i.map}function es(n,t){var i=gy(n,t);return tw(i)?i:undefined}function iw(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function rw(n){return!!us&&us in n}function uw(n){if(n!=null){try{return fs.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function ku(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(yy);var i=function(){var r=arguments,u=t?t.apply(this,r):r[0],f=i.cache;if(f.has(u))return f.get(u);var e=n.apply(this,r);return i.cache=f.set(u,e),e};return i.cache=new(ku.Cache||w),i}ku.Cache=w;function fw(n,t){return n===t||n!==n&&t!==t}function ew(n){var t=os(n)?rp.call(n):"";return t==py||t==wy}function os(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}var ow=ku,ss=function(){function n(n,t){var i=-1;return n.some(function(n,r){return n[0]===t?(i=r,!0):!1}),i}return typeof Map!="undefined"?Map:function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=n(this.__entries__,t),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(t,i){var r=n(this.__entries__,t);~r?this.__entries__[r][1]=i:this.__entries__.push([t,i])},t.prototype.delete=function(t){var i=this.__entries__,r=n(i,t);~r&&i.splice(r,1)},t.prototype.has=function(t){return!!~n(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,t){t===void 0&&(t=null);for(var i=0,r=this.__entries__;i<r.length;i++){var u=r[i];n.call(t,u[1],u[0])}},t}()}(),du=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,tr=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),sw=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(tr):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}}(),hw=2;function cw(n,t){var i=!1,r=!1,u=0;function e(){i&&(i=!1,n());r&&f()}function o(){sw(e)}function f(){var n=Date.now();if(i){if(n-u<hw)return;r=!0}else i=!0,r=!1,setTimeout(o,t);u=n}return f}var lw=20,aw=["top","right","bottom","left","width","height","size","weight"],vw=typeof MutationObserver!="undefined",yw=function(){function n(){this.connected_=!1;this.mutationEventsAdded_=!1;this.mutationsObserver_=null;this.observers_=[];this.onTransitionEnd_=this.onTransitionEnd_.bind(this);this.refresh=cw(this.refresh.bind(this),lw)}return n.prototype.addObserver=function(n){~this.observers_.indexOf(n)||this.observers_.push(n);this.connected_||this.connect_()},n.prototype.removeObserver=function(n){var t=this.observers_,i=t.indexOf(n);~i&&t.splice(i,1);!t.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var n=this.updateObservers_();n&&this.refresh()},n.prototype.updateObservers_=function(){var n=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return n.forEach(function(n){return n.broadcastActive()}),n.length>0},n.prototype.connect_=function(){du&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),vw?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){du&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(n){var t=n.propertyName,i=t===void 0?"":t,r=aw.some(function(n){return!!~i.indexOf(n)});r&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),hs=function(n,t){for(var i=0,r=Object.keys(t);i<r.length;i++){var u=r[i];Object.defineProperty(n,u,{value:t[u],enumerable:!1,writable:!1,configurable:!0})}return n},rt=function(n){var t=n&&n.ownerDocument&&n.ownerDocument.defaultView;return t||tr},cs=rr(0,0,0,0);function ir(n){return parseFloat(n)||0}function ls(n){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return i.reduce(function(t,i){var r=n["border-"+i+"-width"];return t+ir(r)},0)}function pw(n){for(var i={},t=0,r=["top","right","bottom","left"];t<r.length;t++){var u=r[t],f=n["padding-"+u];i[u]=ir(f)}return i}function ww(n){var t=n.getBBox();return rr(0,0,t.width,t.height)}function bw(n){var f=n.clientWidth,e=n.clientHeight;if(!f&&!e)return cs;var t=rt(n).getComputedStyle(n),i=pw(t),o=i.left+i.right,s=i.top+i.bottom,r=ir(t.width),u=ir(t.height);if(t.boxSizing==="border-box"&&(Math.round(r+o)!==f&&(r-=ls(t,"left","right")+o),Math.round(u+s)!==e&&(u-=ls(t,"top","bottom")+s)),!dw(n)){var h=Math.round(r+o)-f,c=Math.round(u+s)-e;Math.abs(h)!==1&&(r-=h);Math.abs(c)!==1&&(u-=c)}return rr(i.left,i.top,r,u)}var kw=function(){return typeof SVGGraphicsElement!="undefined"?function(n){return n instanceof rt(n).SVGGraphicsElement}:function(n){return n instanceof rt(n).SVGElement&&typeof n.getBBox=="function"}}();function dw(n){return n===rt(n).document.documentElement}function gw(n){return du?kw(n)?ww(n):bw(n):cs}function nb(n){var t=n.x,i=n.y,r=n.width,u=n.height,e=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,f=Object.create(e.prototype);return hs(f,{x:t,y:i,width:r,height:u,top:i,right:t+r,bottom:u+i,left:t}),f}function rr(n,t,i,r){return{x:n,y:t,width:i,height:r}}var tb=function(){function n(n){this.broadcastWidth=0;this.broadcastHeight=0;this.contentRect_=rr(0,0,0,0);this.target=n}return n.prototype.isActive=function(){var n=gw(this.target);return this.contentRect_=n,n.width!==this.broadcastWidth||n.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var n=this.contentRect_;return this.broadcastWidth=n.width,this.broadcastHeight=n.height,n},n}(),ib=function(){function n(n,t){var i=nb(t);hs(this,{target:n,contentRect:i})}return n}(),rb=function(){function n(n,t,i){if(this.activeObservations_=[],this.observations_=new ss,typeof n!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=n;this.controller_=t;this.callbackCtx_=i}return n.prototype.observe=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element!="undefined"&&Element instanceof Object){if(!(n instanceof rt(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(n)||(t.set(n,new tb(n)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(n){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element!="undefined"&&Element instanceof Object){if(!(n instanceof rt(n).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(n)&&(t.delete(n),t.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive();this.observations_.clear();this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var n=this;this.clearActive();this.observations_.forEach(function(t){t.isActive()&&n.activeObservations_.push(t)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var n=this.callbackCtx_,t=this.activeObservations_.map(function(n){return new ib(n.target,n.broadcastRect())});this.callback_.call(n,t,n);this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),as=typeof WeakMap!="undefined"?new WeakMap:new ss,vs=function(){function n(t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=yw.getInstance(),r=new rb(t,i,this);as.set(this,r)}return n}();["observe","unobserve","disconnect"].forEach(function(n){vs.prototype[n]=function(){var t;return(t=as.get(this))[n].apply(t,arguments)}});var ub=function(){return typeof tr.ResizeObserver!="undefined"?tr.ResizeObserver:vs}(),ut=null,ys=null;pr&&window.addEventListener("resize",function(){ys!==window.devicePixelRatio&&(ys=window.devicePixelRatio,ut=null)});function ps(){if(ut===null){if(typeof document=="undefined")return ut=0;var t=document.body,n=document.createElement("div");n.classList.add("asl_simplebar-hide-scrollbar");t.appendChild(n);var i=n.getBoundingClientRect().right;t.removeChild(n);ut=i}return ut}var i=function(){function t(n,i){var r=this;(this.onScroll=function(){r.scrollXTicking||(window.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0);r.scrollYTicking||(window.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x"));r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y"));r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x");r.showScrollbar("y")},this.onMouseMove=function(n){if(r.mouseX=n.clientX,r.mouseY=n.clientY,r.axis.x.isOverflowing||r.axis.x.forceVisible)r.onMouseMoveForAxis("x");if(r.axis.y.isOverflowing||r.axis.y.forceVisible)r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){if(r.onMouseMove.cancel(),r.axis.x.isOverflowing||r.axis.x.forceVisible)r.onMouseLeaveForAxis("x");if(r.axis.y.isOverflowing||r.axis.y.forceVisible)r.onMouseLeaveForAxis("y");r.mouseX=-1;r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth();r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect();r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect();r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1);r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(n){var t,i;if(r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(i=r.isWithinBounds(r.axis.y.track.rect)),(t||i)&&(n.preventDefault(),n.stopPropagation(),n.type==="mousedown")){if(t)if(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect))r.onDragStart(n,"x");else r.onTrackClick(n,"x");if(i)if(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect))r.onDragStart(n,"y");else r.onTrackClick(n,"y")}},this.drag=function(n){var u,f=r.axis[r.draggedAxis].track,e=f.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,s=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],h=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);n.preventDefault();n.stopPropagation();u=r.draggedAxis==="y"?n.pageY:n.pageX;var c=u-f.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset,l=c/(e-o.size),i=l*(s-h);r.draggedAxis==="x"&&(i=r.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?i-(e+o.size):i,i=r.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-i:i);r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=i},this.onEndDrag=function(n){n.preventDefault();n.stopPropagation();r.el.classList.remove(r.classNames.dragging);document.removeEventListener("mousemove",r.drag,!0);document.removeEventListener("mouseup",r.onEndDrag,!0);r.removePreventClickId=window.setTimeout(function(){document.removeEventListener("click",r.preventClick,!0);document.removeEventListener("dblclick",r.preventClick,!0);r.removePreventClickId=null})},this.preventClick=function(n){n.preventDefault();n.stopPropagation()},this.el=n,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},i),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el))||(this.recalculate=bo(this.recalculate.bind(this),64),this.onMouseMove=bo(this.onMouseMove.bind(this),64),this.hideScrollbars=ns(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=ns(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=ow(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var r=document.createElement("div");r.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"><\/div><\/div>';var n=r.firstElementChild;document.body.appendChild(n);var u=n.firstElementChild;n.scrollLeft=0;var f=t.getOffset(n),i=t.getOffset(u);n.scrollLeft=999;var e=t.getOffset(u);return{isRtlScrollingInverted:f.left!==i.left&&i.left-e.left!=0,isRtlScrollbarInverted:f.left!==i.left}};t.getOffset=function(n){var t=n.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft)}};var n=t.prototype;return n.init=function(){t.instances.set(this.el,this);pr&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},n.initDOM=function(){var i=this;if(Array.prototype.filter.call(this.el.children,function(n){return n.classList.contains(i.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl);this.offsetEl.appendChild(this.contentWrapperEl);this.maskEl.appendChild(this.offsetEl);this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);this.wrapperEl.appendChild(this.maskEl);this.wrapperEl.appendChild(this.placeholderEl);this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var n=document.createElement("div"),t=document.createElement("div");n.classList.add(this.classNames.track);t.classList.add(this.classNames.scrollbar);n.appendChild(t);this.axis.x.track.el=n.cloneNode(!0);this.axis.x.track.el.classList.add(this.classNames.horizontal);this.axis.y.track.el=n.cloneNode(!0);this.axis.y.track.el.classList.add(this.classNames.vertical);this.el.appendChild(this.axis.x.track.el);this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar);this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar);this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible));this.el.setAttribute("data-asl_simplebar","init")},n.initListeners=function(){var n=this;this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter);["mousedown","click","dblclick"].forEach(function(t){n.el.addEventListener(t,n.onPointerEvent,!0)});["touchstart","touchend","touchmove"].forEach(function(t){n.el.addEventListener(t,n.onPointerEvent,{capture:!0,passive:!0})});this.el.addEventListener("mousemove",this.onMouseMove);this.el.addEventListener("mouseleave",this.onMouseLeave);this.contentWrapperEl.addEventListener("scroll",this.onScroll);window.addEventListener("resize",this.onWindowResize);var t=!1;this.resizeObserver=new ub(function(){t&&n.recalculate()});this.resizeObserver.observe(this.el);this.resizeObserver.observe(this.contentEl);window.requestAnimationFrame(function(){t=!0});this.mutationObserver=new MutationObserver(this.recalculate);this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},n.recalculate=function(){this.elStyles=window.getComputedStyle(this.el);this.isRtl=this.elStyles.direction==="rtl";var u=this.heightAutoObserverEl.offsetHeight<=1,f=this.heightAutoObserverEl.offsetWidth<=1,t=this.contentEl.offsetWidth,e=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft;this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var n=this.contentEl.scrollHeight,i=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=u?"auto":"100%";this.placeholderEl.style.width=f?t+"px":"auto";this.placeholderEl.style.height=n+"px";var r=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=i>t;this.axis.y.isOverflowing=n>r;this.axis.x.isOverflowing=o==="hidden"?!1:this.axis.x.isOverflowing;this.axis.y.isOverflowing=s==="hidden"?!1:this.axis.y.isOverflowing;this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0;this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0;this.hideNativeScrollbar();var h=this.axis.x.isOverflowing?this.scrollbarWidth:0,c=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&i>e-c;this.axis.y.isOverflowing=this.axis.y.isOverflowing&&n>r-h;this.axis.x.scrollbar.size=this.getScrollbarSize("x");this.axis.y.scrollbar.size=this.getScrollbarSize("y");this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px";this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px";this.positionScrollbar("x");this.positionScrollbar("y");this.toggleTrackVisibility("x");this.toggleTrackVisibility("y")},n.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var r=this.contentEl[this.axis[n].scrollSizeAttr],i=this.axis[n].track.el[this.axis[n].offsetSizeAttr],t,u=i/r;return t=Math.max(~~(u*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},n.positionScrollbar=function(n){if(n===void 0&&(n="y"),this.axis[n].isOverflowing){var e=this.contentWrapperEl[this.axis[n].scrollSizeAttr],f=this.axis[n].track.el[this.axis[n].offsetSizeAttr],o=parseInt(this.elStyles[this.axis[n].sizeAttr],10),u=this.axis[n].scrollbar,r=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];r=n==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-r:r;var s=r/(e-o),i=~~((f-u.size)*s);i=n==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?i+(f-u.size):i;u.el.style.transform=n==="x"?"translate3d("+i+"px, 0, 0)":"translate3d(0, "+i+"px, 0)"}},n.toggleTrackVisibility=function(n){n===void 0&&(n="y");var t=this.axis[n].track.el,i=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden");i.style.display=this.axis[n].isOverflowing?"block":"none"},n.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0;this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},n.onMouseMoveForAxis=function(n){n===void 0&&(n="y");this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect();this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var t=this.isWithinBounds(this.axis[n].scrollbar.rect);t?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover);this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},n.onMouseLeaveForAxis=function(n){n===void 0&&(n="y");this.axis[n].track.el.classList.remove(this.classNames.hover);this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},n.showScrollbar=function(n){n===void 0&&(n="y");var t=this.axis[n].scrollbar.el;this.axis[n].isVisible||(t.classList.add(this.classNames.visible),this.axis[n].isVisible=!0);this.options.autoHide&&this.hideScrollbars()},n.onDragStart=function(n,t){t===void 0&&(t="y");var i=this.axis[t].scrollbar,r=t==="y"?n.pageY:n.pageX;this.axis[t].dragOffset=r-i.rect[this.axis[t].offsetAttr];this.draggedAxis=t;this.el.classList.add(this.classNames.dragging);document.addEventListener("mousemove",this.drag,!0);document.addEventListener("mouseup",this.onEndDrag,!0);this.removePreventClickId===null?(document.addEventListener("click",this.preventClick,!0),document.addEventListener("dblclick",this.preventClick,!0)):(window.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},n.onTrackClick=function(n,t){var r=this;t===void 0&&(t="y");this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var c=this.axis[t].scrollbar,f=c.rect[this.axis[t].offsetAttr],e=parseInt(this.elStyles[this.axis[t].sizeAttr],10),i=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],l=t==="y"?this.mouseY-f:this.mouseX-f,o=l<0?-1:1,s=o===-1?i-e:i+e,h=40,u=function u(){if(o===-1){if(i>s){var n;i-=h;r.contentWrapperEl.scrollTo((n={},n[r.axis[t].offsetAttr]=i,n));window.requestAnimationFrame(u)}}else if(i<s){var f;i+=h;r.contentWrapperEl.scrollTo((f={},f[r.axis[t].offsetAttr]=i,f));window.requestAnimationFrame(u)}};u()},n.getContentElement=function(){return this.contentEl},n.getScrollElement=function(){return this.contentWrapperEl},n.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style?0:ps()}catch(n){return ps()}},n.removeListeners=function(){var n=this;this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter);["mousedown","click","dblclick"].forEach(function(t){n.el.removeEventListener(t,n.onPointerEvent,!0)});["touchstart","touchend","touchmove"].forEach(function(t){n.el.removeEventListener(t,n.onPointerEvent,{capture:!0,passive:!0})});this.el.removeEventListener("mousemove",this.onMouseMove);this.el.removeEventListener("mouseleave",this.onMouseLeave);this.contentWrapperEl.removeEventListener("scroll",this.onScroll);window.removeEventListener("resize",this.onWindowResize);this.mutationObserver.disconnect();this.resizeObserver.disconnect();this.recalculate.cancel();this.onMouseMove.cancel();this.hideScrollbars.cancel();this.onWindowResize.cancel()},n.unMount=function(){this.removeListeners();t.instances.delete(this.el)},n.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},n.findChild=function(n,t){var i=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(n){return i.call(n,t)})[0]},t}();i.defaultOptions={autoHide:!0,forceVisible:!1,classNames:{contentEl:"asl_simplebar-content",contentWrapper:"asl_simplebar-content-wrapper",offset:"asl_simplebar-offset",mask:"asl_simplebar-mask",wrapper:"asl_simplebar-wrapper",placeholder:"asl_simplebar-placeholder",scrollbar:"asl_simplebar-scrollbar",track:"asl_simplebar-track",heightAutoObserverWrapperEl:"asl_simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"asl_simplebar-height-auto-observer",visible:"asl_simplebar-visible",horizontal:"asl_simplebar-horizontal",vertical:"asl_simplebar-vertical",hover:"asl_simplebar-hover",dragging:"asl_simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};i.instances=new WeakMap;var ws=function(n){return function(t,i,r,u){ne(i);var o=fi(t),e=wt(o),s=ri(o.length),f=n?s-1:0,h=n?-1:1;if(r<2)while(!0){if(f in e){u=e[f];f+=h;break}if(f+=h,n?f<0:s<=f)throw TypeError("Reduce of empty array with no initial value");}for(;n?f>=0:s>f;f+=h)f in e&&(u=i(u,e[f],f,o));return u}},fb={left:ws(!1),right:ws(!0)},eb=fb.left;l({target:"Array",proto:!0,forced:ee("reduce")},{reduce:function(n){return eb(this,n,arguments.length,arguments.length>1?arguments[1]:undefined)}});var ob=k.f,gu=Function.prototype,sb=gu.toString,hb=/^\s*function ([^ (]*)/,bs="name";!a||bs in gu||ob(gu,bs,{configurable:!0,get:function(){try{return sb.call(this).match(hb)[1]}catch(n){return""}}});var cb=function(){var t=s(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n},ur=RegExp.prototype.exec,lb=String.prototype.replace,ks=ur,nf=function(){var n=/a/,t=/b*/g;return ur.call(n,"a"),ur.call(t,"a"),n.lastIndex!==0||t.lastIndex!==0}(),tf=/()??/.exec("")[1]!==undefined,ab=nf||tf;ab&&(ks=function(n){var i=this,u,f,t,r;return tf&&(f=new RegExp("^"+i.source+"$(?!\\s)",cb.call(i))),nf&&(u=i.lastIndex),t=ur.call(i,n),nf&&t&&(i.lastIndex=i.global?t.index+t[0].length:u),tf&&t&&t.length>1&&lb.call(t[0],f,function(){for(r=1;r<arguments.length-2;r++)arguments[r]===undefined&&(t[r]=undefined)}),t});var rf=ks;l({target:"RegExp",proto:!0,forced:/./.exec!==rf},{exec:rf});var hk=e("species"),ck=!u(function(){var n=/./;return n.exec=function(){var n=[];return n.groups={a:"7"},n},"".replace(n,"$<a>")!=="7"}),lk=!u(function(){var n=/(?:)/,i=n.exec;n.exec=function(){return i.apply(this,arguments)};var t="ab".split(n);return t.length!==2||t[0]!=="a"||t[1]!=="b"}),vb=ro.charAt,ak=function(n,t,i){return t+(i?vb(n,t).length:1)},vk=function(n,t){var i=n.exec;if(typeof i=="function"){var r=i.call(n,t);if(typeof r!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return r}if(b(n)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return rf.call(n,t)},yk=Math.max,pk=Math.min,wk=Math.floor,bk=function(n){return n===undefined?n:String(n)},fr=function(n){return Array.prototype.reduce.call(n,function(n,t){var r=t.name.match(/data-asl_simplebar-(.+)/);if(r){var i=r[1].replace(/\W+(.)/g,function(n,t){return t.toUpperCase()});switch(t.value){case"true":n[i]=!0;break;case"false":n[i]=!1;break;case undefined:n[i]=!0;break;default:n[i]=t.value}}return n},{})};return i.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements);window.removeEventListener("load",this.initDOMLoadedElements);Array.prototype.forEach.call(document.querySelectorAll('[data-asl_simplebar]:not([data-asl_simplebar="init"])'),function(n){i.instances.has(n)||new i(n,fr(n.attributes))})},i.removeObserver=function(){this.globalObserver.disconnect()},i.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this);typeof MutationObserver!="undefined"&&(this.globalObserver=new MutationObserver(i.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0}));document.readyState!=="complete"&&(document.readyState==="loading"||document.documentElement.doScroll)?(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements)):window.setTimeout(this.initDOMLoadedElements)},i.handleMutations=function(n){n.forEach(function(n){Array.prototype.forEach.call(n.addedNodes,function(n){n.nodeType===1&&(n.hasAttribute("data-asl_simplebar")?i.instances.has(n)||new i(n,fr(n.attributes)):Array.prototype.forEach.call(n.querySelectorAll('[data-asl_simplebar]:not([data-asl_simplebar="init"])'),function(n){i.instances.has(n)||new i(n,fr(n.attributes))}))});Array.prototype.forEach.call(n.removedNodes,function(n){n.nodeType===1&&(n.hasAttribute('[data-asl_simplebar="init"]')?i.instances.has(n)&&i.instances.get(n).unMount():Array.prototype.forEach.call(n.querySelectorAll('[data-asl_simplebar="init"]'),function(n){i.instances.has(n)&&i.instances.get(n).unMount()}))})})},i.getOptions=fr,pr&&i.initHtmlApi(),i});
|
2 |
/*! Ajax Search Lite 4.6 js */
|
3 |
-
if(typeof jQuery!="undefined"&&function(n){var t,a=!0,s={init:function(t,i){var r=this;this.elem=i;this.$elem=n(i);r.searching=!1;r.o=n.extend({blocking:!1},t);r.n={};r.n.container=n(this.elem);r.o.rid=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.o.id=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.n.probox=n(".probox",r.n.container);r.n.proinput=n(".proinput",r.n.container);r.n.text=n(".proinput input.orig",r.n.container);r.n.textAutocomplete=n(".proinput input.autocomplete",r.n.container);r.n.loading=n(".proinput .loading",r.n.container);r.n.proloading=n(".proloading",r.n.container);r.n.proclose=n(".proclose",r.n.container);r.n.promagnifier=n(".promagnifier",r.n.container);r.n.prosettings=n(".prosettings",r.n.container);r.n.searchsettings=n("#ajaxsearchlitesettings"+r.o.rid);r.n.resultsDiv=n("#ajaxsearchliteres"+r.o.rid);r.n.hiddenContainer=n("#asl_hidden_data");r.n.aslItemOverlay=n(".asl_item_overlay",r.n.hiddenContainer);r.resizeTimeout=null;r.n.showmore=n(".showmore",r.n.resultsDiv);r.n.items=n(".item",r.n.resultsDiv);r.n.results=n(".results",r.n.resultsDiv);r.n.resdrg=n(".resdrg",r.n.resultsDiv);r.il={columns:3,itemsPerPage:6};r.post=null;r.postAuto=null;r.cleanUp();r.n.textAutocomplete.val("");r.o.resultitemheight=parseInt(r.o.resultitemheight);r.scroll={};r.savedScrollTop=0;r.savedContainerTop=0;r.is_scroll=typeof asl_SimpleBar!="undefined";typeof ASL.scrollbar!="undefined"&&ASL.scrollbar==0&&(r.is_scroll=!1);r.settScroll=null;r.n.resultsAppend=n("#wpdreams_asl_results_"+r.o.id);r.currentPage=1;r.isotopic=null;r.lastSuccesfulSearch="";r.lastSearchData={};r.triggerPrevState=!1;r.animation="bounceIn";switch(r.o.resultstype){case"vertical":r.animation=r.o.vresultanimation;break;default:r.animation=r.o.hresultanimation}return r.filterFns={number:function(){for(var t=n(this).parent();!t.hasClass("isotopic");)t=t.parent();var i=n(this).attr("data-itemnum"),u=r.currentPage,f=r.il.itemsPerPage;return parseInt(i,10)<f*u&&parseInt(i,10)>=f*(u-1)}},r.disableMobileScroll=!1,r.n.searchsettings.detach().appendTo("body"),r.o.resultsposition=="hover"?r.n.resultsDiv.detach().appendTo("body"):r.n.resultsAppend.length>0&&r.n.resultsDiv.detach().appendTo(r.n.resultsAppend),typeof ASL.resHTML=="undefined"&&(ASL.resHTML=r.n.resultsDiv.html()),typeof ASL.setHTML=="undefined"&&(ASL.setHTML=r.n.searchsettings.html()),n("fieldset",r.n.searchsettings).each(function(){n(".asl_option:not(.hiddend)",this).last().addClass("asl-o-last")}),ASL.js_retain_popstate==1&&r.initPrevState(),v()&&r.n.container.addClass("asl_msie"),r.initSettingsAnimations(),r.initResultsAnimations(),r.initEvents(),r.initAutop(),r.initEtc(),this},initPrevState:function(){var i=this;a&&t==null&&(t=localStorage.getItem("asl-"+u.encode(location.href)),t!=null&&(t=JSON.parse(t),t.settings=u.decode(t.settings)));t!=null&&typeof t.id!="undefined"&&t.id==i.o.id&&(t.phrase!=""&&(i.triggerPrevState=!0,i.n.text.val(t.phrase)),o(n("form",i.n.searchsettings))!=t.settings&&(i.triggerPrevState=!0,o(n("form",i.n.searchsettings),t.settings)));localStorage.removeItem("asl-"+u.encode(location.href));i.n.resultsDiv.on("click",".results .item",function(){var t=i.n.text.val();if(t!=""||i.settingsChanged){var r={id:i.o.id,phrase:t,settings:u.encode(o(n("form",i.n.searchsettings)))};localStorage.setItem("asl-"+u.encode(location.href),JSON.stringify(r))}})},duplicateCheck:function(){var i=this,t={};n("div[id*=ajaxsearchlite]").each(function(){t.hasOwnProperty(this.id)?n(this).remove():t[this.id]="true"})},gaPageview:function(n){var r=this,t=r.gaGetTrackingID();if(typeof ASL.analytics=="undefined"||ASL.analytics.method!="pageview")return!1;if(ASL.analytics.string!=""){var i=typeof __gaTracker=="function"?__gaTracker:typeof ga=="function"?ga:!1,u=typeof gtag=="function"?gtag:!1;window.location.origin||(window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""));var f=r.o.homeurl.replace(window.location.origin,"");u!==!1?t!==!1&&u("config",t,{page_path:f+ASL.analytics.string.replace("{asl_term}",n)}):i!==!1&&(t!==!1&&i("create",t,"auto"),i("send","pageview",{page:f+ASL.analytics.string.replace("{asl_term}",n),title:"Ajax Search"}))}},gaEvent:function(t,i){var u=this,f=u.gaGetTrackingID();if(typeof ASL.analytics=="undefined"||ASL.analytics.method!="event")return!1;var e=typeof gtag=="function"?gtag:!1,o=typeof __gaTracker=="function"?__gaTracker:typeof ga=="function"?ga:!1;if(e===!1&&o===!1)return!1;if(typeof ASL.analytics.event[t]!="undefined"&&ASL.analytics.event[t].active==1&&typeof"gtag"!="undefined"){var s={search_id:u.o.id,search_name:u.o.name,phrase:u.n.text.val(),option_name:"",option_value:"",result_title:"",result_url:"",results_count:""},r={event_category:ASL.analytics.event[t].category,event_label:ASL.analytics.event[t].label,value:ASL.analytics.event[t].value};i=n.extend(s,i);n.each(i,function(t,i){i=String(i).replace(/[\s\n\r]+/g," ").trim();n.each(r,function(n,u){var f=new RegExp("{"+t+"}","gmi");r[n]=u.replace(f,i)})});e===!1?(f!==!1&&o("create",f,"auto"),o("send","event",r.event_category,ASL.analytics.event[t].action,r.event_label,r.value)):(f!==!1&&(r.send_to=f),e("event",ASL.analytics.event[t].action,r))}},gaGetTrackingID:function(){var r=this,n=!1;if(typeof ASL.analytics=="undefined")return n;if(typeof ASL.analytics.tracking_id!="undefined"&&ASL.analytics.tracking_id!="")return ASL.analytics.tracking_id;var i=typeof gtag=="function"?gtag:!1;if(i!==!1&&typeof ga!="undefined"&&typeof ga.getAll!="undefined"){var t=!1;return ga.getAll().forEach(function(n){t=n.get("trackingId")}),t}return n},createVerticalScroll:function(){var t=this;t.is_scroll&&typeof t.scroll.recalculate=="undefined"&&(t.scroll=new asl_SimpleBar(t.n.results.get(0),{direction:n("body").hasClass("rtl")?"rtl":"ltr",autoHide:!0}))},initEvents:function(){var t=this;if(i()&&e())t.n.text.on("touchstart",function(){t.savedScrollTop=n(window).scrollTop();t.savedContainerTop=t.n.container.offset().top});t.n.text.on("click",function(){n(this).trigger("focus");t.gaEvent("focus")});t.n.text.on("focus input",function(){t.searching||(n(this).val()!=""?t.n.proclose.css("display","block"):t.n.proclose.css({display:"none"}))});n(t.n.text.parent()).on("submit",function(n){if(n.preventDefault(),i())if(t.o.redirect_on_enter){var r=jQuery.Event("keyup");r.keyCode=r.which=13;t.n.text.trigger(r)}else t.o.redirectEnterTo=="ajax_search"&&(t.search(),document.activeElement.blur());else t.o.redirectEnterTo=="ajax_search"&&t.search()});t.n.resultsDiv.css({opacity:0});n(document).on("click touchend",function(){(t.hideSettings(),t.opened!=!1&&t.o.closeOnDocClick==1)&&t.hideResults()});t.n.proclose.on("click touchend",function(){t.n.text.val("");t.n.textAutocomplete.val("");t.hideResults();t.n.text.trigger("focus")});n(t.elem).on("click touchend",function(n){n.stopImmediatePropagation()});t.n.resultsDiv.on("click touchend",function(n){n.stopImmediatePropagation()});t.n.searchsettings.on("click touchend",function(n){n.stopImmediatePropagation()});t.n.prosettings.on("click",function(){t.n.prosettings.data("opened")==0?t.showSettings():t.hideSettings()});var f=t.n.container.parents().filter(function(){return n(this).css("position")=="fixed"});if((f.length>0||t.n.container.css("position")=="fixed")&&(t.n.resultsDiv.css("position")=="absolute"&&t.n.resultsDiv.css("position","fixed"),t.n.resultsDiv.css("z-index",99999999999),t.o.blocking||t.n.searchsettings.css("position","fixed")),i())n(window).on("orientationchange",function(){t.orientationChange();setTimeout(function(){t.orientationChange()},800)});else{var r;n(window).on("resize",function(){clearTimeout(r);r=setTimeout(function(){t.resize()},100)})}var u;n(window).on("scroll",function(){clearTimeout(u);u=setTimeout(function(){t.scrolling(!1)},400)});e()&&i()&&parseInt(t.n.text.css("font-size"))<16&&(t.n.text.data("fontSize",t.n.text.css("font-size")).css("font-size","16px"),t.n.textAutocomplete.css("font-size","16px"),n("<style>#ajaxsearchlite"+t.o.rid+" input.orig::-webkit-input-placeholder{font-size: 16px !important;}<\/style>").appendTo("head"));t.initNavigationEvent();t.initMagnifierEvent();t.initAutocompleteEvent();t.initFacetEvents()},initAutop:function(){var n=this;if(t!=null&&n.triggerPrevState)return n.search(),t=null,!1},initEtc:function(){var t=this,r=null;n("div.asl_option",t.n.searchsettings).on("mouseup touchend",function(i){if(i.preventDefault(),i.stopImmediatePropagation(),t.dragging)return!1;n('input[type="checkbox"]',this).prop("checked",!n('input[type="checkbox"]',this).prop("checked"));clearTimeout(r);var u=this;r=setTimeout(function(){n('input[type="checkbox"]',u).trigger("asl_chbx_change")},50)});n("div.asl_option label",t.n.searchsettings).on("click",function(n){n.preventDefault()});t.n.resultsDiv.on("click",".results .item",function(){t.gaEvent("result_click",{result_title:n(this).find("a.asl_res_url").text(),result_url:n(this).find("a.asl_res_url").attr("href")});t.o.singleHighlight==1&&(localStorage.removeItem("asl_phrase_highlight"),c(t.n.text.val())!=""&&localStorage.setItem("asl_phrase_highlight",JSON.stringify({phrase:c(t.n.text.val()),id:t.o.id})))});if(i()&&t.o.mobile.menu_selector!="")n(t.o.mobile.menu_selector).on("touchend",function(){var i=this;setTimeout(function(){var r=n(i).find("input.orig");r=r.length==0?n(i).next().find("input.orig"):r;r=r.length==0?n(i).parent().find("input.orig"):r;r=r.length==0?t.n.text:r;t.n.container.is(":visible")&&r.get(0).focus()},300)})},initNavigationEvent:function(){var t=this;n(t.n.resultsDiv).on("mouseenter",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered");n(this).addClass("hovered")});n(t.n.resultsDiv).on("mouseleave",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered")});n(document).on("keydown",function(i){if(window.event)var r=window.event.keyCode,e=window.event.type;else if(i)var r=i.which,e=i.type;if(n(".item",t.n.resultsDiv).length>0&&t.n.resultsDiv.css("display")!="none"){if(r==40||r==38){r==40&&(t.n.text.blur(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).first().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").next(".item").addClass("hovered"));r==38&&(t.n.text.blur(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).last().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").prev(".item").addClass("hovered"));i.stopPropagation();i.preventDefault();var u=t.is_scroll?n(t.scroll.getScrollElement()):t.n.results,f=t.n.resultsDiv.find(".resdrg .item.hovered");f.length==0&&(f=t.n.resultsDiv.children().first());u.animate({scrollTop:f.offset().top-u.offset().top+u.scrollTop()},{duration:120})}r==13&&n(".item.hovered",t.n.resultsDiv).length>0&&(i.stopPropagation(),i.preventDefault(),n(".item.hovered a.asl_res_url",t.n.resultsDiv).get(0).click())}})},initMagnifierEvent:function(){var t=this,i,u,r=!1;t.n.text.on("keyup",function(f){if(window.event?(t.keycode=window.event.keyCode,t.ktype=window.event.type):f&&(t.keycode=f.which,t.ktype=f.type),t.keycode==13){if(clearTimeout(u),u=setTimeout(function(){r=!1},300),r)return!1;r=!0}var e=n(this).hasClass("orig");if(t.n.text.val().length>=t.o.charcount&&e&&t.ktype=="keyup"&&t.keycode==13){if(t.gaEvent("return"),t.o.redirect_on_enter==1)t.o.redirectEnterTo!="first_result"?t.doRedirectToResults(t.ktype):t.search();else{if(t.o.redirectEnterTo=="nothing")return!1;n("form",t.n.searchsettings).serialize()+t.n.text.val().trim()==t.lastSuccesfulSearch&&t.resultsOpened||t.search()}clearTimeout(i)}});t.n.promagnifier.add(t.n.text).on("click input",function(r){window.event?(t.keycode=window.event.keyCode,t.ktype=window.event.type):r&&(t.keycode=r.which,t.ktype=r.type);var u=n(this).hasClass("orig");if(t.n.text.val().length<t.o.charcount){t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(i);return}if(t.n.text.val().length>=t.o.charcount&&!u&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo!="first_result"){t.doRedirectToResults(t.ktype);clearTimeout(i);return}if((!(t.keycode>=37)||!(t.keycode<=40))&&(!(t.keycode>=112)||!(t.keycode<=123))){if(u&&t.ktype=="click"||t.keycode==32){n("form",t.n.searchsettings).serialize()+t.n.text.val().trim()==t.lastSuccesfulSearch&&(t.n.proclose.css("display","block"),t.resultsOpened||t.showResults());return}n(this).hasClass("orig")&&t.ktype=="click"||(u||t.ktype!="click"||t.gaEvent("magnifier"),t.o.trigger_on_click!=0||t.ktype!="click")&&(t.o.triggerontype!=0||t.ktype!="input")&&(!u||t.ktype!="input"||t.o.redirectEnterTo!="nothing")&&(u||t.ktype!="click"||t.o.redirectClickTo!="nothing")&&(t.post!=null&&t.post.abort(),clearTimeout(i),t.hideLoader(),i=setTimeout(function(){if(n("form",t.n.searchsettings).serialize()+t.n.text.val().trim()!=t.lastSuccesfulSearch)t.search();else{if(t.n.proclose.css("display","block"),t.isRedirectToFirstResult())return t.doRedirectToFirstResult(),!1;t.resultsOpened||t.showResults()}},250))}})},initFacetEvents:function(){var t=this,i=null;if(t.o.trigger_on_facet_change==1){n("input[type!=checkbox], select",t.n.searchsettings).on("change slidechange",function(){t.n.text.val().length<t.o.charcount||(t.post!=null&&t.post.abort(),clearTimeout(i),i=setTimeout(function(){t.search()},50))});n("input[type=checkbox]",t.n.searchsettings).on("asl_chbx_change",function(){t.n.text.val().length<t.o.charcount||(t.post!=null&&t.post.abort(),t.gaEvent("facet_change",{option_label:n(this).closest("fieldset").find("legend").text(),option_value:n(this).closest(".asl_option").find(".asl_option_label").text()+(n(this).prop("checked")?"(checked)":"(unchecked)")}),clearTimeout(i),i=setTimeout(function(){t.search()},50))})}},isRedirectToFirstResult:function(){var t=this;return n(".asl_res_url",t.n.resultsDiv).length>0&&(t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo=="first_result"||t.o.redirect_on_enter==1&&(t.ktype=="input"||t.ktype=="keyup")&&t.keycode==13&&t.o.redirectEnterTo=="first_result")?!0:!1},doRedirectToFirstResult:function(){var t=this,i;return i=t.ktype=="click"?t.o.redirectClickLoc:t.o.redirectEnterLoc,i=="same"?location.href=n(n(".asl_res_url",t.n.resultsDiv).get(0)).attr("href"):l(n(n(".asl_res_url",t.n.resultsDiv).get(0)).attr("href")),t.hideLoader(),t.hideResults(),!1},doRedirectToResults:function(t){var i=this,o=i.ktype=="click"?i.o.redirectClickTo:i.o.redirectEnterTo,e=t=="click"?i.o.redirectClickLoc:i.o.redirectEnterLoc;if(o=="results_page")var u="?s="+r(i.n.text.val());else if(o=="woo_results_page")var u="?post_type=product&s="+r(i.n.text.val());else var u=i.o.redirect_url.replace("{phrase}",r(i.n.text.val()));if(i.o.homeurl.indexOf("?")>1&&u.indexOf("?")===0&&(u=u.replace("?","&")),i.o.overridewpdefault)if(i.o.override_method=="post")f(i.o.homeurl+u,"post",{asl_active:1,p_asl_data:n("form",i.n.searchsettings).serialize()},e);else{var s=i.o.homeurl+u+"&asl_active=1&p_asid="+i.o.id+"&p_asl_data=1&"+n("form",i.n.searchsettings).serialize();e=="same"?location.href=s:l(s)}else f(i.o.homeurl+u,"post",{np_asl_data:n("form",i.n.searchsettings).serialize()},e);i.n.proloading.css("display","none");i.hideLoader();i.hideResults();i.post!=null&&i.post.abort()},destroy:function(){return this.each(function(){var t=n.extend({},this,s);n(window).unbind(t)})},searchfor:function(t){n(".proinput input",this).val(t).trigger("keyup")},initAutocompleteEvent:function(){var t=this;if(t.o.autocomplete.enabled==1&&!i())t.n.text.on("keyup",function(i){window.event?(t.keycode=window.event.keyCode,t.ktype=window.event.type):i&&(t.keycode=i.which,t.ktype=i.type);var r=39;n("body").hasClass("rtl")&&(r=37);t.keycode==r&&t.n.textAutocomplete.val()!=""?(i.preventDefault(),t.n.text.val(t.n.textAutocomplete.val()),t.post!=null&&t.post.abort(),t.search()):(t.postAuto!=null&&t.postAuto.abort(),t.autocompleteGoogleOnly())})},autocompleteGoogleOnly:function(){var t=this,i=t.n.text.val();if(t.n.text.val()==""){t.n.textAutocomplete.val("");return}var r=t.n.textAutocomplete.val();(r==""||r.indexOf(i)!=0)&&(t.n.textAutocomplete.val(""),n.ajax({url:"https://clients1.google.com/complete/search",dataType:"jsonp",data:{q:i,hl:t.o.autocomplete.lang,nolabels:"t",client:"hp",ds:""},success:function(r){r[1].length>0&&(response=r[1][0][0].replace(/(<([^>]+)>)/ig,""),response=n("<textarea />").html(response).text(),response=response.substr(i.length),t.n.textAutocomplete.val(i+response))}}))},search:function(){var t=this;if((!t.searching||!0)&&!(t.n.text.val().length<t.o.charcount)){t.searching=!0;t.n.proloading.css({display:"block"});t.n.proclose.css({display:"none"});var i={action:"ajaxsearchlite_search",aslp:t.n.text.val(),asid:t.o.id,options:n("form",t.n.searchsettings).serialize()};if(i=h("asl_search_data",i),JSON.stringify(i)===JSON.stringify(t.lastSearchData))return(t.resultsOpened||t.showResults(),t.hideLoader(),t.isRedirectToFirstResult())?(t.doRedirectToFirstResult(),!1):!1;t.gaEvent("search_start");t.post=n.post(ASL.ajaxurl,i,function(u){u=u.replace(/^\s*[\r\n]/gm,"");u=u.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1];u=h("asl_search_html",u);t.n.resdrg.html("");t.n.resdrg.html(u);n(".asl_keyword",t.n.resdrg).on("click",function(){t.n.text.val(n(this).html());n("input.orig",t.n.container).val(n(this).html()).trigger("keydown");n("form",t.n.container).trigger("submit","ajax");t.search()});if(t.n.items=n(".item",t.n.resultsDiv),t.gaEvent("search_end",{results_count:t.n.items.length}),t.gaPageview(t.n.text.val()),t.isRedirectToFirstResult())return t.doRedirectToFirstResult(),!1;if(t.hideLoader(),t.showResults(),t.scrollToResults(),t.lastSuccesfulSearch=n("form",t.n.searchsettings).serialize()+t.n.text.val().trim(),t.lastSearchData=i,t.n.items.length==0)t.n.showmore!=null&&t.n.showmore.css("display","none");else if(t.n.showmore!=null){t.n.showmore.css("display","block");n("a",t.n.showmore).off();n("a",t.n.showmore).on("click",function(){var u=t.o.redirectClickTo,i="?s="+r(t.n.text.val());i=u=="results_page"?"?s="+r(t.n.text.val()):u=="woo_results_page"?"?post_type=product&s="+r(t.n.text.val()):t.o.redirect_url.replace("{phrase}",r(t.n.text.val()));t.o.overridewpdefault?t.o.override_method=="post"?f(t.o.homeurl+i,"post",{asl_active:1,p_asl_data:n("form",t.n.searchsettings).serialize()}):location.href=t.o.homeurl+i+"&asl_active=1&p_asid="+t.o.id+"&p_asl_data=1&"+n("form",t.n.searchsettings).serialize():f(t.o.homeurl+i,"post",{np_asl_data:n("form",t.n.searchsettings).serialize()})})}},"text").fail(function(i,r){i.aborted||r=="abort"||(t.n.resdrg.html(""),t.n.resdrg.html('<div class="asl_nores">The request failed. Please check your connection! Status: '+i.status+"<\/div>"),t.n.items=n(".item",t.n.resultsDiv),t.hideLoader(),t.showResults(),t.scrollToResults())})}},showLoader:function(){var n=this;n.n.proloading.css({display:"block"})},hideLoader:function(){var n=this;n.n.proloading.css({display:"none"});n.n.results.css("display","")},showResultsBox:function(){var n=this;n.n.resultsDiv.css({display:"block",height:"auto"});n.n.items.addClass(n.animationOpacity);n.fixResultsPosition(!0);n.n.resultsDiv.css(n.resAnim.showCSS);n.n.resultsDiv.removeClass(n.resAnim.hideClass).addClass(n.resAnim.showClass)},showResults:function(){var n=this;n.createVerticalScroll();switch(n.o.resultstype){case"vertical":n.showVerticalResults();break;default:n.showHorizontalResults()}n.hideLoader();n.n.proclose.css({display:"block"});n.n.showmore!=null&&(n.n.items.length>0?n.n.showmore.css({display:"block"}):n.n.showmore.css({display:"none"}));n.is_scroll&&typeof n.scroll.recalculate!="undefined"&&setTimeout(function(){n.scroll.recalculate()},500);n.resultsOpened=!0},hideResults:function(){var n=this;if(!n.resultsOpened)return!1;n.n.resultsDiv.removeClass(n.resAnim.showClass).addClass(n.resAnim.hideClass);setTimeout(function(){n.n.resultsDiv.css(n.resAnim.hideCSS)},n.resAnim.duration);n.n.proclose.css({display:"none"});n.n.showmore!=null&&n.n.showmore.css({display:"none"});i()&&document.activeElement.blur();n.resultsOpened=!1},scrollToResults:function(){if(($this=this,this.o.scrollToResults==1)&&!this.$elem.parent().hasClass("asl_preview_data")){if($this.o.resultsposition=="hover")var t=$this.n.probox.offset().top-20;else var t=$this.n.resultsDiv.offset().top-20;n("#wpadminbar").length>0&&(t-=n("#wpadminbar").height());t=t<0?0:t;n("body, html").animate({scrollTop:t},{duration:500})}},createGroup:function(n){return"<div class='group'>"+n+"<\/div>"},showVerticalResults:function(){var t=this;if(t.showResultsBox(),t.n.items.length>0){var e=t.n.items.length<t.o.itemscount?t.n.items.length:t.o.itemscount,h=n(".group",t.n.resultsDiv);if(t.n.items.length<=t.o.itemscount)t.n.results.css({height:"auto"});else{t.n.results.css({height:30});t.resize();var i=0,r=0,u=0,f=0;t.n.items.each(function(){r+=n(this).outerHeight(!0);n(this).outerHeight(!0)>f&&(f=n(this).outerHeight(!0));i++});u=f*e;u>r&&(u=r);i=i<1?1:i;r=r/i*e;t.n.results.css({height:u})}if(t.resize(),t.n.items.last().addClass("asl_last_item"),t.o.highlight==1){var o=t.o.highlightwholewords==1?!0:!1;n("div.item",t.n.resultsDiv).highlight(t.n.text.val().split(" "),{element:"span",className:"highlighted",wordsOnly:o})}}t.resize();t.n.items.length==0&&t.n.results.css({height:"auto"});t.n.results.css({overflowY:"auto"});var s=t.is_scroll?n(t.scroll.getScrollElement()):t.n.results;s.scrollTop(0);t.addAnimation();t.fixResultsPosition(!0);t.searching=!1},addAnimation:function(){var i=this,t=0,r=1;i.n.items.each(function(){var u=this;setTimeout(function(){n(u).addClass(i.animation)},t);t=t+60;r++})},removeAnimation:function(){var t=this;t.n.items.each(function(){var i=this;n(i).removeClass(t.animation)})},initSettingsAnimations:function(){var n=this,t=300;n.settAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":t+"ms"},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:t};n.n.searchsettings.css({"-webkit-animation-duration":n.settAnim.duration+"ms","animation-duration":n.settAnim.duration+"ms"})},initResultsAnimations:function(){var t=this,n=300;t.resAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":n+"ms"},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:n};t.n.resultsDiv.css({"-webkit-animation-duration":n+"ms","animation-duration":n+"ms"})},showSettings:function(){var t=this;t.n.searchsettings.css(t.settAnim.showCSS);t.n.searchsettings.removeClass(t.settAnim.hideClass).addClass(t.settAnim.showClass);t.settScroll==null&&t.is_scroll&&(t.settScroll=[],n(".asl_sett_scroll",t.n.searchsettings).each(function(i){var r=this;setTimeout(function(){t.settScroll[i]=new asl_SimpleBar(n(r).get(0),{direction:n("body").hasClass("rtl")?"rtl":"ltr",autoHide:!0})},20)}));t.n.prosettings.data("opened",1);t.fixSettingsPosition(!0)},hideSettings:function(){var n=this;n.n.searchsettings.removeClass(n.settAnim.showClass).addClass(n.settAnim.hideClass);setTimeout(function(){n.n.searchsettings.css(n.settAnim.hideCSS)},n.settAnim.duration);n.n.prosettings.data("opened",0)},cleanUp:function(){var t=this;n(".searchsettings",t.n.container).length>0&&(n("body>#ajaxsearchlitesettings"+t.o.rid).remove(),n("body>#ajaxsearchliteres"+t.o.rid).remove())},orientationChange:function(){var n=this;n.fixSettingsPosition();n.fixResultsPosition();n.fixTryThisPosition()},resize:function(){var n=this;n.fixSettingsPosition();n.fixResultsPosition();n.fixTryThisPosition()},scrolling:function(n){var t=this;t.fixSettingsPosition(n);t.fixResultsPosition(n)},fixTryThisPosition:function(){},fixResultsPosition:function(t){t=typeof t=="undefined"?!1:t;var r=this,f=r.n.resultsDiv.css("position");if(f=="fixed"||f=="absolute"){var o=0;if(n("body").css("position")!="static"&&(o=n("body").offset().top),t==!0||r.n.resultsDiv.css("visibility")=="visible"){var s=0,h=0,u=r.n.container.offset();if(f=="fixed"&&(o=0,s=n(document).scrollTop(),h=n(document).scrollLeft(),i()&&e()&&r.n.text.is(":focus")&&(s=r.savedScrollTop,u.top=r.savedContainerTop)),typeof u!="undefined"){var c=r.n.container.outerWidth()<240?240:r.n.container.outerWidth();r.n.resultsDiv.outerWidth(c);r.n.resultsDiv.css({top:u.top+r.n.container.outerHeight(!0)+10-o-s,left:u.left-h})}}}},fixSettingsPosition:function(t){t=typeof t=="undefined"?!1:t;var r=this,s=0;if(n("body").css("position")!="static"&&(s=n("body").offset().top),(t==!0||r.n.prosettings.data("opened")!=0)&&r.o.blocking!=!0){if(r.fixSettingsWidth(),r.n.prosettings.css("display")!="none")var f=r.n.prosettings;else var f=r.n.promagnifier;var u=f.offset(),o=0,h=0;r.n.searchsettings.css("position")=="fixed"&&(o=n(window).scrollTop(),h=n(window).scrollLeft(),i()&&e()&&r.n.text.is(":focus")&&(u.top=r.savedContainerTop,o=r.savedScrollTop));r.o.settingsimagepos=="left"?r.n.searchsettings.css({display:"block",top:u.top+f.height()-2-s-o,left:u.left-h}):r.n.searchsettings.css({display:"block",top:u.top+f.height()-2-s-o,left:u.left+f.width()-r.n.searchsettings.width()-h})}},fixSettingsWidth:function(){}};function h(){return typeof wp!="undefined"&&typeof wp.hooks!="undefined"&&typeof wp.hooks.applyFilters!="undefined"?wp.hooks.applyFilters.apply(null,arguments):typeof arguments[1]!="undefined"?arguments[1]:!1}function i(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}}function o(t,i){var r=t.find(":input").get();return arguments.length===1?(i={},n.each(r,function(){!this.name||this.disabled||!(this.checked||/select|textarea/i.test(this.nodeName)||/text/i.test(this.type))||n(this).hasClass("asl_datepicker_field")||n(this).hasClass("asl_datepicker")||(i[this.name]==undefined&&(i[this.name]=[]),i[this.name].push(n(this).val()))}),JSON.stringify(i)):(typeof i!="object"&&(i=JSON.parse(i)),n.each(r,function(){if(this.name&&i[this.name]){var t=i[this.name],r=n(this);if(Object.prototype.toString.call(t)!=="[object Array]"&&(t=[t]),this.type=="checkbox"||this.type=="radio"){for(var e=r.val(),f=!1,u=0;u<t.length;u++)if(t[u]==e){f=!0;break}r.attr("checked",f)}else r.val(t[0])}}),t)}function r(n){return encodeURIComponent(n).replace(/\%20/g,"+")}function c(n){return n.replace(/"|'/g,"")}function f(t,i,r,u){"use strict";var f;f=n("<form />",{action:t,method:i,style:"display: none;"});typeof r!="undefined"&&r!==null&&n.each(r,function(t,i){n("<input />",{type:"hidden",name:t,value:i}).appendTo(f)});typeof u!="undefined"&&u=="new"&&f.attr("target","_blank");f.appendTo("body").trigger("submit")}function l(t){n('<a href="'+t+'" target="_blank">').get(0).click()}function e(){return typeof navigator!="undefined"&&typeof window.navigator.userAgent!="undefined"?window.navigator.userAgent.match(/(iPod|iPhone|iPad)/)!=null:!1}function v(){var n=window.navigator.userAgent,t=n.indexOf("MSIE ");return t>0?!0:!1}typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t});n.plugin=function(t,i){n.fn[t]=function(r){return this.each(function(){n.data(this,t)||n.data(this,t,Object.create(i).init(r,this))})}};n.plugin("ajaxsearchlite",s);var u={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(n){var e="",o,t,i,h,c,s,r,f=0;for(n=u._utf8_encode(n);f<n.length;)o=n.charCodeAt(f++),t=n.charCodeAt(f++),i=n.charCodeAt(f++),h=o>>2,c=(o&3)<<4|t>>4,s=(t&15)<<2|i>>6,r=i&63,isNaN(t)?s=r=64:isNaN(i)&&(r=64),e=e+this._keyStr.charAt(h)+this._keyStr.charAt(c)+this._keyStr.charAt(s)+this._keyStr.charAt(r);return e},decode:function(n){var t="",o,s,h,c,f,r,e,i=0;for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)c=this._keyStr.indexOf(n.charAt(i++)),f=this._keyStr.indexOf(n.charAt(i++)),r=this._keyStr.indexOf(n.charAt(i++)),e=this._keyStr.indexOf(n.charAt(i++)),o=c<<2|f>>4,s=(f&15)<<4|r>>2,h=(r&3)<<6|e,t=t+String.fromCharCode(o),r!=64&&(t=t+String.fromCharCode(s)),e!=64&&(t=t+String.fromCharCode(h));return u._utf8_decode(t)},_utf8_encode:function(n){n=n.replace(/\r\n/g,"\n");for(var i="",r=0;r<n.length;r++){var t=n.charCodeAt(r);t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128))}return i},_utf8_decode:function(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}}}(jQuery),window.ASL=typeof ASL!="undefined"?window.ASL:{},window.ASL.getScope=function(){if(typeof jQuery!="undefined")if(typeof jQuery.fn.ajaxsearchlite=="undefined")for(var n=jQuery,t=jQuery,i=0;i<10;i++)if(typeof n.fn.ajaxsearchlite=="undefined")n=jQuery.noConflict(!0),console.log("ASL: executed one noconflict");else return n.fn.jquery!=t.fn.jquery&&(window.jQuery=window.$=t),n;else return jQuery;return typeof window[ASL.js_scope]!="undefined"?window[ASL.js_scope]:!1},window.ASL.initialized=!1,window.ASL.initialize=function(n){function f(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}function e(n){var t="",s,h,c,l,e,r,o,i=0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)l=u.indexOf(n.charAt(i++)),e=u.indexOf(n.charAt(i++)),r=u.indexOf(n.charAt(i++)),o=u.indexOf(n.charAt(i++)),s=l<<2|e>>4,h=(e&15)<<4|r>>2,c=(r&3)<<6|o,t=t+String.fromCharCode(s),r!=64&&(t=t+String.fromCharCode(h)),o!=64&&(t=t+String.fromCharCode(c));return f(t)}var i=this;if(typeof i.getScope=="undefined"||typeof i.version=="undefined")return!1;var t=i.getScope(),u=".asl_init_data";if(typeof ASL_INSTANCES!="undefined"&&Object.keys(ASL_INSTANCES).length>0?t.each(ASL_INSTANCES,function(n,i){return typeof i=="undefined"?!1:t("#ajaxsearchlite"+n).hasClass("hasASL")?!1:(t("#ajaxsearchlite"+n).addClass("hasASL"),t("#ajaxsearchlite"+n).ajaxsearchlite(i))}):(typeof n!="undefined"&&(u="div[id*=asl_init_id_"+n+"]"),t(u).each(function(){var i=t(this).attr("id").match(/^asl_init_id_(.*)/)[1],n=t(this).data("asldata");if(typeof n=="undefined"||(n=e(n),typeof n=="undefined"||n==""))return!1;var r=JSON.parse(n);return t("#ajaxsearchlite"+i).addClass("hasASL"),t("#ajaxsearchlite"+i).ajaxsearchlite(r)})),i.highlight.enabled){var r=localStorage.getItem("asl_phrase_highlight");localStorage.removeItem("asl_phrase_highlight");r!=null&&(r=JSON.parse(r),t.each(i.highlight.data,function(n,i){var f=i.selector!=""&&t(i.selector).length>0?i.selector:"article";if(f=t(f).length>0?f:"body",t(f).highlight(r.phrase,{element:"span",className:"asl_single_highlighted",wordsOnly:i.whole,excludeParents:".asl_w, .asl-try"}),i.scroll&&t(".asl_single_highlighted").length>0){var u=t(".asl_single_highlighted").offset().top-120;t("#wpadminbar").length>0&&(u-=t("#wpadminbar").height());u=u+i.scroll_offset;u=u<0?0:u;t("html").animate({scrollTop:u},{duration:500})}return!1}))}i.initialized=!0},window.ASL.fixClones=function(){var t=this;if((t.fix_duplicates=t.fix_duplicates||0,t.fix_duplicates==0)||typeof t.getScope=="undefined")return!1;var n=t.getScope(),i={};n(".asl_init_data").each(function(){var t=n(this).attr("id").match(/^asl_init_id_(.*)/)[1];typeof i[t]=="undefined"?i[t]={rid:t,id:t,count:1}:i[t].count++});n.each(i,function(i,r){r.count>1&&n(".asl_m_"+r.rid).each(function(i){if(i==0)return!0;for(var f=n(this).parent(),u=r.id;n("#ajaxsearchlite"+u).length!=0;)u++;n(this).attr("id","ajaxsearchlite"+u);n(this).removeClass("asl_m_"+r.rid).addClass("asl_m_"+u);n(this).removeClass("hasASL");n(".asl_r_"+r.rid,this).length==0&&n(".asl_r_"+r.rid).clone().appendTo(n(this));n(".asl_r_"+r.rid,this).attr("id","ajaxsearchliteres"+u);n(".asl_r_"+r.rid,this).attr("data-id",u);n(".asl_r_"+r.rid,this).removeClass("asl_r_"+r.rid).addClass("asl_r_"+u);typeof ASL.resHTML!="undefined"&&n("#ajaxsearchliteres"+u).html(ASL.resHTML);n(".asl_s_"+r.rid,this).length==0&&n(".asl_s_"+r.rid).length!=0&&n(".asl_s_"+r.rid).clone().appendTo(n(this));n(".asl_sb_"+r.rid,this).length==0&&n(".asl_sb_"+r.rid).length!=0&&n(".asl_sb_"+r.rid).clone().appendTo(n(this));n(".asl_s_"+r.rid,this).attr("id","ajaxsearchlitesettings"+u);typeof ASL.setHTML!="undefined"&&n("#ajaxsearchlitesettings"+u).html(ASL.setHTML);n(".asl_sb_"+r.rid,f).attr("id","ajaxsearchlitebsettings"+u);typeof ASL.setHTML!="undefined"&&n("#ajaxsearchlitebsettings"+u).html(ASL.setHTML);n(".asl_hidden_data",f).length>0&&n(".asl_hidden_data",f).attr("id","asl_hidden_data_"+u);n(".asl_init_data",f).length>0&&n(".asl_init_data",f).attr("id","asl_init_id_"+u);t.initialize(u)})})},window.ASL.ready=function(){var t=this,i=t.getScope(),r=null;if(i===!1)return!1;i(function(){var n,i=0;n=setInterval(function(){if(++i,i>20||t.initialized)return clearInterval(n),!1;console.log("tries",i);t.initialize();clearInterval(n)},200);t.initialize();setTimeout(function(){t.fixClones()},2500)});typeof ASL.detect_ajax!="undefined"&&ASL.detect_ajax==1&&i("body").bind("DOMSubtreeModified",function(){clearTimeout(r);r=setTimeout(function(){t.initialize()},500)});var u;i(window).on("resize",function(){clearTimeout(u);u=setTimeout(function(){t.fixClones()},2e3)});var f,n="#menu-item-search, .fa-search, .fa, .fas";n=n+", .fusion-flyout-menu-toggle, .fusion-main-menu-search-open";n=n+", #search_button";n=n+", .mini-search.popup-search";n=n+", .icon-search";n=n+", .menu-item-search-dropdown";n=n+", .mobile-menu-button";n=n+", .td-icon-search, .tdb-search-icon";n=n+", .side_menu_button, .search_button";n=n+", .raven-search-form-toggle";n=n+", [data-elementor-open-lightbox], .elementor-button-link, .elementor-button";i(function(){i("body").on("click touchend",n,function(){clearTimeout(f);f=setTimeout(function(){t.initialize()},500)})})},window.ASL.loadScriptStack=function(n){if(n.length>0){var t=document.createElement("script");t.src=n.splice(0,1);t.onload=n.length==0?function(){typeof jQuery.fn.ajaxsearchlite!="undefined"&&(console.log("ASL: Initializing via onload.."),window.ASL.ready())}:function(){window.ASL.loadScriptStack(n)};console.log("ASL adding:",t.src);document.body.appendChild(t)}},window.ASL.init=function(){if(typeof jQuery=="undefined"||typeof jQuery.fn.ajaxsearchlite=="undefined"){console.log("ASL: jQuery script is probably deferred or delayed loading, trying to resolve");var n;window.asl_interval_tries=typeof asl_interval_tries!="undefined"?window.asl_interval_tries:0;n=setInterval(function(){return(++window.asl_interval_tries,window.asl_interval_tries>5)?(console.log("ASL: faliure, init tried",asl_interval_tries,"times"),clearInterval(n),typeof jQuery!="undefined"&&typeof ASL.min_script_src!="undefined"&&ASL.min_script_src!==null&&(console.log("ASL: jQuery exists, adding ASL script dynamically & trying to load."),ASL.loadScriptStack(ASL.min_script_src),ASL.min_script_src=null),!1):typeof jQuery!="undefined"&&typeof jQuery.fn.ajaxsearchlite!="undefined"?(window.ASL.ready(),console.log("ASL: success at try: ",window.asl_interval_tries),clearInterval(n),!1):void 0},250)}else window.ASL.ready()},typeof window.ASL.version=="undefined"){var asl_init_interval,asl_init_interval_tries=0;console.log("ASL: global not defined, trying to wait..");asl_init_interval=setInterval(function(){return++asl_init_interval_tries,typeof window.ASL.version!="undefined"||asl_init_interval_tries>10?(asl_init_interval_tries>10?console.log("ASL: global found at try ",asl_init_interval_tries):console.log("ASL: global not found, initializing anyways at try ",asl_init_interval_tries),window.ASL.init(),clearInterval(asl_init_interval),!0):void 0},100)}else window.ASL.init();
|
1 |
+
typeof jQuery!="undefined"&&(jQuery.extend({highlight:function(n,t,i,r,u){if(u=u==""?".exhghttt":u,n.nodeType===3){var h=n.data.normalize("NFD").replace(/[\u0300-\u036f]/g,""),f=h.match(t);if(f){var s=document.createElement(i||"span");if(s.className=r||"highlight",/\.|,|\s/.test(f[0].charAt(0)))var c=f.index+1;else var c=f.index;var e=n.splitText(c);e.splitText(f[1].length);var l=e.cloneNode(!0);return s.appendChild(l),e.parentNode.replaceChild(s,e),1}}else if(n.nodeType===1&&n.childNodes&&!/(script|style)/i.test(n.tagName)&&!jQuery(n).closest(u).length>0&&!(n.tagName===i.toUpperCase()&&n.className===r))for(var o=0;o<n.childNodes.length;o++)o+=jQuery.highlight(n.childNodes[o],t,i,r,u);return 0}}),jQuery.fn.unhighlight=function(n){var t={className:"highlight",element:"span"};return jQuery.extend(t,n),this.find(t.element+"."+t.className).each(function(){var n=this.parentNode;n.replaceChild(this.firstChild,this);n.normalize()}).end()},jQuery.fn.highlight=function(n,t){var i={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1,excludeParents:""};if(jQuery.extend(i,t),n.constructor===String&&(n=[n]),n=jQuery.grep(n,function(n){return n!=""}),n=jQuery.map(n,function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g,"")}),n.length==0)return this;var u=i.caseSensitive?"":"i",r="("+n.join("|")+")";i.wordsOnly&&(r="(?:,|^|\\s)"+r+"(?:,|$|\\s)");var f=new RegExp(r,u);return this.each(function(){jQuery.highlight(this,f,i.element,i.className,i.excludeParents)})}),function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t(require("core-js/modules/es.array.for-each"),require("core-js/modules/web.dom-collections.for-each"),require("core-js/modules/es.array.filter"),require("core-js/modules/es.array.iterator"),require("core-js/modules/es.object.assign"),require("core-js/modules/es.object.to-string"),require("core-js/modules/es.parse-int"),require("core-js/modules/es.string.iterator"),require("core-js/modules/es.weak-map"),require("core-js/modules/web.dom-collections.iterator"),require("core-js/modules/es.array.reduce"),require("core-js/modules/es.function.name"),require("core-js/modules/es.regexp.exec"),require("core-js/modules/es.string.match"),require("core-js/modules/es.string.replace")):typeof define=="function"&&define.amd?define(["core-js/modules/es.array.for-each","core-js/modules/web.dom-collections.for-each","core-js/modules/es.array.filter","core-js/modules/es.array.iterator","core-js/modules/es.object.assign","core-js/modules/es.object.to-string","core-js/modules/es.parse-int","core-js/modules/es.string.iterator","core-js/modules/es.weak-map","core-js/modules/web.dom-collections.iterator","core-js/modules/es.array.reduce","core-js/modules/es.function.name","core-js/modules/es.regexp.exec","core-js/modules/es.string.match","core-js/modules/es.string.replace"],t):(n=n||self,n.asl_SimpleBar=t())}(this,function(){"use strict";var t=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},at="Expected a function",vt=0/0,tr="[object Symbol]",ir=/^\s+|\s+$/g,rr=/^[-+]0x[0-9a-f]+$/i,ur=/^0b[01]+$/i,fr=/^0o[0-7]+$/i,er=parseInt,or=typeof t=="object"&&t&&t.Object===Object&&t,sr=typeof self=="object"&&self&&self.Object===Object&&self,hr=or||sr||Function("return this")(),cr=Object.prototype,lr=cr.toString,ar=Math.max,vr=Math.min,it=function(){return hr.Date.now()};function yr(n,t,i){var f,o,c,e,r,u,s=0,w=!1,h=!1,a=!0;if(typeof n!="function")throw new TypeError(at);t=yt(t)||0;y(i)&&(w=!!i.leading,h="maxWait"in i,c=h?ar(yt(i.maxWait)||0,t):c,a="trailing"in i?!!i.trailing:a);function v(t){var i=f,r=o;return f=o=undefined,s=t,e=n.apply(r,i)}function d(n){return s=n,r=setTimeout(l,t),w?v(n):e}function g(n){var r=n-u,f=n-s,i=t-r;return h?vr(i,c-f):i}function b(n){var i=n-u,r=n-s;return u===undefined||i>=t||i<0||h&&r>=c}function l(){var n=it();if(b(n))return k(n);r=setTimeout(l,g(n))}function k(n){return(r=undefined,a&&f)?v(n):(f=o=undefined,e)}function nt(){r!==undefined&&clearTimeout(r);s=0;f=u=o=r=undefined}function tt(){return r===undefined?e:k(it())}function p(){var n=it(),i=b(n);if(f=arguments,o=this,u=n,i){if(r===undefined)return d(u);if(h)return r=setTimeout(l,t),v(u)}return r===undefined&&(r=setTimeout(l,t)),e}return p.cancel=nt,p.flush=tt,p}function pr(n,t,i){var r=!0,u=!0;if(typeof n!="function")throw new TypeError(at);return y(i)&&(r="leading"in i?!!i.leading:r,u="trailing"in i?!!i.trailing:u),yr(n,t,{leading:r,maxWait:t,trailing:u})}function y(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function wr(n){return!!n&&typeof n=="object"}function br(n){return typeof n=="symbol"||wr(n)&&lr.call(n)==tr}function yt(n){if(typeof n=="number")return n;if(br(n))return vt;if(y(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=y(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(ir,"");var i=ur.test(n);return i||fr.test(n)?er(n.slice(2),i?2:8):rr.test(n)?vt:+n}var pt=pr,kr="Expected a function",wt=0/0,dr="[object Symbol]",gr=/^\s+|\s+$/g,nu=/^[-+]0x[0-9a-f]+$/i,tu=/^0b[01]+$/i,iu=/^0o[0-7]+$/i,ru=parseInt,uu=typeof t=="object"&&t&&t.Object===Object&&t,fu=typeof self=="object"&&self&&self.Object===Object&&self,eu=uu||fu||Function("return this")(),ou=Object.prototype,su=ou.toString,hu=Math.max,cu=Math.min,rt=function(){return eu.Date.now()};function lu(n,t,i){var f,o,c,e,r,u,s=0,p=!1,h=!1,a=!0;if(typeof n!="function")throw new TypeError(kr);t=bt(t)||0;ut(i)&&(p=!!i.leading,h="maxWait"in i,c=h?hu(bt(i.maxWait)||0,t):c,a="trailing"in i?!!i.trailing:a);function v(t){var i=f,r=o;return f=o=undefined,s=t,e=n.apply(r,i)}function k(n){return s=n,r=setTimeout(l,t),p?v(n):e}function d(n){var r=n-u,f=n-s,i=t-r;return h?cu(i,c-f):i}function w(n){var i=n-u,r=n-s;return u===undefined||i>=t||i<0||h&&r>=c}function l(){var n=rt();if(w(n))return b(n);r=setTimeout(l,d(n))}function b(n){return(r=undefined,a&&f)?v(n):(f=o=undefined,e)}function g(){r!==undefined&&clearTimeout(r);s=0;f=u=o=r=undefined}function nt(){return r===undefined?e:b(rt())}function y(){var n=rt(),i=w(n);if(f=arguments,o=this,u=n,i){if(r===undefined)return k(u);if(h)return r=setTimeout(l,t),v(u)}return r===undefined&&(r=setTimeout(l,t)),e}return y.cancel=g,y.flush=nt,y}function ut(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function au(n){return!!n&&typeof n=="object"}function vu(n){return typeof n=="symbol"||au(n)&&su.call(n)==dr}function bt(n){if(typeof n=="number")return n;if(vu(n))return wt;if(ut(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=ut(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=n.replace(gr,"");var i=tu.test(n);return i||iu.test(n)?ru(n.slice(2),i?2:8):nu.test(n)?wt:+n}var kt=lu,yu="Expected a function",dt="__lodash_hash_undefined__",pu="[object Function]",wu="[object GeneratorFunction]",bu=/^\[object .+?Constructor\]$/,ku=typeof t=="object"&&t&&t.Object===Object&&t,du=typeof self=="object"&&self&&self.Object===Object&&self,gt=ku||du||Function("return this")();function gu(n,t){return n==null?undefined:n[t]}function nf(n){var t=!1;if(n!=null&&typeof n.toString!="function")try{t=!!(n+"")}catch(i){}return t}var tf=Array.prototype,rf=Function.prototype,ni=Object.prototype,ft=gt["__core-js_shared__"],ti=function(){var n=/[^.]+$/.exec(ft&&ft.keys&&ft.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ii=rf.toString,et=ni.hasOwnProperty,uf=ni.toString,ff=RegExp("^"+ii.call(et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ef=tf.splice,of=ri(gt,"Map"),l=ri(Object,"create");function u(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function sf(){this.__data__=l?l(null):{}}function hf(n){return this.has(n)&&delete this.__data__[n]}function cf(n){var t=this.__data__;if(l){var i=t[n];return i===dt?undefined:i}return et.call(t,n)?t[n]:undefined}function lf(n){var t=this.__data__;return l?t[n]!==undefined:et.call(t,n)}function af(n,t){var i=this.__data__;return i[n]=l&&t===undefined?dt:t,this}u.prototype.clear=sf;u.prototype["delete"]=hf;u.prototype.get=cf;u.prototype.has=lf;u.prototype.set=af;function s(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function vf(){this.__data__=[]}function yf(n){var t=this.__data__,i=p(t,n);if(i<0)return!1;var r=t.length-1;return i==r?t.pop():ef.call(t,i,1),!0}function pf(n){var t=this.__data__,i=p(t,n);return i<0?undefined:t[i][1]}function wf(n){return p(this.__data__,n)>-1}function bf(n,t){var i=this.__data__,r=p(i,n);return r<0?i.push([n,t]):i[r][1]=t,this}s.prototype.clear=vf;s.prototype["delete"]=yf;s.prototype.get=pf;s.prototype.has=wf;s.prototype.set=bf;function f(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var i=n[t];this.set(i[0],i[1])}}function kf(){this.__data__={hash:new u,map:new(of||s),string:new u}}function df(n){return w(this,n)["delete"](n)}function gf(n){return w(this,n).get(n)}function ne(n){return w(this,n).has(n)}function te(n,t){return w(this,n).set(n,t),this}f.prototype.clear=kf;f.prototype["delete"]=df;f.prototype.get=gf;f.prototype.has=ne;f.prototype.set=te;function p(n,t){for(var i=n.length;i--;)if(ee(n[i][0],t))return i;return-1}function ie(n){if(!ui(n)||ue(n))return!1;var t=oe(n)||nf(n)?ff:bu;return t.test(fe(n))}function w(n,t){var i=n.__data__;return re(t)?i[typeof t=="string"?"string":"hash"]:i.map}function ri(n,t){var i=gu(n,t);return ie(i)?i:undefined}function re(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function ue(n){return!!ti&&ti in n}function fe(n){if(n!=null){try{return ii.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function ot(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new TypeError(yu);var i=function(){var r=arguments,u=t?t.apply(this,r):r[0],f=i.cache;if(f.has(u))return f.get(u);var e=n.apply(this,r);return i.cache=f.set(u,e),e};return i.cache=new(ot.Cache||f),i}ot.Cache=f;function ee(n,t){return n===t||n!==n&&t!==t}function oe(n){var t=ui(n)?uf.call(n):"";return t==pu||t==wu}function ui(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}var se=ot,e=[],he=function(){return e.some(function(n){return n.activeTargets.length>0})},ce=function(){return e.some(function(n){return n.skippedTargets.length>0})},fi="ResizeObserver loop completed with undelivered notifications.",le=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:fi}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=fi);window.dispatchEvent(n)},a;(function(n){n.BORDER_BOX="border-box";n.CONTENT_BOX="content-box";n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(a||(a={}));var o=function(n){return Object.freeze(n)},ae=function(){function n(n,t){this.inlineSize=n;this.blockSize=t;o(this)}return n}(),ei=function(){function n(n,t,i,r){return this.x=n,this.y=t,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,o(this)}return n.prototype.toJSON=function(){var n=this,t=n.x,i=n.y,r=n.top,u=n.right,f=n.bottom,e=n.left,o=n.width,s=n.height;return{x:t,y:i,top:r,right:u,bottom:f,left:e,width:o,height:s}},n.fromRect=function(t){return new n(t.x,t.y,t.width,t.height)},n}(),st=function(n){return n instanceof SVGElement&&"getBBox"in n},oi=function(n){if(st(n)){var t=n.getBBox(),r=t.width,u=t.height;return!r&&!u}var i=n,f=i.offsetWidth,e=i.offsetHeight;return!(f||e||n.getClientRects().length)},si=function(n){var t,i;if(n instanceof Element)return!0;var r=(i=(t=n)===null||t===void 0?void 0:t.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(r&&n instanceof r.Element)},ve=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},v=typeof window!="undefined"?window:{},b=new WeakMap,hi=/auto|scroll/,ye=/^tb|vertical/,pe=/msie|trident/i.test(v.navigator&&v.navigator.userAgent),i=function(n){return parseFloat(n||"0")},h=function(n,t,i){return n===void 0&&(n=0),t===void 0&&(t=0),i===void 0&&(i=!1),new ae((i?t:n)||0,(i?n:t)||0)},ci=o({devicePixelContentBoxSize:h(),borderBoxSize:h(),contentBoxSize:h(),contentRect:new ei(0,0,0,0)}),li=function(n,t){if(t===void 0&&(t=!1),b.has(n)&&!t)return b.get(n);if(oi(n))return b.set(n,ci),ci;var r=getComputedStyle(n),u=st(n)&&n.ownerSVGElement&&n.getBBox(),a=!pe&&r.boxSizing==="border-box",s=ye.test(r.writingMode||""),nt=!u&&hi.test(r.overflowY||""),tt=!u&&hi.test(r.overflowX||""),v=u?0:i(r.paddingTop),it=u?0:i(r.paddingRight),rt=u?0:i(r.paddingBottom),y=u?0:i(r.paddingLeft),ut=u?0:i(r.borderTopWidth),ft=u?0:i(r.borderRightWidth),et=u?0:i(r.borderBottomWidth),ot=u?0:i(r.borderLeftWidth),p=y+it,w=v+rt,c=ot+ft,l=ut+et,k=tt?n.offsetHeight-l-n.clientHeight:0,d=nt?n.offsetWidth-c-n.clientWidth:0,ht=a?p+c:0,ct=a?w+l:0,f=u?u.width:i(r.width)-ht-d,e=u?u.height:i(r.height)-ct-k,lt=f+p+d+c,at=e+w+k+l,g=o({devicePixelContentBoxSize:h(Math.round(f*devicePixelRatio),Math.round(e*devicePixelRatio),s),borderBoxSize:h(lt,at,s),contentBoxSize:h(f,e,s),contentRect:new ei(y,v,f,e)});return b.set(n,g),g},ai=function(n,t,i){var r=li(n,i),u=r.borderBoxSize,f=r.contentBoxSize,e=r.devicePixelContentBoxSize;switch(t){case a.DEVICE_PIXEL_CONTENT_BOX:return e;case a.BORDER_BOX:return u;default:return f}},we=function(){function n(n){var t=li(n);this.target=n;this.contentRect=t.contentRect;this.borderBoxSize=o([t.borderBoxSize]);this.contentBoxSize=o([t.contentBoxSize]);this.devicePixelContentBoxSize=o([t.devicePixelContentBoxSize])}return n}(),vi=function(n){if(oi(n))return Infinity;for(var i=0,t=n.parentNode;t;)i+=1,t=t.parentNode;return i},be=function(){var n=Infinity,i=[];e.forEach(function(t){if(t.activeTargets.length!==0){var r=[];t.activeTargets.forEach(function(t){var u=new we(t.target),i=vi(t.target);r.push(u);t.lastReportedSize=ai(t.target,t.observedBox);i<n&&(n=i)});i.push(function(){t.callback.call(t.observer,r,t.observer)});t.activeTargets.splice(0,t.activeTargets.length)}});for(var t=0,r=i;t<r.length;t++){var u=r[t];u()}return n},yi=function(n){e.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length);t.skippedTargets.splice(0,t.skippedTargets.length);t.observationTargets.forEach(function(i){i.isActive()&&(vi(i.target)>n?t.activeTargets.push(i):t.skippedTargets.push(i))})})},ke=function(){var n=0;for(yi(n);he();)n=be(),yi(n);return ce()&&le(),n>0},ht,pi=[],de=function(){return pi.splice(0).forEach(function(n){return n()})},ge=function(n){if(!ht){var t=0,i=document.createTextNode("");new MutationObserver(function(){return de()}).observe(i,{characterData:!0});ht=function(){i.textContent=""+(t?t--:t++)}}pi.push(n);ht()},no=function(n){ge(function(){requestAnimationFrame(n)})},k=0,to=function(){return!!k},io=250,ro={attributes:!0,characterData:!0,childList:!0,subtree:!0},wi=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],bi=function(n){return n===void 0&&(n=0),Date.now()+n},ct=!1,uo=function(){function n(){var n=this;this.stopped=!0;this.listener=function(){return n.schedule()}}return n.prototype.run=function(n){var t=this;if(n===void 0&&(n=io),!ct){ct=!0;var i=bi(n);no(function(){var r=!1;try{r=ke()}finally{if(ct=!1,n=i-bi(),!to())return;r?t.run(1e3):n>0?t.run(n):t.start()}})}},n.prototype.schedule=function(){this.stop();this.run()},n.prototype.observe=function(){var n=this,t=function(){return n.observer&&n.observer.observe(document.body,ro)};document.body?t():v.addEventListener("DOMContentLoaded",t)},n.prototype.start=function(){var n=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),wi.forEach(function(t){return v.addEventListener(t,n.listener,!0)}))},n.prototype.stop=function(){var n=this;this.stopped||(this.observer&&this.observer.disconnect(),wi.forEach(function(t){return v.removeEventListener(t,n.listener,!0)}),this.stopped=!0)},n}(),lt=new uo,ki=function(n){!k&&n>0&<.start();k+=n;k||lt.stop()},fo=function(n){return!st(n)&&!ve(n)&&getComputedStyle(n).display==="inline"},eo=function(){function n(n,t){this.target=n;this.observedBox=t||a.CONTENT_BOX;this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var n=ai(this.target,this.observedBox,!0);return(fo(this.target)&&(this.lastReportedSize=n),this.lastReportedSize.inlineSize!==n.inlineSize||this.lastReportedSize.blockSize!==n.blockSize)?!0:!1},n}(),oo=function(){function n(n,t){this.activeTargets=[];this.skippedTargets=[];this.observationTargets=[];this.observer=n;this.callback=t}return n}(),d=new WeakMap,di=function(n,t){for(var i=0;i<n.length;i+=1)if(n[i].target===t)return i;return-1},g=function(){function n(){}return n.connect=function(n,t){var i=new oo(n,t);d.set(n,i)},n.observe=function(n,t,i){var r=d.get(n),u=r.observationTargets.length===0;di(r.observationTargets,t)<0&&(u&&e.push(r),r.observationTargets.push(new eo(t,i&&i.box)),ki(1),lt.schedule())},n.unobserve=function(n,t){var i=d.get(n),r=di(i.observationTargets,t),u=i.observationTargets.length===1;r>=0&&(u&&e.splice(e.indexOf(i),1),i.observationTargets.splice(r,1),ki(-1))},n.disconnect=function(n){var i=this,t=d.get(n);t.observationTargets.slice().forEach(function(t){return i.unobserve(n,t.target)});t.activeTargets.splice(0,t.activeTargets.length)},n}(),so=function(){function n(n){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof n!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");g.connect(this,n)}return n.prototype.observe=function(n,t){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!si(n))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");g.observe(this,n,t)},n.prototype.unobserve=function(n){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!si(n))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");g.unobserve(this,n)},n.prototype.disconnect=function(){g.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}(),nt=function(n){return Array.prototype.reduce.call(n,function(n,t){var r=t.name.match(/data-asl_simplebar-(.+)/);if(r){var i=r[1].replace(/\W+(.)/g,function(n,t){return t.toUpperCase()});switch(t.value){case"true":n[i]=!0;break;case"false":n[i]=!1;break;case undefined:n[i]=!0;break;default:n[i]=t.value}}return n},{})};function r(n){return!n||!n.ownerDocument||!n.ownerDocument.defaultView?window:n.ownerDocument.defaultView}function tt(n){return!n||!n.ownerDocument?document:n.ownerDocument}var c=null,gi=null;window.addEventListener("resize",function(){gi!==window.devicePixelRatio&&(gi=window.devicePixelRatio,c=null)});function nr(n){if(c===null){var i=tt(n);if(typeof i=="undefined")return c=0;var r=i.body,t=i.createElement("div");t.classList.add("asl_simplebar-hide-scrollbar");r.appendChild(t);var u=t.getBoundingClientRect().right;r.removeChild(t);c=u}return c}var n=function(){function t(n,i){var u=this;(this.onScroll=function(){var n=r(u.el);u.scrollXTicking||(n.requestAnimationFrame(u.scrollX),u.scrollXTicking=!0);u.scrollYTicking||(n.requestAnimationFrame(u.scrollY),u.scrollYTicking=!0)},this.scrollX=function(){u.axis.x.isOverflowing&&(u.showScrollbar("x"),u.positionScrollbar("x"));u.scrollXTicking=!1},this.scrollY=function(){u.axis.y.isOverflowing&&(u.showScrollbar("y"),u.positionScrollbar("y"));u.scrollYTicking=!1},this.onMouseEnter=function(){u.showScrollbar("x");u.showScrollbar("y")},this.onMouseMove=function(n){if(u.mouseX=n.clientX,u.mouseY=n.clientY,u.axis.x.isOverflowing||u.axis.x.forceVisible)u.onMouseMoveForAxis("x");if(u.axis.y.isOverflowing||u.axis.y.forceVisible)u.onMouseMoveForAxis("y")},this.onMouseLeave=function(){if(u.onMouseMove.cancel(),u.axis.x.isOverflowing||u.axis.x.forceVisible)u.onMouseLeaveForAxis("x");if(u.axis.y.isOverflowing||u.axis.y.forceVisible)u.onMouseLeaveForAxis("y");u.mouseX=-1;u.mouseY=-1},this.onWindowResize=function(){u.scrollbarWidth=u.getScrollbarWidth();u.hideNativeScrollbar()},this.hideScrollbars=function(){u.axis.x.track.rect=u.axis.x.track.el.getBoundingClientRect();u.axis.y.track.rect=u.axis.y.track.el.getBoundingClientRect();u.isWithinBounds(u.axis.y.track.rect)||(u.axis.y.scrollbar.el.classList.remove(u.classNames.visible),u.axis.y.isVisible=!1);u.isWithinBounds(u.axis.x.track.rect)||(u.axis.x.scrollbar.el.classList.remove(u.classNames.visible),u.axis.x.isVisible=!1)},this.onPointerEvent=function(n){var t,i;if(u.axis.x.track.rect=u.axis.x.track.el.getBoundingClientRect(),u.axis.y.track.rect=u.axis.y.track.el.getBoundingClientRect(),(u.axis.x.isOverflowing||u.axis.x.forceVisible)&&(t=u.isWithinBounds(u.axis.x.track.rect)),(u.axis.y.isOverflowing||u.axis.y.forceVisible)&&(i=u.isWithinBounds(u.axis.y.track.rect)),(t||i)&&(n.preventDefault(),n.stopPropagation(),n.type==="mousedown")){if(t)if(u.axis.x.scrollbar.rect=u.axis.x.scrollbar.el.getBoundingClientRect(),u.isWithinBounds(u.axis.x.scrollbar.rect))u.onDragStart(n,"x");else u.onTrackClick(n,"x");if(i)if(u.axis.y.scrollbar.rect=u.axis.y.scrollbar.el.getBoundingClientRect(),u.isWithinBounds(u.axis.y.scrollbar.rect))u.onDragStart(n,"y");else u.onTrackClick(n,"y")}},this.drag=function(n){var r,f=u.axis[u.draggedAxis].track,e=f.rect[u.axis[u.draggedAxis].sizeAttr],o=u.axis[u.draggedAxis].scrollbar,s=u.contentWrapperEl[u.axis[u.draggedAxis].scrollSizeAttr],h=parseInt(u.elStyles[u.axis[u.draggedAxis].sizeAttr],10);n.preventDefault();n.stopPropagation();r=u.draggedAxis==="y"?n.pageY:n.pageX;var c=r-f.rect[u.axis[u.draggedAxis].offsetAttr]-u.axis[u.draggedAxis].dragOffset,l=c/(e-o.size),i=l*(s-h);u.draggedAxis==="x"&&(i=u.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?i-(e+o.size):i,i=u.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-i:i);u.contentWrapperEl[u.axis[u.draggedAxis].scrollOffsetAttr]=i},this.onEndDrag=function(n){var t=tt(u.el),i=r(u.el);n.preventDefault();n.stopPropagation();u.el.classList.remove(u.classNames.dragging);t.removeEventListener("mousemove",u.drag,!0);t.removeEventListener("mouseup",u.onEndDrag,!0);u.removePreventClickId=i.setTimeout(function(){t.removeEventListener("click",u.preventClick,!0);t.removeEventListener("dblclick",u.preventClick,!0);u.removePreventClickId=null})},this.preventClick=function(n){n.preventDefault();n.stopPropagation()},this.el=n,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},i),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el))||(this.recalculate=pt(this.recalculate.bind(this),64),this.onMouseMove=pt(this.onMouseMove.bind(this),64),this.hideScrollbars=kt(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=kt(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=se(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var r=document.createElement("div");r.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"><\/div><\/div>';var n=r.firstElementChild;document.body.appendChild(n);var u=n.firstElementChild;n.scrollLeft=0;var f=t.getOffset(n),i=t.getOffset(u);n.scrollLeft=999;var e=t.getOffset(u);return{isRtlScrollingInverted:f.left!==i.left&&i.left-e.left!=0,isRtlScrollbarInverted:f.left!==i.left}};t.getOffset=function(n){var t=n.getBoundingClientRect(),i=tt(n),u=r(n);return{top:t.top+(u.pageYOffset||i.documentElement.scrollTop),left:t.left+(u.pageXOffset||i.documentElement.scrollLeft)}};var n=t.prototype;return n.init=function(){t.instances.set(this.el,this);this.initDOM();this.scrollbarWidth=this.getScrollbarWidth();this.recalculate();this.initListeners()},n.initDOM=function(){var i=this;if(Array.prototype.filter.call(this.el.children,function(n){return n.classList.contains(i.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl);this.offsetEl.appendChild(this.contentWrapperEl);this.maskEl.appendChild(this.offsetEl);this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);this.wrapperEl.appendChild(this.maskEl);this.wrapperEl.appendChild(this.placeholderEl);this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var n=document.createElement("div"),t=document.createElement("div");n.classList.add(this.classNames.track);t.classList.add(this.classNames.scrollbar);n.appendChild(t);this.axis.x.track.el=n.cloneNode(!0);this.axis.x.track.el.classList.add(this.classNames.horizontal);this.axis.y.track.el=n.cloneNode(!0);this.axis.y.track.el.classList.add(this.classNames.vertical);this.el.appendChild(this.axis.x.track.el);this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar);this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar);this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible));this.el.setAttribute("data-asl_simplebar","init")},n.initListeners=function(){var n=this,t=r(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter);["mousedown","click","dblclick"].forEach(function(t){n.el.addEventListener(t,n.onPointerEvent,!0)});["touchstart","touchend","touchmove"].forEach(function(t){n.el.addEventListener(t,n.onPointerEvent,{capture:!0,passive:!0})});this.el.addEventListener("mousemove",this.onMouseMove);this.el.addEventListener("mouseleave",this.onMouseLeave);this.contentWrapperEl.addEventListener("scroll",this.onScroll);t.addEventListener("resize",this.onWindowResize);var i=!1,u=t.ResizeObserver||so;this.resizeObserver=new u(function(){i&&n.recalculate()});this.resizeObserver.observe(this.el);this.resizeObserver.observe(this.contentEl);t.requestAnimationFrame(function(){i=!0});this.mutationObserver=new t.MutationObserver(this.recalculate);this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},n.recalculate=function(){var f=r(this.el);this.elStyles=f.getComputedStyle(this.el);this.isRtl=this.elStyles.direction==="rtl";var e=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1,t=this.contentEl.offsetWidth,s=this.contentWrapperEl.offsetWidth,h=this.elStyles.overflowX,c=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft;this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var n=this.contentEl.scrollHeight,i=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%";this.placeholderEl.style.width=o?t+"px":"auto";this.placeholderEl.style.height=n+"px";var u=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=i>t;this.axis.y.isOverflowing=n>u;this.axis.x.isOverflowing=h==="hidden"?!1:this.axis.x.isOverflowing;this.axis.y.isOverflowing=c==="hidden"?!1:this.axis.y.isOverflowing;this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0;this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0;this.hideNativeScrollbar();var l=this.axis.x.isOverflowing?this.scrollbarWidth:0,a=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&i>s-a;this.axis.y.isOverflowing=this.axis.y.isOverflowing&&n>u-l;this.axis.x.scrollbar.size=this.getScrollbarSize("x");this.axis.y.scrollbar.size=this.getScrollbarSize("y");this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px";this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px";this.positionScrollbar("x");this.positionScrollbar("y");this.toggleTrackVisibility("x");this.toggleTrackVisibility("y")},n.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var r=this.contentEl[this.axis[n].scrollSizeAttr],i=this.axis[n].track.el[this.axis[n].offsetSizeAttr],t,u=i/r;return t=Math.max(~~(u*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},n.positionScrollbar=function(n){if(n===void 0&&(n="y"),this.axis[n].isOverflowing){var e=this.contentWrapperEl[this.axis[n].scrollSizeAttr],f=this.axis[n].track.el[this.axis[n].offsetSizeAttr],o=parseInt(this.elStyles[this.axis[n].sizeAttr],10),u=this.axis[n].scrollbar,r=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];r=n==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-r:r;var s=r/(e-o),i=~~((f-u.size)*s);i=n==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?i+(f-u.size):i;u.el.style.transform=n==="x"?"translate3d("+i+"px, 0, 0)":"translate3d(0, "+i+"px, 0)"}},n.toggleTrackVisibility=function(n){n===void 0&&(n="y");var t=this.axis[n].track.el,i=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden");i.style.display=this.axis[n].isOverflowing?"block":"none"},n.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0;this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},n.onMouseMoveForAxis=function(n){n===void 0&&(n="y");this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect();this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var t=this.isWithinBounds(this.axis[n].scrollbar.rect);t?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover);this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},n.onMouseLeaveForAxis=function(n){n===void 0&&(n="y");this.axis[n].track.el.classList.remove(this.classNames.hover);this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},n.showScrollbar=function(n){n===void 0&&(n="y");var t=this.axis[n].scrollbar.el;this.axis[n].isVisible||(t.classList.add(this.classNames.visible),this.axis[n].isVisible=!0);this.options.autoHide&&this.hideScrollbars()},n.onDragStart=function(n,t){t===void 0&&(t="y");var i=tt(this.el),u=r(this.el),f=this.axis[t].scrollbar,e=t==="y"?n.pageY:n.pageX;this.axis[t].dragOffset=e-f.rect[this.axis[t].offsetAttr];this.draggedAxis=t;this.el.classList.add(this.classNames.dragging);i.addEventListener("mousemove",this.drag,!0);i.addEventListener("mouseup",this.onEndDrag,!0);this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(u.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},n.onTrackClick=function(n,t){var u=this;if(t===void 0&&(t="y"),this.options.clickOnTrack){var e=r(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var l=this.axis[t].scrollbar,o=l.rect[this.axis[t].offsetAttr],s=parseInt(this.elStyles[this.axis[t].sizeAttr],10),i=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],a=t==="y"?this.mouseY-o:this.mouseX-o,h=a<0?-1:1,c=h===-1?i-s:i+s,f=function f(){if(h===-1){if(i>c){var n;i-=u.options.clickOnTrackSpeed;u.contentWrapperEl.scrollTo((n={},n[u.axis[t].offsetAttr]=i,n));e.requestAnimationFrame(f)}}else if(i<c){var r;i+=u.options.clickOnTrackSpeed;u.contentWrapperEl.scrollTo((r={},r[u.axis[t].offsetAttr]=i,r));e.requestAnimationFrame(f)}};f()}},n.getContentElement=function(){return this.contentEl},n.getScrollElement=function(){return this.contentWrapperEl},n.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:nr(this.el)}catch(n){return nr(this.el)}},n.removeListeners=function(){var n=this,t=r(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter);["mousedown","click","dblclick"].forEach(function(t){n.el.removeEventListener(t,n.onPointerEvent,!0)});["touchstart","touchend","touchmove"].forEach(function(t){n.el.removeEventListener(t,n.onPointerEvent,{capture:!0,passive:!0})});this.el.removeEventListener("mousemove",this.onMouseMove);this.el.removeEventListener("mouseleave",this.onMouseLeave);this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll);t.removeEventListener("resize",this.onWindowResize);this.mutationObserver&&this.mutationObserver.disconnect();this.resizeObserver&&this.resizeObserver.disconnect();this.recalculate.cancel();this.onMouseMove.cancel();this.hideScrollbars.cancel();this.onWindowResize.cancel()},n.unMount=function(){this.removeListeners();t.instances.delete(this.el)},n.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},n.findChild=function(n,t){var i=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(n){return i.call(n,t)})[0]},t}();return n.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"asl_simplebar-content",contentWrapper:"asl_simplebar-content-wrapper",offset:"asl_simplebar-offset",mask:"asl_simplebar-mask",wrapper:"asl_simplebar-wrapper",placeholder:"asl_simplebar-placeholder",scrollbar:"asl_simplebar-scrollbar",track:"asl_simplebar-track",heightAutoObserverWrapperEl:"asl_simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"asl_simplebar-height-auto-observer",visible:"asl_simplebar-visible",horizontal:"asl_simplebar-horizontal",vertical:"asl_simplebar-vertical",hover:"asl_simplebar-hover",dragging:"asl_simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},n.instances=new WeakMap,n.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements);window.removeEventListener("load",this.initDOMLoadedElements);Array.prototype.forEach.call(document.querySelectorAll("[data-asl_simplebar]"),function(t){t.getAttribute("data-asl_simplebar")==="init"||n.instances.has(t)||new n(t,nt(t.attributes))})},n.removeObserver=function(){this.globalObserver.disconnect()},n.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this);typeof MutationObserver!="undefined"&&(this.globalObserver=new MutationObserver(n.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0}));document.readyState!=="complete"&&(document.readyState==="loading"||document.documentElement.doScroll)?(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements)):window.setTimeout(this.initDOMLoadedElements)},n.handleMutations=function(t){t.forEach(function(t){Array.prototype.forEach.call(t.addedNodes,function(t){t.nodeType===1&&(t.hasAttribute("data-asl_simplebar")?!n.instances.has(t)&&document.documentElement.contains(t)&&new n(t,nt(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-asl_simplebar]"),function(t){t.getAttribute("data-asl_simplebar")!=="init"&&!n.instances.has(t)&&document.documentElement.contains(t)&&new n(t,nt(t.attributes))}))});Array.prototype.forEach.call(t.removedNodes,function(t){t.nodeType===1&&(t.getAttribute("data-asl_simplebar")==="init"?n.instances.has(t)&&!document.documentElement.contains(t)&&n.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-asl_simplebar="init"]'),function(t){n.instances.has(t)&&!document.documentElement.contains(t)&&n.instances.get(t).unMount()}))})})},n.getOptions=nt,n.initHtmlApi(),n});
|
2 |
/*! Ajax Search Lite 4.6 js */
|
3 |
+
if(typeof jQuery!="undefined"&&function(n){var t,a=!0,s={init:function(t,i){var r=this;this.elem=i;this.$elem=n(i);r.searching=!1;r.o=n.extend({blocking:!1},t);r.n={};r.n.container=n(this.elem);r.o.rid=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.o.id=r.n.container.attr("id").match(/^ajaxsearchlite(.*)/)[1];r.n.probox=n(".probox",r.n.container);r.n.proinput=n(".proinput",r.n.container);r.n.text=n(".proinput input.orig",r.n.container);r.n.textAutocomplete=n(".proinput input.autocomplete",r.n.container);r.n.loading=n(".proinput .loading",r.n.container);r.n.proloading=n(".proloading",r.n.container);r.n.proclose=n(".proclose",r.n.container);r.n.promagnifier=n(".promagnifier",r.n.container);r.n.prosettings=n(".prosettings",r.n.container);r.n.searchsettings=n("#ajaxsearchlitesettings"+r.o.rid);r.n.resultsDiv=n("#ajaxsearchliteres"+r.o.rid);r.n.hiddenContainer=n("#asl_hidden_data");r.n.aslItemOverlay=n(".asl_item_overlay",r.n.hiddenContainer);r.resizeTimeout=null;r.n.showmore=n(".showmore",r.n.resultsDiv);r.n.items=n(".item",r.n.resultsDiv);r.n.results=n(".results",r.n.resultsDiv);r.n.resdrg=n(".resdrg",r.n.resultsDiv);r.il={columns:3,itemsPerPage:6};r.post=null;r.postAuto=null;r.cleanUp();r.n.textAutocomplete.val("");r.o.resultitemheight=parseInt(r.o.resultitemheight);r.scroll={};r.savedScrollTop=0;r.savedContainerTop=0;r.is_scroll=typeof asl_SimpleBar!="undefined";typeof ASL.scrollbar!="undefined"&&ASL.scrollbar==0&&(r.is_scroll=!1);r.settScroll=null;r.n.resultsAppend=n("#wpdreams_asl_results_"+r.o.id);r.currentPage=1;r.isotopic=null;r.lastSuccesfulSearch="";r.lastSearchData={};r.triggerPrevState=!1;r.animation="bounceIn";switch(r.o.resultstype){case"vertical":r.animation=r.o.vresultanimation;break;default:r.animation=r.o.hresultanimation}return r.filterFns={number:function(){for(var t=n(this).parent();!t.hasClass("isotopic");)t=t.parent();var i=n(this).attr("data-itemnum"),u=r.currentPage,f=r.il.itemsPerPage;return parseInt(i,10)<f*u&&parseInt(i,10)>=f*(u-1)}},r.disableMobileScroll=!1,r.n.searchsettings.detach().appendTo("body"),r.o.resultsposition=="hover"?r.n.resultsDiv.detach().appendTo("body"):r.n.resultsAppend.length>0&&r.n.resultsDiv.detach().appendTo(r.n.resultsAppend),typeof ASL.resHTML=="undefined"&&(ASL.resHTML=r.n.resultsDiv.html()),typeof ASL.setHTML=="undefined"&&(ASL.setHTML=r.n.searchsettings.html()),n("fieldset",r.n.searchsettings).each(function(){n(".asl_option:not(.hiddend)",this).last().addClass("asl-o-last")}),ASL.js_retain_popstate==1&&r.initPrevState(),r.monitorTouchMove(),v()&&r.n.container.addClass("asl_msie"),r.initSettingsAnimations(),r.initResultsAnimations(),r.initEvents(),r.initAutop(),r.initEtc(),this},initPrevState:function(){var i=this;a&&t==null&&(t=localStorage.getItem("asl-"+u.encode(location.href)),t!=null&&(t=JSON.parse(t),t.settings=u.decode(t.settings)));t!=null&&typeof t.id!="undefined"&&t.id==i.o.id&&(t.phrase!=""&&(i.triggerPrevState=!0,i.n.text.val(t.phrase)),o(n("form",i.n.searchsettings))!=t.settings&&(i.triggerPrevState=!0,o(n("form",i.n.searchsettings),t.settings)));localStorage.removeItem("asl-"+u.encode(location.href));i.n.resultsDiv.on("click",".results .item",function(){var t=i.n.text.val();if(t!=""||i.settingsChanged){var r={id:i.o.id,phrase:t,settings:u.encode(o(n("form",i.n.searchsettings)))};localStorage.setItem("asl-"+u.encode(location.href),JSON.stringify(r))}})},monitorTouchMove:function(){var t=this,i=n("body");t.dragging=!1;i.on("touchmove",function(){t.dragging=!0});i.on("touchstart",function(){t.dragging=!1})},gaPageview:function(n){var r=this,t=r.gaGetTrackingID();if(typeof ASL.analytics=="undefined"||ASL.analytics.method!="pageview")return!1;if(ASL.analytics.string!=""){var i=typeof __gaTracker=="function"?__gaTracker:typeof ga=="function"?ga:!1,u=typeof gtag=="function"?gtag:!1;window.location.origin||(window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""));var f=r.o.homeurl.replace(window.location.origin,"");u!==!1?t!==!1&&u("config",t,{page_path:f+ASL.analytics.string.replace("{asl_term}",n)}):i!==!1&&(t!==!1&&i("create",t,"auto"),i("send","pageview",{page:f+ASL.analytics.string.replace("{asl_term}",n),title:"Ajax Search"}))}},gaEvent:function(t,i){var u=this,f=u.gaGetTrackingID();if(typeof ASL.analytics=="undefined"||ASL.analytics.method!="event")return!1;var e=typeof gtag=="function"?gtag:!1,o=typeof __gaTracker=="function"?__gaTracker:typeof ga=="function"?ga:!1;if(e===!1&&o===!1)return!1;if(typeof ASL.analytics.event[t]!="undefined"&&ASL.analytics.event[t].active==1&&typeof"gtag"!="undefined"){var s={search_id:u.o.id,search_name:u.o.name,phrase:u.n.text.val(),option_name:"",option_value:"",result_title:"",result_url:"",results_count:""},r={event_category:ASL.analytics.event[t].category,event_label:ASL.analytics.event[t].label,value:ASL.analytics.event[t].value};i=n.extend(s,i);n.each(i,function(t,i){i=String(i).replace(/[\s\n\r]+/g," ").trim();n.each(r,function(n,u){var f=new RegExp("{"+t+"}","gmi");r[n]=u.replace(f,i)})});e===!1?(f!==!1&&o("create",f,"auto"),o("send","event",r.event_category,ASL.analytics.event[t].action,r.event_label,r.value)):(f!==!1&&(r.send_to=f),e("event",ASL.analytics.event[t].action,r))}},gaGetTrackingID:function(){var r=this,n=!1;if(typeof ASL.analytics=="undefined")return n;if(typeof ASL.analytics.tracking_id!="undefined"&&ASL.analytics.tracking_id!="")return ASL.analytics.tracking_id;var i=typeof gtag=="function"?gtag:!1;if(i!==!1&&typeof ga!="undefined"&&typeof ga.getAll!="undefined"){var t=!1;return ga.getAll().forEach(function(n){t=n.get("trackingId")}),t}return n},createVerticalScroll:function(){var t=this;t.is_scroll&&typeof t.scroll.recalculate=="undefined"&&(t.scroll=new asl_SimpleBar(t.n.results.get(0),{direction:n("body").hasClass("rtl")?"rtl":"ltr",autoHide:!0}))},initEvents:function(){var t=this;if(i()&&e())t.n.text.on("touchstart",function(){t.savedScrollTop=n(window).scrollTop();t.savedContainerTop=t.n.container.offset().top});t.n.text.on("click",function(){n(this).trigger("focus");t.gaEvent("focus")});t.n.text.on("focus input",function(){t.searching||(n(this).val()!=""?t.n.proclose.css("display","block"):t.n.proclose.css({display:"none"}))});n(t.n.text.parent()).on("submit",function(n){if(n.preventDefault(),i())if(t.o.redirect_on_enter){var r=jQuery.Event("keyup");r.keyCode=r.which=13;t.n.text.trigger(r)}else t.o.redirectEnterTo=="ajax_search"&&(t.search(),document.activeElement.blur());else t.o.redirectEnterTo=="ajax_search"&&t.search()});t.n.resultsDiv.css({opacity:0});n(document).on("click touchend",function(){(t.hideSettings(),t.opened!=!1&&t.o.closeOnDocClick==1)&&t.hideResults()});t.n.proclose.on("click touchend",function(){t.n.text.val("");t.n.textAutocomplete.val("");t.hideResults();t.n.text.trigger("focus")});n(t.elem).on("click touchend",function(n){n.stopImmediatePropagation()});t.n.resultsDiv.on("click touchend",function(n){n.stopImmediatePropagation()});t.n.searchsettings.on("click touchend",function(n){n.stopImmediatePropagation()});t.n.prosettings.on("click",function(){t.n.prosettings.data("opened")==0?t.showSettings():t.hideSettings()});var f=t.n.container.parents().filter(function(){return n(this).css("position")=="fixed"});if((f.length>0||t.n.container.css("position")=="fixed")&&(t.n.resultsDiv.css("position")=="absolute"&&t.n.resultsDiv.css("position","fixed"),t.n.resultsDiv.css("z-index",99999999999),t.o.blocking||t.n.searchsettings.css("position","fixed")),i())n(window).on("orientationchange",function(){t.orientationChange();setTimeout(function(){t.orientationChange()},800)});else{var r;n(window).on("resize",function(){clearTimeout(r);r=setTimeout(function(){t.resize()},100)})}var u;n(window).on("scroll",function(){clearTimeout(u);u=setTimeout(function(){t.scrolling(!1)},400)});e()&&i()&&parseInt(t.n.text.css("font-size"))<16&&(t.n.text.data("fontSize",t.n.text.css("font-size")).css("font-size","16px"),t.n.textAutocomplete.css("font-size","16px"),n("<style>#ajaxsearchlite"+t.o.rid+" input.orig::-webkit-input-placeholder{font-size: 16px !important;}<\/style>").appendTo("head"));t.initNavigationEvent();t.initMagnifierEvent();t.initAutocompleteEvent();t.initFacetEvents()},initAutop:function(){var n=this;if(t!=null&&n.triggerPrevState)return n.search(),t=null,!1},initEtc:function(){var t=this,r=null;n("div.asl_option",t.n.searchsettings).on("mouseup touchend",function(i){if(i.preventDefault(),i.stopImmediatePropagation(),t.dragging)return!1;n('input[type="checkbox"]',this).prop("checked",!n('input[type="checkbox"]',this).prop("checked"));clearTimeout(r);var u=this;r=setTimeout(function(){n('input[type="checkbox"]',u).trigger("asl_chbx_change")},50)});n("div.asl_option label",t.n.searchsettings).on("click",function(n){n.preventDefault()});t.n.resultsDiv.on("click",".results .item",function(){t.gaEvent("result_click",{result_title:n(this).find("a.asl_res_url").text(),result_url:n(this).find("a.asl_res_url").attr("href")});t.o.singleHighlight==1&&(localStorage.removeItem("asl_phrase_highlight"),c(t.n.text.val())!=""&&localStorage.setItem("asl_phrase_highlight",JSON.stringify({phrase:c(t.n.text.val()),id:t.o.id})))});if(i()&&t.o.mobile.menu_selector!="")n(t.o.mobile.menu_selector).on("touchend",function(){var i=this;setTimeout(function(){var r=n(i).find("input.orig");r=r.length==0?n(i).next().find("input.orig"):r;r=r.length==0?n(i).parent().find("input.orig"):r;r=r.length==0?t.n.text:r;t.n.container.is(":visible")&&r.get(0).focus()},300)})},initNavigationEvent:function(){var t=this;n(t.n.resultsDiv).on("mouseenter",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered");n(this).addClass("hovered")});n(t.n.resultsDiv).on("mouseleave",".item",function(){n(".item",t.n.resultsDiv).removeClass("hovered")});n(document).on("keydown",function(i){if(window.event)var r=window.event.keyCode,e=window.event.type;else if(i)var r=i.which,e=i.type;if(n(".item",t.n.resultsDiv).length>0&&t.n.resultsDiv.css("display")!="none"){if(r==40||r==38){r==40&&(t.n.text.blur(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).first().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").next(".item").addClass("hovered"));r==38&&(t.n.text.blur(),n(".item.hovered",t.n.resultsDiv).length==0?n(".item",t.n.resultsDiv).last().addClass("hovered"):n(".item.hovered",t.n.resultsDiv).removeClass("hovered").prev(".item").addClass("hovered"));i.stopPropagation();i.preventDefault();var u=t.is_scroll?n(t.scroll.getScrollElement()):t.n.results,f=t.n.resultsDiv.find(".resdrg .item.hovered");f.length==0&&(f=t.n.resultsDiv.children().first());u.animate({scrollTop:f.offset().top-u.offset().top+u.scrollTop()},{duration:120})}r==13&&n(".item.hovered",t.n.resultsDiv).length>0&&(i.stopPropagation(),i.preventDefault(),n(".item.hovered a.asl_res_url",t.n.resultsDiv).get(0).click())}})},initMagnifierEvent:function(){var t=this,i,u,r=!1;t.n.text.on("keyup",function(f){if(window.event?(t.keycode=window.event.keyCode,t.ktype=window.event.type):f&&(t.keycode=f.which,t.ktype=f.type),t.keycode==13){if(clearTimeout(u),u=setTimeout(function(){r=!1},300),r)return!1;r=!0}var e=n(this).hasClass("orig");if(t.n.text.val().length>=t.o.charcount&&e&&t.ktype=="keyup"&&t.keycode==13){if(t.gaEvent("return"),t.o.redirect_on_enter==1)t.o.redirectEnterTo!="first_result"?t.doRedirectToResults(t.ktype):t.search();else{if(t.o.redirectEnterTo=="nothing")return!1;n("form",t.n.searchsettings).serialize()+t.n.text.val().trim()==t.lastSuccesfulSearch&&t.resultsOpened||t.search()}clearTimeout(i)}});t.n.promagnifier.add(t.n.text).on("click input",function(r){window.event?(t.keycode=window.event.keyCode,t.ktype=window.event.type):r&&(t.keycode=r.which,t.ktype=r.type);var u=n(this).hasClass("orig");if(t.n.text.val().length<t.o.charcount){t.n.proloading.css("display","none");t.hideResults();t.post!=null&&t.post.abort();clearTimeout(i);return}if(t.n.text.val().length>=t.o.charcount&&!u&&t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo!="first_result"){t.doRedirectToResults(t.ktype);clearTimeout(i);return}if((!(t.keycode>=37)||!(t.keycode<=40))&&(!(t.keycode>=112)||!(t.keycode<=123))){if(u&&t.ktype=="click"||t.keycode==32){n("form",t.n.searchsettings).serialize()+t.n.text.val().trim()==t.lastSuccesfulSearch&&(t.n.proclose.css("display","block"),t.resultsOpened||t.showResults());return}n(this).hasClass("orig")&&t.ktype=="click"||(u||t.ktype!="click"||t.gaEvent("magnifier"),t.o.trigger_on_click!=0||t.ktype!="click")&&(t.o.triggerontype!=0||t.ktype!="input")&&(!u||t.ktype!="input"||t.o.redirectEnterTo!="nothing")&&(u||t.ktype!="click"||t.o.redirectClickTo!="nothing")&&(t.post!=null&&t.post.abort(),clearTimeout(i),t.hideLoader(),i=setTimeout(function(){if(n("form",t.n.searchsettings).serialize()+t.n.text.val().trim()!=t.lastSuccesfulSearch)t.search();else{if(t.n.proclose.css("display","block"),t.isRedirectToFirstResult())return t.doRedirectToFirstResult(),!1;t.resultsOpened||t.showResults()}},250))}})},initFacetEvents:function(){var t=this,i=null;if(t.o.trigger_on_facet_change==1){n("input[type!=checkbox], select",t.n.searchsettings).on("change slidechange",function(){t.n.text.val().length<t.o.charcount||(t.post!=null&&t.post.abort(),clearTimeout(i),i=setTimeout(function(){t.search()},50))});n("input[type=checkbox]",t.n.searchsettings).on("asl_chbx_change",function(){t.n.text.val().length<t.o.charcount||(t.post!=null&&t.post.abort(),t.gaEvent("facet_change",{option_label:n(this).closest("fieldset").find("legend").text(),option_value:n(this).closest(".asl_option").find(".asl_option_label").text()+(n(this).prop("checked")?"(checked)":"(unchecked)")}),clearTimeout(i),i=setTimeout(function(){t.search()},50))})}},isRedirectToFirstResult:function(){var t=this;return n(".asl_res_url",t.n.resultsDiv).length>0&&(t.o.redirectonclick==1&&t.ktype=="click"&&t.o.redirectClickTo=="first_result"||t.o.redirect_on_enter==1&&(t.ktype=="input"||t.ktype=="keyup")&&t.keycode==13&&t.o.redirectEnterTo=="first_result")?!0:!1},doRedirectToFirstResult:function(){var t=this,i;return i=t.ktype=="click"?t.o.redirectClickLoc:t.o.redirectEnterLoc,i=="same"?location.href=n(n(".asl_res_url",t.n.resultsDiv).get(0)).attr("href"):l(n(n(".asl_res_url",t.n.resultsDiv).get(0)).attr("href")),t.hideLoader(),t.hideResults(),!1},doRedirectToResults:function(t){var i=this,o=i.ktype=="click"?i.o.redirectClickTo:i.o.redirectEnterTo,e=t=="click"?i.o.redirectClickLoc:i.o.redirectEnterLoc;if(o=="results_page")var u="?s="+r(i.n.text.val());else if(o=="woo_results_page")var u="?post_type=product&s="+r(i.n.text.val());else var u=i.o.redirect_url.replace("{phrase}",r(i.n.text.val()));if(i.o.homeurl.indexOf("?")>1&&u.indexOf("?")===0&&(u=u.replace("?","&")),i.o.overridewpdefault)if(i.o.override_method=="post")f(i.o.homeurl+u,"post",{asl_active:1,p_asl_data:n("form",i.n.searchsettings).serialize()},e);else{var s=i.o.homeurl+u+"&asl_active=1&p_asid="+i.o.id+"&p_asl_data=1&"+n("form",i.n.searchsettings).serialize();e=="same"?location.href=s:l(s)}else f(i.o.homeurl+u,"post",{np_asl_data:n("form",i.n.searchsettings).serialize()},e);i.n.proloading.css("display","none");i.hideLoader();i.hideResults();i.post!=null&&i.post.abort()},destroy:function(){return this.each(function(){var t=n.extend({},this,s);n(window).unbind(t)})},searchfor:function(t){n(".proinput input",this).val(t).trigger("keyup")},initAutocompleteEvent:function(){var t=this;if(t.o.autocomplete.enabled==1&&!i())t.n.text.on("keyup",function(i){window.event?(t.keycode=window.event.keyCode,t.ktype=window.event.type):i&&(t.keycode=i.which,t.ktype=i.type);var r=39;n("body").hasClass("rtl")&&(r=37);t.keycode==r&&t.n.textAutocomplete.val()!=""?(i.preventDefault(),t.n.text.val(t.n.textAutocomplete.val()),t.post!=null&&t.post.abort(),t.search()):(t.postAuto!=null&&t.postAuto.abort(),t.autocompleteGoogleOnly())})},autocompleteGoogleOnly:function(){var t=this,i=t.n.text.val();if(t.n.text.val()==""){t.n.textAutocomplete.val("");return}var r=t.n.textAutocomplete.val();(r==""||r.indexOf(i)!=0)&&(t.n.textAutocomplete.val(""),n.ajax({url:"https://clients1.google.com/complete/search",dataType:"jsonp",data:{q:i,hl:t.o.autocomplete.lang,nolabels:"t",client:"hp",ds:""},success:function(r){r[1].length>0&&(response=r[1][0][0].replace(/(<([^>]+)>)/ig,""),response=n("<textarea />").html(response).text(),response=response.substr(i.length),t.n.textAutocomplete.val(i+response))}}))},search:function(){var t=this;if((!t.searching||!0)&&!(t.n.text.val().length<t.o.charcount)){t.searching=!0;t.n.proloading.css({display:"block"});t.n.proclose.css({display:"none"});var i={action:"ajaxsearchlite_search",aslp:t.n.text.val(),asid:t.o.id,options:n("form",t.n.searchsettings).serialize()};if(i=h("asl_search_data",i),JSON.stringify(i)===JSON.stringify(t.lastSearchData))return(t.resultsOpened||t.showResults(),t.hideLoader(),t.isRedirectToFirstResult())?(t.doRedirectToFirstResult(),!1):!1;t.gaEvent("search_start");t.post=n.post(ASL.ajaxurl,i,function(u){u=u.replace(/^\s*[\r\n]/gm,"");u=u.match(/!!ASLSTART!!(.*[\s\S]*)!!ASLEND!!/)[1];u=h("asl_search_html",u);t.n.resdrg.html("");t.n.resdrg.html(u);n(".asl_keyword",t.n.resdrg).on("click",function(){t.n.text.val(n(this).html());n("input.orig",t.n.container).val(n(this).html()).trigger("keydown");n("form",t.n.container).trigger("submit","ajax");t.search()});if(t.n.items=n(".item",t.n.resultsDiv),t.gaEvent("search_end",{results_count:t.n.items.length}),t.gaPageview(t.n.text.val()),t.isRedirectToFirstResult())return t.doRedirectToFirstResult(),!1;if(t.hideLoader(),t.showResults(),t.scrollToResults(),t.lastSuccesfulSearch=n("form",t.n.searchsettings).serialize()+t.n.text.val().trim(),t.lastSearchData=i,t.n.items.length==0)t.n.showmore!=null&&t.n.showmore.css("display","none");else if(t.n.showmore!=null){t.n.showmore.css("display","block");n("a",t.n.showmore).off();n("a",t.n.showmore).on("click",function(){var u=t.o.redirectClickTo,i="?s="+r(t.n.text.val());i=u=="results_page"?"?s="+r(t.n.text.val()):u=="woo_results_page"?"?post_type=product&s="+r(t.n.text.val()):t.o.redirect_url.replace("{phrase}",r(t.n.text.val()));t.o.overridewpdefault?t.o.override_method=="post"?f(t.o.homeurl+i,"post",{asl_active:1,p_asl_data:n("form",t.n.searchsettings).serialize()}):location.href=t.o.homeurl+i+"&asl_active=1&p_asid="+t.o.id+"&p_asl_data=1&"+n("form",t.n.searchsettings).serialize():f(t.o.homeurl+i,"post",{np_asl_data:n("form",t.n.searchsettings).serialize()})})}},"text").fail(function(i,r){i.aborted||r=="abort"||(t.n.resdrg.html(""),t.n.resdrg.html('<div class="asl_nores">The request failed. Please check your connection! Status: '+i.status+"<\/div>"),t.n.items=n(".item",t.n.resultsDiv),t.hideLoader(),t.showResults(),t.scrollToResults())})}},showLoader:function(){var n=this;n.n.proloading.css({display:"block"})},hideLoader:function(){var n=this;n.n.proloading.css({display:"none"});n.n.results.css("display","")},showResultsBox:function(){var n=this;n.n.resultsDiv.css({display:"block",height:"auto"});n.n.items.addClass(n.animationOpacity);n.fixResultsPosition(!0);n.n.resultsDiv.css(n.resAnim.showCSS);n.n.resultsDiv.removeClass(n.resAnim.hideClass).addClass(n.resAnim.showClass)},showResults:function(){var n=this;n.createVerticalScroll();switch(n.o.resultstype){case"vertical":n.showVerticalResults();break;default:n.showHorizontalResults()}n.hideLoader();n.n.proclose.css({display:"block"});n.n.showmore!=null&&(n.n.items.length>0?n.n.showmore.css({display:"block"}):n.n.showmore.css({display:"none"}));n.is_scroll&&typeof n.scroll.recalculate!="undefined"&&setTimeout(function(){n.scroll.recalculate()},500);n.resultsOpened=!0},hideResults:function(){var n=this;if(!n.resultsOpened)return!1;n.n.resultsDiv.removeClass(n.resAnim.showClass).addClass(n.resAnim.hideClass);setTimeout(function(){n.n.resultsDiv.css(n.resAnim.hideCSS)},n.resAnim.duration);n.n.proclose.css({display:"none"});n.n.showmore!=null&&n.n.showmore.css({display:"none"});i()&&document.activeElement.blur();n.resultsOpened=!1},scrollToResults:function(){if(($this=this,this.o.scrollToResults==1)&&!this.$elem.parent().hasClass("asl_preview_data")){if($this.o.resultsposition=="hover")var t=$this.n.probox.offset().top-20;else var t=$this.n.resultsDiv.offset().top-20;n("#wpadminbar").length>0&&(t-=n("#wpadminbar").height());t=t<0?0:t;n("body, html").animate({scrollTop:t},{duration:500})}},createGroup:function(n){return"<div class='group'>"+n+"<\/div>"},showVerticalResults:function(){var t=this;if(t.showResultsBox(),t.n.items.length>0){var e=t.n.items.length<t.o.itemscount?t.n.items.length:t.o.itemscount,h=n(".group",t.n.resultsDiv);if(t.n.items.length<=t.o.itemscount)t.n.results.css({height:"auto"});else{t.n.results.css({height:30});t.resize();var i=0,r=0,u=0,f=0;t.n.items.each(function(){r+=n(this).outerHeight(!0);n(this).outerHeight(!0)>f&&(f=n(this).outerHeight(!0));i++});u=f*e;u>r&&(u=r);i=i<1?1:i;r=r/i*e;t.n.results.css({height:u})}if(t.resize(),t.n.items.last().addClass("asl_last_item"),t.o.highlight==1){var o=t.o.highlightwholewords==1?!0:!1;n("div.item",t.n.resultsDiv).highlight(t.n.text.val().split(" "),{element:"span",className:"highlighted",wordsOnly:o})}}t.resize();t.n.items.length==0&&t.n.results.css({height:"auto"});t.n.results.css({overflowY:"auto"});var s=t.is_scroll?n(t.scroll.getScrollElement()):t.n.results;s.scrollTop(0);t.addAnimation();t.fixResultsPosition(!0);t.searching=!1},addAnimation:function(){var i=this,t=0,r=1;i.n.items.each(function(){var u=this;setTimeout(function(){n(u).addClass(i.animation)},t);t=t+60;r++})},removeAnimation:function(){var t=this;t.n.items.each(function(){var i=this;n(i).removeClass(t.animation)})},initSettingsAnimations:function(){var n=this,t=300;n.settAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":t+"ms"},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:t};n.n.searchsettings.css({"-webkit-animation-duration":n.settAnim.duration+"ms","animation-duration":n.settAnim.duration+"ms"})},initResultsAnimations:function(){var t=this,n=300;t.resAnim={showClass:"asl_an_fadeInDrop",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":n+"ms"},hideClass:"asl_an_fadeOutDrop",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:n};t.n.resultsDiv.css({"-webkit-animation-duration":n+"ms","animation-duration":n+"ms"})},showSettings:function(){var t=this;t.n.searchsettings.css(t.settAnim.showCSS);t.n.searchsettings.removeClass(t.settAnim.hideClass).addClass(t.settAnim.showClass);t.settScroll==null&&t.is_scroll&&(t.settScroll=[],n(".asl_sett_scroll",t.n.searchsettings).each(function(i){var r=this;setTimeout(function(){t.settScroll[i]=new asl_SimpleBar(n(r).get(0),{direction:n("body").hasClass("rtl")?"rtl":"ltr",autoHide:!0})},20)}));t.n.prosettings.data("opened",1);t.fixSettingsPosition(!0)},hideSettings:function(){var n=this;n.n.searchsettings.removeClass(n.settAnim.showClass).addClass(n.settAnim.hideClass);setTimeout(function(){n.n.searchsettings.css(n.settAnim.hideCSS)},n.settAnim.duration);n.n.prosettings.data("opened",0)},cleanUp:function(){var t=this;n(".searchsettings",t.n.container).length>0&&(n("body>#ajaxsearchlitesettings"+t.o.rid).remove(),n("body>#ajaxsearchliteres"+t.o.rid).remove())},orientationChange:function(){var n=this;n.fixSettingsPosition();n.fixResultsPosition();n.fixTryThisPosition()},resize:function(){var n=this;n.fixSettingsPosition();n.fixResultsPosition();n.fixTryThisPosition()},scrolling:function(n){var t=this;t.fixSettingsPosition(n);t.fixResultsPosition(n)},fixTryThisPosition:function(){},fixResultsPosition:function(t){t=typeof t=="undefined"?!1:t;var r=this,f=r.n.resultsDiv.css("position");if(f=="fixed"||f=="absolute"){var o=0;if(n("body").css("position")!="static"&&(o=n("body").offset().top),t==!0||r.n.resultsDiv.css("visibility")=="visible"){var s=0,h=0,u=r.n.container.offset();if(f=="fixed"&&(o=0,s=n(document).scrollTop(),h=n(document).scrollLeft(),i()&&e()&&r.n.text.is(":focus")&&(s=r.savedScrollTop,u.top=r.savedContainerTop)),typeof u!="undefined"){var c=r.n.container.outerWidth()<240?240:r.n.container.outerWidth();r.n.resultsDiv.outerWidth(c);r.n.resultsDiv.css({top:u.top+r.n.container.outerHeight(!0)+10-o-s,left:u.left-h})}}}},fixSettingsPosition:function(t){t=typeof t=="undefined"?!1:t;var r=this,s=0;if(n("body").css("position")!="static"&&(s=n("body").offset().top),(t==!0||r.n.prosettings.data("opened")!=0)&&r.o.blocking!=!0){if(r.fixSettingsWidth(),r.n.prosettings.css("display")!="none")var f=r.n.prosettings;else var f=r.n.promagnifier;var u=f.offset(),o=0,h=0;r.n.searchsettings.css("position")=="fixed"&&(o=n(window).scrollTop(),h=n(window).scrollLeft(),i()&&e()&&r.n.text.is(":focus")&&(u.top=r.savedContainerTop,o=r.savedScrollTop));r.o.settingsimagepos=="left"?r.n.searchsettings.css({display:"block",top:u.top+f.height()-2-s-o,left:u.left-h}):r.n.searchsettings.css({display:"block",top:u.top+f.height()-2-s-o,left:u.left+f.width()-r.n.searchsettings.width()-h})}},fixSettingsWidth:function(){}};function h(){return typeof wp!="undefined"&&typeof wp.hooks!="undefined"&&typeof wp.hooks.applyFilters!="undefined"?wp.hooks.applyFilters.apply(null,arguments):typeof arguments[1]!="undefined"?arguments[1]:!1}function i(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}}function o(t,i){var r=t.find(":input").get();return arguments.length===1?(i={},n.each(r,function(){!this.name||this.disabled||!(this.checked||/select|textarea/i.test(this.nodeName)||/text/i.test(this.type))||n(this).hasClass("asl_datepicker_field")||n(this).hasClass("asl_datepicker")||(i[this.name]==undefined&&(i[this.name]=[]),i[this.name].push(n(this).val()))}),JSON.stringify(i)):(typeof i!="object"&&(i=JSON.parse(i)),n.each(r,function(){if(this.name&&i[this.name]){var t=i[this.name],r=n(this);if(Object.prototype.toString.call(t)!=="[object Array]"&&(t=[t]),this.type=="checkbox"||this.type=="radio"){for(var e=r.val(),f=!1,u=0;u<t.length;u++)if(t[u]==e){f=!0;break}r.attr("checked",f)}else r.val(t[0])}}),t)}function r(n){return encodeURIComponent(n).replace(/\%20/g,"+")}function c(n){return n.replace(/"|'/g,"")}function f(t,i,r,u){"use strict";var f;f=n("<form />",{action:t,method:i,style:"display: none;"});typeof r!="undefined"&&r!==null&&n.each(r,function(t,i){n("<input />",{type:"hidden",name:t,value:i}).appendTo(f)});typeof u!="undefined"&&u=="new"&&f.attr("target","_blank");f.appendTo("body").trigger("submit")}function l(t){n('<a href="'+t+'" target="_blank">').get(0).click()}function e(){return typeof navigator!="undefined"&&typeof window.navigator.userAgent!="undefined"?window.navigator.userAgent.match(/(iPod|iPhone|iPad)/)!=null:!1}function v(){var n=window.navigator.userAgent,t=n.indexOf("MSIE ");return t>0?!0:!1}typeof Object.create!="function"&&(Object.create=function(n){function t(){}return t.prototype=n,new t});n.plugin=function(t,i){n.fn[t]=function(r){return this.each(function(){n.data(this,t)||n.data(this,t,Object.create(i).init(r,this))})}};n.plugin("ajaxsearchlite",s);var u={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(n){var e="",o,t,i,h,c,s,r,f=0;for(n=u._utf8_encode(n);f<n.length;)o=n.charCodeAt(f++),t=n.charCodeAt(f++),i=n.charCodeAt(f++),h=o>>2,c=(o&3)<<4|t>>4,s=(t&15)<<2|i>>6,r=i&63,isNaN(t)?s=r=64:isNaN(i)&&(r=64),e=e+this._keyStr.charAt(h)+this._keyStr.charAt(c)+this._keyStr.charAt(s)+this._keyStr.charAt(r);return e},decode:function(n){var t="",o,s,h,c,f,r,e,i=0;for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)c=this._keyStr.indexOf(n.charAt(i++)),f=this._keyStr.indexOf(n.charAt(i++)),r=this._keyStr.indexOf(n.charAt(i++)),e=this._keyStr.indexOf(n.charAt(i++)),o=c<<2|f>>4,s=(f&15)<<4|r>>2,h=(r&3)<<6|e,t=t+String.fromCharCode(o),r!=64&&(t=t+String.fromCharCode(s)),e!=64&&(t=t+String.fromCharCode(h));return u._utf8_decode(t)},_utf8_encode:function(n){n=n.replace(/\r\n/g,"\n");for(var i="",r=0;r<n.length;r++){var t=n.charCodeAt(r);t<128?i+=String.fromCharCode(t):t>127&&t<2048?(i+=String.fromCharCode(t>>6|192),i+=String.fromCharCode(t&63|128)):(i+=String.fromCharCode(t>>12|224),i+=String.fromCharCode(t>>6&63|128),i+=String.fromCharCode(t&63|128))}return i},_utf8_decode:function(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}}}(jQuery),window.ASL=typeof ASL!="undefined"?window.ASL:{},window.ASL.getScope=function(){if(typeof jQuery!="undefined")if(typeof jQuery.fn.ajaxsearchlite=="undefined")for(var n=jQuery,t=jQuery,i=0;i<10;i++)if(typeof n.fn.ajaxsearchlite=="undefined")n=jQuery.noConflict(!0),console.log("ASL: executed one noconflict");else return n.fn.jquery!=t.fn.jquery&&(window.jQuery=window.$=t),n;else return jQuery;return typeof window[ASL.js_scope]!="undefined"?window[ASL.js_scope]:!1},window.ASL.initialized=!1,window.ASL.initialize=function(n){function f(n){for(var r="",t=0,i=c1=c2=0;t<n.length;)i=n.charCodeAt(t),i<128?(r+=String.fromCharCode(i),t++):i>191&&i<224?(c2=n.charCodeAt(t+1),r+=String.fromCharCode((i&31)<<6|c2&63),t+=2):(c2=n.charCodeAt(t+1),c3=n.charCodeAt(t+2),r+=String.fromCharCode((i&15)<<12|(c2&63)<<6|c3&63),t+=3);return r}function e(n){var t="",s,h,c,l,e,r,o,i=0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<n.length;)l=u.indexOf(n.charAt(i++)),e=u.indexOf(n.charAt(i++)),r=u.indexOf(n.charAt(i++)),o=u.indexOf(n.charAt(i++)),s=l<<2|e>>4,h=(e&15)<<4|r>>2,c=(r&3)<<6|o,t=t+String.fromCharCode(s),r!=64&&(t=t+String.fromCharCode(h)),o!=64&&(t=t+String.fromCharCode(c));return f(t)}var i=this;if(typeof i.getScope=="undefined"||typeof i.version=="undefined")return!1;var t=i.getScope(),u=".asl_init_data";if(typeof ASL_INSTANCES!="undefined"&&Object.keys(ASL_INSTANCES).length>0?t.each(ASL_INSTANCES,function(n,i){return typeof i=="undefined"?!1:t("#ajaxsearchlite"+n).hasClass("hasASL")?!1:(t("#ajaxsearchlite"+n).addClass("hasASL"),t("#ajaxsearchlite"+n).ajaxsearchlite(i))}):(typeof n!="undefined"&&(u="div[id*=asl_init_id_"+n+"]"),t(u).each(function(){var i=t(this).attr("id").match(/^asl_init_id_(.*)/)[1],n=t(this).data("asldata");if(typeof n=="undefined"||(n=e(n),typeof n=="undefined"||n==""))return!1;var r=JSON.parse(n);return t("#ajaxsearchlite"+i).addClass("hasASL"),t("#ajaxsearchlite"+i).ajaxsearchlite(r)})),i.highlight.enabled){var r=localStorage.getItem("asl_phrase_highlight");localStorage.removeItem("asl_phrase_highlight");r!=null&&(r=JSON.parse(r),t.each(i.highlight.data,function(n,i){var f=i.selector!=""&&t(i.selector).length>0?i.selector:"article";if(f=t(f).length>0?f:"body",t(f).highlight(r.phrase,{element:"span",className:"asl_single_highlighted",wordsOnly:i.whole,excludeParents:".asl_w, .asl-try"}),i.scroll&&t(".asl_single_highlighted").length>0){var u=t(".asl_single_highlighted").offset().top-120;t("#wpadminbar").length>0&&(u-=t("#wpadminbar").height());u=u+i.scroll_offset;u=u<0?0:u;t("html").animate({scrollTop:u},{duration:500})}return!1}))}i.initialized=!0},window.ASL.fixClones=function(){var t=this;if((t.fix_duplicates=t.fix_duplicates||0,t.fix_duplicates==0)||typeof t.getScope=="undefined")return!1;var n=t.getScope(),i={};n(".asl_init_data").each(function(){var t=n(this).attr("id").match(/^asl_init_id_(.*)/)[1];typeof i[t]=="undefined"?i[t]={rid:t,id:t,count:1}:i[t].count++});n.each(i,function(i,r){r.count>1&&n(".asl_m_"+r.rid).each(function(i){if(i==0)return!0;for(var f=n(this).parent(),u=r.id;n("#ajaxsearchlite"+u).length!=0;)u++;n(this).attr("id","ajaxsearchlite"+u);n(this).removeClass("asl_m_"+r.rid).addClass("asl_m_"+u);n(this).removeClass("hasASL");n(".asl_r_"+r.rid,this).length==0&&n(".asl_r_"+r.rid).clone().appendTo(n(this));n(".asl_r_"+r.rid,this).attr("id","ajaxsearchliteres"+u);n(".asl_r_"+r.rid,this).attr("data-id",u);n(".asl_r_"+r.rid,this).removeClass("asl_r_"+r.rid).addClass("asl_r_"+u);typeof ASL.resHTML!="undefined"&&n("#ajaxsearchliteres"+u).html(ASL.resHTML);n(".asl_s_"+r.rid,this).length==0&&n(".asl_s_"+r.rid).length!=0&&n(".asl_s_"+r.rid).clone().appendTo(n(this));n(".asl_sb_"+r.rid,this).length==0&&n(".asl_sb_"+r.rid).length!=0&&n(".asl_sb_"+r.rid).clone().appendTo(n(this));n(".asl_s_"+r.rid,this).attr("id","ajaxsearchlitesettings"+u);typeof ASL.setHTML!="undefined"&&n("#ajaxsearchlitesettings"+u).html(ASL.setHTML);n(".asl_sb_"+r.rid,f).attr("id","ajaxsearchlitebsettings"+u);typeof ASL.setHTML!="undefined"&&n("#ajaxsearchlitebsettings"+u).html(ASL.setHTML);n(".asl_hidden_data",f).length>0&&n(".asl_hidden_data",f).attr("id","asl_hidden_data_"+u);n(".asl_init_data",f).length>0&&n(".asl_init_data",f).attr("id","asl_init_id_"+u);t.initialize(u)})})},window.ASL.ready=function(){var t=this,i=t.getScope(),r=null;if(i===!1)return!1;i(function(){var n,i=0;n=setInterval(function(){if(++i,i>20||t.initialized)return clearInterval(n),!1;console.log("tries",i);t.initialize();clearInterval(n)},200);t.initialize();setTimeout(function(){t.fixClones()},2500)});typeof ASL.detect_ajax!="undefined"&&ASL.detect_ajax==1&&i("body").bind("DOMSubtreeModified",function(){clearTimeout(r);r=setTimeout(function(){t.initialize()},500)});var u;i(window).on("resize",function(){clearTimeout(u);u=setTimeout(function(){t.fixClones()},2e3)});var f,n="#menu-item-search, .fa-search, .fa, .fas";n=n+", .fusion-flyout-menu-toggle, .fusion-main-menu-search-open";n=n+", #search_button";n=n+", .mini-search.popup-search";n=n+", .icon-search";n=n+", .menu-item-search-dropdown";n=n+", .mobile-menu-button";n=n+", .td-icon-search, .tdb-search-icon";n=n+", .side_menu_button, .search_button";n=n+", .raven-search-form-toggle";n=n+", [data-elementor-open-lightbox], .elementor-button-link, .elementor-button";i(function(){i("body").on("click touchend",n,function(){clearTimeout(f);f=setTimeout(function(){t.initialize()},500)})})},window.ASL.loadScriptStack=function(n){if(n.length>0){var t=document.createElement("script");t.src=n.splice(0,1);t.onload=n.length==0?function(){typeof jQuery.fn.ajaxsearchlite!="undefined"&&(console.log("ASL: Initializing via onload.."),window.ASL.ready())}:function(){window.ASL.loadScriptStack(n)};console.log("ASL adding:",t.src);document.body.appendChild(t)}},window.ASL.init=function(){if(typeof jQuery=="undefined"||typeof jQuery.fn.ajaxsearchlite=="undefined"){console.log("ASL: jQuery script is probably deferred or delayed loading, trying to resolve");var n;window.asl_interval_tries=typeof asl_interval_tries!="undefined"?window.asl_interval_tries:0;n=setInterval(function(){return(++window.asl_interval_tries,window.asl_interval_tries>5)?(console.log("ASL: faliure, init tried",asl_interval_tries,"times"),clearInterval(n),typeof jQuery!="undefined"&&typeof ASL.min_script_src!="undefined"&&ASL.min_script_src!==null&&(console.log("ASL: jQuery exists, adding ASL script dynamically & trying to load."),ASL.loadScriptStack(ASL.min_script_src),ASL.min_script_src=null),!1):typeof jQuery!="undefined"&&typeof jQuery.fn.ajaxsearchlite!="undefined"?(window.ASL.ready(),console.log("ASL: success at try: ",window.asl_interval_tries),clearInterval(n),!1):void 0},250)}else window.ASL.ready()},typeof window.ASL.version=="undefined"){var asl_init_interval,asl_init_interval_tries=0;console.log("ASL: global not defined, trying to wait..");asl_init_interval=setInterval(function(){return++asl_init_interval_tries,typeof window.ASL.version!="undefined"||asl_init_interval_tries>10?(asl_init_interval_tries>10?console.log("ASL: global found at try ",asl_init_interval_tries):console.log("ASL: global not found, initializing anyways at try ",asl_init_interval_tries),window.ASL.init(),clearInterval(asl_init_interval),!0):void 0},100)}else window.ASL.init();
|
js/nomin-scoped/jquery.ajaxsearchlite.js
CHANGED
@@ -118,6 +118,8 @@
|
|
118 |
if ( ASL.js_retain_popstate == 1 )
|
119 |
$this.initPrevState();
|
120 |
|
|
|
|
|
121 |
if (detectOldIE())
|
122 |
$this.n.container.addClass('asl_msie');
|
123 |
|
@@ -177,16 +179,14 @@
|
|
177 |
});
|
178 |
},
|
179 |
|
180 |
-
|
181 |
-
var $this = this;
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
duplicateChk[this.id] = 'true';
|
189 |
-
}
|
190 |
});
|
191 |
},
|
192 |
|
@@ -312,7 +312,6 @@
|
|
312 |
|
313 |
createVerticalScroll: function () {
|
314 |
var $this = this;
|
315 |
-
|
316 |
if ( $this.is_scroll && typeof $this.scroll.recalculate === 'undefined' ) {
|
317 |
$this.scroll = new asl_SimpleBar($this.n.results.get(0), {
|
318 |
direction: $('body').hasClass('rtl') ? 'rtl' : 'ltr',
|
118 |
if ( ASL.js_retain_popstate == 1 )
|
119 |
$this.initPrevState();
|
120 |
|
121 |
+
$this.monitorTouchMove();
|
122 |
+
|
123 |
if (detectOldIE())
|
124 |
$this.n.container.addClass('asl_msie');
|
125 |
|
179 |
});
|
180 |
},
|
181 |
|
182 |
+
monitorTouchMove: function() {
|
183 |
+
var $this = this, $b = $("body");
|
184 |
+
$this.dragging = false;
|
185 |
+
$b.on("touchmove", function(){
|
186 |
+
$this.dragging = true;
|
187 |
+
});
|
188 |
+
$b.on("touchstart", function(){
|
189 |
+
$this.dragging = false;
|
|
|
|
|
190 |
});
|
191 |
},
|
192 |
|
312 |
|
313 |
createVerticalScroll: function () {
|
314 |
var $this = this;
|
|
|
315 |
if ( $this.is_scroll && typeof $this.scroll.recalculate === 'undefined' ) {
|
316 |
$this.scroll = new asl_SimpleBar($this.n.results.get(0), {
|
317 |
direction: $('body').hasClass('rtl') ? 'rtl' : 'ltr',
|
js/nomin-scoped/simplebar.js
CHANGED
@@ -1,5309 +1,2969 @@
|
|
1 |
(function(jQuery, $, window){
|
2 |
/**
|
3 |
-
* asl_SimpleBar.js - v5.
|
4 |
* Scrollbars, simpler.
|
5 |
-
* https://grsmto.github.io/
|
6 |
*
|
7 |
* Made by Adrien Denat from a fork by Jonathan Nicol
|
8 |
* Under MIT License
|
9 |
*/
|
10 |
|
11 |
-
/**
|
12 |
-
* Scope changed for Ajax Search Pro, code left as original
|
13 |
-
* Replace:
|
14 |
-
* 1. SimpleBar with asl_SimpleBar - case sensitive
|
15 |
-
* 2. simplebar with asl_simplebar - case sensitive
|
16 |
-
* 3. Remove fixRegexpWellKnownSymbolLogic variable & function calls, as they cause conflicts (3 instances)
|
17 |
-
*/
|
18 |
-
|
19 |
(function (global, factory) {
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
}(this, function () { 'use strict';
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
|
1849 |
-
|
1850 |
-
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
* @name set
|
2976 |
-
* @memberOf MapCache
|
2977 |
-
* @param {string} key The key of the value to set.
|
2978 |
-
* @param {*} value The value to set.
|
2979 |
-
* @returns {Object} Returns the map cache instance.
|
2980 |
-
*/
|
2981 |
-
function mapCacheSet(key, value) {
|
2982 |
-
getMapData(this, key).set(key, value);
|
2983 |
-
return this;
|
2984 |
-
}
|
2985 |
-
|
2986 |
-
// Add methods to `MapCache`.
|
2987 |
-
MapCache.prototype.clear = mapCacheClear;
|
2988 |
-
MapCache.prototype['delete'] = mapCacheDelete;
|
2989 |
-
MapCache.prototype.get = mapCacheGet;
|
2990 |
-
MapCache.prototype.has = mapCacheHas;
|
2991 |
-
MapCache.prototype.set = mapCacheSet;
|
2992 |
-
|
2993 |
-
/**
|
2994 |
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
2995 |
-
*
|
2996 |
-
* @private
|
2997 |
-
* @param {Array} array The array to inspect.
|
2998 |
-
* @param {*} key The key to search for.
|
2999 |
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
3000 |
-
*/
|
3001 |
-
function assocIndexOf(array, key) {
|
3002 |
-
var length = array.length;
|
3003 |
-
while (length--) {
|
3004 |
-
if (eq(array[length][0], key)) {
|
3005 |
-
return length;
|
3006 |
-
}
|
3007 |
-
}
|
3008 |
-
return -1;
|
3009 |
-
}
|
3010 |
-
|
3011 |
-
/**
|
3012 |
-
* The base implementation of `_.isNative` without bad shim checks.
|
3013 |
-
*
|
3014 |
-
* @private
|
3015 |
-
* @param {*} value The value to check.
|
3016 |
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
3017 |
-
* else `false`.
|
3018 |
-
*/
|
3019 |
-
function baseIsNative(value) {
|
3020 |
-
if (!isObject$3(value) || isMasked(value)) {
|
3021 |
-
return false;
|
3022 |
-
}
|
3023 |
-
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
3024 |
-
return pattern.test(toSource(value));
|
3025 |
-
}
|
3026 |
-
|
3027 |
-
/**
|
3028 |
-
* Gets the data for `map`.
|
3029 |
-
*
|
3030 |
-
* @private
|
3031 |
-
* @param {Object} map The map to query.
|
3032 |
-
* @param {string} key The reference key.
|
3033 |
-
* @returns {*} Returns the map data.
|
3034 |
-
*/
|
3035 |
-
function getMapData(map, key) {
|
3036 |
-
var data = map.__data__;
|
3037 |
-
return isKeyable(key)
|
3038 |
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
3039 |
-
: data.map;
|
3040 |
-
}
|
3041 |
-
|
3042 |
-
/**
|
3043 |
-
* Gets the native function at `key` of `object`.
|
3044 |
-
*
|
3045 |
-
* @private
|
3046 |
-
* @param {Object} object The object to query.
|
3047 |
-
* @param {string} key The key of the method to get.
|
3048 |
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
3049 |
-
*/
|
3050 |
-
function getNative(object, key) {
|
3051 |
-
var value = getValue(object, key);
|
3052 |
-
return baseIsNative(value) ? value : undefined;
|
3053 |
-
}
|
3054 |
-
|
3055 |
-
/**
|
3056 |
-
* Checks if `value` is suitable for use as unique object key.
|
3057 |
-
*
|
3058 |
-
* @private
|
3059 |
-
* @param {*} value The value to check.
|
3060 |
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
3061 |
-
*/
|
3062 |
-
function isKeyable(value) {
|
3063 |
-
var type = typeof value;
|
3064 |
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
3065 |
-
? (value !== '__proto__')
|
3066 |
-
: (value === null);
|
3067 |
-
}
|
3068 |
-
|
3069 |
-
/**
|
3070 |
-
* Checks if `func` has its source masked.
|
3071 |
-
*
|
3072 |
-
* @private
|
3073 |
-
* @param {Function} func The function to check.
|
3074 |
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
3075 |
-
*/
|
3076 |
-
function isMasked(func) {
|
3077 |
-
return !!maskSrcKey && (maskSrcKey in func);
|
3078 |
-
}
|
3079 |
-
|
3080 |
-
/**
|
3081 |
-
* Converts `func` to its source code.
|
3082 |
-
*
|
3083 |
-
* @private
|
3084 |
-
* @param {Function} func The function to process.
|
3085 |
-
* @returns {string} Returns the source code.
|
3086 |
-
*/
|
3087 |
-
function toSource(func) {
|
3088 |
-
if (func != null) {
|
3089 |
-
try {
|
3090 |
-
return funcToString.call(func);
|
3091 |
-
} catch (e) {}
|
3092 |
-
try {
|
3093 |
-
return (func + '');
|
3094 |
-
} catch (e) {}
|
3095 |
-
}
|
3096 |
-
return '';
|
3097 |
-
}
|
3098 |
-
|
3099 |
-
/**
|
3100 |
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
3101 |
-
* provided, it determines the cache key for storing the result based on the
|
3102 |
-
* arguments provided to the memoized function. By default, the first argument
|
3103 |
-
* provided to the memoized function is used as the map cache key. The `func`
|
3104 |
-
* is invoked with the `this` binding of the memoized function.
|
3105 |
-
*
|
3106 |
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
3107 |
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
3108 |
-
* constructor with one whose instances implement the
|
3109 |
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
3110 |
-
* method interface of `delete`, `get`, `has`, and `set`.
|
3111 |
-
*
|
3112 |
-
* @static
|
3113 |
-
* @memberOf _
|
3114 |
-
* @since 0.1.0
|
3115 |
-
* @category Function
|
3116 |
-
* @param {Function} func The function to have its output memoized.
|
3117 |
-
* @param {Function} [resolver] The function to resolve the cache key.
|
3118 |
-
* @returns {Function} Returns the new memoized function.
|
3119 |
-
* @example
|
3120 |
-
*
|
3121 |
-
* var object = { 'a': 1, 'b': 2 };
|
3122 |
-
* var other = { 'c': 3, 'd': 4 };
|
3123 |
-
*
|
3124 |
-
* var values = _.memoize(_.values);
|
3125 |
-
* values(object);
|
3126 |
-
* // => [1, 2]
|
3127 |
-
*
|
3128 |
-
* values(other);
|
3129 |
-
* // => [3, 4]
|
3130 |
-
*
|
3131 |
-
* object.a = 2;
|
3132 |
-
* values(object);
|
3133 |
-
* // => [1, 2]
|
3134 |
-
*
|
3135 |
-
* // Modify the result cache.
|
3136 |
-
* values.cache.set(object, ['a', 'b']);
|
3137 |
-
* values(object);
|
3138 |
-
* // => ['a', 'b']
|
3139 |
-
*
|
3140 |
-
* // Replace `_.memoize.Cache`.
|
3141 |
-
* _.memoize.Cache = WeakMap;
|
3142 |
-
*/
|
3143 |
-
function memoize(func, resolver) {
|
3144 |
-
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
|
3145 |
-
throw new TypeError(FUNC_ERROR_TEXT$2);
|
3146 |
-
}
|
3147 |
-
var memoized = function() {
|
3148 |
-
var args = arguments,
|
3149 |
-
key = resolver ? resolver.apply(this, args) : args[0],
|
3150 |
-
cache = memoized.cache;
|
3151 |
-
|
3152 |
-
if (cache.has(key)) {
|
3153 |
-
return cache.get(key);
|
3154 |
-
}
|
3155 |
-
var result = func.apply(this, args);
|
3156 |
-
memoized.cache = cache.set(key, result);
|
3157 |
-
return result;
|
3158 |
-
};
|
3159 |
-
memoized.cache = new (memoize.Cache || MapCache);
|
3160 |
-
return memoized;
|
3161 |
-
}
|
3162 |
-
|
3163 |
-
// Assign cache to `_.memoize`.
|
3164 |
-
memoize.Cache = MapCache;
|
3165 |
-
|
3166 |
-
/**
|
3167 |
-
* Performs a
|
3168 |
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
3169 |
-
* comparison between two values to determine if they are equivalent.
|
3170 |
-
*
|
3171 |
-
* @static
|
3172 |
-
* @memberOf _
|
3173 |
-
* @since 4.0.0
|
3174 |
-
* @category Lang
|
3175 |
-
* @param {*} value The value to compare.
|
3176 |
-
* @param {*} other The other value to compare.
|
3177 |
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
3178 |
-
* @example
|
3179 |
-
*
|
3180 |
-
* var object = { 'a': 1 };
|
3181 |
-
* var other = { 'a': 1 };
|
3182 |
-
*
|
3183 |
-
* _.eq(object, object);
|
3184 |
-
* // => true
|
3185 |
-
*
|
3186 |
-
* _.eq(object, other);
|
3187 |
-
* // => false
|
3188 |
-
*
|
3189 |
-
* _.eq('a', 'a');
|
3190 |
-
* // => true
|
3191 |
-
*
|
3192 |
-
* _.eq('a', Object('a'));
|
3193 |
-
* // => false
|
3194 |
-
*
|
3195 |
-
* _.eq(NaN, NaN);
|
3196 |
-
* // => true
|
3197 |
-
*/
|
3198 |
-
function eq(value, other) {
|
3199 |
-
return value === other || (value !== value && other !== other);
|
3200 |
-
}
|
3201 |
-
|
3202 |
-
/**
|
3203 |
-
* Checks if `value` is classified as a `Function` object.
|
3204 |
-
*
|
3205 |
-
* @static
|
3206 |
-
* @memberOf _
|
3207 |
-
* @since 0.1.0
|
3208 |
-
* @category Lang
|
3209 |
-
* @param {*} value The value to check.
|
3210 |
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
3211 |
-
* @example
|
3212 |
-
*
|
3213 |
-
* _.isFunction(_);
|
3214 |
-
* // => true
|
3215 |
-
*
|
3216 |
-
* _.isFunction(/abc/);
|
3217 |
-
* // => false
|
3218 |
-
*/
|
3219 |
-
function isFunction(value) {
|
3220 |
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
3221 |
-
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
3222 |
-
var tag = isObject$3(value) ? objectToString$3.call(value) : '';
|
3223 |
-
return tag == funcTag || tag == genTag;
|
3224 |
-
}
|
3225 |
-
|
3226 |
-
/**
|
3227 |
-
* Checks if `value` is the
|
3228 |
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
3229 |
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
3230 |
-
*
|
3231 |
-
* @static
|
3232 |
-
* @memberOf _
|
3233 |
-
* @since 0.1.0
|
3234 |
-
* @category Lang
|
3235 |
-
* @param {*} value The value to check.
|
3236 |
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
3237 |
-
* @example
|
3238 |
-
*
|
3239 |
-
* _.isObject({});
|
3240 |
-
* // => true
|
3241 |
-
*
|
3242 |
-
* _.isObject([1, 2, 3]);
|
3243 |
-
* // => true
|
3244 |
-
*
|
3245 |
-
* _.isObject(_.noop);
|
3246 |
-
* // => true
|
3247 |
-
*
|
3248 |
-
* _.isObject(null);
|
3249 |
-
* // => false
|
3250 |
-
*/
|
3251 |
-
function isObject$3(value) {
|
3252 |
-
var type = typeof value;
|
3253 |
-
return !!value && (type == 'object' || type == 'function');
|
3254 |
-
}
|
3255 |
-
|
3256 |
-
var lodash_memoize = memoize;
|
3257 |
-
|
3258 |
-
/**
|
3259 |
-
* A collection of shims that provide minimal functionality of the ES6 collections.
|
3260 |
-
*
|
3261 |
-
* These implementations are not meant to be used outside of the ResizeObserver
|
3262 |
-
* modules as they cover only a limited range of use cases.
|
3263 |
-
*/
|
3264 |
-
/* eslint-disable require-jsdoc, valid-jsdoc */
|
3265 |
-
var MapShim = (function () {
|
3266 |
-
if (typeof Map !== 'undefined') {
|
3267 |
-
return Map;
|
3268 |
-
}
|
3269 |
-
/**
|
3270 |
-
* Returns index in provided array that matches the specified key.
|
3271 |
-
*
|
3272 |
-
* @param {Array<Array>} arr
|
3273 |
-
* @param {*} key
|
3274 |
-
* @returns {number}
|
3275 |
-
*/
|
3276 |
-
function getIndex(arr, key) {
|
3277 |
-
var result = -1;
|
3278 |
-
arr.some(function (entry, index) {
|
3279 |
-
if (entry[0] === key) {
|
3280 |
-
result = index;
|
3281 |
-
return true;
|
3282 |
-
}
|
3283 |
-
return false;
|
3284 |
-
});
|
3285 |
-
return result;
|
3286 |
-
}
|
3287 |
-
return /** @class */ (function () {
|
3288 |
-
function class_1() {
|
3289 |
-
this.__entries__ = [];
|
3290 |
-
}
|
3291 |
-
Object.defineProperty(class_1.prototype, "size", {
|
3292 |
-
/**
|
3293 |
-
* @returns {boolean}
|
3294 |
-
*/
|
3295 |
-
get: function () {
|
3296 |
-
return this.__entries__.length;
|
3297 |
-
},
|
3298 |
-
enumerable: true,
|
3299 |
-
configurable: true
|
3300 |
-
});
|
3301 |
-
/**
|
3302 |
-
* @param {*} key
|
3303 |
-
* @returns {*}
|
3304 |
-
*/
|
3305 |
-
class_1.prototype.get = function (key) {
|
3306 |
-
var index = getIndex(this.__entries__, key);
|
3307 |
-
var entry = this.__entries__[index];
|
3308 |
-
return entry && entry[1];
|
3309 |
-
};
|
3310 |
-
/**
|
3311 |
-
* @param {*} key
|
3312 |
-
* @param {*} value
|
3313 |
-
* @returns {void}
|
3314 |
-
*/
|
3315 |
-
class_1.prototype.set = function (key, value) {
|
3316 |
-
var index = getIndex(this.__entries__, key);
|
3317 |
-
if (~index) {
|
3318 |
-
this.__entries__[index][1] = value;
|
3319 |
-
}
|
3320 |
-
else {
|
3321 |
-
this.__entries__.push([key, value]);
|
3322 |
-
}
|
3323 |
-
};
|
3324 |
-
/**
|
3325 |
-
* @param {*} key
|
3326 |
-
* @returns {void}
|
3327 |
-
*/
|
3328 |
-
class_1.prototype.delete = function (key) {
|
3329 |
-
var entries = this.__entries__;
|
3330 |
-
var index = getIndex(entries, key);
|
3331 |
-
if (~index) {
|
3332 |
-
entries.splice(index, 1);
|
3333 |
-
}
|
3334 |
-
};
|
3335 |
-
/**
|
3336 |
-
* @param {*} key
|
3337 |
-
* @returns {void}
|
3338 |
-
*/
|
3339 |
-
class_1.prototype.has = function (key) {
|
3340 |
-
return !!~getIndex(this.__entries__, key);
|
3341 |
-
};
|
3342 |
-
/**
|
3343 |
-
* @returns {void}
|
3344 |
-
*/
|
3345 |
-
class_1.prototype.clear = function () {
|
3346 |
-
this.__entries__.splice(0);
|
3347 |
-
};
|
3348 |
-
/**
|
3349 |
-
* @param {Function} callback
|
3350 |
-
* @param {*} [ctx=null]
|
3351 |
-
* @returns {void}
|
3352 |
-
*/
|
3353 |
-
class_1.prototype.forEach = function (callback, ctx) {
|
3354 |
-
if (ctx === void 0) { ctx = null; }
|
3355 |
-
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
3356 |
-
var entry = _a[_i];
|
3357 |
-
callback.call(ctx, entry[1], entry[0]);
|
3358 |
-
}
|
3359 |
-
};
|
3360 |
-
return class_1;
|
3361 |
-
}());
|
3362 |
-
})();
|
3363 |
-
|
3364 |
-
/**
|
3365 |
-
* Detects whether window and document objects are available in current environment.
|
3366 |
-
*/
|
3367 |
-
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
3368 |
-
|
3369 |
-
// Returns global object of a current environment.
|
3370 |
-
var global$1 = (function () {
|
3371 |
-
if (typeof global !== 'undefined' && global.Math === Math) {
|
3372 |
-
return global;
|
3373 |
-
}
|
3374 |
-
if (typeof self !== 'undefined' && self.Math === Math) {
|
3375 |
-
return self;
|
3376 |
-
}
|
3377 |
-
if (typeof window !== 'undefined' && window.Math === Math) {
|
3378 |
-
return window;
|
3379 |
-
}
|
3380 |
-
// eslint-disable-next-line no-new-func
|
3381 |
-
return Function('return this')();
|
3382 |
-
})();
|
3383 |
-
|
3384 |
-
/**
|
3385 |
-
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
3386 |
-
* first one is not supported.
|
3387 |
-
*
|
3388 |
-
* @returns {number} Requests' identifier.
|
3389 |
-
*/
|
3390 |
-
var requestAnimationFrame$1 = (function () {
|
3391 |
-
if (typeof requestAnimationFrame === 'function') {
|
3392 |
-
// It's required to use a bounded function because IE sometimes throws
|
3393 |
-
// an "Invalid calling object" error if rAF is invoked without the global
|
3394 |
-
// object on the left hand side.
|
3395 |
-
return requestAnimationFrame.bind(global$1);
|
3396 |
-
}
|
3397 |
-
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
3398 |
-
})();
|
3399 |
-
|
3400 |
-
// Defines minimum timeout before adding a trailing call.
|
3401 |
-
var trailingTimeout = 2;
|
3402 |
-
/**
|
3403 |
-
* Creates a wrapper function which ensures that provided callback will be
|
3404 |
-
* invoked only once during the specified delay period.
|
3405 |
-
*
|
3406 |
-
* @param {Function} callback - Function to be invoked after the delay period.
|
3407 |
-
* @param {number} delay - Delay after which to invoke callback.
|
3408 |
-
* @returns {Function}
|
3409 |
-
*/
|
3410 |
-
function throttle$1 (callback, delay) {
|
3411 |
-
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
3412 |
-
/**
|
3413 |
-
* Invokes the original callback function and schedules new invocation if
|
3414 |
-
* the "proxy" was called during current request.
|
3415 |
-
*
|
3416 |
-
* @returns {void}
|
3417 |
-
*/
|
3418 |
-
function resolvePending() {
|
3419 |
-
if (leadingCall) {
|
3420 |
-
leadingCall = false;
|
3421 |
-
callback();
|
3422 |
-
}
|
3423 |
-
if (trailingCall) {
|
3424 |
-
proxy();
|
3425 |
-
}
|
3426 |
-
}
|
3427 |
-
/**
|
3428 |
-
* Callback invoked after the specified delay. It will further postpone
|
3429 |
-
* invocation of the original function delegating it to the
|
3430 |
-
* requestAnimationFrame.
|
3431 |
-
*
|
3432 |
-
* @returns {void}
|
3433 |
-
*/
|
3434 |
-
function timeoutCallback() {
|
3435 |
-
requestAnimationFrame$1(resolvePending);
|
3436 |
-
}
|
3437 |
-
/**
|
3438 |
-
* Schedules invocation of the original function.
|
3439 |
-
*
|
3440 |
-
* @returns {void}
|
3441 |
-
*/
|
3442 |
-
function proxy() {
|
3443 |
-
var timeStamp = Date.now();
|
3444 |
-
if (leadingCall) {
|
3445 |
-
// Reject immediately following calls.
|
3446 |
-
if (timeStamp - lastCallTime < trailingTimeout) {
|
3447 |
-
return;
|
3448 |
-
}
|
3449 |
-
// Schedule new call to be in invoked when the pending one is resolved.
|
3450 |
-
// This is important for "transitions" which never actually start
|
3451 |
-
// immediately so there is a chance that we might miss one if change
|
3452 |
-
// happens amids the pending invocation.
|
3453 |
-
trailingCall = true;
|
3454 |
-
}
|
3455 |
-
else {
|
3456 |
-
leadingCall = true;
|
3457 |
-
trailingCall = false;
|
3458 |
-
setTimeout(timeoutCallback, delay);
|
3459 |
-
}
|
3460 |
-
lastCallTime = timeStamp;
|
3461 |
-
}
|
3462 |
-
return proxy;
|
3463 |
-
}
|
3464 |
-
|
3465 |
-
// Minimum delay before invoking the update of observers.
|
3466 |
-
var REFRESH_DELAY = 20;
|
3467 |
-
// A list of substrings of CSS properties used to find transition events that
|
3468 |
-
// might affect dimensions of observed elements.
|
3469 |
-
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
3470 |
-
// Check if MutationObserver is available.
|
3471 |
-
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
3472 |
-
/**
|
3473 |
-
* Singleton controller class which handles updates of ResizeObserver instances.
|
3474 |
-
*/
|
3475 |
-
var ResizeObserverController = /** @class */ (function () {
|
3476 |
-
/**
|
3477 |
-
* Creates a new instance of ResizeObserverController.
|
3478 |
-
*
|
3479 |
-
* @private
|
3480 |
-
*/
|
3481 |
-
function ResizeObserverController() {
|
3482 |
-
/**
|
3483 |
-
* Indicates whether DOM listeners have been added.
|
3484 |
-
*
|
3485 |
-
* @private {boolean}
|
3486 |
-
*/
|
3487 |
-
this.connected_ = false;
|
3488 |
-
/**
|
3489 |
-
* Tells that controller has subscribed for Mutation Events.
|
3490 |
-
*
|
3491 |
-
* @private {boolean}
|
3492 |
-
*/
|
3493 |
-
this.mutationEventsAdded_ = false;
|
3494 |
-
/**
|
3495 |
-
* Keeps reference to the instance of MutationObserver.
|
3496 |
-
*
|
3497 |
-
* @private {MutationObserver}
|
3498 |
-
*/
|
3499 |
-
this.mutationsObserver_ = null;
|
3500 |
-
/**
|
3501 |
-
* A list of connected observers.
|
3502 |
-
*
|
3503 |
-
* @private {Array<ResizeObserverSPI>}
|
3504 |
-
*/
|
3505 |
-
this.observers_ = [];
|
3506 |
-
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
3507 |
-
this.refresh = throttle$1(this.refresh.bind(this), REFRESH_DELAY);
|
3508 |
-
}
|
3509 |
-
/**
|
3510 |
-
* Adds observer to observers list.
|
3511 |
-
*
|
3512 |
-
* @param {ResizeObserverSPI} observer - Observer to be added.
|
3513 |
-
* @returns {void}
|
3514 |
-
*/
|
3515 |
-
ResizeObserverController.prototype.addObserver = function (observer) {
|
3516 |
-
if (!~this.observers_.indexOf(observer)) {
|
3517 |
-
this.observers_.push(observer);
|
3518 |
-
}
|
3519 |
-
// Add listeners if they haven't been added yet.
|
3520 |
-
if (!this.connected_) {
|
3521 |
-
this.connect_();
|
3522 |
-
}
|
3523 |
-
};
|
3524 |
-
/**
|
3525 |
-
* Removes observer from observers list.
|
3526 |
-
*
|
3527 |
-
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
3528 |
-
* @returns {void}
|
3529 |
-
*/
|
3530 |
-
ResizeObserverController.prototype.removeObserver = function (observer) {
|
3531 |
-
var observers = this.observers_;
|
3532 |
-
var index = observers.indexOf(observer);
|
3533 |
-
// Remove observer if it's present in registry.
|
3534 |
-
if (~index) {
|
3535 |
-
observers.splice(index, 1);
|
3536 |
-
}
|
3537 |
-
// Remove listeners if controller has no connected observers.
|
3538 |
-
if (!observers.length && this.connected_) {
|
3539 |
-
this.disconnect_();
|
3540 |
-
}
|
3541 |
-
};
|
3542 |
-
/**
|
3543 |
-
* Invokes the update of observers. It will continue running updates insofar
|
3544 |
-
* it detects changes.
|
3545 |
-
*
|
3546 |
-
* @returns {void}
|
3547 |
-
*/
|
3548 |
-
ResizeObserverController.prototype.refresh = function () {
|
3549 |
-
var changesDetected = this.updateObservers_();
|
3550 |
-
// Continue running updates if changes have been detected as there might
|
3551 |
-
// be future ones caused by CSS transitions.
|
3552 |
-
if (changesDetected) {
|
3553 |
-
this.refresh();
|
3554 |
-
}
|
3555 |
-
};
|
3556 |
-
/**
|
3557 |
-
* Updates every observer from observers list and notifies them of queued
|
3558 |
-
* entries.
|
3559 |
-
*
|
3560 |
-
* @private
|
3561 |
-
* @returns {boolean} Returns "true" if any observer has detected changes in
|
3562 |
-
* dimensions of it's elements.
|
3563 |
-
*/
|
3564 |
-
ResizeObserverController.prototype.updateObservers_ = function () {
|
3565 |
-
// Collect observers that have active observations.
|
3566 |
-
var activeObservers = this.observers_.filter(function (observer) {
|
3567 |
-
return observer.gatherActive(), observer.hasActive();
|
3568 |
-
});
|
3569 |
-
// Deliver notifications in a separate cycle in order to avoid any
|
3570 |
-
// collisions between observers, e.g. when multiple instances of
|
3571 |
-
// ResizeObserver are tracking the same element and the callback of one
|
3572 |
-
// of them changes content dimensions of the observed target. Sometimes
|
3573 |
-
// this may result in notifications being blocked for the rest of observers.
|
3574 |
-
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
3575 |
-
return activeObservers.length > 0;
|
3576 |
-
};
|
3577 |
-
/**
|
3578 |
-
* Initializes DOM listeners.
|
3579 |
-
*
|
3580 |
-
* @private
|
3581 |
-
* @returns {void}
|
3582 |
-
*/
|
3583 |
-
ResizeObserverController.prototype.connect_ = function () {
|
3584 |
-
// Do nothing if running in a non-browser environment or if listeners
|
3585 |
-
// have been already added.
|
3586 |
-
if (!isBrowser || this.connected_) {
|
3587 |
-
return;
|
3588 |
-
}
|
3589 |
-
// Subscription to the "Transitionend" event is used as a workaround for
|
3590 |
-
// delayed transitions. This way it's possible to capture at least the
|
3591 |
-
// final state of an element.
|
3592 |
-
document.addEventListener('transitionend', this.onTransitionEnd_);
|
3593 |
-
window.addEventListener('resize', this.refresh);
|
3594 |
-
if (mutationObserverSupported) {
|
3595 |
-
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
3596 |
-
this.mutationsObserver_.observe(document, {
|
3597 |
-
attributes: true,
|
3598 |
-
childList: true,
|
3599 |
-
characterData: true,
|
3600 |
-
subtree: true
|
3601 |
-
});
|
3602 |
-
}
|
3603 |
-
else {
|
3604 |
-
document.addEventListener('DOMSubtreeModified', this.refresh);
|
3605 |
-
this.mutationEventsAdded_ = true;
|
3606 |
-
}
|
3607 |
-
this.connected_ = true;
|
3608 |
-
};
|
3609 |
-
/**
|
3610 |
-
* Removes DOM listeners.
|
3611 |
-
*
|
3612 |
-
* @private
|
3613 |
-
* @returns {void}
|
3614 |
-
*/
|
3615 |
-
ResizeObserverController.prototype.disconnect_ = function () {
|
3616 |
-
// Do nothing if running in a non-browser environment or if listeners
|
3617 |
-
// have been already removed.
|
3618 |
-
if (!isBrowser || !this.connected_) {
|
3619 |
-
return;
|
3620 |
-
}
|
3621 |
-
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
3622 |
-
window.removeEventListener('resize', this.refresh);
|
3623 |
-
if (this.mutationsObserver_) {
|
3624 |
-
this.mutationsObserver_.disconnect();
|
3625 |
-
}
|
3626 |
-
if (this.mutationEventsAdded_) {
|
3627 |
-
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
3628 |
-
}
|
3629 |
-
this.mutationsObserver_ = null;
|
3630 |
-
this.mutationEventsAdded_ = false;
|
3631 |
-
this.connected_ = false;
|
3632 |
-
};
|
3633 |
-
/**
|
3634 |
-
* "Transitionend" event handler.
|
3635 |
-
*
|
3636 |
-
* @private
|
3637 |
-
* @param {TransitionEvent} event
|
3638 |
-
* @returns {void}
|
3639 |
-
*/
|
3640 |
-
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
3641 |
-
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
3642 |
-
// Detect whether transition may affect dimensions of an element.
|
3643 |
-
var isReflowProperty = transitionKeys.some(function (key) {
|
3644 |
-
return !!~propertyName.indexOf(key);
|
3645 |
-
});
|
3646 |
-
if (isReflowProperty) {
|
3647 |
-
this.refresh();
|
3648 |
-
}
|
3649 |
-
};
|
3650 |
-
/**
|
3651 |
-
* Returns instance of the ResizeObserverController.
|
3652 |
-
*
|
3653 |
-
* @returns {ResizeObserverController}
|
3654 |
-
*/
|
3655 |
-
ResizeObserverController.getInstance = function () {
|
3656 |
-
if (!this.instance_) {
|
3657 |
-
this.instance_ = new ResizeObserverController();
|
3658 |
-
}
|
3659 |
-
return this.instance_;
|
3660 |
-
};
|
3661 |
-
/**
|
3662 |
-
* Holds reference to the controller's instance.
|
3663 |
-
*
|
3664 |
-
* @private {ResizeObserverController}
|
3665 |
-
*/
|
3666 |
-
ResizeObserverController.instance_ = null;
|
3667 |
-
return ResizeObserverController;
|
3668 |
-
}());
|
3669 |
-
|
3670 |
-
/**
|
3671 |
-
* Defines non-writable/enumerable properties of the provided target object.
|
3672 |
-
*
|
3673 |
-
* @param {Object} target - Object for which to define properties.
|
3674 |
-
* @param {Object} props - Properties to be defined.
|
3675 |
-
* @returns {Object} Target object.
|
3676 |
-
*/
|
3677 |
-
var defineConfigurable = (function (target, props) {
|
3678 |
-
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
3679 |
-
var key = _a[_i];
|
3680 |
-
Object.defineProperty(target, key, {
|
3681 |
-
value: props[key],
|
3682 |
-
enumerable: false,
|
3683 |
-
writable: false,
|
3684 |
-
configurable: true
|
3685 |
-
});
|
3686 |
-
}
|
3687 |
-
return target;
|
3688 |
-
});
|
3689 |
-
|
3690 |
-
/**
|
3691 |
-
* Returns the global object associated with provided element.
|
3692 |
-
*
|
3693 |
-
* @param {Object} target
|
3694 |
-
* @returns {Object}
|
3695 |
-
*/
|
3696 |
-
var getWindowOf = (function (target) {
|
3697 |
-
// Assume that the element is an instance of Node, which means that it
|
3698 |
-
// has the "ownerDocument" property from which we can retrieve a
|
3699 |
-
// corresponding global object.
|
3700 |
-
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
3701 |
-
// Return the local global object if it's not possible extract one from
|
3702 |
-
// provided element.
|
3703 |
-
return ownerGlobal || global$1;
|
3704 |
-
});
|
3705 |
-
|
3706 |
-
// Placeholder of an empty content rectangle.
|
3707 |
-
var emptyRect = createRectInit(0, 0, 0, 0);
|
3708 |
-
/**
|
3709 |
-
* Converts provided string to a number.
|
3710 |
-
*
|
3711 |
-
* @param {number|string} value
|
3712 |
-
* @returns {number}
|
3713 |
-
*/
|
3714 |
-
function toFloat(value) {
|
3715 |
-
return parseFloat(value) || 0;
|
3716 |
-
}
|
3717 |
-
/**
|
3718 |
-
* Extracts borders size from provided styles.
|
3719 |
-
*
|
3720 |
-
* @param {CSSStyleDeclaration} styles
|
3721 |
-
* @param {...string} positions - Borders positions (top, right, ...)
|
3722 |
-
* @returns {number}
|
3723 |
-
*/
|
3724 |
-
function getBordersSize(styles) {
|
3725 |
-
var positions = [];
|
3726 |
-
for (var _i = 1; _i < arguments.length; _i++) {
|
3727 |
-
positions[_i - 1] = arguments[_i];
|
3728 |
-
}
|
3729 |
-
return positions.reduce(function (size, position) {
|
3730 |
-
var value = styles['border-' + position + '-width'];
|
3731 |
-
return size + toFloat(value);
|
3732 |
-
}, 0);
|
3733 |
-
}
|
3734 |
-
/**
|
3735 |
-
* Extracts paddings sizes from provided styles.
|
3736 |
-
*
|
3737 |
-
* @param {CSSStyleDeclaration} styles
|
3738 |
-
* @returns {Object} Paddings box.
|
3739 |
-
*/
|
3740 |
-
function getPaddings(styles) {
|
3741 |
-
var positions = ['top', 'right', 'bottom', 'left'];
|
3742 |
-
var paddings = {};
|
3743 |
-
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
3744 |
-
var position = positions_1[_i];
|
3745 |
-
var value = styles['padding-' + position];
|
3746 |
-
paddings[position] = toFloat(value);
|
3747 |
-
}
|
3748 |
-
return paddings;
|
3749 |
-
}
|
3750 |
-
/**
|
3751 |
-
* Calculates content rectangle of provided SVG element.
|
3752 |
-
*
|
3753 |
-
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
3754 |
-
* to be calculated.
|
3755 |
-
* @returns {DOMRectInit}
|
3756 |
-
*/
|
3757 |
-
function getSVGContentRect(target) {
|
3758 |
-
var bbox = target.getBBox();
|
3759 |
-
return createRectInit(0, 0, bbox.width, bbox.height);
|
3760 |
-
}
|
3761 |
-
/**
|
3762 |
-
* Calculates content rectangle of provided HTMLElement.
|
3763 |
-
*
|
3764 |
-
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
3765 |
-
* @returns {DOMRectInit}
|
3766 |
-
*/
|
3767 |
-
function getHTMLElementContentRect(target) {
|
3768 |
-
// Client width & height properties can't be
|
3769 |
-
// used exclusively as they provide rounded values.
|
3770 |
-
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
3771 |
-
// By this condition we can catch all non-replaced inline, hidden and
|
3772 |
-
// detached elements. Though elements with width & height properties less
|
3773 |
-
// than 0.5 will be discarded as well.
|
3774 |
-
//
|
3775 |
-
// Without it we would need to implement separate methods for each of
|
3776 |
-
// those cases and it's not possible to perform a precise and performance
|
3777 |
-
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
3778 |
-
// gives wrong results for elements with width & height less than 0.5.
|
3779 |
-
if (!clientWidth && !clientHeight) {
|
3780 |
-
return emptyRect;
|
3781 |
-
}
|
3782 |
-
var styles = getWindowOf(target).getComputedStyle(target);
|
3783 |
-
var paddings = getPaddings(styles);
|
3784 |
-
var horizPad = paddings.left + paddings.right;
|
3785 |
-
var vertPad = paddings.top + paddings.bottom;
|
3786 |
-
// Computed styles of width & height are being used because they are the
|
3787 |
-
// only dimensions available to JS that contain non-rounded values. It could
|
3788 |
-
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
3789 |
-
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
3790 |
-
var width = toFloat(styles.width), height = toFloat(styles.height);
|
3791 |
-
// Width & height include paddings and borders when the 'border-box' box
|
3792 |
-
// model is applied (except for IE).
|
3793 |
-
if (styles.boxSizing === 'border-box') {
|
3794 |
-
// Following conditions are required to handle Internet Explorer which
|
3795 |
-
// doesn't include paddings and borders to computed CSS dimensions.
|
3796 |
-
//
|
3797 |
-
// We can say that if CSS dimensions + paddings are equal to the "client"
|
3798 |
-
// properties then it's either IE, and thus we don't need to subtract
|
3799 |
-
// anything, or an element merely doesn't have paddings/borders styles.
|
3800 |
-
if (Math.round(width + horizPad) !== clientWidth) {
|
3801 |
-
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
3802 |
-
}
|
3803 |
-
if (Math.round(height + vertPad) !== clientHeight) {
|
3804 |
-
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
3805 |
-
}
|
3806 |
-
}
|
3807 |
-
// Following steps can't be applied to the document's root element as its
|
3808 |
-
// client[Width/Height] properties represent viewport area of the window.
|
3809 |
-
// Besides, it's as well not necessary as the <html> itself neither has
|
3810 |
-
// rendered scroll bars nor it can be clipped.
|
3811 |
-
if (!isDocumentElement(target)) {
|
3812 |
-
// In some browsers (only in Firefox, actually) CSS width & height
|
3813 |
-
// include scroll bars size which can be removed at this step as scroll
|
3814 |
-
// bars are the only difference between rounded dimensions + paddings
|
3815 |
-
// and "client" properties, though that is not always true in Chrome.
|
3816 |
-
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
3817 |
-
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
3818 |
-
// Chrome has a rather weird rounding of "client" properties.
|
3819 |
-
// E.g. for an element with content width of 314.2px it sometimes gives
|
3820 |
-
// the client width of 315px and for the width of 314.7px it may give
|
3821 |
-
// 314px. And it doesn't happen all the time. So just ignore this delta
|
3822 |
-
// as a non-relevant.
|
3823 |
-
if (Math.abs(vertScrollbar) !== 1) {
|
3824 |
-
width -= vertScrollbar;
|
3825 |
-
}
|
3826 |
-
if (Math.abs(horizScrollbar) !== 1) {
|
3827 |
-
height -= horizScrollbar;
|
3828 |
-
}
|
3829 |
-
}
|
3830 |
-
return createRectInit(paddings.left, paddings.top, width, height);
|
3831 |
-
}
|
3832 |
-
/**
|
3833 |
-
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
3834 |
-
*
|
3835 |
-
* @param {Element} target - Element to be checked.
|
3836 |
-
* @returns {boolean}
|
3837 |
-
*/
|
3838 |
-
var isSVGGraphicsElement = (function () {
|
3839 |
-
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
3840 |
-
// interface.
|
3841 |
-
if (typeof SVGGraphicsElement !== 'undefined') {
|
3842 |
-
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
3843 |
-
}
|
3844 |
-
// If it's so, then check that element is at least an instance of the
|
3845 |
-
// SVGElement and that it has the "getBBox" method.
|
3846 |
-
// eslint-disable-next-line no-extra-parens
|
3847 |
-
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
3848 |
-
typeof target.getBBox === 'function'); };
|
3849 |
-
})();
|
3850 |
-
/**
|
3851 |
-
* Checks whether provided element is a document element (<html>).
|
3852 |
-
*
|
3853 |
-
* @param {Element} target - Element to be checked.
|
3854 |
-
* @returns {boolean}
|
3855 |
-
*/
|
3856 |
-
function isDocumentElement(target) {
|
3857 |
-
return target === getWindowOf(target).document.documentElement;
|
3858 |
-
}
|
3859 |
-
/**
|
3860 |
-
* Calculates an appropriate content rectangle for provided html or svg element.
|
3861 |
-
*
|
3862 |
-
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
3863 |
-
* @returns {DOMRectInit}
|
3864 |
-
*/
|
3865 |
-
function getContentRect(target) {
|
3866 |
-
if (!isBrowser) {
|
3867 |
-
return emptyRect;
|
3868 |
-
}
|
3869 |
-
if (isSVGGraphicsElement(target)) {
|
3870 |
-
return getSVGContentRect(target);
|
3871 |
-
}
|
3872 |
-
return getHTMLElementContentRect(target);
|
3873 |
-
}
|
3874 |
-
/**
|
3875 |
-
* Creates rectangle with an interface of the DOMRectReadOnly.
|
3876 |
-
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
3877 |
-
*
|
3878 |
-
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
3879 |
-
* @returns {DOMRectReadOnly}
|
3880 |
-
*/
|
3881 |
-
function createReadOnlyRect(_a) {
|
3882 |
-
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
3883 |
-
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
3884 |
-
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
3885 |
-
var rect = Object.create(Constr.prototype);
|
3886 |
-
// Rectangle's properties are not writable and non-enumerable.
|
3887 |
-
defineConfigurable(rect, {
|
3888 |
-
x: x, y: y, width: width, height: height,
|
3889 |
-
top: y,
|
3890 |
-
right: x + width,
|
3891 |
-
bottom: height + y,
|
3892 |
-
left: x
|
3893 |
-
});
|
3894 |
-
return rect;
|
3895 |
-
}
|
3896 |
-
/**
|
3897 |
-
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
3898 |
-
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
3899 |
-
*
|
3900 |
-
* @param {number} x - X coordinate.
|
3901 |
-
* @param {number} y - Y coordinate.
|
3902 |
-
* @param {number} width - Rectangle's width.
|
3903 |
-
* @param {number} height - Rectangle's height.
|
3904 |
-
* @returns {DOMRectInit}
|
3905 |
-
*/
|
3906 |
-
function createRectInit(x, y, width, height) {
|
3907 |
-
return { x: x, y: y, width: width, height: height };
|
3908 |
-
}
|
3909 |
-
|
3910 |
-
/**
|
3911 |
-
* Class that is responsible for computations of the content rectangle of
|
3912 |
-
* provided DOM element and for keeping track of it's changes.
|
3913 |
-
*/
|
3914 |
-
var ResizeObservation = /** @class */ (function () {
|
3915 |
-
/**
|
3916 |
-
* Creates an instance of ResizeObservation.
|
3917 |
-
*
|
3918 |
-
* @param {Element} target - Element to be observed.
|
3919 |
-
*/
|
3920 |
-
function ResizeObservation(target) {
|
3921 |
-
/**
|
3922 |
-
* Broadcasted width of content rectangle.
|
3923 |
-
*
|
3924 |
-
* @type {number}
|
3925 |
-
*/
|
3926 |
-
this.broadcastWidth = 0;
|
3927 |
-
/**
|
3928 |
-
* Broadcasted height of content rectangle.
|
3929 |
-
*
|
3930 |
-
* @type {number}
|
3931 |
-
*/
|
3932 |
-
this.broadcastHeight = 0;
|
3933 |
-
/**
|
3934 |
-
* Reference to the last observed content rectangle.
|
3935 |
-
*
|
3936 |
-
* @private {DOMRectInit}
|
3937 |
-
*/
|
3938 |
-
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
3939 |
-
this.target = target;
|
3940 |
-
}
|
3941 |
-
/**
|
3942 |
-
* Updates content rectangle and tells whether it's width or height properties
|
3943 |
-
* have changed since the last broadcast.
|
3944 |
-
*
|
3945 |
-
* @returns {boolean}
|
3946 |
-
*/
|
3947 |
-
ResizeObservation.prototype.isActive = function () {
|
3948 |
-
var rect = getContentRect(this.target);
|
3949 |
-
this.contentRect_ = rect;
|
3950 |
-
return (rect.width !== this.broadcastWidth ||
|
3951 |
-
rect.height !== this.broadcastHeight);
|
3952 |
-
};
|
3953 |
-
/**
|
3954 |
-
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
3955 |
-
* from the corresponding properties of the last observed content rectangle.
|
3956 |
-
*
|
3957 |
-
* @returns {DOMRectInit} Last observed content rectangle.
|
3958 |
-
*/
|
3959 |
-
ResizeObservation.prototype.broadcastRect = function () {
|
3960 |
-
var rect = this.contentRect_;
|
3961 |
-
this.broadcastWidth = rect.width;
|
3962 |
-
this.broadcastHeight = rect.height;
|
3963 |
-
return rect;
|
3964 |
-
};
|
3965 |
-
return ResizeObservation;
|
3966 |
-
}());
|
3967 |
-
|
3968 |
-
var ResizeObserverEntry = /** @class */ (function () {
|
3969 |
-
/**
|
3970 |
-
* Creates an instance of ResizeObserverEntry.
|
3971 |
-
*
|
3972 |
-
* @param {Element} target - Element that is being observed.
|
3973 |
-
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
3974 |
-
*/
|
3975 |
-
function ResizeObserverEntry(target, rectInit) {
|
3976 |
-
var contentRect = createReadOnlyRect(rectInit);
|
3977 |
-
// According to the specification following properties are not writable
|
3978 |
-
// and are also not enumerable in the native implementation.
|
3979 |
-
//
|
3980 |
-
// Property accessors are not being used as they'd require to define a
|
3981 |
-
// private WeakMap storage which may cause memory leaks in browsers that
|
3982 |
-
// don't support this type of collections.
|
3983 |
-
defineConfigurable(this, { target: target, contentRect: contentRect });
|
3984 |
-
}
|
3985 |
-
return ResizeObserverEntry;
|
3986 |
-
}());
|
3987 |
-
|
3988 |
-
var ResizeObserverSPI = /** @class */ (function () {
|
3989 |
-
/**
|
3990 |
-
* Creates a new instance of ResizeObserver.
|
3991 |
-
*
|
3992 |
-
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
3993 |
-
* when one of the observed elements changes it's content dimensions.
|
3994 |
-
* @param {ResizeObserverController} controller - Controller instance which
|
3995 |
-
* is responsible for the updates of observer.
|
3996 |
-
* @param {ResizeObserver} callbackCtx - Reference to the public
|
3997 |
-
* ResizeObserver instance which will be passed to callback function.
|
3998 |
-
*/
|
3999 |
-
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
4000 |
-
/**
|
4001 |
-
* Collection of resize observations that have detected changes in dimensions
|
4002 |
-
* of elements.
|
4003 |
-
*
|
4004 |
-
* @private {Array<ResizeObservation>}
|
4005 |
-
*/
|
4006 |
-
this.activeObservations_ = [];
|
4007 |
-
/**
|
4008 |
-
* Registry of the ResizeObservation instances.
|
4009 |
-
*
|
4010 |
-
* @private {Map<Element, ResizeObservation>}
|
4011 |
-
*/
|
4012 |
-
this.observations_ = new MapShim();
|
4013 |
-
if (typeof callback !== 'function') {
|
4014 |
-
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
4015 |
-
}
|
4016 |
-
this.callback_ = callback;
|
4017 |
-
this.controller_ = controller;
|
4018 |
-
this.callbackCtx_ = callbackCtx;
|
4019 |
-
}
|
4020 |
-
/**
|
4021 |
-
* Starts observing provided element.
|
4022 |
-
*
|
4023 |
-
* @param {Element} target - Element to be observed.
|
4024 |
-
* @returns {void}
|
4025 |
-
*/
|
4026 |
-
ResizeObserverSPI.prototype.observe = function (target) {
|
4027 |
-
if (!arguments.length) {
|
4028 |
-
throw new TypeError('1 argument required, but only 0 present.');
|
4029 |
-
}
|
4030 |
-
// Do nothing if current environment doesn't have the Element interface.
|
4031 |
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
4032 |
-
return;
|
4033 |
-
}
|
4034 |
-
if (!(target instanceof getWindowOf(target).Element)) {
|
4035 |
-
throw new TypeError('parameter 1 is not of type "Element".');
|
4036 |
-
}
|
4037 |
-
var observations = this.observations_;
|
4038 |
-
// Do nothing if element is already being observed.
|
4039 |
-
if (observations.has(target)) {
|
4040 |
-
return;
|
4041 |
-
}
|
4042 |
-
observations.set(target, new ResizeObservation(target));
|
4043 |
-
this.controller_.addObserver(this);
|
4044 |
-
// Force the update of observations.
|
4045 |
-
this.controller_.refresh();
|
4046 |
-
};
|
4047 |
-
/**
|
4048 |
-
* Stops observing provided element.
|
4049 |
-
*
|
4050 |
-
* @param {Element} target - Element to stop observing.
|
4051 |
-
* @returns {void}
|
4052 |
-
*/
|
4053 |
-
ResizeObserverSPI.prototype.unobserve = function (target) {
|
4054 |
-
if (!arguments.length) {
|
4055 |
-
throw new TypeError('1 argument required, but only 0 present.');
|
4056 |
-
}
|
4057 |
-
// Do nothing if current environment doesn't have the Element interface.
|
4058 |
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
4059 |
-
return;
|
4060 |
-
}
|
4061 |
-
if (!(target instanceof getWindowOf(target).Element)) {
|
4062 |
-
throw new TypeError('parameter 1 is not of type "Element".');
|
4063 |
-
}
|
4064 |
-
var observations = this.observations_;
|
4065 |
-
// Do nothing if element is not being observed.
|
4066 |
-
if (!observations.has(target)) {
|
4067 |
-
return;
|
4068 |
-
}
|
4069 |
-
observations.delete(target);
|
4070 |
-
if (!observations.size) {
|
4071 |
-
this.controller_.removeObserver(this);
|
4072 |
-
}
|
4073 |
-
};
|
4074 |
-
/**
|
4075 |
-
* Stops observing all elements.
|
4076 |
-
*
|
4077 |
-
* @returns {void}
|
4078 |
-
*/
|
4079 |
-
ResizeObserverSPI.prototype.disconnect = function () {
|
4080 |
-
this.clearActive();
|
4081 |
-
this.observations_.clear();
|
4082 |
-
this.controller_.removeObserver(this);
|
4083 |
-
};
|
4084 |
-
/**
|
4085 |
-
* Collects observation instances the associated element of which has changed
|
4086 |
-
* it's content rectangle.
|
4087 |
-
*
|
4088 |
-
* @returns {void}
|
4089 |
-
*/
|
4090 |
-
ResizeObserverSPI.prototype.gatherActive = function () {
|
4091 |
-
var _this = this;
|
4092 |
-
this.clearActive();
|
4093 |
-
this.observations_.forEach(function (observation) {
|
4094 |
-
if (observation.isActive()) {
|
4095 |
-
_this.activeObservations_.push(observation);
|
4096 |
-
}
|
4097 |
-
});
|
4098 |
-
};
|
4099 |
-
/**
|
4100 |
-
* Invokes initial callback function with a list of ResizeObserverEntry
|
4101 |
-
* instances collected from active resize observations.
|
4102 |
-
*
|
4103 |
-
* @returns {void}
|
4104 |
-
*/
|
4105 |
-
ResizeObserverSPI.prototype.broadcastActive = function () {
|
4106 |
-
// Do nothing if observer doesn't have active observations.
|
4107 |
-
if (!this.hasActive()) {
|
4108 |
-
return;
|
4109 |
-
}
|
4110 |
-
var ctx = this.callbackCtx_;
|
4111 |
-
// Create ResizeObserverEntry instance for every active observation.
|
4112 |
-
var entries = this.activeObservations_.map(function (observation) {
|
4113 |
-
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
4114 |
-
});
|
4115 |
-
this.callback_.call(ctx, entries, ctx);
|
4116 |
-
this.clearActive();
|
4117 |
-
};
|
4118 |
-
/**
|
4119 |
-
* Clears the collection of active observations.
|
4120 |
-
*
|
4121 |
-
* @returns {void}
|
4122 |
-
*/
|
4123 |
-
ResizeObserverSPI.prototype.clearActive = function () {
|
4124 |
-
this.activeObservations_.splice(0);
|
4125 |
-
};
|
4126 |
-
/**
|
4127 |
-
* Tells whether observer has active observations.
|
4128 |
-
*
|
4129 |
-
* @returns {boolean}
|
4130 |
-
*/
|
4131 |
-
ResizeObserverSPI.prototype.hasActive = function () {
|
4132 |
-
return this.activeObservations_.length > 0;
|
4133 |
-
};
|
4134 |
-
return ResizeObserverSPI;
|
4135 |
-
}());
|
4136 |
-
|
4137 |
-
// Registry of internal observers. If WeakMap is not available use current shim
|
4138 |
-
// for the Map collection as it has all required methods and because WeakMap
|
4139 |
-
// can't be fully polyfilled anyway.
|
4140 |
-
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
4141 |
-
/**
|
4142 |
-
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
4143 |
-
* exposing only those methods and properties that are defined in the spec.
|
4144 |
-
*/
|
4145 |
-
var ResizeObserver = /** @class */ (function () {
|
4146 |
-
/**
|
4147 |
-
* Creates a new instance of ResizeObserver.
|
4148 |
-
*
|
4149 |
-
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
4150 |
-
* dimensions of the observed elements change.
|
4151 |
-
*/
|
4152 |
-
function ResizeObserver(callback) {
|
4153 |
-
if (!(this instanceof ResizeObserver)) {
|
4154 |
-
throw new TypeError('Cannot call a class as a function.');
|
4155 |
-
}
|
4156 |
-
if (!arguments.length) {
|
4157 |
-
throw new TypeError('1 argument required, but only 0 present.');
|
4158 |
-
}
|
4159 |
-
var controller = ResizeObserverController.getInstance();
|
4160 |
-
var observer = new ResizeObserverSPI(callback, controller, this);
|
4161 |
-
observers.set(this, observer);
|
4162 |
-
}
|
4163 |
-
return ResizeObserver;
|
4164 |
-
}());
|
4165 |
-
// Expose public methods of ResizeObserver.
|
4166 |
-
[
|
4167 |
-
'observe',
|
4168 |
-
'unobserve',
|
4169 |
-
'disconnect'
|
4170 |
-
].forEach(function (method) {
|
4171 |
-
ResizeObserver.prototype[method] = function () {
|
4172 |
-
var _a;
|
4173 |
-
return (_a = observers.get(this))[method].apply(_a, arguments);
|
4174 |
-
};
|
4175 |
-
});
|
4176 |
-
|
4177 |
-
var index = (function () {
|
4178 |
-
// Export existing implementation if available.
|
4179 |
-
if (typeof global$1.ResizeObserver !== 'undefined') {
|
4180 |
-
return global$1.ResizeObserver;
|
4181 |
-
}
|
4182 |
-
return ResizeObserver;
|
4183 |
-
})();
|
4184 |
-
|
4185 |
-
var cachedScrollbarWidth = null;
|
4186 |
-
var cachedDevicePixelRatio = null;
|
4187 |
-
|
4188 |
-
if (canUseDom) {
|
4189 |
-
window.addEventListener('resize', function () {
|
4190 |
-
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
|
4191 |
-
cachedDevicePixelRatio = window.devicePixelRatio;
|
4192 |
-
cachedScrollbarWidth = null;
|
4193 |
-
}
|
4194 |
-
});
|
4195 |
-
}
|
4196 |
-
|
4197 |
-
function scrollbarWidth() {
|
4198 |
-
if (cachedScrollbarWidth === null) {
|
4199 |
-
if (typeof document === 'undefined') {
|
4200 |
-
cachedScrollbarWidth = 0;
|
4201 |
-
return cachedScrollbarWidth;
|
4202 |
-
}
|
4203 |
-
|
4204 |
-
var body = document.body;
|
4205 |
-
var box = document.createElement('div');
|
4206 |
-
box.classList.add('asl_simplebar-hide-scrollbar');
|
4207 |
-
body.appendChild(box);
|
4208 |
-
var width = box.getBoundingClientRect().right;
|
4209 |
-
body.removeChild(box);
|
4210 |
-
cachedScrollbarWidth = width;
|
4211 |
-
}
|
4212 |
-
|
4213 |
-
return cachedScrollbarWidth;
|
4214 |
-
}
|
4215 |
-
|
4216 |
-
var asl_SimpleBar =
|
4217 |
-
/*#__PURE__*/
|
4218 |
-
function () {
|
4219 |
-
function asl_SimpleBar(element, options) {
|
4220 |
-
var _this = this;
|
4221 |
-
|
4222 |
-
this.onScroll = function () {
|
4223 |
-
if (!_this.scrollXTicking) {
|
4224 |
-
window.requestAnimationFrame(_this.scrollX);
|
4225 |
-
_this.scrollXTicking = true;
|
4226 |
-
}
|
4227 |
-
|
4228 |
-
if (!_this.scrollYTicking) {
|
4229 |
-
window.requestAnimationFrame(_this.scrollY);
|
4230 |
-
_this.scrollYTicking = true;
|
4231 |
-
}
|
4232 |
-
};
|
4233 |
-
|
4234 |
-
this.scrollX = function () {
|
4235 |
-
if (_this.axis.x.isOverflowing) {
|
4236 |
-
_this.showScrollbar('x');
|
4237 |
-
|
4238 |
-
_this.positionScrollbar('x');
|
4239 |
-
}
|
4240 |
-
|
4241 |
-
_this.scrollXTicking = false;
|
4242 |
-
};
|
4243 |
-
|
4244 |
-
this.scrollY = function () {
|
4245 |
-
if (_this.axis.y.isOverflowing) {
|
4246 |
-
_this.showScrollbar('y');
|
4247 |
-
|
4248 |
-
_this.positionScrollbar('y');
|
4249 |
-
}
|
4250 |
-
|
4251 |
-
_this.scrollYTicking = false;
|
4252 |
-
};
|
4253 |
-
|
4254 |
-
this.onMouseEnter = function () {
|
4255 |
-
_this.showScrollbar('x');
|
4256 |
-
|
4257 |
-
_this.showScrollbar('y');
|
4258 |
-
};
|
4259 |
-
|
4260 |
-
this.onMouseMove = function (e) {
|
4261 |
-
_this.mouseX = e.clientX;
|
4262 |
-
_this.mouseY = e.clientY;
|
4263 |
-
|
4264 |
-
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
4265 |
-
_this.onMouseMoveForAxis('x');
|
4266 |
-
}
|
4267 |
-
|
4268 |
-
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
4269 |
-
_this.onMouseMoveForAxis('y');
|
4270 |
-
}
|
4271 |
-
};
|
4272 |
-
|
4273 |
-
this.onMouseLeave = function () {
|
4274 |
-
_this.onMouseMove.cancel();
|
4275 |
-
|
4276 |
-
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
4277 |
-
_this.onMouseLeaveForAxis('x');
|
4278 |
-
}
|
4279 |
-
|
4280 |
-
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
4281 |
-
_this.onMouseLeaveForAxis('y');
|
4282 |
-
}
|
4283 |
-
|
4284 |
-
_this.mouseX = -1;
|
4285 |
-
_this.mouseY = -1;
|
4286 |
-
};
|
4287 |
-
|
4288 |
-
this.onWindowResize = function () {
|
4289 |
-
// Recalculate scrollbarWidth in case it's a zoom
|
4290 |
-
_this.scrollbarWidth = _this.getScrollbarWidth();
|
4291 |
-
|
4292 |
-
_this.hideNativeScrollbar();
|
4293 |
-
};
|
4294 |
-
|
4295 |
-
this.hideScrollbars = function () {
|
4296 |
-
_this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
|
4297 |
-
_this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
|
4298 |
-
|
4299 |
-
if (!_this.isWithinBounds(_this.axis.y.track.rect)) {
|
4300 |
-
_this.axis.y.scrollbar.el.classList.remove(_this.classNames.visible);
|
4301 |
-
|
4302 |
-
_this.axis.y.isVisible = false;
|
4303 |
-
}
|
4304 |
-
|
4305 |
-
if (!_this.isWithinBounds(_this.axis.x.track.rect)) {
|
4306 |
-
_this.axis.x.scrollbar.el.classList.remove(_this.classNames.visible);
|
4307 |
-
|
4308 |
-
_this.axis.x.isVisible = false;
|
4309 |
-
}
|
4310 |
-
};
|
4311 |
-
|
4312 |
-
this.onPointerEvent = function (e) {
|
4313 |
-
var isWithinTrackXBounds, isWithinTrackYBounds;
|
4314 |
-
_this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
|
4315 |
-
_this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
|
4316 |
-
|
4317 |
-
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
4318 |
-
isWithinTrackXBounds = _this.isWithinBounds(_this.axis.x.track.rect);
|
4319 |
-
}
|
4320 |
-
|
4321 |
-
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
4322 |
-
isWithinTrackYBounds = _this.isWithinBounds(_this.axis.y.track.rect);
|
4323 |
-
} // If any pointer event is called on the scrollbar
|
4324 |
-
|
4325 |
-
|
4326 |
-
if (isWithinTrackXBounds || isWithinTrackYBounds) {
|
4327 |
-
// Preventing the event's default action stops text being
|
4328 |
-
// selectable during the drag.
|
4329 |
-
e.preventDefault(); // Prevent event leaking
|
4330 |
-
|
4331 |
-
e.stopPropagation();
|
4332 |
-
|
4333 |
-
if (e.type === 'mousedown') {
|
4334 |
-
if (isWithinTrackXBounds) {
|
4335 |
-
_this.axis.x.scrollbar.rect = _this.axis.x.scrollbar.el.getBoundingClientRect();
|
4336 |
-
|
4337 |
-
if (_this.isWithinBounds(_this.axis.x.scrollbar.rect)) {
|
4338 |
-
_this.onDragStart(e, 'x');
|
4339 |
-
} else {
|
4340 |
-
_this.onTrackClick(e, 'x');
|
4341 |
-
}
|
4342 |
-
}
|
4343 |
-
|
4344 |
-
if (isWithinTrackYBounds) {
|
4345 |
-
_this.axis.y.scrollbar.rect = _this.axis.y.scrollbar.el.getBoundingClientRect();
|
4346 |
-
|
4347 |
-
if (_this.isWithinBounds(_this.axis.y.scrollbar.rect)) {
|
4348 |
-
_this.onDragStart(e, 'y');
|
4349 |
-
} else {
|
4350 |
-
_this.onTrackClick(e, 'y');
|
4351 |
-
}
|
4352 |
-
}
|
4353 |
-
}
|
4354 |
-
}
|
4355 |
-
};
|
4356 |
-
|
4357 |
-
this.drag = function (e) {
|
4358 |
-
var eventOffset;
|
4359 |
-
var track = _this.axis[_this.draggedAxis].track;
|
4360 |
-
var trackSize = track.rect[_this.axis[_this.draggedAxis].sizeAttr];
|
4361 |
-
var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
|
4362 |
-
var contentSize = _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollSizeAttr];
|
4363 |
-
var hostSize = parseInt(_this.elStyles[_this.axis[_this.draggedAxis].sizeAttr], 10);
|
4364 |
-
e.preventDefault();
|
4365 |
-
e.stopPropagation();
|
4366 |
-
|
4367 |
-
if (_this.draggedAxis === 'y') {
|
4368 |
-
eventOffset = e.pageY;
|
4369 |
-
} else {
|
4370 |
-
eventOffset = e.pageX;
|
4371 |
-
} // Calculate how far the user's mouse is from the top/left of the scrollbar (minus the dragOffset).
|
4372 |
-
|
4373 |
-
|
4374 |
-
var dragPos = eventOffset - track.rect[_this.axis[_this.draggedAxis].offsetAttr] - _this.axis[_this.draggedAxis].dragOffset; // Convert the mouse position into a percentage of the scrollbar height/width.
|
4375 |
-
|
4376 |
-
var dragPerc = dragPos / (trackSize - scrollbar.size); // Scroll the content by the same percentage.
|
4377 |
-
|
4378 |
-
var scrollPos = dragPerc * (contentSize - hostSize); // Fix browsers inconsistency on RTL
|
4379 |
-
|
4380 |
-
if (_this.draggedAxis === 'x') {
|
4381 |
-
scrollPos = _this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? scrollPos - (trackSize + scrollbar.size) : scrollPos;
|
4382 |
-
scrollPos = _this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollPos : scrollPos;
|
4383 |
-
}
|
4384 |
-
|
4385 |
-
_this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollOffsetAttr] = scrollPos;
|
4386 |
-
};
|
4387 |
-
|
4388 |
-
this.onEndDrag = function (e) {
|
4389 |
-
e.preventDefault();
|
4390 |
-
e.stopPropagation();
|
4391 |
-
|
4392 |
-
_this.el.classList.remove(_this.classNames.dragging);
|
4393 |
-
|
4394 |
-
document.removeEventListener('mousemove', _this.drag, true);
|
4395 |
-
document.removeEventListener('mouseup', _this.onEndDrag, true);
|
4396 |
-
_this.removePreventClickId = window.setTimeout(function () {
|
4397 |
-
// Remove these asynchronously so we still suppress click events
|
4398 |
-
// generated simultaneously with mouseup.
|
4399 |
-
document.removeEventListener('click', _this.preventClick, true);
|
4400 |
-
document.removeEventListener('dblclick', _this.preventClick, true);
|
4401 |
-
_this.removePreventClickId = null;
|
4402 |
-
});
|
4403 |
-
};
|
4404 |
-
|
4405 |
-
this.preventClick = function (e) {
|
4406 |
-
e.preventDefault();
|
4407 |
-
e.stopPropagation();
|
4408 |
-
};
|
4409 |
-
|
4410 |
-
this.el = element;
|
4411 |
-
this.minScrollbarWidth = 20;
|
4412 |
-
this.options = Object.assign({}, asl_SimpleBar.defaultOptions, {}, options);
|
4413 |
-
this.classNames = Object.assign({}, asl_SimpleBar.defaultOptions.classNames, {}, this.options.classNames);
|
4414 |
-
this.axis = {
|
4415 |
-
x: {
|
4416 |
-
scrollOffsetAttr: 'scrollLeft',
|
4417 |
-
sizeAttr: 'width',
|
4418 |
-
scrollSizeAttr: 'scrollWidth',
|
4419 |
-
offsetSizeAttr: 'offsetWidth',
|
4420 |
-
offsetAttr: 'left',
|
4421 |
-
overflowAttr: 'overflowX',
|
4422 |
-
dragOffset: 0,
|
4423 |
-
isOverflowing: true,
|
4424 |
-
isVisible: false,
|
4425 |
-
forceVisible: false,
|
4426 |
-
track: {},
|
4427 |
-
scrollbar: {}
|
4428 |
-
},
|
4429 |
-
y: {
|
4430 |
-
scrollOffsetAttr: 'scrollTop',
|
4431 |
-
sizeAttr: 'height',
|
4432 |
-
scrollSizeAttr: 'scrollHeight',
|
4433 |
-
offsetSizeAttr: 'offsetHeight',
|
4434 |
-
offsetAttr: 'top',
|
4435 |
-
overflowAttr: 'overflowY',
|
4436 |
-
dragOffset: 0,
|
4437 |
-
isOverflowing: true,
|
4438 |
-
isVisible: false,
|
4439 |
-
forceVisible: false,
|
4440 |
-
track: {},
|
4441 |
-
scrollbar: {}
|
4442 |
-
}
|
4443 |
-
};
|
4444 |
-
this.removePreventClickId = null; // Don't re-instantiate over an existing one
|
4445 |
-
|
4446 |
-
if (asl_SimpleBar.instances.has(this.el)) {
|
4447 |
-
return;
|
4448 |
-
}
|
4449 |
-
|
4450 |
-
this.recalculate = lodash_throttle(this.recalculate.bind(this), 64);
|
4451 |
-
this.onMouseMove = lodash_throttle(this.onMouseMove.bind(this), 64);
|
4452 |
-
this.hideScrollbars = lodash_debounce(this.hideScrollbars.bind(this), this.options.timeout);
|
4453 |
-
this.onWindowResize = lodash_debounce(this.onWindowResize.bind(this), 64, {
|
4454 |
-
leading: true
|
4455 |
-
});
|
4456 |
-
asl_SimpleBar.getRtlHelpers = lodash_memoize(asl_SimpleBar.getRtlHelpers);
|
4457 |
-
this.init();
|
4458 |
-
}
|
4459 |
-
/**
|
4460 |
-
* Static properties
|
4461 |
-
*/
|
4462 |
-
|
4463 |
-
/**
|
4464 |
-
* Helper to fix browsers inconsistency on RTL:
|
4465 |
-
* - Firefox inverts the scrollbar initial position
|
4466 |
-
* - IE11 inverts both scrollbar position and scrolling offset
|
4467 |
-
* Directly inspired by @KingSora's OverlayScrollbars https://github.com/KingSora/OverlayScrollbars/blob/master/js/OverlayScrollbars.js#L1634
|
4468 |
-
*/
|
4469 |
-
|
4470 |
-
|
4471 |
-
asl_SimpleBar.getRtlHelpers = function getRtlHelpers() {
|
4472 |
-
var dummyDiv = document.createElement('div');
|
4473 |
-
dummyDiv.innerHTML = '<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';
|
4474 |
-
var scrollbarDummyEl = dummyDiv.firstElementChild;
|
4475 |
-
document.body.appendChild(scrollbarDummyEl);
|
4476 |
-
var dummyContainerChild = scrollbarDummyEl.firstElementChild;
|
4477 |
-
scrollbarDummyEl.scrollLeft = 0;
|
4478 |
-
var dummyContainerOffset = asl_SimpleBar.getOffset(scrollbarDummyEl);
|
4479 |
-
var dummyContainerChildOffset = asl_SimpleBar.getOffset(dummyContainerChild);
|
4480 |
-
scrollbarDummyEl.scrollLeft = 999;
|
4481 |
-
var dummyContainerScrollOffsetAfterScroll = asl_SimpleBar.getOffset(dummyContainerChild);
|
4482 |
-
return {
|
4483 |
-
// determines if the scrolling is responding with negative values
|
4484 |
-
isRtlScrollingInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left && dummyContainerChildOffset.left - dummyContainerScrollOffsetAfterScroll.left !== 0,
|
4485 |
-
// determines if the origin scrollbar position is inverted or not (positioned on left or right)
|
4486 |
-
isRtlScrollbarInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left
|
4487 |
-
};
|
4488 |
-
};
|
4489 |
-
|
4490 |
-
asl_SimpleBar.getOffset = function getOffset(el) {
|
4491 |
-
var rect = el.getBoundingClientRect();
|
4492 |
-
return {
|
4493 |
-
top: rect.top + (window.pageYOffset || document.documentElement.scrollTop),
|
4494 |
-
left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft)
|
4495 |
-
};
|
4496 |
-
};
|
4497 |
-
|
4498 |
-
var _proto = asl_SimpleBar.prototype;
|
4499 |
-
|
4500 |
-
_proto.init = function init() {
|
4501 |
-
// Save a reference to the instance, so we know this DOM node has already been instancied
|
4502 |
-
asl_SimpleBar.instances.set(this.el, this); // We stop here on server-side
|
4503 |
-
|
4504 |
-
if (canUseDom) {
|
4505 |
-
this.initDOM();
|
4506 |
-
this.scrollbarWidth = this.getScrollbarWidth();
|
4507 |
-
this.recalculate();
|
4508 |
-
this.initListeners();
|
4509 |
-
}
|
4510 |
-
};
|
4511 |
-
|
4512 |
-
_proto.initDOM = function initDOM() {
|
4513 |
-
var _this2 = this;
|
4514 |
-
|
4515 |
-
// make sure this element doesn't have the elements yet
|
4516 |
-
if (Array.prototype.filter.call(this.el.children, function (child) {
|
4517 |
-
return child.classList.contains(_this2.classNames.wrapper);
|
4518 |
-
}).length) {
|
4519 |
-
// assume that element has his DOM already initiated
|
4520 |
-
this.wrapperEl = this.el.querySelector("." + this.classNames.wrapper);
|
4521 |
-
this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector("." + this.classNames.contentWrapper);
|
4522 |
-
this.contentEl = this.options.contentNode || this.el.querySelector("." + this.classNames.contentEl);
|
4523 |
-
this.offsetEl = this.el.querySelector("." + this.classNames.offset);
|
4524 |
-
this.maskEl = this.el.querySelector("." + this.classNames.mask);
|
4525 |
-
this.placeholderEl = this.findChild(this.wrapperEl, "." + this.classNames.placeholder);
|
4526 |
-
this.heightAutoObserverWrapperEl = this.el.querySelector("." + this.classNames.heightAutoObserverWrapperEl);
|
4527 |
-
this.heightAutoObserverEl = this.el.querySelector("." + this.classNames.heightAutoObserverEl);
|
4528 |
-
this.axis.x.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.horizontal);
|
4529 |
-
this.axis.y.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.vertical);
|
4530 |
-
} else {
|
4531 |
-
// Prepare DOM
|
4532 |
-
this.wrapperEl = document.createElement('div');
|
4533 |
-
this.contentWrapperEl = document.createElement('div');
|
4534 |
-
this.offsetEl = document.createElement('div');
|
4535 |
-
this.maskEl = document.createElement('div');
|
4536 |
-
this.contentEl = document.createElement('div');
|
4537 |
-
this.placeholderEl = document.createElement('div');
|
4538 |
-
this.heightAutoObserverWrapperEl = document.createElement('div');
|
4539 |
-
this.heightAutoObserverEl = document.createElement('div');
|
4540 |
-
this.wrapperEl.classList.add(this.classNames.wrapper);
|
4541 |
-
this.contentWrapperEl.classList.add(this.classNames.contentWrapper);
|
4542 |
-
this.offsetEl.classList.add(this.classNames.offset);
|
4543 |
-
this.maskEl.classList.add(this.classNames.mask);
|
4544 |
-
this.contentEl.classList.add(this.classNames.contentEl);
|
4545 |
-
this.placeholderEl.classList.add(this.classNames.placeholder);
|
4546 |
-
this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl);
|
4547 |
-
this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);
|
4548 |
-
|
4549 |
-
while (this.el.firstChild) {
|
4550 |
-
this.contentEl.appendChild(this.el.firstChild);
|
4551 |
-
}
|
4552 |
-
|
4553 |
-
this.contentWrapperEl.appendChild(this.contentEl);
|
4554 |
-
this.offsetEl.appendChild(this.contentWrapperEl);
|
4555 |
-
this.maskEl.appendChild(this.offsetEl);
|
4556 |
-
this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);
|
4557 |
-
this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);
|
4558 |
-
this.wrapperEl.appendChild(this.maskEl);
|
4559 |
-
this.wrapperEl.appendChild(this.placeholderEl);
|
4560 |
-
this.el.appendChild(this.wrapperEl);
|
4561 |
-
}
|
4562 |
-
|
4563 |
-
if (!this.axis.x.track.el || !this.axis.y.track.el) {
|
4564 |
-
var track = document.createElement('div');
|
4565 |
-
var scrollbar = document.createElement('div');
|
4566 |
-
track.classList.add(this.classNames.track);
|
4567 |
-
scrollbar.classList.add(this.classNames.scrollbar);
|
4568 |
-
track.appendChild(scrollbar);
|
4569 |
-
this.axis.x.track.el = track.cloneNode(true);
|
4570 |
-
this.axis.x.track.el.classList.add(this.classNames.horizontal);
|
4571 |
-
this.axis.y.track.el = track.cloneNode(true);
|
4572 |
-
this.axis.y.track.el.classList.add(this.classNames.vertical);
|
4573 |
-
this.el.appendChild(this.axis.x.track.el);
|
4574 |
-
this.el.appendChild(this.axis.y.track.el);
|
4575 |
-
}
|
4576 |
-
|
4577 |
-
this.axis.x.scrollbar.el = this.axis.x.track.el.querySelector("." + this.classNames.scrollbar);
|
4578 |
-
this.axis.y.scrollbar.el = this.axis.y.track.el.querySelector("." + this.classNames.scrollbar);
|
4579 |
-
|
4580 |
-
if (!this.options.autoHide) {
|
4581 |
-
this.axis.x.scrollbar.el.classList.add(this.classNames.visible);
|
4582 |
-
this.axis.y.scrollbar.el.classList.add(this.classNames.visible);
|
4583 |
-
}
|
4584 |
-
|
4585 |
-
this.el.setAttribute('data-asl_simplebar', 'init');
|
4586 |
-
};
|
4587 |
-
|
4588 |
-
_proto.initListeners = function initListeners() {
|
4589 |
-
var _this3 = this;
|
4590 |
-
|
4591 |
-
// Event listeners
|
4592 |
-
if (this.options.autoHide) {
|
4593 |
-
this.el.addEventListener('mouseenter', this.onMouseEnter);
|
4594 |
-
}
|
4595 |
-
|
4596 |
-
['mousedown', 'click', 'dblclick'].forEach(function (e) {
|
4597 |
-
_this3.el.addEventListener(e, _this3.onPointerEvent, true);
|
4598 |
-
});
|
4599 |
-
['touchstart', 'touchend', 'touchmove'].forEach(function (e) {
|
4600 |
-
_this3.el.addEventListener(e, _this3.onPointerEvent, {
|
4601 |
-
capture: true,
|
4602 |
-
passive: true
|
4603 |
-
});
|
4604 |
-
});
|
4605 |
-
this.el.addEventListener('mousemove', this.onMouseMove);
|
4606 |
-
this.el.addEventListener('mouseleave', this.onMouseLeave);
|
4607 |
-
this.contentWrapperEl.addEventListener('scroll', this.onScroll); // Browser zoom triggers a window resize
|
4608 |
-
|
4609 |
-
window.addEventListener('resize', this.onWindowResize); // Hack for https://github.com/WICG/ResizeObserver/issues/38
|
4610 |
-
|
4611 |
-
var resizeObserverStarted = false;
|
4612 |
-
this.resizeObserver = new index(function () {
|
4613 |
-
if (!resizeObserverStarted) return;
|
4614 |
-
|
4615 |
-
_this3.recalculate();
|
4616 |
-
});
|
4617 |
-
this.resizeObserver.observe(this.el);
|
4618 |
-
this.resizeObserver.observe(this.contentEl);
|
4619 |
-
window.requestAnimationFrame(function () {
|
4620 |
-
resizeObserverStarted = true;
|
4621 |
-
}); // This is required to detect horizontal scroll. Vertical scroll only needs the resizeObserver.
|
4622 |
-
|
4623 |
-
this.mutationObserver = new MutationObserver(this.recalculate);
|
4624 |
-
this.mutationObserver.observe(this.contentEl, {
|
4625 |
-
childList: true,
|
4626 |
-
subtree: true,
|
4627 |
-
characterData: true
|
4628 |
-
});
|
4629 |
-
};
|
4630 |
-
|
4631 |
-
_proto.recalculate = function recalculate() {
|
4632 |
-
this.elStyles = window.getComputedStyle(this.el);
|
4633 |
-
this.isRtl = this.elStyles.direction === 'rtl';
|
4634 |
-
var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
|
4635 |
-
var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1;
|
4636 |
-
var contentElOffsetWidth = this.contentEl.offsetWidth;
|
4637 |
-
var contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
|
4638 |
-
var elOverflowX = this.elStyles.overflowX;
|
4639 |
-
var elOverflowY = this.elStyles.overflowY;
|
4640 |
-
this.contentEl.style.padding = this.elStyles.paddingTop + " " + this.elStyles.paddingRight + " " + this.elStyles.paddingBottom + " " + this.elStyles.paddingLeft;
|
4641 |
-
this.wrapperEl.style.margin = "-" + this.elStyles.paddingTop + " -" + this.elStyles.paddingRight + " -" + this.elStyles.paddingBottom + " -" + this.elStyles.paddingLeft;
|
4642 |
-
var contentElScrollHeight = this.contentEl.scrollHeight;
|
4643 |
-
var contentElScrollWidth = this.contentEl.scrollWidth;
|
4644 |
-
this.contentWrapperEl.style.height = isHeightAuto ? 'auto' : '100%'; // Determine placeholder size
|
4645 |
-
|
4646 |
-
this.placeholderEl.style.width = isWidthAuto ? contentElOffsetWidth + "px" : 'auto';
|
4647 |
-
this.placeholderEl.style.height = contentElScrollHeight + "px";
|
4648 |
-
var contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
|
4649 |
-
this.axis.x.isOverflowing = contentElScrollWidth > contentElOffsetWidth;
|
4650 |
-
this.axis.y.isOverflowing = contentElScrollHeight > contentWrapperElOffsetHeight; // Set isOverflowing to false if user explicitely set hidden overflow
|
4651 |
-
|
4652 |
-
this.axis.x.isOverflowing = elOverflowX === 'hidden' ? false : this.axis.x.isOverflowing;
|
4653 |
-
this.axis.y.isOverflowing = elOverflowY === 'hidden' ? false : this.axis.y.isOverflowing;
|
4654 |
-
this.axis.x.forceVisible = this.options.forceVisible === 'x' || this.options.forceVisible === true;
|
4655 |
-
this.axis.y.forceVisible = this.options.forceVisible === 'y' || this.options.forceVisible === true;
|
4656 |
-
this.hideNativeScrollbar(); // Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
|
4657 |
-
|
4658 |
-
var offsetForXScrollbar = this.axis.x.isOverflowing ? this.scrollbarWidth : 0;
|
4659 |
-
var offsetForYScrollbar = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
|
4660 |
-
this.axis.x.isOverflowing = this.axis.x.isOverflowing && contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
|
4661 |
-
this.axis.y.isOverflowing = this.axis.y.isOverflowing && contentElScrollHeight > contentWrapperElOffsetHeight - offsetForXScrollbar;
|
4662 |
-
this.axis.x.scrollbar.size = this.getScrollbarSize('x');
|
4663 |
-
this.axis.y.scrollbar.size = this.getScrollbarSize('y');
|
4664 |
-
this.axis.x.scrollbar.el.style.width = this.axis.x.scrollbar.size + "px";
|
4665 |
-
this.axis.y.scrollbar.el.style.height = this.axis.y.scrollbar.size + "px";
|
4666 |
-
this.positionScrollbar('x');
|
4667 |
-
this.positionScrollbar('y');
|
4668 |
-
this.toggleTrackVisibility('x');
|
4669 |
-
this.toggleTrackVisibility('y');
|
4670 |
-
}
|
4671 |
-
/**
|
4672 |
-
* Calculate scrollbar size
|
4673 |
-
*/
|
4674 |
-
;
|
4675 |
-
|
4676 |
-
_proto.getScrollbarSize = function getScrollbarSize(axis) {
|
4677 |
-
if (axis === void 0) {
|
4678 |
-
axis = 'y';
|
4679 |
-
}
|
4680 |
-
|
4681 |
-
if (!this.axis[axis].isOverflowing) {
|
4682 |
-
return 0;
|
4683 |
-
}
|
4684 |
-
|
4685 |
-
var contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
|
4686 |
-
var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
|
4687 |
-
var scrollbarSize;
|
4688 |
-
var scrollbarRatio = trackSize / contentSize; // Calculate new height/position of drag handle.
|
4689 |
-
|
4690 |
-
scrollbarSize = Math.max(~~(scrollbarRatio * trackSize), this.options.scrollbarMinSize);
|
4691 |
-
|
4692 |
-
if (this.options.scrollbarMaxSize) {
|
4693 |
-
scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);
|
4694 |
-
}
|
4695 |
-
|
4696 |
-
return scrollbarSize;
|
4697 |
-
};
|
4698 |
-
|
4699 |
-
_proto.positionScrollbar = function positionScrollbar(axis) {
|
4700 |
-
if (axis === void 0) {
|
4701 |
-
axis = 'y';
|
4702 |
-
}
|
4703 |
-
|
4704 |
-
if (!this.axis[axis].isOverflowing) {
|
4705 |
-
return;
|
4706 |
-
}
|
4707 |
-
|
4708 |
-
var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
|
4709 |
-
var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
|
4710 |
-
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
|
4711 |
-
var scrollbar = this.axis[axis].scrollbar;
|
4712 |
-
var scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
4713 |
-
scrollOffset = axis === 'x' && this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollOffset : scrollOffset;
|
4714 |
-
var scrollPourcent = scrollOffset / (contentSize - hostSize);
|
4715 |
-
var handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);
|
4716 |
-
handleOffset = axis === 'x' && this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? handleOffset + (trackSize - scrollbar.size) : handleOffset;
|
4717 |
-
scrollbar.el.style.transform = axis === 'x' ? "translate3d(" + handleOffset + "px, 0, 0)" : "translate3d(0, " + handleOffset + "px, 0)";
|
4718 |
-
};
|
4719 |
-
|
4720 |
-
_proto.toggleTrackVisibility = function toggleTrackVisibility(axis) {
|
4721 |
-
if (axis === void 0) {
|
4722 |
-
axis = 'y';
|
4723 |
-
}
|
4724 |
-
|
4725 |
-
var track = this.axis[axis].track.el;
|
4726 |
-
var scrollbar = this.axis[axis].scrollbar.el;
|
4727 |
-
|
4728 |
-
if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {
|
4729 |
-
track.style.visibility = 'visible';
|
4730 |
-
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'scroll';
|
4731 |
-
} else {
|
4732 |
-
track.style.visibility = 'hidden';
|
4733 |
-
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'hidden';
|
4734 |
-
} // Even if forceVisible is enabled, scrollbar itself should be hidden
|
4735 |
-
|
4736 |
-
|
4737 |
-
if (this.axis[axis].isOverflowing) {
|
4738 |
-
scrollbar.style.display = 'block';
|
4739 |
-
} else {
|
4740 |
-
scrollbar.style.display = 'none';
|
4741 |
-
}
|
4742 |
-
};
|
4743 |
-
|
4744 |
-
_proto.hideNativeScrollbar = function hideNativeScrollbar() {
|
4745 |
-
this.offsetEl.style[this.isRtl ? 'left' : 'right'] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
|
4746 |
-
this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
|
4747 |
-
}
|
4748 |
-
/**
|
4749 |
-
* On scroll event handling
|
4750 |
-
*/
|
4751 |
-
;
|
4752 |
-
|
4753 |
-
_proto.onMouseMoveForAxis = function onMouseMoveForAxis(axis) {
|
4754 |
-
if (axis === void 0) {
|
4755 |
-
axis = 'y';
|
4756 |
-
}
|
4757 |
-
|
4758 |
-
this.axis[axis].track.rect = this.axis[axis].track.el.getBoundingClientRect();
|
4759 |
-
this.axis[axis].scrollbar.rect = this.axis[axis].scrollbar.el.getBoundingClientRect();
|
4760 |
-
var isWithinScrollbarBoundsX = this.isWithinBounds(this.axis[axis].scrollbar.rect);
|
4761 |
-
|
4762 |
-
if (isWithinScrollbarBoundsX) {
|
4763 |
-
this.axis[axis].scrollbar.el.classList.add(this.classNames.hover);
|
4764 |
-
} else {
|
4765 |
-
this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
|
4766 |
-
}
|
4767 |
-
|
4768 |
-
if (this.isWithinBounds(this.axis[axis].track.rect)) {
|
4769 |
-
this.showScrollbar(axis);
|
4770 |
-
this.axis[axis].track.el.classList.add(this.classNames.hover);
|
4771 |
-
} else {
|
4772 |
-
this.axis[axis].track.el.classList.remove(this.classNames.hover);
|
4773 |
-
}
|
4774 |
-
};
|
4775 |
-
|
4776 |
-
_proto.onMouseLeaveForAxis = function onMouseLeaveForAxis(axis) {
|
4777 |
-
if (axis === void 0) {
|
4778 |
-
axis = 'y';
|
4779 |
-
}
|
4780 |
-
|
4781 |
-
this.axis[axis].track.el.classList.remove(this.classNames.hover);
|
4782 |
-
this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
|
4783 |
-
};
|
4784 |
-
|
4785 |
-
/**
|
4786 |
-
* Show scrollbar
|
4787 |
-
*/
|
4788 |
-
_proto.showScrollbar = function showScrollbar(axis) {
|
4789 |
-
if (axis === void 0) {
|
4790 |
-
axis = 'y';
|
4791 |
-
}
|
4792 |
-
|
4793 |
-
var scrollbar = this.axis[axis].scrollbar.el;
|
4794 |
-
|
4795 |
-
if (!this.axis[axis].isVisible) {
|
4796 |
-
scrollbar.classList.add(this.classNames.visible);
|
4797 |
-
this.axis[axis].isVisible = true;
|
4798 |
-
}
|
4799 |
-
|
4800 |
-
if (this.options.autoHide) {
|
4801 |
-
this.hideScrollbars();
|
4802 |
-
}
|
4803 |
-
}
|
4804 |
-
/**
|
4805 |
-
* Hide Scrollbar
|
4806 |
-
*/
|
4807 |
-
;
|
4808 |
-
|
4809 |
-
/**
|
4810 |
-
* on scrollbar handle drag movement starts
|
4811 |
-
*/
|
4812 |
-
_proto.onDragStart = function onDragStart(e, axis) {
|
4813 |
-
if (axis === void 0) {
|
4814 |
-
axis = 'y';
|
4815 |
-
}
|
4816 |
-
|
4817 |
-
var scrollbar = this.axis[axis].scrollbar; // Measure how far the user's mouse is from the top of the scrollbar drag handle.
|
4818 |
-
|
4819 |
-
var eventOffset = axis === 'y' ? e.pageY : e.pageX;
|
4820 |
-
this.axis[axis].dragOffset = eventOffset - scrollbar.rect[this.axis[axis].offsetAttr];
|
4821 |
-
this.draggedAxis = axis;
|
4822 |
-
this.el.classList.add(this.classNames.dragging);
|
4823 |
-
document.addEventListener('mousemove', this.drag, true);
|
4824 |
-
document.addEventListener('mouseup', this.onEndDrag, true);
|
4825 |
-
|
4826 |
-
if (this.removePreventClickId === null) {
|
4827 |
-
document.addEventListener('click', this.preventClick, true);
|
4828 |
-
document.addEventListener('dblclick', this.preventClick, true);
|
4829 |
-
} else {
|
4830 |
-
window.clearTimeout(this.removePreventClickId);
|
4831 |
-
this.removePreventClickId = null;
|
4832 |
-
}
|
4833 |
-
}
|
4834 |
-
/**
|
4835 |
-
* Drag scrollbar handle
|
4836 |
-
*/
|
4837 |
-
;
|
4838 |
-
|
4839 |
-
_proto.onTrackClick = function onTrackClick(e, axis) {
|
4840 |
-
var _this4 = this;
|
4841 |
-
|
4842 |
-
if (axis === void 0) {
|
4843 |
-
axis = 'y';
|
4844 |
-
}
|
4845 |
-
|
4846 |
-
this.axis[axis].scrollbar.rect = this.axis[axis].scrollbar.el.getBoundingClientRect();
|
4847 |
-
var scrollbar = this.axis[axis].scrollbar;
|
4848 |
-
var scrollbarOffset = scrollbar.rect[this.axis[axis].offsetAttr];
|
4849 |
-
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
|
4850 |
-
var scrolled = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
4851 |
-
var t = axis === 'y' ? this.mouseY - scrollbarOffset : this.mouseX - scrollbarOffset;
|
4852 |
-
var dir = t < 0 ? -1 : 1;
|
4853 |
-
var scrollSize = dir === -1 ? scrolled - hostSize : scrolled + hostSize;
|
4854 |
-
var speed = 40;
|
4855 |
-
|
4856 |
-
var scrollTo = function scrollTo() {
|
4857 |
-
if (dir === -1) {
|
4858 |
-
if (scrolled > scrollSize) {
|
4859 |
-
var _this4$contentWrapper;
|
4860 |
-
|
4861 |
-
scrolled -= speed;
|
4862 |
-
|
4863 |
-
_this4.contentWrapperEl.scrollTo((_this4$contentWrapper = {}, _this4$contentWrapper[_this4.axis[axis].offsetAttr] = scrolled, _this4$contentWrapper));
|
4864 |
-
|
4865 |
-
window.requestAnimationFrame(scrollTo);
|
4866 |
-
}
|
4867 |
-
} else {
|
4868 |
-
if (scrolled < scrollSize) {
|
4869 |
-
var _this4$contentWrapper2;
|
4870 |
-
|
4871 |
-
scrolled += speed;
|
4872 |
-
|
4873 |
-
_this4.contentWrapperEl.scrollTo((_this4$contentWrapper2 = {}, _this4$contentWrapper2[_this4.axis[axis].offsetAttr] = scrolled, _this4$contentWrapper2));
|
4874 |
-
|
4875 |
-
window.requestAnimationFrame(scrollTo);
|
4876 |
-
}
|
4877 |
-
}
|
4878 |
-
};
|
4879 |
-
|
4880 |
-
scrollTo();
|
4881 |
-
}
|
4882 |
-
/**
|
4883 |
-
* Getter for content element
|
4884 |
-
*/
|
4885 |
-
;
|
4886 |
-
|
4887 |
-
_proto.getContentElement = function getContentElement() {
|
4888 |
-
return this.contentEl;
|
4889 |
-
}
|
4890 |
-
/**
|
4891 |
-
* Getter for original scrolling element
|
4892 |
-
*/
|
4893 |
-
;
|
4894 |
-
|
4895 |
-
_proto.getScrollElement = function getScrollElement() {
|
4896 |
-
return this.contentWrapperEl;
|
4897 |
-
};
|
4898 |
-
|
4899 |
-
_proto.getScrollbarWidth = function getScrollbarWidth() {
|
4900 |
-
// Try/catch for FF 56 throwing on undefined computedStyles
|
4901 |
-
try {
|
4902 |
-
// Detect Chrome/Firefox and do not calculate
|
4903 |
-
if (getComputedStyle(this.contentWrapperEl, '::-webkit-scrollbar').display === 'none' || 'scrollbarWidth' in document.documentElement.style) {
|
4904 |
-
return 0;
|
4905 |
-
} else {
|
4906 |
-
return scrollbarWidth();
|
4907 |
-
}
|
4908 |
-
} catch (e) {
|
4909 |
-
return scrollbarWidth();
|
4910 |
-
}
|
4911 |
-
};
|
4912 |
-
|
4913 |
-
_proto.removeListeners = function removeListeners() {
|
4914 |
-
var _this5 = this;
|
4915 |
-
|
4916 |
-
// Event listeners
|
4917 |
-
if (this.options.autoHide) {
|
4918 |
-
this.el.removeEventListener('mouseenter', this.onMouseEnter);
|
4919 |
-
}
|
4920 |
-
|
4921 |
-
['mousedown', 'click', 'dblclick'].forEach(function (e) {
|
4922 |
-
_this5.el.removeEventListener(e, _this5.onPointerEvent, true);
|
4923 |
-
});
|
4924 |
-
['touchstart', 'touchend', 'touchmove'].forEach(function (e) {
|
4925 |
-
_this5.el.removeEventListener(e, _this5.onPointerEvent, {
|
4926 |
-
capture: true,
|
4927 |
-
passive: true
|
4928 |
-
});
|
4929 |
-
});
|
4930 |
-
this.el.removeEventListener('mousemove', this.onMouseMove);
|
4931 |
-
this.el.removeEventListener('mouseleave', this.onMouseLeave);
|
4932 |
-
this.contentWrapperEl.removeEventListener('scroll', this.onScroll);
|
4933 |
-
window.removeEventListener('resize', this.onWindowResize);
|
4934 |
-
this.mutationObserver.disconnect();
|
4935 |
-
this.resizeObserver.disconnect(); // Cancel all debounced functions
|
4936 |
-
|
4937 |
-
this.recalculate.cancel();
|
4938 |
-
this.onMouseMove.cancel();
|
4939 |
-
this.hideScrollbars.cancel();
|
4940 |
-
this.onWindowResize.cancel();
|
4941 |
-
}
|
4942 |
-
/**
|
4943 |
-
* UnMount mutation observer and delete asl_SimpleBar instance from DOM element
|
4944 |
-
*/
|
4945 |
-
;
|
4946 |
-
|
4947 |
-
_proto.unMount = function unMount() {
|
4948 |
-
this.removeListeners();
|
4949 |
-
asl_SimpleBar.instances.delete(this.el);
|
4950 |
-
}
|
4951 |
-
/**
|
4952 |
-
* Check if mouse is within bounds
|
4953 |
-
*/
|
4954 |
-
;
|
4955 |
-
|
4956 |
-
_proto.isWithinBounds = function isWithinBounds(bbox) {
|
4957 |
-
return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
|
4958 |
-
}
|
4959 |
-
/**
|
4960 |
-
* Find element children matches query
|
4961 |
-
*/
|
4962 |
-
;
|
4963 |
-
|
4964 |
-
_proto.findChild = function findChild(el, query) {
|
4965 |
-
var matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
|
4966 |
-
return Array.prototype.filter.call(el.children, function (child) {
|
4967 |
-
return matches.call(child, query);
|
4968 |
-
})[0];
|
4969 |
-
};
|
4970 |
-
|
4971 |
-
return asl_SimpleBar;
|
4972 |
-
}();
|
4973 |
-
|
4974 |
-
asl_SimpleBar.defaultOptions = {
|
4975 |
-
autoHide: true,
|
4976 |
-
forceVisible: false,
|
4977 |
-
classNames: {
|
4978 |
-
contentEl: 'asl_simplebar-content',
|
4979 |
-
contentWrapper: 'asl_simplebar-content-wrapper',
|
4980 |
-
offset: 'asl_simplebar-offset',
|
4981 |
-
mask: 'asl_simplebar-mask',
|
4982 |
-
wrapper: 'asl_simplebar-wrapper',
|
4983 |
-
placeholder: 'asl_simplebar-placeholder',
|
4984 |
-
scrollbar: 'asl_simplebar-scrollbar',
|
4985 |
-
track: 'asl_simplebar-track',
|
4986 |
-
heightAutoObserverWrapperEl: 'asl_simplebar-height-auto-observer-wrapper',
|
4987 |
-
heightAutoObserverEl: 'asl_simplebar-height-auto-observer',
|
4988 |
-
visible: 'asl_simplebar-visible',
|
4989 |
-
horizontal: 'asl_simplebar-horizontal',
|
4990 |
-
vertical: 'asl_simplebar-vertical',
|
4991 |
-
hover: 'asl_simplebar-hover',
|
4992 |
-
dragging: 'asl_simplebar-dragging'
|
4993 |
-
},
|
4994 |
-
scrollbarMinSize: 25,
|
4995 |
-
scrollbarMaxSize: 0,
|
4996 |
-
timeout: 1000
|
4997 |
-
};
|
4998 |
-
asl_SimpleBar.instances = new WeakMap();
|
4999 |
-
|
5000 |
-
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
5001 |
-
var createMethod$4 = function (IS_RIGHT) {
|
5002 |
-
return function (that, callbackfn, argumentsLength, memo) {
|
5003 |
-
aFunction$1(callbackfn);
|
5004 |
-
var O = toObject(that);
|
5005 |
-
var self = indexedObject(O);
|
5006 |
-
var length = toLength(O.length);
|
5007 |
-
var index = IS_RIGHT ? length - 1 : 0;
|
5008 |
-
var i = IS_RIGHT ? -1 : 1;
|
5009 |
-
if (argumentsLength < 2) while (true) {
|
5010 |
-
if (index in self) {
|
5011 |
-
memo = self[index];
|
5012 |
-
index += i;
|
5013 |
-
break;
|
5014 |
-
}
|
5015 |
-
index += i;
|
5016 |
-
if (IS_RIGHT ? index < 0 : length <= index) {
|
5017 |
-
throw TypeError('Reduce of empty array with no initial value');
|
5018 |
-
}
|
5019 |
-
}
|
5020 |
-
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
5021 |
-
memo = callbackfn(memo, self[index], index, O);
|
5022 |
-
}
|
5023 |
-
return memo;
|
5024 |
-
};
|
5025 |
-
};
|
5026 |
-
|
5027 |
-
var arrayReduce = {
|
5028 |
-
// `Array.prototype.reduce` method
|
5029 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
5030 |
-
left: createMethod$4(false),
|
5031 |
-
// `Array.prototype.reduceRight` method
|
5032 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
5033 |
-
right: createMethod$4(true)
|
5034 |
-
};
|
5035 |
-
|
5036 |
-
var $reduce = arrayReduce.left;
|
5037 |
-
|
5038 |
-
|
5039 |
-
// `Array.prototype.reduce` method
|
5040 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
5041 |
-
_export({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduce') }, {
|
5042 |
-
reduce: function reduce(callbackfn /* , initialValue */) {
|
5043 |
-
return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
5044 |
-
}
|
5045 |
-
});
|
5046 |
-
|
5047 |
-
var defineProperty$1 = objectDefineProperty.f;
|
5048 |
-
|
5049 |
-
var FunctionPrototype = Function.prototype;
|
5050 |
-
var FunctionPrototypeToString = FunctionPrototype.toString;
|
5051 |
-
var nameRE = /^\s*function ([^ (]*)/;
|
5052 |
-
var NAME = 'name';
|
5053 |
-
|
5054 |
-
// Function instances `.name` property
|
5055 |
-
// https://tc39.github.io/ecma262/#sec-function-instances-name
|
5056 |
-
if (descriptors && !(NAME in FunctionPrototype)) {
|
5057 |
-
defineProperty$1(FunctionPrototype, NAME, {
|
5058 |
-
configurable: true,
|
5059 |
-
get: function () {
|
5060 |
-
try {
|
5061 |
-
return FunctionPrototypeToString.call(this).match(nameRE)[1];
|
5062 |
-
} catch (error) {
|
5063 |
-
return '';
|
5064 |
-
}
|
5065 |
-
}
|
5066 |
-
});
|
5067 |
-
}
|
5068 |
-
|
5069 |
-
// `RegExp.prototype.flags` getter implementation
|
5070 |
-
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
5071 |
-
var regexpFlags = function () {
|
5072 |
-
var that = anObject(this);
|
5073 |
-
var result = '';
|
5074 |
-
if (that.global) result += 'g';
|
5075 |
-
if (that.ignoreCase) result += 'i';
|
5076 |
-
if (that.multiline) result += 'm';
|
5077 |
-
if (that.dotAll) result += 's';
|
5078 |
-
if (that.unicode) result += 'u';
|
5079 |
-
if (that.sticky) result += 'y';
|
5080 |
-
return result;
|
5081 |
-
};
|
5082 |
-
|
5083 |
-
var nativeExec = RegExp.prototype.exec;
|
5084 |
-
// This always refers to the native implementation, because the
|
5085 |
-
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
5086 |
-
// which loads this file before patching the method.
|
5087 |
-
var nativeReplace = String.prototype.replace;
|
5088 |
-
|
5089 |
-
var patchedExec = nativeExec;
|
5090 |
-
|
5091 |
-
var UPDATES_LAST_INDEX_WRONG = (function () {
|
5092 |
-
var re1 = /a/;
|
5093 |
-
var re2 = /b*/g;
|
5094 |
-
nativeExec.call(re1, 'a');
|
5095 |
-
nativeExec.call(re2, 'a');
|
5096 |
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
5097 |
-
})();
|
5098 |
-
|
5099 |
-
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
5100 |
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
5101 |
-
|
5102 |
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
5103 |
-
|
5104 |
-
if (PATCH) {
|
5105 |
-
patchedExec = function exec(str) {
|
5106 |
-
var re = this;
|
5107 |
-
var lastIndex, reCopy, match, i;
|
5108 |
-
|
5109 |
-
if (NPCG_INCLUDED) {
|
5110 |
-
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
|
5111 |
-
}
|
5112 |
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
5113 |
-
|
5114 |
-
match = nativeExec.call(re, str);
|
5115 |
-
|
5116 |
-
if (UPDATES_LAST_INDEX_WRONG && match) {
|
5117 |
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
5118 |
-
}
|
5119 |
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
5120 |
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
5121 |
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
5122 |
-
nativeReplace.call(match[0], reCopy, function () {
|
5123 |
-
for (i = 1; i < arguments.length - 2; i++) {
|
5124 |
-
if (arguments[i] === undefined) match[i] = undefined;
|
5125 |
-
}
|
5126 |
-
});
|
5127 |
-
}
|
5128 |
-
|
5129 |
-
return match;
|
5130 |
-
};
|
5131 |
-
}
|
5132 |
-
|
5133 |
-
var regexpExec = patchedExec;
|
5134 |
-
|
5135 |
-
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
5136 |
-
exec: regexpExec
|
5137 |
-
});
|
5138 |
-
|
5139 |
-
var SPECIES$2 = wellKnownSymbol('species');
|
5140 |
-
|
5141 |
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
5142 |
-
// #replace needs built-in support for named groups.
|
5143 |
-
// #match works fine because it just return the exec results, even if it has
|
5144 |
-
// a "grops" property.
|
5145 |
-
var re = /./;
|
5146 |
-
re.exec = function () {
|
5147 |
-
var result = [];
|
5148 |
-
result.groups = { a: '7' };
|
5149 |
-
return result;
|
5150 |
-
};
|
5151 |
-
return ''.replace(re, '$<a>') !== '7';
|
5152 |
-
});
|
5153 |
-
|
5154 |
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
5155 |
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
5156 |
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
5157 |
-
var re = /(?:)/;
|
5158 |
-
var originalExec = re.exec;
|
5159 |
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
5160 |
-
var result = 'ab'.split(re);
|
5161 |
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
5162 |
-
});
|
5163 |
-
|
5164 |
-
var charAt$1 = stringMultibyte.charAt;
|
5165 |
-
|
5166 |
-
// `AdvanceStringIndex` abstract operation
|
5167 |
-
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
5168 |
-
var advanceStringIndex = function (S, index, unicode) {
|
5169 |
-
return index + (unicode ? charAt$1(S, index).length : 1);
|
5170 |
-
};
|
5171 |
-
|
5172 |
-
// `RegExpExec` abstract operation
|
5173 |
-
// https://tc39.github.io/ecma262/#sec-regexpexec
|
5174 |
-
var regexpExecAbstract = function (R, S) {
|
5175 |
-
var exec = R.exec;
|
5176 |
-
if (typeof exec === 'function') {
|
5177 |
-
var result = exec.call(R, S);
|
5178 |
-
if (typeof result !== 'object') {
|
5179 |
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
5180 |
-
}
|
5181 |
-
return result;
|
5182 |
-
}
|
5183 |
-
|
5184 |
-
if (classofRaw(R) !== 'RegExp') {
|
5185 |
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
5186 |
-
}
|
5187 |
-
|
5188 |
-
return regexpExec.call(R, S);
|
5189 |
-
};
|
5190 |
-
|
5191 |
-
var max$1 = Math.max;
|
5192 |
-
var min$2 = Math.min;
|
5193 |
-
var floor$1 = Math.floor;
|
5194 |
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
5195 |
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
5196 |
-
|
5197 |
-
var maybeToString = function (it) {
|
5198 |
-
return it === undefined ? it : String(it);
|
5199 |
-
};
|
5200 |
-
|
5201 |
-
// Helper function to retrieve options from element attributes
|
5202 |
-
var getOptions = function getOptions(obj) {
|
5203 |
-
var options = Array.prototype.reduce.call(obj, function (acc, attribute) {
|
5204 |
-
var option = attribute.name.match(/data-asl_simplebar-(.+)/);
|
5205 |
-
|
5206 |
-
if (option) {
|
5207 |
-
var key = option[1].replace(/\W+(.)/g, function (x, chr) {
|
5208 |
-
return chr.toUpperCase();
|
5209 |
-
});
|
5210 |
-
|
5211 |
-
switch (attribute.value) {
|
5212 |
-
case 'true':
|
5213 |
-
acc[key] = true;
|
5214 |
-
break;
|
5215 |
-
|
5216 |
-
case 'false':
|
5217 |
-
acc[key] = false;
|
5218 |
-
break;
|
5219 |
-
|
5220 |
-
case undefined:
|
5221 |
-
acc[key] = true;
|
5222 |
-
break;
|
5223 |
-
|
5224 |
-
default:
|
5225 |
-
acc[key] = attribute.value;
|
5226 |
-
}
|
5227 |
-
}
|
5228 |
-
|
5229 |
-
return acc;
|
5230 |
-
}, {});
|
5231 |
-
return options;
|
5232 |
-
};
|
5233 |
-
|
5234 |
-
asl_SimpleBar.initDOMLoadedElements = function () {
|
5235 |
-
document.removeEventListener('DOMContentLoaded', this.initDOMLoadedElements);
|
5236 |
-
window.removeEventListener('load', this.initDOMLoadedElements);
|
5237 |
-
Array.prototype.forEach.call(document.querySelectorAll('[data-asl_simplebar]:not([data-asl_simplebar="init"])'), function (el) {
|
5238 |
-
if (!asl_SimpleBar.instances.has(el)) new asl_SimpleBar(el, getOptions(el.attributes));
|
5239 |
-
});
|
5240 |
-
};
|
5241 |
-
|
5242 |
-
asl_SimpleBar.removeObserver = function () {
|
5243 |
-
this.globalObserver.disconnect();
|
5244 |
-
};
|
5245 |
-
|
5246 |
-
asl_SimpleBar.initHtmlApi = function () {
|
5247 |
-
this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this); // MutationObserver is IE11+
|
5248 |
-
|
5249 |
-
if (typeof MutationObserver !== 'undefined') {
|
5250 |
-
// Mutation observer to observe dynamically added elements
|
5251 |
-
this.globalObserver = new MutationObserver(asl_SimpleBar.handleMutations);
|
5252 |
-
this.globalObserver.observe(document, {
|
5253 |
-
childList: true,
|
5254 |
-
subtree: true
|
5255 |
-
});
|
5256 |
-
} // Taken from jQuery `ready` function
|
5257 |
-
// Instantiate elements already present on the page
|
5258 |
-
|
5259 |
-
|
5260 |
-
if (document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll) {
|
5261 |
-
// Handle it asynchronously to allow scripts the opportunity to delay init
|
5262 |
-
window.setTimeout(this.initDOMLoadedElements);
|
5263 |
-
} else {
|
5264 |
-
document.addEventListener('DOMContentLoaded', this.initDOMLoadedElements);
|
5265 |
-
window.addEventListener('load', this.initDOMLoadedElements);
|
5266 |
-
}
|
5267 |
-
};
|
5268 |
-
|
5269 |
-
asl_SimpleBar.handleMutations = function (mutations) {
|
5270 |
-
mutations.forEach(function (mutation) {
|
5271 |
-
Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
|
5272 |
-
if (addedNode.nodeType === 1) {
|
5273 |
-
if (addedNode.hasAttribute('data-asl_simplebar')) {
|
5274 |
-
!asl_SimpleBar.instances.has(addedNode) && new asl_SimpleBar(addedNode, getOptions(addedNode.attributes));
|
5275 |
-
} else {
|
5276 |
-
Array.prototype.forEach.call(addedNode.querySelectorAll('[data-asl_simplebar]:not([data-asl_simplebar="init"])'), function (el) {
|
5277 |
-
!asl_SimpleBar.instances.has(el) && new asl_SimpleBar(el, getOptions(el.attributes));
|
5278 |
-
});
|
5279 |
-
}
|
5280 |
-
}
|
5281 |
-
});
|
5282 |
-
Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) {
|
5283 |
-
if (removedNode.nodeType === 1) {
|
5284 |
-
if (removedNode.hasAttribute('[data-asl_simplebar="init"]')) {
|
5285 |
-
asl_SimpleBar.instances.has(removedNode) && asl_SimpleBar.instances.get(removedNode).unMount();
|
5286 |
-
} else {
|
5287 |
-
Array.prototype.forEach.call(removedNode.querySelectorAll('[data-asl_simplebar="init"]'), function (el) {
|
5288 |
-
asl_SimpleBar.instances.has(el) && asl_SimpleBar.instances.get(el).unMount();
|
5289 |
-
});
|
5290 |
-
}
|
5291 |
-
}
|
5292 |
-
});
|
5293 |
-
});
|
5294 |
-
};
|
5295 |
-
|
5296 |
-
asl_SimpleBar.getOptions = getOptions;
|
5297 |
-
/**
|
5298 |
-
* HTML API
|
5299 |
-
* Called only in a browser env.
|
5300 |
-
*/
|
5301 |
-
|
5302 |
-
if (canUseDom) {
|
5303 |
-
asl_SimpleBar.initHtmlApi();
|
5304 |
-
}
|
5305 |
-
|
5306 |
-
return asl_SimpleBar;
|
5307 |
|
5308 |
}));
|
5309 |
})(asljQuery, asljQuery, window);
|
1 |
(function(jQuery, $, window){
|
2 |
/**
|
3 |
+
* asl_SimpleBar.js - v5.3.5
|
4 |
* Scrollbars, simpler.
|
5 |
+
* https://grsmto.github.io/asl_simplebar/
|
6 |
*
|
7 |
* Made by Adrien Denat from a fork by Jonathan Nicol
|
8 |
* Under MIT License
|
9 |
*/
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
(function (global, factory) {
|
12 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('core-js/modules/es.array.for-each'), require('core-js/modules/web.dom-collections.for-each'), require('core-js/modules/es.array.filter'), require('core-js/modules/es.array.iterator'), require('core-js/modules/es.object.assign'), require('core-js/modules/es.object.to-string'), require('core-js/modules/es.parse-int'), require('core-js/modules/es.string.iterator'), require('core-js/modules/es.weak-map'), require('core-js/modules/web.dom-collections.iterator'), require('core-js/modules/es.array.reduce'), require('core-js/modules/es.function.name'), require('core-js/modules/es.regexp.exec'), require('core-js/modules/es.string.match'), require('core-js/modules/es.string.replace')) :
|
13 |
+
typeof define === 'function' && define.amd ? define(['core-js/modules/es.array.for-each', 'core-js/modules/web.dom-collections.for-each', 'core-js/modules/es.array.filter', 'core-js/modules/es.array.iterator', 'core-js/modules/es.object.assign', 'core-js/modules/es.object.to-string', 'core-js/modules/es.parse-int', 'core-js/modules/es.string.iterator', 'core-js/modules/es.weak-map', 'core-js/modules/web.dom-collections.iterator', 'core-js/modules/es.array.reduce', 'core-js/modules/es.function.name', 'core-js/modules/es.regexp.exec', 'core-js/modules/es.string.match', 'core-js/modules/es.string.replace'], factory) :
|
14 |
+
(global = global || self, global.asl_SimpleBar = factory());
|
15 |
}(this, function () { 'use strict';
|
16 |
|
17 |
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
18 |
+
|
19 |
+
/**
|
20 |
+
* lodash (Custom Build) <https://lodash.com/>
|
21 |
+
* Build: `lodash modularize exports="npm" -o ./`
|
22 |
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
23 |
+
* Released under MIT license <https://lodash.com/license>
|
24 |
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
25 |
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
26 |
+
*/
|
27 |
+
|
28 |
+
/** Used as the `TypeError` message for "Functions" methods. */
|
29 |
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
30 |
+
|
31 |
+
/** Used as references for various `Number` constants. */
|
32 |
+
var NAN = 0 / 0;
|
33 |
+
|
34 |
+
/** `Object#toString` result references. */
|
35 |
+
var symbolTag = '[object Symbol]';
|
36 |
+
|
37 |
+
/** Used to match leading and trailing whitespace. */
|
38 |
+
var reTrim = /^\s+|\s+$/g;
|
39 |
+
|
40 |
+
/** Used to detect bad signed hexadecimal string values. */
|
41 |
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
42 |
+
|
43 |
+
/** Used to detect binary string values. */
|
44 |
+
var reIsBinary = /^0b[01]+$/i;
|
45 |
+
|
46 |
+
/** Used to detect octal string values. */
|
47 |
+
var reIsOctal = /^0o[0-7]+$/i;
|
48 |
+
|
49 |
+
/** Built-in method references without a dependency on `root`. */
|
50 |
+
var freeParseInt = parseInt;
|
51 |
+
|
52 |
+
/** Detect free variable `global` from Node.js. */
|
53 |
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
54 |
+
|
55 |
+
/** Detect free variable `self`. */
|
56 |
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
57 |
+
|
58 |
+
/** Used as a reference to the global object. */
|
59 |
+
var root = freeGlobal || freeSelf || Function('return this')();
|
60 |
+
|
61 |
+
/** Used for built-in method references. */
|
62 |
+
var objectProto = Object.prototype;
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Used to resolve the
|
66 |
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
67 |
+
* of values.
|
68 |
+
*/
|
69 |
+
var objectToString = objectProto.toString;
|
70 |
+
|
71 |
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
72 |
+
var nativeMax = Math.max,
|
73 |
+
nativeMin = Math.min;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
77 |
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
78 |
+
*
|
79 |
+
* @static
|
80 |
+
* @memberOf _
|
81 |
+
* @since 2.4.0
|
82 |
+
* @category Date
|
83 |
+
* @returns {number} Returns the timestamp.
|
84 |
+
* @example
|
85 |
+
*
|
86 |
+
* _.defer(function(stamp) {
|
87 |
+
* console.log(_.now() - stamp);
|
88 |
+
* }, _.now());
|
89 |
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
90 |
+
*/
|
91 |
+
var now = function() {
|
92 |
+
return root.Date.now();
|
93 |
+
};
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
97 |
+
* milliseconds have elapsed since the last time the debounced function was
|
98 |
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
99 |
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
100 |
+
* Provide `options` to indicate whether `func` should be invoked on the
|
101 |
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
102 |
+
* with the last arguments provided to the debounced function. Subsequent
|
103 |
+
* calls to the debounced function return the result of the last `func`
|
104 |
+
* invocation.
|
105 |
+
*
|
106 |
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
107 |
+
* invoked on the trailing edge of the timeout only if the debounced function
|
108 |
+
* is invoked more than once during the `wait` timeout.
|
109 |
+
*
|
110 |
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
111 |
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
112 |
+
*
|
113 |
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
114 |
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
115 |
+
*
|
116 |
+
* @static
|
117 |
+
* @memberOf _
|
118 |
+
* @since 0.1.0
|
119 |
+
* @category Function
|
120 |
+
* @param {Function} func The function to debounce.
|
121 |
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
122 |
+
* @param {Object} [options={}] The options object.
|
123 |
+
* @param {boolean} [options.leading=false]
|
124 |
+
* Specify invoking on the leading edge of the timeout.
|
125 |
+
* @param {number} [options.maxWait]
|
126 |
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
127 |
+
* @param {boolean} [options.trailing=true]
|
128 |
+
* Specify invoking on the trailing edge of the timeout.
|
129 |
+
* @returns {Function} Returns the new debounced function.
|
130 |
+
* @example
|
131 |
+
*
|
132 |
+
* // Avoid costly calculations while the window size is in flux.
|
133 |
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
134 |
+
*
|
135 |
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
136 |
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
137 |
+
* 'leading': true,
|
138 |
+
* 'trailing': false
|
139 |
+
* }));
|
140 |
+
*
|
141 |
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
142 |
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
143 |
+
* var source = new EventSource('/stream');
|
144 |
+
* jQuery(source).on('message', debounced);
|
145 |
+
*
|
146 |
+
* // Cancel the trailing debounced invocation.
|
147 |
+
* jQuery(window).on('popstate', debounced.cancel);
|
148 |
+
*/
|
149 |
+
function debounce(func, wait, options) {
|
150 |
+
var lastArgs,
|
151 |
+
lastThis,
|
152 |
+
maxWait,
|
153 |
+
result,
|
154 |
+
timerId,
|
155 |
+
lastCallTime,
|
156 |
+
lastInvokeTime = 0,
|
157 |
+
leading = false,
|
158 |
+
maxing = false,
|
159 |
+
trailing = true;
|
160 |
+
|
161 |
+
if (typeof func != 'function') {
|
162 |
+
throw new TypeError(FUNC_ERROR_TEXT);
|
163 |
+
}
|
164 |
+
wait = toNumber(wait) || 0;
|
165 |
+
if (isObject(options)) {
|
166 |
+
leading = !!options.leading;
|
167 |
+
maxing = 'maxWait' in options;
|
168 |
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
169 |
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
170 |
+
}
|
171 |
+
|
172 |
+
function invokeFunc(time) {
|
173 |
+
var args = lastArgs,
|
174 |
+
thisArg = lastThis;
|
175 |
+
|
176 |
+
lastArgs = lastThis = undefined;
|
177 |
+
lastInvokeTime = time;
|
178 |
+
result = func.apply(thisArg, args);
|
179 |
+
return result;
|
180 |
+
}
|
181 |
+
|
182 |
+
function leadingEdge(time) {
|
183 |
+
// Reset any `maxWait` timer.
|
184 |
+
lastInvokeTime = time;
|
185 |
+
// Start the timer for the trailing edge.
|
186 |
+
timerId = setTimeout(timerExpired, wait);
|
187 |
+
// Invoke the leading edge.
|
188 |
+
return leading ? invokeFunc(time) : result;
|
189 |
+
}
|
190 |
+
|
191 |
+
function remainingWait(time) {
|
192 |
+
var timeSinceLastCall = time - lastCallTime,
|
193 |
+
timeSinceLastInvoke = time - lastInvokeTime,
|
194 |
+
result = wait - timeSinceLastCall;
|
195 |
+
|
196 |
+
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
197 |
+
}
|
198 |
+
|
199 |
+
function shouldInvoke(time) {
|
200 |
+
var timeSinceLastCall = time - lastCallTime,
|
201 |
+
timeSinceLastInvoke = time - lastInvokeTime;
|
202 |
+
|
203 |
+
// Either this is the first call, activity has stopped and we're at the
|
204 |
+
// trailing edge, the system time has gone backwards and we're treating
|
205 |
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
206 |
+
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
207 |
+
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
208 |
+
}
|
209 |
+
|
210 |
+
function timerExpired() {
|
211 |
+
var time = now();
|
212 |
+
if (shouldInvoke(time)) {
|
213 |
+
return trailingEdge(time);
|
214 |
+
}
|
215 |
+
// Restart the timer.
|
216 |
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
217 |
+
}
|
218 |
+
|
219 |
+
function trailingEdge(time) {
|
220 |
+
timerId = undefined;
|
221 |
+
|
222 |
+
// Only invoke if we have `lastArgs` which means `func` has been
|
223 |
+
// debounced at least once.
|
224 |
+
if (trailing && lastArgs) {
|
225 |
+
return invokeFunc(time);
|
226 |
+
}
|
227 |
+
lastArgs = lastThis = undefined;
|
228 |
+
return result;
|
229 |
+
}
|
230 |
+
|
231 |
+
function cancel() {
|
232 |
+
if (timerId !== undefined) {
|
233 |
+
clearTimeout(timerId);
|
234 |
+
}
|
235 |
+
lastInvokeTime = 0;
|
236 |
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
237 |
+
}
|
238 |
+
|
239 |
+
function flush() {
|
240 |
+
return timerId === undefined ? result : trailingEdge(now());
|
241 |
+
}
|
242 |
+
|
243 |
+
function debounced() {
|
244 |
+
var time = now(),
|
245 |
+
isInvoking = shouldInvoke(time);
|
246 |
+
|
247 |
+
lastArgs = arguments;
|
248 |
+
lastThis = this;
|
249 |
+
lastCallTime = time;
|
250 |
+
|
251 |
+
if (isInvoking) {
|
252 |
+
if (timerId === undefined) {
|
253 |
+
return leadingEdge(lastCallTime);
|
254 |
+
}
|
255 |
+
if (maxing) {
|
256 |
+
// Handle invocations in a tight loop.
|
257 |
+
timerId = setTimeout(timerExpired, wait);
|
258 |
+
return invokeFunc(lastCallTime);
|
259 |
+
}
|
260 |
+
}
|
261 |
+
if (timerId === undefined) {
|
262 |
+
timerId = setTimeout(timerExpired, wait);
|
263 |
+
}
|
264 |
+
return result;
|
265 |
+
}
|
266 |
+
debounced.cancel = cancel;
|
267 |
+
debounced.flush = flush;
|
268 |
+
return debounced;
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Creates a throttled function that only invokes `func` at most once per
|
273 |
+
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
274 |
+
* method to cancel delayed `func` invocations and a `flush` method to
|
275 |
+
* immediately invoke them. Provide `options` to indicate whether `func`
|
276 |
+
* should be invoked on the leading and/or trailing edge of the `wait`
|
277 |
+
* timeout. The `func` is invoked with the last arguments provided to the
|
278 |
+
* throttled function. Subsequent calls to the throttled function return the
|
279 |
+
* result of the last `func` invocation.
|
280 |
+
*
|
281 |
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
282 |
+
* invoked on the trailing edge of the timeout only if the throttled function
|
283 |
+
* is invoked more than once during the `wait` timeout.
|
284 |
+
*
|
285 |
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
286 |
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
287 |
+
*
|
288 |
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
289 |
+
* for details over the differences between `_.throttle` and `_.debounce`.
|
290 |
+
*
|
291 |
+
* @static
|
292 |
+
* @memberOf _
|
293 |
+
* @since 0.1.0
|
294 |
+
* @category Function
|
295 |
+
* @param {Function} func The function to throttle.
|
296 |
+
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
297 |
+
* @param {Object} [options={}] The options object.
|
298 |
+
* @param {boolean} [options.leading=true]
|
299 |
+
* Specify invoking on the leading edge of the timeout.
|
300 |
+
* @param {boolean} [options.trailing=true]
|
301 |
+
* Specify invoking on the trailing edge of the timeout.
|
302 |
+
* @returns {Function} Returns the new throttled function.
|
303 |
+
* @example
|
304 |
+
*
|
305 |
+
* // Avoid excessively updating the position while scrolling.
|
306 |
+
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
307 |
+
*
|
308 |
+
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
309 |
+
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
310 |
+
* jQuery(element).on('click', throttled);
|
311 |
+
*
|
312 |
+
* // Cancel the trailing throttled invocation.
|
313 |
+
* jQuery(window).on('popstate', throttled.cancel);
|
314 |
+
*/
|
315 |
+
function throttle(func, wait, options) {
|
316 |
+
var leading = true,
|
317 |
+
trailing = true;
|
318 |
+
|
319 |
+
if (typeof func != 'function') {
|
320 |
+
throw new TypeError(FUNC_ERROR_TEXT);
|
321 |
+
}
|
322 |
+
if (isObject(options)) {
|
323 |
+
leading = 'leading' in options ? !!options.leading : leading;
|
324 |
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
325 |
+
}
|
326 |
+
return debounce(func, wait, {
|
327 |
+
'leading': leading,
|
328 |
+
'maxWait': wait,
|
329 |
+
'trailing': trailing
|
330 |
+
});
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Checks if `value` is the
|
335 |
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
336 |
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
337 |
+
*
|
338 |
+
* @static
|
339 |
+
* @memberOf _
|
340 |
+
* @since 0.1.0
|
341 |
+
* @category Lang
|
342 |
+
* @param {*} value The value to check.
|
343 |
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
344 |
+
* @example
|
345 |
+
*
|
346 |
+
* _.isObject({});
|
347 |
+
* // => true
|
348 |
+
*
|
349 |
+
* _.isObject([1, 2, 3]);
|
350 |
+
* // => true
|
351 |
+
*
|
352 |
+
* _.isObject(_.noop);
|
353 |
+
* // => true
|
354 |
+
*
|
355 |
+
* _.isObject(null);
|
356 |
+
* // => false
|
357 |
+
*/
|
358 |
+
function isObject(value) {
|
359 |
+
var type = typeof value;
|
360 |
+
return !!value && (type == 'object' || type == 'function');
|
361 |
+
}
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
365 |
+
* and has a `typeof` result of "object".
|
366 |
+
*
|
367 |
+
* @static
|
368 |
+
* @memberOf _
|
369 |
+
* @since 4.0.0
|
370 |
+
* @category Lang
|
371 |
+
* @param {*} value The value to check.
|
372 |
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
373 |
+
* @example
|
374 |
+
*
|
375 |
+
* _.isObjectLike({});
|
376 |
+
* // => true
|
377 |
+
*
|
378 |
+
* _.isObjectLike([1, 2, 3]);
|
379 |
+
* // => true
|
380 |
+
*
|
381 |
+
* _.isObjectLike(_.noop);
|
382 |
+
* // => false
|
383 |
+
*
|
384 |
+
* _.isObjectLike(null);
|
385 |
+
* // => false
|
386 |
+
*/
|
387 |
+
function isObjectLike(value) {
|
388 |
+
return !!value && typeof value == 'object';
|
389 |
+
}
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
393 |
+
*
|
394 |
+
* @static
|
395 |
+
* @memberOf _
|
396 |
+
* @since 4.0.0
|
397 |
+
* @category Lang
|
398 |
+
* @param {*} value The value to check.
|
399 |
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
400 |
+
* @example
|
401 |
+
*
|
402 |
+
* _.isSymbol(Symbol.iterator);
|
403 |
+
* // => true
|
404 |
+
*
|
405 |
+
* _.isSymbol('abc');
|
406 |
+
* // => false
|
407 |
+
*/
|
408 |
+
function isSymbol(value) {
|
409 |
+
return typeof value == 'symbol' ||
|
410 |
+
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
411 |
+
}
|
412 |
+
|
413 |
+
/**
|
414 |
+
* Converts `value` to a number.
|
415 |
+
*
|
416 |
+
* @static
|
417 |
+
* @memberOf _
|
418 |
+
* @since 4.0.0
|
419 |
+
* @category Lang
|
420 |
+
* @param {*} value The value to process.
|
421 |
+
* @returns {number} Returns the number.
|
422 |
+
* @example
|
423 |
+
*
|
424 |
+
* _.toNumber(3.2);
|
425 |
+
* // => 3.2
|
426 |
+
*
|
427 |
+
* _.toNumber(Number.MIN_VALUE);
|
428 |
+
* // => 5e-324
|
429 |
+
*
|
430 |
+
* _.toNumber(Infinity);
|
431 |
+
* // => Infinity
|
432 |
+
*
|
433 |
+
* _.toNumber('3.2');
|
434 |
+
* // => 3.2
|
435 |
+
*/
|
436 |
+
function toNumber(value) {
|
437 |
+
if (typeof value == 'number') {
|
438 |
+
return value;
|
439 |
+
}
|
440 |
+
if (isSymbol(value)) {
|
441 |
+
return NAN;
|
442 |
+
}
|
443 |
+
if (isObject(value)) {
|
444 |
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
445 |
+
value = isObject(other) ? (other + '') : other;
|
446 |
+
}
|
447 |
+
if (typeof value != 'string') {
|
448 |
+
return value === 0 ? value : +value;
|
449 |
+
}
|
450 |
+
value = value.replace(reTrim, '');
|
451 |
+
var isBinary = reIsBinary.test(value);
|
452 |
+
return (isBinary || reIsOctal.test(value))
|
453 |
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
454 |
+
: (reIsBadHex.test(value) ? NAN : +value);
|
455 |
+
}
|
456 |
+
|
457 |
+
var lodash_throttle = throttle;
|
458 |
+
|
459 |
+
/**
|
460 |
+
* lodash (Custom Build) <https://lodash.com/>
|
461 |
+
* Build: `lodash modularize exports="npm" -o ./`
|
462 |
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
463 |
+
* Released under MIT license <https://lodash.com/license>
|
464 |
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
465 |
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
466 |
+
*/
|
467 |
+
|
468 |
+
/** Used as the `TypeError` message for "Functions" methods. */
|
469 |
+
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
470 |
+
|
471 |
+
/** Used as references for various `Number` constants. */
|
472 |
+
var NAN$1 = 0 / 0;
|
473 |
+
|
474 |
+
/** `Object#toString` result references. */
|
475 |
+
var symbolTag$1 = '[object Symbol]';
|
476 |
+
|
477 |
+
/** Used to match leading and trailing whitespace. */
|
478 |
+
var reTrim$1 = /^\s+|\s+$/g;
|
479 |
+
|
480 |
+
/** Used to detect bad signed hexadecimal string values. */
|
481 |
+
var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
|
482 |
+
|
483 |
+
/** Used to detect binary string values. */
|
484 |
+
var reIsBinary$1 = /^0b[01]+$/i;
|
485 |
+
|
486 |
+
/** Used to detect octal string values. */
|
487 |
+
var reIsOctal$1 = /^0o[0-7]+$/i;
|
488 |
+
|
489 |
+
/** Built-in method references without a dependency on `root`. */
|
490 |
+
var freeParseInt$1 = parseInt;
|
491 |
+
|
492 |
+
/** Detect free variable `global` from Node.js. */
|
493 |
+
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
494 |
+
|
495 |
+
/** Detect free variable `self`. */
|
496 |
+
var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
|
497 |
+
|
498 |
+
/** Used as a reference to the global object. */
|
499 |
+
var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
|
500 |
+
|
501 |
+
/** Used for built-in method references. */
|
502 |
+
var objectProto$1 = Object.prototype;
|
503 |
+
|
504 |
+
/**
|
505 |
+
* Used to resolve the
|
506 |
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
507 |
+
* of values.
|
508 |
+
*/
|
509 |
+
var objectToString$1 = objectProto$1.toString;
|
510 |
+
|
511 |
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
512 |
+
var nativeMax$1 = Math.max,
|
513 |
+
nativeMin$1 = Math.min;
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
517 |
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
518 |
+
*
|
519 |
+
* @static
|
520 |
+
* @memberOf _
|
521 |
+
* @since 2.4.0
|
522 |
+
* @category Date
|
523 |
+
* @returns {number} Returns the timestamp.
|
524 |
+
* @example
|
525 |
+
*
|
526 |
+
* _.defer(function(stamp) {
|
527 |
+
* console.log(_.now() - stamp);
|
528 |
+
* }, _.now());
|
529 |
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
530 |
+
*/
|
531 |
+
var now$1 = function() {
|
532 |
+
return root$1.Date.now();
|
533 |
+
};
|
534 |
+
|
535 |
+
/**
|
536 |
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
537 |
+
* milliseconds have elapsed since the last time the debounced function was
|
538 |
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
539 |
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
540 |
+
* Provide `options` to indicate whether `func` should be invoked on the
|
541 |
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
542 |
+
* with the last arguments provided to the debounced function. Subsequent
|
543 |
+
* calls to the debounced function return the result of the last `func`
|
544 |
+
* invocation.
|
545 |
+
*
|
546 |
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
547 |
+
* invoked on the trailing edge of the timeout only if the debounced function
|
548 |
+
* is invoked more than once during the `wait` timeout.
|
549 |
+
*
|
550 |
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
551 |
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
552 |
+
*
|
553 |
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
554 |
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
555 |
+
*
|
556 |
+
* @static
|
557 |
+
* @memberOf _
|
558 |
+
* @since 0.1.0
|
559 |
+
* @category Function
|
560 |
+
* @param {Function} func The function to debounce.
|
561 |
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
562 |
+
* @param {Object} [options={}] The options object.
|
563 |
+
* @param {boolean} [options.leading=false]
|
564 |
+
* Specify invoking on the leading edge of the timeout.
|
565 |
+
* @param {number} [options.maxWait]
|
566 |
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
567 |
+
* @param {boolean} [options.trailing=true]
|
568 |
+
* Specify invoking on the trailing edge of the timeout.
|
569 |
+
* @returns {Function} Returns the new debounced function.
|
570 |
+
* @example
|
571 |
+
*
|
572 |
+
* // Avoid costly calculations while the window size is in flux.
|
573 |
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
574 |
+
*
|
575 |
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
576 |
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
577 |
+
* 'leading': true,
|
578 |
+
* 'trailing': false
|
579 |
+
* }));
|
580 |
+
*
|
581 |
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
582 |
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
583 |
+
* var source = new EventSource('/stream');
|
584 |
+
* jQuery(source).on('message', debounced);
|
585 |
+
*
|
586 |
+
* // Cancel the trailing debounced invocation.
|
587 |
+
* jQuery(window).on('popstate', debounced.cancel);
|
588 |
+
*/
|
589 |
+
function debounce$1(func, wait, options) {
|
590 |
+
var lastArgs,
|
591 |
+
lastThis,
|
592 |
+
maxWait,
|
593 |
+
result,
|
594 |
+
timerId,
|
595 |
+
lastCallTime,
|
596 |
+
lastInvokeTime = 0,
|
597 |
+
leading = false,
|
598 |
+
maxing = false,
|
599 |
+
trailing = true;
|
600 |
+
|
601 |
+
if (typeof func != 'function') {
|
602 |
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
603 |
+
}
|
604 |
+
wait = toNumber$1(wait) || 0;
|
605 |
+
if (isObject$1(options)) {
|
606 |
+
leading = !!options.leading;
|
607 |
+
maxing = 'maxWait' in options;
|
608 |
+
maxWait = maxing ? nativeMax$1(toNumber$1(options.maxWait) || 0, wait) : maxWait;
|
609 |
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
610 |
+
}
|
611 |
+
|
612 |
+
function invokeFunc(time) {
|
613 |
+
var args = lastArgs,
|
614 |
+
thisArg = lastThis;
|
615 |
+
|
616 |
+
lastArgs = lastThis = undefined;
|
617 |
+
lastInvokeTime = time;
|
618 |
+
result = func.apply(thisArg, args);
|
619 |
+
return result;
|
620 |
+
}
|
621 |
+
|
622 |
+
function leadingEdge(time) {
|
623 |
+
// Reset any `maxWait` timer.
|
624 |
+
lastInvokeTime = time;
|
625 |
+
// Start the timer for the trailing edge.
|
626 |
+
timerId = setTimeout(timerExpired, wait);
|
627 |
+
// Invoke the leading edge.
|
628 |
+
return leading ? invokeFunc(time) : result;
|
629 |
+
}
|
630 |
+
|
631 |
+
function remainingWait(time) {
|
632 |
+
var timeSinceLastCall = time - lastCallTime,
|
633 |
+
timeSinceLastInvoke = time - lastInvokeTime,
|
634 |
+
result = wait - timeSinceLastCall;
|
635 |
+
|
636 |
+
return maxing ? nativeMin$1(result, maxWait - timeSinceLastInvoke) : result;
|
637 |
+
}
|
638 |
+
|
639 |
+
function shouldInvoke(time) {
|
640 |
+
var timeSinceLastCall = time - lastCallTime,
|
641 |
+
timeSinceLastInvoke = time - lastInvokeTime;
|
642 |
+
|
643 |
+
// Either this is the first call, activity has stopped and we're at the
|
644 |
+
// trailing edge, the system time has gone backwards and we're treating
|
645 |
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
646 |
+
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
647 |
+
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
648 |
+
}
|
649 |
+
|
650 |
+
function timerExpired() {
|
651 |
+
var time = now$1();
|
652 |
+
if (shouldInvoke(time)) {
|
653 |
+
return trailingEdge(time);
|
654 |
+
}
|
655 |
+
// Restart the timer.
|
656 |
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
657 |
+
}
|
658 |
+
|
659 |
+
function trailingEdge(time) {
|
660 |
+
timerId = undefined;
|
661 |
+
|
662 |
+
// Only invoke if we have `lastArgs` which means `func` has been
|
663 |
+
// debounced at least once.
|
664 |
+
if (trailing && lastArgs) {
|
665 |
+
return invokeFunc(time);
|
666 |
+
}
|
667 |
+
lastArgs = lastThis = undefined;
|
668 |
+
return result;
|
669 |
+
}
|
670 |
+
|
671 |
+
function cancel() {
|
672 |
+
if (timerId !== undefined) {
|
673 |
+
clearTimeout(timerId);
|
674 |
+
}
|
675 |
+
lastInvokeTime = 0;
|
676 |
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
677 |
+
}
|
678 |
+
|
679 |
+
function flush() {
|
680 |
+
return timerId === undefined ? result : trailingEdge(now$1());
|
681 |
+
}
|
682 |
+
|
683 |
+
function debounced() {
|
684 |
+
var time = now$1(),
|
685 |
+
isInvoking = shouldInvoke(time);
|
686 |
+
|
687 |
+
lastArgs = arguments;
|
688 |
+
lastThis = this;
|
689 |
+
lastCallTime = time;
|
690 |
+
|
691 |
+
if (isInvoking) {
|
692 |
+
if (timerId === undefined) {
|
693 |
+
return leadingEdge(lastCallTime);
|
694 |
+
}
|
695 |
+
if (maxing) {
|
696 |
+
// Handle invocations in a tight loop.
|
697 |
+
timerId = setTimeout(timerExpired, wait);
|
698 |
+
return invokeFunc(lastCallTime);
|
699 |
+
}
|
700 |
+
}
|
701 |
+
if (timerId === undefined) {
|
702 |
+
timerId = setTimeout(timerExpired, wait);
|
703 |
+
}
|
704 |
+
return result;
|
705 |
+
}
|
706 |
+
debounced.cancel = cancel;
|
707 |
+
debounced.flush = flush;
|
708 |
+
return debounced;
|
709 |
+
}
|
710 |
+
|
711 |
+
/**
|
712 |
+
* Checks if `value` is the
|
713 |
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
714 |
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
715 |
+
*
|
716 |
+
* @static
|
717 |
+
* @memberOf _
|
718 |
+
* @since 0.1.0
|
719 |
+
* @category Lang
|
720 |
+
* @param {*} value The value to check.
|
721 |
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
722 |
+
* @example
|
723 |
+
*
|
724 |
+
* _.isObject({});
|
725 |
+
* // => true
|
726 |
+
*
|
727 |
+
* _.isObject([1, 2, 3]);
|
728 |
+
* // => true
|
729 |
+
*
|
730 |
+
* _.isObject(_.noop);
|
731 |
+
* // => true
|
732 |
+
*
|
733 |
+
* _.isObject(null);
|
734 |
+
* // => false
|
735 |
+
*/
|
736 |
+
function isObject$1(value) {
|
737 |
+
var type = typeof value;
|
738 |
+
return !!value && (type == 'object' || type == 'function');
|
739 |
+
}
|
740 |
+
|
741 |
+
/**
|
742 |
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
743 |
+
* and has a `typeof` result of "object".
|
744 |
+
*
|
745 |
+
* @static
|
746 |
+
* @memberOf _
|
747 |
+
* @since 4.0.0
|
748 |
+
* @category Lang
|
749 |
+
* @param {*} value The value to check.
|
750 |
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
751 |
+
* @example
|
752 |
+
*
|
753 |
+
* _.isObjectLike({});
|
754 |
+
* // => true
|
755 |
+
*
|
756 |
+
* _.isObjectLike([1, 2, 3]);
|
757 |
+
* // => true
|
758 |
+
*
|
759 |
+
* _.isObjectLike(_.noop);
|
760 |
+
* // => false
|
761 |
+
*
|
762 |
+
* _.isObjectLike(null);
|
763 |
+
* // => false
|
764 |
+
*/
|
765 |
+
function isObjectLike$1(value) {
|
766 |
+
return !!value && typeof value == 'object';
|
767 |
+
}
|
768 |
+
|
769 |
+
/**
|
770 |
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
771 |
+
*
|
772 |
+
* @static
|
773 |
+
* @memberOf _
|
774 |
+
* @since 4.0.0
|
775 |
+
* @category Lang
|
776 |
+
* @param {*} value The value to check.
|
777 |
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
778 |
+
* @example
|
779 |
+
*
|
780 |
+
* _.isSymbol(Symbol.iterator);
|
781 |
+
* // => true
|
782 |
+
*
|
783 |
+
* _.isSymbol('abc');
|
784 |
+
* // => false
|
785 |
+
*/
|
786 |
+
function isSymbol$1(value) {
|
787 |
+
return typeof value == 'symbol' ||
|
788 |
+
(isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1);
|
789 |
+
}
|
790 |
+
|
791 |
+
/**
|
792 |
+
* Converts `value` to a number.
|
793 |
+
*
|
794 |
+
* @static
|
795 |
+
* @memberOf _
|
796 |
+
* @since 4.0.0
|
797 |
+
* @category Lang
|
798 |
+
* @param {*} value The value to process.
|
799 |
+
* @returns {number} Returns the number.
|
800 |
+
* @example
|
801 |
+
*
|
802 |
+
* _.toNumber(3.2);
|
803 |
+
* // => 3.2
|
804 |
+
*
|
805 |
+
* _.toNumber(Number.MIN_VALUE);
|
806 |
+
* // => 5e-324
|
807 |
+
*
|
808 |
+
* _.toNumber(Infinity);
|
809 |
+
* // => Infinity
|
810 |
+
*
|
811 |
+
* _.toNumber('3.2');
|
812 |
+
* // => 3.2
|
813 |
+
*/
|
814 |
+
function toNumber$1(value) {
|
815 |
+
if (typeof value == 'number') {
|
816 |
+
return value;
|
817 |
+
}
|
818 |
+
if (isSymbol$1(value)) {
|
819 |
+
return NAN$1;
|
820 |
+
}
|
821 |
+
if (isObject$1(value)) {
|
822 |
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
823 |
+
value = isObject$1(other) ? (other + '') : other;
|
824 |
+
}
|
825 |
+
if (typeof value != 'string') {
|
826 |
+
return value === 0 ? value : +value;
|
827 |
+
}
|
828 |
+
value = value.replace(reTrim$1, '');
|
829 |
+
var isBinary = reIsBinary$1.test(value);
|
830 |
+
return (isBinary || reIsOctal$1.test(value))
|
831 |
+
? freeParseInt$1(value.slice(2), isBinary ? 2 : 8)
|
832 |
+
: (reIsBadHex$1.test(value) ? NAN$1 : +value);
|
833 |
+
}
|
834 |
+
|
835 |
+
var lodash_debounce = debounce$1;
|
836 |
+
|
837 |
+
/**
|
838 |
+
* lodash (Custom Build) <https://lodash.com/>
|
839 |
+
* Build: `lodash modularize exports="npm" -o ./`
|
840 |
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
841 |
+
* Released under MIT license <https://lodash.com/license>
|
842 |
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
843 |
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
844 |
+
*/
|
845 |
+
|
846 |
+
/** Used as the `TypeError` message for "Functions" methods. */
|
847 |
+
var FUNC_ERROR_TEXT$2 = 'Expected a function';
|
848 |
+
|
849 |
+
/** Used to stand-in for `undefined` hash values. */
|
850 |
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
851 |
+
|
852 |
+
/** `Object#toString` result references. */
|
853 |
+
var funcTag = '[object Function]',
|
854 |
+
genTag = '[object GeneratorFunction]';
|
855 |
+
|
856 |
+
/**
|
857 |
+
* Used to match `RegExp`
|
858 |
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
859 |
+
*/
|
860 |
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
861 |
+
|
862 |
+
/** Used to detect host constructors (Safari). */
|
863 |
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
864 |
+
|
865 |
+
/** Detect free variable `global` from Node.js. */
|
866 |
+
var freeGlobal$2 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
867 |
+
|
868 |
+
/** Detect free variable `self`. */
|
869 |
+
var freeSelf$2 = typeof self == 'object' && self && self.Object === Object && self;
|
870 |
+
|
871 |
+
/** Used as a reference to the global object. */
|
872 |
+
var root$2 = freeGlobal$2 || freeSelf$2 || Function('return this')();
|
873 |
+
|
874 |
+
/**
|
875 |
+
* Gets the value at `key` of `object`.
|
876 |
+
*
|
877 |
+
* @private
|
878 |
+
* @param {Object} [object] The object to query.
|
879 |
+
* @param {string} key The key of the property to get.
|
880 |
+
* @returns {*} Returns the property value.
|
881 |
+
*/
|
882 |
+
function getValue(object, key) {
|
883 |
+
return object == null ? undefined : object[key];
|
884 |
+
}
|
885 |
+
|
886 |
+
/**
|
887 |
+
* Checks if `value` is a host object in IE < 9.
|
888 |
+
*
|
889 |
+
* @private
|
890 |
+
* @param {*} value The value to check.
|
891 |
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
892 |
+
*/
|
893 |
+
function isHostObject(value) {
|
894 |
+
// Many host objects are `Object` objects that can coerce to strings
|
895 |
+
// despite having improperly defined `toString` methods.
|
896 |
+
var result = false;
|
897 |
+
if (value != null && typeof value.toString != 'function') {
|
898 |
+
try {
|
899 |
+
result = !!(value + '');
|
900 |
+
} catch (e) {}
|
901 |
+
}
|
902 |
+
return result;
|
903 |
+
}
|
904 |
+
|
905 |
+
/** Used for built-in method references. */
|
906 |
+
var arrayProto = Array.prototype,
|
907 |
+
funcProto = Function.prototype,
|
908 |
+
objectProto$2 = Object.prototype;
|
909 |
+
|
910 |
+
/** Used to detect overreaching core-js shims. */
|
911 |
+
var coreJsData = root$2['__core-js_shared__'];
|
912 |
+
|
913 |
+
/** Used to detect methods masquerading as native. */
|
914 |
+
var maskSrcKey = (function() {
|
915 |
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
916 |
+
return uid ? ('Symbol(src)_1.' + uid) : '';
|
917 |
+
}());
|
918 |
+
|
919 |
+
/** Used to resolve the decompiled source of functions. */
|
920 |
+
var funcToString = funcProto.toString;
|
921 |
+
|
922 |
+
/** Used to check objects for own properties. */
|
923 |
+
var hasOwnProperty = objectProto$2.hasOwnProperty;
|
924 |
+
|
925 |
+
/**
|
926 |
+
* Used to resolve the
|
927 |
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
928 |
+
* of values.
|
929 |
+
*/
|
930 |
+
var objectToString$2 = objectProto$2.toString;
|
931 |
+
|
932 |
+
/** Used to detect if a method is native. */
|
933 |
+
var reIsNative = RegExp('^' +
|
934 |
+
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
935 |
+
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
936 |
+
);
|
937 |
+
|
938 |
+
/** Built-in value references. */
|
939 |
+
var splice = arrayProto.splice;
|
940 |
+
|
941 |
+
/* Built-in method references that are verified to be native. */
|
942 |
+
var Map = getNative(root$2, 'Map'),
|
943 |
+
nativeCreate = getNative(Object, 'create');
|
944 |
+
|
945 |
+
/**
|
946 |
+
* Creates a hash object.
|
947 |
+
*
|
948 |
+
* @private
|
949 |
+
* @constructor
|
950 |
+
* @param {Array} [entries] The key-value pairs to cache.
|
951 |
+
*/
|
952 |
+
function Hash(entries) {
|
953 |
+
var index = -1,
|
954 |
+
length = entries ? entries.length : 0;
|
955 |
+
|
956 |
+
this.clear();
|
957 |
+
while (++index < length) {
|
958 |
+
var entry = entries[index];
|
959 |
+
this.set(entry[0], entry[1]);
|
960 |
+
}
|
961 |
+
}
|
962 |
+
|
963 |
+
/**
|
964 |
+
* Removes all key-value entries from the hash.
|
965 |
+
*
|
966 |
+
* @private
|
967 |
+
* @name clear
|
968 |
+
* @memberOf Hash
|
969 |
+
*/
|
970 |
+
function hashClear() {
|
971 |
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
972 |
+
}
|
973 |
+
|
974 |
+
/**
|
975 |
+
* Removes `key` and its value from the hash.
|
976 |
+
*
|
977 |
+
* @private
|
978 |
+
* @name delete
|
979 |
+
* @memberOf Hash
|
980 |
+
* @param {Object} hash The hash to modify.
|
981 |
+
* @param {string} key The key of the value to remove.
|
982 |
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
983 |
+
*/
|
984 |
+
function hashDelete(key) {
|
985 |
+
return this.has(key) && delete this.__data__[key];
|
986 |
+
}
|
987 |
+
|
988 |
+
/**
|
989 |
+
* Gets the hash value for `key`.
|
990 |
+
*
|
991 |
+
* @private
|
992 |
+
* @name get
|
993 |
+
* @memberOf Hash
|
994 |
+
* @param {string} key The key of the value to get.
|
995 |
+
* @returns {*} Returns the entry value.
|
996 |
+
*/
|
997 |
+
function hashGet(key) {
|
998 |
+
var data = this.__data__;
|
999 |
+
if (nativeCreate) {
|
1000 |
+
var result = data[key];
|
1001 |
+
return result === HASH_UNDEFINED ? undefined : result;
|
1002 |
+
}
|
1003 |
+
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
/**
|
1007 |
+
* Checks if a hash value for `key` exists.
|
1008 |
+
*
|
1009 |
+
* @private
|
1010 |
+
* @name has
|
1011 |
+
* @memberOf Hash
|
1012 |
+
* @param {string} key The key of the entry to check.
|
1013 |
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
1014 |
+
*/
|
1015 |
+
function hashHas(key) {
|
1016 |
+
var data = this.__data__;
|
1017 |
+
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
/**
|
1021 |
+
* Sets the hash `key` to `value`.
|
1022 |
+
*
|
1023 |
+
* @private
|
1024 |
+
* @name set
|
1025 |
+
* @memberOf Hash
|
1026 |
+
* @param {string} key The key of the value to set.
|
1027 |
+
* @param {*} value The value to set.
|
1028 |
+
* @returns {Object} Returns the hash instance.
|
1029 |
+
*/
|
1030 |
+
function hashSet(key, value) {
|
1031 |
+
var data = this.__data__;
|
1032 |
+
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
1033 |
+
return this;
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
// Add methods to `Hash`.
|
1037 |
+
Hash.prototype.clear = hashClear;
|
1038 |
+
Hash.prototype['delete'] = hashDelete;
|
1039 |
+
Hash.prototype.get = hashGet;
|
1040 |
+
Hash.prototype.has = hashHas;
|
1041 |
+
Hash.prototype.set = hashSet;
|
1042 |
+
|
1043 |
+
/**
|
1044 |
+
* Creates an list cache object.
|
1045 |
+
*
|
1046 |
+
* @private
|
1047 |
+
* @constructor
|
1048 |
+
* @param {Array} [entries] The key-value pairs to cache.
|
1049 |
+
*/
|
1050 |
+
function ListCache(entries) {
|
1051 |
+
var index = -1,
|
1052 |
+
length = entries ? entries.length : 0;
|
1053 |
+
|
1054 |
+
this.clear();
|
1055 |
+
while (++index < length) {
|
1056 |
+
var entry = entries[index];
|
1057 |
+
this.set(entry[0], entry[1]);
|
1058 |
+
}
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
/**
|
1062 |
+
* Removes all key-value entries from the list cache.
|
1063 |
+
*
|
1064 |
+
* @private
|
1065 |
+
* @name clear
|
1066 |
+
* @memberOf ListCache
|
1067 |
+
*/
|
1068 |
+
function listCacheClear() {
|
1069 |
+
this.__data__ = [];
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
/**
|
1073 |
+
* Removes `key` and its value from the list cache.
|
1074 |
+
*
|
1075 |
+
* @private
|
1076 |
+
* @name delete
|
1077 |
+
* @memberOf ListCache
|
1078 |
+
* @param {string} key The key of the value to remove.
|
1079 |
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
1080 |
+
*/
|
1081 |
+
function listCacheDelete(key) {
|
1082 |
+
var data = this.__data__,
|
1083 |
+
index = assocIndexOf(data, key);
|
1084 |
+
|
1085 |
+
if (index < 0) {
|
1086 |
+
return false;
|
1087 |
+
}
|
1088 |
+
var lastIndex = data.length - 1;
|
1089 |
+
if (index == lastIndex) {
|
1090 |
+
data.pop();
|
1091 |
+
} else {
|
1092 |
+
splice.call(data, index, 1);
|
1093 |
+
}
|
1094 |
+
return true;
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
/**
|
1098 |
+
* Gets the list cache value for `key`.
|
1099 |
+
*
|
1100 |
+
* @private
|
1101 |
+
* @name get
|
1102 |
+
* @memberOf ListCache
|
1103 |
+
* @param {string} key The key of the value to get.
|
1104 |
+
* @returns {*} Returns the entry value.
|
1105 |
+
*/
|
1106 |
+
function listCacheGet(key) {
|
1107 |
+
var data = this.__data__,
|
1108 |
+
index = assocIndexOf(data, key);
|
1109 |
+
|
1110 |
+
return index < 0 ? undefined : data[index][1];
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
/**
|
1114 |
+
* Checks if a list cache value for `key` exists.
|
1115 |
+
*
|
1116 |
+
* @private
|
1117 |
+
* @name has
|
1118 |
+
* @memberOf ListCache
|
1119 |
+
* @param {string} key The key of the entry to check.
|
1120 |
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
1121 |
+
*/
|
1122 |
+
function listCacheHas(key) {
|
1123 |
+
return assocIndexOf(this.__data__, key) > -1;
|
1124 |
+
}
|
1125 |
+
|
1126 |
+
/**
|
1127 |
+
* Sets the list cache `key` to `value`.
|
1128 |
+
*
|
1129 |
+
* @private
|
1130 |
+
* @name set
|
1131 |
+
* @memberOf ListCache
|
1132 |
+
* @param {string} key The key of the value to set.
|
1133 |
+
* @param {*} value The value to set.
|
1134 |
+
* @returns {Object} Returns the list cache instance.
|
1135 |
+
*/
|
1136 |
+
function listCacheSet(key, value) {
|
1137 |
+
var data = this.__data__,
|
1138 |
+
index = assocIndexOf(data, key);
|
1139 |
+
|
1140 |
+
if (index < 0) {
|
1141 |
+
data.push([key, value]);
|
1142 |
+
} else {
|
1143 |
+
data[index][1] = value;
|
1144 |
+
}
|
1145 |
+
return this;
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
// Add methods to `ListCache`.
|
1149 |
+
ListCache.prototype.clear = listCacheClear;
|
1150 |
+
ListCache.prototype['delete'] = listCacheDelete;
|
1151 |
+
ListCache.prototype.get = listCacheGet;
|
1152 |
+
ListCache.prototype.has = listCacheHas;
|
1153 |
+
ListCache.prototype.set = listCacheSet;
|
1154 |
+
|
1155 |
+
/**
|
1156 |
+
* Creates a map cache object to store key-value pairs.
|
1157 |
+
*
|
1158 |
+
* @private
|
1159 |
+
* @constructor
|
1160 |
+
* @param {Array} [entries] The key-value pairs to cache.
|
1161 |
+
*/
|
1162 |
+
function MapCache(entries) {
|
1163 |
+
var index = -1,
|
1164 |
+
length = entries ? entries.length : 0;
|
1165 |
+
|
1166 |
+
this.clear();
|
1167 |
+
while (++index < length) {
|
1168 |
+
var entry = entries[index];
|
1169 |
+
this.set(entry[0], entry[1]);
|
1170 |
+
}
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
/**
|
1174 |
+
* Removes all key-value entries from the map.
|
1175 |
+
*
|
1176 |
+
* @private
|
1177 |
+
* @name clear
|
1178 |
+
* @memberOf MapCache
|
1179 |
+
*/
|
1180 |
+
function mapCacheClear() {
|
1181 |
+
this.__data__ = {
|
1182 |
+
'hash': new Hash,
|
1183 |
+
'map': new (Map || ListCache),
|
1184 |
+
'string': new Hash
|
1185 |
+
};
|
1186 |
+
}
|
1187 |
+
|
1188 |
+
/**
|
1189 |
+
* Removes `key` and its value from the map.
|
1190 |
+
*
|
1191 |
+
* @private
|
1192 |
+
* @name delete
|
1193 |
+
* @memberOf MapCache
|
1194 |
+
* @param {string} key The key of the value to remove.
|
1195 |
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
1196 |
+
*/
|
1197 |
+
function mapCacheDelete(key) {
|
1198 |
+
return getMapData(this, key)['delete'](key);
|
1199 |
+
}
|
1200 |
+
|
1201 |
+
/**
|
1202 |
+
* Gets the map value for `key`.
|
1203 |
+
*
|
1204 |
+
* @private
|
1205 |
+
* @name get
|
1206 |
+
* @memberOf MapCache
|
1207 |
+
* @param {string} key The key of the value to get.
|
1208 |
+
* @returns {*} Returns the entry value.
|
1209 |
+
*/
|
1210 |
+
function mapCacheGet(key) {
|
1211 |
+
return getMapData(this, key).get(key);
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
/**
|
1215 |
+
* Checks if a map value for `key` exists.
|
1216 |
+
*
|
1217 |
+
* @private
|
1218 |
+
* @name has
|
1219 |
+
* @memberOf MapCache
|
1220 |
+
* @param {string} key The key of the entry to check.
|
1221 |
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
1222 |
+
*/
|
1223 |
+
function mapCacheHas(key) {
|
1224 |
+
return getMapData(this, key).has(key);
|
1225 |
+
}
|
1226 |
+
|
1227 |
+
/**
|
1228 |
+
* Sets the map `key` to `value`.
|
1229 |
+
*
|
1230 |
+
* @private
|
1231 |
+
* @name set
|
1232 |
+
* @memberOf MapCache
|
1233 |
+
* @param {string} key The key of the value to set.
|
1234 |
+
* @param {*} value The value to set.
|
1235 |
+
* @returns {Object} Returns the map cache instance.
|
1236 |
+
*/
|
1237 |
+
function mapCacheSet(key, value) {
|
1238 |
+
getMapData(this, key).set(key, value);
|
1239 |
+
return this;
|
1240 |
+
}
|
1241 |
+
|
1242 |
+
// Add methods to `MapCache`.
|
1243 |
+
MapCache.prototype.clear = mapCacheClear;
|
1244 |
+
MapCache.prototype['delete'] = mapCacheDelete;
|
1245 |
+
MapCache.prototype.get = mapCacheGet;
|
1246 |
+
MapCache.prototype.has = mapCacheHas;
|
1247 |
+
MapCache.prototype.set = mapCacheSet;
|
1248 |
+
|
1249 |
+
/**
|
1250 |
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
1251 |
+
*
|
1252 |
+
* @private
|
1253 |
+
* @param {Array} array The array to inspect.
|
1254 |
+
* @param {*} key The key to search for.
|
1255 |
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
1256 |
+
*/
|
1257 |
+
function assocIndexOf(array, key) {
|
1258 |
+
var length = array.length;
|
1259 |
+
while (length--) {
|
1260 |
+
if (eq(array[length][0], key)) {
|
1261 |
+
return length;
|
1262 |
+
}
|
1263 |
+
}
|
1264 |
+
return -1;
|
1265 |
+
}
|
1266 |
+
|
1267 |
+
/**
|
1268 |
+
* The base implementation of `_.isNative` without bad shim checks.
|
1269 |
+
*
|
1270 |
+
* @private
|
1271 |
+
* @param {*} value The value to check.
|
1272 |
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
1273 |
+
* else `false`.
|
1274 |
+
*/
|
1275 |
+
function baseIsNative(value) {
|
1276 |
+
if (!isObject$2(value) || isMasked(value)) {
|
1277 |
+
return false;
|
1278 |
+
}
|
1279 |
+
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
1280 |
+
return pattern.test(toSource(value));
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
/**
|
1284 |
+
* Gets the data for `map`.
|
1285 |
+
*
|
1286 |
+
* @private
|
1287 |
+
* @param {Object} map The map to query.
|
1288 |
+
* @param {string} key The reference key.
|
1289 |
+
* @returns {*} Returns the map data.
|
1290 |
+
*/
|
1291 |
+
function getMapData(map, key) {
|
1292 |
+
var data = map.__data__;
|
1293 |
+
return isKeyable(key)
|
1294 |
+
? data[typeof key == 'string' ? 'string' : 'hash']
|
1295 |
+
: data.map;
|
1296 |
+
}
|
1297 |
+
|
1298 |
+
/**
|
1299 |
+
* Gets the native function at `key` of `object`.
|
1300 |
+
*
|
1301 |
+
* @private
|
1302 |
+
* @param {Object} object The object to query.
|
1303 |
+
* @param {string} key The key of the method to get.
|
1304 |
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
1305 |
+
*/
|
1306 |
+
function getNative(object, key) {
|
1307 |
+
var value = getValue(object, key);
|
1308 |
+
return baseIsNative(value) ? value : undefined;
|
1309 |
+
}
|
1310 |
+
|
1311 |
+
/**
|
1312 |
+
* Checks if `value` is suitable for use as unique object key.
|
1313 |
+
*
|
1314 |
+
* @private
|
1315 |
+
* @param {*} value The value to check.
|
1316 |
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
1317 |
+
*/
|
1318 |
+
function isKeyable(value) {
|
1319 |
+
var type = typeof value;
|
1320 |
+
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
1321 |
+
? (value !== '__proto__')
|
1322 |
+
: (value === null);
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
/**
|
1326 |
+
* Checks if `func` has its source masked.
|
1327 |
+
*
|
1328 |
+
* @private
|
1329 |
+
* @param {Function} func The function to check.
|
1330 |
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
1331 |
+
*/
|
1332 |
+
function isMasked(func) {
|
1333 |
+
return !!maskSrcKey && (maskSrcKey in func);
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
/**
|
1337 |
+
* Converts `func` to its source code.
|
1338 |
+
*
|
1339 |
+
* @private
|
1340 |
+
* @param {Function} func The function to process.
|
1341 |
+
* @returns {string} Returns the source code.
|
1342 |
+
*/
|
1343 |
+
function toSource(func) {
|
1344 |
+
if (func != null) {
|
1345 |
+
try {
|
1346 |
+
return funcToString.call(func);
|
1347 |
+
} catch (e) {}
|
1348 |
+
try {
|
1349 |
+
return (func + '');
|
1350 |
+
} catch (e) {}
|
1351 |
+
}
|
1352 |
+
return '';
|
1353 |
+
}
|
1354 |
+
|
1355 |
+
/**
|
1356 |
+
* Creates a function that memoizes the result of `func`. If `resolver` is
|
1357 |
+
* provided, it determines the cache key for storing the result based on the
|
1358 |
+
* arguments provided to the memoized function. By default, the first argument
|
1359 |
+
* provided to the memoized function is used as the map cache key. The `func`
|
1360 |
+
* is invoked with the `this` binding of the memoized function.
|
1361 |
+
*
|
1362 |
+
* **Note:** The cache is exposed as the `cache` property on the memoized
|
1363 |
+
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
1364 |
+
* constructor with one whose instances implement the
|
1365 |
+
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
1366 |
+
* method interface of `delete`, `get`, `has`, and `set`.
|
1367 |
+
*
|
1368 |
+
* @static
|
1369 |
+
* @memberOf _
|
1370 |
+
* @since 0.1.0
|
1371 |
+
* @category Function
|
1372 |
+
* @param {Function} func The function to have its output memoized.
|
1373 |
+
* @param {Function} [resolver] The function to resolve the cache key.
|
1374 |
+
* @returns {Function} Returns the new memoized function.
|
1375 |
+
* @example
|
1376 |
+
*
|
1377 |
+
* var object = { 'a': 1, 'b': 2 };
|
1378 |
+
* var other = { 'c': 3, 'd': 4 };
|
1379 |
+
*
|
1380 |
+
* var values = _.memoize(_.values);
|
1381 |
+
* values(object);
|
1382 |
+
* // => [1, 2]
|
1383 |
+
*
|
1384 |
+
* values(other);
|
1385 |
+
* // => [3, 4]
|
1386 |
+
*
|
1387 |
+
* object.a = 2;
|
1388 |
+
* values(object);
|
1389 |
+
* // => [1, 2]
|
1390 |
+
*
|
1391 |
+
* // Modify the result cache.
|
1392 |
+
* values.cache.set(object, ['a', 'b']);
|
1393 |
+
* values(object);
|
1394 |
+
* // => ['a', 'b']
|
1395 |
+
*
|
1396 |
+
* // Replace `_.memoize.Cache`.
|
1397 |
+
* _.memoize.Cache = WeakMap;
|
1398 |
+
*/
|
1399 |
+
function memoize(func, resolver) {
|
1400 |
+
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
|
1401 |
+
throw new TypeError(FUNC_ERROR_TEXT$2);
|
1402 |
+
}
|
1403 |
+
var memoized = function() {
|
1404 |
+
var args = arguments,
|
1405 |
+
key = resolver ? resolver.apply(this, args) : args[0],
|
1406 |
+
cache = memoized.cache;
|
1407 |
+
|
1408 |
+
if (cache.has(key)) {
|
1409 |
+
return cache.get(key);
|
1410 |
+
}
|
1411 |
+
var result = func.apply(this, args);
|
1412 |
+
memoized.cache = cache.set(key, result);
|
1413 |
+
return result;
|
1414 |
+
};
|
1415 |
+
memoized.cache = new (memoize.Cache || MapCache);
|
1416 |
+
return memoized;
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
// Assign cache to `_.memoize`.
|
1420 |
+
memoize.Cache = MapCache;
|
1421 |
+
|
1422 |
+
/**
|
1423 |
+
* Performs a
|
1424 |
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
1425 |
+
* comparison between two values to determine if they are equivalent.
|
1426 |
+
*
|
1427 |
+
* @static
|
1428 |
+
* @memberOf _
|
1429 |
+
* @since 4.0.0
|
1430 |
+
* @category Lang
|
1431 |
+
* @param {*} value The value to compare.
|
1432 |
+
* @param {*} other The other value to compare.
|
1433 |
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
1434 |
+
* @example
|
1435 |
+
*
|
1436 |
+
* var object = { 'a': 1 };
|
1437 |
+
* var other = { 'a': 1 };
|
1438 |
+
*
|
1439 |
+
* _.eq(object, object);
|
1440 |
+
* // => true
|
1441 |
+
*
|
1442 |
+
* _.eq(object, other);
|
1443 |
+
* // => false
|
1444 |
+
*
|
1445 |
+
* _.eq('a', 'a');
|
1446 |
+
* // => true
|
1447 |
+
*
|
1448 |
+
* _.eq('a', Object('a'));
|
1449 |
+
* // => false
|
1450 |
+
*
|
1451 |
+
* _.eq(NaN, NaN);
|
1452 |
+
* // => true
|
1453 |
+
*/
|
1454 |
+
function eq(value, other) {
|
1455 |
+
return value === other || (value !== value && other !== other);
|
1456 |
+
}
|
1457 |
+
|
1458 |
+
/**
|
1459 |
+
* Checks if `value` is classified as a `Function` object.
|
1460 |
+
*
|
1461 |
+
* @static
|
1462 |
+
* @memberOf _
|
1463 |
+
* @since 0.1.0
|
1464 |
+
* @category Lang
|
1465 |
+
* @param {*} value The value to check.
|
1466 |
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
1467 |
+
* @example
|
1468 |
+
*
|
1469 |
+
* _.isFunction(_);
|
1470 |
+
* // => true
|
1471 |
+
*
|
1472 |
+
* _.isFunction(/abc/);
|
1473 |
+
* // => false
|
1474 |
+
*/
|
1475 |
+
function isFunction(value) {
|
1476 |
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
1477 |
+
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
1478 |
+
var tag = isObject$2(value) ? objectToString$2.call(value) : '';
|
1479 |
+
return tag == funcTag || tag == genTag;
|
1480 |
+
}
|
1481 |
+
|
1482 |
+
/**
|
1483 |
+
* Checks if `value` is the
|
1484 |
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
1485 |
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
1486 |
+
*
|
1487 |
+
* @static
|
1488 |
+
* @memberOf _
|
1489 |
+
* @since 0.1.0
|
1490 |
+
* @category Lang
|
1491 |
+
* @param {*} value The value to check.
|
1492 |
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
1493 |
+
* @example
|
1494 |
+
*
|
1495 |
+
* _.isObject({});
|
1496 |
+
* // => true
|
1497 |
+
*
|
1498 |
+
* _.isObject([1, 2, 3]);
|
1499 |
+
* // => true
|
1500 |
+
*
|
1501 |
+
* _.isObject(_.noop);
|
1502 |
+
* // => true
|
1503 |
+
*
|
1504 |
+
* _.isObject(null);
|
1505 |
+
* // => false
|
1506 |
+
*/
|
1507 |
+
function isObject$2(value) {
|
1508 |
+
var type = typeof value;
|
1509 |
+
return !!value && (type == 'object' || type == 'function');
|
1510 |
+
}
|
1511 |
+
|
1512 |
+
var lodash_memoize = memoize;
|
1513 |
+
|
1514 |
+
var resizeObservers = [];
|
1515 |
+
|
1516 |
+
var hasActiveObservations = function () {
|
1517 |
+
return resizeObservers.some(function (ro) { return ro.activeTargets.length > 0; });
|
1518 |
+
};
|
1519 |
+
|
1520 |
+
var hasSkippedObservations = function () {
|
1521 |
+
return resizeObservers.some(function (ro) { return ro.skippedTargets.length > 0; });
|
1522 |
+
};
|
1523 |
+
|
1524 |
+
var msg = 'ResizeObserver loop completed with undelivered notifications.';
|
1525 |
+
var deliverResizeLoopError = function () {
|
1526 |
+
var event;
|
1527 |
+
if (typeof ErrorEvent === 'function') {
|
1528 |
+
event = new ErrorEvent('error', {
|
1529 |
+
message: msg
|
1530 |
+
});
|
1531 |
+
}
|
1532 |
+
else {
|
1533 |
+
event = document.createEvent('Event');
|
1534 |
+
event.initEvent('error', false, false);
|
1535 |
+
event.message = msg;
|
1536 |
+
}
|
1537 |
+
window.dispatchEvent(event);
|
1538 |
+
};
|
1539 |
+
|
1540 |
+
var ResizeObserverBoxOptions;
|
1541 |
+
(function (ResizeObserverBoxOptions) {
|
1542 |
+
ResizeObserverBoxOptions["BORDER_BOX"] = "border-box";
|
1543 |
+
ResizeObserverBoxOptions["CONTENT_BOX"] = "content-box";
|
1544 |
+
ResizeObserverBoxOptions["DEVICE_PIXEL_CONTENT_BOX"] = "device-pixel-content-box";
|
1545 |
+
})(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));
|
1546 |
+
|
1547 |
+
var freeze = function (obj) { return Object.freeze(obj); };
|
1548 |
+
|
1549 |
+
var ResizeObserverSize = (function () {
|
1550 |
+
function ResizeObserverSize(inlineSize, blockSize) {
|
1551 |
+
this.inlineSize = inlineSize;
|
1552 |
+
this.blockSize = blockSize;
|
1553 |
+
freeze(this);
|
1554 |
+
}
|
1555 |
+
return ResizeObserverSize;
|
1556 |
+
}());
|
1557 |
+
|
1558 |
+
var DOMRectReadOnly = (function () {
|
1559 |
+
function DOMRectReadOnly(x, y, width, height) {
|
1560 |
+
this.x = x;
|
1561 |
+
this.y = y;
|
1562 |
+
this.width = width;
|
1563 |
+
this.height = height;
|
1564 |
+
this.top = this.y;
|
1565 |
+
this.left = this.x;
|
1566 |
+
this.bottom = this.top + this.height;
|
1567 |
+
this.right = this.left + this.width;
|
1568 |
+
return freeze(this);
|
1569 |
+
}
|
1570 |
+
DOMRectReadOnly.prototype.toJSON = function () {
|
1571 |
+
var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;
|
1572 |
+
return { x: x, y: y, top: top, right: right, bottom: bottom, left: left, width: width, height: height };
|
1573 |
+
};
|
1574 |
+
DOMRectReadOnly.fromRect = function (rectangle) {
|
1575 |
+
return new DOMRectReadOnly(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
|
1576 |
+
};
|
1577 |
+
return DOMRectReadOnly;
|
1578 |
+
}());
|
1579 |
+
|
1580 |
+
var isSVG = function (target) { return target instanceof SVGElement && 'getBBox' in target; };
|
1581 |
+
var isHidden = function (target) {
|
1582 |
+
if (isSVG(target)) {
|
1583 |
+
var _a = target.getBBox(), width = _a.width, height = _a.height;
|
1584 |
+
return !width && !height;
|
1585 |
+
}
|
1586 |
+
var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;
|
1587 |
+
return !(offsetWidth || offsetHeight || target.getClientRects().length);
|
1588 |
+
};
|
1589 |
+
var isElement = function (obj) {
|
1590 |
+
var _a, _b;
|
1591 |
+
if (obj instanceof Element) {
|
1592 |
+
return true;
|
1593 |
+
}
|
1594 |
+
var scope = (_b = (_a = obj) === null || _a === void 0 ? void 0 : _a.ownerDocument) === null || _b === void 0 ? void 0 : _b.defaultView;
|
1595 |
+
return !!(scope && obj instanceof scope.Element);
|
1596 |
+
};
|
1597 |
+
var isReplacedElement = function (target) {
|
1598 |
+
switch (target.tagName) {
|
1599 |
+
case 'INPUT':
|
1600 |
+
if (target.type !== 'image') {
|
1601 |
+
break;
|
1602 |
+
}
|
1603 |
+
case 'VIDEO':
|
1604 |
+
case 'AUDIO':
|
1605 |
+
case 'EMBED':
|
1606 |
+
case 'OBJECT':
|
1607 |
+
case 'CANVAS':
|
1608 |
+
case 'IFRAME':
|
1609 |
+
case 'IMG':
|
1610 |
+
return true;
|
1611 |
+
}
|
1612 |
+
return false;
|
1613 |
+
};
|
1614 |
+
|
1615 |
+
var global$1 = typeof window !== 'undefined' ? window : {};
|
1616 |
+
|
1617 |
+
var cache = new WeakMap();
|
1618 |
+
var scrollRegexp = /auto|scroll/;
|
1619 |
+
var verticalRegexp = /^tb|vertical/;
|
1620 |
+
var IE = (/msie|trident/i).test(global$1.navigator && global$1.navigator.userAgent);
|
1621 |
+
var parseDimension = function (pixel) { return parseFloat(pixel || '0'); };
|
1622 |
+
var size = function (inlineSize, blockSize, switchSizes) {
|
1623 |
+
if (inlineSize === void 0) { inlineSize = 0; }
|
1624 |
+
if (blockSize === void 0) { blockSize = 0; }
|
1625 |
+
if (switchSizes === void 0) { switchSizes = false; }
|
1626 |
+
return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);
|
1627 |
+
};
|
1628 |
+
var zeroBoxes = freeze({
|
1629 |
+
devicePixelContentBoxSize: size(),
|
1630 |
+
borderBoxSize: size(),
|
1631 |
+
contentBoxSize: size(),
|
1632 |
+
contentRect: new DOMRectReadOnly(0, 0, 0, 0)
|
1633 |
+
});
|
1634 |
+
var calculateBoxSizes = function (target, forceRecalculation) {
|
1635 |
+
if (forceRecalculation === void 0) { forceRecalculation = false; }
|
1636 |
+
if (cache.has(target) && !forceRecalculation) {
|
1637 |
+
return cache.get(target);
|
1638 |
+
}
|
1639 |
+
if (isHidden(target)) {
|
1640 |
+
cache.set(target, zeroBoxes);
|
1641 |
+
return zeroBoxes;
|
1642 |
+
}
|
1643 |
+
var cs = getComputedStyle(target);
|
1644 |
+
var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();
|
1645 |
+
var removePadding = !IE && cs.boxSizing === 'border-box';
|
1646 |
+
var switchSizes = verticalRegexp.test(cs.writingMode || '');
|
1647 |
+
var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || '');
|
1648 |
+
var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || '');
|
1649 |
+
var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);
|
1650 |
+
var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);
|
1651 |
+
var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);
|
1652 |
+
var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);
|
1653 |
+
var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);
|
1654 |
+
var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);
|
1655 |
+
var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);
|
1656 |
+
var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);
|
1657 |
+
var horizontalPadding = paddingLeft + paddingRight;
|
1658 |
+
var verticalPadding = paddingTop + paddingBottom;
|
1659 |
+
var horizontalBorderArea = borderLeft + borderRight;
|
1660 |
+
var verticalBorderArea = borderTop + borderBottom;
|
1661 |
+
var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;
|
1662 |
+
var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;
|
1663 |
+
var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;
|
1664 |
+
var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;
|
1665 |
+
var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;
|
1666 |
+
var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;
|
1667 |
+
var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;
|
1668 |
+
var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;
|
1669 |
+
var boxes = freeze({
|
1670 |
+
devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),
|
1671 |
+
borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),
|
1672 |
+
contentBoxSize: size(contentWidth, contentHeight, switchSizes),
|
1673 |
+
contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)
|
1674 |
+
});
|
1675 |
+
cache.set(target, boxes);
|
1676 |
+
return boxes;
|
1677 |
+
};
|
1678 |
+
var calculateBoxSize = function (target, observedBox, forceRecalculation) {
|
1679 |
+
var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;
|
1680 |
+
switch (observedBox) {
|
1681 |
+
case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:
|
1682 |
+
return devicePixelContentBoxSize;
|
1683 |
+
case ResizeObserverBoxOptions.BORDER_BOX:
|
1684 |
+
return borderBoxSize;
|
1685 |
+
default:
|
1686 |
+
return contentBoxSize;
|
1687 |
+
}
|
1688 |
+
};
|
1689 |
+
|
1690 |
+
var ResizeObserverEntry = (function () {
|
1691 |
+
function ResizeObserverEntry(target) {
|
1692 |
+
var boxes = calculateBoxSizes(target);
|
1693 |
+
this.target = target;
|
1694 |
+
this.contentRect = boxes.contentRect;
|
1695 |
+
this.borderBoxSize = freeze([boxes.borderBoxSize]);
|
1696 |
+
this.contentBoxSize = freeze([boxes.contentBoxSize]);
|
1697 |
+
this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);
|
1698 |
+
}
|
1699 |
+
return ResizeObserverEntry;
|
1700 |
+
}());
|
1701 |
+
|
1702 |
+
var calculateDepthForNode = function (node) {
|
1703 |
+
if (isHidden(node)) {
|
1704 |
+
return Infinity;
|
1705 |
+
}
|
1706 |
+
var depth = 0;
|
1707 |
+
var parent = node.parentNode;
|
1708 |
+
while (parent) {
|
1709 |
+
depth += 1;
|
1710 |
+
parent = parent.parentNode;
|
1711 |
+
}
|
1712 |
+
return depth;
|
1713 |
+
};
|
1714 |
+
|
1715 |
+
var broadcastActiveObservations = function () {
|
1716 |
+
var shallowestDepth = Infinity;
|
1717 |
+
var callbacks = [];
|
1718 |
+
resizeObservers.forEach(function processObserver(ro) {
|
1719 |
+
if (ro.activeTargets.length === 0) {
|
1720 |
+
return;
|
1721 |
+
}
|
1722 |
+
var entries = [];
|
1723 |
+
ro.activeTargets.forEach(function processTarget(ot) {
|
1724 |
+
var entry = new ResizeObserverEntry(ot.target);
|
1725 |
+
var targetDepth = calculateDepthForNode(ot.target);
|
1726 |
+
entries.push(entry);
|
1727 |
+
ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);
|
1728 |
+
if (targetDepth < shallowestDepth) {
|
1729 |
+
shallowestDepth = targetDepth;
|
1730 |
+
}
|
1731 |
+
});
|
1732 |
+
callbacks.push(function resizeObserverCallback() {
|
1733 |
+
ro.callback.call(ro.observer, entries, ro.observer);
|
1734 |
+
});
|
1735 |
+
ro.activeTargets.splice(0, ro.activeTargets.length);
|
1736 |
+
});
|
1737 |
+
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
1738 |
+
var callback = callbacks_1[_i];
|
1739 |
+
callback();
|
1740 |
+
}
|
1741 |
+
return shallowestDepth;
|
1742 |
+
};
|
1743 |
+
|
1744 |
+
var gatherActiveObservationsAtDepth = function (depth) {
|
1745 |
+
resizeObservers.forEach(function processObserver(ro) {
|
1746 |
+
ro.activeTargets.splice(0, ro.activeTargets.length);
|
1747 |
+
ro.skippedTargets.splice(0, ro.skippedTargets.length);
|
1748 |
+
ro.observationTargets.forEach(function processTarget(ot) {
|
1749 |
+
if (ot.isActive()) {
|
1750 |
+
if (calculateDepthForNode(ot.target) > depth) {
|
1751 |
+
ro.activeTargets.push(ot);
|
1752 |
+
}
|
1753 |
+
else {
|
1754 |
+
ro.skippedTargets.push(ot);
|
1755 |
+
}
|
1756 |
+
}
|
1757 |
+
});
|
1758 |
+
});
|
1759 |
+
};
|
1760 |
+
|
1761 |
+
var process = function () {
|
1762 |
+
var depth = 0;
|
1763 |
+
gatherActiveObservationsAtDepth(depth);
|
1764 |
+
while (hasActiveObservations()) {
|
1765 |
+
depth = broadcastActiveObservations();
|
1766 |
+
gatherActiveObservationsAtDepth(depth);
|
1767 |
+
}
|
1768 |
+
if (hasSkippedObservations()) {
|
1769 |
+
deliverResizeLoopError();
|
1770 |
+
}
|
1771 |
+
return depth > 0;
|
1772 |
+
};
|
1773 |
+
|
1774 |
+
var trigger;
|
1775 |
+
var callbacks = [];
|
1776 |
+
var notify = function () { return callbacks.splice(0).forEach(function (cb) { return cb(); }); };
|
1777 |
+
var queueMicroTask = function (callback) {
|
1778 |
+
if (!trigger) {
|
1779 |
+
var toggle_1 = 0;
|
1780 |
+
var el_1 = document.createTextNode('');
|
1781 |
+
var config = { characterData: true };
|
1782 |
+
new MutationObserver(function () { return notify(); }).observe(el_1, config);
|
1783 |
+
trigger = function () { el_1.textContent = "" + (toggle_1 ? toggle_1-- : toggle_1++); };
|
1784 |
+
}
|
1785 |
+
callbacks.push(callback);
|
1786 |
+
trigger();
|
1787 |
+
};
|
1788 |
+
|
1789 |
+
var queueResizeObserver = function (cb) {
|
1790 |
+
queueMicroTask(function ResizeObserver() {
|
1791 |
+
requestAnimationFrame(cb);
|
1792 |
+
});
|
1793 |
+
};
|
1794 |
+
|
1795 |
+
var watching = 0;
|
1796 |
+
var isWatching = function () { return !!watching; };
|
1797 |
+
var CATCH_PERIOD = 250;
|
1798 |
+
var observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };
|
1799 |
+
var events = [
|
1800 |
+
'resize',
|
1801 |
+
'load',
|
1802 |
+
'transitionend',
|
1803 |
+
'animationend',
|
1804 |
+
'animationstart',
|
1805 |
+
'animationiteration',
|
1806 |
+
'keyup',
|
1807 |
+
'keydown',
|
1808 |
+
'mouseup',
|
1809 |
+
'mousedown',
|
1810 |
+
'mouseover',
|
1811 |
+
'mouseout',
|
1812 |
+
'blur',
|
1813 |
+
'focus'
|
1814 |
+
];
|
1815 |
+
var time = function (timeout) {
|
1816 |
+
if (timeout === void 0) { timeout = 0; }
|
1817 |
+
return Date.now() + timeout;
|
1818 |
+
};
|
1819 |
+
var scheduled = false;
|
1820 |
+
var Scheduler = (function () {
|
1821 |
+
function Scheduler() {
|
1822 |
+
var _this = this;
|
1823 |
+
this.stopped = true;
|
1824 |
+
this.listener = function () { return _this.schedule(); };
|
1825 |
+
}
|
1826 |
+
Scheduler.prototype.run = function (timeout) {
|
1827 |
+
var _this = this;
|
1828 |
+
if (timeout === void 0) { timeout = CATCH_PERIOD; }
|
1829 |
+
if (scheduled) {
|
1830 |
+
return;
|
1831 |
+
}
|
1832 |
+
scheduled = true;
|
1833 |
+
var until = time(timeout);
|
1834 |
+
queueResizeObserver(function () {
|
1835 |
+
var elementsHaveResized = false;
|
1836 |
+
try {
|
1837 |
+
elementsHaveResized = process();
|
1838 |
+
}
|
1839 |
+
finally {
|
1840 |
+
scheduled = false;
|
1841 |
+
timeout = until - time();
|
1842 |
+
if (!isWatching()) {
|
1843 |
+
return;
|
1844 |
+
}
|
1845 |
+
if (elementsHaveResized) {
|
1846 |
+
_this.run(1000);
|
1847 |
+
}
|
1848 |
+
else if (timeout > 0) {
|
1849 |
+
_this.run(timeout);
|
1850 |
+
}
|
1851 |
+
else {
|
1852 |
+
_this.start();
|
1853 |
+
}
|
1854 |
+
}
|
1855 |
+
});
|
1856 |
+
};
|
1857 |
+
Scheduler.prototype.schedule = function () {
|
1858 |
+
this.stop();
|
1859 |
+
this.run();
|
1860 |
+
};
|
1861 |
+
Scheduler.prototype.observe = function () {
|
1862 |
+
var _this = this;
|
1863 |
+
var cb = function () { return _this.observer && _this.observer.observe(document.body, observerConfig); };
|
1864 |
+
document.body ? cb() : global$1.addEventListener('DOMContentLoaded', cb);
|
1865 |
+
};
|
1866 |
+
Scheduler.prototype.start = function () {
|
1867 |
+
var _this = this;
|
1868 |
+
if (this.stopped) {
|
1869 |
+
this.stopped = false;
|
1870 |
+
this.observer = new MutationObserver(this.listener);
|
1871 |
+
this.observe();
|
1872 |
+
events.forEach(function (name) { return global$1.addEventListener(name, _this.listener, true); });
|
1873 |
+
}
|
1874 |
+
};
|
1875 |
+
Scheduler.prototype.stop = function () {
|
1876 |
+
var _this = this;
|
1877 |
+
if (!this.stopped) {
|
1878 |
+
this.observer && this.observer.disconnect();
|
1879 |
+
events.forEach(function (name) { return global$1.removeEventListener(name, _this.listener, true); });
|
1880 |
+
this.stopped = true;
|
1881 |
+
}
|
1882 |
+
};
|
1883 |
+
return Scheduler;
|
1884 |
+
}());
|
1885 |
+
var scheduler = new Scheduler();
|
1886 |
+
var updateCount = function (n) {
|
1887 |
+
!watching && n > 0 && scheduler.start();
|
1888 |
+
watching += n;
|
1889 |
+
!watching && scheduler.stop();
|
1890 |
+
};
|
1891 |
+
|
1892 |
+
var skipNotifyOnElement = function (target) {
|
1893 |
+
return !isSVG(target)
|
1894 |
+
&& !isReplacedElement(target)
|
1895 |
+
&& getComputedStyle(target).display === 'inline';
|
1896 |
+
};
|
1897 |
+
var ResizeObservation = (function () {
|
1898 |
+
function ResizeObservation(target, observedBox) {
|
1899 |
+
this.target = target;
|
1900 |
+
this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;
|
1901 |
+
this.lastReportedSize = {
|
1902 |
+
inlineSize: 0,
|
1903 |
+
blockSize: 0
|
1904 |
+
};
|
1905 |
+
}
|
1906 |
+
ResizeObservation.prototype.isActive = function () {
|
1907 |
+
var size = calculateBoxSize(this.target, this.observedBox, true);
|
1908 |
+
if (skipNotifyOnElement(this.target)) {
|
1909 |
+
this.lastReportedSize = size;
|
1910 |
+
}
|
1911 |
+
if (this.lastReportedSize.inlineSize !== size.inlineSize
|
1912 |
+
|| this.lastReportedSize.blockSize !== size.blockSize) {
|
1913 |
+
return true;
|
1914 |
+
}
|
1915 |
+
return false;
|
1916 |
+
};
|
1917 |
+
return ResizeObservation;
|
1918 |
+
}());
|
1919 |
+
|
1920 |
+
var ResizeObserverDetail = (function () {
|
1921 |
+
function ResizeObserverDetail(resizeObserver, callback) {
|
1922 |
+
this.activeTargets = [];
|
1923 |
+
this.skippedTargets = [];
|
1924 |
+
this.observationTargets = [];
|
1925 |
+
this.observer = resizeObserver;
|
1926 |
+
this.callback = callback;
|
1927 |
+
}
|
1928 |
+
return ResizeObserverDetail;
|
1929 |
+
}());
|
1930 |
+
|
1931 |
+
var observerMap = new WeakMap();
|
1932 |
+
var getObservationIndex = function (observationTargets, target) {
|
1933 |
+
for (var i = 0; i < observationTargets.length; i += 1) {
|
1934 |
+
if (observationTargets[i].target === target) {
|
1935 |
+
return i;
|
1936 |
+
}
|
1937 |
+
}
|
1938 |
+
return -1;
|
1939 |
+
};
|
1940 |
+
var ResizeObserverController = (function () {
|
1941 |
+
function ResizeObserverController() {
|
1942 |
+
}
|
1943 |
+
ResizeObserverController.connect = function (resizeObserver, callback) {
|
1944 |
+
var detail = new ResizeObserverDetail(resizeObserver, callback);
|
1945 |
+
observerMap.set(resizeObserver, detail);
|
1946 |
+
};
|
1947 |
+
ResizeObserverController.observe = function (resizeObserver, target, options) {
|
1948 |
+
var detail = observerMap.get(resizeObserver);
|
1949 |
+
var firstObservation = detail.observationTargets.length === 0;
|
1950 |
+
if (getObservationIndex(detail.observationTargets, target) < 0) {
|
1951 |
+
firstObservation && resizeObservers.push(detail);
|
1952 |
+
detail.observationTargets.push(new ResizeObservation(target, options && options.box));
|
1953 |
+
updateCount(1);
|
1954 |
+
scheduler.schedule();
|
1955 |
+
}
|
1956 |
+
};
|
1957 |
+
ResizeObserverController.unobserve = function (resizeObserver, target) {
|
1958 |
+
var detail = observerMap.get(resizeObserver);
|
1959 |
+
var index = getObservationIndex(detail.observationTargets, target);
|
1960 |
+
var lastObservation = detail.observationTargets.length === 1;
|
1961 |
+
if (index >= 0) {
|
1962 |
+
lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);
|
1963 |
+
detail.observationTargets.splice(index, 1);
|
1964 |
+
updateCount(-1);
|
1965 |
+
}
|
1966 |
+
};
|
1967 |
+
ResizeObserverController.disconnect = function (resizeObserver) {
|
1968 |
+
var _this = this;
|
1969 |
+
var detail = observerMap.get(resizeObserver);
|
1970 |
+
detail.observationTargets.slice().forEach(function (ot) { return _this.unobserve(resizeObserver, ot.target); });
|
1971 |
+
detail.activeTargets.splice(0, detail.activeTargets.length);
|
1972 |
+
};
|
1973 |
+
return ResizeObserverController;
|
1974 |
+
}());
|
1975 |
+
|
1976 |
+
var ResizeObserver = (function () {
|
1977 |
+
function ResizeObserver(callback) {
|
1978 |
+
if (arguments.length === 0) {
|
1979 |
+
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
1980 |
+
}
|
1981 |
+
if (typeof callback !== 'function') {
|
1982 |
+
throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
|
1983 |
+
}
|
1984 |
+
ResizeObserverController.connect(this, callback);
|
1985 |
+
}
|
1986 |
+
ResizeObserver.prototype.observe = function (target, options) {
|
1987 |
+
if (arguments.length === 0) {
|
1988 |
+
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
1989 |
+
}
|
1990 |
+
if (!isElement(target)) {
|
1991 |
+
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
1992 |
+
}
|
1993 |
+
ResizeObserverController.observe(this, target, options);
|
1994 |
+
};
|
1995 |
+
ResizeObserver.prototype.unobserve = function (target) {
|
1996 |
+
if (arguments.length === 0) {
|
1997 |
+
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
1998 |
+
}
|
1999 |
+
if (!isElement(target)) {
|
2000 |
+
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
2001 |
+
}
|
2002 |
+
ResizeObserverController.unobserve(this, target);
|
2003 |
+
};
|
2004 |
+
ResizeObserver.prototype.disconnect = function () {
|
2005 |
+
ResizeObserverController.disconnect(this);
|
2006 |
+
};
|
2007 |
+
ResizeObserver.toString = function () {
|
2008 |
+
return 'function ResizeObserver () { [polyfill code] }';
|
2009 |
+
};
|
2010 |
+
return ResizeObserver;
|
2011 |
+
}());
|
2012 |
+
|
2013 |
+
// Helper function to retrieve options from element attributes
|
2014 |
+
var getOptions = function getOptions(obj) {
|
2015 |
+
var options = Array.prototype.reduce.call(obj, function (acc, attribute) {
|
2016 |
+
var option = attribute.name.match(/data-asl_simplebar-(.+)/);
|
2017 |
+
|
2018 |
+
if (option) {
|
2019 |
+
var key = option[1].replace(/\W+(.)/g, function (x, chr) {
|
2020 |
+
return chr.toUpperCase();
|
2021 |
+
});
|
2022 |
+
|
2023 |
+
switch (attribute.value) {
|
2024 |
+
case 'true':
|
2025 |
+
acc[key] = true;
|
2026 |
+
break;
|
2027 |
+
|
2028 |
+
case 'false':
|
2029 |
+
acc[key] = false;
|
2030 |
+
break;
|
2031 |
+
|
2032 |
+
case undefined:
|
2033 |
+
acc[key] = true;
|
2034 |
+
break;
|
2035 |
+
|
2036 |
+
default:
|
2037 |
+
acc[key] = attribute.value;
|
2038 |
+
}
|
2039 |
+
}
|
2040 |
+
|
2041 |
+
return acc;
|
2042 |
+
}, {});
|
2043 |
+
return options;
|
2044 |
+
};
|
2045 |
+
function getElementWindow(element) {
|
2046 |
+
if (!element || !element.ownerDocument || !element.ownerDocument.defaultView) {
|
2047 |
+
return window;
|
2048 |
+
}
|
2049 |
+
|
2050 |
+
return element.ownerDocument.defaultView;
|
2051 |
+
}
|
2052 |
+
function getElementDocument(element) {
|
2053 |
+
if (!element || !element.ownerDocument) {
|
2054 |
+
return document;
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
return element.ownerDocument;
|
2058 |
+
}
|
2059 |
+
|
2060 |
+
var cachedScrollbarWidth = null;
|
2061 |
+
var cachedDevicePixelRatio = null;
|
2062 |
+
window.addEventListener('resize', function () {
|
2063 |
+
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
|
2064 |
+
cachedDevicePixelRatio = window.devicePixelRatio;
|
2065 |
+
cachedScrollbarWidth = null;
|
2066 |
+
}
|
2067 |
+
});
|
2068 |
+
function scrollbarWidth(el) {
|
2069 |
+
if (cachedScrollbarWidth === null) {
|
2070 |
+
var document = getElementDocument(el);
|
2071 |
+
|
2072 |
+
if (typeof document === 'undefined') {
|
2073 |
+
cachedScrollbarWidth = 0;
|
2074 |
+
return cachedScrollbarWidth;
|
2075 |
+
}
|
2076 |
+
|
2077 |
+
var body = document.body;
|
2078 |
+
var box = document.createElement('div');
|
2079 |
+
box.classList.add('asl_simplebar-hide-scrollbar');
|
2080 |
+
body.appendChild(box);
|
2081 |
+
var width = box.getBoundingClientRect().right;
|
2082 |
+
body.removeChild(box);
|
2083 |
+
cachedScrollbarWidth = width;
|
2084 |
+
}
|
2085 |
+
|
2086 |
+
return cachedScrollbarWidth;
|
2087 |
+
}
|
2088 |
+
|
2089 |
+
var asl_SimpleBar =
|
2090 |
+
/*#__PURE__*/
|
2091 |
+
function () {
|
2092 |
+
function asl_SimpleBar(element, options) {
|
2093 |
+
var _this = this;
|
2094 |
+
|
2095 |
+
this.onScroll = function () {
|
2096 |
+
var elWindow = getElementWindow(_this.el);
|
2097 |
+
|
2098 |
+
if (!_this.scrollXTicking) {
|
2099 |
+
elWindow.requestAnimationFrame(_this.scrollX);
|
2100 |
+
_this.scrollXTicking = true;
|
2101 |
+
}
|
2102 |
+
|
2103 |
+
if (!_this.scrollYTicking) {
|
2104 |
+
elWindow.requestAnimationFrame(_this.scrollY);
|
2105 |
+
_this.scrollYTicking = true;
|
2106 |
+
}
|
2107 |
+
};
|
2108 |
+
|
2109 |
+
this.scrollX = function () {
|
2110 |
+
if (_this.axis.x.isOverflowing) {
|
2111 |
+
_this.showScrollbar('x');
|
2112 |
+
|
2113 |
+
_this.positionScrollbar('x');
|
2114 |
+
}
|
2115 |
+
|
2116 |
+
_this.scrollXTicking = false;
|
2117 |
+
};
|
2118 |
+
|
2119 |
+
this.scrollY = function () {
|
2120 |
+
if (_this.axis.y.isOverflowing) {
|
2121 |
+
_this.showScrollbar('y');
|
2122 |
+
|
2123 |
+
_this.positionScrollbar('y');
|
2124 |
+
}
|
2125 |
+
|
2126 |
+
_this.scrollYTicking = false;
|
2127 |
+
};
|
2128 |
+
|
2129 |
+
this.onMouseEnter = function () {
|
2130 |
+
_this.showScrollbar('x');
|
2131 |
+
|
2132 |
+
_this.showScrollbar('y');
|
2133 |
+
};
|
2134 |
+
|
2135 |
+
this.onMouseMove = function (e) {
|
2136 |
+
_this.mouseX = e.clientX;
|
2137 |
+
_this.mouseY = e.clientY;
|
2138 |
+
|
2139 |
+
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
2140 |
+
_this.onMouseMoveForAxis('x');
|
2141 |
+
}
|
2142 |
+
|
2143 |
+
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
2144 |
+
_this.onMouseMoveForAxis('y');
|
2145 |
+
}
|
2146 |
+
};
|
2147 |
+
|
2148 |
+
this.onMouseLeave = function () {
|
2149 |
+
_this.onMouseMove.cancel();
|
2150 |
+
|
2151 |
+
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
2152 |
+
_this.onMouseLeaveForAxis('x');
|
2153 |
+
}
|
2154 |
+
|
2155 |
+
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
2156 |
+
_this.onMouseLeaveForAxis('y');
|
2157 |
+
}
|
2158 |
+
|
2159 |
+
_this.mouseX = -1;
|
2160 |
+
_this.mouseY = -1;
|
2161 |
+
};
|
2162 |
+
|
2163 |
+
this.onWindowResize = function () {
|
2164 |
+
// Recalculate scrollbarWidth in case it's a zoom
|
2165 |
+
_this.scrollbarWidth = _this.getScrollbarWidth();
|
2166 |
+
|
2167 |
+
_this.hideNativeScrollbar();
|
2168 |
+
};
|
2169 |
+
|
2170 |
+
this.hideScrollbars = function () {
|
2171 |
+
_this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
|
2172 |
+
_this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
|
2173 |
+
|
2174 |
+
if (!_this.isWithinBounds(_this.axis.y.track.rect)) {
|
2175 |
+
_this.axis.y.scrollbar.el.classList.remove(_this.classNames.visible);
|
2176 |
+
|
2177 |
+
_this.axis.y.isVisible = false;
|
2178 |
+
}
|
2179 |
+
|
2180 |
+
if (!_this.isWithinBounds(_this.axis.x.track.rect)) {
|
2181 |
+
_this.axis.x.scrollbar.el.classList.remove(_this.classNames.visible);
|
2182 |
+
|
2183 |
+
_this.axis.x.isVisible = false;
|
2184 |
+
}
|
2185 |
+
};
|
2186 |
+
|
2187 |
+
this.onPointerEvent = function (e) {
|
2188 |
+
var isWithinTrackXBounds, isWithinTrackYBounds;
|
2189 |
+
_this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
|
2190 |
+
_this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
|
2191 |
+
|
2192 |
+
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
2193 |
+
isWithinTrackXBounds = _this.isWithinBounds(_this.axis.x.track.rect);
|
2194 |
+
}
|
2195 |
+
|
2196 |
+
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
2197 |
+
isWithinTrackYBounds = _this.isWithinBounds(_this.axis.y.track.rect);
|
2198 |
+
} // If any pointer event is called on the scrollbar
|
2199 |
+
|
2200 |
+
|
2201 |
+
if (isWithinTrackXBounds || isWithinTrackYBounds) {
|
2202 |
+
// Preventing the event's default action stops text being
|
2203 |
+
// selectable during the drag.
|
2204 |
+
e.preventDefault(); // Prevent event leaking
|
2205 |
+
|
2206 |
+
e.stopPropagation();
|
2207 |
+
|
2208 |
+
if (e.type === 'mousedown') {
|
2209 |
+
if (isWithinTrackXBounds) {
|
2210 |
+
_this.axis.x.scrollbar.rect = _this.axis.x.scrollbar.el.getBoundingClientRect();
|
2211 |
+
|
2212 |
+
if (_this.isWithinBounds(_this.axis.x.scrollbar.rect)) {
|
2213 |
+
_this.onDragStart(e, 'x');
|
2214 |
+
} else {
|
2215 |
+
_this.onTrackClick(e, 'x');
|
2216 |
+
}
|
2217 |
+
}
|
2218 |
+
|
2219 |
+
if (isWithinTrackYBounds) {
|
2220 |
+
_this.axis.y.scrollbar.rect = _this.axis.y.scrollbar.el.getBoundingClientRect();
|
2221 |
+
|
2222 |
+
if (_this.isWithinBounds(_this.axis.y.scrollbar.rect)) {
|
2223 |
+
_this.onDragStart(e, 'y');
|
2224 |
+
} else {
|
2225 |
+
_this.onTrackClick(e, 'y');
|
2226 |
+
}
|
2227 |
+
}
|
2228 |
+
}
|
2229 |
+
}
|
2230 |
+
};
|
2231 |
+
|
2232 |
+
this.drag = function (e) {
|
2233 |
+
var eventOffset;
|
2234 |
+
var track = _this.axis[_this.draggedAxis].track;
|
2235 |
+
var trackSize = track.rect[_this.axis[_this.draggedAxis].sizeAttr];
|
2236 |
+
var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
|
2237 |
+
var contentSize = _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollSizeAttr];
|
2238 |
+
var hostSize = parseInt(_this.elStyles[_this.axis[_this.draggedAxis].sizeAttr], 10);
|
2239 |
+
e.preventDefault();
|
2240 |
+
e.stopPropagation();
|
2241 |
+
|
2242 |
+
if (_this.draggedAxis === 'y') {
|
2243 |
+
eventOffset = e.pageY;
|
2244 |
+
} else {
|
2245 |
+
eventOffset = e.pageX;
|
2246 |
+
} // Calculate how far the user's mouse is from the top/left of the scrollbar (minus the dragOffset).
|
2247 |
+
|
2248 |
+
|
2249 |
+
var dragPos = eventOffset - track.rect[_this.axis[_this.draggedAxis].offsetAttr] - _this.axis[_this.draggedAxis].dragOffset; // Convert the mouse position into a percentage of the scrollbar height/width.
|
2250 |
+
|
2251 |
+
var dragPerc = dragPos / (trackSize - scrollbar.size); // Scroll the content by the same percentage.
|
2252 |
+
|
2253 |
+
var scrollPos = dragPerc * (contentSize - hostSize); // Fix browsers inconsistency on RTL
|
2254 |
+
|
2255 |
+
if (_this.draggedAxis === 'x') {
|
2256 |
+
scrollPos = _this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? scrollPos - (trackSize + scrollbar.size) : scrollPos;
|
2257 |
+
scrollPos = _this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollPos : scrollPos;
|
2258 |
+
}
|
2259 |
+
|
2260 |
+
_this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollOffsetAttr] = scrollPos;
|
2261 |
+
};
|
2262 |
+
|
2263 |
+
this.onEndDrag = function (e) {
|
2264 |
+
var elDocument = getElementDocument(_this.el);
|
2265 |
+
var elWindow = getElementWindow(_this.el);
|
2266 |
+
e.preventDefault();
|
2267 |
+
e.stopPropagation();
|
2268 |
+
|
2269 |
+
_this.el.classList.remove(_this.classNames.dragging);
|
2270 |
+
|
2271 |
+
elDocument.removeEventListener('mousemove', _this.drag, true);
|
2272 |
+
elDocument.removeEventListener('mouseup', _this.onEndDrag, true);
|
2273 |
+
_this.removePreventClickId = elWindow.setTimeout(function () {
|
2274 |
+
// Remove these asynchronously so we still suppress click events
|
2275 |
+
// generated simultaneously with mouseup.
|
2276 |
+
elDocument.removeEventListener('click', _this.preventClick, true);
|
2277 |
+
elDocument.removeEventListener('dblclick', _this.preventClick, true);
|
2278 |
+
_this.removePreventClickId = null;
|
2279 |
+
});
|
2280 |
+
};
|
2281 |
+
|
2282 |
+
this.preventClick = function (e) {
|
2283 |
+
e.preventDefault();
|
2284 |
+
e.stopPropagation();
|
2285 |
+
};
|
2286 |
+
|
2287 |
+
this.el = element;
|
2288 |
+
this.minScrollbarWidth = 20;
|
2289 |
+
this.options = Object.assign({}, asl_SimpleBar.defaultOptions, {}, options);
|
2290 |
+
this.classNames = Object.assign({}, asl_SimpleBar.defaultOptions.classNames, {}, this.options.classNames);
|
2291 |
+
this.axis = {
|
2292 |
+
x: {
|
2293 |
+
scrollOffsetAttr: 'scrollLeft',
|
2294 |
+
sizeAttr: 'width',
|
2295 |
+
scrollSizeAttr: 'scrollWidth',
|
2296 |
+
offsetSizeAttr: 'offsetWidth',
|
2297 |
+
offsetAttr: 'left',
|
2298 |
+
overflowAttr: 'overflowX',
|
2299 |
+
dragOffset: 0,
|
2300 |
+
isOverflowing: true,
|
2301 |
+
isVisible: false,
|
2302 |
+
forceVisible: false,
|
2303 |
+
track: {},
|
2304 |
+
scrollbar: {}
|
2305 |
+
},
|
2306 |
+
y: {
|
2307 |
+
scrollOffsetAttr: 'scrollTop',
|
2308 |
+
sizeAttr: 'height',
|
2309 |
+
scrollSizeAttr: 'scrollHeight',
|
2310 |
+
offsetSizeAttr: 'offsetHeight',
|
2311 |
+
offsetAttr: 'top',
|
2312 |
+
overflowAttr: 'overflowY',
|
2313 |
+
dragOffset: 0,
|
2314 |
+
isOverflowing: true,
|
2315 |
+
isVisible: false,
|
2316 |
+
forceVisible: false,
|
2317 |
+
track: {},
|
2318 |
+
scrollbar: {}
|
2319 |
+
}
|
2320 |
+
};
|
2321 |
+
this.removePreventClickId = null; // Don't re-instantiate over an existing one
|
2322 |
+
|
2323 |
+
if (asl_SimpleBar.instances.has(this.el)) {
|
2324 |
+
return;
|
2325 |
+
}
|
2326 |
+
|
2327 |
+
this.recalculate = lodash_throttle(this.recalculate.bind(this), 64);
|
2328 |
+
this.onMouseMove = lodash_throttle(this.onMouseMove.bind(this), 64);
|
2329 |
+
this.hideScrollbars = lodash_debounce(this.hideScrollbars.bind(this), this.options.timeout);
|
2330 |
+
this.onWindowResize = lodash_debounce(this.onWindowResize.bind(this), 64, {
|
2331 |
+
leading: true
|
2332 |
+
});
|
2333 |
+
asl_SimpleBar.getRtlHelpers = lodash_memoize(asl_SimpleBar.getRtlHelpers);
|
2334 |
+
this.init();
|
2335 |
+
}
|
2336 |
+
/**
|
2337 |
+
* Static properties
|
2338 |
+
*/
|
2339 |
+
|
2340 |
+
/**
|
2341 |
+
* Helper to fix browsers inconsistency on RTL:
|
2342 |
+
* - Firefox inverts the scrollbar initial position
|
2343 |
+
* - IE11 inverts both scrollbar position and scrolling offset
|
2344 |
+
* Directly inspired by @KingSora's OverlayScrollbars https://github.com/KingSora/OverlayScrollbars/blob/master/js/OverlayScrollbars.js#L1634
|
2345 |
+
*/
|
2346 |
+
|
2347 |
+
|
2348 |
+
asl_SimpleBar.getRtlHelpers = function getRtlHelpers() {
|
2349 |
+
var dummyDiv = document.createElement('div');
|
2350 |
+
dummyDiv.innerHTML = '<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';
|
2351 |
+
var scrollbarDummyEl = dummyDiv.firstElementChild;
|
2352 |
+
document.body.appendChild(scrollbarDummyEl);
|
2353 |
+
var dummyContainerChild = scrollbarDummyEl.firstElementChild;
|
2354 |
+
scrollbarDummyEl.scrollLeft = 0;
|
2355 |
+
var dummyContainerOffset = asl_SimpleBar.getOffset(scrollbarDummyEl);
|
2356 |
+
var dummyContainerChildOffset = asl_SimpleBar.getOffset(dummyContainerChild);
|
2357 |
+
scrollbarDummyEl.scrollLeft = 999;
|
2358 |
+
var dummyContainerScrollOffsetAfterScroll = asl_SimpleBar.getOffset(dummyContainerChild);
|
2359 |
+
return {
|
2360 |
+
// determines if the scrolling is responding with negative values
|
2361 |
+
isRtlScrollingInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left && dummyContainerChildOffset.left - dummyContainerScrollOffsetAfterScroll.left !== 0,
|
2362 |
+
// determines if the origin scrollbar position is inverted or not (positioned on left or right)
|
2363 |
+
isRtlScrollbarInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left
|
2364 |
+
};
|
2365 |
+
};
|
2366 |
+
|
2367 |
+
asl_SimpleBar.getOffset = function getOffset(el) {
|
2368 |
+
var rect = el.getBoundingClientRect();
|
2369 |
+
var elDocument = getElementDocument(el);
|
2370 |
+
var elWindow = getElementWindow(el);
|
2371 |
+
return {
|
2372 |
+
top: rect.top + (elWindow.pageYOffset || elDocument.documentElement.scrollTop),
|
2373 |
+
left: rect.left + (elWindow.pageXOffset || elDocument.documentElement.scrollLeft)
|
2374 |
+
};
|
2375 |
+
};
|
2376 |
+
|
2377 |
+
var _proto = asl_SimpleBar.prototype;
|
2378 |
+
|
2379 |
+
_proto.init = function init() {
|
2380 |
+
// Save a reference to the instance, so we know this DOM node has already been instancied
|
2381 |
+
asl_SimpleBar.instances.set(this.el, this);
|
2382 |
+
this.initDOM();
|
2383 |
+
this.scrollbarWidth = this.getScrollbarWidth();
|
2384 |
+
this.recalculate();
|
2385 |
+
this.initListeners();
|
2386 |
+
};
|
2387 |
+
|
2388 |
+
_proto.initDOM = function initDOM() {
|
2389 |
+
var _this2 = this;
|
2390 |
+
|
2391 |
+
// make sure this element doesn't have the elements yet
|
2392 |
+
if (Array.prototype.filter.call(this.el.children, function (child) {
|
2393 |
+
return child.classList.contains(_this2.classNames.wrapper);
|
2394 |
+
}).length) {
|
2395 |
+
// assume that element has his DOM already initiated
|
2396 |
+
this.wrapperEl = this.el.querySelector("." + this.classNames.wrapper);
|
2397 |
+
this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector("." + this.classNames.contentWrapper);
|
2398 |
+
this.contentEl = this.options.contentNode || this.el.querySelector("." + this.classNames.contentEl);
|
2399 |
+
this.offsetEl = this.el.querySelector("." + this.classNames.offset);
|
2400 |
+
this.maskEl = this.el.querySelector("." + this.classNames.mask);
|
2401 |
+
this.placeholderEl = this.findChild(this.wrapperEl, "." + this.classNames.placeholder);
|
2402 |
+
this.heightAutoObserverWrapperEl = this.el.querySelector("." + this.classNames.heightAutoObserverWrapperEl);
|
2403 |
+
this.heightAutoObserverEl = this.el.querySelector("." + this.classNames.heightAutoObserverEl);
|
2404 |
+
this.axis.x.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.horizontal);
|
2405 |
+
this.axis.y.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.vertical);
|
2406 |
+
} else {
|
2407 |
+
// Prepare DOM
|
2408 |
+
this.wrapperEl = document.createElement('div');
|
2409 |
+
this.contentWrapperEl = document.createElement('div');
|
2410 |
+
this.offsetEl = document.createElement('div');
|
2411 |
+
this.maskEl = document.createElement('div');
|
2412 |
+
this.contentEl = document.createElement('div');
|
2413 |
+
this.placeholderEl = document.createElement('div');
|
2414 |
+
this.heightAutoObserverWrapperEl = document.createElement('div');
|
2415 |
+
this.heightAutoObserverEl = document.createElement('div');
|
2416 |
+
this.wrapperEl.classList.add(this.classNames.wrapper);
|
2417 |
+
this.contentWrapperEl.classList.add(this.classNames.contentWrapper);
|
2418 |
+
this.offsetEl.classList.add(this.classNames.offset);
|
2419 |
+
this.maskEl.classList.add(this.classNames.mask);
|
2420 |
+
this.contentEl.classList.add(this.classNames.contentEl);
|
2421 |
+
this.placeholderEl.classList.add(this.classNames.placeholder);
|
2422 |
+
this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl);
|
2423 |
+
this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);
|
2424 |
+
|
2425 |
+
while (this.el.firstChild) {
|
2426 |
+
this.contentEl.appendChild(this.el.firstChild);
|
2427 |
+
}
|
2428 |
+
|
2429 |
+
this.contentWrapperEl.appendChild(this.contentEl);
|
2430 |
+
this.offsetEl.appendChild(this.contentWrapperEl);
|
2431 |
+
this.maskEl.appendChild(this.offsetEl);
|
2432 |
+
this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);
|
2433 |
+
this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);
|
2434 |
+
this.wrapperEl.appendChild(this.maskEl);
|
2435 |
+
this.wrapperEl.appendChild(this.placeholderEl);
|
2436 |
+
this.el.appendChild(this.wrapperEl);
|
2437 |
+
}
|
2438 |
+
|
2439 |
+
if (!this.axis.x.track.el || !this.axis.y.track.el) {
|
2440 |
+
var track = document.createElement('div');
|
2441 |
+
var scrollbar = document.createElement('div');
|
2442 |
+
track.classList.add(this.classNames.track);
|
2443 |
+
scrollbar.classList.add(this.classNames.scrollbar);
|
2444 |
+
track.appendChild(scrollbar);
|
2445 |
+
this.axis.x.track.el = track.cloneNode(true);
|
2446 |
+
this.axis.x.track.el.classList.add(this.classNames.horizontal);
|
2447 |
+
this.axis.y.track.el = track.cloneNode(true);
|
2448 |
+
this.axis.y.track.el.classList.add(this.classNames.vertical);
|
2449 |
+
this.el.appendChild(this.axis.x.track.el);
|
2450 |
+
this.el.appendChild(this.axis.y.track.el);
|
2451 |
+
}
|
2452 |
+
|
2453 |
+
this.axis.x.scrollbar.el = this.axis.x.track.el.querySelector("." + this.classNames.scrollbar);
|
2454 |
+
this.axis.y.scrollbar.el = this.axis.y.track.el.querySelector("." + this.classNames.scrollbar);
|
2455 |
+
|
2456 |
+
if (!this.options.autoHide) {
|
2457 |
+
this.axis.x.scrollbar.el.classList.add(this.classNames.visible);
|
2458 |
+
this.axis.y.scrollbar.el.classList.add(this.classNames.visible);
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
this.el.setAttribute('data-asl_simplebar', 'init');
|
2462 |
+
};
|
2463 |
+
|
2464 |
+
_proto.initListeners = function initListeners() {
|
2465 |
+
var _this3 = this;
|
2466 |
+
|
2467 |
+
var elWindow = getElementWindow(this.el); // Event listeners
|
2468 |
+
|
2469 |
+
if (this.options.autoHide) {
|
2470 |
+
this.el.addEventListener('mouseenter', this.onMouseEnter);
|
2471 |
+
}
|
2472 |
+
|
2473 |
+
['mousedown', 'click', 'dblclick'].forEach(function (e) {
|
2474 |
+
_this3.el.addEventListener(e, _this3.onPointerEvent, true);
|
2475 |
+
});
|
2476 |
+
['touchstart', 'touchend', 'touchmove'].forEach(function (e) {
|
2477 |
+
_this3.el.addEventListener(e, _this3.onPointerEvent, {
|
2478 |
+
capture: true,
|
2479 |
+
passive: true
|
2480 |
+
});
|
2481 |
+
});
|
2482 |
+
this.el.addEventListener('mousemove', this.onMouseMove);
|
2483 |
+
this.el.addEventListener('mouseleave', this.onMouseLeave);
|
2484 |
+
this.contentWrapperEl.addEventListener('scroll', this.onScroll); // Browser zoom triggers a window resize
|
2485 |
+
|
2486 |
+
elWindow.addEventListener('resize', this.onWindowResize); // Hack for https://github.com/WICG/ResizeObserver/issues/38
|
2487 |
+
|
2488 |
+
var resizeObserverStarted = false;
|
2489 |
+
var resizeObserver = elWindow.ResizeObserver || ResizeObserver;
|
2490 |
+
this.resizeObserver = new resizeObserver(function () {
|
2491 |
+
if (!resizeObserverStarted) return;
|
2492 |
+
|
2493 |
+
_this3.recalculate();
|
2494 |
+
});
|
2495 |
+
this.resizeObserver.observe(this.el);
|
2496 |
+
this.resizeObserver.observe(this.contentEl);
|
2497 |
+
elWindow.requestAnimationFrame(function () {
|
2498 |
+
resizeObserverStarted = true;
|
2499 |
+
}); // This is required to detect horizontal scroll. Vertical scroll only needs the resizeObserver.
|
2500 |
+
|
2501 |
+
this.mutationObserver = new elWindow.MutationObserver(this.recalculate);
|
2502 |
+
this.mutationObserver.observe(this.contentEl, {
|
2503 |
+
childList: true,
|
2504 |
+
subtree: true,
|
2505 |
+
characterData: true
|
2506 |
+
});
|
2507 |
+
};
|
2508 |
+
|
2509 |
+
_proto.recalculate = function recalculate() {
|
2510 |
+
var elWindow = getElementWindow(this.el);
|
2511 |
+
this.elStyles = elWindow.getComputedStyle(this.el);
|
2512 |
+
this.isRtl = this.elStyles.direction === 'rtl';
|
2513 |
+
var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
|
2514 |
+
var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1;
|
2515 |
+
var contentElOffsetWidth = this.contentEl.offsetWidth;
|
2516 |
+
var contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
|
2517 |
+
var elOverflowX = this.elStyles.overflowX;
|
2518 |
+
var elOverflowY = this.elStyles.overflowY;
|
2519 |
+
this.contentEl.style.padding = this.elStyles.paddingTop + " " + this.elStyles.paddingRight + " " + this.elStyles.paddingBottom + " " + this.elStyles.paddingLeft;
|
2520 |
+
this.wrapperEl.style.margin = "-" + this.elStyles.paddingTop + " -" + this.elStyles.paddingRight + " -" + this.elStyles.paddingBottom + " -" + this.elStyles.paddingLeft;
|
2521 |
+
var contentElScrollHeight = this.contentEl.scrollHeight;
|
2522 |
+
var contentElScrollWidth = this.contentEl.scrollWidth;
|
2523 |
+
this.contentWrapperEl.style.height = isHeightAuto ? 'auto' : '100%'; // Determine placeholder size
|
2524 |
+
|
2525 |
+
this.placeholderEl.style.width = isWidthAuto ? contentElOffsetWidth + "px" : 'auto';
|
2526 |
+
this.placeholderEl.style.height = contentElScrollHeight + "px";
|
2527 |
+
var contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
|
2528 |
+
this.axis.x.isOverflowing = contentElScrollWidth > contentElOffsetWidth;
|
2529 |
+
this.axis.y.isOverflowing = contentElScrollHeight > contentWrapperElOffsetHeight; // Set isOverflowing to false if user explicitely set hidden overflow
|
2530 |
+
|
2531 |
+
this.axis.x.isOverflowing = elOverflowX === 'hidden' ? false : this.axis.x.isOverflowing;
|
2532 |
+
this.axis.y.isOverflowing = elOverflowY === 'hidden' ? false : this.axis.y.isOverflowing;
|
2533 |
+
this.axis.x.forceVisible = this.options.forceVisible === 'x' || this.options.forceVisible === true;
|
2534 |
+
this.axis.y.forceVisible = this.options.forceVisible === 'y' || this.options.forceVisible === true;
|
2535 |
+
this.hideNativeScrollbar(); // Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
|
2536 |
+
|
2537 |
+
var offsetForXScrollbar = this.axis.x.isOverflowing ? this.scrollbarWidth : 0;
|
2538 |
+
var offsetForYScrollbar = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
|
2539 |
+
this.axis.x.isOverflowing = this.axis.x.isOverflowing && contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
|
2540 |
+
this.axis.y.isOverflowing = this.axis.y.isOverflowing && contentElScrollHeight > contentWrapperElOffsetHeight - offsetForXScrollbar;
|
2541 |
+
this.axis.x.scrollbar.size = this.getScrollbarSize('x');
|
2542 |
+
this.axis.y.scrollbar.size = this.getScrollbarSize('y');
|
2543 |
+
this.axis.x.scrollbar.el.style.width = this.axis.x.scrollbar.size + "px";
|
2544 |
+
this.axis.y.scrollbar.el.style.height = this.axis.y.scrollbar.size + "px";
|
2545 |
+
this.positionScrollbar('x');
|
2546 |
+
this.positionScrollbar('y');
|
2547 |
+
this.toggleTrackVisibility('x');
|
2548 |
+
this.toggleTrackVisibility('y');
|
2549 |
+
}
|
2550 |
+
/**
|
2551 |
+
* Calculate scrollbar size
|
2552 |
+
*/
|
2553 |
+
;
|
2554 |
+
|
2555 |
+
_proto.getScrollbarSize = function getScrollbarSize(axis) {
|
2556 |
+
if (axis === void 0) {
|
2557 |
+
axis = 'y';
|
2558 |
+
}
|
2559 |
+
|
2560 |
+
if (!this.axis[axis].isOverflowing) {
|
2561 |
+
return 0;
|
2562 |
+
}
|
2563 |
+
|
2564 |
+
var contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
|
2565 |
+
var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
|
2566 |
+
var scrollbarSize;
|
2567 |
+
var scrollbarRatio = trackSize / contentSize; // Calculate new height/position of drag handle.
|
2568 |
+
|
2569 |
+
scrollbarSize = Math.max(~~(scrollbarRatio * trackSize), this.options.scrollbarMinSize);
|
2570 |
+
|
2571 |
+
if (this.options.scrollbarMaxSize) {
|
2572 |
+
scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);
|
2573 |
+
}
|
2574 |
+
|
2575 |
+
return scrollbarSize;
|
2576 |
+
};
|
2577 |
+
|
2578 |
+
_proto.positionScrollbar = function positionScrollbar(axis) {
|
2579 |
+
if (axis === void 0) {
|
2580 |
+
axis = 'y';
|
2581 |
+
}
|
2582 |
+
|
2583 |
+
if (!this.axis[axis].isOverflowing) {
|
2584 |
+
return;
|
2585 |
+
}
|
2586 |
+
|
2587 |
+
var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
|
2588 |
+
var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
|
2589 |
+
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
|
2590 |
+
var scrollbar = this.axis[axis].scrollbar;
|
2591 |
+
var scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
2592 |
+
scrollOffset = axis === 'x' && this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollOffset : scrollOffset;
|
2593 |
+
var scrollPourcent = scrollOffset / (contentSize - hostSize);
|
2594 |
+
var handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);
|
2595 |
+
handleOffset = axis === 'x' && this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? handleOffset + (trackSize - scrollbar.size) : handleOffset;
|
2596 |
+
scrollbar.el.style.transform = axis === 'x' ? "translate3d(" + handleOffset + "px, 0, 0)" : "translate3d(0, " + handleOffset + "px, 0)";
|
2597 |
+
};
|
2598 |
+
|
2599 |
+
_proto.toggleTrackVisibility = function toggleTrackVisibility(axis) {
|
2600 |
+
if (axis === void 0) {
|
2601 |
+
axis = 'y';
|
2602 |
+
}
|
2603 |
+
|
2604 |
+
var track = this.axis[axis].track.el;
|
2605 |
+
var scrollbar = this.axis[axis].scrollbar.el;
|
2606 |
+
|
2607 |
+
if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {
|
2608 |
+
track.style.visibility = 'visible';
|
2609 |
+
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'scroll';
|
2610 |
+
} else {
|
2611 |
+
track.style.visibility = 'hidden';
|
2612 |
+
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'hidden';
|
2613 |
+
} // Even if forceVisible is enabled, scrollbar itself should be hidden
|
2614 |
+
|
2615 |
+
|
2616 |
+
if (this.axis[axis].isOverflowing) {
|
2617 |
+
scrollbar.style.display = 'block';
|
2618 |
+
} else {
|
2619 |
+
scrollbar.style.display = 'none';
|
2620 |
+
}
|
2621 |
+
};
|
2622 |
+
|
2623 |
+
_proto.hideNativeScrollbar = function hideNativeScrollbar() {
|
2624 |
+
this.offsetEl.style[this.isRtl ? 'left' : 'right'] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
|
2625 |
+
this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
|
2626 |
+
}
|
2627 |
+
/**
|
2628 |
+
* On scroll event handling
|
2629 |
+
*/
|
2630 |
+
;
|
2631 |
+
|
2632 |
+
_proto.onMouseMoveForAxis = function onMouseMoveForAxis(axis) {
|
2633 |
+
if (axis === void 0) {
|
2634 |
+
axis = 'y';
|
2635 |
+
}
|
2636 |
+
|
2637 |
+
this.axis[axis].track.rect = this.axis[axis].track.el.getBoundingClientRect();
|
2638 |
+
this.axis[axis].scrollbar.rect = this.axis[axis].scrollbar.el.getBoundingClientRect();
|
2639 |
+
var isWithinScrollbarBoundsX = this.isWithinBounds(this.axis[axis].scrollbar.rect);
|
2640 |
+
|
2641 |
+
if (isWithinScrollbarBoundsX) {
|
2642 |
+
this.axis[axis].scrollbar.el.classList.add(this.classNames.hover);
|
2643 |
+
} else {
|
2644 |
+
this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
|
2645 |
+
}
|
2646 |
+
|
2647 |
+
if (this.isWithinBounds(this.axis[axis].track.rect)) {
|
2648 |
+
this.showScrollbar(axis);
|
2649 |
+
this.axis[axis].track.el.classList.add(this.classNames.hover);
|
2650 |
+
} else {
|
2651 |
+
this.axis[axis].track.el.classList.remove(this.classNames.hover);
|
2652 |
+
}
|
2653 |
+
};
|
2654 |
+
|
2655 |
+
_proto.onMouseLeaveForAxis = function onMouseLeaveForAxis(axis) {
|
2656 |
+
if (axis === void 0) {
|
2657 |
+
axis = 'y';
|
2658 |
+
}
|
2659 |
+
|
2660 |
+
this.axis[axis].track.el.classList.remove(this.classNames.hover);
|
2661 |
+
this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
|
2662 |
+
};
|
2663 |
+
|
2664 |
+
/**
|
2665 |
+
* Show scrollbar
|
2666 |
+
*/
|
2667 |
+
_proto.showScrollbar = function showScrollbar(axis) {
|
2668 |
+
if (axis === void 0) {
|
2669 |
+
axis = 'y';
|
2670 |
+
}
|
2671 |
+
|
2672 |
+
var scrollbar = this.axis[axis].scrollbar.el;
|
2673 |
+
|
2674 |
+
if (!this.axis[axis].isVisible) {
|
2675 |
+
scrollbar.classList.add(this.classNames.visible);
|
2676 |
+
this.axis[axis].isVisible = true;
|
2677 |
+
}
|
2678 |
+
|
2679 |
+
if (this.options.autoHide) {
|
2680 |
+
this.hideScrollbars();
|
2681 |
+
}
|
2682 |
+
}
|
2683 |
+
/**
|
2684 |
+
* Hide Scrollbar
|
2685 |
+
*/
|
2686 |
+
;
|
2687 |
+
|
2688 |
+
/**
|
2689 |
+
* on scrollbar handle drag movement starts
|
2690 |
+
*/
|
2691 |
+
_proto.onDragStart = function onDragStart(e, axis) {
|
2692 |
+
if (axis === void 0) {
|
2693 |
+
axis = 'y';
|
2694 |
+
}
|
2695 |
+
|
2696 |
+
var elDocument = getElementDocument(this.el);
|
2697 |
+
var elWindow = getElementWindow(this.el);
|
2698 |
+
var scrollbar = this.axis[axis].scrollbar; // Measure how far the user's mouse is from the top of the scrollbar drag handle.
|
2699 |
+
|
2700 |
+
var eventOffset = axis === 'y' ? e.pageY : e.pageX;
|
2701 |
+
this.axis[axis].dragOffset = eventOffset - scrollbar.rect[this.axis[axis].offsetAttr];
|
2702 |
+
this.draggedAxis = axis;
|
2703 |
+
this.el.classList.add(this.classNames.dragging);
|
2704 |
+
elDocument.addEventListener('mousemove', this.drag, true);
|
2705 |
+
elDocument.addEventListener('mouseup', this.onEndDrag, true);
|
2706 |
+
|
2707 |
+
if (this.removePreventClickId === null) {
|
2708 |
+
elDocument.addEventListener('click', this.preventClick, true);
|
2709 |
+
elDocument.addEventListener('dblclick', this.preventClick, true);
|
2710 |
+
} else {
|
2711 |
+
elWindow.clearTimeout(this.removePreventClickId);
|
2712 |
+
this.removePreventClickId = null;
|
2713 |
+
}
|
2714 |
+
}
|
2715 |
+
/**
|
2716 |
+
* Drag scrollbar handle
|
2717 |
+
*/
|
2718 |
+
;
|
2719 |
+
|
2720 |
+
_proto.onTrackClick = function onTrackClick(e, axis) {
|
2721 |
+
var _this4 = this;
|
2722 |
+
|
2723 |
+
if (axis === void 0) {
|
2724 |
+
axis = 'y';
|
2725 |
+
}
|
2726 |
+
|
2727 |
+
if (!this.options.clickOnTrack) return;
|
2728 |
+
var elWindow = getElementWindow(this.el);
|
2729 |
+
this.axis[axis].scrollbar.rect = this.axis[axis].scrollbar.el.getBoundingClientRect();
|
2730 |
+
var scrollbar = this.axis[axis].scrollbar;
|
2731 |
+
var scrollbarOffset = scrollbar.rect[this.axis[axis].offsetAttr];
|
2732 |
+
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
|
2733 |
+
var scrolled = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
2734 |
+
var t = axis === 'y' ? this.mouseY - scrollbarOffset : this.mouseX - scrollbarOffset;
|
2735 |
+
var dir = t < 0 ? -1 : 1;
|
2736 |
+
var scrollSize = dir === -1 ? scrolled - hostSize : scrolled + hostSize;
|
2737 |
+
|
2738 |
+
var scrollTo = function scrollTo() {
|
2739 |
+
if (dir === -1) {
|
2740 |
+
if (scrolled > scrollSize) {
|
2741 |
+
var _this4$contentWrapper;
|
2742 |
+
|
2743 |
+
scrolled -= _this4.options.clickOnTrackSpeed;
|
2744 |
+
|
2745 |
+
_this4.contentWrapperEl.scrollTo((_this4$contentWrapper = {}, _this4$contentWrapper[_this4.axis[axis].offsetAttr] = scrolled, _this4$contentWrapper));
|
2746 |
+
|
2747 |
+
elWindow.requestAnimationFrame(scrollTo);
|
2748 |
+
}
|
2749 |
+
} else {
|
2750 |
+
if (scrolled < scrollSize) {
|
2751 |
+
var _this4$contentWrapper2;
|
2752 |
+
|
2753 |
+
scrolled += _this4.options.clickOnTrackSpeed;
|
2754 |
+
|
2755 |
+
_this4.contentWrapperEl.scrollTo((_this4$contentWrapper2 = {}, _this4$contentWrapper2[_this4.axis[axis].offsetAttr] = scrolled, _this4$contentWrapper2));
|
2756 |
+
|
2757 |
+
elWindow.requestAnimationFrame(scrollTo);
|
2758 |
+
}
|
2759 |
+
}
|
2760 |
+
};
|
2761 |
+
|
2762 |
+
scrollTo();
|
2763 |
+
}
|
2764 |
+
/**
|
2765 |
+
* Getter for content element
|
2766 |
+
*/
|
2767 |
+
;
|
2768 |
+
|
2769 |
+
_proto.getContentElement = function getContentElement() {
|
2770 |
+
return this.contentEl;
|
2771 |
+
}
|
2772 |
+
/**
|
2773 |
+
* Getter for original scrolling element
|
2774 |
+
*/
|
2775 |
+
;
|
2776 |
+
|
2777 |
+
_proto.getScrollElement = function getScrollElement() {
|
2778 |
+
return this.contentWrapperEl;
|
2779 |
+
};
|
2780 |
+
|
2781 |
+
_proto.getScrollbarWidth = function getScrollbarWidth() {
|
2782 |
+
// Try/catch for FF 56 throwing on undefined computedStyles
|
2783 |
+
try {
|
2784 |
+
// Detect browsers supporting CSS scrollbar styling and do not calculate
|
2785 |
+
if (getComputedStyle(this.contentWrapperEl, '::-webkit-scrollbar').display === 'none' || 'scrollbarWidth' in document.documentElement.style || '-ms-overflow-style' in document.documentElement.style) {
|
2786 |
+
return 0;
|
2787 |
+
} else {
|
2788 |
+
return scrollbarWidth(this.el);
|
2789 |
+
}
|
2790 |
+
} catch (e) {
|
2791 |
+
return scrollbarWidth(this.el);
|
2792 |
+
}
|
2793 |
+
};
|
2794 |
+
|
2795 |
+
_proto.removeListeners = function removeListeners() {
|
2796 |
+
var _this5 = this;
|
2797 |
+
|
2798 |
+
var elWindow = getElementWindow(this.el); // Event listeners
|
2799 |
+
|
2800 |
+
if (this.options.autoHide) {
|
2801 |
+
this.el.removeEventListener('mouseenter', this.onMouseEnter);
|
2802 |
+
}
|
2803 |
+
|
2804 |
+
['mousedown', 'click', 'dblclick'].forEach(function (e) {
|
2805 |
+
_this5.el.removeEventListener(e, _this5.onPointerEvent, true);
|
2806 |
+
});
|
2807 |
+
['touchstart', 'touchend', 'touchmove'].forEach(function (e) {
|
2808 |
+
_this5.el.removeEventListener(e, _this5.onPointerEvent, {
|
2809 |
+
capture: true,
|
2810 |
+
passive: true
|
2811 |
+
});
|
2812 |
+
});
|
2813 |
+
this.el.removeEventListener('mousemove', this.onMouseMove);
|
2814 |
+
this.el.removeEventListener('mouseleave', this.onMouseLeave);
|
2815 |
+
|
2816 |
+
if (this.contentWrapperEl) {
|
2817 |
+
this.contentWrapperEl.removeEventListener('scroll', this.onScroll);
|
2818 |
+
}
|
2819 |
+
|
2820 |
+
elWindow.removeEventListener('resize', this.onWindowResize);
|
2821 |
+
|
2822 |
+
if (this.mutationObserver) {
|
2823 |
+
this.mutationObserver.disconnect();
|
2824 |
+
}
|
2825 |
+
|
2826 |
+
if (this.resizeObserver) {
|
2827 |
+
this.resizeObserver.disconnect();
|
2828 |
+
} // Cancel all debounced functions
|
2829 |
+
|
2830 |
+
|
2831 |
+
this.recalculate.cancel();
|
2832 |
+
this.onMouseMove.cancel();
|
2833 |
+
this.hideScrollbars.cancel();
|
2834 |
+
this.onWindowResize.cancel();
|
2835 |
+
}
|
2836 |
+
/**
|
2837 |
+
* UnMount mutation observer and delete asl_SimpleBar instance from DOM element
|
2838 |
+
*/
|
2839 |
+
;
|
2840 |
+
|
2841 |
+
_proto.unMount = function unMount() {
|
2842 |
+
this.removeListeners();
|
2843 |
+
asl_SimpleBar.instances.delete(this.el);
|
2844 |
+
}
|
2845 |
+
/**
|
2846 |
+
* Check if mouse is within bounds
|
2847 |
+
*/
|
2848 |
+
;
|
2849 |
+
|
2850 |
+
_proto.isWithinBounds = function isWithinBounds(bbox) {
|
2851 |
+
return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
|
2852 |
+
}
|
2853 |
+
/**
|
2854 |
+
* Find element children matches query
|
2855 |
+
*/
|
2856 |
+
;
|
2857 |
+
|
2858 |
+
_proto.findChild = function findChild(el, query) {
|
2859 |
+
var matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
|
2860 |
+
return Array.prototype.filter.call(el.children, function (child) {
|
2861 |
+
return matches.call(child, query);
|
2862 |
+
})[0];
|
2863 |
+
};
|
2864 |
+
|
2865 |
+
return asl_SimpleBar;
|
2866 |
+
}();
|
2867 |
+
|
2868 |
+
asl_SimpleBar.defaultOptions = {
|
2869 |
+
autoHide: true,
|
2870 |
+
forceVisible: false,
|
2871 |
+
clickOnTrack: true,
|
2872 |
+
clickOnTrackSpeed: 40,
|
2873 |
+
classNames: {
|
2874 |
+
contentEl: 'asl_simplebar-content',
|
2875 |
+
contentWrapper: 'asl_simplebar-content-wrapper',
|
2876 |
+
offset: 'asl_simplebar-offset',
|
2877 |
+
mask: 'asl_simplebar-mask',
|
2878 |
+
wrapper: 'asl_simplebar-wrapper',
|
2879 |
+
placeholder: 'asl_simplebar-placeholder',
|
2880 |
+
scrollbar: 'asl_simplebar-scrollbar',
|
2881 |
+
track: 'asl_simplebar-track',
|
2882 |
+
heightAutoObserverWrapperEl: 'asl_simplebar-height-auto-observer-wrapper',
|
2883 |
+
heightAutoObserverEl: 'asl_simplebar-height-auto-observer',
|
2884 |
+
visible: 'asl_simplebar-visible',
|
2885 |
+
horizontal: 'asl_simplebar-horizontal',
|
2886 |
+
vertical: 'asl_simplebar-vertical',
|
2887 |
+
hover: 'asl_simplebar-hover',
|
2888 |
+
dragging: 'asl_simplebar-dragging'
|
2889 |
+
},
|
2890 |
+
scrollbarMinSize: 25,
|
2891 |
+
scrollbarMaxSize: 0,
|
2892 |
+
timeout: 1000
|
2893 |
+
};
|
2894 |
+
asl_SimpleBar.instances = new WeakMap();
|
2895 |
+
|
2896 |
+
asl_SimpleBar.initDOMLoadedElements = function () {
|
2897 |
+
document.removeEventListener('DOMContentLoaded', this.initDOMLoadedElements);
|
2898 |
+
window.removeEventListener('load', this.initDOMLoadedElements);
|
2899 |
+
Array.prototype.forEach.call(document.querySelectorAll('[data-asl_simplebar]'), function (el) {
|
2900 |
+
if (el.getAttribute('data-asl_simplebar') !== 'init' && !asl_SimpleBar.instances.has(el)) new asl_SimpleBar(el, getOptions(el.attributes));
|
2901 |
+
});
|
2902 |
+
};
|
2903 |
+
|
2904 |
+
asl_SimpleBar.removeObserver = function () {
|
2905 |
+
this.globalObserver.disconnect();
|
2906 |
+
};
|
2907 |
+
|
2908 |
+
asl_SimpleBar.initHtmlApi = function () {
|
2909 |
+
this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this); // MutationObserver is IE11+
|
2910 |
+
|
2911 |
+
if (typeof MutationObserver !== 'undefined') {
|
2912 |
+
// Mutation observer to observe dynamically added elements
|
2913 |
+
this.globalObserver = new MutationObserver(asl_SimpleBar.handleMutations);
|
2914 |
+
this.globalObserver.observe(document, {
|
2915 |
+
childList: true,
|
2916 |
+
subtree: true
|
2917 |
+
});
|
2918 |
+
} // Taken from jQuery `ready` function
|
2919 |
+
// Instantiate elements already present on the page
|
2920 |
+
|
2921 |
+
|
2922 |
+
if (document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll) {
|
2923 |
+
// Handle it asynchronously to allow scripts the opportunity to delay init
|
2924 |
+
window.setTimeout(this.initDOMLoadedElements);
|
2925 |
+
} else {
|
2926 |
+
document.addEventListener('DOMContentLoaded', this.initDOMLoadedElements);
|
2927 |
+
window.addEventListener('load', this.initDOMLoadedElements);
|
2928 |
+
}
|
2929 |
+
};
|
2930 |
+
|
2931 |
+
asl_SimpleBar.handleMutations = function (mutations) {
|
2932 |
+
mutations.forEach(function (mutation) {
|
2933 |
+
Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
|
2934 |
+
if (addedNode.nodeType === 1) {
|
2935 |
+
if (addedNode.hasAttribute('data-asl_simplebar')) {
|
2936 |
+
!asl_SimpleBar.instances.has(addedNode) && document.documentElement.contains(addedNode) && new asl_SimpleBar(addedNode, getOptions(addedNode.attributes));
|
2937 |
+
} else {
|
2938 |
+
Array.prototype.forEach.call(addedNode.querySelectorAll('[data-asl_simplebar]'), function (el) {
|
2939 |
+
if (el.getAttribute('data-asl_simplebar') !== 'init' && !asl_SimpleBar.instances.has(el) && document.documentElement.contains(el)) new asl_SimpleBar(el, getOptions(el.attributes));
|
2940 |
+
});
|
2941 |
+
}
|
2942 |
+
}
|
2943 |
+
});
|
2944 |
+
Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) {
|
2945 |
+
if (removedNode.nodeType === 1) {
|
2946 |
+
if (removedNode.getAttribute('data-asl_simplebar') === 'init') {
|
2947 |
+
asl_SimpleBar.instances.has(removedNode) && !document.documentElement.contains(removedNode) && asl_SimpleBar.instances.get(removedNode).unMount();
|
2948 |
+
} else {
|
2949 |
+
Array.prototype.forEach.call(removedNode.querySelectorAll('[data-asl_simplebar="init"]'), function (el) {
|
2950 |
+
asl_SimpleBar.instances.has(el) && !document.documentElement.contains(el) && asl_SimpleBar.instances.get(el).unMount();
|
2951 |
+
});
|
2952 |
+
}
|
2953 |
+
}
|
2954 |
+
});
|
2955 |
+
});
|
2956 |
+
};
|
2957 |
+
|
2958 |
+
asl_SimpleBar.getOptions = getOptions;
|
2959 |
+
/**
|
2960 |
+
* HTML API
|
2961 |
+
* Called only in a browser env.
|
2962 |
+
*/
|
2963 |
+
|
2964 |
+
asl_SimpleBar.initHtmlApi();
|
2965 |
+
|
2966 |
+
return asl_SimpleBar;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2967 |
|
2968 |
}));
|
2969 |
})(asljQuery, asljQuery, window);
|
js/nomin/jquery.ajaxsearchlite.js
CHANGED
@@ -117,6 +117,8 @@
|
|
117 |
if ( ASL.js_retain_popstate == 1 )
|
118 |
$this.initPrevState();
|
119 |
|
|
|
|
|
120 |
if (detectOldIE())
|
121 |
$this.n.container.addClass('asl_msie');
|
122 |
|
@@ -176,16 +178,14 @@
|
|
176 |
});
|
177 |
},
|
178 |
|
179 |
-
|
180 |
-
var $this = this;
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
duplicateChk[this.id] = 'true';
|
188 |
-
}
|
189 |
});
|
190 |
},
|
191 |
|
@@ -311,7 +311,6 @@
|
|
311 |
|
312 |
createVerticalScroll: function () {
|
313 |
var $this = this;
|
314 |
-
|
315 |
if ( $this.is_scroll && typeof $this.scroll.recalculate === 'undefined' ) {
|
316 |
$this.scroll = new asl_SimpleBar($this.n.results.get(0), {
|
317 |
direction: $('body').hasClass('rtl') ? 'rtl' : 'ltr',
|
117 |
if ( ASL.js_retain_popstate == 1 )
|
118 |
$this.initPrevState();
|
119 |
|
120 |
+
$this.monitorTouchMove();
|
121 |
+
|
122 |
if (detectOldIE())
|
123 |
$this.n.container.addClass('asl_msie');
|
124 |
|
178 |
});
|
179 |
},
|
180 |
|
181 |
+
monitorTouchMove: function() {
|
182 |
+
var $this = this, $b = $("body");
|
183 |
+
$this.dragging = false;
|
184 |
+
$b.on("touchmove", function(){
|
185 |
+
$this.dragging = true;
|
186 |
+
});
|
187 |
+
$b.on("touchstart", function(){
|
188 |
+
$this.dragging = false;
|
|
|
|
|
189 |
});
|
190 |
},
|
191 |
|
311 |
|
312 |
createVerticalScroll: function () {
|
313 |
var $this = this;
|
|
|
314 |
if ( $this.is_scroll && typeof $this.scroll.recalculate === 'undefined' ) {
|
315 |
$this.scroll = new asl_SimpleBar($this.n.results.get(0), {
|
316 |
direction: $('body').hasClass('rtl') ? 'rtl' : 'ltr',
|
js/nomin/simplebar.js
CHANGED
@@ -1,5307 +1,2967 @@
|
|
1 |
/**
|
2 |
-
* asl_SimpleBar.js - v5.
|
3 |
* Scrollbars, simpler.
|
4 |
-
* https://grsmto.github.io/
|
5 |
*
|
6 |
* Made by Adrien Denat from a fork by Jonathan Nicol
|
7 |
* Under MIT License
|
8 |
*/
|
9 |
|
10 |
-
/**
|
11 |
-
* Scope changed for Ajax Search Pro, code left as original
|
12 |
-
* Replace:
|
13 |
-
* 1. SimpleBar with asl_SimpleBar - case sensitive
|
14 |
-
* 2. simplebar with asl_simplebar - case sensitive
|
15 |
-
* 3. Remove fixRegexpWellKnownSymbolLogic variable & function calls, as they cause conflicts (3 instances)
|
16 |
-
*/
|
17 |
-
|
18 |
(function (global, factory) {
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
}(this, function () { 'use strict';
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
751 |
-
return !fails(function () {
|
752 |
-
var array = [];
|
753 |
-
var constructor = array.constructor = {};
|
754 |
-
constructor[SPECIES$1] = function () {
|
755 |
-
return { foo: 1 };
|
756 |
-
};
|
757 |
-
return array[METHOD_NAME](Boolean).foo !== 1;
|
758 |
-
});
|
759 |
-
};
|
760 |
-
|
761 |
-
var $filter = arrayIteration.filter;
|
762 |
-
|
763 |
-
|
764 |
-
// `Array.prototype.filter` method
|
765 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
766 |
-
// with adding support of @@species
|
767 |
-
_export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {
|
768 |
-
filter: function filter(callbackfn /* , thisArg */) {
|
769 |
-
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
770 |
-
}
|
771 |
-
});
|
772 |
-
|
773 |
-
// `Object.keys` method
|
774 |
-
// https://tc39.github.io/ecma262/#sec-object.keys
|
775 |
-
var objectKeys = Object.keys || function keys(O) {
|
776 |
-
return objectKeysInternal(O, enumBugKeys);
|
777 |
-
};
|
778 |
-
|
779 |
-
// `Object.defineProperties` method
|
780 |
-
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
781 |
-
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
782 |
-
anObject(O);
|
783 |
-
var keys = objectKeys(Properties);
|
784 |
-
var length = keys.length;
|
785 |
-
var index = 0;
|
786 |
-
var key;
|
787 |
-
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
788 |
-
return O;
|
789 |
-
};
|
790 |
-
|
791 |
-
var html = getBuiltIn('document', 'documentElement');
|
792 |
-
|
793 |
-
var IE_PROTO = sharedKey('IE_PROTO');
|
794 |
-
|
795 |
-
var PROTOTYPE = 'prototype';
|
796 |
-
var Empty = function () { /* empty */ };
|
797 |
-
|
798 |
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
799 |
-
var createDict = function () {
|
800 |
-
// Thrash, waste and sodomy: IE GC bug
|
801 |
-
var iframe = documentCreateElement('iframe');
|
802 |
-
var length = enumBugKeys.length;
|
803 |
-
var lt = '<';
|
804 |
-
var script = 'script';
|
805 |
-
var gt = '>';
|
806 |
-
var js = 'java' + script + ':';
|
807 |
-
var iframeDocument;
|
808 |
-
iframe.style.display = 'none';
|
809 |
-
html.appendChild(iframe);
|
810 |
-
iframe.src = String(js);
|
811 |
-
iframeDocument = iframe.contentWindow.document;
|
812 |
-
iframeDocument.open();
|
813 |
-
iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
|
814 |
-
iframeDocument.close();
|
815 |
-
createDict = iframeDocument.F;
|
816 |
-
while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
|
817 |
-
return createDict();
|
818 |
-
};
|
819 |
-
|
820 |
-
// `Object.create` method
|
821 |
-
// https://tc39.github.io/ecma262/#sec-object.create
|
822 |
-
var objectCreate = Object.create || function create(O, Properties) {
|
823 |
-
var result;
|
824 |
-
if (O !== null) {
|
825 |
-
Empty[PROTOTYPE] = anObject(O);
|
826 |
-
result = new Empty();
|
827 |
-
Empty[PROTOTYPE] = null;
|
828 |
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
829 |
-
result[IE_PROTO] = O;
|
830 |
-
} else result = createDict();
|
831 |
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
832 |
-
};
|
833 |
-
|
834 |
-
hiddenKeys[IE_PROTO] = true;
|
835 |
-
|
836 |
-
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
837 |
-
var ArrayPrototype = Array.prototype;
|
838 |
-
|
839 |
-
// Array.prototype[@@unscopables]
|
840 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
841 |
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
842 |
-
hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
|
843 |
-
}
|
844 |
-
|
845 |
-
// add a key to Array.prototype[@@unscopables]
|
846 |
-
var addToUnscopables = function (key) {
|
847 |
-
ArrayPrototype[UNSCOPABLES][key] = true;
|
848 |
-
};
|
849 |
-
|
850 |
-
var iterators = {};
|
851 |
-
|
852 |
-
var correctPrototypeGetter = !fails(function () {
|
853 |
-
function F() { /* empty */ }
|
854 |
-
F.prototype.constructor = null;
|
855 |
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
856 |
-
});
|
857 |
-
|
858 |
-
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
859 |
-
var ObjectPrototype = Object.prototype;
|
860 |
-
|
861 |
-
// `Object.getPrototypeOf` method
|
862 |
-
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
863 |
-
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
864 |
-
O = toObject(O);
|
865 |
-
if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
|
866 |
-
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
867 |
-
return O.constructor.prototype;
|
868 |
-
} return O instanceof Object ? ObjectPrototype : null;
|
869 |
-
};
|
870 |
-
|
871 |
-
var ITERATOR = wellKnownSymbol('iterator');
|
872 |
-
var BUGGY_SAFARI_ITERATORS = false;
|
873 |
-
|
874 |
-
var returnThis = function () { return this; };
|
875 |
-
|
876 |
-
// `%IteratorPrototype%` object
|
877 |
-
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
|
878 |
-
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
879 |
-
|
880 |
-
if ([].keys) {
|
881 |
-
arrayIterator = [].keys();
|
882 |
-
// Safari 8 has buggy iterators w/o `next`
|
883 |
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
|
884 |
-
else {
|
885 |
-
PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
|
886 |
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
|
887 |
-
}
|
888 |
-
}
|
889 |
-
|
890 |
-
if (IteratorPrototype == undefined) IteratorPrototype = {};
|
891 |
-
|
892 |
-
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
893 |
-
if ( !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
|
894 |
-
|
895 |
-
var iteratorsCore = {
|
896 |
-
IteratorPrototype: IteratorPrototype,
|
897 |
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
898 |
-
};
|
899 |
-
|
900 |
-
var defineProperty = objectDefineProperty.f;
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
905 |
-
|
906 |
-
var setToStringTag = function (it, TAG, STATIC) {
|
907 |
-
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
|
908 |
-
defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
|
909 |
-
}
|
910 |
-
};
|
911 |
-
|
912 |
-
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
var returnThis$1 = function () { return this; };
|
919 |
-
|
920 |
-
var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
|
921 |
-
var TO_STRING_TAG = NAME + ' Iterator';
|
922 |
-
IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
|
923 |
-
setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
|
924 |
-
iterators[TO_STRING_TAG] = returnThis$1;
|
925 |
-
return IteratorConstructor;
|
926 |
-
};
|
927 |
-
|
928 |
-
var aPossiblePrototype = function (it) {
|
929 |
-
if (!isObject(it) && it !== null) {
|
930 |
-
throw TypeError("Can't set " + String(it) + ' as a prototype');
|
931 |
-
} return it;
|
932 |
-
};
|
933 |
-
|
934 |
-
// `Object.setPrototypeOf` method
|
935 |
-
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
|
936 |
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
937 |
-
/* eslint-disable no-proto */
|
938 |
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
939 |
-
var CORRECT_SETTER = false;
|
940 |
-
var test = {};
|
941 |
-
var setter;
|
942 |
-
try {
|
943 |
-
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
944 |
-
setter.call(test, []);
|
945 |
-
CORRECT_SETTER = test instanceof Array;
|
946 |
-
} catch (error) { /* empty */ }
|
947 |
-
return function setPrototypeOf(O, proto) {
|
948 |
-
anObject(O);
|
949 |
-
aPossiblePrototype(proto);
|
950 |
-
if (CORRECT_SETTER) setter.call(O, proto);
|
951 |
-
else O.__proto__ = proto;
|
952 |
-
return O;
|
953 |
-
};
|
954 |
-
}() : undefined);
|
955 |
-
|
956 |
-
var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
|
957 |
-
var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
|
958 |
-
var ITERATOR$1 = wellKnownSymbol('iterator');
|
959 |
-
var KEYS = 'keys';
|
960 |
-
var VALUES = 'values';
|
961 |
-
var ENTRIES = 'entries';
|
962 |
-
|
963 |
-
var returnThis$2 = function () { return this; };
|
964 |
-
|
965 |
-
var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
966 |
-
createIteratorConstructor(IteratorConstructor, NAME, next);
|
967 |
-
|
968 |
-
var getIterationMethod = function (KIND) {
|
969 |
-
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
970 |
-
if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
|
971 |
-
switch (KIND) {
|
972 |
-
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
973 |
-
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
974 |
-
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
975 |
-
} return function () { return new IteratorConstructor(this); };
|
976 |
-
};
|
977 |
-
|
978 |
-
var TO_STRING_TAG = NAME + ' Iterator';
|
979 |
-
var INCORRECT_VALUES_NAME = false;
|
980 |
-
var IterablePrototype = Iterable.prototype;
|
981 |
-
var nativeIterator = IterablePrototype[ITERATOR$1]
|
982 |
-
|| IterablePrototype['@@iterator']
|
983 |
-
|| DEFAULT && IterablePrototype[DEFAULT];
|
984 |
-
var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
|
985 |
-
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
986 |
-
var CurrentIteratorPrototype, methods, KEY;
|
987 |
-
|
988 |
-
// fix native
|
989 |
-
if (anyNativeIterator) {
|
990 |
-
CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
|
991 |
-
if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
|
992 |
-
if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
|
993 |
-
if (objectSetPrototypeOf) {
|
994 |
-
objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
|
995 |
-
} else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
|
996 |
-
hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$2);
|
997 |
-
}
|
998 |
-
}
|
999 |
-
// Set @@toStringTag to native iterators
|
1000 |
-
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
1001 |
-
}
|
1002 |
-
}
|
1003 |
-
|
1004 |
-
// fix Array#{values, @@iterator}.name in V8 / FF
|
1005 |
-
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
1006 |
-
INCORRECT_VALUES_NAME = true;
|
1007 |
-
defaultIterator = function values() { return nativeIterator.call(this); };
|
1008 |
-
}
|
1009 |
-
|
1010 |
-
// define iterator
|
1011 |
-
if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
1012 |
-
hide(IterablePrototype, ITERATOR$1, defaultIterator);
|
1013 |
-
}
|
1014 |
-
iterators[NAME] = defaultIterator;
|
1015 |
-
|
1016 |
-
// export additional methods
|
1017 |
-
if (DEFAULT) {
|
1018 |
-
methods = {
|
1019 |
-
values: getIterationMethod(VALUES),
|
1020 |
-
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
1021 |
-
entries: getIterationMethod(ENTRIES)
|
1022 |
-
};
|
1023 |
-
if (FORCED) for (KEY in methods) {
|
1024 |
-
if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
1025 |
-
redefine(IterablePrototype, KEY, methods[KEY]);
|
1026 |
-
}
|
1027 |
-
} else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
|
1028 |
-
}
|
1029 |
-
|
1030 |
-
return methods;
|
1031 |
-
};
|
1032 |
-
|
1033 |
-
var ARRAY_ITERATOR = 'Array Iterator';
|
1034 |
-
var setInternalState = internalState.set;
|
1035 |
-
var getInternalState = internalState.getterFor(ARRAY_ITERATOR);
|
1036 |
-
|
1037 |
-
// `Array.prototype.entries` method
|
1038 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
|
1039 |
-
// `Array.prototype.keys` method
|
1040 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
|
1041 |
-
// `Array.prototype.values` method
|
1042 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.values
|
1043 |
-
// `Array.prototype[@@iterator]` method
|
1044 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
|
1045 |
-
// `CreateArrayIterator` internal method
|
1046 |
-
// https://tc39.github.io/ecma262/#sec-createarrayiterator
|
1047 |
-
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
1048 |
-
setInternalState(this, {
|
1049 |
-
type: ARRAY_ITERATOR,
|
1050 |
-
target: toIndexedObject(iterated), // target
|
1051 |
-
index: 0, // next index
|
1052 |
-
kind: kind // kind
|
1053 |
-
});
|
1054 |
-
// `%ArrayIteratorPrototype%.next` method
|
1055 |
-
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
|
1056 |
-
}, function () {
|
1057 |
-
var state = getInternalState(this);
|
1058 |
-
var target = state.target;
|
1059 |
-
var kind = state.kind;
|
1060 |
-
var index = state.index++;
|
1061 |
-
if (!target || index >= target.length) {
|
1062 |
-
state.target = undefined;
|
1063 |
-
return { value: undefined, done: true };
|
1064 |
-
}
|
1065 |
-
if (kind == 'keys') return { value: index, done: false };
|
1066 |
-
if (kind == 'values') return { value: target[index], done: false };
|
1067 |
-
return { value: [index, target[index]], done: false };
|
1068 |
-
}, 'values');
|
1069 |
-
|
1070 |
-
// argumentsList[@@iterator] is %ArrayProto_values%
|
1071 |
-
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
|
1072 |
-
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
|
1073 |
-
iterators.Arguments = iterators.Array;
|
1074 |
-
|
1075 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
1076 |
-
addToUnscopables('keys');
|
1077 |
-
addToUnscopables('values');
|
1078 |
-
addToUnscopables('entries');
|
1079 |
-
|
1080 |
-
var nativeAssign = Object.assign;
|
1081 |
-
|
1082 |
-
// `Object.assign` method
|
1083 |
-
// https://tc39.github.io/ecma262/#sec-object.assign
|
1084 |
-
// should work with symbols and should have deterministic property order (V8 bug)
|
1085 |
-
var objectAssign = !nativeAssign || fails(function () {
|
1086 |
-
var A = {};
|
1087 |
-
var B = {};
|
1088 |
-
// eslint-disable-next-line no-undef
|
1089 |
-
var symbol = Symbol();
|
1090 |
-
var alphabet = 'abcdefghijklmnopqrst';
|
1091 |
-
A[symbol] = 7;
|
1092 |
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
1093 |
-
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
|
1094 |
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
1095 |
-
var T = toObject(target);
|
1096 |
-
var argumentsLength = arguments.length;
|
1097 |
-
var index = 1;
|
1098 |
-
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
1099 |
-
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
1100 |
-
while (argumentsLength > index) {
|
1101 |
-
var S = indexedObject(arguments[index++]);
|
1102 |
-
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
|
1103 |
-
var length = keys.length;
|
1104 |
-
var j = 0;
|
1105 |
-
var key;
|
1106 |
-
while (length > j) {
|
1107 |
-
key = keys[j++];
|
1108 |
-
if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
|
1109 |
-
}
|
1110 |
-
} return T;
|
1111 |
-
} : nativeAssign;
|
1112 |
-
|
1113 |
-
// `Object.assign` method
|
1114 |
-
// https://tc39.github.io/ecma262/#sec-object.assign
|
1115 |
-
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
|
1116 |
-
assign: objectAssign
|
1117 |
-
});
|
1118 |
-
|
1119 |
-
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
1120 |
-
// ES3 wrong here
|
1121 |
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
1122 |
-
|
1123 |
-
// fallback for IE11 Script Access Denied error
|
1124 |
-
var tryGet = function (it, key) {
|
1125 |
-
try {
|
1126 |
-
return it[key];
|
1127 |
-
} catch (error) { /* empty */ }
|
1128 |
-
};
|
1129 |
-
|
1130 |
-
// getting tag from ES6+ `Object.prototype.toString`
|
1131 |
-
var classof = function (it) {
|
1132 |
-
var O, tag, result;
|
1133 |
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
1134 |
-
// @@toStringTag case
|
1135 |
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
|
1136 |
-
// builtinTag case
|
1137 |
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
1138 |
-
// ES3 arguments fallback
|
1139 |
-
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
1140 |
-
};
|
1141 |
-
|
1142 |
-
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
1143 |
-
var test = {};
|
1144 |
-
|
1145 |
-
test[TO_STRING_TAG$2] = 'z';
|
1146 |
-
|
1147 |
-
// `Object.prototype.toString` method implementation
|
1148 |
-
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
|
1149 |
-
var objectToString = String(test) !== '[object z]' ? function toString() {
|
1150 |
-
return '[object ' + classof(this) + ']';
|
1151 |
-
} : test.toString;
|
1152 |
-
|
1153 |
-
var ObjectPrototype$1 = Object.prototype;
|
1154 |
-
|
1155 |
-
// `Object.prototype.toString` method
|
1156 |
-
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
|
1157 |
-
if (objectToString !== ObjectPrototype$1.toString) {
|
1158 |
-
redefine(ObjectPrototype$1, 'toString', objectToString, { unsafe: true });
|
1159 |
-
}
|
1160 |
-
|
1161 |
-
// a string of all valid unicode whitespaces
|
1162 |
-
// eslint-disable-next-line max-len
|
1163 |
-
var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
1164 |
-
|
1165 |
-
var whitespace = '[' + whitespaces + ']';
|
1166 |
-
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
1167 |
-
var rtrim = RegExp(whitespace + whitespace + '*$');
|
1168 |
-
|
1169 |
-
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
1170 |
-
var createMethod$2 = function (TYPE) {
|
1171 |
-
return function ($this) {
|
1172 |
-
var string = String(requireObjectCoercible($this));
|
1173 |
-
if (TYPE & 1) string = string.replace(ltrim, '');
|
1174 |
-
if (TYPE & 2) string = string.replace(rtrim, '');
|
1175 |
-
return string;
|
1176 |
-
};
|
1177 |
-
};
|
1178 |
-
|
1179 |
-
var stringTrim = {
|
1180 |
-
// `String.prototype.{ trimLeft, trimStart }` methods
|
1181 |
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
|
1182 |
-
start: createMethod$2(1),
|
1183 |
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
1184 |
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
|
1185 |
-
end: createMethod$2(2),
|
1186 |
-
// `String.prototype.trim` method
|
1187 |
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
1188 |
-
trim: createMethod$2(3)
|
1189 |
-
};
|
1190 |
-
|
1191 |
-
var trim = stringTrim.trim;
|
1192 |
-
|
1193 |
-
|
1194 |
-
var nativeParseInt = global_1.parseInt;
|
1195 |
-
var hex = /^[+-]?0[Xx]/;
|
1196 |
-
var FORCED = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22;
|
1197 |
-
|
1198 |
-
// `parseInt` method
|
1199 |
-
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
1200 |
-
var _parseInt = FORCED ? function parseInt(string, radix) {
|
1201 |
-
var S = trim(String(string));
|
1202 |
-
return nativeParseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
|
1203 |
-
} : nativeParseInt;
|
1204 |
-
|
1205 |
-
// `parseInt` method
|
1206 |
-
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
1207 |
-
_export({ global: true, forced: parseInt != _parseInt }, {
|
1208 |
-
parseInt: _parseInt
|
1209 |
-
});
|
1210 |
-
|
1211 |
-
// `String.prototype.{ codePointAt, at }` methods implementation
|
1212 |
-
var createMethod$3 = function (CONVERT_TO_STRING) {
|
1213 |
-
return function ($this, pos) {
|
1214 |
-
var S = String(requireObjectCoercible($this));
|
1215 |
-
var position = toInteger(pos);
|
1216 |
-
var size = S.length;
|
1217 |
-
var first, second;
|
1218 |
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1219 |
-
first = S.charCodeAt(position);
|
1220 |
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1221 |
-
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
1222 |
-
? CONVERT_TO_STRING ? S.charAt(position) : first
|
1223 |
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1224 |
-
};
|
1225 |
-
};
|
1226 |
-
|
1227 |
-
var stringMultibyte = {
|
1228 |
-
// `String.prototype.codePointAt` method
|
1229 |
-
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
1230 |
-
codeAt: createMethod$3(false),
|
1231 |
-
// `String.prototype.at` method
|
1232 |
-
// https://github.com/mathiasbynens/String.prototype.at
|
1233 |
-
charAt: createMethod$3(true)
|
1234 |
-
};
|
1235 |
-
|
1236 |
-
var charAt = stringMultibyte.charAt;
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
var STRING_ITERATOR = 'String Iterator';
|
1241 |
-
var setInternalState$1 = internalState.set;
|
1242 |
-
var getInternalState$1 = internalState.getterFor(STRING_ITERATOR);
|
1243 |
-
|
1244 |
-
// `String.prototype[@@iterator]` method
|
1245 |
-
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
1246 |
-
defineIterator(String, 'String', function (iterated) {
|
1247 |
-
setInternalState$1(this, {
|
1248 |
-
type: STRING_ITERATOR,
|
1249 |
-
string: String(iterated),
|
1250 |
-
index: 0
|
1251 |
-
});
|
1252 |
-
// `%StringIteratorPrototype%.next` method
|
1253 |
-
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
1254 |
-
}, function next() {
|
1255 |
-
var state = getInternalState$1(this);
|
1256 |
-
var string = state.string;
|
1257 |
-
var index = state.index;
|
1258 |
-
var point;
|
1259 |
-
if (index >= string.length) return { value: undefined, done: true };
|
1260 |
-
point = charAt(string, index);
|
1261 |
-
state.index += point.length;
|
1262 |
-
return { value: point, done: false };
|
1263 |
-
});
|
1264 |
-
|
1265 |
-
var redefineAll = function (target, src, options) {
|
1266 |
-
for (var key in src) redefine(target, key, src[key], options);
|
1267 |
-
return target;
|
1268 |
-
};
|
1269 |
-
|
1270 |
-
var freezing = !fails(function () {
|
1271 |
-
return Object.isExtensible(Object.preventExtensions({}));
|
1272 |
-
});
|
1273 |
-
|
1274 |
-
var internalMetadata = createCommonjsModule(function (module) {
|
1275 |
-
var defineProperty = objectDefineProperty.f;
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
var METADATA = uid('meta');
|
1280 |
-
var id = 0;
|
1281 |
-
|
1282 |
-
var isExtensible = Object.isExtensible || function () {
|
1283 |
-
return true;
|
1284 |
-
};
|
1285 |
-
|
1286 |
-
var setMetadata = function (it) {
|
1287 |
-
defineProperty(it, METADATA, { value: {
|
1288 |
-
objectID: 'O' + ++id, // object ID
|
1289 |
-
weakData: {} // weak collections IDs
|
1290 |
-
} });
|
1291 |
-
};
|
1292 |
-
|
1293 |
-
var fastKey = function (it, create) {
|
1294 |
-
// return a primitive with prefix
|
1295 |
-
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
1296 |
-
if (!has(it, METADATA)) {
|
1297 |
-
// can't set metadata to uncaught frozen object
|
1298 |
-
if (!isExtensible(it)) return 'F';
|
1299 |
-
// not necessary to add metadata
|
1300 |
-
if (!create) return 'E';
|
1301 |
-
// add missing metadata
|
1302 |
-
setMetadata(it);
|
1303 |
-
// return object ID
|
1304 |
-
} return it[METADATA].objectID;
|
1305 |
-
};
|
1306 |
-
|
1307 |
-
var getWeakData = function (it, create) {
|
1308 |
-
if (!has(it, METADATA)) {
|
1309 |
-
// can't set metadata to uncaught frozen object
|
1310 |
-
if (!isExtensible(it)) return true;
|
1311 |
-
// not necessary to add metadata
|
1312 |
-
if (!create) return false;
|
1313 |
-
// add missing metadata
|
1314 |
-
setMetadata(it);
|
1315 |
-
// return the store of weak collections IDs
|
1316 |
-
} return it[METADATA].weakData;
|
1317 |
-
};
|
1318 |
-
|
1319 |
-
// add metadata on freeze-family methods calling
|
1320 |
-
var onFreeze = function (it) {
|
1321 |
-
if (freezing && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
|
1322 |
-
return it;
|
1323 |
-
};
|
1324 |
-
|
1325 |
-
var meta = module.exports = {
|
1326 |
-
REQUIRED: false,
|
1327 |
-
fastKey: fastKey,
|
1328 |
-
getWeakData: getWeakData,
|
1329 |
-
onFreeze: onFreeze
|
1330 |
-
};
|
1331 |
-
|
1332 |
-
hiddenKeys[METADATA] = true;
|
1333 |
-
});
|
1334 |
-
var internalMetadata_1 = internalMetadata.REQUIRED;
|
1335 |
-
var internalMetadata_2 = internalMetadata.fastKey;
|
1336 |
-
var internalMetadata_3 = internalMetadata.getWeakData;
|
1337 |
-
var internalMetadata_4 = internalMetadata.onFreeze;
|
1338 |
-
|
1339 |
-
var ITERATOR$2 = wellKnownSymbol('iterator');
|
1340 |
-
var ArrayPrototype$1 = Array.prototype;
|
1341 |
-
|
1342 |
-
// check on default Array iterator
|
1343 |
-
var isArrayIteratorMethod = function (it) {
|
1344 |
-
return it !== undefined && (iterators.Array === it || ArrayPrototype$1[ITERATOR$2] === it);
|
1345 |
-
};
|
1346 |
-
|
1347 |
-
var ITERATOR$3 = wellKnownSymbol('iterator');
|
1348 |
-
|
1349 |
-
var getIteratorMethod = function (it) {
|
1350 |
-
if (it != undefined) return it[ITERATOR$3]
|
1351 |
-
|| it['@@iterator']
|
1352 |
-
|| iterators[classof(it)];
|
1353 |
-
};
|
1354 |
-
|
1355 |
-
// call something on iterator step with safe closing on error
|
1356 |
-
var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
|
1357 |
-
try {
|
1358 |
-
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
1359 |
-
// 7.4.6 IteratorClose(iterator, completion)
|
1360 |
-
} catch (error) {
|
1361 |
-
var returnMethod = iterator['return'];
|
1362 |
-
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
|
1363 |
-
throw error;
|
1364 |
-
}
|
1365 |
-
};
|
1366 |
-
|
1367 |
-
var iterate_1 = createCommonjsModule(function (module) {
|
1368 |
-
var Result = function (stopped, result) {
|
1369 |
-
this.stopped = stopped;
|
1370 |
-
this.result = result;
|
1371 |
-
};
|
1372 |
-
|
1373 |
-
var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
|
1374 |
-
var boundFunction = bindContext(fn, that, AS_ENTRIES ? 2 : 1);
|
1375 |
-
var iterator, iterFn, index, length, result, step;
|
1376 |
-
|
1377 |
-
if (IS_ITERATOR) {
|
1378 |
-
iterator = iterable;
|
1379 |
-
} else {
|
1380 |
-
iterFn = getIteratorMethod(iterable);
|
1381 |
-
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
|
1382 |
-
// optimisation for array iterators
|
1383 |
-
if (isArrayIteratorMethod(iterFn)) {
|
1384 |
-
for (index = 0, length = toLength(iterable.length); length > index; index++) {
|
1385 |
-
result = AS_ENTRIES
|
1386 |
-
? boundFunction(anObject(step = iterable[index])[0], step[1])
|
1387 |
-
: boundFunction(iterable[index]);
|
1388 |
-
if (result && result instanceof Result) return result;
|
1389 |
-
} return new Result(false);
|
1390 |
-
}
|
1391 |
-
iterator = iterFn.call(iterable);
|
1392 |
-
}
|
1393 |
-
|
1394 |
-
while (!(step = iterator.next()).done) {
|
1395 |
-
result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);
|
1396 |
-
if (result && result instanceof Result) return result;
|
1397 |
-
} return new Result(false);
|
1398 |
-
};
|
1399 |
-
|
1400 |
-
iterate.stop = function (result) {
|
1401 |
-
return new Result(true, result);
|
1402 |
-
};
|
1403 |
-
});
|
1404 |
-
|
1405 |
-
var anInstance = function (it, Constructor, name) {
|
1406 |
-
if (!(it instanceof Constructor)) {
|
1407 |
-
throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
|
1408 |
-
} return it;
|
1409 |
-
};
|
1410 |
-
|
1411 |
-
var ITERATOR$4 = wellKnownSymbol('iterator');
|
1412 |
-
var SAFE_CLOSING = false;
|
1413 |
-
|
1414 |
-
try {
|
1415 |
-
var called = 0;
|
1416 |
-
var iteratorWithReturn = {
|
1417 |
-
next: function () {
|
1418 |
-
return { done: !!called++ };
|
1419 |
-
},
|
1420 |
-
'return': function () {
|
1421 |
-
SAFE_CLOSING = true;
|
1422 |
-
}
|
1423 |
-
};
|
1424 |
-
iteratorWithReturn[ITERATOR$4] = function () {
|
1425 |
-
return this;
|
1426 |
-
};
|
1427 |
-
// eslint-disable-next-line no-throw-literal
|
1428 |
-
Array.from(iteratorWithReturn, function () { throw 2; });
|
1429 |
-
} catch (error) { /* empty */ }
|
1430 |
-
|
1431 |
-
var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
|
1432 |
-
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
1433 |
-
var ITERATION_SUPPORT = false;
|
1434 |
-
try {
|
1435 |
-
var object = {};
|
1436 |
-
object[ITERATOR$4] = function () {
|
1437 |
-
return {
|
1438 |
-
next: function () {
|
1439 |
-
return { done: ITERATION_SUPPORT = true };
|
1440 |
-
}
|
1441 |
-
};
|
1442 |
-
};
|
1443 |
-
exec(object);
|
1444 |
-
} catch (error) { /* empty */ }
|
1445 |
-
return ITERATION_SUPPORT;
|
1446 |
-
};
|
1447 |
-
|
1448 |
-
// makes subclassing work correct for wrapped built-ins
|
1449 |
-
var inheritIfRequired = function ($this, dummy, Wrapper) {
|
1450 |
-
var NewTarget, NewTargetPrototype;
|
1451 |
-
if (
|
1452 |
-
// it can work only with native `setPrototypeOf`
|
1453 |
-
objectSetPrototypeOf &&
|
1454 |
-
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
1455 |
-
typeof (NewTarget = dummy.constructor) == 'function' &&
|
1456 |
-
NewTarget !== Wrapper &&
|
1457 |
-
isObject(NewTargetPrototype = NewTarget.prototype) &&
|
1458 |
-
NewTargetPrototype !== Wrapper.prototype
|
1459 |
-
) objectSetPrototypeOf($this, NewTargetPrototype);
|
1460 |
-
return $this;
|
1461 |
-
};
|
1462 |
-
|
1463 |
-
var collection = function (CONSTRUCTOR_NAME, wrapper, common, IS_MAP, IS_WEAK) {
|
1464 |
-
var NativeConstructor = global_1[CONSTRUCTOR_NAME];
|
1465 |
-
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
1466 |
-
var Constructor = NativeConstructor;
|
1467 |
-
var ADDER = IS_MAP ? 'set' : 'add';
|
1468 |
-
var exported = {};
|
1469 |
-
|
1470 |
-
var fixMethod = function (KEY) {
|
1471 |
-
var nativeMethod = NativePrototype[KEY];
|
1472 |
-
redefine(NativePrototype, KEY,
|
1473 |
-
KEY == 'add' ? function add(value) {
|
1474 |
-
nativeMethod.call(this, value === 0 ? 0 : value);
|
1475 |
-
return this;
|
1476 |
-
} : KEY == 'delete' ? function (key) {
|
1477 |
-
return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
|
1478 |
-
} : KEY == 'get' ? function get(key) {
|
1479 |
-
return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
|
1480 |
-
} : KEY == 'has' ? function has(key) {
|
1481 |
-
return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
|
1482 |
-
} : function set(key, value) {
|
1483 |
-
nativeMethod.call(this, key === 0 ? 0 : key, value);
|
1484 |
-
return this;
|
1485 |
-
}
|
1486 |
-
);
|
1487 |
-
};
|
1488 |
-
|
1489 |
-
// eslint-disable-next-line max-len
|
1490 |
-
if (isForced_1(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
|
1491 |
-
new NativeConstructor().entries().next();
|
1492 |
-
})))) {
|
1493 |
-
// create collection constructor
|
1494 |
-
Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
|
1495 |
-
internalMetadata.REQUIRED = true;
|
1496 |
-
} else if (isForced_1(CONSTRUCTOR_NAME, true)) {
|
1497 |
-
var instance = new Constructor();
|
1498 |
-
// early implementations not supports chaining
|
1499 |
-
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
|
1500 |
-
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
|
1501 |
-
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
|
1502 |
-
// most early implementations doesn't supports iterables, most modern - not close it correctly
|
1503 |
-
// eslint-disable-next-line no-new
|
1504 |
-
var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
|
1505 |
-
// for early implementations -0 and +0 not the same
|
1506 |
-
var BUGGY_ZERO = !IS_WEAK && fails(function () {
|
1507 |
-
// V8 ~ Chromium 42- fails only with 5+ elements
|
1508 |
-
var $instance = new NativeConstructor();
|
1509 |
-
var index = 5;
|
1510 |
-
while (index--) $instance[ADDER](index, index);
|
1511 |
-
return !$instance.has(-0);
|
1512 |
-
});
|
1513 |
-
|
1514 |
-
if (!ACCEPT_ITERABLES) {
|
1515 |
-
Constructor = wrapper(function (dummy, iterable) {
|
1516 |
-
anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
|
1517 |
-
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
|
1518 |
-
if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);
|
1519 |
-
return that;
|
1520 |
-
});
|
1521 |
-
Constructor.prototype = NativePrototype;
|
1522 |
-
NativePrototype.constructor = Constructor;
|
1523 |
-
}
|
1524 |
-
|
1525 |
-
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
|
1526 |
-
fixMethod('delete');
|
1527 |
-
fixMethod('has');
|
1528 |
-
IS_MAP && fixMethod('get');
|
1529 |
-
}
|
1530 |
-
|
1531 |
-
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
|
1532 |
-
|
1533 |
-
// weak collections should not contains .clear method
|
1534 |
-
if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
|
1535 |
-
}
|
1536 |
-
|
1537 |
-
exported[CONSTRUCTOR_NAME] = Constructor;
|
1538 |
-
_export({ global: true, forced: Constructor != NativeConstructor }, exported);
|
1539 |
-
|
1540 |
-
setToStringTag(Constructor, CONSTRUCTOR_NAME);
|
1541 |
-
|
1542 |
-
if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
|
1543 |
-
|
1544 |
-
return Constructor;
|
1545 |
-
};
|
1546 |
-
|
1547 |
-
var getWeakData = internalMetadata.getWeakData;
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
var setInternalState$2 = internalState.set;
|
1557 |
-
var internalStateGetterFor = internalState.getterFor;
|
1558 |
-
var find = arrayIteration.find;
|
1559 |
-
var findIndex = arrayIteration.findIndex;
|
1560 |
-
var id$1 = 0;
|
1561 |
-
|
1562 |
-
// fallback for uncaught frozen keys
|
1563 |
-
var uncaughtFrozenStore = function (store) {
|
1564 |
-
return store.frozen || (store.frozen = new UncaughtFrozenStore());
|
1565 |
-
};
|
1566 |
-
|
1567 |
-
var UncaughtFrozenStore = function () {
|
1568 |
-
this.entries = [];
|
1569 |
-
};
|
1570 |
-
|
1571 |
-
var findUncaughtFrozen = function (store, key) {
|
1572 |
-
return find(store.entries, function (it) {
|
1573 |
-
return it[0] === key;
|
1574 |
-
});
|
1575 |
-
};
|
1576 |
-
|
1577 |
-
UncaughtFrozenStore.prototype = {
|
1578 |
-
get: function (key) {
|
1579 |
-
var entry = findUncaughtFrozen(this, key);
|
1580 |
-
if (entry) return entry[1];
|
1581 |
-
},
|
1582 |
-
has: function (key) {
|
1583 |
-
return !!findUncaughtFrozen(this, key);
|
1584 |
-
},
|
1585 |
-
set: function (key, value) {
|
1586 |
-
var entry = findUncaughtFrozen(this, key);
|
1587 |
-
if (entry) entry[1] = value;
|
1588 |
-
else this.entries.push([key, value]);
|
1589 |
-
},
|
1590 |
-
'delete': function (key) {
|
1591 |
-
var index = findIndex(this.entries, function (it) {
|
1592 |
-
return it[0] === key;
|
1593 |
-
});
|
1594 |
-
if (~index) this.entries.splice(index, 1);
|
1595 |
-
return !!~index;
|
1596 |
-
}
|
1597 |
-
};
|
1598 |
-
|
1599 |
-
var collectionWeak = {
|
1600 |
-
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
1601 |
-
var C = wrapper(function (that, iterable) {
|
1602 |
-
anInstance(that, C, CONSTRUCTOR_NAME);
|
1603 |
-
setInternalState$2(that, {
|
1604 |
-
type: CONSTRUCTOR_NAME,
|
1605 |
-
id: id$1++,
|
1606 |
-
frozen: undefined
|
1607 |
-
});
|
1608 |
-
if (iterable != undefined) iterate_1(iterable, that[ADDER], that, IS_MAP);
|
1609 |
-
});
|
1610 |
-
|
1611 |
-
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
1612 |
-
|
1613 |
-
var define = function (that, key, value) {
|
1614 |
-
var state = getInternalState(that);
|
1615 |
-
var data = getWeakData(anObject(key), true);
|
1616 |
-
if (data === true) uncaughtFrozenStore(state).set(key, value);
|
1617 |
-
else data[state.id] = value;
|
1618 |
-
return that;
|
1619 |
-
};
|
1620 |
-
|
1621 |
-
redefineAll(C.prototype, {
|
1622 |
-
// 23.3.3.2 WeakMap.prototype.delete(key)
|
1623 |
-
// 23.4.3.3 WeakSet.prototype.delete(value)
|
1624 |
-
'delete': function (key) {
|
1625 |
-
var state = getInternalState(this);
|
1626 |
-
if (!isObject(key)) return false;
|
1627 |
-
var data = getWeakData(key);
|
1628 |
-
if (data === true) return uncaughtFrozenStore(state)['delete'](key);
|
1629 |
-
return data && has(data, state.id) && delete data[state.id];
|
1630 |
-
},
|
1631 |
-
// 23.3.3.4 WeakMap.prototype.has(key)
|
1632 |
-
// 23.4.3.4 WeakSet.prototype.has(value)
|
1633 |
-
has: function has$1(key) {
|
1634 |
-
var state = getInternalState(this);
|
1635 |
-
if (!isObject(key)) return false;
|
1636 |
-
var data = getWeakData(key);
|
1637 |
-
if (data === true) return uncaughtFrozenStore(state).has(key);
|
1638 |
-
return data && has(data, state.id);
|
1639 |
-
}
|
1640 |
-
});
|
1641 |
-
|
1642 |
-
redefineAll(C.prototype, IS_MAP ? {
|
1643 |
-
// 23.3.3.3 WeakMap.prototype.get(key)
|
1644 |
-
get: function get(key) {
|
1645 |
-
var state = getInternalState(this);
|
1646 |
-
if (isObject(key)) {
|
1647 |
-
var data = getWeakData(key);
|
1648 |
-
if (data === true) return uncaughtFrozenStore(state).get(key);
|
1649 |
-
return data ? data[state.id] : undefined;
|
1650 |
-
}
|
1651 |
-
},
|
1652 |
-
// 23.3.3.5 WeakMap.prototype.set(key, value)
|
1653 |
-
set: function set(key, value) {
|
1654 |
-
return define(this, key, value);
|
1655 |
-
}
|
1656 |
-
} : {
|
1657 |
-
// 23.4.3.1 WeakSet.prototype.add(value)
|
1658 |
-
add: function add(value) {
|
1659 |
-
return define(this, value, true);
|
1660 |
-
}
|
1661 |
-
});
|
1662 |
-
|
1663 |
-
return C;
|
1664 |
-
}
|
1665 |
-
};
|
1666 |
-
|
1667 |
-
var es_weakMap = createCommonjsModule(function (module) {
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
var enforceIternalState = internalState.enforce;
|
1675 |
-
|
1676 |
-
|
1677 |
-
var IS_IE11 = !global_1.ActiveXObject && 'ActiveXObject' in global_1;
|
1678 |
-
var isExtensible = Object.isExtensible;
|
1679 |
-
var InternalWeakMap;
|
1680 |
-
|
1681 |
-
var wrapper = function (get) {
|
1682 |
-
return function WeakMap() {
|
1683 |
-
return get(this, arguments.length ? arguments[0] : undefined);
|
1684 |
-
};
|
1685 |
-
};
|
1686 |
-
|
1687 |
-
// `WeakMap` constructor
|
1688 |
-
// https://tc39.github.io/ecma262/#sec-weakmap-constructor
|
1689 |
-
var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak, true, true);
|
1690 |
-
|
1691 |
-
// IE11 WeakMap frozen keys fix
|
1692 |
-
// We can't use feature detection because it crash some old IE builds
|
1693 |
-
// https://github.com/zloirock/core-js/issues/485
|
1694 |
-
if (nativeWeakMap && IS_IE11) {
|
1695 |
-
InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
|
1696 |
-
internalMetadata.REQUIRED = true;
|
1697 |
-
var WeakMapPrototype = $WeakMap.prototype;
|
1698 |
-
var nativeDelete = WeakMapPrototype['delete'];
|
1699 |
-
var nativeHas = WeakMapPrototype.has;
|
1700 |
-
var nativeGet = WeakMapPrototype.get;
|
1701 |
-
var nativeSet = WeakMapPrototype.set;
|
1702 |
-
redefineAll(WeakMapPrototype, {
|
1703 |
-
'delete': function (key) {
|
1704 |
-
if (isObject(key) && !isExtensible(key)) {
|
1705 |
-
var state = enforceIternalState(this);
|
1706 |
-
if (!state.frozen) state.frozen = new InternalWeakMap();
|
1707 |
-
return nativeDelete.call(this, key) || state.frozen['delete'](key);
|
1708 |
-
} return nativeDelete.call(this, key);
|
1709 |
-
},
|
1710 |
-
has: function has(key) {
|
1711 |
-
if (isObject(key) && !isExtensible(key)) {
|
1712 |
-
var state = enforceIternalState(this);
|
1713 |
-
if (!state.frozen) state.frozen = new InternalWeakMap();
|
1714 |
-
return nativeHas.call(this, key) || state.frozen.has(key);
|
1715 |
-
} return nativeHas.call(this, key);
|
1716 |
-
},
|
1717 |
-
get: function get(key) {
|
1718 |
-
if (isObject(key) && !isExtensible(key)) {
|
1719 |
-
var state = enforceIternalState(this);
|
1720 |
-
if (!state.frozen) state.frozen = new InternalWeakMap();
|
1721 |
-
return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key);
|
1722 |
-
} return nativeGet.call(this, key);
|
1723 |
-
},
|
1724 |
-
set: function set(key, value) {
|
1725 |
-
if (isObject(key) && !isExtensible(key)) {
|
1726 |
-
var state = enforceIternalState(this);
|
1727 |
-
if (!state.frozen) state.frozen = new InternalWeakMap();
|
1728 |
-
nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value);
|
1729 |
-
} else nativeSet.call(this, key, value);
|
1730 |
-
return this;
|
1731 |
-
}
|
1732 |
-
});
|
1733 |
-
}
|
1734 |
-
});
|
1735 |
-
|
1736 |
-
var ITERATOR$5 = wellKnownSymbol('iterator');
|
1737 |
-
var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
|
1738 |
-
var ArrayValues = es_array_iterator.values;
|
1739 |
-
|
1740 |
-
for (var COLLECTION_NAME$1 in domIterables) {
|
1741 |
-
var Collection$1 = global_1[COLLECTION_NAME$1];
|
1742 |
-
var CollectionPrototype$1 = Collection$1 && Collection$1.prototype;
|
1743 |
-
if (CollectionPrototype$1) {
|
1744 |
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
1745 |
-
if (CollectionPrototype$1[ITERATOR$5] !== ArrayValues) try {
|
1746 |
-
hide(CollectionPrototype$1, ITERATOR$5, ArrayValues);
|
1747 |
-
} catch (error) {
|
1748 |
-
CollectionPrototype$1[ITERATOR$5] = ArrayValues;
|
1749 |
-
}
|
1750 |
-
if (!CollectionPrototype$1[TO_STRING_TAG$3]) hide(CollectionPrototype$1, TO_STRING_TAG$3, COLLECTION_NAME$1);
|
1751 |
-
if (domIterables[COLLECTION_NAME$1]) for (var METHOD_NAME in es_array_iterator) {
|
1752 |
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
1753 |
-
if (CollectionPrototype$1[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
|
1754 |
-
hide(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]);
|
1755 |
-
} catch (error) {
|
1756 |
-
CollectionPrototype$1[METHOD_NAME] = es_array_iterator[METHOD_NAME];
|
1757 |
-
}
|
1758 |
-
}
|
1759 |
-
}
|
1760 |
-
}
|
1761 |
-
|
1762 |
-
/**
|
1763 |
-
* lodash (Custom Build) <https://lodash.com/>
|
1764 |
-
* Build: `lodash modularize exports="npm" -o ./`
|
1765 |
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
1766 |
-
* Released under MIT license <https://lodash.com/license>
|
1767 |
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1768 |
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1769 |
-
*/
|
1770 |
-
|
1771 |
-
/** Used as the `TypeError` message for "Functions" methods. */
|
1772 |
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
1773 |
-
|
1774 |
-
/** Used as references for various `Number` constants. */
|
1775 |
-
var NAN = 0 / 0;
|
1776 |
-
|
1777 |
-
/** `Object#toString` result references. */
|
1778 |
-
var symbolTag = '[object Symbol]';
|
1779 |
-
|
1780 |
-
/** Used to match leading and trailing whitespace. */
|
1781 |
-
var reTrim = /^\s+|\s+$/g;
|
1782 |
-
|
1783 |
-
/** Used to detect bad signed hexadecimal string values. */
|
1784 |
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
1785 |
-
|
1786 |
-
/** Used to detect binary string values. */
|
1787 |
-
var reIsBinary = /^0b[01]+$/i;
|
1788 |
-
|
1789 |
-
/** Used to detect octal string values. */
|
1790 |
-
var reIsOctal = /^0o[0-7]+$/i;
|
1791 |
-
|
1792 |
-
/** Built-in method references without a dependency on `root`. */
|
1793 |
-
var freeParseInt = parseInt;
|
1794 |
-
|
1795 |
-
/** Detect free variable `global` from Node.js. */
|
1796 |
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
1797 |
-
|
1798 |
-
/** Detect free variable `self`. */
|
1799 |
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
1800 |
-
|
1801 |
-
/** Used as a reference to the global object. */
|
1802 |
-
var root = freeGlobal || freeSelf || Function('return this')();
|
1803 |
-
|
1804 |
-
/** Used for built-in method references. */
|
1805 |
-
var objectProto = Object.prototype;
|
1806 |
-
|
1807 |
-
/**
|
1808 |
-
* Used to resolve the
|
1809 |
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
1810 |
-
* of values.
|
1811 |
-
*/
|
1812 |
-
var objectToString$1 = objectProto.toString;
|
1813 |
-
|
1814 |
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
1815 |
-
var nativeMax = Math.max,
|
1816 |
-
nativeMin = Math.min;
|
1817 |
-
|
1818 |
-
/**
|
1819 |
-
* Gets the timestamp of the number of milliseconds that have elapsed since
|
1820 |
-
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
1821 |
-
*
|
1822 |
-
* @static
|
1823 |
-
* @memberOf _
|
1824 |
-
* @since 2.4.0
|
1825 |
-
* @category Date
|
1826 |
-
* @returns {number} Returns the timestamp.
|
1827 |
-
* @example
|
1828 |
-
*
|
1829 |
-
* _.defer(function(stamp) {
|
1830 |
-
* console.log(_.now() - stamp);
|
1831 |
-
* }, _.now());
|
1832 |
-
* // => Logs the number of milliseconds it took for the deferred invocation.
|
1833 |
-
*/
|
1834 |
-
var now = function() {
|
1835 |
-
return root.Date.now();
|
1836 |
-
};
|
1837 |
-
|
1838 |
-
/**
|
1839 |
-
* Creates a debounced function that delays invoking `func` until after `wait`
|
1840 |
-
* milliseconds have elapsed since the last time the debounced function was
|
1841 |
-
* invoked. The debounced function comes with a `cancel` method to cancel
|
1842 |
-
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
1843 |
-
* Provide `options` to indicate whether `func` should be invoked on the
|
1844 |
-
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
1845 |
-
* with the last arguments provided to the debounced function. Subsequent
|
1846 |
-
* calls to the debounced function return the result of the last `func`
|
1847 |
-
* invocation.
|
1848 |
-
*
|
1849 |
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
1850 |
-
* invoked on the trailing edge of the timeout only if the debounced function
|
1851 |
-
* is invoked more than once during the `wait` timeout.
|
1852 |
-
*
|
1853 |
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
1854 |
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
1855 |
-
*
|
1856 |
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
1857 |
-
* for details over the differences between `_.debounce` and `_.throttle`.
|
1858 |
-
*
|
1859 |
-
* @static
|
1860 |
-
* @memberOf _
|
1861 |
-
* @since 0.1.0
|
1862 |
-
* @category Function
|
1863 |
-
* @param {Function} func The function to debounce.
|
1864 |
-
* @param {number} [wait=0] The number of milliseconds to delay.
|
1865 |
-
* @param {Object} [options={}] The options object.
|
1866 |
-
* @param {boolean} [options.leading=false]
|
1867 |
-
* Specify invoking on the leading edge of the timeout.
|
1868 |
-
* @param {number} [options.maxWait]
|
1869 |
-
* The maximum time `func` is allowed to be delayed before it's invoked.
|
1870 |
-
* @param {boolean} [options.trailing=true]
|
1871 |
-
* Specify invoking on the trailing edge of the timeout.
|
1872 |
-
* @returns {Function} Returns the new debounced function.
|
1873 |
-
* @example
|
1874 |
-
*
|
1875 |
-
* // Avoid costly calculations while the window size is in flux.
|
1876 |
-
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
1877 |
-
*
|
1878 |
-
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
1879 |
-
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
1880 |
-
* 'leading': true,
|
1881 |
-
* 'trailing': false
|
1882 |
-
* }));
|
1883 |
-
*
|
1884 |
-
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
1885 |
-
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
1886 |
-
* var source = new EventSource('/stream');
|
1887 |
-
* jQuery(source).on('message', debounced);
|
1888 |
-
*
|
1889 |
-
* // Cancel the trailing debounced invocation.
|
1890 |
-
* jQuery(window).on('popstate', debounced.cancel);
|
1891 |
-
*/
|
1892 |
-
function debounce(func, wait, options) {
|
1893 |
-
var lastArgs,
|
1894 |
-
lastThis,
|
1895 |
-
maxWait,
|
1896 |
-
result,
|
1897 |
-
timerId,
|
1898 |
-
lastCallTime,
|
1899 |
-
lastInvokeTime = 0,
|
1900 |
-
leading = false,
|
1901 |
-
maxing = false,
|
1902 |
-
trailing = true;
|
1903 |
-
|
1904 |
-
if (typeof func != 'function') {
|
1905 |
-
throw new TypeError(FUNC_ERROR_TEXT);
|
1906 |
-
}
|
1907 |
-
wait = toNumber(wait) || 0;
|
1908 |
-
if (isObject$1(options)) {
|
1909 |
-
leading = !!options.leading;
|
1910 |
-
maxing = 'maxWait' in options;
|
1911 |
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
1912 |
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
1913 |
-
}
|
1914 |
-
|
1915 |
-
function invokeFunc(time) {
|
1916 |
-
var args = lastArgs,
|
1917 |
-
thisArg = lastThis;
|
1918 |
-
|
1919 |
-
lastArgs = lastThis = undefined;
|
1920 |
-
lastInvokeTime = time;
|
1921 |
-
result = func.apply(thisArg, args);
|
1922 |
-
return result;
|
1923 |
-
}
|
1924 |
-
|
1925 |
-
function leadingEdge(time) {
|
1926 |
-
// Reset any `maxWait` timer.
|
1927 |
-
lastInvokeTime = time;
|
1928 |
-
// Start the timer for the trailing edge.
|
1929 |
-
timerId = setTimeout(timerExpired, wait);
|
1930 |
-
// Invoke the leading edge.
|
1931 |
-
return leading ? invokeFunc(time) : result;
|
1932 |
-
}
|
1933 |
-
|
1934 |
-
function remainingWait(time) {
|
1935 |
-
var timeSinceLastCall = time - lastCallTime,
|
1936 |
-
timeSinceLastInvoke = time - lastInvokeTime,
|
1937 |
-
result = wait - timeSinceLastCall;
|
1938 |
-
|
1939 |
-
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
1940 |
-
}
|
1941 |
-
|
1942 |
-
function shouldInvoke(time) {
|
1943 |
-
var timeSinceLastCall = time - lastCallTime,
|
1944 |
-
timeSinceLastInvoke = time - lastInvokeTime;
|
1945 |
-
|
1946 |
-
// Either this is the first call, activity has stopped and we're at the
|
1947 |
-
// trailing edge, the system time has gone backwards and we're treating
|
1948 |
-
// it as the trailing edge, or we've hit the `maxWait` limit.
|
1949 |
-
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
1950 |
-
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
1951 |
-
}
|
1952 |
-
|
1953 |
-
function timerExpired() {
|
1954 |
-
var time = now();
|
1955 |
-
if (shouldInvoke(time)) {
|
1956 |
-
return trailingEdge(time);
|
1957 |
-
}
|
1958 |
-
// Restart the timer.
|
1959 |
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
1960 |
-
}
|
1961 |
-
|
1962 |
-
function trailingEdge(time) {
|
1963 |
-
timerId = undefined;
|
1964 |
-
|
1965 |
-
// Only invoke if we have `lastArgs` which means `func` has been
|
1966 |
-
// debounced at least once.
|
1967 |
-
if (trailing && lastArgs) {
|
1968 |
-
return invokeFunc(time);
|
1969 |
-
}
|
1970 |
-
lastArgs = lastThis = undefined;
|
1971 |
-
return result;
|
1972 |
-
}
|
1973 |
-
|
1974 |
-
function cancel() {
|
1975 |
-
if (timerId !== undefined) {
|
1976 |
-
clearTimeout(timerId);
|
1977 |
-
}
|
1978 |
-
lastInvokeTime = 0;
|
1979 |
-
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
1980 |
-
}
|
1981 |
-
|
1982 |
-
function flush() {
|
1983 |
-
return timerId === undefined ? result : trailingEdge(now());
|
1984 |
-
}
|
1985 |
-
|
1986 |
-
function debounced() {
|
1987 |
-
var time = now(),
|
1988 |
-
isInvoking = shouldInvoke(time);
|
1989 |
-
|
1990 |
-
lastArgs = arguments;
|
1991 |
-
lastThis = this;
|
1992 |
-
lastCallTime = time;
|
1993 |
-
|
1994 |
-
if (isInvoking) {
|
1995 |
-
if (timerId === undefined) {
|
1996 |
-
return leadingEdge(lastCallTime);
|
1997 |
-
}
|
1998 |
-
if (maxing) {
|
1999 |
-
// Handle invocations in a tight loop.
|
2000 |
-
timerId = setTimeout(timerExpired, wait);
|
2001 |
-
return invokeFunc(lastCallTime);
|
2002 |
-
}
|
2003 |
-
}
|
2004 |
-
if (timerId === undefined) {
|
2005 |
-
timerId = setTimeout(timerExpired, wait);
|
2006 |
-
}
|
2007 |
-
return result;
|
2008 |
-
}
|
2009 |
-
debounced.cancel = cancel;
|
2010 |
-
debounced.flush = flush;
|
2011 |
-
return debounced;
|
2012 |
-
}
|
2013 |
-
|
2014 |
-
/**
|
2015 |
-
* Creates a throttled function that only invokes `func` at most once per
|
2016 |
-
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
2017 |
-
* method to cancel delayed `func` invocations and a `flush` method to
|
2018 |
-
* immediately invoke them. Provide `options` to indicate whether `func`
|
2019 |
-
* should be invoked on the leading and/or trailing edge of the `wait`
|
2020 |
-
* timeout. The `func` is invoked with the last arguments provided to the
|
2021 |
-
* throttled function. Subsequent calls to the throttled function return the
|
2022 |
-
* result of the last `func` invocation.
|
2023 |
-
*
|
2024 |
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
2025 |
-
* invoked on the trailing edge of the timeout only if the throttled function
|
2026 |
-
* is invoked more than once during the `wait` timeout.
|
2027 |
-
*
|
2028 |
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
2029 |
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
2030 |
-
*
|
2031 |
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
2032 |
-
* for details over the differences between `_.throttle` and `_.debounce`.
|
2033 |
-
*
|
2034 |
-
* @static
|
2035 |
-
* @memberOf _
|
2036 |
-
* @since 0.1.0
|
2037 |
-
* @category Function
|
2038 |
-
* @param {Function} func The function to throttle.
|
2039 |
-
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
2040 |
-
* @param {Object} [options={}] The options object.
|
2041 |
-
* @param {boolean} [options.leading=true]
|
2042 |
-
* Specify invoking on the leading edge of the timeout.
|
2043 |
-
* @param {boolean} [options.trailing=true]
|
2044 |
-
* Specify invoking on the trailing edge of the timeout.
|
2045 |
-
* @returns {Function} Returns the new throttled function.
|
2046 |
-
* @example
|
2047 |
-
*
|
2048 |
-
* // Avoid excessively updating the position while scrolling.
|
2049 |
-
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
2050 |
-
*
|
2051 |
-
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
2052 |
-
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
2053 |
-
* jQuery(element).on('click', throttled);
|
2054 |
-
*
|
2055 |
-
* // Cancel the trailing throttled invocation.
|
2056 |
-
* jQuery(window).on('popstate', throttled.cancel);
|
2057 |
-
*/
|
2058 |
-
function throttle(func, wait, options) {
|
2059 |
-
var leading = true,
|
2060 |
-
trailing = true;
|
2061 |
-
|
2062 |
-
if (typeof func != 'function') {
|
2063 |
-
throw new TypeError(FUNC_ERROR_TEXT);
|
2064 |
-
}
|
2065 |
-
if (isObject$1(options)) {
|
2066 |
-
leading = 'leading' in options ? !!options.leading : leading;
|
2067 |
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
2068 |
-
}
|
2069 |
-
return debounce(func, wait, {
|
2070 |
-
'leading': leading,
|
2071 |
-
'maxWait': wait,
|
2072 |
-
'trailing': trailing
|
2073 |
-
});
|
2074 |
-
}
|
2075 |
-
|
2076 |
-
/**
|
2077 |
-
* Checks if `value` is the
|
2078 |
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
2079 |
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
2080 |
-
*
|
2081 |
-
* @static
|
2082 |
-
* @memberOf _
|
2083 |
-
* @since 0.1.0
|
2084 |
-
* @category Lang
|
2085 |
-
* @param {*} value The value to check.
|
2086 |
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
2087 |
-
* @example
|
2088 |
-
*
|
2089 |
-
* _.isObject({});
|
2090 |
-
* // => true
|
2091 |
-
*
|
2092 |
-
* _.isObject([1, 2, 3]);
|
2093 |
-
* // => true
|
2094 |
-
*
|
2095 |
-
* _.isObject(_.noop);
|
2096 |
-
* // => true
|
2097 |
-
*
|
2098 |
-
* _.isObject(null);
|
2099 |
-
* // => false
|
2100 |
-
*/
|
2101 |
-
function isObject$1(value) {
|
2102 |
-
var type = typeof value;
|
2103 |
-
return !!value && (type == 'object' || type == 'function');
|
2104 |
-
}
|
2105 |
-
|
2106 |
-
/**
|
2107 |
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
2108 |
-
* and has a `typeof` result of "object".
|
2109 |
-
*
|
2110 |
-
* @static
|
2111 |
-
* @memberOf _
|
2112 |
-
* @since 4.0.0
|
2113 |
-
* @category Lang
|
2114 |
-
* @param {*} value The value to check.
|
2115 |
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
2116 |
-
* @example
|
2117 |
-
*
|
2118 |
-
* _.isObjectLike({});
|
2119 |
-
* // => true
|
2120 |
-
*
|
2121 |
-
* _.isObjectLike([1, 2, 3]);
|
2122 |
-
* // => true
|
2123 |
-
*
|
2124 |
-
* _.isObjectLike(_.noop);
|
2125 |
-
* // => false
|
2126 |
-
*
|
2127 |
-
* _.isObjectLike(null);
|
2128 |
-
* // => false
|
2129 |
-
*/
|
2130 |
-
function isObjectLike(value) {
|
2131 |
-
return !!value && typeof value == 'object';
|
2132 |
-
}
|
2133 |
-
|
2134 |
-
/**
|
2135 |
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
2136 |
-
*
|
2137 |
-
* @static
|
2138 |
-
* @memberOf _
|
2139 |
-
* @since 4.0.0
|
2140 |
-
* @category Lang
|
2141 |
-
* @param {*} value The value to check.
|
2142 |
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
2143 |
-
* @example
|
2144 |
-
*
|
2145 |
-
* _.isSymbol(Symbol.iterator);
|
2146 |
-
* // => true
|
2147 |
-
*
|
2148 |
-
* _.isSymbol('abc');
|
2149 |
-
* // => false
|
2150 |
-
*/
|
2151 |
-
function isSymbol(value) {
|
2152 |
-
return typeof value == 'symbol' ||
|
2153 |
-
(isObjectLike(value) && objectToString$1.call(value) == symbolTag);
|
2154 |
-
}
|
2155 |
-
|
2156 |
-
/**
|
2157 |
-
* Converts `value` to a number.
|
2158 |
-
*
|
2159 |
-
* @static
|
2160 |
-
* @memberOf _
|
2161 |
-
* @since 4.0.0
|
2162 |
-
* @category Lang
|
2163 |
-
* @param {*} value The value to process.
|
2164 |
-
* @returns {number} Returns the number.
|
2165 |
-
* @example
|
2166 |
-
*
|
2167 |
-
* _.toNumber(3.2);
|
2168 |
-
* // => 3.2
|
2169 |
-
*
|
2170 |
-
* _.toNumber(Number.MIN_VALUE);
|
2171 |
-
* // => 5e-324
|
2172 |
-
*
|
2173 |
-
* _.toNumber(Infinity);
|
2174 |
-
* // => Infinity
|
2175 |
-
*
|
2176 |
-
* _.toNumber('3.2');
|
2177 |
-
* // => 3.2
|
2178 |
-
*/
|
2179 |
-
function toNumber(value) {
|
2180 |
-
if (typeof value == 'number') {
|
2181 |
-
return value;
|
2182 |
-
}
|
2183 |
-
if (isSymbol(value)) {
|
2184 |
-
return NAN;
|
2185 |
-
}
|
2186 |
-
if (isObject$1(value)) {
|
2187 |
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
2188 |
-
value = isObject$1(other) ? (other + '') : other;
|
2189 |
-
}
|
2190 |
-
if (typeof value != 'string') {
|
2191 |
-
return value === 0 ? value : +value;
|
2192 |
-
}
|
2193 |
-
value = value.replace(reTrim, '');
|
2194 |
-
var isBinary = reIsBinary.test(value);
|
2195 |
-
return (isBinary || reIsOctal.test(value))
|
2196 |
-
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
2197 |
-
: (reIsBadHex.test(value) ? NAN : +value);
|
2198 |
-
}
|
2199 |
-
|
2200 |
-
var lodash_throttle = throttle;
|
2201 |
-
|
2202 |
-
/**
|
2203 |
-
* lodash (Custom Build) <https://lodash.com/>
|
2204 |
-
* Build: `lodash modularize exports="npm" -o ./`
|
2205 |
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
2206 |
-
* Released under MIT license <https://lodash.com/license>
|
2207 |
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
2208 |
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
2209 |
-
*/
|
2210 |
-
|
2211 |
-
/** Used as the `TypeError` message for "Functions" methods. */
|
2212 |
-
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
2213 |
-
|
2214 |
-
/** Used as references for various `Number` constants. */
|
2215 |
-
var NAN$1 = 0 / 0;
|
2216 |
-
|
2217 |
-
/** `Object#toString` result references. */
|
2218 |
-
var symbolTag$1 = '[object Symbol]';
|
2219 |
-
|
2220 |
-
/** Used to match leading and trailing whitespace. */
|
2221 |
-
var reTrim$1 = /^\s+|\s+$/g;
|
2222 |
-
|
2223 |
-
/** Used to detect bad signed hexadecimal string values. */
|
2224 |
-
var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
|
2225 |
-
|
2226 |
-
/** Used to detect binary string values. */
|
2227 |
-
var reIsBinary$1 = /^0b[01]+$/i;
|
2228 |
-
|
2229 |
-
/** Used to detect octal string values. */
|
2230 |
-
var reIsOctal$1 = /^0o[0-7]+$/i;
|
2231 |
-
|
2232 |
-
/** Built-in method references without a dependency on `root`. */
|
2233 |
-
var freeParseInt$1 = parseInt;
|
2234 |
-
|
2235 |
-
/** Detect free variable `global` from Node.js. */
|
2236 |
-
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
2237 |
-
|
2238 |
-
/** Detect free variable `self`. */
|
2239 |
-
var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
|
2240 |
-
|
2241 |
-
/** Used as a reference to the global object. */
|
2242 |
-
var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
|
2243 |
-
|
2244 |
-
/** Used for built-in method references. */
|
2245 |
-
var objectProto$1 = Object.prototype;
|
2246 |
-
|
2247 |
-
/**
|
2248 |
-
* Used to resolve the
|
2249 |
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
2250 |
-
* of values.
|
2251 |
-
*/
|
2252 |
-
var objectToString$2 = objectProto$1.toString;
|
2253 |
-
|
2254 |
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
2255 |
-
var nativeMax$1 = Math.max,
|
2256 |
-
nativeMin$1 = Math.min;
|
2257 |
-
|
2258 |
-
/**
|
2259 |
-
* Gets the timestamp of the number of milliseconds that have elapsed since
|
2260 |
-
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
2261 |
-
*
|
2262 |
-
* @static
|
2263 |
-
* @memberOf _
|
2264 |
-
* @since 2.4.0
|
2265 |
-
* @category Date
|
2266 |
-
* @returns {number} Returns the timestamp.
|
2267 |
-
* @example
|
2268 |
-
*
|
2269 |
-
* _.defer(function(stamp) {
|
2270 |
-
* console.log(_.now() - stamp);
|
2271 |
-
* }, _.now());
|
2272 |
-
* // => Logs the number of milliseconds it took for the deferred invocation.
|
2273 |
-
*/
|
2274 |
-
var now$1 = function() {
|
2275 |
-
return root$1.Date.now();
|
2276 |
-
};
|
2277 |
-
|
2278 |
-
/**
|
2279 |
-
* Creates a debounced function that delays invoking `func` until after `wait`
|
2280 |
-
* milliseconds have elapsed since the last time the debounced function was
|
2281 |
-
* invoked. The debounced function comes with a `cancel` method to cancel
|
2282 |
-
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
2283 |
-
* Provide `options` to indicate whether `func` should be invoked on the
|
2284 |
-
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
2285 |
-
* with the last arguments provided to the debounced function. Subsequent
|
2286 |
-
* calls to the debounced function return the result of the last `func`
|
2287 |
-
* invocation.
|
2288 |
-
*
|
2289 |
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
2290 |
-
* invoked on the trailing edge of the timeout only if the debounced function
|
2291 |
-
* is invoked more than once during the `wait` timeout.
|
2292 |
-
*
|
2293 |
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
2294 |
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
2295 |
-
*
|
2296 |
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
2297 |
-
* for details over the differences between `_.debounce` and `_.throttle`.
|
2298 |
-
*
|
2299 |
-
* @static
|
2300 |
-
* @memberOf _
|
2301 |
-
* @since 0.1.0
|
2302 |
-
* @category Function
|
2303 |
-
* @param {Function} func The function to debounce.
|
2304 |
-
* @param {number} [wait=0] The number of milliseconds to delay.
|
2305 |
-
* @param {Object} [options={}] The options object.
|
2306 |
-
* @param {boolean} [options.leading=false]
|
2307 |
-
* Specify invoking on the leading edge of the timeout.
|
2308 |
-
* @param {number} [options.maxWait]
|
2309 |
-
* The maximum time `func` is allowed to be delayed before it's invoked.
|
2310 |
-
* @param {boolean} [options.trailing=true]
|
2311 |
-
* Specify invoking on the trailing edge of the timeout.
|
2312 |
-
* @returns {Function} Returns the new debounced function.
|
2313 |
-
* @example
|
2314 |
-
*
|
2315 |
-
* // Avoid costly calculations while the window size is in flux.
|
2316 |
-
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
2317 |
-
*
|
2318 |
-
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
2319 |
-
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
2320 |
-
* 'leading': true,
|
2321 |
-
* 'trailing': false
|
2322 |
-
* }));
|
2323 |
-
*
|
2324 |
-
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
2325 |
-
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
2326 |
-
* var source = new EventSource('/stream');
|
2327 |
-
* jQuery(source).on('message', debounced);
|
2328 |
-
*
|
2329 |
-
* // Cancel the trailing debounced invocation.
|
2330 |
-
* jQuery(window).on('popstate', debounced.cancel);
|
2331 |
-
*/
|
2332 |
-
function debounce$1(func, wait, options) {
|
2333 |
-
var lastArgs,
|
2334 |
-
lastThis,
|
2335 |
-
maxWait,
|
2336 |
-
result,
|
2337 |
-
timerId,
|
2338 |
-
lastCallTime,
|
2339 |
-
lastInvokeTime = 0,
|
2340 |
-
leading = false,
|
2341 |
-
maxing = false,
|
2342 |
-
trailing = true;
|
2343 |
-
|
2344 |
-
if (typeof func != 'function') {
|
2345 |
-
throw new TypeError(FUNC_ERROR_TEXT$1);
|
2346 |
-
}
|
2347 |
-
wait = toNumber$1(wait) || 0;
|
2348 |
-
if (isObject$2(options)) {
|
2349 |
-
leading = !!options.leading;
|
2350 |
-
maxing = 'maxWait' in options;
|
2351 |
-
maxWait = maxing ? nativeMax$1(toNumber$1(options.maxWait) || 0, wait) : maxWait;
|
2352 |
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
2353 |
-
}
|
2354 |
-
|
2355 |
-
function invokeFunc(time) {
|
2356 |
-
var args = lastArgs,
|
2357 |
-
thisArg = lastThis;
|
2358 |
-
|
2359 |
-
lastArgs = lastThis = undefined;
|
2360 |
-
lastInvokeTime = time;
|
2361 |
-
result = func.apply(thisArg, args);
|
2362 |
-
return result;
|
2363 |
-
}
|
2364 |
-
|
2365 |
-
function leadingEdge(time) {
|
2366 |
-
// Reset any `maxWait` timer.
|
2367 |
-
lastInvokeTime = time;
|
2368 |
-
// Start the timer for the trailing edge.
|
2369 |
-
timerId = setTimeout(timerExpired, wait);
|
2370 |
-
// Invoke the leading edge.
|
2371 |
-
return leading ? invokeFunc(time) : result;
|
2372 |
-
}
|
2373 |
-
|
2374 |
-
function remainingWait(time) {
|
2375 |
-
var timeSinceLastCall = time - lastCallTime,
|
2376 |
-
timeSinceLastInvoke = time - lastInvokeTime,
|
2377 |
-
result = wait - timeSinceLastCall;
|
2378 |
-
|
2379 |
-
return maxing ? nativeMin$1(result, maxWait - timeSinceLastInvoke) : result;
|
2380 |
-
}
|
2381 |
-
|
2382 |
-
function shouldInvoke(time) {
|
2383 |
-
var timeSinceLastCall = time - lastCallTime,
|
2384 |
-
timeSinceLastInvoke = time - lastInvokeTime;
|
2385 |
-
|
2386 |
-
// Either this is the first call, activity has stopped and we're at the
|
2387 |
-
// trailing edge, the system time has gone backwards and we're treating
|
2388 |
-
// it as the trailing edge, or we've hit the `maxWait` limit.
|
2389 |
-
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
2390 |
-
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
2391 |
-
}
|
2392 |
-
|
2393 |
-
function timerExpired() {
|
2394 |
-
var time = now$1();
|
2395 |
-
if (shouldInvoke(time)) {
|
2396 |
-
return trailingEdge(time);
|
2397 |
-
}
|
2398 |
-
// Restart the timer.
|
2399 |
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
2400 |
-
}
|
2401 |
-
|
2402 |
-
function trailingEdge(time) {
|
2403 |
-
timerId = undefined;
|
2404 |
-
|
2405 |
-
// Only invoke if we have `lastArgs` which means `func` has been
|
2406 |
-
// debounced at least once.
|
2407 |
-
if (trailing && lastArgs) {
|
2408 |
-
return invokeFunc(time);
|
2409 |
-
}
|
2410 |
-
lastArgs = lastThis = undefined;
|
2411 |
-
return result;
|
2412 |
-
}
|
2413 |
-
|
2414 |
-
function cancel() {
|
2415 |
-
if (timerId !== undefined) {
|
2416 |
-
clearTimeout(timerId);
|
2417 |
-
}
|
2418 |
-
lastInvokeTime = 0;
|
2419 |
-
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
2420 |
-
}
|
2421 |
-
|
2422 |
-
function flush() {
|
2423 |
-
return timerId === undefined ? result : trailingEdge(now$1());
|
2424 |
-
}
|
2425 |
-
|
2426 |
-
function debounced() {
|
2427 |
-
var time = now$1(),
|
2428 |
-
isInvoking = shouldInvoke(time);
|
2429 |
-
|
2430 |
-
lastArgs = arguments;
|
2431 |
-
lastThis = this;
|
2432 |
-
lastCallTime = time;
|
2433 |
-
|
2434 |
-
if (isInvoking) {
|
2435 |
-
if (timerId === undefined) {
|
2436 |
-
return leadingEdge(lastCallTime);
|
2437 |
-
}
|
2438 |
-
if (maxing) {
|
2439 |
-
// Handle invocations in a tight loop.
|
2440 |
-
timerId = setTimeout(timerExpired, wait);
|
2441 |
-
return invokeFunc(lastCallTime);
|
2442 |
-
}
|
2443 |
-
}
|
2444 |
-
if (timerId === undefined) {
|
2445 |
-
timerId = setTimeout(timerExpired, wait);
|
2446 |
-
}
|
2447 |
-
return result;
|
2448 |
-
}
|
2449 |
-
debounced.cancel = cancel;
|
2450 |
-
debounced.flush = flush;
|
2451 |
-
return debounced;
|
2452 |
-
}
|
2453 |
-
|
2454 |
-
/**
|
2455 |
-
* Checks if `value` is the
|
2456 |
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
2457 |
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
2458 |
-
*
|
2459 |
-
* @static
|
2460 |
-
* @memberOf _
|
2461 |
-
* @since 0.1.0
|
2462 |
-
* @category Lang
|
2463 |
-
* @param {*} value The value to check.
|
2464 |
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
2465 |
-
* @example
|
2466 |
-
*
|
2467 |
-
* _.isObject({});
|
2468 |
-
* // => true
|
2469 |
-
*
|
2470 |
-
* _.isObject([1, 2, 3]);
|
2471 |
-
* // => true
|
2472 |
-
*
|
2473 |
-
* _.isObject(_.noop);
|
2474 |
-
* // => true
|
2475 |
-
*
|
2476 |
-
* _.isObject(null);
|
2477 |
-
* // => false
|
2478 |
-
*/
|
2479 |
-
function isObject$2(value) {
|
2480 |
-
var type = typeof value;
|
2481 |
-
return !!value && (type == 'object' || type == 'function');
|
2482 |
-
}
|
2483 |
-
|
2484 |
-
/**
|
2485 |
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
2486 |
-
* and has a `typeof` result of "object".
|
2487 |
-
*
|
2488 |
-
* @static
|
2489 |
-
* @memberOf _
|
2490 |
-
* @since 4.0.0
|
2491 |
-
* @category Lang
|
2492 |
-
* @param {*} value The value to check.
|
2493 |
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
2494 |
-
* @example
|
2495 |
-
*
|
2496 |
-
* _.isObjectLike({});
|
2497 |
-
* // => true
|
2498 |
-
*
|
2499 |
-
* _.isObjectLike([1, 2, 3]);
|
2500 |
-
* // => true
|
2501 |
-
*
|
2502 |
-
* _.isObjectLike(_.noop);
|
2503 |
-
* // => false
|
2504 |
-
*
|
2505 |
-
* _.isObjectLike(null);
|
2506 |
-
* // => false
|
2507 |
-
*/
|
2508 |
-
function isObjectLike$1(value) {
|
2509 |
-
return !!value && typeof value == 'object';
|
2510 |
-
}
|
2511 |
-
|
2512 |
-
/**
|
2513 |
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
2514 |
-
*
|
2515 |
-
* @static
|
2516 |
-
* @memberOf _
|
2517 |
-
* @since 4.0.0
|
2518 |
-
* @category Lang
|
2519 |
-
* @param {*} value The value to check.
|
2520 |
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
2521 |
-
* @example
|
2522 |
-
*
|
2523 |
-
* _.isSymbol(Symbol.iterator);
|
2524 |
-
* // => true
|
2525 |
-
*
|
2526 |
-
* _.isSymbol('abc');
|
2527 |
-
* // => false
|
2528 |
-
*/
|
2529 |
-
function isSymbol$1(value) {
|
2530 |
-
return typeof value == 'symbol' ||
|
2531 |
-
(isObjectLike$1(value) && objectToString$2.call(value) == symbolTag$1);
|
2532 |
-
}
|
2533 |
-
|
2534 |
-
/**
|
2535 |
-
* Converts `value` to a number.
|
2536 |
-
*
|
2537 |
-
* @static
|
2538 |
-
* @memberOf _
|
2539 |
-
* @since 4.0.0
|
2540 |
-
* @category Lang
|
2541 |
-
* @param {*} value The value to process.
|
2542 |
-
* @returns {number} Returns the number.
|
2543 |
-
* @example
|
2544 |
-
*
|
2545 |
-
* _.toNumber(3.2);
|
2546 |
-
* // => 3.2
|
2547 |
-
*
|
2548 |
-
* _.toNumber(Number.MIN_VALUE);
|
2549 |
-
* // => 5e-324
|
2550 |
-
*
|
2551 |
-
* _.toNumber(Infinity);
|
2552 |
-
* // => Infinity
|
2553 |
-
*
|
2554 |
-
* _.toNumber('3.2');
|
2555 |
-
* // => 3.2
|
2556 |
-
*/
|
2557 |
-
function toNumber$1(value) {
|
2558 |
-
if (typeof value == 'number') {
|
2559 |
-
return value;
|
2560 |
-
}
|
2561 |
-
if (isSymbol$1(value)) {
|
2562 |
-
return NAN$1;
|
2563 |
-
}
|
2564 |
-
if (isObject$2(value)) {
|
2565 |
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
2566 |
-
value = isObject$2(other) ? (other + '') : other;
|
2567 |
-
}
|
2568 |
-
if (typeof value != 'string') {
|
2569 |
-
return value === 0 ? value : +value;
|
2570 |
-
}
|
2571 |
-
value = value.replace(reTrim$1, '');
|
2572 |
-
var isBinary = reIsBinary$1.test(value);
|
2573 |
-
return (isBinary || reIsOctal$1.test(value))
|
2574 |
-
? freeParseInt$1(value.slice(2), isBinary ? 2 : 8)
|
2575 |
-
: (reIsBadHex$1.test(value) ? NAN$1 : +value);
|
2576 |
-
}
|
2577 |
-
|
2578 |
-
var lodash_debounce = debounce$1;
|
2579 |
-
|
2580 |
-
/**
|
2581 |
-
* lodash (Custom Build) <https://lodash.com/>
|
2582 |
-
* Build: `lodash modularize exports="npm" -o ./`
|
2583 |
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
2584 |
-
* Released under MIT license <https://lodash.com/license>
|
2585 |
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
2586 |
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
2587 |
-
*/
|
2588 |
-
|
2589 |
-
/** Used as the `TypeError` message for "Functions" methods. */
|
2590 |
-
var FUNC_ERROR_TEXT$2 = 'Expected a function';
|
2591 |
-
|
2592 |
-
/** Used to stand-in for `undefined` hash values. */
|
2593 |
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
2594 |
-
|
2595 |
-
/** `Object#toString` result references. */
|
2596 |
-
var funcTag = '[object Function]',
|
2597 |
-
genTag = '[object GeneratorFunction]';
|
2598 |
-
|
2599 |
-
/**
|
2600 |
-
* Used to match `RegExp`
|
2601 |
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
2602 |
-
*/
|
2603 |
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
2604 |
-
|
2605 |
-
/** Used to detect host constructors (Safari). */
|
2606 |
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
2607 |
-
|
2608 |
-
/** Detect free variable `global` from Node.js. */
|
2609 |
-
var freeGlobal$2 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
2610 |
-
|
2611 |
-
/** Detect free variable `self`. */
|
2612 |
-
var freeSelf$2 = typeof self == 'object' && self && self.Object === Object && self;
|
2613 |
-
|
2614 |
-
/** Used as a reference to the global object. */
|
2615 |
-
var root$2 = freeGlobal$2 || freeSelf$2 || Function('return this')();
|
2616 |
-
|
2617 |
-
/**
|
2618 |
-
* Gets the value at `key` of `object`.
|
2619 |
-
*
|
2620 |
-
* @private
|
2621 |
-
* @param {Object} [object] The object to query.
|
2622 |
-
* @param {string} key The key of the property to get.
|
2623 |
-
* @returns {*} Returns the property value.
|
2624 |
-
*/
|
2625 |
-
function getValue(object, key) {
|
2626 |
-
return object == null ? undefined : object[key];
|
2627 |
-
}
|
2628 |
-
|
2629 |
-
/**
|
2630 |
-
* Checks if `value` is a host object in IE < 9.
|
2631 |
-
*
|
2632 |
-
* @private
|
2633 |
-
* @param {*} value The value to check.
|
2634 |
-
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
2635 |
-
*/
|
2636 |
-
function isHostObject(value) {
|
2637 |
-
// Many host objects are `Object` objects that can coerce to strings
|
2638 |
-
// despite having improperly defined `toString` methods.
|
2639 |
-
var result = false;
|
2640 |
-
if (value != null && typeof value.toString != 'function') {
|
2641 |
-
try {
|
2642 |
-
result = !!(value + '');
|
2643 |
-
} catch (e) {}
|
2644 |
-
}
|
2645 |
-
return result;
|
2646 |
-
}
|
2647 |
-
|
2648 |
-
/** Used for built-in method references. */
|
2649 |
-
var arrayProto = Array.prototype,
|
2650 |
-
funcProto = Function.prototype,
|
2651 |
-
objectProto$2 = Object.prototype;
|
2652 |
-
|
2653 |
-
/** Used to detect overreaching core-js shims. */
|
2654 |
-
var coreJsData = root$2['__core-js_shared__'];
|
2655 |
-
|
2656 |
-
/** Used to detect methods masquerading as native. */
|
2657 |
-
var maskSrcKey = (function() {
|
2658 |
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
2659 |
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
2660 |
-
}());
|
2661 |
-
|
2662 |
-
/** Used to resolve the decompiled source of functions. */
|
2663 |
-
var funcToString = funcProto.toString;
|
2664 |
-
|
2665 |
-
/** Used to check objects for own properties. */
|
2666 |
-
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
|
2667 |
-
|
2668 |
-
/**
|
2669 |
-
* Used to resolve the
|
2670 |
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
2671 |
-
* of values.
|
2672 |
-
*/
|
2673 |
-
var objectToString$3 = objectProto$2.toString;
|
2674 |
-
|
2675 |
-
/** Used to detect if a method is native. */
|
2676 |
-
var reIsNative = RegExp('^' +
|
2677 |
-
funcToString.call(hasOwnProperty$1).replace(reRegExpChar, '\\$&')
|
2678 |
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
2679 |
-
);
|
2680 |
-
|
2681 |
-
/** Built-in value references. */
|
2682 |
-
var splice = arrayProto.splice;
|
2683 |
-
|
2684 |
-
/* Built-in method references that are verified to be native. */
|
2685 |
-
var Map$1 = getNative(root$2, 'Map'),
|
2686 |
-
nativeCreate = getNative(Object, 'create');
|
2687 |
-
|
2688 |
-
/**
|
2689 |
-
* Creates a hash object.
|
2690 |
-
*
|
2691 |
-
* @private
|
2692 |
-
* @constructor
|
2693 |
-
* @param {Array} [entries] The key-value pairs to cache.
|
2694 |
-
*/
|
2695 |
-
function Hash(entries) {
|
2696 |
-
var index = -1,
|
2697 |
-
length = entries ? entries.length : 0;
|
2698 |
-
|
2699 |
-
this.clear();
|
2700 |
-
while (++index < length) {
|
2701 |
-
var entry = entries[index];
|
2702 |
-
this.set(entry[0], entry[1]);
|
2703 |
-
}
|
2704 |
-
}
|
2705 |
-
|
2706 |
-
/**
|
2707 |
-
* Removes all key-value entries from the hash.
|
2708 |
-
*
|
2709 |
-
* @private
|
2710 |
-
* @name clear
|
2711 |
-
* @memberOf Hash
|
2712 |
-
*/
|
2713 |
-
function hashClear() {
|
2714 |
-
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
2715 |
-
}
|
2716 |
-
|
2717 |
-
/**
|
2718 |
-
* Removes `key` and its value from the hash.
|
2719 |
-
*
|
2720 |
-
* @private
|
2721 |
-
* @name delete
|
2722 |
-
* @memberOf Hash
|
2723 |
-
* @param {Object} hash The hash to modify.
|
2724 |
-
* @param {string} key The key of the value to remove.
|
2725 |
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
2726 |
-
*/
|
2727 |
-
function hashDelete(key) {
|
2728 |
-
return this.has(key) && delete this.__data__[key];
|
2729 |
-
}
|
2730 |
-
|
2731 |
-
/**
|
2732 |
-
* Gets the hash value for `key`.
|
2733 |
-
*
|
2734 |
-
* @private
|
2735 |
-
* @name get
|
2736 |
-
* @memberOf Hash
|
2737 |
-
* @param {string} key The key of the value to get.
|
2738 |
-
* @returns {*} Returns the entry value.
|
2739 |
-
*/
|
2740 |
-
function hashGet(key) {
|
2741 |
-
var data = this.__data__;
|
2742 |
-
if (nativeCreate) {
|
2743 |
-
var result = data[key];
|
2744 |
-
return result === HASH_UNDEFINED ? undefined : result;
|
2745 |
-
}
|
2746 |
-
return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
|
2747 |
-
}
|
2748 |
-
|
2749 |
-
/**
|
2750 |
-
* Checks if a hash value for `key` exists.
|
2751 |
-
*
|
2752 |
-
* @private
|
2753 |
-
* @name has
|
2754 |
-
* @memberOf Hash
|
2755 |
-
* @param {string} key The key of the entry to check.
|
2756 |
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
2757 |
-
*/
|
2758 |
-
function hashHas(key) {
|
2759 |
-
var data = this.__data__;
|
2760 |
-
return nativeCreate ? data[key] !== undefined : hasOwnProperty$1.call(data, key);
|
2761 |
-
}
|
2762 |
-
|
2763 |
-
/**
|
2764 |
-
* Sets the hash `key` to `value`.
|
2765 |
-
*
|
2766 |
-
* @private
|
2767 |
-
* @name set
|
2768 |
-
* @memberOf Hash
|
2769 |
-
* @param {string} key The key of the value to set.
|
2770 |
-
* @param {*} value The value to set.
|
2771 |
-
* @returns {Object} Returns the hash instance.
|
2772 |
-
*/
|
2773 |
-
function hashSet(key, value) {
|
2774 |
-
var data = this.__data__;
|
2775 |
-
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
2776 |
-
return this;
|
2777 |
-
}
|
2778 |
-
|
2779 |
-
// Add methods to `Hash`.
|
2780 |
-
Hash.prototype.clear = hashClear;
|
2781 |
-
Hash.prototype['delete'] = hashDelete;
|
2782 |
-
Hash.prototype.get = hashGet;
|
2783 |
-
Hash.prototype.has = hashHas;
|
2784 |
-
Hash.prototype.set = hashSet;
|
2785 |
-
|
2786 |
-
/**
|
2787 |
-
* Creates an list cache object.
|
2788 |
-
*
|
2789 |
-
* @private
|
2790 |
-
* @constructor
|
2791 |
-
* @param {Array} [entries] The key-value pairs to cache.
|
2792 |
-
*/
|
2793 |
-
function ListCache(entries) {
|
2794 |
-
var index = -1,
|
2795 |
-
length = entries ? entries.length : 0;
|
2796 |
-
|
2797 |
-
this.clear();
|
2798 |
-
while (++index < length) {
|
2799 |
-
var entry = entries[index];
|
2800 |
-
this.set(entry[0], entry[1]);
|
2801 |
-
}
|
2802 |
-
}
|
2803 |
-
|
2804 |
-
/**
|
2805 |
-
* Removes all key-value entries from the list cache.
|
2806 |
-
*
|
2807 |
-
* @private
|
2808 |
-
* @name clear
|
2809 |
-
* @memberOf ListCache
|
2810 |
-
*/
|
2811 |
-
function listCacheClear() {
|
2812 |
-
this.__data__ = [];
|
2813 |
-
}
|
2814 |
-
|
2815 |
-
/**
|
2816 |
-
* Removes `key` and its value from the list cache.
|
2817 |
-
*
|
2818 |
-
* @private
|
2819 |
-
* @name delete
|
2820 |
-
* @memberOf ListCache
|
2821 |
-
* @param {string} key The key of the value to remove.
|
2822 |
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
2823 |
-
*/
|
2824 |
-
function listCacheDelete(key) {
|
2825 |
-
var data = this.__data__,
|
2826 |
-
index = assocIndexOf(data, key);
|
2827 |
-
|
2828 |
-
if (index < 0) {
|
2829 |
-
return false;
|
2830 |
-
}
|
2831 |
-
var lastIndex = data.length - 1;
|
2832 |
-
if (index == lastIndex) {
|
2833 |
-
data.pop();
|
2834 |
-
} else {
|
2835 |
-
splice.call(data, index, 1);
|
2836 |
-
}
|
2837 |
-
return true;
|
2838 |
-
}
|
2839 |
-
|
2840 |
-
/**
|
2841 |
-
* Gets the list cache value for `key`.
|
2842 |
-
*
|
2843 |
-
* @private
|
2844 |
-
* @name get
|
2845 |
-
* @memberOf ListCache
|
2846 |
-
* @param {string} key The key of the value to get.
|
2847 |
-
* @returns {*} Returns the entry value.
|
2848 |
-
*/
|
2849 |
-
function listCacheGet(key) {
|
2850 |
-
var data = this.__data__,
|
2851 |
-
index = assocIndexOf(data, key);
|
2852 |
-
|
2853 |
-
return index < 0 ? undefined : data[index][1];
|
2854 |
-
}
|
2855 |
-
|
2856 |
-
/**
|
2857 |
-
* Checks if a list cache value for `key` exists.
|
2858 |
-
*
|
2859 |
-
* @private
|
2860 |
-
* @name has
|
2861 |
-
* @memberOf ListCache
|
2862 |
-
* @param {string} key The key of the entry to check.
|
2863 |
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
2864 |
-
*/
|
2865 |
-
function listCacheHas(key) {
|
2866 |
-
return assocIndexOf(this.__data__, key) > -1;
|
2867 |
-
}
|
2868 |
-
|
2869 |
-
/**
|
2870 |
-
* Sets the list cache `key` to `value`.
|
2871 |
-
*
|
2872 |
-
* @private
|
2873 |
-
* @name set
|
2874 |
-
* @memberOf ListCache
|
2875 |
-
* @param {string} key The key of the value to set.
|
2876 |
-
* @param {*} value The value to set.
|
2877 |
-
* @returns {Object} Returns the list cache instance.
|
2878 |
-
*/
|
2879 |
-
function listCacheSet(key, value) {
|
2880 |
-
var data = this.__data__,
|
2881 |
-
index = assocIndexOf(data, key);
|
2882 |
-
|
2883 |
-
if (index < 0) {
|
2884 |
-
data.push([key, value]);
|
2885 |
-
} else {
|
2886 |
-
data[index][1] = value;
|
2887 |
-
}
|
2888 |
-
return this;
|
2889 |
-
}
|
2890 |
-
|
2891 |
-
// Add methods to `ListCache`.
|
2892 |
-
ListCache.prototype.clear = listCacheClear;
|
2893 |
-
ListCache.prototype['delete'] = listCacheDelete;
|
2894 |
-
ListCache.prototype.get = listCacheGet;
|
2895 |
-
ListCache.prototype.has = listCacheHas;
|
2896 |
-
ListCache.prototype.set = listCacheSet;
|
2897 |
-
|
2898 |
-
/**
|
2899 |
-
* Creates a map cache object to store key-value pairs.
|
2900 |
-
*
|
2901 |
-
* @private
|
2902 |
-
* @constructor
|
2903 |
-
* @param {Array} [entries] The key-value pairs to cache.
|
2904 |
-
*/
|
2905 |
-
function MapCache(entries) {
|
2906 |
-
var index = -1,
|
2907 |
-
length = entries ? entries.length : 0;
|
2908 |
-
|
2909 |
-
this.clear();
|
2910 |
-
while (++index < length) {
|
2911 |
-
var entry = entries[index];
|
2912 |
-
this.set(entry[0], entry[1]);
|
2913 |
-
}
|
2914 |
-
}
|
2915 |
-
|
2916 |
-
/**
|
2917 |
-
* Removes all key-value entries from the map.
|
2918 |
-
*
|
2919 |
-
* @private
|
2920 |
-
* @name clear
|
2921 |
-
* @memberOf MapCache
|
2922 |
-
*/
|
2923 |
-
function mapCacheClear() {
|
2924 |
-
this.__data__ = {
|
2925 |
-
'hash': new Hash,
|
2926 |
-
'map': new (Map$1 || ListCache),
|
2927 |
-
'string': new Hash
|
2928 |
-
};
|
2929 |
-
}
|
2930 |
-
|
2931 |
-
/**
|
2932 |
-
* Removes `key` and its value from the map.
|
2933 |
-
*
|
2934 |
-
* @private
|
2935 |
-
* @name delete
|
2936 |
-
* @memberOf MapCache
|
2937 |
-
* @param {string} key The key of the value to remove.
|
2938 |
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
2939 |
-
*/
|
2940 |
-
function mapCacheDelete(key) {
|
2941 |
-
return getMapData(this, key)['delete'](key);
|
2942 |
-
}
|
2943 |
-
|
2944 |
-
/**
|
2945 |
-
* Gets the map value for `key`.
|
2946 |
-
*
|
2947 |
-
* @private
|
2948 |
-
* @name get
|
2949 |
-
* @memberOf MapCache
|
2950 |
-
* @param {string} key The key of the value to get.
|
2951 |
-
* @returns {*} Returns the entry value.
|
2952 |
-
*/
|
2953 |
-
function mapCacheGet(key) {
|
2954 |
-
return getMapData(this, key).get(key);
|
2955 |
-
}
|
2956 |
-
|
2957 |
-
/**
|
2958 |
-
* Checks if a map value for `key` exists.
|
2959 |
-
*
|
2960 |
-
* @private
|
2961 |
-
* @name has
|
2962 |
-
* @memberOf MapCache
|
2963 |
-
* @param {string} key The key of the entry to check.
|
2964 |
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
2965 |
-
*/
|
2966 |
-
function mapCacheHas(key) {
|
2967 |
-
return getMapData(this, key).has(key);
|
2968 |
-
}
|
2969 |
-
|
2970 |
-
/**
|
2971 |
-
* Sets the map `key` to `value`.
|
2972 |
-
*
|
2973 |
-
* @private
|
2974 |
-
* @name set
|
2975 |
-
* @memberOf MapCache
|
2976 |
-
* @param {string} key The key of the value to set.
|
2977 |
-
* @param {*} value The value to set.
|
2978 |
-
* @returns {Object} Returns the map cache instance.
|
2979 |
-
*/
|
2980 |
-
function mapCacheSet(key, value) {
|
2981 |
-
getMapData(this, key).set(key, value);
|
2982 |
-
return this;
|
2983 |
-
}
|
2984 |
-
|
2985 |
-
// Add methods to `MapCache`.
|
2986 |
-
MapCache.prototype.clear = mapCacheClear;
|
2987 |
-
MapCache.prototype['delete'] = mapCacheDelete;
|
2988 |
-
MapCache.prototype.get = mapCacheGet;
|
2989 |
-
MapCache.prototype.has = mapCacheHas;
|
2990 |
-
MapCache.prototype.set = mapCacheSet;
|
2991 |
-
|
2992 |
-
/**
|
2993 |
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
2994 |
-
*
|
2995 |
-
* @private
|
2996 |
-
* @param {Array} array The array to inspect.
|
2997 |
-
* @param {*} key The key to search for.
|
2998 |
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
2999 |
-
*/
|
3000 |
-
function assocIndexOf(array, key) {
|
3001 |
-
var length = array.length;
|
3002 |
-
while (length--) {
|
3003 |
-
if (eq(array[length][0], key)) {
|
3004 |
-
return length;
|
3005 |
-
}
|
3006 |
-
}
|
3007 |
-
return -1;
|
3008 |
-
}
|
3009 |
-
|
3010 |
-
/**
|
3011 |
-
* The base implementation of `_.isNative` without bad shim checks.
|
3012 |
-
*
|
3013 |
-
* @private
|
3014 |
-
* @param {*} value The value to check.
|
3015 |
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
3016 |
-
* else `false`.
|
3017 |
-
*/
|
3018 |
-
function baseIsNative(value) {
|
3019 |
-
if (!isObject$3(value) || isMasked(value)) {
|
3020 |
-
return false;
|
3021 |
-
}
|
3022 |
-
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
3023 |
-
return pattern.test(toSource(value));
|
3024 |
-
}
|
3025 |
-
|
3026 |
-
/**
|
3027 |
-
* Gets the data for `map`.
|
3028 |
-
*
|
3029 |
-
* @private
|
3030 |
-
* @param {Object} map The map to query.
|
3031 |
-
* @param {string} key The reference key.
|
3032 |
-
* @returns {*} Returns the map data.
|
3033 |
-
*/
|
3034 |
-
function getMapData(map, key) {
|
3035 |
-
var data = map.__data__;
|
3036 |
-
return isKeyable(key)
|
3037 |
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
3038 |
-
: data.map;
|
3039 |
-
}
|
3040 |
-
|
3041 |
-
/**
|
3042 |
-
* Gets the native function at `key` of `object`.
|
3043 |
-
*
|
3044 |
-
* @private
|
3045 |
-
* @param {Object} object The object to query.
|
3046 |
-
* @param {string} key The key of the method to get.
|
3047 |
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
3048 |
-
*/
|
3049 |
-
function getNative(object, key) {
|
3050 |
-
var value = getValue(object, key);
|
3051 |
-
return baseIsNative(value) ? value : undefined;
|
3052 |
-
}
|
3053 |
-
|
3054 |
-
/**
|
3055 |
-
* Checks if `value` is suitable for use as unique object key.
|
3056 |
-
*
|
3057 |
-
* @private
|
3058 |
-
* @param {*} value The value to check.
|
3059 |
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
3060 |
-
*/
|
3061 |
-
function isKeyable(value) {
|
3062 |
-
var type = typeof value;
|
3063 |
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
3064 |
-
? (value !== '__proto__')
|
3065 |
-
: (value === null);
|
3066 |
-
}
|
3067 |
-
|
3068 |
-
/**
|
3069 |
-
* Checks if `func` has its source masked.
|
3070 |
-
*
|
3071 |
-
* @private
|
3072 |
-
* @param {Function} func The function to check.
|
3073 |
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
3074 |
-
*/
|
3075 |
-
function isMasked(func) {
|
3076 |
-
return !!maskSrcKey && (maskSrcKey in func);
|
3077 |
-
}
|
3078 |
-
|
3079 |
-
/**
|
3080 |
-
* Converts `func` to its source code.
|
3081 |
-
*
|
3082 |
-
* @private
|
3083 |
-
* @param {Function} func The function to process.
|
3084 |
-
* @returns {string} Returns the source code.
|
3085 |
-
*/
|
3086 |
-
function toSource(func) {
|
3087 |
-
if (func != null) {
|
3088 |
-
try {
|
3089 |
-
return funcToString.call(func);
|
3090 |
-
} catch (e) {}
|
3091 |
-
try {
|
3092 |
-
return (func + '');
|
3093 |
-
} catch (e) {}
|
3094 |
-
}
|
3095 |
-
return '';
|
3096 |
-
}
|
3097 |
-
|
3098 |
-
/**
|
3099 |
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
3100 |
-
* provided, it determines the cache key for storing the result based on the
|
3101 |
-
* arguments provided to the memoized function. By default, the first argument
|
3102 |
-
* provided to the memoized function is used as the map cache key. The `func`
|
3103 |
-
* is invoked with the `this` binding of the memoized function.
|
3104 |
-
*
|
3105 |
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
3106 |
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
3107 |
-
* constructor with one whose instances implement the
|
3108 |
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
3109 |
-
* method interface of `delete`, `get`, `has`, and `set`.
|
3110 |
-
*
|
3111 |
-
* @static
|
3112 |
-
* @memberOf _
|
3113 |
-
* @since 0.1.0
|
3114 |
-
* @category Function
|
3115 |
-
* @param {Function} func The function to have its output memoized.
|
3116 |
-
* @param {Function} [resolver] The function to resolve the cache key.
|
3117 |
-
* @returns {Function} Returns the new memoized function.
|
3118 |
-
* @example
|
3119 |
-
*
|
3120 |
-
* var object = { 'a': 1, 'b': 2 };
|
3121 |
-
* var other = { 'c': 3, 'd': 4 };
|
3122 |
-
*
|
3123 |
-
* var values = _.memoize(_.values);
|
3124 |
-
* values(object);
|
3125 |
-
* // => [1, 2]
|
3126 |
-
*
|
3127 |
-
* values(other);
|
3128 |
-
* // => [3, 4]
|
3129 |
-
*
|
3130 |
-
* object.a = 2;
|
3131 |
-
* values(object);
|
3132 |
-
* // => [1, 2]
|
3133 |
-
*
|
3134 |
-
* // Modify the result cache.
|
3135 |
-
* values.cache.set(object, ['a', 'b']);
|
3136 |
-
* values(object);
|
3137 |
-
* // => ['a', 'b']
|
3138 |
-
*
|
3139 |
-
* // Replace `_.memoize.Cache`.
|
3140 |
-
* _.memoize.Cache = WeakMap;
|
3141 |
-
*/
|
3142 |
-
function memoize(func, resolver) {
|
3143 |
-
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
|
3144 |
-
throw new TypeError(FUNC_ERROR_TEXT$2);
|
3145 |
-
}
|
3146 |
-
var memoized = function() {
|
3147 |
-
var args = arguments,
|
3148 |
-
key = resolver ? resolver.apply(this, args) : args[0],
|
3149 |
-
cache = memoized.cache;
|
3150 |
-
|
3151 |
-
if (cache.has(key)) {
|
3152 |
-
return cache.get(key);
|
3153 |
-
}
|
3154 |
-
var result = func.apply(this, args);
|
3155 |
-
memoized.cache = cache.set(key, result);
|
3156 |
-
return result;
|
3157 |
-
};
|
3158 |
-
memoized.cache = new (memoize.Cache || MapCache);
|
3159 |
-
return memoized;
|
3160 |
-
}
|
3161 |
-
|
3162 |
-
// Assign cache to `_.memoize`.
|
3163 |
-
memoize.Cache = MapCache;
|
3164 |
-
|
3165 |
-
/**
|
3166 |
-
* Performs a
|
3167 |
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
3168 |
-
* comparison between two values to determine if they are equivalent.
|
3169 |
-
*
|
3170 |
-
* @static
|
3171 |
-
* @memberOf _
|
3172 |
-
* @since 4.0.0
|
3173 |
-
* @category Lang
|
3174 |
-
* @param {*} value The value to compare.
|
3175 |
-
* @param {*} other The other value to compare.
|
3176 |
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
3177 |
-
* @example
|
3178 |
-
*
|
3179 |
-
* var object = { 'a': 1 };
|
3180 |
-
* var other = { 'a': 1 };
|
3181 |
-
*
|
3182 |
-
* _.eq(object, object);
|
3183 |
-
* // => true
|
3184 |
-
*
|
3185 |
-
* _.eq(object, other);
|
3186 |
-
* // => false
|
3187 |
-
*
|
3188 |
-
* _.eq('a', 'a');
|
3189 |
-
* // => true
|
3190 |
-
*
|
3191 |
-
* _.eq('a', Object('a'));
|
3192 |
-
* // => false
|
3193 |
-
*
|
3194 |
-
* _.eq(NaN, NaN);
|
3195 |
-
* // => true
|
3196 |
-
*/
|
3197 |
-
function eq(value, other) {
|
3198 |
-
return value === other || (value !== value && other !== other);
|
3199 |
-
}
|
3200 |
-
|
3201 |
-
/**
|
3202 |
-
* Checks if `value` is classified as a `Function` object.
|
3203 |
-
*
|
3204 |
-
* @static
|
3205 |
-
* @memberOf _
|
3206 |
-
* @since 0.1.0
|
3207 |
-
* @category Lang
|
3208 |
-
* @param {*} value The value to check.
|
3209 |
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
3210 |
-
* @example
|
3211 |
-
*
|
3212 |
-
* _.isFunction(_);
|
3213 |
-
* // => true
|
3214 |
-
*
|
3215 |
-
* _.isFunction(/abc/);
|
3216 |
-
* // => false
|
3217 |
-
*/
|
3218 |
-
function isFunction(value) {
|
3219 |
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
3220 |
-
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
3221 |
-
var tag = isObject$3(value) ? objectToString$3.call(value) : '';
|
3222 |
-
return tag == funcTag || tag == genTag;
|
3223 |
-
}
|
3224 |
-
|
3225 |
-
/**
|
3226 |
-
* Checks if `value` is the
|
3227 |
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
3228 |
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
3229 |
-
*
|
3230 |
-
* @static
|
3231 |
-
* @memberOf _
|
3232 |
-
* @since 0.1.0
|
3233 |
-
* @category Lang
|
3234 |
-
* @param {*} value The value to check.
|
3235 |
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
3236 |
-
* @example
|
3237 |
-
*
|
3238 |
-
* _.isObject({});
|
3239 |
-
* // => true
|
3240 |
-
*
|
3241 |
-
* _.isObject([1, 2, 3]);
|
3242 |
-
* // => true
|
3243 |
-
*
|
3244 |
-
* _.isObject(_.noop);
|
3245 |
-
* // => true
|
3246 |
-
*
|
3247 |
-
* _.isObject(null);
|
3248 |
-
* // => false
|
3249 |
-
*/
|
3250 |
-
function isObject$3(value) {
|
3251 |
-
var type = typeof value;
|
3252 |
-
return !!value && (type == 'object' || type == 'function');
|
3253 |
-
}
|
3254 |
-
|
3255 |
-
var lodash_memoize = memoize;
|
3256 |
-
|
3257 |
-
/**
|
3258 |
-
* A collection of shims that provide minimal functionality of the ES6 collections.
|
3259 |
-
*
|
3260 |
-
* These implementations are not meant to be used outside of the ResizeObserver
|
3261 |
-
* modules as they cover only a limited range of use cases.
|
3262 |
-
*/
|
3263 |
-
/* eslint-disable require-jsdoc, valid-jsdoc */
|
3264 |
-
var MapShim = (function () {
|
3265 |
-
if (typeof Map !== 'undefined') {
|
3266 |
-
return Map;
|
3267 |
-
}
|
3268 |
-
/**
|
3269 |
-
* Returns index in provided array that matches the specified key.
|
3270 |
-
*
|
3271 |
-
* @param {Array<Array>} arr
|
3272 |
-
* @param {*} key
|
3273 |
-
* @returns {number}
|
3274 |
-
*/
|
3275 |
-
function getIndex(arr, key) {
|
3276 |
-
var result = -1;
|
3277 |
-
arr.some(function (entry, index) {
|
3278 |
-
if (entry[0] === key) {
|
3279 |
-
result = index;
|
3280 |
-
return true;
|
3281 |
-
}
|
3282 |
-
return false;
|
3283 |
-
});
|
3284 |
-
return result;
|
3285 |
-
}
|
3286 |
-
return /** @class */ (function () {
|
3287 |
-
function class_1() {
|
3288 |
-
this.__entries__ = [];
|
3289 |
-
}
|
3290 |
-
Object.defineProperty(class_1.prototype, "size", {
|
3291 |
-
/**
|
3292 |
-
* @returns {boolean}
|
3293 |
-
*/
|
3294 |
-
get: function () {
|
3295 |
-
return this.__entries__.length;
|
3296 |
-
},
|
3297 |
-
enumerable: true,
|
3298 |
-
configurable: true
|
3299 |
-
});
|
3300 |
-
/**
|
3301 |
-
* @param {*} key
|
3302 |
-
* @returns {*}
|
3303 |
-
*/
|
3304 |
-
class_1.prototype.get = function (key) {
|
3305 |
-
var index = getIndex(this.__entries__, key);
|
3306 |
-
var entry = this.__entries__[index];
|
3307 |
-
return entry && entry[1];
|
3308 |
-
};
|
3309 |
-
/**
|
3310 |
-
* @param {*} key
|
3311 |
-
* @param {*} value
|
3312 |
-
* @returns {void}
|
3313 |
-
*/
|
3314 |
-
class_1.prototype.set = function (key, value) {
|
3315 |
-
var index = getIndex(this.__entries__, key);
|
3316 |
-
if (~index) {
|
3317 |
-
this.__entries__[index][1] = value;
|
3318 |
-
}
|
3319 |
-
else {
|
3320 |
-
this.__entries__.push([key, value]);
|
3321 |
-
}
|
3322 |
-
};
|
3323 |
-
/**
|
3324 |
-
* @param {*} key
|
3325 |
-
* @returns {void}
|
3326 |
-
*/
|
3327 |
-
class_1.prototype.delete = function (key) {
|
3328 |
-
var entries = this.__entries__;
|
3329 |
-
var index = getIndex(entries, key);
|
3330 |
-
if (~index) {
|
3331 |
-
entries.splice(index, 1);
|
3332 |
-
}
|
3333 |
-
};
|
3334 |
-
/**
|
3335 |
-
* @param {*} key
|
3336 |
-
* @returns {void}
|
3337 |
-
*/
|
3338 |
-
class_1.prototype.has = function (key) {
|
3339 |
-
return !!~getIndex(this.__entries__, key);
|
3340 |
-
};
|
3341 |
-
/**
|
3342 |
-
* @returns {void}
|
3343 |
-
*/
|
3344 |
-
class_1.prototype.clear = function () {
|
3345 |
-
this.__entries__.splice(0);
|
3346 |
-
};
|
3347 |
-
/**
|
3348 |
-
* @param {Function} callback
|
3349 |
-
* @param {*} [ctx=null]
|
3350 |
-
* @returns {void}
|
3351 |
-
*/
|
3352 |
-
class_1.prototype.forEach = function (callback, ctx) {
|
3353 |
-
if (ctx === void 0) { ctx = null; }
|
3354 |
-
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
3355 |
-
var entry = _a[_i];
|
3356 |
-
callback.call(ctx, entry[1], entry[0]);
|
3357 |
-
}
|
3358 |
-
};
|
3359 |
-
return class_1;
|
3360 |
-
}());
|
3361 |
-
})();
|
3362 |
-
|
3363 |
-
/**
|
3364 |
-
* Detects whether window and document objects are available in current environment.
|
3365 |
-
*/
|
3366 |
-
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
3367 |
-
|
3368 |
-
// Returns global object of a current environment.
|
3369 |
-
var global$1 = (function () {
|
3370 |
-
if (typeof global !== 'undefined' && global.Math === Math) {
|
3371 |
-
return global;
|
3372 |
-
}
|
3373 |
-
if (typeof self !== 'undefined' && self.Math === Math) {
|
3374 |
-
return self;
|
3375 |
-
}
|
3376 |
-
if (typeof window !== 'undefined' && window.Math === Math) {
|
3377 |
-
return window;
|
3378 |
-
}
|
3379 |
-
// eslint-disable-next-line no-new-func
|
3380 |
-
return Function('return this')();
|
3381 |
-
})();
|
3382 |
-
|
3383 |
-
/**
|
3384 |
-
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
3385 |
-
* first one is not supported.
|
3386 |
-
*
|
3387 |
-
* @returns {number} Requests' identifier.
|
3388 |
-
*/
|
3389 |
-
var requestAnimationFrame$1 = (function () {
|
3390 |
-
if (typeof requestAnimationFrame === 'function') {
|
3391 |
-
// It's required to use a bounded function because IE sometimes throws
|
3392 |
-
// an "Invalid calling object" error if rAF is invoked without the global
|
3393 |
-
// object on the left hand side.
|
3394 |
-
return requestAnimationFrame.bind(global$1);
|
3395 |
-
}
|
3396 |
-
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
3397 |
-
})();
|
3398 |
-
|
3399 |
-
// Defines minimum timeout before adding a trailing call.
|
3400 |
-
var trailingTimeout = 2;
|
3401 |
-
/**
|
3402 |
-
* Creates a wrapper function which ensures that provided callback will be
|
3403 |
-
* invoked only once during the specified delay period.
|
3404 |
-
*
|
3405 |
-
* @param {Function} callback - Function to be invoked after the delay period.
|
3406 |
-
* @param {number} delay - Delay after which to invoke callback.
|
3407 |
-
* @returns {Function}
|
3408 |
-
*/
|
3409 |
-
function throttle$1 (callback, delay) {
|
3410 |
-
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
3411 |
-
/**
|
3412 |
-
* Invokes the original callback function and schedules new invocation if
|
3413 |
-
* the "proxy" was called during current request.
|
3414 |
-
*
|
3415 |
-
* @returns {void}
|
3416 |
-
*/
|
3417 |
-
function resolvePending() {
|
3418 |
-
if (leadingCall) {
|
3419 |
-
leadingCall = false;
|
3420 |
-
callback();
|
3421 |
-
}
|
3422 |
-
if (trailingCall) {
|
3423 |
-
proxy();
|
3424 |
-
}
|
3425 |
-
}
|
3426 |
-
/**
|
3427 |
-
* Callback invoked after the specified delay. It will further postpone
|
3428 |
-
* invocation of the original function delegating it to the
|
3429 |
-
* requestAnimationFrame.
|
3430 |
-
*
|
3431 |
-
* @returns {void}
|
3432 |
-
*/
|
3433 |
-
function timeoutCallback() {
|
3434 |
-
requestAnimationFrame$1(resolvePending);
|
3435 |
-
}
|
3436 |
-
/**
|
3437 |
-
* Schedules invocation of the original function.
|
3438 |
-
*
|
3439 |
-
* @returns {void}
|
3440 |
-
*/
|
3441 |
-
function proxy() {
|
3442 |
-
var timeStamp = Date.now();
|
3443 |
-
if (leadingCall) {
|
3444 |
-
// Reject immediately following calls.
|
3445 |
-
if (timeStamp - lastCallTime < trailingTimeout) {
|
3446 |
-
return;
|
3447 |
-
}
|
3448 |
-
// Schedule new call to be in invoked when the pending one is resolved.
|
3449 |
-
// This is important for "transitions" which never actually start
|
3450 |
-
// immediately so there is a chance that we might miss one if change
|
3451 |
-
// happens amids the pending invocation.
|
3452 |
-
trailingCall = true;
|
3453 |
-
}
|
3454 |
-
else {
|
3455 |
-
leadingCall = true;
|
3456 |
-
trailingCall = false;
|
3457 |
-
setTimeout(timeoutCallback, delay);
|
3458 |
-
}
|
3459 |
-
lastCallTime = timeStamp;
|
3460 |
-
}
|
3461 |
-
return proxy;
|
3462 |
-
}
|
3463 |
-
|
3464 |
-
// Minimum delay before invoking the update of observers.
|
3465 |
-
var REFRESH_DELAY = 20;
|
3466 |
-
// A list of substrings of CSS properties used to find transition events that
|
3467 |
-
// might affect dimensions of observed elements.
|
3468 |
-
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
3469 |
-
// Check if MutationObserver is available.
|
3470 |
-
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
3471 |
-
/**
|
3472 |
-
* Singleton controller class which handles updates of ResizeObserver instances.
|
3473 |
-
*/
|
3474 |
-
var ResizeObserverController = /** @class */ (function () {
|
3475 |
-
/**
|
3476 |
-
* Creates a new instance of ResizeObserverController.
|
3477 |
-
*
|
3478 |
-
* @private
|
3479 |
-
*/
|
3480 |
-
function ResizeObserverController() {
|
3481 |
-
/**
|
3482 |
-
* Indicates whether DOM listeners have been added.
|
3483 |
-
*
|
3484 |
-
* @private {boolean}
|
3485 |
-
*/
|
3486 |
-
this.connected_ = false;
|
3487 |
-
/**
|
3488 |
-
* Tells that controller has subscribed for Mutation Events.
|
3489 |
-
*
|
3490 |
-
* @private {boolean}
|
3491 |
-
*/
|
3492 |
-
this.mutationEventsAdded_ = false;
|
3493 |
-
/**
|
3494 |
-
* Keeps reference to the instance of MutationObserver.
|
3495 |
-
*
|
3496 |
-
* @private {MutationObserver}
|
3497 |
-
*/
|
3498 |
-
this.mutationsObserver_ = null;
|
3499 |
-
/**
|
3500 |
-
* A list of connected observers.
|
3501 |
-
*
|
3502 |
-
* @private {Array<ResizeObserverSPI>}
|
3503 |
-
*/
|
3504 |
-
this.observers_ = [];
|
3505 |
-
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
3506 |
-
this.refresh = throttle$1(this.refresh.bind(this), REFRESH_DELAY);
|
3507 |
-
}
|
3508 |
-
/**
|
3509 |
-
* Adds observer to observers list.
|
3510 |
-
*
|
3511 |
-
* @param {ResizeObserverSPI} observer - Observer to be added.
|
3512 |
-
* @returns {void}
|
3513 |
-
*/
|
3514 |
-
ResizeObserverController.prototype.addObserver = function (observer) {
|
3515 |
-
if (!~this.observers_.indexOf(observer)) {
|
3516 |
-
this.observers_.push(observer);
|
3517 |
-
}
|
3518 |
-
// Add listeners if they haven't been added yet.
|
3519 |
-
if (!this.connected_) {
|
3520 |
-
this.connect_();
|
3521 |
-
}
|
3522 |
-
};
|
3523 |
-
/**
|
3524 |
-
* Removes observer from observers list.
|
3525 |
-
*
|
3526 |
-
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
3527 |
-
* @returns {void}
|
3528 |
-
*/
|
3529 |
-
ResizeObserverController.prototype.removeObserver = function (observer) {
|
3530 |
-
var observers = this.observers_;
|
3531 |
-
var index = observers.indexOf(observer);
|
3532 |
-
// Remove observer if it's present in registry.
|
3533 |
-
if (~index) {
|
3534 |
-
observers.splice(index, 1);
|
3535 |
-
}
|
3536 |
-
// Remove listeners if controller has no connected observers.
|
3537 |
-
if (!observers.length && this.connected_) {
|
3538 |
-
this.disconnect_();
|
3539 |
-
}
|
3540 |
-
};
|
3541 |
-
/**
|
3542 |
-
* Invokes the update of observers. It will continue running updates insofar
|
3543 |
-
* it detects changes.
|
3544 |
-
*
|
3545 |
-
* @returns {void}
|
3546 |
-
*/
|
3547 |
-
ResizeObserverController.prototype.refresh = function () {
|
3548 |
-
var changesDetected = this.updateObservers_();
|
3549 |
-
// Continue running updates if changes have been detected as there might
|
3550 |
-
// be future ones caused by CSS transitions.
|
3551 |
-
if (changesDetected) {
|
3552 |
-
this.refresh();
|
3553 |
-
}
|
3554 |
-
};
|
3555 |
-
/**
|
3556 |
-
* Updates every observer from observers list and notifies them of queued
|
3557 |
-
* entries.
|
3558 |
-
*
|
3559 |
-
* @private
|
3560 |
-
* @returns {boolean} Returns "true" if any observer has detected changes in
|
3561 |
-
* dimensions of it's elements.
|
3562 |
-
*/
|
3563 |
-
ResizeObserverController.prototype.updateObservers_ = function () {
|
3564 |
-
// Collect observers that have active observations.
|
3565 |
-
var activeObservers = this.observers_.filter(function (observer) {
|
3566 |
-
return observer.gatherActive(), observer.hasActive();
|
3567 |
-
});
|
3568 |
-
// Deliver notifications in a separate cycle in order to avoid any
|
3569 |
-
// collisions between observers, e.g. when multiple instances of
|
3570 |
-
// ResizeObserver are tracking the same element and the callback of one
|
3571 |
-
// of them changes content dimensions of the observed target. Sometimes
|
3572 |
-
// this may result in notifications being blocked for the rest of observers.
|
3573 |
-
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
3574 |
-
return activeObservers.length > 0;
|
3575 |
-
};
|
3576 |
-
/**
|
3577 |
-
* Initializes DOM listeners.
|
3578 |
-
*
|
3579 |
-
* @private
|
3580 |
-
* @returns {void}
|
3581 |
-
*/
|
3582 |
-
ResizeObserverController.prototype.connect_ = function () {
|
3583 |
-
// Do nothing if running in a non-browser environment or if listeners
|
3584 |
-
// have been already added.
|
3585 |
-
if (!isBrowser || this.connected_) {
|
3586 |
-
return;
|
3587 |
-
}
|
3588 |
-
// Subscription to the "Transitionend" event is used as a workaround for
|
3589 |
-
// delayed transitions. This way it's possible to capture at least the
|
3590 |
-
// final state of an element.
|
3591 |
-
document.addEventListener('transitionend', this.onTransitionEnd_);
|
3592 |
-
window.addEventListener('resize', this.refresh);
|
3593 |
-
if (mutationObserverSupported) {
|
3594 |
-
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
3595 |
-
this.mutationsObserver_.observe(document, {
|
3596 |
-
attributes: true,
|
3597 |
-
childList: true,
|
3598 |
-
characterData: true,
|
3599 |
-
subtree: true
|
3600 |
-
});
|
3601 |
-
}
|
3602 |
-
else {
|
3603 |
-
document.addEventListener('DOMSubtreeModified', this.refresh);
|
3604 |
-
this.mutationEventsAdded_ = true;
|
3605 |
-
}
|
3606 |
-
this.connected_ = true;
|
3607 |
-
};
|
3608 |
-
/**
|
3609 |
-
* Removes DOM listeners.
|
3610 |
-
*
|
3611 |
-
* @private
|
3612 |
-
* @returns {void}
|
3613 |
-
*/
|
3614 |
-
ResizeObserverController.prototype.disconnect_ = function () {
|
3615 |
-
// Do nothing if running in a non-browser environment or if listeners
|
3616 |
-
// have been already removed.
|
3617 |
-
if (!isBrowser || !this.connected_) {
|
3618 |
-
return;
|
3619 |
-
}
|
3620 |
-
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
3621 |
-
window.removeEventListener('resize', this.refresh);
|
3622 |
-
if (this.mutationsObserver_) {
|
3623 |
-
this.mutationsObserver_.disconnect();
|
3624 |
-
}
|
3625 |
-
if (this.mutationEventsAdded_) {
|
3626 |
-
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
3627 |
-
}
|
3628 |
-
this.mutationsObserver_ = null;
|
3629 |
-
this.mutationEventsAdded_ = false;
|
3630 |
-
this.connected_ = false;
|
3631 |
-
};
|
3632 |
-
/**
|
3633 |
-
* "Transitionend" event handler.
|
3634 |
-
*
|
3635 |
-
* @private
|
3636 |
-
* @param {TransitionEvent} event
|
3637 |
-
* @returns {void}
|
3638 |
-
*/
|
3639 |
-
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
3640 |
-
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
3641 |
-
// Detect whether transition may affect dimensions of an element.
|
3642 |
-
var isReflowProperty = transitionKeys.some(function (key) {
|
3643 |
-
return !!~propertyName.indexOf(key);
|
3644 |
-
});
|
3645 |
-
if (isReflowProperty) {
|
3646 |
-
this.refresh();
|
3647 |
-
}
|
3648 |
-
};
|
3649 |
-
/**
|
3650 |
-
* Returns instance of the ResizeObserverController.
|
3651 |
-
*
|
3652 |
-
* @returns {ResizeObserverController}
|
3653 |
-
*/
|
3654 |
-
ResizeObserverController.getInstance = function () {
|
3655 |
-
if (!this.instance_) {
|
3656 |
-
this.instance_ = new ResizeObserverController();
|
3657 |
-
}
|
3658 |
-
return this.instance_;
|
3659 |
-
};
|
3660 |
-
/**
|
3661 |
-
* Holds reference to the controller's instance.
|
3662 |
-
*
|
3663 |
-
* @private {ResizeObserverController}
|
3664 |
-
*/
|
3665 |
-
ResizeObserverController.instance_ = null;
|
3666 |
-
return ResizeObserverController;
|
3667 |
-
}());
|
3668 |
-
|
3669 |
-
/**
|
3670 |
-
* Defines non-writable/enumerable properties of the provided target object.
|
3671 |
-
*
|
3672 |
-
* @param {Object} target - Object for which to define properties.
|
3673 |
-
* @param {Object} props - Properties to be defined.
|
3674 |
-
* @returns {Object} Target object.
|
3675 |
-
*/
|
3676 |
-
var defineConfigurable = (function (target, props) {
|
3677 |
-
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
3678 |
-
var key = _a[_i];
|
3679 |
-
Object.defineProperty(target, key, {
|
3680 |
-
value: props[key],
|
3681 |
-
enumerable: false,
|
3682 |
-
writable: false,
|
3683 |
-
configurable: true
|
3684 |
-
});
|
3685 |
-
}
|
3686 |
-
return target;
|
3687 |
-
});
|
3688 |
-
|
3689 |
-
/**
|
3690 |
-
* Returns the global object associated with provided element.
|
3691 |
-
*
|
3692 |
-
* @param {Object} target
|
3693 |
-
* @returns {Object}
|
3694 |
-
*/
|
3695 |
-
var getWindowOf = (function (target) {
|
3696 |
-
// Assume that the element is an instance of Node, which means that it
|
3697 |
-
// has the "ownerDocument" property from which we can retrieve a
|
3698 |
-
// corresponding global object.
|
3699 |
-
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
3700 |
-
// Return the local global object if it's not possible extract one from
|
3701 |
-
// provided element.
|
3702 |
-
return ownerGlobal || global$1;
|
3703 |
-
});
|
3704 |
-
|
3705 |
-
// Placeholder of an empty content rectangle.
|
3706 |
-
var emptyRect = createRectInit(0, 0, 0, 0);
|
3707 |
-
/**
|
3708 |
-
* Converts provided string to a number.
|
3709 |
-
*
|
3710 |
-
* @param {number|string} value
|
3711 |
-
* @returns {number}
|
3712 |
-
*/
|
3713 |
-
function toFloat(value) {
|
3714 |
-
return parseFloat(value) || 0;
|
3715 |
-
}
|
3716 |
-
/**
|
3717 |
-
* Extracts borders size from provided styles.
|
3718 |
-
*
|
3719 |
-
* @param {CSSStyleDeclaration} styles
|
3720 |
-
* @param {...string} positions - Borders positions (top, right, ...)
|
3721 |
-
* @returns {number}
|
3722 |
-
*/
|
3723 |
-
function getBordersSize(styles) {
|
3724 |
-
var positions = [];
|
3725 |
-
for (var _i = 1; _i < arguments.length; _i++) {
|
3726 |
-
positions[_i - 1] = arguments[_i];
|
3727 |
-
}
|
3728 |
-
return positions.reduce(function (size, position) {
|
3729 |
-
var value = styles['border-' + position + '-width'];
|
3730 |
-
return size + toFloat(value);
|
3731 |
-
}, 0);
|
3732 |
-
}
|
3733 |
-
/**
|
3734 |
-
* Extracts paddings sizes from provided styles.
|
3735 |
-
*
|
3736 |
-
* @param {CSSStyleDeclaration} styles
|
3737 |
-
* @returns {Object} Paddings box.
|
3738 |
-
*/
|
3739 |
-
function getPaddings(styles) {
|
3740 |
-
var positions = ['top', 'right', 'bottom', 'left'];
|
3741 |
-
var paddings = {};
|
3742 |
-
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
3743 |
-
var position = positions_1[_i];
|
3744 |
-
var value = styles['padding-' + position];
|
3745 |
-
paddings[position] = toFloat(value);
|
3746 |
-
}
|
3747 |
-
return paddings;
|
3748 |
-
}
|
3749 |
-
/**
|
3750 |
-
* Calculates content rectangle of provided SVG element.
|
3751 |
-
*
|
3752 |
-
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
3753 |
-
* to be calculated.
|
3754 |
-
* @returns {DOMRectInit}
|
3755 |
-
*/
|
3756 |
-
function getSVGContentRect(target) {
|
3757 |
-
var bbox = target.getBBox();
|
3758 |
-
return createRectInit(0, 0, bbox.width, bbox.height);
|
3759 |
-
}
|
3760 |
-
/**
|
3761 |
-
* Calculates content rectangle of provided HTMLElement.
|
3762 |
-
*
|
3763 |
-
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
3764 |
-
* @returns {DOMRectInit}
|
3765 |
-
*/
|
3766 |
-
function getHTMLElementContentRect(target) {
|
3767 |
-
// Client width & height properties can't be
|
3768 |
-
// used exclusively as they provide rounded values.
|
3769 |
-
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
3770 |
-
// By this condition we can catch all non-replaced inline, hidden and
|
3771 |
-
// detached elements. Though elements with width & height properties less
|
3772 |
-
// than 0.5 will be discarded as well.
|
3773 |
-
//
|
3774 |
-
// Without it we would need to implement separate methods for each of
|
3775 |
-
// those cases and it's not possible to perform a precise and performance
|
3776 |
-
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
3777 |
-
// gives wrong results for elements with width & height less than 0.5.
|
3778 |
-
if (!clientWidth && !clientHeight) {
|
3779 |
-
return emptyRect;
|
3780 |
-
}
|
3781 |
-
var styles = getWindowOf(target).getComputedStyle(target);
|
3782 |
-
var paddings = getPaddings(styles);
|
3783 |
-
var horizPad = paddings.left + paddings.right;
|
3784 |
-
var vertPad = paddings.top + paddings.bottom;
|
3785 |
-
// Computed styles of width & height are being used because they are the
|
3786 |
-
// only dimensions available to JS that contain non-rounded values. It could
|
3787 |
-
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
3788 |
-
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
3789 |
-
var width = toFloat(styles.width), height = toFloat(styles.height);
|
3790 |
-
// Width & height include paddings and borders when the 'border-box' box
|
3791 |
-
// model is applied (except for IE).
|
3792 |
-
if (styles.boxSizing === 'border-box') {
|
3793 |
-
// Following conditions are required to handle Internet Explorer which
|
3794 |
-
// doesn't include paddings and borders to computed CSS dimensions.
|
3795 |
-
//
|
3796 |
-
// We can say that if CSS dimensions + paddings are equal to the "client"
|
3797 |
-
// properties then it's either IE, and thus we don't need to subtract
|
3798 |
-
// anything, or an element merely doesn't have paddings/borders styles.
|
3799 |
-
if (Math.round(width + horizPad) !== clientWidth) {
|
3800 |
-
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
3801 |
-
}
|
3802 |
-
if (Math.round(height + vertPad) !== clientHeight) {
|
3803 |
-
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
3804 |
-
}
|
3805 |
-
}
|
3806 |
-
// Following steps can't be applied to the document's root element as its
|
3807 |
-
// client[Width/Height] properties represent viewport area of the window.
|
3808 |
-
// Besides, it's as well not necessary as the <html> itself neither has
|
3809 |
-
// rendered scroll bars nor it can be clipped.
|
3810 |
-
if (!isDocumentElement(target)) {
|
3811 |
-
// In some browsers (only in Firefox, actually) CSS width & height
|
3812 |
-
// include scroll bars size which can be removed at this step as scroll
|
3813 |
-
// bars are the only difference between rounded dimensions + paddings
|
3814 |
-
// and "client" properties, though that is not always true in Chrome.
|
3815 |
-
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
3816 |
-
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
3817 |
-
// Chrome has a rather weird rounding of "client" properties.
|
3818 |
-
// E.g. for an element with content width of 314.2px it sometimes gives
|
3819 |
-
// the client width of 315px and for the width of 314.7px it may give
|
3820 |
-
// 314px. And it doesn't happen all the time. So just ignore this delta
|
3821 |
-
// as a non-relevant.
|
3822 |
-
if (Math.abs(vertScrollbar) !== 1) {
|
3823 |
-
width -= vertScrollbar;
|
3824 |
-
}
|
3825 |
-
if (Math.abs(horizScrollbar) !== 1) {
|
3826 |
-
height -= horizScrollbar;
|
3827 |
-
}
|
3828 |
-
}
|
3829 |
-
return createRectInit(paddings.left, paddings.top, width, height);
|
3830 |
-
}
|
3831 |
-
/**
|
3832 |
-
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
3833 |
-
*
|
3834 |
-
* @param {Element} target - Element to be checked.
|
3835 |
-
* @returns {boolean}
|
3836 |
-
*/
|
3837 |
-
var isSVGGraphicsElement = (function () {
|
3838 |
-
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
3839 |
-
// interface.
|
3840 |
-
if (typeof SVGGraphicsElement !== 'undefined') {
|
3841 |
-
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
3842 |
-
}
|
3843 |
-
// If it's so, then check that element is at least an instance of the
|
3844 |
-
// SVGElement and that it has the "getBBox" method.
|
3845 |
-
// eslint-disable-next-line no-extra-parens
|
3846 |
-
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
3847 |
-
typeof target.getBBox === 'function'); };
|
3848 |
-
})();
|
3849 |
-
/**
|
3850 |
-
* Checks whether provided element is a document element (<html>).
|
3851 |
-
*
|
3852 |
-
* @param {Element} target - Element to be checked.
|
3853 |
-
* @returns {boolean}
|
3854 |
-
*/
|
3855 |
-
function isDocumentElement(target) {
|
3856 |
-
return target === getWindowOf(target).document.documentElement;
|
3857 |
-
}
|
3858 |
-
/**
|
3859 |
-
* Calculates an appropriate content rectangle for provided html or svg element.
|
3860 |
-
*
|
3861 |
-
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
3862 |
-
* @returns {DOMRectInit}
|
3863 |
-
*/
|
3864 |
-
function getContentRect(target) {
|
3865 |
-
if (!isBrowser) {
|
3866 |
-
return emptyRect;
|
3867 |
-
}
|
3868 |
-
if (isSVGGraphicsElement(target)) {
|
3869 |
-
return getSVGContentRect(target);
|
3870 |
-
}
|
3871 |
-
return getHTMLElementContentRect(target);
|
3872 |
-
}
|
3873 |
-
/**
|
3874 |
-
* Creates rectangle with an interface of the DOMRectReadOnly.
|
3875 |
-
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
3876 |
-
*
|
3877 |
-
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
3878 |
-
* @returns {DOMRectReadOnly}
|
3879 |
-
*/
|
3880 |
-
function createReadOnlyRect(_a) {
|
3881 |
-
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
3882 |
-
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
3883 |
-
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
3884 |
-
var rect = Object.create(Constr.prototype);
|
3885 |
-
// Rectangle's properties are not writable and non-enumerable.
|
3886 |
-
defineConfigurable(rect, {
|
3887 |
-
x: x, y: y, width: width, height: height,
|
3888 |
-
top: y,
|
3889 |
-
right: x + width,
|
3890 |
-
bottom: height + y,
|
3891 |
-
left: x
|
3892 |
-
});
|
3893 |
-
return rect;
|
3894 |
-
}
|
3895 |
-
/**
|
3896 |
-
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
3897 |
-
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
3898 |
-
*
|
3899 |
-
* @param {number} x - X coordinate.
|
3900 |
-
* @param {number} y - Y coordinate.
|
3901 |
-
* @param {number} width - Rectangle's width.
|
3902 |
-
* @param {number} height - Rectangle's height.
|
3903 |
-
* @returns {DOMRectInit}
|
3904 |
-
*/
|
3905 |
-
function createRectInit(x, y, width, height) {
|
3906 |
-
return { x: x, y: y, width: width, height: height };
|
3907 |
-
}
|
3908 |
-
|
3909 |
-
/**
|
3910 |
-
* Class that is responsible for computations of the content rectangle of
|
3911 |
-
* provided DOM element and for keeping track of it's changes.
|
3912 |
-
*/
|
3913 |
-
var ResizeObservation = /** @class */ (function () {
|
3914 |
-
/**
|
3915 |
-
* Creates an instance of ResizeObservation.
|
3916 |
-
*
|
3917 |
-
* @param {Element} target - Element to be observed.
|
3918 |
-
*/
|
3919 |
-
function ResizeObservation(target) {
|
3920 |
-
/**
|
3921 |
-
* Broadcasted width of content rectangle.
|
3922 |
-
*
|
3923 |
-
* @type {number}
|
3924 |
-
*/
|
3925 |
-
this.broadcastWidth = 0;
|
3926 |
-
/**
|
3927 |
-
* Broadcasted height of content rectangle.
|
3928 |
-
*
|
3929 |
-
* @type {number}
|
3930 |
-
*/
|
3931 |
-
this.broadcastHeight = 0;
|
3932 |
-
/**
|
3933 |
-
* Reference to the last observed content rectangle.
|
3934 |
-
*
|
3935 |
-
* @private {DOMRectInit}
|
3936 |
-
*/
|
3937 |
-
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
3938 |
-
this.target = target;
|
3939 |
-
}
|
3940 |
-
/**
|
3941 |
-
* Updates content rectangle and tells whether it's width or height properties
|
3942 |
-
* have changed since the last broadcast.
|
3943 |
-
*
|
3944 |
-
* @returns {boolean}
|
3945 |
-
*/
|
3946 |
-
ResizeObservation.prototype.isActive = function () {
|
3947 |
-
var rect = getContentRect(this.target);
|
3948 |
-
this.contentRect_ = rect;
|
3949 |
-
return (rect.width !== this.broadcastWidth ||
|
3950 |
-
rect.height !== this.broadcastHeight);
|
3951 |
-
};
|
3952 |
-
/**
|
3953 |
-
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
3954 |
-
* from the corresponding properties of the last observed content rectangle.
|
3955 |
-
*
|
3956 |
-
* @returns {DOMRectInit} Last observed content rectangle.
|
3957 |
-
*/
|
3958 |
-
ResizeObservation.prototype.broadcastRect = function () {
|
3959 |
-
var rect = this.contentRect_;
|
3960 |
-
this.broadcastWidth = rect.width;
|
3961 |
-
this.broadcastHeight = rect.height;
|
3962 |
-
return rect;
|
3963 |
-
};
|
3964 |
-
return ResizeObservation;
|
3965 |
-
}());
|
3966 |
-
|
3967 |
-
var ResizeObserverEntry = /** @class */ (function () {
|
3968 |
-
/**
|
3969 |
-
* Creates an instance of ResizeObserverEntry.
|
3970 |
-
*
|
3971 |
-
* @param {Element} target - Element that is being observed.
|
3972 |
-
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
3973 |
-
*/
|
3974 |
-
function ResizeObserverEntry(target, rectInit) {
|
3975 |
-
var contentRect = createReadOnlyRect(rectInit);
|
3976 |
-
// According to the specification following properties are not writable
|
3977 |
-
// and are also not enumerable in the native implementation.
|
3978 |
-
//
|
3979 |
-
// Property accessors are not being used as they'd require to define a
|
3980 |
-
// private WeakMap storage which may cause memory leaks in browsers that
|
3981 |
-
// don't support this type of collections.
|
3982 |
-
defineConfigurable(this, { target: target, contentRect: contentRect });
|
3983 |
-
}
|
3984 |
-
return ResizeObserverEntry;
|
3985 |
-
}());
|
3986 |
-
|
3987 |
-
var ResizeObserverSPI = /** @class */ (function () {
|
3988 |
-
/**
|
3989 |
-
* Creates a new instance of ResizeObserver.
|
3990 |
-
*
|
3991 |
-
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
3992 |
-
* when one of the observed elements changes it's content dimensions.
|
3993 |
-
* @param {ResizeObserverController} controller - Controller instance which
|
3994 |
-
* is responsible for the updates of observer.
|
3995 |
-
* @param {ResizeObserver} callbackCtx - Reference to the public
|
3996 |
-
* ResizeObserver instance which will be passed to callback function.
|
3997 |
-
*/
|
3998 |
-
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
3999 |
-
/**
|
4000 |
-
* Collection of resize observations that have detected changes in dimensions
|
4001 |
-
* of elements.
|
4002 |
-
*
|
4003 |
-
* @private {Array<ResizeObservation>}
|
4004 |
-
*/
|
4005 |
-
this.activeObservations_ = [];
|
4006 |
-
/**
|
4007 |
-
* Registry of the ResizeObservation instances.
|
4008 |
-
*
|
4009 |
-
* @private {Map<Element, ResizeObservation>}
|
4010 |
-
*/
|
4011 |
-
this.observations_ = new MapShim();
|
4012 |
-
if (typeof callback !== 'function') {
|
4013 |
-
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
4014 |
-
}
|
4015 |
-
this.callback_ = callback;
|
4016 |
-
this.controller_ = controller;
|
4017 |
-
this.callbackCtx_ = callbackCtx;
|
4018 |
-
}
|
4019 |
-
/**
|
4020 |
-
* Starts observing provided element.
|
4021 |
-
*
|
4022 |
-
* @param {Element} target - Element to be observed.
|
4023 |
-
* @returns {void}
|
4024 |
-
*/
|
4025 |
-
ResizeObserverSPI.prototype.observe = function (target) {
|
4026 |
-
if (!arguments.length) {
|
4027 |
-
throw new TypeError('1 argument required, but only 0 present.');
|
4028 |
-
}
|
4029 |
-
// Do nothing if current environment doesn't have the Element interface.
|
4030 |
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
4031 |
-
return;
|
4032 |
-
}
|
4033 |
-
if (!(target instanceof getWindowOf(target).Element)) {
|
4034 |
-
throw new TypeError('parameter 1 is not of type "Element".');
|
4035 |
-
}
|
4036 |
-
var observations = this.observations_;
|
4037 |
-
// Do nothing if element is already being observed.
|
4038 |
-
if (observations.has(target)) {
|
4039 |
-
return;
|
4040 |
-
}
|
4041 |
-
observations.set(target, new ResizeObservation(target));
|
4042 |
-
this.controller_.addObserver(this);
|
4043 |
-
// Force the update of observations.
|
4044 |
-
this.controller_.refresh();
|
4045 |
-
};
|
4046 |
-
/**
|
4047 |
-
* Stops observing provided element.
|
4048 |
-
*
|
4049 |
-
* @param {Element} target - Element to stop observing.
|
4050 |
-
* @returns {void}
|
4051 |
-
*/
|
4052 |
-
ResizeObserverSPI.prototype.unobserve = function (target) {
|
4053 |
-
if (!arguments.length) {
|
4054 |
-
throw new TypeError('1 argument required, but only 0 present.');
|
4055 |
-
}
|
4056 |
-
// Do nothing if current environment doesn't have the Element interface.
|
4057 |
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
4058 |
-
return;
|
4059 |
-
}
|
4060 |
-
if (!(target instanceof getWindowOf(target).Element)) {
|
4061 |
-
throw new TypeError('parameter 1 is not of type "Element".');
|
4062 |
-
}
|
4063 |
-
var observations = this.observations_;
|
4064 |
-
// Do nothing if element is not being observed.
|
4065 |
-
if (!observations.has(target)) {
|
4066 |
-
return;
|
4067 |
-
}
|
4068 |
-
observations.delete(target);
|
4069 |
-
if (!observations.size) {
|
4070 |
-
this.controller_.removeObserver(this);
|
4071 |
-
}
|
4072 |
-
};
|
4073 |
-
/**
|
4074 |
-
* Stops observing all elements.
|
4075 |
-
*
|
4076 |
-
* @returns {void}
|
4077 |
-
*/
|
4078 |
-
ResizeObserverSPI.prototype.disconnect = function () {
|
4079 |
-
this.clearActive();
|
4080 |
-
this.observations_.clear();
|
4081 |
-
this.controller_.removeObserver(this);
|
4082 |
-
};
|
4083 |
-
/**
|
4084 |
-
* Collects observation instances the associated element of which has changed
|
4085 |
-
* it's content rectangle.
|
4086 |
-
*
|
4087 |
-
* @returns {void}
|
4088 |
-
*/
|
4089 |
-
ResizeObserverSPI.prototype.gatherActive = function () {
|
4090 |
-
var _this = this;
|
4091 |
-
this.clearActive();
|
4092 |
-
this.observations_.forEach(function (observation) {
|
4093 |
-
if (observation.isActive()) {
|
4094 |
-
_this.activeObservations_.push(observation);
|
4095 |
-
}
|
4096 |
-
});
|
4097 |
-
};
|
4098 |
-
/**
|
4099 |
-
* Invokes initial callback function with a list of ResizeObserverEntry
|
4100 |
-
* instances collected from active resize observations.
|
4101 |
-
*
|
4102 |
-
* @returns {void}
|
4103 |
-
*/
|
4104 |
-
ResizeObserverSPI.prototype.broadcastActive = function () {
|
4105 |
-
// Do nothing if observer doesn't have active observations.
|
4106 |
-
if (!this.hasActive()) {
|
4107 |
-
return;
|
4108 |
-
}
|
4109 |
-
var ctx = this.callbackCtx_;
|
4110 |
-
// Create ResizeObserverEntry instance for every active observation.
|
4111 |
-
var entries = this.activeObservations_.map(function (observation) {
|
4112 |
-
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
4113 |
-
});
|
4114 |
-
this.callback_.call(ctx, entries, ctx);
|
4115 |
-
this.clearActive();
|
4116 |
-
};
|
4117 |
-
/**
|
4118 |
-
* Clears the collection of active observations.
|
4119 |
-
*
|
4120 |
-
* @returns {void}
|
4121 |
-
*/
|
4122 |
-
ResizeObserverSPI.prototype.clearActive = function () {
|
4123 |
-
this.activeObservations_.splice(0);
|
4124 |
-
};
|
4125 |
-
/**
|
4126 |
-
* Tells whether observer has active observations.
|
4127 |
-
*
|
4128 |
-
* @returns {boolean}
|
4129 |
-
*/
|
4130 |
-
ResizeObserverSPI.prototype.hasActive = function () {
|
4131 |
-
return this.activeObservations_.length > 0;
|
4132 |
-
};
|
4133 |
-
return ResizeObserverSPI;
|
4134 |
-
}());
|
4135 |
-
|
4136 |
-
// Registry of internal observers. If WeakMap is not available use current shim
|
4137 |
-
// for the Map collection as it has all required methods and because WeakMap
|
4138 |
-
// can't be fully polyfilled anyway.
|
4139 |
-
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
4140 |
-
/**
|
4141 |
-
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
4142 |
-
* exposing only those methods and properties that are defined in the spec.
|
4143 |
-
*/
|
4144 |
-
var ResizeObserver = /** @class */ (function () {
|
4145 |
-
/**
|
4146 |
-
* Creates a new instance of ResizeObserver.
|
4147 |
-
*
|
4148 |
-
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
4149 |
-
* dimensions of the observed elements change.
|
4150 |
-
*/
|
4151 |
-
function ResizeObserver(callback) {
|
4152 |
-
if (!(this instanceof ResizeObserver)) {
|
4153 |
-
throw new TypeError('Cannot call a class as a function.');
|
4154 |
-
}
|
4155 |
-
if (!arguments.length) {
|
4156 |
-
throw new TypeError('1 argument required, but only 0 present.');
|
4157 |
-
}
|
4158 |
-
var controller = ResizeObserverController.getInstance();
|
4159 |
-
var observer = new ResizeObserverSPI(callback, controller, this);
|
4160 |
-
observers.set(this, observer);
|
4161 |
-
}
|
4162 |
-
return ResizeObserver;
|
4163 |
-
}());
|
4164 |
-
// Expose public methods of ResizeObserver.
|
4165 |
-
[
|
4166 |
-
'observe',
|
4167 |
-
'unobserve',
|
4168 |
-
'disconnect'
|
4169 |
-
].forEach(function (method) {
|
4170 |
-
ResizeObserver.prototype[method] = function () {
|
4171 |
-
var _a;
|
4172 |
-
return (_a = observers.get(this))[method].apply(_a, arguments);
|
4173 |
-
};
|
4174 |
-
});
|
4175 |
-
|
4176 |
-
var index = (function () {
|
4177 |
-
// Export existing implementation if available.
|
4178 |
-
if (typeof global$1.ResizeObserver !== 'undefined') {
|
4179 |
-
return global$1.ResizeObserver;
|
4180 |
-
}
|
4181 |
-
return ResizeObserver;
|
4182 |
-
})();
|
4183 |
-
|
4184 |
-
var cachedScrollbarWidth = null;
|
4185 |
-
var cachedDevicePixelRatio = null;
|
4186 |
-
|
4187 |
-
if (canUseDom) {
|
4188 |
-
window.addEventListener('resize', function () {
|
4189 |
-
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
|
4190 |
-
cachedDevicePixelRatio = window.devicePixelRatio;
|
4191 |
-
cachedScrollbarWidth = null;
|
4192 |
-
}
|
4193 |
-
});
|
4194 |
-
}
|
4195 |
-
|
4196 |
-
function scrollbarWidth() {
|
4197 |
-
if (cachedScrollbarWidth === null) {
|
4198 |
-
if (typeof document === 'undefined') {
|
4199 |
-
cachedScrollbarWidth = 0;
|
4200 |
-
return cachedScrollbarWidth;
|
4201 |
-
}
|
4202 |
-
|
4203 |
-
var body = document.body;
|
4204 |
-
var box = document.createElement('div');
|
4205 |
-
box.classList.add('asl_simplebar-hide-scrollbar');
|
4206 |
-
body.appendChild(box);
|
4207 |
-
var width = box.getBoundingClientRect().right;
|
4208 |
-
body.removeChild(box);
|
4209 |
-
cachedScrollbarWidth = width;
|
4210 |
-
}
|
4211 |
-
|
4212 |
-
return cachedScrollbarWidth;
|
4213 |
-
}
|
4214 |
-
|
4215 |
-
var asl_SimpleBar =
|
4216 |
-
/*#__PURE__*/
|
4217 |
-
function () {
|
4218 |
-
function asl_SimpleBar(element, options) {
|
4219 |
-
var _this = this;
|
4220 |
-
|
4221 |
-
this.onScroll = function () {
|
4222 |
-
if (!_this.scrollXTicking) {
|
4223 |
-
window.requestAnimationFrame(_this.scrollX);
|
4224 |
-
_this.scrollXTicking = true;
|
4225 |
-
}
|
4226 |
-
|
4227 |
-
if (!_this.scrollYTicking) {
|
4228 |
-
window.requestAnimationFrame(_this.scrollY);
|
4229 |
-
_this.scrollYTicking = true;
|
4230 |
-
}
|
4231 |
-
};
|
4232 |
-
|
4233 |
-
this.scrollX = function () {
|
4234 |
-
if (_this.axis.x.isOverflowing) {
|
4235 |
-
_this.showScrollbar('x');
|
4236 |
-
|
4237 |
-
_this.positionScrollbar('x');
|
4238 |
-
}
|
4239 |
-
|
4240 |
-
_this.scrollXTicking = false;
|
4241 |
-
};
|
4242 |
-
|
4243 |
-
this.scrollY = function () {
|
4244 |
-
if (_this.axis.y.isOverflowing) {
|
4245 |
-
_this.showScrollbar('y');
|
4246 |
-
|
4247 |
-
_this.positionScrollbar('y');
|
4248 |
-
}
|
4249 |
-
|
4250 |
-
_this.scrollYTicking = false;
|
4251 |
-
};
|
4252 |
-
|
4253 |
-
this.onMouseEnter = function () {
|
4254 |
-
_this.showScrollbar('x');
|
4255 |
-
|
4256 |
-
_this.showScrollbar('y');
|
4257 |
-
};
|
4258 |
-
|
4259 |
-
this.onMouseMove = function (e) {
|
4260 |
-
_this.mouseX = e.clientX;
|
4261 |
-
_this.mouseY = e.clientY;
|
4262 |
-
|
4263 |
-
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
4264 |
-
_this.onMouseMoveForAxis('x');
|
4265 |
-
}
|
4266 |
-
|
4267 |
-
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
4268 |
-
_this.onMouseMoveForAxis('y');
|
4269 |
-
}
|
4270 |
-
};
|
4271 |
-
|
4272 |
-
this.onMouseLeave = function () {
|
4273 |
-
_this.onMouseMove.cancel();
|
4274 |
-
|
4275 |
-
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
4276 |
-
_this.onMouseLeaveForAxis('x');
|
4277 |
-
}
|
4278 |
-
|
4279 |
-
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
4280 |
-
_this.onMouseLeaveForAxis('y');
|
4281 |
-
}
|
4282 |
-
|
4283 |
-
_this.mouseX = -1;
|
4284 |
-
_this.mouseY = -1;
|
4285 |
-
};
|
4286 |
-
|
4287 |
-
this.onWindowResize = function () {
|
4288 |
-
// Recalculate scrollbarWidth in case it's a zoom
|
4289 |
-
_this.scrollbarWidth = _this.getScrollbarWidth();
|
4290 |
-
|
4291 |
-
_this.hideNativeScrollbar();
|
4292 |
-
};
|
4293 |
-
|
4294 |
-
this.hideScrollbars = function () {
|
4295 |
-
_this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
|
4296 |
-
_this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
|
4297 |
-
|
4298 |
-
if (!_this.isWithinBounds(_this.axis.y.track.rect)) {
|
4299 |
-
_this.axis.y.scrollbar.el.classList.remove(_this.classNames.visible);
|
4300 |
-
|
4301 |
-
_this.axis.y.isVisible = false;
|
4302 |
-
}
|
4303 |
-
|
4304 |
-
if (!_this.isWithinBounds(_this.axis.x.track.rect)) {
|
4305 |
-
_this.axis.x.scrollbar.el.classList.remove(_this.classNames.visible);
|
4306 |
-
|
4307 |
-
_this.axis.x.isVisible = false;
|
4308 |
-
}
|
4309 |
-
};
|
4310 |
-
|
4311 |
-
this.onPointerEvent = function (e) {
|
4312 |
-
var isWithinTrackXBounds, isWithinTrackYBounds;
|
4313 |
-
_this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
|
4314 |
-
_this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
|
4315 |
-
|
4316 |
-
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
4317 |
-
isWithinTrackXBounds = _this.isWithinBounds(_this.axis.x.track.rect);
|
4318 |
-
}
|
4319 |
-
|
4320 |
-
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
4321 |
-
isWithinTrackYBounds = _this.isWithinBounds(_this.axis.y.track.rect);
|
4322 |
-
} // If any pointer event is called on the scrollbar
|
4323 |
-
|
4324 |
-
|
4325 |
-
if (isWithinTrackXBounds || isWithinTrackYBounds) {
|
4326 |
-
// Preventing the event's default action stops text being
|
4327 |
-
// selectable during the drag.
|
4328 |
-
e.preventDefault(); // Prevent event leaking
|
4329 |
-
|
4330 |
-
e.stopPropagation();
|
4331 |
-
|
4332 |
-
if (e.type === 'mousedown') {
|
4333 |
-
if (isWithinTrackXBounds) {
|
4334 |
-
_this.axis.x.scrollbar.rect = _this.axis.x.scrollbar.el.getBoundingClientRect();
|
4335 |
-
|
4336 |
-
if (_this.isWithinBounds(_this.axis.x.scrollbar.rect)) {
|
4337 |
-
_this.onDragStart(e, 'x');
|
4338 |
-
} else {
|
4339 |
-
_this.onTrackClick(e, 'x');
|
4340 |
-
}
|
4341 |
-
}
|
4342 |
-
|
4343 |
-
if (isWithinTrackYBounds) {
|
4344 |
-
_this.axis.y.scrollbar.rect = _this.axis.y.scrollbar.el.getBoundingClientRect();
|
4345 |
-
|
4346 |
-
if (_this.isWithinBounds(_this.axis.y.scrollbar.rect)) {
|
4347 |
-
_this.onDragStart(e, 'y');
|
4348 |
-
} else {
|
4349 |
-
_this.onTrackClick(e, 'y');
|
4350 |
-
}
|
4351 |
-
}
|
4352 |
-
}
|
4353 |
-
}
|
4354 |
-
};
|
4355 |
-
|
4356 |
-
this.drag = function (e) {
|
4357 |
-
var eventOffset;
|
4358 |
-
var track = _this.axis[_this.draggedAxis].track;
|
4359 |
-
var trackSize = track.rect[_this.axis[_this.draggedAxis].sizeAttr];
|
4360 |
-
var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
|
4361 |
-
var contentSize = _this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollSizeAttr];
|
4362 |
-
var hostSize = parseInt(_this.elStyles[_this.axis[_this.draggedAxis].sizeAttr], 10);
|
4363 |
-
e.preventDefault();
|
4364 |
-
e.stopPropagation();
|
4365 |
-
|
4366 |
-
if (_this.draggedAxis === 'y') {
|
4367 |
-
eventOffset = e.pageY;
|
4368 |
-
} else {
|
4369 |
-
eventOffset = e.pageX;
|
4370 |
-
} // Calculate how far the user's mouse is from the top/left of the scrollbar (minus the dragOffset).
|
4371 |
-
|
4372 |
-
|
4373 |
-
var dragPos = eventOffset - track.rect[_this.axis[_this.draggedAxis].offsetAttr] - _this.axis[_this.draggedAxis].dragOffset; // Convert the mouse position into a percentage of the scrollbar height/width.
|
4374 |
-
|
4375 |
-
var dragPerc = dragPos / (trackSize - scrollbar.size); // Scroll the content by the same percentage.
|
4376 |
-
|
4377 |
-
var scrollPos = dragPerc * (contentSize - hostSize); // Fix browsers inconsistency on RTL
|
4378 |
-
|
4379 |
-
if (_this.draggedAxis === 'x') {
|
4380 |
-
scrollPos = _this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? scrollPos - (trackSize + scrollbar.size) : scrollPos;
|
4381 |
-
scrollPos = _this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollPos : scrollPos;
|
4382 |
-
}
|
4383 |
-
|
4384 |
-
_this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollOffsetAttr] = scrollPos;
|
4385 |
-
};
|
4386 |
-
|
4387 |
-
this.onEndDrag = function (e) {
|
4388 |
-
e.preventDefault();
|
4389 |
-
e.stopPropagation();
|
4390 |
-
|
4391 |
-
_this.el.classList.remove(_this.classNames.dragging);
|
4392 |
-
|
4393 |
-
document.removeEventListener('mousemove', _this.drag, true);
|
4394 |
-
document.removeEventListener('mouseup', _this.onEndDrag, true);
|
4395 |
-
_this.removePreventClickId = window.setTimeout(function () {
|
4396 |
-
// Remove these asynchronously so we still suppress click events
|
4397 |
-
// generated simultaneously with mouseup.
|
4398 |
-
document.removeEventListener('click', _this.preventClick, true);
|
4399 |
-
document.removeEventListener('dblclick', _this.preventClick, true);
|
4400 |
-
_this.removePreventClickId = null;
|
4401 |
-
});
|
4402 |
-
};
|
4403 |
-
|
4404 |
-
this.preventClick = function (e) {
|
4405 |
-
e.preventDefault();
|
4406 |
-
e.stopPropagation();
|
4407 |
-
};
|
4408 |
-
|
4409 |
-
this.el = element;
|
4410 |
-
this.minScrollbarWidth = 20;
|
4411 |
-
this.options = Object.assign({}, asl_SimpleBar.defaultOptions, {}, options);
|
4412 |
-
this.classNames = Object.assign({}, asl_SimpleBar.defaultOptions.classNames, {}, this.options.classNames);
|
4413 |
-
this.axis = {
|
4414 |
-
x: {
|
4415 |
-
scrollOffsetAttr: 'scrollLeft',
|
4416 |
-
sizeAttr: 'width',
|
4417 |
-
scrollSizeAttr: 'scrollWidth',
|
4418 |
-
offsetSizeAttr: 'offsetWidth',
|
4419 |
-
offsetAttr: 'left',
|
4420 |
-
overflowAttr: 'overflowX',
|
4421 |
-
dragOffset: 0,
|
4422 |
-
isOverflowing: true,
|
4423 |
-
isVisible: false,
|
4424 |
-
forceVisible: false,
|
4425 |
-
track: {},
|
4426 |
-
scrollbar: {}
|
4427 |
-
},
|
4428 |
-
y: {
|
4429 |
-
scrollOffsetAttr: 'scrollTop',
|
4430 |
-
sizeAttr: 'height',
|
4431 |
-
scrollSizeAttr: 'scrollHeight',
|
4432 |
-
offsetSizeAttr: 'offsetHeight',
|
4433 |
-
offsetAttr: 'top',
|
4434 |
-
overflowAttr: 'overflowY',
|
4435 |
-
dragOffset: 0,
|
4436 |
-
isOverflowing: true,
|
4437 |
-
isVisible: false,
|
4438 |
-
forceVisible: false,
|
4439 |
-
track: {},
|
4440 |
-
scrollbar: {}
|
4441 |
-
}
|
4442 |
-
};
|
4443 |
-
this.removePreventClickId = null; // Don't re-instantiate over an existing one
|
4444 |
-
|
4445 |
-
if (asl_SimpleBar.instances.has(this.el)) {
|
4446 |
-
return;
|
4447 |
-
}
|
4448 |
-
|
4449 |
-
this.recalculate = lodash_throttle(this.recalculate.bind(this), 64);
|
4450 |
-
this.onMouseMove = lodash_throttle(this.onMouseMove.bind(this), 64);
|
4451 |
-
this.hideScrollbars = lodash_debounce(this.hideScrollbars.bind(this), this.options.timeout);
|
4452 |
-
this.onWindowResize = lodash_debounce(this.onWindowResize.bind(this), 64, {
|
4453 |
-
leading: true
|
4454 |
-
});
|
4455 |
-
asl_SimpleBar.getRtlHelpers = lodash_memoize(asl_SimpleBar.getRtlHelpers);
|
4456 |
-
this.init();
|
4457 |
-
}
|
4458 |
-
/**
|
4459 |
-
* Static properties
|
4460 |
-
*/
|
4461 |
-
|
4462 |
-
/**
|
4463 |
-
* Helper to fix browsers inconsistency on RTL:
|
4464 |
-
* - Firefox inverts the scrollbar initial position
|
4465 |
-
* - IE11 inverts both scrollbar position and scrolling offset
|
4466 |
-
* Directly inspired by @KingSora's OverlayScrollbars https://github.com/KingSora/OverlayScrollbars/blob/master/js/OverlayScrollbars.js#L1634
|
4467 |
-
*/
|
4468 |
-
|
4469 |
-
|
4470 |
-
asl_SimpleBar.getRtlHelpers = function getRtlHelpers() {
|
4471 |
-
var dummyDiv = document.createElement('div');
|
4472 |
-
dummyDiv.innerHTML = '<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';
|
4473 |
-
var scrollbarDummyEl = dummyDiv.firstElementChild;
|
4474 |
-
document.body.appendChild(scrollbarDummyEl);
|
4475 |
-
var dummyContainerChild = scrollbarDummyEl.firstElementChild;
|
4476 |
-
scrollbarDummyEl.scrollLeft = 0;
|
4477 |
-
var dummyContainerOffset = asl_SimpleBar.getOffset(scrollbarDummyEl);
|
4478 |
-
var dummyContainerChildOffset = asl_SimpleBar.getOffset(dummyContainerChild);
|
4479 |
-
scrollbarDummyEl.scrollLeft = 999;
|
4480 |
-
var dummyContainerScrollOffsetAfterScroll = asl_SimpleBar.getOffset(dummyContainerChild);
|
4481 |
-
return {
|
4482 |
-
// determines if the scrolling is responding with negative values
|
4483 |
-
isRtlScrollingInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left && dummyContainerChildOffset.left - dummyContainerScrollOffsetAfterScroll.left !== 0,
|
4484 |
-
// determines if the origin scrollbar position is inverted or not (positioned on left or right)
|
4485 |
-
isRtlScrollbarInverted: dummyContainerOffset.left !== dummyContainerChildOffset.left
|
4486 |
-
};
|
4487 |
-
};
|
4488 |
-
|
4489 |
-
asl_SimpleBar.getOffset = function getOffset(el) {
|
4490 |
-
var rect = el.getBoundingClientRect();
|
4491 |
-
return {
|
4492 |
-
top: rect.top + (window.pageYOffset || document.documentElement.scrollTop),
|
4493 |
-
left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft)
|
4494 |
-
};
|
4495 |
-
};
|
4496 |
-
|
4497 |
-
var _proto = asl_SimpleBar.prototype;
|
4498 |
-
|
4499 |
-
_proto.init = function init() {
|
4500 |
-
// Save a reference to the instance, so we know this DOM node has already been instancied
|
4501 |
-
asl_SimpleBar.instances.set(this.el, this); // We stop here on server-side
|
4502 |
-
|
4503 |
-
if (canUseDom) {
|
4504 |
-
this.initDOM();
|
4505 |
-
this.scrollbarWidth = this.getScrollbarWidth();
|
4506 |
-
this.recalculate();
|
4507 |
-
this.initListeners();
|
4508 |
-
}
|
4509 |
-
};
|
4510 |
-
|
4511 |
-
_proto.initDOM = function initDOM() {
|
4512 |
-
var _this2 = this;
|
4513 |
-
|
4514 |
-
// make sure this element doesn't have the elements yet
|
4515 |
-
if (Array.prototype.filter.call(this.el.children, function (child) {
|
4516 |
-
return child.classList.contains(_this2.classNames.wrapper);
|
4517 |
-
}).length) {
|
4518 |
-
// assume that element has his DOM already initiated
|
4519 |
-
this.wrapperEl = this.el.querySelector("." + this.classNames.wrapper);
|
4520 |
-
this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector("." + this.classNames.contentWrapper);
|
4521 |
-
this.contentEl = this.options.contentNode || this.el.querySelector("." + this.classNames.contentEl);
|
4522 |
-
this.offsetEl = this.el.querySelector("." + this.classNames.offset);
|
4523 |
-
this.maskEl = this.el.querySelector("." + this.classNames.mask);
|
4524 |
-
this.placeholderEl = this.findChild(this.wrapperEl, "." + this.classNames.placeholder);
|
4525 |
-
this.heightAutoObserverWrapperEl = this.el.querySelector("." + this.classNames.heightAutoObserverWrapperEl);
|
4526 |
-
this.heightAutoObserverEl = this.el.querySelector("." + this.classNames.heightAutoObserverEl);
|
4527 |
-
this.axis.x.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.horizontal);
|
4528 |
-
this.axis.y.track.el = this.findChild(this.el, "." + this.classNames.track + "." + this.classNames.vertical);
|
4529 |
-
} else {
|
4530 |
-
// Prepare DOM
|
4531 |
-
this.wrapperEl = document.createElement('div');
|
4532 |
-
this.contentWrapperEl = document.createElement('div');
|
4533 |
-
this.offsetEl = document.createElement('div');
|
4534 |
-
this.maskEl = document.createElement('div');
|
4535 |
-
this.contentEl = document.createElement('div');
|
4536 |
-
this.placeholderEl = document.createElement('div');
|
4537 |
-
this.heightAutoObserverWrapperEl = document.createElement('div');
|
4538 |
-
this.heightAutoObserverEl = document.createElement('div');
|
4539 |
-
this.wrapperEl.classList.add(this.classNames.wrapper);
|
4540 |
-
this.contentWrapperEl.classList.add(this.classNames.contentWrapper);
|
4541 |
-
this.offsetEl.classList.add(this.classNames.offset);
|
4542 |
-
this.maskEl.classList.add(this.classNames.mask);
|
4543 |
-
this.contentEl.classList.add(this.classNames.contentEl);
|
4544 |
-
this.placeholderEl.classList.add(this.classNames.placeholder);
|
4545 |
-
this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl);
|
4546 |
-
this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);
|
4547 |
-
|
4548 |
-
while (this.el.firstChild) {
|
4549 |
-
this.contentEl.appendChild(this.el.firstChild);
|
4550 |
-
}
|
4551 |
-
|
4552 |
-
this.contentWrapperEl.appendChild(this.contentEl);
|
4553 |
-
this.offsetEl.appendChild(this.contentWrapperEl);
|
4554 |
-
this.maskEl.appendChild(this.offsetEl);
|
4555 |
-
this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);
|
4556 |
-
this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);
|
4557 |
-
this.wrapperEl.appendChild(this.maskEl);
|
4558 |
-
this.wrapperEl.appendChild(this.placeholderEl);
|
4559 |
-
this.el.appendChild(this.wrapperEl);
|
4560 |
-
}
|
4561 |
-
|
4562 |
-
if (!this.axis.x.track.el || !this.axis.y.track.el) {
|
4563 |
-
var track = document.createElement('div');
|
4564 |
-
var scrollbar = document.createElement('div');
|
4565 |
-
track.classList.add(this.classNames.track);
|
4566 |
-
scrollbar.classList.add(this.classNames.scrollbar);
|
4567 |
-
track.appendChild(scrollbar);
|
4568 |
-
this.axis.x.track.el = track.cloneNode(true);
|
4569 |
-
this.axis.x.track.el.classList.add(this.classNames.horizontal);
|
4570 |
-
this.axis.y.track.el = track.cloneNode(true);
|
4571 |
-
this.axis.y.track.el.classList.add(this.classNames.vertical);
|
4572 |
-
this.el.appendChild(this.axis.x.track.el);
|
4573 |
-
this.el.appendChild(this.axis.y.track.el);
|
4574 |
-
}
|
4575 |
-
|
4576 |
-
this.axis.x.scrollbar.el = this.axis.x.track.el.querySelector("." + this.classNames.scrollbar);
|
4577 |
-
this.axis.y.scrollbar.el = this.axis.y.track.el.querySelector("." + this.classNames.scrollbar);
|
4578 |
-
|
4579 |
-
if (!this.options.autoHide) {
|
4580 |
-
this.axis.x.scrollbar.el.classList.add(this.classNames.visible);
|
4581 |
-
this.axis.y.scrollbar.el.classList.add(this.classNames.visible);
|
4582 |
-
}
|
4583 |
-
|
4584 |
-
this.el.setAttribute('data-asl_simplebar', 'init');
|
4585 |
-
};
|
4586 |
-
|
4587 |
-
_proto.initListeners = function initListeners() {
|
4588 |
-
var _this3 = this;
|
4589 |
-
|
4590 |
-
// Event listeners
|
4591 |
-
if (this.options.autoHide) {
|
4592 |
-
this.el.addEventListener('mouseenter', this.onMouseEnter);
|
4593 |
-
}
|
4594 |
-
|
4595 |
-
['mousedown', 'click', 'dblclick'].forEach(function (e) {
|
4596 |
-
_this3.el.addEventListener(e, _this3.onPointerEvent, true);
|
4597 |
-
});
|
4598 |
-
['touchstart', 'touchend', 'touchmove'].forEach(function (e) {
|
4599 |
-
_this3.el.addEventListener(e, _this3.onPointerEvent, {
|
4600 |
-
capture: true,
|
4601 |
-
passive: true
|
4602 |
-
});
|
4603 |
-
});
|
4604 |
-
this.el.addEventListener('mousemove', this.onMouseMove);
|
4605 |
-
this.el.addEventListener('mouseleave', this.onMouseLeave);
|
4606 |
-
this.contentWrapperEl.addEventListener('scroll', this.onScroll); // Browser zoom triggers a window resize
|
4607 |
-
|
4608 |
-
window.addEventListener('resize', this.onWindowResize); // Hack for https://github.com/WICG/ResizeObserver/issues/38
|
4609 |
-
|
4610 |
-
var resizeObserverStarted = false;
|
4611 |
-
this.resizeObserver = new index(function () {
|
4612 |
-
if (!resizeObserverStarted) return;
|
4613 |
-
|
4614 |
-
_this3.recalculate();
|
4615 |
-
});
|
4616 |
-
this.resizeObserver.observe(this.el);
|
4617 |
-
this.resizeObserver.observe(this.contentEl);
|
4618 |
-
window.requestAnimationFrame(function () {
|
4619 |
-
resizeObserverStarted = true;
|
4620 |
-
}); // This is required to detect horizontal scroll. Vertical scroll only needs the resizeObserver.
|
4621 |
-
|
4622 |
-
this.mutationObserver = new MutationObserver(this.recalculate);
|
4623 |
-
this.mutationObserver.observe(this.contentEl, {
|
4624 |
-
childList: true,
|
4625 |
-
subtree: true,
|
4626 |
-
characterData: true
|
4627 |
-
});
|
4628 |
-
};
|
4629 |
-
|
4630 |
-
_proto.recalculate = function recalculate() {
|
4631 |
-
this.elStyles = window.getComputedStyle(this.el);
|
4632 |
-
this.isRtl = this.elStyles.direction === 'rtl';
|
4633 |
-
var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
|
4634 |
-
var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1;
|
4635 |
-
var contentElOffsetWidth = this.contentEl.offsetWidth;
|
4636 |
-
var contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
|
4637 |
-
var elOverflowX = this.elStyles.overflowX;
|
4638 |
-
var elOverflowY = this.elStyles.overflowY;
|
4639 |
-
this.contentEl.style.padding = this.elStyles.paddingTop + " " + this.elStyles.paddingRight + " " + this.elStyles.paddingBottom + " " + this.elStyles.paddingLeft;
|
4640 |
-
this.wrapperEl.style.margin = "-" + this.elStyles.paddingTop + " -" + this.elStyles.paddingRight + " -" + this.elStyles.paddingBottom + " -" + this.elStyles.paddingLeft;
|
4641 |
-
var contentElScrollHeight = this.contentEl.scrollHeight;
|
4642 |
-
var contentElScrollWidth = this.contentEl.scrollWidth;
|
4643 |
-
this.contentWrapperEl.style.height = isHeightAuto ? 'auto' : '100%'; // Determine placeholder size
|
4644 |
-
|
4645 |
-
this.placeholderEl.style.width = isWidthAuto ? contentElOffsetWidth + "px" : 'auto';
|
4646 |
-
this.placeholderEl.style.height = contentElScrollHeight + "px";
|
4647 |
-
var contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
|
4648 |
-
this.axis.x.isOverflowing = contentElScrollWidth > contentElOffsetWidth;
|
4649 |
-
this.axis.y.isOverflowing = contentElScrollHeight > contentWrapperElOffsetHeight; // Set isOverflowing to false if user explicitely set hidden overflow
|
4650 |
-
|
4651 |
-
this.axis.x.isOverflowing = elOverflowX === 'hidden' ? false : this.axis.x.isOverflowing;
|
4652 |
-
this.axis.y.isOverflowing = elOverflowY === 'hidden' ? false : this.axis.y.isOverflowing;
|
4653 |
-
this.axis.x.forceVisible = this.options.forceVisible === 'x' || this.options.forceVisible === true;
|
4654 |
-
this.axis.y.forceVisible = this.options.forceVisible === 'y' || this.options.forceVisible === true;
|
4655 |
-
this.hideNativeScrollbar(); // Set isOverflowing to false if scrollbar is not necessary (content is shorter than offset)
|
4656 |
-
|
4657 |
-
var offsetForXScrollbar = this.axis.x.isOverflowing ? this.scrollbarWidth : 0;
|
4658 |
-
var offsetForYScrollbar = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
|
4659 |
-
this.axis.x.isOverflowing = this.axis.x.isOverflowing && contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
|
4660 |
-
this.axis.y.isOverflowing = this.axis.y.isOverflowing && contentElScrollHeight > contentWrapperElOffsetHeight - offsetForXScrollbar;
|
4661 |
-
this.axis.x.scrollbar.size = this.getScrollbarSize('x');
|
4662 |
-
this.axis.y.scrollbar.size = this.getScrollbarSize('y');
|
4663 |
-
this.axis.x.scrollbar.el.style.width = this.axis.x.scrollbar.size + "px";
|
4664 |
-
this.axis.y.scrollbar.el.style.height = this.axis.y.scrollbar.size + "px";
|
4665 |
-
this.positionScrollbar('x');
|
4666 |
-
this.positionScrollbar('y');
|
4667 |
-
this.toggleTrackVisibility('x');
|
4668 |
-
this.toggleTrackVisibility('y');
|
4669 |
-
}
|
4670 |
-
/**
|
4671 |
-
* Calculate scrollbar size
|
4672 |
-
*/
|
4673 |
-
;
|
4674 |
-
|
4675 |
-
_proto.getScrollbarSize = function getScrollbarSize(axis) {
|
4676 |
-
if (axis === void 0) {
|
4677 |
-
axis = 'y';
|
4678 |
-
}
|
4679 |
-
|
4680 |
-
if (!this.axis[axis].isOverflowing) {
|
4681 |
-
return 0;
|
4682 |
-
}
|
4683 |
-
|
4684 |
-
var contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
|
4685 |
-
var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
|
4686 |
-
var scrollbarSize;
|
4687 |
-
var scrollbarRatio = trackSize / contentSize; // Calculate new height/position of drag handle.
|
4688 |
-
|
4689 |
-
scrollbarSize = Math.max(~~(scrollbarRatio * trackSize), this.options.scrollbarMinSize);
|
4690 |
-
|
4691 |
-
if (this.options.scrollbarMaxSize) {
|
4692 |
-
scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);
|
4693 |
-
}
|
4694 |
-
|
4695 |
-
return scrollbarSize;
|
4696 |
-
};
|
4697 |
-
|
4698 |
-
_proto.positionScrollbar = function positionScrollbar(axis) {
|
4699 |
-
if (axis === void 0) {
|
4700 |
-
axis = 'y';
|
4701 |
-
}
|
4702 |
-
|
4703 |
-
if (!this.axis[axis].isOverflowing) {
|
4704 |
-
return;
|
4705 |
-
}
|
4706 |
-
|
4707 |
-
var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
|
4708 |
-
var trackSize = this.axis[axis].track.el[this.axis[axis].offsetSizeAttr];
|
4709 |
-
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
|
4710 |
-
var scrollbar = this.axis[axis].scrollbar;
|
4711 |
-
var scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
4712 |
-
scrollOffset = axis === 'x' && this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollingInverted ? -scrollOffset : scrollOffset;
|
4713 |
-
var scrollPourcent = scrollOffset / (contentSize - hostSize);
|
4714 |
-
var handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);
|
4715 |
-
handleOffset = axis === 'x' && this.isRtl && asl_SimpleBar.getRtlHelpers().isRtlScrollbarInverted ? handleOffset + (trackSize - scrollbar.size) : handleOffset;
|
4716 |
-
scrollbar.el.style.transform = axis === 'x' ? "translate3d(" + handleOffset + "px, 0, 0)" : "translate3d(0, " + handleOffset + "px, 0)";
|
4717 |
-
};
|
4718 |
-
|
4719 |
-
_proto.toggleTrackVisibility = function toggleTrackVisibility(axis) {
|
4720 |
-
if (axis === void 0) {
|
4721 |
-
axis = 'y';
|
4722 |
-
}
|
4723 |
-
|
4724 |
-
var track = this.axis[axis].track.el;
|
4725 |
-
var scrollbar = this.axis[axis].scrollbar.el;
|
4726 |
-
|
4727 |
-
if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {
|
4728 |
-
track.style.visibility = 'visible';
|
4729 |
-
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'scroll';
|
4730 |
-
} else {
|
4731 |
-
track.style.visibility = 'hidden';
|
4732 |
-
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = 'hidden';
|
4733 |
-
} // Even if forceVisible is enabled, scrollbar itself should be hidden
|
4734 |
-
|
4735 |
-
|
4736 |
-
if (this.axis[axis].isOverflowing) {
|
4737 |
-
scrollbar.style.display = 'block';
|
4738 |
-
} else {
|
4739 |
-
scrollbar.style.display = 'none';
|
4740 |
-
}
|
4741 |
-
};
|
4742 |
-
|
4743 |
-
_proto.hideNativeScrollbar = function hideNativeScrollbar() {
|
4744 |
-
this.offsetEl.style[this.isRtl ? 'left' : 'right'] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
|
4745 |
-
this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-" + this.scrollbarWidth + "px" : 0;
|
4746 |
-
}
|
4747 |
-
/**
|
4748 |
-
* On scroll event handling
|
4749 |
-
*/
|
4750 |
-
;
|
4751 |
-
|
4752 |
-
_proto.onMouseMoveForAxis = function onMouseMoveForAxis(axis) {
|
4753 |
-
if (axis === void 0) {
|
4754 |
-
axis = 'y';
|
4755 |
-
}
|
4756 |
-
|
4757 |
-
this.axis[axis].track.rect = this.axis[axis].track.el.getBoundingClientRect();
|
4758 |
-
this.axis[axis].scrollbar.rect = this.axis[axis].scrollbar.el.getBoundingClientRect();
|
4759 |
-
var isWithinScrollbarBoundsX = this.isWithinBounds(this.axis[axis].scrollbar.rect);
|
4760 |
-
|
4761 |
-
if (isWithinScrollbarBoundsX) {
|
4762 |
-
this.axis[axis].scrollbar.el.classList.add(this.classNames.hover);
|
4763 |
-
} else {
|
4764 |
-
this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
|
4765 |
-
}
|
4766 |
-
|
4767 |
-
if (this.isWithinBounds(this.axis[axis].track.rect)) {
|
4768 |
-
this.showScrollbar(axis);
|
4769 |
-
this.axis[axis].track.el.classList.add(this.classNames.hover);
|
4770 |
-
} else {
|
4771 |
-
this.axis[axis].track.el.classList.remove(this.classNames.hover);
|
4772 |
-
}
|
4773 |
-
};
|
4774 |
-
|
4775 |
-
_proto.onMouseLeaveForAxis = function onMouseLeaveForAxis(axis) {
|
4776 |
-
if (axis === void 0) {
|
4777 |
-
axis = 'y';
|
4778 |
-
}
|
4779 |
-
|
4780 |
-
this.axis[axis].track.el.classList.remove(this.classNames.hover);
|
4781 |
-
this.axis[axis].scrollbar.el.classList.remove(this.classNames.hover);
|
4782 |
-
};
|
4783 |
-
|
4784 |
-
/**
|
4785 |
-
* Show scrollbar
|
4786 |
-
*/
|
4787 |
-
_proto.showScrollbar = function showScrollbar(axis) {
|
4788 |
-
if (axis === void 0) {
|
4789 |
-
axis = 'y';
|
4790 |
-
}
|
4791 |
-
|
4792 |
-
var scrollbar = this.axis[axis].scrollbar.el;
|
4793 |
-
|
4794 |
-
if (!this.axis[axis].isVisible) {
|
4795 |
-
scrollbar.classList.add(this.classNames.visible);
|
4796 |
-
this.axis[axis].isVisible = true;
|
4797 |
-
}
|
4798 |
-
|
4799 |
-
if (this.options.autoHide) {
|
4800 |
-
this.hideScrollbars();
|
4801 |
-
}
|
4802 |
-
}
|
4803 |
-
/**
|
4804 |
-
* Hide Scrollbar
|
4805 |
-
*/
|
4806 |
-
;
|
4807 |
-
|
4808 |
-
/**
|
4809 |
-
* on scrollbar handle drag movement starts
|
4810 |
-
*/
|
4811 |
-
_proto.onDragStart = function onDragStart(e, axis) {
|
4812 |
-
if (axis === void 0) {
|
4813 |
-
axis = 'y';
|
4814 |
-
}
|
4815 |
-
|
4816 |
-
var scrollbar = this.axis[axis].scrollbar; // Measure how far the user's mouse is from the top of the scrollbar drag handle.
|
4817 |
-
|
4818 |
-
var eventOffset = axis === 'y' ? e.pageY : e.pageX;
|
4819 |
-
this.axis[axis].dragOffset = eventOffset - scrollbar.rect[this.axis[axis].offsetAttr];
|
4820 |
-
this.draggedAxis = axis;
|
4821 |
-
this.el.classList.add(this.classNames.dragging);
|
4822 |
-
document.addEventListener('mousemove', this.drag, true);
|
4823 |
-
document.addEventListener('mouseup', this.onEndDrag, true);
|
4824 |
-
|
4825 |
-
if (this.removePreventClickId === null) {
|
4826 |
-
document.addEventListener('click', this.preventClick, true);
|
4827 |
-
document.addEventListener('dblclick', this.preventClick, true);
|
4828 |
-
} else {
|
4829 |
-
window.clearTimeout(this.removePreventClickId);
|
4830 |
-
this.removePreventClickId = null;
|
4831 |
-
}
|
4832 |
-
}
|
4833 |
-
/**
|
4834 |
-
* Drag scrollbar handle
|
4835 |
-
*/
|
4836 |
-
;
|
4837 |
-
|
4838 |
-
_proto.onTrackClick = function onTrackClick(e, axis) {
|
4839 |
-
var _this4 = this;
|
4840 |
-
|
4841 |
-
if (axis === void 0) {
|
4842 |
-
axis = 'y';
|
4843 |
-
}
|
4844 |
-
|
4845 |
-
this.axis[axis].scrollbar.rect = this.axis[axis].scrollbar.el.getBoundingClientRect();
|
4846 |
-
var scrollbar = this.axis[axis].scrollbar;
|
4847 |
-
var scrollbarOffset = scrollbar.rect[this.axis[axis].offsetAttr];
|
4848 |
-
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
|
4849 |
-
var scrolled = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
4850 |
-
var t = axis === 'y' ? this.mouseY - scrollbarOffset : this.mouseX - scrollbarOffset;
|
4851 |
-
var dir = t < 0 ? -1 : 1;
|
4852 |
-
var scrollSize = dir === -1 ? scrolled - hostSize : scrolled + hostSize;
|
4853 |
-
var speed = 40;
|
4854 |
-
|
4855 |
-
var scrollTo = function scrollTo() {
|
4856 |
-
if (dir === -1) {
|
4857 |
-
if (scrolled > scrollSize) {
|
4858 |
-
var _this4$contentWrapper;
|
4859 |
-
|
4860 |
-
scrolled -= speed;
|
4861 |
-
|
4862 |
-
_this4.contentWrapperEl.scrollTo((_this4$contentWrapper = {}, _this4$contentWrapper[_this4.axis[axis].offsetAttr] = scrolled, _this4$contentWrapper));
|
4863 |
-
|
4864 |
-
window.requestAnimationFrame(scrollTo);
|
4865 |
-
}
|
4866 |
-
} else {
|
4867 |
-
if (scrolled < scrollSize) {
|
4868 |
-
var _this4$contentWrapper2;
|
4869 |
-
|
4870 |
-
scrolled += speed;
|
4871 |
-
|
4872 |
-
_this4.contentWrapperEl.scrollTo((_this4$contentWrapper2 = {}, _this4$contentWrapper2[_this4.axis[axis].offsetAttr] = scrolled, _this4$contentWrapper2));
|
4873 |
-
|
4874 |
-
window.requestAnimationFrame(scrollTo);
|
4875 |
-
}
|
4876 |
-
}
|
4877 |
-
};
|
4878 |
-
|
4879 |
-
scrollTo();
|
4880 |
-
}
|
4881 |
-
/**
|
4882 |
-
* Getter for content element
|
4883 |
-
*/
|
4884 |
-
;
|
4885 |
-
|
4886 |
-
_proto.getContentElement = function getContentElement() {
|
4887 |
-
return this.contentEl;
|
4888 |
-
}
|
4889 |
-
/**
|
4890 |
-
* Getter for original scrolling element
|
4891 |
-
*/
|
4892 |
-
;
|
4893 |
-
|
4894 |
-
_proto.getScrollElement = function getScrollElement() {
|
4895 |
-
return this.contentWrapperEl;
|
4896 |
-
};
|
4897 |
-
|
4898 |
-
_proto.getScrollbarWidth = function getScrollbarWidth() {
|
4899 |
-
// Try/catch for FF 56 throwing on undefined computedStyles
|
4900 |
-
try {
|
4901 |
-
// Detect Chrome/Firefox and do not calculate
|
4902 |
-
if (getComputedStyle(this.contentWrapperEl, '::-webkit-scrollbar').display === 'none' || 'scrollbarWidth' in document.documentElement.style) {
|
4903 |
-
return 0;
|
4904 |
-
} else {
|
4905 |
-
return scrollbarWidth();
|
4906 |
-
}
|
4907 |
-
} catch (e) {
|
4908 |
-
return scrollbarWidth();
|
4909 |
-
}
|
4910 |
-
};
|
4911 |
-
|
4912 |
-
_proto.removeListeners = function removeListeners() {
|
4913 |
-
var _this5 = this;
|
4914 |
-
|
4915 |
-
// Event listeners
|
4916 |
-
if (this.options.autoHide) {
|
4917 |
-
this.el.removeEventListener('mouseenter', this.onMouseEnter);
|
4918 |
-
}
|
4919 |
-
|
4920 |
-
['mousedown', 'click', 'dblclick'].forEach(function (e) {
|
4921 |
-
_this5.el.removeEventListener(e, _this5.onPointerEvent, true);
|
4922 |
-
});
|
4923 |
-
['touchstart', 'touchend', 'touchmove'].forEach(function (e) {
|
4924 |
-
_this5.el.removeEventListener(e, _this5.onPointerEvent, {
|
4925 |
-
capture: true,
|
4926 |
-
passive: true
|
4927 |
-
});
|
4928 |
-
});
|
4929 |
-
this.el.removeEventListener('mousemove', this.onMouseMove);
|
4930 |
-
this.el.removeEventListener('mouseleave', this.onMouseLeave);
|
4931 |
-
this.contentWrapperEl.removeEventListener('scroll', this.onScroll);
|
4932 |
-
window.removeEventListener('resize', this.onWindowResize);
|
4933 |
-
this.mutationObserver.disconnect();
|
4934 |
-
this.resizeObserver.disconnect(); // Cancel all debounced functions
|
4935 |
-
|
4936 |
-
this.recalculate.cancel();
|
4937 |
-
this.onMouseMove.cancel();
|
4938 |
-
this.hideScrollbars.cancel();
|
4939 |
-
this.onWindowResize.cancel();
|
4940 |
-
}
|
4941 |
-
/**
|
4942 |
-
* UnMount mutation observer and delete asl_SimpleBar instance from DOM element
|
4943 |
-
*/
|
4944 |
-
;
|
4945 |
-
|
4946 |
-
_proto.unMount = function unMount() {
|
4947 |
-
this.removeListeners();
|
4948 |
-
asl_SimpleBar.instances.delete(this.el);
|
4949 |
-
}
|
4950 |
-
/**
|
4951 |
-
* Check if mouse is within bounds
|
4952 |
-
*/
|
4953 |
-
;
|
4954 |
-
|
4955 |
-
_proto.isWithinBounds = function isWithinBounds(bbox) {
|
4956 |
-
return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
|
4957 |
-
}
|
4958 |
-
/**
|
4959 |
-
* Find element children matches query
|
4960 |
-
*/
|
4961 |
-
;
|
4962 |
-
|
4963 |
-
_proto.findChild = function findChild(el, query) {
|
4964 |
-
var matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
|
4965 |
-
return Array.prototype.filter.call(el.children, function (child) {
|
4966 |
-
return matches.call(child, query);
|
4967 |
-
})[0];
|
4968 |
-
};
|
4969 |
-
|
4970 |
-
return asl_SimpleBar;
|
4971 |
-
}();
|
4972 |
-
|
4973 |
-
asl_SimpleBar.defaultOptions = {
|
4974 |
-
autoHide: true,
|
4975 |
-
forceVisible: false,
|
4976 |
-
classNames: {
|
4977 |
-
contentEl: 'asl_simplebar-content',
|
4978 |
-
contentWrapper: 'asl_simplebar-content-wrapper',
|
4979 |
-
offset: 'asl_simplebar-offset',
|
4980 |
-
mask: 'asl_simplebar-mask',
|
4981 |
-
wrapper: 'asl_simplebar-wrapper',
|
4982 |
-
placeholder: 'asl_simplebar-placeholder',
|
4983 |
-
scrollbar: 'asl_simplebar-scrollbar',
|
4984 |
-
track: 'asl_simplebar-track',
|
4985 |
-
heightAutoObserverWrapperEl: 'asl_simplebar-height-auto-observer-wrapper',
|
4986 |
-
heightAutoObserverEl: 'asl_simplebar-height-auto-observer',
|
4987 |
-
visible: 'asl_simplebar-visible',
|
4988 |
-
horizontal: 'asl_simplebar-horizontal',
|
4989 |
-
vertical: 'asl_simplebar-vertical',
|
4990 |
-
hover: 'asl_simplebar-hover',
|
4991 |
-
dragging: 'asl_simplebar-dragging'
|
4992 |
-
},
|
4993 |
-
scrollbarMinSize: 25,
|
4994 |
-
scrollbarMaxSize: 0,
|
4995 |
-
timeout: 1000
|
4996 |
-
};
|
4997 |
-
asl_SimpleBar.instances = new WeakMap();
|
4998 |
-
|
4999 |
-
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
5000 |
-
var createMethod$4 = function (IS_RIGHT) {
|
5001 |
-
return function (that, callbackfn, argumentsLength, memo) {
|
5002 |
-
aFunction$1(callbackfn);
|
5003 |
-
var O = toObject(that);
|
5004 |
-
var self = indexedObject(O);
|
5005 |
-
var length = toLength(O.length);
|
5006 |
-
var index = IS_RIGHT ? length - 1 : 0;
|
5007 |
-
var i = IS_RIGHT ? -1 : 1;
|
5008 |
-
if (argumentsLength < 2) while (true) {
|
5009 |
-
if (index in self) {
|
5010 |
-
memo = self[index];
|
5011 |
-
index += i;
|
5012 |
-
break;
|
5013 |
-
}
|
5014 |
-
index += i;
|
5015 |
-
if (IS_RIGHT ? index < 0 : length <= index) {
|
5016 |
-
throw TypeError('Reduce of empty array with no initial value');
|
5017 |
-
}
|
5018 |
-
}
|
5019 |
-
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
5020 |
-
memo = callbackfn(memo, self[index], index, O);
|
5021 |
-
}
|
5022 |
-
return memo;
|
5023 |
-
};
|
5024 |
-
};
|
5025 |
-
|
5026 |
-
var arrayReduce = {
|
5027 |
-
// `Array.prototype.reduce` method
|
5028 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
5029 |
-
left: createMethod$4(false),
|
5030 |
-
// `Array.prototype.reduceRight` method
|
5031 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
5032 |
-
right: createMethod$4(true)
|
5033 |
-
};
|
5034 |
-
|
5035 |
-
var $reduce = arrayReduce.left;
|
5036 |
-
|
5037 |
-
|
5038 |
-
// `Array.prototype.reduce` method
|
5039 |
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
5040 |
-
_export({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduce') }, {
|
5041 |
-
reduce: function reduce(callbackfn /* , initialValue */) {
|
5042 |
-
return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
5043 |
-
}
|
5044 |
-
});
|
5045 |
-
|
5046 |
-
var defineProperty$1 = objectDefineProperty.f;
|
5047 |
-
|
5048 |
-
var FunctionPrototype = Function.prototype;
|
5049 |
-
var FunctionPrototypeToString = FunctionPrototype.toString;
|
5050 |
-
var nameRE = /^\s*function ([^ (]*)/;
|
5051 |
-
var NAME = 'name';
|
5052 |
-
|
5053 |
-
// Function instances `.name` property
|
5054 |
-
// https://tc39.github.io/ecma262/#sec-function-instances-name
|
5055 |
-
if (descriptors && !(NAME in FunctionPrototype)) {
|
5056 |
-
defineProperty$1(FunctionPrototype, NAME, {
|
5057 |
-
configurable: true,
|
5058 |
-
get: function () {
|
5059 |
-
try {
|
5060 |
-
return FunctionPrototypeToString.call(this).match(nameRE)[1];
|
5061 |
-
} catch (error) {
|
5062 |
-
return '';
|
5063 |
-
}
|
5064 |
-
}
|
5065 |
-
});
|
5066 |
-
}
|
5067 |
-
|
5068 |
-
// `RegExp.prototype.flags` getter implementation
|
5069 |
-
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
5070 |
-
var regexpFlags = function () {
|
5071 |
-
var that = anObject(this);
|
5072 |
-
var result = '';
|
5073 |
-
if (that.global) result += 'g';
|
5074 |
-
if (that.ignoreCase) result += 'i';
|
5075 |
-
if (that.multiline) result += 'm';
|
5076 |
-
if (that.dotAll) result += 's';
|
5077 |
-
if (that.unicode) result += 'u';
|
5078 |
-
if (that.sticky) result += 'y';
|
5079 |
-
return result;
|
5080 |
-
};
|
5081 |
-
|
5082 |
-
var nativeExec = RegExp.prototype.exec;
|
5083 |
-
// This always refers to the native implementation, because the
|
5084 |
-
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
5085 |
-
// which loads this file before patching the method.
|
5086 |
-
var nativeReplace = String.prototype.replace;
|
5087 |
-
|
5088 |
-
var patchedExec = nativeExec;
|
5089 |
-
|
5090 |
-
var UPDATES_LAST_INDEX_WRONG = (function () {
|
5091 |
-
var re1 = /a/;
|
5092 |
-
var re2 = /b*/g;
|
5093 |
-
nativeExec.call(re1, 'a');
|
5094 |
-
nativeExec.call(re2, 'a');
|
5095 |
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
5096 |
-
})();
|
5097 |
-
|
5098 |
-
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
5099 |
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
5100 |
-
|
5101 |
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
5102 |
-
|
5103 |
-
if (PATCH) {
|
5104 |
-
patchedExec = function exec(str) {
|
5105 |
-
var re = this;
|
5106 |
-
var lastIndex, reCopy, match, i;
|
5107 |
-
|
5108 |
-
if (NPCG_INCLUDED) {
|
5109 |
-
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
|
5110 |
-
}
|
5111 |
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
5112 |
-
|
5113 |
-
match = nativeExec.call(re, str);
|
5114 |
-
|
5115 |
-
if (UPDATES_LAST_INDEX_WRONG && match) {
|
5116 |
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
5117 |
-
}
|
5118 |
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
5119 |
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
5120 |
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
5121 |
-
nativeReplace.call(match[0], reCopy, function () {
|
5122 |
-
for (i = 1; i < arguments.length - 2; i++) {
|
5123 |
-
if (arguments[i] === undefined) match[i] = undefined;
|
5124 |
-
}
|
5125 |
-
});
|
5126 |
-
}
|
5127 |
-
|
5128 |
-
return match;
|
5129 |
-
};
|
5130 |
-
}
|
5131 |
-
|
5132 |
-
var regexpExec = patchedExec;
|
5133 |
-
|
5134 |
-
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
5135 |
-
exec: regexpExec
|
5136 |
-
});
|
5137 |
-
|
5138 |
-
var SPECIES$2 = wellKnownSymbol('species');
|
5139 |
-
|
5140 |
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
5141 |
-
// #replace needs built-in support for named groups.
|
5142 |
-
// #match works fine because it just return the exec results, even if it has
|
5143 |
-
// a "grops" property.
|
5144 |
-
var re = /./;
|
5145 |
-
re.exec = function () {
|
5146 |
-
var result = [];
|
5147 |
-
result.groups = { a: '7' };
|
5148 |
-
return result;
|
5149 |
-
};
|
5150 |
-
return ''.replace(re, '$<a>') !== '7';
|
5151 |
-
});
|
5152 |
-
|
5153 |
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
5154 |
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
5155 |
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
5156 |
-
var re = /(?:)/;
|
5157 |
-
var originalExec = re.exec;
|
5158 |
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
5159 |
-
var result = 'ab'.split(re);
|
5160 |
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
5161 |
-
});
|
5162 |
-
|
5163 |
-
var charAt$1 = stringMultibyte.charAt;
|
5164 |
-
|
5165 |
-
// `AdvanceStringIndex` abstract operation
|
5166 |
-
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
5167 |
-
var advanceStringIndex = function (S, index, unicode) {
|
5168 |
-
return index + (unicode ? charAt$1(S, index).length : 1);
|
5169 |
-
};
|
5170 |
-
|
5171 |
-
// `RegExpExec` abstract operation
|
5172 |
-
// https://tc39.github.io/ecma262/#sec-regexpexec
|
5173 |
-
var regexpExecAbstract = function (R, S) {
|
5174 |
-
var exec = R.exec;
|
5175 |
-
if (typeof exec === 'function') {
|
5176 |
-
var result = exec.call(R, S);
|
5177 |
-
if (typeof result !== 'object') {
|
5178 |
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
5179 |
-
}
|
5180 |
-
return result;
|
5181 |
-
}
|
5182 |
-
|
5183 |
-
if (classofRaw(R) !== 'RegExp') {
|
5184 |
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
5185 |
-
}
|
5186 |
-
|
5187 |
-
return regexpExec.call(R, S);
|
5188 |
-
};
|
5189 |
-
|
5190 |
-
var max$1 = Math.max;
|
5191 |
-
var min$2 = Math.min;
|
5192 |
-
var floor$1 = Math.floor;
|
5193 |
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
5194 |
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
5195 |
-
|
5196 |
-
var maybeToString = function (it) {
|
5197 |
-
return it === undefined ? it : String(it);
|
5198 |
-
};
|
5199 |
-
|
5200 |
-
// Helper function to retrieve options from element attributes
|
5201 |
-
var getOptions = function getOptions(obj) {
|
5202 |
-
var options = Array.prototype.reduce.call(obj, function (acc, attribute) {
|
5203 |
-
var option = attribute.name.match(/data-asl_simplebar-(.+)/);
|
5204 |
-
|
5205 |
-
if (option) {
|
5206 |
-
var key = option[1].replace(/\W+(.)/g, function (x, chr) {
|
5207 |
-
return chr.toUpperCase();
|
5208 |
-
});
|
5209 |
-
|
5210 |
-
switch (attribute.value) {
|
5211 |
-
case 'true':
|
5212 |
-
acc[key] = true;
|
5213 |
-
break;
|
5214 |
-
|
5215 |
-
case 'false':
|
5216 |
-
acc[key] = false;
|
5217 |
-
break;
|
5218 |
-
|
5219 |
-
case undefined:
|
5220 |
-
acc[key] = true;
|
5221 |
-
break;
|
5222 |
-
|
5223 |
-
default:
|
5224 |
-
acc[key] = attribute.value;
|
5225 |
-
}
|
5226 |
-
}
|
5227 |
-
|
5228 |
-
return acc;
|
5229 |
-
}, {});
|
5230 |
-
return options;
|
5231 |
-
};
|
5232 |
-
|
5233 |
-
asl_SimpleBar.initDOMLoadedElements = function () {
|
5234 |
-
document.removeEventListener('DOMContentLoaded', this.initDOMLoadedElements);
|
5235 |
-
window.removeEventListener('load', this.initDOMLoadedElements);
|
5236 |
-
Array.prototype.forEach.call(document.querySelectorAll('[data-asl_simplebar]:not([data-asl_simplebar="init"])'), function (el) {
|
5237 |
-
if (!asl_SimpleBar.instances.has(el)) new asl_SimpleBar(el, getOptions(el.attributes));
|
5238 |
-
});
|
5239 |
-
};
|
5240 |
-
|
5241 |
-
asl_SimpleBar.removeObserver = function () {
|
5242 |
-
this.globalObserver.disconnect();
|
5243 |
-
};
|
5244 |
-
|
5245 |
-
asl_SimpleBar.initHtmlApi = function () {
|
5246 |
-
this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this); // MutationObserver is IE11+
|
5247 |
-
|
5248 |
-
if (typeof MutationObserver !== 'undefined') {
|
5249 |
-
// Mutation observer to observe dynamically added elements
|
5250 |
-
this.globalObserver = new MutationObserver(asl_SimpleBar.handleMutations);
|
5251 |
-
this.globalObserver.observe(document, {
|
5252 |
-
childList: true,
|
5253 |
-
subtree: true
|
5254 |
-
});
|
5255 |
-
} // Taken from jQuery `ready` function
|
5256 |
-
// Instantiate elements already present on the page
|
5257 |
-
|
5258 |
-
|
5259 |
-
if (document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll) {
|
5260 |
-
// Handle it asynchronously to allow scripts the opportunity to delay init
|
5261 |
-
window.setTimeout(this.initDOMLoadedElements);
|
5262 |
-
} else {
|
5263 |
-
document.addEventListener('DOMContentLoaded', this.initDOMLoadedElements);
|
5264 |
-
window.addEventListener('load', this.initDOMLoadedElements);
|
5265 |
-
}
|
5266 |
-
};
|
5267 |
-
|
5268 |
-
asl_SimpleBar.handleMutations = function (mutations) {
|
5269 |
-
mutations.forEach(function (mutation) {
|
5270 |
-
Array.prototype.forEach.call(mutation.addedNodes, function (addedNode) {
|
5271 |
-
if (addedNode.nodeType === 1) {
|
5272 |
-
if (addedNode.hasAttribute('data-asl_simplebar')) {
|
5273 |
-
!asl_SimpleBar.instances.has(addedNode) && new asl_SimpleBar(addedNode, getOptions(addedNode.attributes));
|
5274 |
-
} else {
|
5275 |
-
Array.prototype.forEach.call(addedNode.querySelectorAll('[data-asl_simplebar]:not([data-asl_simplebar="init"])'), function (el) {
|
5276 |
-
!asl_SimpleBar.instances.has(el) && new asl_SimpleBar(el, getOptions(el.attributes));
|
5277 |
-
});
|
5278 |
-
}
|
5279 |
-
}
|
5280 |
-
});
|
5281 |
-
Array.prototype.forEach.call(mutation.removedNodes, function (removedNode) {
|
5282 |
-
if (removedNode.nodeType === 1) {
|
5283 |
-
if (removedNode.hasAttribute('[data-asl_simplebar="init"]')) {
|
5284 |
-
asl_SimpleBar.instances.has(removedNode) && asl_SimpleBar.instances.get(removedNode).unMount();
|
5285 |
-
} else {
|
5286 |
-
Array.prototype.forEach.call(removedNode.querySelectorAll('[data-asl_simplebar="init"]'), function (el) {
|
5287 |
-
asl_SimpleBar.instances.has(el) && asl_SimpleBar.instances.get(el).unMount();
|
5288 |
-
});
|
5289 |
-
}
|
5290 |
-
}
|
5291 |
-
});
|
5292 |
-
});
|
5293 |
-
};
|
5294 |
-
|
5295 |
-
asl_SimpleBar.getOptions = getOptions;
|
5296 |
-
/**
|
5297 |
-
* HTML API
|
5298 |
-
* Called only in a browser env.
|
5299 |
-
*/
|
5300 |
-
|
5301 |
-
if (canUseDom) {
|
5302 |
-
asl_SimpleBar.initHtmlApi();
|
5303 |
-
}
|
5304 |
-
|
5305 |
-
return asl_SimpleBar;
|
1 |
/**
|
2 |
+
* asl_SimpleBar.js - v5.3.5
|
3 |
* Scrollbars, simpler.
|
4 |
+
* https://grsmto.github.io/asl_simplebar/
|
5 |
*
|
6 |
* Made by Adrien Denat from a fork by Jonathan Nicol
|
7 |
* Under MIT License
|
8 |
*/
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
(function (global, factory) {
|
11 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('core-js/modules/es.array.for-each'), require('core-js/modules/web.dom-collections.for-each'), require('core-js/modules/es.array.filter'), require('core-js/modules/es.array.iterator'), require('core-js/modules/es.object.assign'), require('core-js/modules/es.object.to-string'), require('core-js/modules/es.parse-int'), require('core-js/modules/es.string.iterator'), require('core-js/modules/es.weak-map'), require('core-js/modules/web.dom-collections.iterator'), require('core-js/modules/es.array.reduce'), require('core-js/modules/es.function.name'), require('core-js/modules/es.regexp.exec'), require('core-js/modules/es.string.match'), require('core-js/modules/es.string.replace')) :
|
12 |
+
typeof define === 'function' && define.amd ? define(['core-js/modules/es.array.for-each', 'core-js/modules/web.dom-collections.for-each', 'core-js/modules/es.array.filter', 'core-js/modules/es.array.iterator', 'core-js/modules/es.object.assign', 'core-js/modules/es.object.to-string', 'core-js/modules/es.parse-int', 'core-js/modules/es.string.iterator', 'core-js/modules/es.weak-map', 'core-js/modules/web.dom-collections.iterator', 'core-js/modules/es.array.reduce', 'core-js/modules/es.function.name', 'core-js/modules/es.regexp.exec', 'core-js/modules/es.string.match', 'core-js/modules/es.string.replace'], factory) :
|
13 |
+
(global = global || self, global.asl_SimpleBar = factory());
|
14 |
}(this, function () { 'use strict';
|
15 |
|
16 |
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
17 |
+
|
18 |
+
/**
|
19 |
+
* lodash (Custom Build) <https://lodash.com/>
|
20 |
+
* Build: `lodash modularize exports="npm" -o ./`
|
21 |
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
22 |
+
* Released under MIT license <https://lodash.com/license>
|
23 |
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
24 |
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
25 |
+
*/
|
26 |
+
|
27 |
+
/** Used as the `TypeError` message for "Functions" methods. */
|
28 |
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
29 |
+
|
30 |
+
/** Used as references for various `Number` constants. */
|
31 |
+
var NAN = 0 / 0;
|
32 |
+
|
33 |
+
/** `Object#toString` result references. */
|
34 |
+
var symbolTag = '[object Symbol]';
|
35 |
+
|
36 |
+
/** Used to match leading and trailing whitespace. */
|
37 |
+
var reTrim = /^\s+|\s+$/g;
|
38 |
+
|
39 |
+
/** Used to detect bad signed hexadecimal string values. */
|
40 |
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
41 |
+
|
42 |
+
/** Used to detect binary string values. */
|
43 |
+
var reIsBinary = /^0b[01]+$/i;
|
44 |
+
|
45 |
+
/** Used to detect octal string values. */
|
46 |
+
var reIsOctal = /^0o[0-7]+$/i;
|
47 |
+
|
48 |
+
/** Built-in method references without a dependency on `root`. */
|
49 |
+
var freeParseInt = parseInt;
|
50 |
+
|
51 |
+
/** Detect free variable `global` from Node.js. */
|
52 |
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
53 |
+
|
54 |
+
/** Detect free variable `self`. */
|
55 |
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
56 |
+
|
57 |
+
/** Used as a reference to the global object. */
|
58 |
+
var root = freeGlobal || freeSelf || Function('return this')();
|
59 |
+
|
60 |
+
/** Used for built-in method references. */
|
61 |
+
var objectProto = Object.prototype;
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Used to resolve the
|
65 |
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
66 |
+
* of values.
|
67 |
+
*/
|
68 |
+
var objectToString = objectProto.toString;
|
69 |
+
|
70 |
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
71 |
+
var nativeMax = Math.max,
|
72 |
+
nativeMin = Math.min;
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
76 |
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
77 |
+
*
|
78 |
+
* @static
|
79 |
+
* @memberOf _
|
80 |
+
* @since 2.4.0
|
81 |
+
* @category Date
|
82 |
+
* @returns {number} Returns the timestamp.
|
83 |
+
* @example
|
84 |
+
*
|
85 |
+
* _.defer(function(stamp) {
|
86 |
+
* console.log(_.now() - stamp);
|
87 |
+
* }, _.now());
|
88 |
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
89 |
+
*/
|
90 |
+
var now = function() {
|
91 |
+
return root.Date.now();
|
92 |
+
};
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
96 |
+
* milliseconds have elapsed since the last time the debounced function was
|
97 |
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
98 |
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
99 |
+
* Provide `options` to indicate whether `func` should be invoked on the
|
100 |
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
101 |
+
* with the last arguments provided to the debounced function. Subsequent
|
102 |
+
* calls to the debounced function return the result of the last `func`
|
103 |
+
* invocation.
|
104 |
+
*
|
105 |
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
106 |
+
* invoked on the trailing edge of the timeout only if the debounced function
|
107 |
+
* is invoked more than once during the `wait` timeout.
|
108 |
+
*
|
109 |
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
110 |
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
111 |
+
*
|
112 |
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
113 |
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
114 |
+
*
|
115 |
+
* @static
|
116 |
+
* @memberOf _
|
117 |
+
* @since 0.1.0
|
118 |
+
* @category Function
|
119 |
+
* @param {Function} func The function to debounce.
|
120 |
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
121 |
+
* @param {Object} [options={}] The options object.
|
122 |
+
* @param {boolean} [options.leading=false]
|
123 |
+
* Specify invoking on the leading edge of the timeout.
|
124 |
+
* @param {number} [options.maxWait]
|
125 |
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
126 |
+
* @param {boolean} [options.trailing=true]
|
127 |
+
* Specify invoking on the trailing edge of the timeout.
|
128 |
+
* @returns {Function} Returns the new debounced function.
|
129 |
+
* @example
|
130 |
+
*
|
131 |
+
* // Avoid costly calculations while the window size is in flux.
|
132 |
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
133 |
+
*
|
134 |
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
135 |
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
136 |
+
* 'leading': true,
|
137 |
+
* 'trailing': false
|
138 |
+
* }));
|
139 |
+
*
|
140 |
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
141 |
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
142 |
+
* var source = new EventSource('/stream');
|
143 |
+
* jQuery(source).on('message', debounced);
|
144 |
+
*
|
145 |
+
* // Cancel the trailing debounced invocation.
|
146 |
+
* jQuery(window).on('popstate', debounced.cancel);
|
147 |
+
*/
|
148 |
+
function debounce(func, wait, options) {
|
149 |
+
var lastArgs,
|
150 |
+
lastThis,
|
151 |
+
maxWait,
|
152 |
+
result,
|
153 |
+
timerId,
|
154 |
+
lastCallTime,
|
155 |
+
lastInvokeTime = 0,
|
156 |
+
leading = false,
|
157 |
+
maxing = false,
|
158 |
+
trailing = true;
|
159 |
+
|
160 |
+
if (typeof func != 'function') {
|
161 |
+
throw new TypeError(FUNC_ERROR_TEXT);
|
162 |
+
}
|
163 |
+
wait = toNumber(wait) || 0;
|
164 |
+
if (isObject(options)) {
|
165 |
+
leading = !!options.leading;
|
166 |
+
maxing = 'maxWait' in options;
|
167 |
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
168 |
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
169 |
+
}
|
170 |
+
|
171 |
+
function invokeFunc(time) {
|
172 |
+
var args = lastArgs,
|
173 |
+
thisArg = lastThis;
|
174 |
+
|
175 |
+
lastArgs = lastThis = undefined;
|
176 |
+
lastInvokeTime = time;
|
177 |
+
result = func.apply(thisArg, args);
|
178 |
+
return result;
|
179 |
+
}
|
180 |
+
|
181 |
+
function leadingEdge(time) {
|
182 |
+
// Reset any `maxWait` timer.
|
183 |
+
lastInvokeTime = time;
|
184 |
+
// Start the timer for the trailing edge.
|
185 |
+
timerId = setTimeout(timerExpired, wait);
|
186 |
+
// Invoke the leading edge.
|
187 |
+
return leading ? invokeFunc(time) : result;
|
188 |
+
}
|
189 |
+
|
190 |
+
function remainingWait(time) {
|
191 |
+
var timeSinceLastCall = time - lastCallTime,
|
192 |
+
timeSinceLastInvoke = time - lastInvokeTime,
|
193 |
+
result = wait - timeSinceLastCall;
|
194 |
+
|
195 |
+
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
196 |
+
}
|
197 |
+
|
198 |
+
function shouldInvoke(time) {
|
199 |
+
var timeSinceLastCall = time - lastCallTime,
|
200 |
+
timeSinceLastInvoke = time - lastInvokeTime;
|
201 |
+
|
202 |
+
// Either this is the first call, activity has stopped and we're at the
|
203 |
+
// trailing edge, the system time has gone backwards and we're treating
|
204 |
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
205 |
+
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
206 |
+
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
207 |
+
}
|
208 |
+
|
209 |
+
function timerExpired() {
|
210 |
+
var time = now();
|
211 |
+
if (shouldInvoke(time)) {
|
212 |
+
return trailingEdge(time);
|
213 |
+
}
|
214 |
+
// Restart the timer.
|
215 |
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
216 |
+
}
|
217 |
+
|
218 |
+
function trailingEdge(time) {
|
219 |
+
timerId = undefined;
|
220 |
+
|
221 |
+
// Only invoke if we have `lastArgs` which means `func` has been
|
222 |
+
// debounced at least once.
|
223 |
+
if (trailing && lastArgs) {
|
224 |
+
return invokeFunc(time);
|
225 |
+
}
|
226 |
+
lastArgs = lastThis = undefined;
|
227 |
+
return result;
|
228 |
+
}
|
229 |
+
|
230 |
+
function cancel() {
|
231 |
+
if (timerId !== undefined) {
|
232 |
+
clearTimeout(timerId);
|
233 |
+
}
|
234 |
+
lastInvokeTime = 0;
|
235 |
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
236 |
+
}
|
237 |
+
|
238 |
+
function flush() {
|
239 |
+
return timerId === undefined ? result : trailingEdge(now());
|
240 |
+
}
|
241 |
+
|
242 |
+
function debounced() {
|
243 |
+
var time = now(),
|
244 |
+
isInvoking = shouldInvoke(time);
|
245 |
+
|
246 |
+
lastArgs = arguments;
|
247 |
+
lastThis = this;
|
248 |
+
lastCallTime = time;
|
249 |
+
|
250 |
+
if (isInvoking) {
|
251 |
+
if (timerId === undefined) {
|
252 |
+
return leadingEdge(lastCallTime);
|
253 |
+
}
|
254 |
+
if (maxing) {
|
255 |
+
// Handle invocations in a tight loop.
|
256 |
+
timerId = setTimeout(timerExpired, wait);
|
257 |
+
return invokeFunc(lastCallTime);
|
258 |
+
}
|
259 |
+
}
|
260 |
+
if (timerId === undefined) {
|
261 |
+
timerId = setTimeout(timerExpired, wait);
|
262 |
+
}
|
263 |
+
return result;
|
264 |
+
}
|
265 |
+
debounced.cancel = cancel;
|
266 |
+
debounced.flush = flush;
|
267 |
+
return debounced;
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Creates a throttled function that only invokes `func` at most once per
|
272 |
+
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
273 |
+
* method to cancel delayed `func` invocations and a `flush` method to
|
274 |
+
* immediately invoke them. Provide `options` to indicate whether `func`
|
275 |
+
* should be invoked on the leading and/or trailing edge of the `wait`
|
276 |
+
* timeout. The `func` is invoked with the last arguments provided to the
|
277 |
+
* throttled function. Subsequent calls to the throttled function return the
|
278 |
+
* result of the last `func` invocation.
|
279 |
+
*
|
280 |
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
281 |
+
* invoked on the trailing edge of the timeout only if the throttled function
|
282 |
+
* is invoked more than once during the `wait` timeout.
|
283 |
+
*
|
284 |
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
285 |
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
286 |
+
*
|
287 |
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
288 |
+
* for details over the differences between `_.throttle` and `_.debounce`.
|
289 |
+
*
|
290 |
+
* @static
|
291 |
+
* @memberOf _
|
292 |
+
* @since 0.1.0
|
293 |
+
* @category Function
|
294 |
+
* @param {Function} func The function to throttle.
|
295 |
+
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
296 |
+
* @param {Object} [options={}] The options object.
|
297 |
+
* @param {boolean} [options.leading=true]
|
298 |
+
* Specify invoking on the leading edge of the timeout.
|
299 |
+
* @param {boolean} [options.trailing=true]
|
300 |
+
* Specify invoking on the trailing edge of the timeout.
|
301 |
+
* @returns {Function} Returns the new throttled function.
|
302 |
+
* @example
|
303 |
+
*
|
304 |
+
* // Avoid excessively updating the position while scrolling.
|
305 |
+
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
306 |
+
*
|
307 |
+
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
308 |
+
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
309 |
+
* jQuery(element).on('click', throttled);
|
310 |
+
*
|
311 |
+
* // Cancel the trailing throttled invocation.
|
312 |
+
* jQuery(window).on('popstate', throttled.cancel);
|
313 |
+
*/
|
314 |
+
function throttle(func, wait, options) {
|
315 |
+
var leading = true,
|
316 |
+
trailing = true;
|
317 |
+
|
318 |
+
if (typeof func != 'function') {
|
319 |
+
throw new TypeError(FUNC_ERROR_TEXT);
|
320 |
+
}
|
321 |
+
if (isObject(options)) {
|
322 |
+
leading = 'leading' in options ? !!options.leading : leading;
|
323 |
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
324 |
+
}
|
325 |
+
return debounce(func, wait, {
|
326 |
+
'leading': leading,
|
327 |
+
'maxWait': wait,
|
328 |
+
'trailing': trailing
|
329 |
+
});
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Checks if `value` is the
|
334 |
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
335 |
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
336 |
+
*
|
337 |
+
* @static
|
338 |
+
* @memberOf _
|
339 |
+
* @since 0.1.0
|
340 |
+
* @category Lang
|
341 |
+
* @param {*} value The value to check.
|
342 |
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
343 |
+
* @example
|
344 |
+
*
|
345 |
+
* _.isObject({});
|
346 |
+
* // => true
|
347 |
+
*
|
348 |
+
* _.isObject([1, 2, 3]);
|
349 |
+
* // => true
|
350 |
+
*
|
351 |
+
* _.isObject(_.noop);
|
352 |
+
* // => true
|
353 |
+
*
|
354 |
+
* _.isObject(null);
|
355 |
+
* // => false
|
356 |
+
*/
|
357 |
+
function isObject(value) {
|
358 |
+
var type = typeof value;
|
359 |
+
return !!value && (type == 'object' || type == 'function');
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
364 |
+
* and has a `typeof` result of "object".
|
365 |
+
*
|
366 |
+
* @static
|
367 |
+
* @memberOf _
|
368 |
+
* @since 4.0.0
|
369 |
+
* @category Lang
|
370 |
+
* @param {*} value The value to check.
|
371 |
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
372 |
+
* @example
|
373 |
+
*
|
374 |
+
* _.isObjectLike({});
|
375 |
+
* // => true
|
376 |
+
*
|
377 |
+
* _.isObjectLike([1, 2, 3]);
|
378 |
+
* // => true
|
379 |
+
*
|
380 |
+
* _.isObjectLike(_.noop);
|
381 |
+
* // => false
|
382 |
+
*
|
383 |
+
* _.isObjectLike(null);
|
384 |
+
* // => false
|
385 |
+
*/
|
386 |
+
function isObjectLike(value) {
|
387 |
+
return !!value && typeof value == 'object';
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
392 |
+
*
|
393 |
+
* @static
|
394 |
+
* @memberOf _
|
395 |
+
* @since 4.0.0
|
396 |
+
* @category Lang
|
397 |
+
* @param {*} value The value to check.
|
398 |
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
399 |
+
* @example
|
400 |
+
*
|
401 |
+
* _.isSymbol(Symbol.iterator);
|
402 |
+
* // => true
|
403 |
+
*
|
404 |
+
* _.isSymbol('abc');
|
405 |
+
* // => false
|
406 |
+
*/
|
407 |
+
function isSymbol(value) {
|
408 |
+
return typeof value == 'symbol' ||
|
409 |
+
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Converts `value` to a number.
|
414 |
+
*
|
415 |
+
* @static
|
416 |
+
* @memberOf _
|
417 |
+
* @since 4.0.0
|
418 |
+
* @category Lang
|
419 |
+
* @param {*} value The value to process.
|
420 |
+
* @returns {number} Returns the number.
|
421 |
+
* @example
|
422 |
+
*
|
423 |
+
* _.toNumber(3.2);
|
424 |
+
* // => 3.2
|
425 |
+
*
|
426 |
+
* _.toNumber(Number.MIN_VALUE);
|
427 |
+
* // => 5e-324
|
428 |
+
*
|
429 |
+
* _.toNumber(Infinity);
|
430 |
+
* // => Infinity
|
431 |
+
*
|
432 |
+
* _.toNumber('3.2');
|
433 |
+
* // => 3.2
|
434 |
+
*/
|
435 |
+
function toNumber(value) {
|
436 |
+
if (typeof value == 'number') {
|
437 |
+
return value;
|
438 |
+
}
|
439 |
+
if (isSymbol(value)) {
|
440 |
+
return NAN;
|
441 |
+
}
|
442 |
+
if (isObject(value)) {
|
443 |
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
444 |
+
value = isObject(other) ? (other + '') : other;
|
445 |
+
}
|
446 |
+
if (typeof value != 'string') {
|
447 |
+
return value === 0 ? value : +value;
|
448 |
+
}
|
449 |
+
value = value.replace(reTrim, '');
|
450 |
+
var isBinary = reIsBinary.test(value);
|
451 |
+
return (isBinary || reIsOctal.test(value))
|
452 |
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
453 |
+
: (reIsBadHex.test(value) ? NAN : +value);
|
454 |
+
}
|
455 |
+
|
456 |
+
var lodash_throttle = throttle;
|
457 |
+
|
458 |
+
/**
|
459 |
+
* lodash (Custom Build) <https://lodash.com/>
|
460 |
+
* Build: `lodash modularize exports="npm" -o ./`
|
461 |
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
462 |
+
* Released under MIT license <https://lodash.com/license>
|
463 |
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
464 |
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
465 |
+
*/
|
466 |
+
|
467 |
+
/** Used as the `TypeError` message for "Functions" methods. */
|
468 |
+
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
469 |
+
|
470 |
+
/** Used as references for various `Number` constants. */
|
471 |
+
var NAN$1 = 0 / 0;
|
472 |
+
|
473 |
+
/** `Object#toString` result references. */
|
474 |
+
var symbolTag$1 = '[object Symbol]';
|
475 |
+
|
476 |
+
/** Used to match leading and trailing whitespace. */
|
477 |
+
var reTrim$1 = /^\s+|\s+$/g;
|
478 |
+
|
479 |
+
/** Used to detect bad signed hexadecimal string values. */
|
480 |
+
var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
|
481 |
+
|
482 |
+
/** Used to detect binary string values. */
|
483 |
+
var reIsBinary$1 = /^0b[01]+$/i;
|
484 |
+
|
485 |
+
/** Used to detect octal string values. */
|
486 |
+
var reIsOctal$1 = /^0o[0-7]+$/i;
|
487 |
+
|
488 |
+
/** Built-in method references without a dependency on `root`. */
|
489 |
+
var freeParseInt$1 = parseInt;
|
490 |
+
|
491 |
+
/** Detect free variable `global` from Node.js. */
|
492 |
+
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
493 |
+
|
494 |
+
/** Detect free variable `self`. */
|
495 |
+
var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
|
496 |
+
|
497 |
+
/** Used as a reference to the global object. */
|
498 |
+
var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
|
499 |
+
|
500 |
+
/** Used for built-in method references. */
|
501 |
+
var objectProto$1 = Object.prototype;
|
502 |
+
|
503 |
+
/**
|
504 |
+
* Used to resolve the
|
505 |
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
506 |
+
* of values.
|
507 |
+
*/
|
508 |
+
var objectToString$1 = objectProto$1.toString;
|
509 |
+
|
510 |
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
511 |
+
var nativeMax$1 = Math.max,
|
512 |
+
nativeMin$1 = Math.min;
|
513 |
+
|
514 |
+
/**
|
515 |
+
* Gets the timestamp of the number of milliseconds that have elapsed since
|
516 |
+
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
517 |
+
*
|
518 |
+
* @static
|
519 |
+
* @memberOf _
|
520 |
+
* @since 2.4.0
|
521 |
+
* @category Date
|
522 |
+
* @returns {number} Returns the timestamp.
|
523 |
+
* @example
|
524 |
+
*
|
525 |
+
* _.defer(function(stamp) {
|
526 |
+
* console.log(_.now() - stamp);
|
527 |
+
* }, _.now());
|
528 |
+
* // => Logs the number of milliseconds it took for the deferred invocation.
|
529 |
+
*/
|
530 |
+
var now$1 = function() {
|
531 |
+
return root$1.Date.now();
|
532 |
+
};
|
533 |
+
|
534 |
+
/**
|
535 |
+
* Creates a debounced function that delays invoking `func` until after `wait`
|
536 |
+
* milliseconds have elapsed since the last time the debounced function was
|
537 |
+
* invoked. The debounced function comes with a `cancel` method to cancel
|
538 |
+
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
539 |
+
* Provide `options` to indicate whether `func` should be invoked on the
|
540 |
+
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
541 |
+
* with the last arguments provided to the debounced function. Subsequent
|
542 |
+
* calls to the debounced function return the result of the last `func`
|
543 |
+
* invocation.
|
544 |
+
*
|
545 |
+
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
546 |
+
* invoked on the trailing edge of the timeout only if the debounced function
|
547 |
+
* is invoked more than once during the `wait` timeout.
|
548 |
+
*
|
549 |
+
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
550 |
+
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
551 |
+
*
|
552 |
+
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
553 |
+
* for details over the differences between `_.debounce` and `_.throttle`.
|
554 |
+
*
|
555 |
+
* @static
|
556 |
+
* @memberOf _
|
557 |
+
* @since 0.1.0
|
558 |
+
* @category Function
|
559 |
+
* @param {Function} func The function to debounce.
|
560 |
+
* @param {number} [wait=0] The number of milliseconds to delay.
|
561 |
+
* @param {Object} [options={}] The options object.
|
562 |
+
* @param {boolean} [options.leading=false]
|
563 |
+
* Specify invoking on the leading edge of the timeout.
|
564 |
+
* @param {number} [options.maxWait]
|
565 |
+
* The maximum time `func` is allowed to be delayed before it's invoked.
|
566 |
+
* @param {boolean} [options.trailing=true]
|
567 |
+
* Specify invoking on the trailing edge of the timeout.
|
568 |
+
* @returns {Function} Returns the new debounced function.
|
569 |
+
* @example
|
570 |
+
*
|
571 |
+
* // Avoid costly calculations while the window size is in flux.
|
572 |
+
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
573 |
+
*
|
574 |
+
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
575 |
+
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
576 |
+
* 'leading': true,
|
577 |
+
* 'trailing': false
|
578 |
+
* }));
|
579 |
+
*
|
580 |
+
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
581 |
+
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
582 |
+
* var source = new EventSource('/stream');
|
583 |
+
* jQuery(source).on('message', debounced);
|
584 |
+
*
|
585 |
+
* // Cancel the trailing debounced invocation.
|
586 |
+
* jQuery(window).on('popstate', debounced.cancel);
|
587 |
+
*/
|
588 |
+
function debounce$1(func, wait, options) {
|
589 |
+
var lastArgs,
|
590 |
+
lastThis,
|
591 |
+
maxWait,
|
592 |
+
result,
|
593 |
+
timerId,
|
594 |
+
lastCallTime,
|
595 |
+
lastInvokeTime = 0,
|
596 |
+
leading = false,
|
597 |
+
maxing = false,
|
598 |
+
trailing = true;
|
599 |
+
|
600 |
+
if (typeof func != 'function') {
|
601 |
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
602 |
+
}
|
603 |
+
wait = toNumber$1(wait) || 0;
|
604 |
+
if (isObject$1(options)) {
|
605 |
+
leading = !!options.leading;
|
606 |
+
maxing = 'maxWait' in options;
|
607 |
+
maxWait = maxing ? nativeMax$1(toNumber$1(options.maxWait) || 0, wait) : maxWait;
|
608 |
+
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
609 |
+
}
|
610 |
+
|
611 |
+
function invokeFunc(time) {
|
612 |
+
var args = lastArgs,
|
613 |
+
thisArg = lastThis;
|
614 |
+
|
615 |
+
lastArgs = lastThis = undefined;
|
616 |
+
lastInvokeTime = time;
|
617 |
+
result = func.apply(thisArg, args);
|
618 |
+
return result;
|
619 |
+
}
|
620 |
+
|
621 |
+
function leadingEdge(time) {
|
622 |
+
// Reset any `maxWait` timer.
|
623 |
+
lastInvokeTime = time;
|
624 |
+
// Start the timer for the trailing edge.
|
625 |
+
timerId = setTimeout(timerExpired, wait);
|
626 |
+
// Invoke the leading edge.
|
627 |
+
return leading ? invokeFunc(time) : result;
|
628 |
+
}
|
629 |
+
|
630 |
+
function remainingWait(time) {
|
631 |
+
var timeSinceLastCall = time - lastCallTime,
|
632 |
+
timeSinceLastInvoke = time - lastInvokeTime,
|
633 |
+
result = wait - timeSinceLastCall;
|
634 |
+
|
635 |
+
return maxing ? nativeMin$1(result, maxWait - timeSinceLastInvoke) : result;
|
636 |
+
}
|
637 |
+
|
638 |
+
function shouldInvoke(time) {
|
639 |
+
var timeSinceLastCall = time - lastCallTime,
|
640 |
+
timeSinceLastInvoke = time - lastInvokeTime;
|
641 |
+
|
642 |
+
// Either this is the first call, activity has stopped and we're at the
|
643 |
+
// trailing edge, the system time has gone backwards and we're treating
|
644 |
+
// it as the trailing edge, or we've hit the `maxWait` limit.
|
645 |
+
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
646 |
+
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
647 |
+
}
|
648 |
+
|
649 |
+
function timerExpired() {
|
650 |
+
var time = now$1();
|
651 |
+
if (shouldInvoke(time)) {
|
652 |
+
return trailingEdge(time);
|
653 |
+
}
|
654 |
+
// Restart the timer.
|
655 |
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
656 |
+
}
|
657 |
+
|
658 |
+
function trailingEdge(time) {
|
659 |
+
timerId = undefined;
|
660 |
+
|
661 |
+
// Only invoke if we have `lastArgs` which means `func` has been
|
662 |
+
// debounced at least once.
|
663 |
+
if (trailing && lastArgs) {
|
664 |
+
return invokeFunc(time);
|
665 |
+
}
|
666 |
+
lastArgs = lastThis = undefined;
|
667 |
+
return result;
|
668 |
+
}
|
669 |
+
|
670 |
+
function cancel() {
|
671 |
+
if (timerId !== undefined) {
|
672 |
+
clearTimeout(timerId);
|
673 |
+
}
|
674 |
+
lastInvokeTime = 0;
|
675 |
+
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
676 |
+
}
|
677 |
+
|
678 |
+
function flush() {
|
679 |
+
return timerId === undefined ? result : trailingEdge(now$1());
|
680 |
+
}
|
681 |
+
|
682 |
+
function debounced() {
|
683 |
+
var time = now$1(),
|
684 |
+
isInvoking = shouldInvoke(time);
|
685 |
+
|
686 |
+
lastArgs = arguments;
|
687 |
+
lastThis = this;
|
688 |
+
lastCallTime = time;
|
689 |
+
|
690 |
+
if (isInvoking) {
|
691 |
+
if (timerId === undefined) {
|
692 |
+
return leadingEdge(lastCallTime);
|
693 |
+
}
|
694 |
+
if (maxing) {
|
695 |
+
// Handle invocations in a tight loop.
|
696 |
+
timerId = setTimeout(timerExpired, wait);
|
697 |
+
return invokeFunc(lastCallTime);
|
698 |
+
}
|
699 |
+
}
|
700 |
+
if (timerId === undefined) {
|
701 |
+
timerId = setTimeout(timerExpired, wait);
|
702 |
+
}
|
703 |
+
return result;
|
704 |
+
}
|
705 |
+
debounced.cancel = cancel;
|
706 |
+
debounced.flush = flush;
|
707 |
+
return debounced;
|
708 |
+
}
|
709 |
+
|
710 |
+
/**
|
711 |
+
* Checks if `value` is the
|
712 |
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
713 |
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
714 |
+
*
|
715 |
+
* @static
|
716 |
+
* @memberOf _
|
717 |
+
* @since 0.1.0
|
718 |
+
* @category Lang
|
719 |
+
* @param {*} value The value to check.
|
720 |
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
721 |
+
* @example
|
722 |
+
*
|
723 |
+
* _.isObject({});
|
724 |
+
* // => true
|
725 |
+
*
|
726 |
+
* _.isObject([1, 2, 3]);
|
727 |
+
* // => true
|
728 |
+
*
|
729 |
+
* _.isObject(_.noop);
|
730 |
+
* // => true
|
731 |
+
*
|
732 |
+
* _.isObject(null);
|
733 |
+
* // => false
|
734 |
+
*/
|
735 |
+
function isObject$1(value) {
|
736 |
+
var type = typeof value;
|
737 |
+
return !!value && (type == 'object' || type == 'function');
|
738 |
+
}
|
739 |
+
|
740 |
+
/**
|
741 |
+
* Checks if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|