!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define(["require","exports"],e)}((function(e,t){var r=function(e){return Array.isArray?Array.isArray(e):e&&"[object Array]"===Object.prototype.toString.call(e)},n=function(e,t,n,o){if(!r(e))throw new TypeError("forEach called on a non-array type value. The given value is "+typeof e);var i;if(n||(n=e),o)for(a=(u=e.length)-1;a>=0&&("boolean"!=typeof(i=t.call(n,e[a],a,e))||i);a--);else for(var a=0,u=e.length;a<u&&("boolean"!=typeof(i=t.call(n,e[a],a,e))||i);a++);};var o=function(e){return r(e)?e.length<1:null},i=function(e){return String.prototype.trim?String.prototype.trim.call(e):e.replace(/^\s+|\s+$/gm,"")},a=function(e){return"string"==typeof e},u=function(e){return!a(e)||""==e.replace(/\s/g,"")},f=function(e,t,r){if(!a(e))throw new TypeError("String.includes called on a non-string");return String.prototype.includes?String.prototype.includes.call(e,t,r):("number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r))},c=function(e){if(!a(e))throw new TypeError("String.digits called on a non-string. The given value is "+typeof e);return i(e).replace(/[^0-9]/g,"")},l=function(e){return"function"==typeof e},s=function(e){return null!==e&&"object"==typeof e&&!r(e)},p=function(e,t){var r=JSON.parse(JSON.stringify(e));if(!s(e)||!s(t))throw new TypeError("First or second argument is not an plain object");return n(T(t),(function(n){s(t[n])?r[n]=p(e[n]||{},t[n]):r[n]=t[n]})),r};function h(e){if(!s(e)&&!r(e))return e;var t=!r(e),n=t?{}:[],o=0,i=0;if(t){var a=T(e);for(i=a.length;o<i;o++){var u=a[o];n[u]=h(e[u])}}else for(i=e.length;o<i;o++)n[o]=h(e[o]);return n}var g,y,d,m,v,b,w,T=(g=Object.prototype.hasOwnProperty,y=!{toString:null}.propertyIsEnumerable("toString"),m=(d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(e){if("function"==typeof Object.keys)return Object.keys(e);if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on non-object. The given value is "+typeof e);var t=[];for(var r in e)g.call(e,r)&&t.push(r);if(y)for(var n=0;n<m;n++)g.call(e,d[n])&&t.push(d[n]);return t}),M=function(e,t,r){var n,o=r||e;if(!s(e))throw new TypeError("Object.forEach called on non-object. The given value is "+typeof e);if(!l(t))throw new TypeError("The given iterator is not a function");for(var i in e)if((!l(e.hasOwnProperty)||e.hasOwnProperty(i))&&"boolean"==typeof(n=t.apply(o,[e[i],i]))&&!n)break},O="function"!=typeof Object.create?(v=function(){},function(e,t){if(e!==Object(e)&&null!==e)throw TypeError("Argument must be an object, or null");v.prototype=e||{};var r=new v;return v.prototype=null,void 0!==t&&Object.defineProperties(r,t),null===e&&(r.__proto__=null),r}):Object.create,S=b={current:new Date,months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],fromToday:function(e,t,r,n){if(n=n||5,!A(e)&&(e.indexOf("-")>-1&&(e=e.replace(/-/g,"/")),e.indexOf("/")<0))return"";var o=new Date(b.calcTimeOffset(e,-1*b.current.getTimezoneOffset()/60)),i=b.current.getTime()-o.getTime();i/=1e3,Math.floor(i%60),i/=60;var a=Math.max(1,Math.floor(i%60));i/=60;var u=Math.floor(i%24),f=Math.floor(i/24),c=r?" ":", ";return f>n?b[t?"monthsShort":"months"][o.getMonth()]+" "+o.getDate()+c+(r?"":o.getFullYear()):f>=1?f+" day"+(f>1?"s":"")+" ago":u>=1?u+" hr"+(u>1?"s":"")+". ago":a+" min. ago"},calcTimeOffset:function(e,t){var r=A(e)?new Date(e):new Date,n=r.getTime()+6e4*r.getTimezoneOffset();return new Date(n+36e5*t).getTime()},getDifference:function(e,t,r,n){var o=e.getTimezoneOffset(),i=e.getTime(),a=b.calcTimeOffset(t.getTime(),-1*o/60),u=Math.round(Math.abs(i-a)/36e5),f=Math.round((i-a)/864e5);r||(r="days");var c="days"==r?f:u;return n&&(c=c.toString()+("days"==r?" day":" hr")+(1!==c?"s":"")),c},getElapsedSeconds:function(e,t){var r=e-t;return r/=1e3,Math.round(r%60*100)/100+" sec."},toText:function(e,t,r,n,o,i){var u;if(A(e)||a(e)){if(!A(e)&&e){if(e.indexOf("-")>-1&&(e=e.replace(/-/g,"/")),e.indexOf("/")<0)return""}else if(!e)return"";u=new Date(e)}else{if(!e)return"";u=e}var f=n?" ":", ",c=o?u.getUTCMonth():u.getMonth(),l=o?u.getUTCDate():u.getDate(),s=o?u.getUTCFullYear():u.getFullYear();return i&&(l=l.toString()+function(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(l)),b[t?"monthsShort":"months"][c]+(r?" ":" "+l+f)+(n?"":s)},today:function(){return b.toText(b.current.getTime(),!0)},getAge:function(e,t,r){var n=new Date,o=n.getFullYear(),i=n.getMonth(),a=n.getDate(),u=o-r;return i<e-1&&u--,e-1==i&&a<t&&u--,u},toUTC:function(e){return e.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),e.setUTCHours(e.getHours()),e.setUTCMinutes(e.getMinutes()),e}},j={counter:{start:function(){w=(new Date).getTime()},end:function(e){if(!w)return null;var t=(new Date).getTime()-w;return w=!1,e?(t/=1e3,Math.round(t%60*100)/100+"sec."):t+"ms."}}},A=function(e,t){return"number"==typeof e&&(t&&isNaN(e)||isFinite(e))};function E(e,t,r,n,o){t=!isNaN(t=Math.abs(t))&&t>0?Math.pow(10,t):1,r=void 0!==r?r:"$",n=n||",",o=o||".";var i=e<0?"-":"",a=parseInt(e=Math.round(Math.abs(+e||0)*t)/t,10)+"",u=(u=a.length)>3?u%3:0,f=i+r+(u?a.substring(0,u)+n:"")+a.substring(u).replace(/(\d{3})(?=\d)/g,"$1"+n);return t>1&&Math.round(Math.abs(e-a)>0)&&(f+=o+(Math.round(Math.abs(e-a)*t)/t).toString().substring(2)),f}function N(e){return null==e||void 0===e}var x=function(){if("undefined"!=typeof window){if(window.requestAnimationFrame)return function(e,t){return window.requestAnimationFrame.apply(window,[e,t])};var e=0,t=function(t,r){var n=(new Date).getTime(),o=Math.max(0,16-(n-e)),i=window.setTimeout((function(){t(n+o)}),o);return e=n+o,i}}else t=function(e){e()};return t}(),D="undefined"!=typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame:clearTimeout;return{Array:{isArray:r,forEach:n,filter:function(e,t){if(Array.prototype.filter)return Array.prototype.filter.call(e,t);for(var r=[],n=0,o=e.length;n<o;n++)t(e[n])&&r.push(e[n]);return r},findIndex:function(e,t){if(!r(e))throw new TypeError("Array.findIndex called on a non-array type. The given value is "+typeof e);if(Array.prototype.findIndex)return Array.prototype.findIndex.call(e,t);for(var n,o=-1,i=0,a=e.length;i<a;i++)if("boolean"==typeof(n=t(e,e[i],i,e))&&n){o=i;break}return o},map:function(e,t){if(Array.prototype.map)return Array.prototype.map.call(e,t);for(var r=[],n=0,o=e.length;n<o;n++)r.push(t(e[n]));return r},some:function(e,t,n){if(!r(e))throw new TypeError("Array.some called on a non-array type value. The given value is "+typeof e);if(!l(t))throw new TypeError("Iterator of Array.some is not a function. The given value is "+typeof t);if(n||(n=e),Array.prototype.some)return Array.prototype.some.call(e,t,n);for(var o=Object(e),i=o.length>>>0,a=0;a<i;a++)if(a in o&&t.call(n,o[a],a,o))return!0;return!1},isEmpty:o,isPopulated:function(e){return!!r(e)&&!o(e)},pushUnique:function(e,t){if(!r(e))throw new TypeError("Array.pushUnique called on a non-array type. The given value is "+typeof e);e.indexOf(t)<0&&e.push(t)},groupBy:function(e,t,n){if(!r(e))throw new TypeError("Array.groupBy called on a non-array type. The given value is "+typeof e);var o=e.reduce((function(e,r){var o=r[t];return e[o]=e[o]||[],e[o].push(r),n&&n(r,e[o]),e}),{}),i=[];return M(o,(function(e){i.push(e)})),i},last:function(e){return r(e)?e[e.length-1]:null}},Number:{isNumber:A,toNumber:function(e){if(a(e)){var t=e.trim(),r=t.replace(/[^0-9.]/g,"");return 0==t.indexOf("-")&&(r="-"+r),parseFloat(r)}return A(e)?e:null},formatMoney:E,formatNumber:function(e,t){var r=!1;e<0&&(r=!0),e=Math.abs(e);var n=t;return n=!isNaN(n=Math.abs(n))&&n>0?Math.pow(10,n):1,e>=1e9?(formattedNumber=(Math.round(e/1e9*n)/n).toString().replace(/\.0$/,"")+"G",r&&(formattedNumber="-"+formattedNumber)):e>=1e6?(formattedNumber=(Math.round(e/1e6*n)/n).toString().replace(/\.0$/,"")+"M",r&&(formattedNumber="-"+formattedNumber)):e>=1e3?(formattedNumber=(Math.round(e/1e3*n)/n).toString().replace(/\.0$/,"")+"K",r&&(formattedNumber="-"+formattedNumber)):formattedNumber=E(e,t,""),formattedNumber},phoneFormat:function(e){return(e?c(e.toString()):"").replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3")},between:function(e,t,r){if(!A(e))throw new TypeError("Number.between called on non-number. The given value is "+typeof e);return r?e>=t[0]&&e<=t[1]:e>t[0]&&e<t[1]}},String:{isString:a,isEmpty:u,trimLeft:function(e){return String.prototype.trimLeft?String.prototype.trimLeft.call(e):e.replace(/^\s+/,"")},trimRight:function(e){return String.prototype.trimRight?String.prototype.trimRight.call(e):e.replace(/\s+$/,"")},trim:i,format:function(e,t){var r=Array.prototype.slice.call(arguments);return r.shift().replace(/\{(\d+)\}/g,(function(e,t){return void 0!==r[t]&&null!==r[t]?r[t]:e}))},capitalize:function(e){if(a(e))return e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()}))},substr:function(e,t,r){if(a(e))return"b"!="ab".substring(-1)?String.prototype.substr.call(e,t<0?e.length+t:t,r):String.prototype.substr.call(e,t,r);throw new TypeError("String.substr called on a non-string. The given value is "+typeof e)},includes:f,containsAny:function(e,t){if(!a(e))throw new TypeError("Contains called on a non-string. The given value is "+typeof e);if(!r(t))return!1;var o=!1;return n(t,(function(t){return!a(t)||(f(e,t)?(o=!0,!1):void 0)})),o},splitCamel:function(e){if(!a(e))throw new TypeError("String.splitCamel called on a non-string. The given value is "+typeof e);return e.replace(/([A-Z])/g," $1").replace(/^./,(function(e){return e.toUpperCase()}))},digits:c,resolve:function(e,t,r){return a(e)&&!u(e)?e+(t?" ":""):r||""}},Math:{degrees:function(e){return e*(180/Math.PI)},getAngle:function(e,t,r,n){var o=Math.abs(n-t),i=Math.abs(r-e),a=o/Math.sqrt(o*o+i*i);return Math.degrees(Math.asin(a))},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}},Object:{assign:function(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");if("function"==typeof Object.assign)return Object.assign.apply(this,arguments);for(var r=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];if(null!=o)for(var i=Object.keys(Object(o)),a=0,u=i.length;a<u;a++){var f=i[a],c=Object.getOwnPropertyDescriptor(o,f);void 0!==c&&c.enumerable&&(r[f]=o[f])}}return r},merge:p,isFunction:l,isObject:s,keys:T,forEach:M,copy:function(e){return h(e)},hasKeys:function(e,t,r){var o=!1;if(!s(e))throw new TypeError("Object.hasKeys called on non-object. The given value is "+typeof e);return n(t,(function(t){if(!(t in e))return o=!1,!1;o=!r||!!e[t]})),o},hasAnyKey:function(e,t,r){var o=!1;if(!s(e))throw new TypeError("Object.hasKeys called on non-object. The given value is "+typeof e);return n(t,(function(t){if(t in e&&(o=!r||!!e[t]),o)return!1})),o},create:O,fromUrlParam:function(e){try{return JSON.parse('{"'+e.replace(/&/g,'","').replace(/=/g,'":"')+'"}',(function(e,t){return""===e?t:decodeURIComponent(t)}))}catch(e){return{}}}},Date:S,Time:j,uniqid:function(e,t){var r;void 0===e&&(e="");var n=function(e,t){return t<(e=parseInt(e,10).toString(16)).length?e.slice(e.length-t):t>e.length?Array(t-e.length+1).join("0")+e:e};return this.php_js||(this.php_js={}),this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(123456789*Math.random())),this.php_js.uniqidSeed++,r=e,r+=n(parseInt((new Date).getTime()/1e3,10),8),r+=n(this.php_js.uniqidSeed,5),t&&(r+=(10*Math.random()).toFixed(8).toString()),r},tryCatch:function(e,t){try{return e()}catch(e){return l(t)?t(e):void 0}},isNullorUndefined:N,isEmpty:function(e){return!!N(e)||(r(e)?o(e):a(e)?u(e):A(e)?0==e:s(e)?T(e).length<=0:!e)},isAnyOf:function(e,t){var r=!1;return n(t,(function(t){if(e===t)return r=!0,!1})),r},forEach:function(e,t,o){if(r(e))n(e,t,o);else{if(!s(e))throw new TypeError("forEach can only be used on arrays or plain objects. The object given is "+typeof value);M(e,t,o)}},requestAnimationFrame:x,cancelAnimationFrame:D,versionCompare:function(e,t){var r,n,o,i=e,a=t,u=/(\.0)+[^\.]*$/;for(i=(i+"").replace(u,"").split("."),a=(a+"").replace(u,"").split("."),o=Math.min(i.length,a.length),r=0;r<o;r++)if(0!==(n=parseInt(i[r],10)-parseInt(a[r],10)))return n;return i.length-a.length},generateUUID:function(e){var t=(new Date).getTime().toString(),r=e.toString(),n=32-t.length-r.length,o=t+"A".repeat(n)+r;return[o.slice(0,8),o.slice(8,12),o.slice(12,16),o.slice(16,20),o.slice(20,32)].join("-")},Cookie:{get:function(e){var t=e+"=";if(document.cookie)for(var r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return unescape(o.substring(t.length,o.length))}},set:function(e,t,r){var n;if(0===r)n='expires=""';else{r||(r=0);var o=new Date;o.setTime(o.getTime()+24*r*60*60*1e3),n="expires="+o.toUTCString()}document.cookie=e+"="+t+"; "+n+"; path=/; domain=."+document.domain+"; secure"},check:function(){return!1!==navigator.cookieEnabled&&(document.cookie="testcookie=1",-1!=document.cookie.indexOf("testcookie"))}},Browser:{iOS:function(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].indexOf(navigator.platform)||(navigator.userAgent.includes("Mac")&&"ontouchend"in document)>-1}}}}));