Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sajari

Package Overview
Dependencies
Maintainers
3
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sajari - npm Package Compare versions

Comparing version 0.15.2 to 0.15.3

4

package.json
{
"name": "sajari",
"version": "0.15.2",
"version": "0.15.3",
"description": "JavaScript SDK for the Sajari search API",

@@ -41,3 +41,3 @@ "scripts": {

"dependencies": {
"sajari-website": "^0.7.4"
"sajari-website": "^0.7.5"
},

@@ -44,0 +44,0 @@ "devDependencies": {

@@ -1,2 +0,2 @@

module.exports=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="/",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return{text:t,weight:e||1}}function u(t,e,r){return[t,{metric:{field:e,type:r}}]}function a(t,e){return[t,{count:{field:e}}]}function s(t,e){return{name:t,filter:e}}function f(t,e){return[t,{bucket:{buckets:e}}]}function h(t){return t instanceof Array?{repeated:{values:t.map(String)}}:null===t?value={null:!0}:{single:String(t)}}function c(t){switch(t){case"=":return"EQUAL_TO";case"!=":return"NOT_EQUAL_TO";case">":return"GREATER_THAN";case">=":return"GREATER_THAN_OR_EQUAL_TO";case"<":return"LESS_THAN";case"<=":return"LESS_THAN_OR_EQUAL_TO";case"~":return"CONTAINS";case"!~":return"DOES_NOT_CONTAIN";case"^":return"HAS_PREFIX";case"$":return"HAS_SUFFIX";default:throw"invalid operator: "+t}}function l(t,e,r){return{field:{field:t,value:h(r),operator:c(e)}}}function p(t,e,r,n,i,o){return{geo:{field_lat:t,field_lng:e,lat:r,lng:n,radius:i,region:o}}}function d(t,e){return{combinator:{filters:t,operator:e}}}function g(t){return d(t,"ALL")}function y(t){return d(t,"ANY")}function v(t){return d(t,"ONE")}function w(t){return d(t,"NONE")}function m(t,e){return{field:{field:t,value:e}}}function E(t,e){return{score:{threshold:t,minCount:e}}}function A(t,e){return{filter:{filter:t,value:e}}}function _(t,e){return{point:t,value:e}}function b(t,e){return{interval:{field:t,points:e}}}function R(t,e){return{element:{field:t,elts:e}}}function S(t,e){return{text:{field:t,text:e}}}function T(t,e){return{field_boost:t,value:e}}function I(t,e,r){return{pipeline:{name:t},values:e,tracking:r}}function B(t){return"-"===t[0]?{field:t.slice(1),order:"DESC"}:{field:t,order:"ASC"}}function O(t){return{identifier:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Tracking=e.Query=e.FeatureQuery=e.IndexQuery=e.GEO_FIELD_BOOST_REGION_OUTSIDE=e.GEO_FIELD_BOOST_REGION_INSIDE=e.METRIC_TYPE_SUM=e.METRIC_TYPE_AVG=e.METRIC_TYPE_MIN=e.METRIC_TYPE_MAX=e.Client=void 0;var P=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},C=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();/**
module.exports=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="/",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return{text:t,weight:e||1}}function u(t,e,r){return[t,{metric:{field:e,type:r}}]}function a(t,e){return[t,{count:{field:e}}]}function s(t,e){return{name:t,filter:e}}function f(t,e){return[t,{bucket:{buckets:e}}]}function h(t){return t instanceof Array?{repeated:{values:t.map(String)}}:null===t?value={null:!0}:{single:String(t)}}function c(t){switch(t){case"=":return"EQUAL_TO";case"!=":return"NOT_EQUAL_TO";case">":return"GREATER_THAN";case">=":return"GREATER_THAN_OR_EQUAL_TO";case"<":return"LESS_THAN";case"<=":return"LESS_THAN_OR_EQUAL_TO";case"~":return"CONTAINS";case"!~":return"DOES_NOT_CONTAIN";case"^":return"HAS_PREFIX";case"$":return"HAS_SUFFIX";default:throw"invalid operator: "+t}}function l(t,e,r){return{field:{field:t,value:h(r),operator:c(e)}}}function p(t,e,r,n,i,o){return{geo:{field_lat:t,field_lng:e,lat:r,lng:n,radius:i,region:o}}}function d(t,e){return{combinator:{filters:t,operator:e}}}function g(t){return d(t,"ALL")}function y(t){return d(t,"ANY")}function v(t){return d(t,"ONE")}function w(t){return d(t,"NONE")}function m(t,e){return{field:{field:t,value:e}}}function E(t,e){return{score:{threshold:t,minCount:e}}}function A(t,e){return{filter:{filter:t,value:e}}}function _(t,e){return{point:t,value:e}}function b(t,e){return{interval:{field:t,points:e}}}function R(t,e){return{element:{field:t,elts:e}}}function S(t,e){return{text:{field:t,text:e}}}function T(t,e){return{field_boost:t,value:e}}function I(t,e,r){return{pipeline:{name:t},values:e,tracking:r}}function B(t){return"-"===t[0]?{field:t.slice(1),order:"DESC"}:{field:t,order:"ASC"}}function P(t){return{identifier:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Tracking=e.Query=e.FeatureQuery=e.IndexQuery=e.GEO_FIELD_BOOST_REGION_OUTSIDE=e.GEO_FIELD_BOOST_REGION_INSIDE=e.METRIC_TYPE_SUM=e.METRIC_TYPE_AVG=e.METRIC_TYPE_MIN=e.METRIC_TYPE_MAX=e.Client=void 0;var O=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();/**
* @fileOverview Exports the Sajari javascript api.

@@ -8,3 +8,3 @@ * @name sajari.js

*/
e.body=o,e.metricAggregate=u,e.countAggregate=a,e.bucket=s,e.bucketAggregate=f,e.fieldFilter=l,e.geoFilter=p,e.allFilters=g,e.anyFilters=y,e.oneOfFilters=v,e.noneOfFilters=w,e.fieldInstanceBoost=m,e.scoreInstanceBoost=E,e.filterFieldBoost=A,e.pointValue=_,e.intervalFieldBoost=b,e.elementFieldBoost=R,e.textFieldBoost=S,e.featureFieldBoost=T,e.pipeline=I,e.sort=B,e.transform=O;var U=r(6),k=n(U),x=(e.Client=function(){function t(e,r,n){i(this,t),this.p=e,this.c=r,this.e=n||"https://jsonapi.sajari.com"}return C(t,[{key:"search",value:function(t,e,r){return fetch(this.e+"/sajari.api.query.v1.Query/Search",{method:"POST",body:JSON.stringify({request:{searchRequest:t.q,tracking:{type:e.type,field:e.field,sequence:e.s++,query_id:e.i,data:e.data}},metadata:{project:[this.p],collection:[this.c],"user-agent":["sajari-sdk-js 0.15.2"]}})}).then(x(r)).catch(function(t){return r("Error during fetch: "+t.message,null)})}},{key:"searchPipeline",value:function(t,e,r,n){var i=JSON.parse(JSON.stringify(e));return Object.keys(i).forEach(function(t){i[t]=""+i[t]}),fetch(this.e+"/sajari.api.pipeline.v1.Query/Search",{method:"POST",body:JSON.stringify({request:{pipeline:{name:t},tracking:{type:r.type,field:r.field,sequence:r.s++,query_id:r.i,data:r.data},values:i},metadata:{project:[this.p],collection:[this.c],"user-agent":["sajari-sdk-js 0.15.2"]}})}).then(x(n)).catch(function(t){return n("Error during fetch: "+t.message,null)})}}]),t}(),function(t){return function(e){var r=e.clone();e.ok?e.json().then(function(e){var n=e.searchResponse.results;if(n)for(var i=0;i<n.length;i++){for(var o in n[i].values)n[i].values[o]=void 0!==n[i].values[o].single?n[i].values[o].single:n[i].values[o].repeated.values;e.tokens&&(n[i].tokens=e.tokens[i])}else e.searchResponse={results:[],time:e.searchResponse.time,totalResults:"0",reads:"0"};t(null,P({},r,{searchResponse:e}))}):e.text().then(function(e){return t(P({},r,{error:e}),null)})}}),M=(e.METRIC_TYPE_MAX="MAX",e.METRIC_TYPE_MIN="MIN",e.METRIC_TYPE_AVG="AVG",e.METRIC_TYPE_SUM="SUM",e.GEO_FIELD_BOOST_REGION_INSIDE="INSIDE",e.GEO_FIELD_BOOST_REGION_OUTSIDE="OUTSIDE",e.IndexQuery=function(){function t(){i(this,t)}return C(t,[{key:"body",value:function(t){this.body=t}},{key:"instanceBoosts",value:function(t){this.instance_boosts=t}},{key:"fieldBoosts",value:function(t){this.field_boosts=t}}]),t}(),e.FeatureQuery=function(){function t(){i(this,t)}return C(t,[{key:"fieldBoosts",value:function(t){this.field_boosts=t}}]),t}(),function(){function t(){i(this,t),this.q={limit:10}}return C(t,[{key:"filter",value:function(t){this.q.filter=t}},{key:"indexQuery",value:function(t){this.q.index_query=t}},{key:"featureQuery",value:function(t){this.q.feature_query=t}},{key:"offset",value:function(t){this.q.offset=t}},{key:"limit",value:function(t){this.q.limit=t}},{key:"fields",value:function(t){this.q.fields=t}},{key:"sort",value:function(t){this.q.sort=t}},{key:"aggregates",value:function(t){for(var e={},r=0;r<t.length;r++)e[t[r][0]]=t[r][1];this.q.aggregates=e}},{key:"transforms",value:function(t){this.q.transforms=t}}]),t}());e.Query=M;e.Tracking=function(){function t(){i(this,t),this.resetID(),this.data={};var e=new k.default,r=e.gaId;r&&this.setData("gaID",r);var n=e.visitorId;n&&this.setData("sjID",n)}return C(t,[{key:"resetID",value:function(){this.i="",this.s=0;for(var t=0;t<16;t++)this.i+="abcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(36*Math.random()))}},{key:"posNegTokens",value:function(t){this.type="POS_NEG",this.field=t}},{key:"clickTokens",value:function(t){this.type="CLICK",this.field=t}},{key:"setData",value:function(t,e){this.data[t]=e}}]),t}()},function(t,e,r){(function(t,n){/*!
e.body=o,e.metricAggregate=u,e.countAggregate=a,e.bucket=s,e.bucketAggregate=f,e.fieldFilter=l,e.geoFilter=p,e.allFilters=g,e.anyFilters=y,e.oneOfFilters=v,e.noneOfFilters=w,e.fieldInstanceBoost=m,e.scoreInstanceBoost=E,e.filterFieldBoost=A,e.pointValue=_,e.intervalFieldBoost=b,e.elementFieldBoost=R,e.textFieldBoost=S,e.featureFieldBoost=T,e.pipeline=I,e.sort=B,e.transform=P;var C=r(6),U=n(C),k=(e.Client=function(){function t(e,r,n){i(this,t),this.p=e,this.c=r,this.e=n||"https://jsonapi.sajari.com"}return O(t,[{key:"search",value:function(t,e,r){return fetch(this.e+"/sajari.api.query.v1.Query/Search",{method:"POST",body:JSON.stringify({request:{searchRequest:t.q,tracking:{type:e.type,field:e.field,sequence:e.s++,query_id:e.i,data:e.data}},metadata:{project:[this.p],collection:[this.c],"user-agent":["sajari-sdk-js 0.15.3"]}})}).then(k(r)).catch(function(t){return r("Error during fetch: "+t.message,null)})}},{key:"searchPipeline",value:function(t,e,r,n){var i=JSON.parse(JSON.stringify(e));return Object.keys(i).forEach(function(t){i[t]=""+i[t]}),fetch(this.e+"/sajari.api.pipeline.v1.Query/Search",{method:"POST",body:JSON.stringify({request:{pipeline:{name:t},tracking:{type:r.type,field:r.field,sequence:r.s++,query_id:r.i,data:r.data},values:i},metadata:{project:[this.p],collection:[this.c],"user-agent":["sajari-sdk-js 0.15.3"]}})}).then(k(n)).catch(function(t){return n("Error during fetch: "+t.message,null)})}}]),t}(),function(t){return function(e){e.ok?e.json().then(function(e){var r=e.searchResponse.results;if(r)for(var n=0;n<r.length;n++){for(var i in r[n].values)r[n].values[i]=void 0!==r[n].values[i].single?r[n].values[i].single:r[n].values[i].repeated.values;e.tokens&&(r[n].tokens=e.tokens[n])}else e.searchResponse={results:[],time:e.searchResponse.time,totalResults:"0",reads:"0"};t(null,{searchResponse:e})}):e.text().then(function(e){return t({error:e},null)})}}),x=(e.METRIC_TYPE_MAX="MAX",e.METRIC_TYPE_MIN="MIN",e.METRIC_TYPE_AVG="AVG",e.METRIC_TYPE_SUM="SUM",e.GEO_FIELD_BOOST_REGION_INSIDE="INSIDE",e.GEO_FIELD_BOOST_REGION_OUTSIDE="OUTSIDE",e.IndexQuery=function(){function t(){i(this,t)}return O(t,[{key:"body",value:function(t){this.body=t}},{key:"instanceBoosts",value:function(t){this.instance_boosts=t}},{key:"fieldBoosts",value:function(t){this.field_boosts=t}}]),t}(),e.FeatureQuery=function(){function t(){i(this,t)}return O(t,[{key:"fieldBoosts",value:function(t){this.field_boosts=t}}]),t}(),function(){function t(){i(this,t),this.q={limit:10}}return O(t,[{key:"filter",value:function(t){this.q.filter=t}},{key:"indexQuery",value:function(t){this.q.index_query=t}},{key:"featureQuery",value:function(t){this.q.feature_query=t}},{key:"offset",value:function(t){this.q.offset=t}},{key:"limit",value:function(t){this.q.limit=t}},{key:"fields",value:function(t){this.q.fields=t}},{key:"sort",value:function(t){this.q.sort=t}},{key:"aggregates",value:function(t){for(var e={},r=0;r<t.length;r++)e[t[r][0]]=t[r][1];this.q.aggregates=e}},{key:"transforms",value:function(t){this.q.transforms=t}}]),t}());e.Query=x;e.Tracking=function(){function t(){i(this,t),this.resetID(),this.data={};var e=new U.default,r=e.gaId;r&&this.setData("gaID",r);var n=e.visitorId;n&&this.setData("sjID",n)}return O(t,[{key:"resetID",value:function(){this.i="",this.s=0;for(var t=0;t<16;t++)this.i+="abcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(36*Math.random()))}},{key:"posNegTokens",value:function(t){this.type="POS_NEG",this.field=t}},{key:"clickTokens",value:function(t){this.type="CLICK",this.field=t}},{key:"setData",value:function(t,e){this.data[t]=e}}]),t}()},function(t,e,r){(function(t,n){/*!
* The buffer module from node.js, for the browser.

@@ -15,3 +15,3 @@ *

*/
"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,r){if(o()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return a(this,e,r,n)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,r,n):"string"==typeof e?c(t,e,r):d(t,e)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e,r,n){return s(e),e<=0?u(t,e):void 0!==r?"string"==typeof n?u(t,e).fill(r,n):u(t,e).fill(r):u(t,e)}function h(e,r){if(s(r),e=u(e,r<0?0:0|g(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function c(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|v(r,n);e=u(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=e.length<0?0:0|g(e.length);t=u(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|g(r.length);return e=u(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||Z(r.length)?u(e,0):l(e,r);if("Buffer"===r.type&&$(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function y(e){return+e!=e&&(e=0),t.alloc(+e)}function v(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(i)return J(e).length;r=(""+r).toLowerCase(),i=!0}}function w(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return U(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function E(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:A(e,r,n,i,o);if("number"==typeof r)return r&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):A(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function A(t,e,r,n,i){function o(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}var u=1,a=t.length,s=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,a/=2,s/=2,r/=2}var f;if(i){var h=-1;for(f=r;f<a;f++)if(o(t,f)===o(e,h===-1?0:f-h)){if(h===-1&&(h=f),f-h+1===s)return h*u}else h!==-1&&(f-=f-h),h=-1}else for(r+s>a&&(r=a-s),f=r;f>=0;f--){for(var c=!0,l=0;l<s;l++)if(o(t,f+l)!==o(e,l)){c=!1;break}if(c)return f}return-1}function _(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var a=parseInt(e.substr(2*u,2),16);if(isNaN(a))return u;t[r+u]=a}return u}function b(t,e,r,n){return H(J(e,t.length-r),t,r,n)}function R(t,e,r,n){return H(z(e),t,r,n)}function S(t,e,r,n){return R(t,e,r,n)}function T(t,e,r,n){return H(X(e),t,r,n)}function I(t,e,r,n){return H(V(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],u=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=r){var s,f,h,c;switch(a){case 1:o<128&&(u=o);break;case 2:s=t[i+1],128===(192&s)&&(c=(31&o)<<6|63&s,c>127&&(u=c));break;case 3:s=t[i+1],f=t[i+2],128===(192&s)&&128===(192&f)&&(c=(15&o)<<12|(63&s)<<6|63&f,c>2047&&(c<55296||c>57343)&&(u=c));break;case 4:s=t[i+1],f=t[i+2],h=t[i+3],128===(192&s)&&128===(192&f)&&128===(192&h)&&(c=(15&o)<<18|(63&s)<<12|(63&f)<<6|63&h,c>65535&&c<1114112&&(u=c))}}null===u?(u=65533,a=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=a}return P(n)}function P(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function U(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=Q(t[o]);return i}function x(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,r,n,i,o,u){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<u)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function Y(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(t,e,r,n,i){return i||L(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,i){return i||L(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(t,e,r,n,52,8),r+8}function q(t){if(t=G(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function G(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Q(t){return t<16?"0"+t.toString(16):t.toString(16)}function J(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],u=0;u<n;++u){if(r=t.charCodeAt(u),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function V(t,e){for(var r,n,i,o=[],u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function X(t){return K.toByteArray(q(t))}function H(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Z(t){return t!==t}var K=r(2),W=r(3),$=r(4);e.Buffer=t,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return a(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return f(null,t,e,r)},t.allocUnsafe=function(t){return h(null,t)},t.allocUnsafeSlow=function(t){return h(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,u=Math.min(n,i);o<u;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var u=e[n];if(!t.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},t.byteLength=v,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):w.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var u=o-i,a=n-r,s=Math.min(u,a),f=this.slice(i,o),h=e.slice(r,n),c=0;c<s;++c)if(f[c]!==h[c]){u=f[c],a=h[c];break}return u<a?-1:a<u?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return E(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return E(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return R(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,void 0);for(var u=0;u<o;++u)i[u]=this[u+e]}return i},t.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),W.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),W.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),W.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),W.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;D(this,t,e,r,i,0)}var o=1,u=0;for(this[e]=255&t;++u<r&&(o*=256);)this[e+u]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;D(this,t,e,r,i,0)}var o=r-1,u=1;for(this[e+o]=255&t;--o>=0&&(u*=256);)this[e+o]=t/u&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):Y(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):Y(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):N(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);D(this,t,e,r,i-1,-i)}var o=0,u=1,a=0;for(this[e]=255&t;++o<r&&(u*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/u>>0)-a&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);D(this,t,e,r,i-1,-i)}var o=r-1,u=1,a=0;for(this[e+o]=255&t;--o>=0&&(u*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/u>>0)-a&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):Y(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):Y(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):N(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,u=i-n;if(this===e&&n<r&&r<i)for(o=u-1;o>=0;--o)e[o+r]=this[o+n];else if(u<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<u;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+u),r);return u},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var u;if("number"==typeof e)for(u=r;u<n;++u)this[u]=e;else{var a=t.isBuffer(e)?e:J(new t(e,i).toString()),s=a.length;for(u=0;u<n-r;++u)this[u+r]=a[u%s]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(1).Buffer,function(){return this}())},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function i(t){var e,n,i,o,u,a,s=t.length;u=r(t),a=new h(3*s/4-u),i=u>0?s-4:s;var c=0;for(e=0,n=0;e<i;e+=4,n+=3)o=f[t.charCodeAt(e)]<<18|f[t.charCodeAt(e+1)]<<12|f[t.charCodeAt(e+2)]<<6|f[t.charCodeAt(e+3)],a[c++]=o>>16&255,a[c++]=o>>8&255,a[c++]=255&o;return 2===u?(o=f[t.charCodeAt(e)]<<2|f[t.charCodeAt(e+1)]>>4,a[c++]=255&o):1===u&&(o=f[t.charCodeAt(e)]<<10|f[t.charCodeAt(e+1)]<<4|f[t.charCodeAt(e+2)]>>2,a[c++]=o>>8&255,a[c++]=255&o),a}function o(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function u(t,e,r){for(var n,i=[],u=e;u<r;u+=3)n=(t[u]<<16)+(t[u+1]<<8)+t[u+2],i.push(o(n));return i.join("")}function a(t){for(var e,r=t.length,n=r%3,i="",o=[],a=16383,f=0,h=r-n;f<h;f+=a)o.push(u(t,f,f+a>h?h:f+a));return 1===n?(e=t[r-1],i+=s[e>>2],i+=s[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=s[e>>10],i+=s[e>>4&63],i+=s[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=a;for(var s=[],f=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=c.length;l<p;++l)s[l]=c[l],f[c.charCodeAt(l)]=l;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,u,a=8*i-n-1,s=(1<<a)-1,f=s>>1,h=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=l,h-=8);for(u=o&(1<<-h)-1,o>>=-h,h+=n;h>0;u=256*u+t[e+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===s)return u?NaN:(p?-1:1)*(1/0);u+=Math.pow(2,n),o-=f}return(p?-1:1)*u*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var u,a,s,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,u=h):(u=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-u))<1&&(u--,s*=2),e+=u+c>=1?l/s:l*Math.pow(2,1-c),e*s>=2&&(u++,s/=2),u+c>=h?(a=0,u=h):u+c>=1?(a=(e*s-1)*Math.pow(2,i),u+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(u=u<<i|a,f+=i;f>0;t[r+p]=255&u,p+=d,u/=256,f-=8);t[r+p-d]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){!function(e){"use strict";var n,i=e.Base64,o="2.1.9";if("undefined"!=typeof t&&t.exports)try{n=r(1).Buffer}catch(t){}var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(t){for(var e={},r=0,n=t.length;r<n;r++)e[t.charAt(r)]=r;return e}(u),s=String.fromCharCode,f=function(t){if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?s(192|e>>>6)+s(128|63&e):s(224|e>>>12&15)+s(128|e>>>6&63)+s(128|63&e)}var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return s(240|e>>>18&7)+s(128|e>>>12&63)+s(128|e>>>6&63)+s(128|63&e)},h=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,c=function(t){return t.replace(h,f)},l=function(t){var e=[0,2,1][t.length%3],r=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0),n=[u.charAt(r>>>18),u.charAt(r>>>12&63),e>=2?"=":u.charAt(r>>>6&63),e>=1?"=":u.charAt(63&r)];return n.join("")},p=e.btoa?function(t){return e.btoa(t)}:function(t){return t.replace(/[\s\S]{1,3}/g,l)},d=n?function(t){return(t.constructor===n.constructor?t:new n(t)).toString("base64")}:function(t){return p(c(t))},g=function(t,e){return e?d(String(t)).replace(/[+\/]/g,function(t){return"+"==t?"-":"_"}).replace(/=/g,""):d(String(t))},y=function(t){return g(t,!0)},v=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),w=function(t){switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return s((r>>>10)+55296)+s((1023&r)+56320);case 3:return s((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return s((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},m=function(t){return t.replace(v,w)},E=function(t){var e=t.length,r=e%4,n=(e>0?a[t.charAt(0)]<<18:0)|(e>1?a[t.charAt(1)]<<12:0)|(e>2?a[t.charAt(2)]<<6:0)|(e>3?a[t.charAt(3)]:0),i=[s(n>>>16),s(n>>>8&255),s(255&n)];return i.length-=[0,0,2,1][r],i.join("")},A=e.atob?function(t){return e.atob(t)}:function(t){return t.replace(/[\s\S]{1,4}/g,E)},_=n?function(t){return(t.constructor===n.constructor?t:new n(t,"base64")).toString()}:function(t){return m(A(t))},b=function(t){return _(String(t).replace(/[-_]/g,function(t){return"-"==t?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},R=function(){var t=e.Base64;return e.Base64=i,t};if(e.Base64={VERSION:o,atob:A,btoa:p,fromBase64:b,toBase64:g,utob:c,encode:g,encodeURI:y,btou:m,decode:b,noConflict:R},"function"==typeof Object.defineProperty){var S=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};e.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",S(function(){return b(this)})),Object.defineProperty(String.prototype,"toBase64",S(function(t){return g(this,t)})),Object.defineProperty(String.prototype,"toBase64URI",S(function(){return g(this,!0)}))}}e.Meteor&&(Base64=e.Base64)}(this)},function(t,e,r){function n(t){t=t||{};for(var e in t)this[e]=t[e];void 0===t.data&&(this.data={meta:{},weighted:[]}),void 0===this.data.meta&&(this.data.meta={}),void 0===this.data.weighted&&(this.data.weighted=[]),this.gaId=i(),void 0===this.visitorId&&(this.visitorId=c.get(y.cname),void 0===this.visitorId&&(this.visitorId=(new Date).getTime()+"."+Math.floor(1e6*Math.random()))),this.sequence=o(),this.load()}function i(){var t="",e=c.get("_ga");if(void 0!==e){var r=e.split(".");r.length>2&&(t=r[2])}return t}function o(){var t=c.get(y.sname);return void 0===t&&(t=0),t++,c.set(y.sname,t,{path:"/",domain:y.domain}),t}function u(t,e){if("undefined"!=typeof Storage){var r=d.encode(e);return localStorage.setItem(t,r),!0}}function a(t){if("undefined"!=typeof Storage){var e=localStorage.getItem(t);if(e)return d.decode(e)}}function s(t,e){if("undefined"!=typeof Storage){var r=d.encode(e);return sessionStorage.setItem(t,r),!0}}function f(t){if("undefined"!=typeof Storage){var e=sessionStorage.getItem(t);if(e)return d.decode(e)}}function h(t){if("undefined"!=typeof Storage){var e=sessionStorage.getItem(t);if(e)return JSON.parse(e)}}var c=r(7),l=r(8),p=r(9),d=new l,g=r(10),y={cname:"sjID",pname:"sjPR",ename:"sjPE",sname:"sjSE",clicked:"sjCL",expires:365,maxStrings:10,maxURLs:10,weight:.05,session:!1,domain:window.location.hostname.toLowerCase().replace(/^www(.)/,"")};n.prototype={load:function(){var t=h(y.pname);t&&(this.data.meta=t,this.save());var e;return y.session?(e=f(y.ename),void(e&&(this.data=e))):(e=a(y.ename),void(e&&(this.data=e)))},save:function(){return y.session?void s(y.ename,this.data):void u(y.ename,this.data)},option:function(t,e){t&&e&&(y[t]=e)},set:function(t,e){if(e){for(var r in e)this.data.meta[r]=e[r];this.save()}t&&(this.data.weighted.push(t),this.data.weighted=p(this.data.weighted),this.data.weighted.length>this.maxStrings&&this.data.weighted.shift(),this.save())},get:function(){return this.data},addClickedUrl:function(t){var e=t.split("?"),r=f(y.clicked);r||(r=[]);for(var n=0;n<r.length;n++)if(r[n]===e[0])return;r.push(e[0]),r.length>this.maxURLs&&r.shift(),s(y.clicked,r)},getClickedUrls:function(t){var e=f(y.clicked);return e?e.slice(Math.max(e.length-t,1)):[]},toArgs:function(t){void 0===t&&(t={});for(var e in this.data.meta){var r=this.data.meta[e];g(r)?r=r.join(";"):"object"==typeof r&&(r=JSON.stringify(r)),t["meta["+e+"]"]=r}for(var n=this.data.weighted.length,i=0;i<n;i++){var o=((i+1)/(n/.05)).toFixed(4);t["q["+o+"]"]=this.data.weighted[i]}return t.mimetype="text/plain+weighted",t},setVisitorId:function(t){return void 0!==t&&(this.visitorId=t+"",c.set(y.cname,this.visitorId,{path:"/",expires:y.expires,domain:y.domain})),this.visitorId}},t.exports=n},function(t,e){/*!
"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,r){if(o()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return a(this,e,r,n)}function a(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,r,n):"string"==typeof e?c(t,e,r):d(t,e)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e,r,n){return s(e),e<=0?u(t,e):void 0!==r?"string"==typeof n?u(t,e).fill(r,n):u(t,e).fill(r):u(t,e)}function h(e,r){if(s(r),e=u(e,r<0?0:0|g(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function c(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|v(r,n);e=u(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function l(t,e){var r=e.length<0?0:0|g(e.length);t=u(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=l(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|g(r.length);return e=u(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||Z(r.length)?u(e,0):l(e,r);if("Buffer"===r.type&&$(r.data))return l(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function y(e){return+e!=e&&(e=0),t.alloc(+e)}function v(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(i)return J(e).length;r=(""+r).toLowerCase(),i=!0}}function w(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return P(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return U(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function E(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:A(e,r,n,i,o);if("number"==typeof r)return r&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):A(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function A(t,e,r,n,i){function o(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}var u=1,a=t.length,s=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,a/=2,s/=2,r/=2}var f;if(i){var h=-1;for(f=r;f<a;f++)if(o(t,f)===o(e,h===-1?0:f-h)){if(h===-1&&(h=f),f-h+1===s)return h*u}else h!==-1&&(f-=f-h),h=-1}else for(r+s>a&&(r=a-s),f=r;f>=0;f--){for(var c=!0,l=0;l<s;l++)if(o(t,f+l)!==o(e,l)){c=!1;break}if(c)return f}return-1}function _(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var a=parseInt(e.substr(2*u,2),16);if(isNaN(a))return u;t[r+u]=a}return u}function b(t,e,r,n){return H(J(e,t.length-r),t,r,n)}function R(t,e,r,n){return H(z(e),t,r,n)}function S(t,e,r,n){return R(t,e,r,n)}function T(t,e,r,n){return H(X(e),t,r,n)}function I(t,e,r,n){return H(V(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function P(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],u=null,a=o>239?4:o>223?3:o>191?2:1;if(i+a<=r){var s,f,h,c;switch(a){case 1:o<128&&(u=o);break;case 2:s=t[i+1],128===(192&s)&&(c=(31&o)<<6|63&s,c>127&&(u=c));break;case 3:s=t[i+1],f=t[i+2],128===(192&s)&&128===(192&f)&&(c=(15&o)<<12|(63&s)<<6|63&f,c>2047&&(c<55296||c>57343)&&(u=c));break;case 4:s=t[i+1],f=t[i+2],h=t[i+3],128===(192&s)&&128===(192&f)&&128===(192&h)&&(c=(15&o)<<18|(63&s)<<12|(63&f)<<6|63&h,c>65535&&c<1114112&&(u=c))}}null===u?(u=65533,a=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=a}return O(n)}function O(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function U(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=Q(t[o]);return i}function x(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,r,n,i,o,u){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<u)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function Y(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(t,e,r,n,i){return i||L(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,i){return i||L(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(t,e,r,n,52,8),r+8}function q(t){if(t=G(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function G(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Q(t){return t<16?"0"+t.toString(16):t.toString(16)}function J(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],u=0;u<n;++u){if(r=t.charCodeAt(u),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function V(t,e){for(var r,n,i,o=[],u=0;u<t.length&&!((e-=2)<0);++u)r=t.charCodeAt(u),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function X(t){return K.toByteArray(q(t))}function H(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Z(t){return t!==t}var K=r(2),W=r(3),$=r(4);e.Buffer=t,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return a(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return f(null,t,e,r)},t.allocUnsafe=function(t){return h(null,t)},t.allocUnsafeSlow=function(t){return h(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,u=Math.min(n,i);o<u;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var u=e[n];if(!t.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},t.byteLength=v,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):w.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var u=o-i,a=n-r,s=Math.min(u,a),f=this.slice(i,o),h=e.slice(r,n),c=0;c<s;++c)if(f[c]!==h[c]){u=f[c],a=h[c];break}return u<a?-1:a<u?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return E(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return E(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return R(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,void 0);for(var u=0;u<o;++u)i[u]=this[u+e]}return i},t.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),W.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),W.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),W.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),W.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;D(this,t,e,r,i,0)}var o=1,u=0;for(this[e]=255&t;++u<r&&(o*=256);)this[e+u]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;D(this,t,e,r,i,0)}var o=r-1,u=1;for(this[e+o]=255&t;--o>=0&&(u*=256);)this[e+o]=t/u&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):Y(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):Y(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):N(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);D(this,t,e,r,i-1,-i)}var o=0,u=1,a=0;for(this[e]=255&t;++o<r&&(u*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/u>>0)-a&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);D(this,t,e,r,i-1,-i)}var o=r-1,u=1,a=0;for(this[e+o]=255&t;--o>=0&&(u*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/u>>0)-a&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):Y(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):Y(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):N(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r|=0,n||D(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):N(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,u=i-n;if(this===e&&n<r&&r<i)for(o=u-1;o>=0;--o)e[o+r]=this[o+n];else if(u<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<u;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+u),r);return u},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var u;if("number"==typeof e)for(u=r;u<n;++u)this[u]=e;else{var a=t.isBuffer(e)?e:J(new t(e,i).toString()),s=a.length;for(u=0;u<n-r;++u)this[u+r]=a[u%s]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(1).Buffer,function(){return this}())},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function i(t){var e,n,i,o,u,a,s=t.length;u=r(t),a=new h(3*s/4-u),i=u>0?s-4:s;var c=0;for(e=0,n=0;e<i;e+=4,n+=3)o=f[t.charCodeAt(e)]<<18|f[t.charCodeAt(e+1)]<<12|f[t.charCodeAt(e+2)]<<6|f[t.charCodeAt(e+3)],a[c++]=o>>16&255,a[c++]=o>>8&255,a[c++]=255&o;return 2===u?(o=f[t.charCodeAt(e)]<<2|f[t.charCodeAt(e+1)]>>4,a[c++]=255&o):1===u&&(o=f[t.charCodeAt(e)]<<10|f[t.charCodeAt(e+1)]<<4|f[t.charCodeAt(e+2)]>>2,a[c++]=o>>8&255,a[c++]=255&o),a}function o(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function u(t,e,r){for(var n,i=[],u=e;u<r;u+=3)n=(t[u]<<16)+(t[u+1]<<8)+t[u+2],i.push(o(n));return i.join("")}function a(t){for(var e,r=t.length,n=r%3,i="",o=[],a=16383,f=0,h=r-n;f<h;f+=a)o.push(u(t,f,f+a>h?h:f+a));return 1===n?(e=t[r-1],i+=s[e>>2],i+=s[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=s[e>>10],i+=s[e>>4&63],i+=s[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=a;for(var s=[],f=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=c.length;l<p;++l)s[l]=c[l],f[c.charCodeAt(l)]=l;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,u,a=8*i-n-1,s=(1<<a)-1,f=s>>1,h=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=l,h-=8);for(u=o&(1<<-h)-1,o>>=-h,h+=n;h>0;u=256*u+t[e+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===s)return u?NaN:(p?-1:1)*(1/0);u+=Math.pow(2,n),o-=f}return(p?-1:1)*u*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var u,a,s,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,u=h):(u=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-u))<1&&(u--,s*=2),e+=u+c>=1?l/s:l*Math.pow(2,1-c),e*s>=2&&(u++,s/=2),u+c>=h?(a=0,u=h):u+c>=1?(a=(e*s-1)*Math.pow(2,i),u+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(u=u<<i|a,f+=i;f>0;t[r+p]=255&u,p+=d,u/=256,f-=8);t[r+p-d]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){!function(e){"use strict";var n,i=e.Base64,o="2.1.9";if("undefined"!=typeof t&&t.exports)try{n=r(1).Buffer}catch(t){}var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(t){for(var e={},r=0,n=t.length;r<n;r++)e[t.charAt(r)]=r;return e}(u),s=String.fromCharCode,f=function(t){if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?s(192|e>>>6)+s(128|63&e):s(224|e>>>12&15)+s(128|e>>>6&63)+s(128|63&e)}var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return s(240|e>>>18&7)+s(128|e>>>12&63)+s(128|e>>>6&63)+s(128|63&e)},h=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,c=function(t){return t.replace(h,f)},l=function(t){var e=[0,2,1][t.length%3],r=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0),n=[u.charAt(r>>>18),u.charAt(r>>>12&63),e>=2?"=":u.charAt(r>>>6&63),e>=1?"=":u.charAt(63&r)];return n.join("")},p=e.btoa?function(t){return e.btoa(t)}:function(t){return t.replace(/[\s\S]{1,3}/g,l)},d=n?function(t){return(t.constructor===n.constructor?t:new n(t)).toString("base64")}:function(t){return p(c(t))},g=function(t,e){return e?d(String(t)).replace(/[+\/]/g,function(t){return"+"==t?"-":"_"}).replace(/=/g,""):d(String(t))},y=function(t){return g(t,!0)},v=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),w=function(t){switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return s((r>>>10)+55296)+s((1023&r)+56320);case 3:return s((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return s((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},m=function(t){return t.replace(v,w)},E=function(t){var e=t.length,r=e%4,n=(e>0?a[t.charAt(0)]<<18:0)|(e>1?a[t.charAt(1)]<<12:0)|(e>2?a[t.charAt(2)]<<6:0)|(e>3?a[t.charAt(3)]:0),i=[s(n>>>16),s(n>>>8&255),s(255&n)];return i.length-=[0,0,2,1][r],i.join("")},A=e.atob?function(t){return e.atob(t)}:function(t){return t.replace(/[\s\S]{1,4}/g,E)},_=n?function(t){return(t.constructor===n.constructor?t:new n(t,"base64")).toString()}:function(t){return m(A(t))},b=function(t){return _(String(t).replace(/[-_]/g,function(t){return"-"==t?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},R=function(){var t=e.Base64;return e.Base64=i,t};if(e.Base64={VERSION:o,atob:A,btoa:p,fromBase64:b,toBase64:g,utob:c,encode:g,encodeURI:y,btou:m,decode:b,noConflict:R},"function"==typeof Object.defineProperty){var S=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};e.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",S(function(){return b(this)})),Object.defineProperty(String.prototype,"toBase64",S(function(t){return g(this,t)})),Object.defineProperty(String.prototype,"toBase64URI",S(function(){return g(this,!0)}))}}e.Meteor&&(Base64=e.Base64)}(this)},function(t,e,r){function n(t){t=t||{};for(var e in t)this[e]=t[e];void 0===t.data&&(this.data={meta:{},weighted:[]}),void 0===this.data.meta&&(this.data.meta={}),void 0===this.data.weighted&&(this.data.weighted=[]),this.gaId=i(),void 0===this.visitorId&&(this.visitorId=c.get(y.cname),void 0===this.visitorId&&(this.visitorId=(new Date).getTime()+"."+Math.floor(1e6*Math.random()))),this.sequence=o(),this.load()}function i(){var t="",e=c.get("_ga");if(void 0!==e){var r=e.split(".");r.length>2&&(t=r[2])}return t}function o(){var t=c.get(y.sname);return void 0===t&&(t=0),t++,c.set(y.sname,t,{path:"/",domain:y.domain}),t}function u(t,e){if("undefined"!=typeof Storage){var r=d.encode(e);return localStorage.setItem(t,r),!0}}function a(t){if("undefined"!=typeof Storage){var e=localStorage.getItem(t);if(e)return d.decode(e)}}function s(t,e){if("undefined"!=typeof Storage){var r=d.encode(e);return sessionStorage.setItem(t,r),!0}}function f(t){if("undefined"!=typeof Storage){var e=sessionStorage.getItem(t);if(e)return d.decode(e)}}function h(t){if("undefined"!=typeof Storage){var e=sessionStorage.getItem(t);if(e)return JSON.parse(e)}}var c=r(7),l=r(8),p=r(9),d=new l,g=r(10),y={cname:"sjID",pname:"sjPR",ename:"sjPE",sname:"sjSE",clicked:"sjCL",expires:365,maxStrings:10,maxURLs:10,weight:.05,session:!1,domain:window.location.hostname.toLowerCase().replace(/^www(.)/,"")};n.prototype={load:function(){var t=h(y.pname);t&&(this.data.meta=t,this.save());var e;return y.session?(e=f(y.ename),void(e&&(this.data=e))):(e=a(y.ename),void(e&&(this.data=e)))},save:function(){return y.session?void s(y.ename,this.data):void u(y.ename,this.data)},option:function(t,e){t&&e&&(y[t]=e)},set:function(t,e){if(e){for(var r in e)this.data.meta[r]=e[r];this.save()}t&&(this.data.weighted.push(t),this.data.weighted=p(this.data.weighted),this.data.weighted.length>this.maxStrings&&this.data.weighted.shift(),this.save())},get:function(){return this.data},addClickedUrl:function(t){var e=t.split("?"),r=f(y.clicked);r||(r=[]);for(var n=0;n<r.length;n++)if(r[n]===e[0])return;r.push(e[0]),r.length>this.maxURLs&&r.shift(),s(y.clicked,r)},getClickedUrls:function(t){var e=f(y.clicked);return e?e.slice(Math.max(e.length-t,1)):[]},toArgs:function(t){void 0===t&&(t={});for(var e in this.data.meta){var r=this.data.meta[e];g(r)?r=r.join(";"):"object"==typeof r&&(r=JSON.stringify(r)),t["meta["+e+"]"]=r}for(var n=this.data.weighted.length,i=0;i<n;i++){var o=((i+1)/(n/.05)).toFixed(4);t["q["+o+"]"]=this.data.weighted[i]}return t.mimetype="text/plain+weighted",t},setVisitorId:function(t){return void 0!==t&&(this.visitorId=t+"",c.set(y.cname,this.visitorId,{path:"/",expires:y.expires,domain:y.domain})),this.visitorId}},t.exports=n},function(t,e){/*!
* JavaScript Cookie v2.1.0

@@ -18,0 +18,0 @@ * https://github.com/js-cookie/js-cookie

@@ -102,3 +102,2 @@ /**

const handleSearchResponse = callback => res => {
const headers = res.clone();
if (res.ok) {

@@ -129,6 +128,6 @@ res.json().then(json => {

}
callback(null, { ...headers, searchResponse: json });
callback(null, { searchResponse: json });
});
} else {
res.text().then(errMsg => callback({ ...headers, error: errMsg }, null));
res.text().then(errMsg => callback({ error: errMsg }, null));
}

@@ -135,0 +134,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc