diff --git a/dist/dd-manager.js b/dist/dd-manager.js index 7b2c12b..7791ee2 100644 --- a/dist/dd-manager.js +++ b/dist/dd-manager.js @@ -6542,7 +6542,7 @@ function _prepareGlobals() { var ddManager = { - VERSION: '1.0.2', + VERSION: '1.0.3', setAvailableIntegrations: function setAvailableIntegrations(availableIntegrations) { _availableIntegrations = availableIntegrations; @@ -7652,28 +7652,6 @@ function _inherits(subClass, superClass) { }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } -function enhancedEcommerceTrackProduct(product, quantity) { - var gaProduct = { - id: product.id || product.skuCode, - name: product.name, - category: product.category, - quantity: quantity, - price: product.unitSalePrice || product.unitPrice, - brand: product.brand || product.manufacturer, - variant: product.variant, - currency: product.currency - }; - // append coupon if it set - // https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-transactions - if (product.voucher) gaProduct.coupon = product.voucher; - window.ga('ec:addProduct', gaProduct); -} - -function enhancedEcommerceProductAction(event, action, data) { - enhancedEcommerceTrackProduct(event.product, event.quantity); - window.ga('ec:setAction', action, data || {}); -} - function getTransactionVoucher(transaction) { var voucher = undefined; if (Array.isArray(transaction.vouchers)) { @@ -7735,7 +7713,8 @@ var GoogleAnalytics = (function (_Integration) { defaultCurrency: 'USD', metrics: {}, dimensions: {}, - contentGroupings: {} + contentGroupings: {}, + namespace: undefined }, options); var _this = _possibleConstructorReturn(this, _Integration.call(this, digitalData, optionsWithDefaults)); @@ -7758,12 +7737,14 @@ var GoogleAnalytics = (function (_Integration) { this.pageCalled = false; // setup the tracker globals - window.GoogleAnalyticsObject = 'ga'; - window.ga = window.ga || function ga() { - window.ga.q = window.ga.q || []; - window.ga.q.push(arguments); - }; - window.ga.l = new Date().getTime(); + if (!window.ga) { + window.GoogleAnalyticsObject = 'ga'; + window.ga = window.ga || function ga() { + window.ga.q = window.ga.q || []; + window.ga.q.push(arguments); + }; + window.ga.l = new Date().getTime(); + } if (window.location.hostname === 'localhost') { this.setOption('domain', 'none'); @@ -7773,31 +7754,32 @@ var GoogleAnalytics = (function (_Integration) { // Fall back on default to protect against empty string cookieDomain: this.getOption('domain'), siteSpeedSampleRate: this.getOption('siteSpeedSampleRate'), - allowLinker: true + allowLinker: true, + name: this.getOption('namespace') }); // display advertising if (this.getOption('doubleClick')) { - window.ga('require', 'displayfeatures'); + this.ga('require', 'displayfeatures'); } // https://support.google.com/analytics/answer/2558867?hl=en if (this.getOption('enhancedLinkAttribution')) { - window.ga('require', 'linkid', 'linkid.js'); + this.ga('require', 'linkid', 'linkid.js'); } // send global id var userId = this.get('user.id'); if (this.getOption('sendUserId') && userId) { - window.ga('set', 'userId', userId); + this.ga('set', 'userId', userId); } // anonymize after initializing, otherwise a warning is shown // in google analytics debugger - if (this.getOption('anonymizeIp')) window.ga('set', 'anonymizeIp', true); + if (this.getOption('anonymizeIp')) this.ga('set', 'anonymizeIp', true); // custom dimensions & metrics var custom = this.getCustomDimensions(); - if ((0, _size2['default'])(custom)) window.ga('set', custom); + if ((0, _size2['default'])(custom)) this.ga('set', custom); this.load(this.ready); } else { @@ -7805,6 +7787,17 @@ var GoogleAnalytics = (function (_Integration) { } }; + GoogleAnalytics.prototype.ga = function ga() { + if (!this.getOption('namespace')) { + window.ga.apply(window, arguments); + } else { + if (arguments[0]) { + arguments[0] = this.getOption('namespace') + '.' + arguments[0]; + } + window.ga.apply(window, arguments); + } + }; + GoogleAnalytics.prototype.isLoaded = function isLoaded() { return !!window.gaplugins; }; @@ -7832,12 +7825,12 @@ var GoogleAnalytics = (function (_Integration) { GoogleAnalytics.prototype.loadEnhancedEcommerce = function loadEnhancedEcommerce(currency) { if (!this.enhancedEcommerceLoaded) { - window.ga('require', 'ec'); + this.ga('require', 'ec'); this.enhancedEcommerceLoaded = true; } // Ensure we set currency for every hit - window.ga('set', '&cu', currency || this.getOption('defaultCurrency')); + this.ga('set', '&cu', currency || this.getOption('defaultCurrency')); }; GoogleAnalytics.prototype.pushEnhancedEcommerce = function pushEnhancedEcommerce(event) { @@ -7867,7 +7860,7 @@ var GoogleAnalytics = (function (_Integration) { } } - window.ga.apply(window, cleanedArgs); + this.ga.apply(this, cleanedArgs); }; GoogleAnalytics.prototype.trackEvent = function trackEvent(event) { @@ -7936,7 +7929,7 @@ var GoogleAnalytics = (function (_Integration) { if (campaign.term) pageview.campaignKeyword = campaign.term; // set - window.ga('set', { + this.ga('set', { page: pagePath, title: pageTitle }); @@ -7946,7 +7939,7 @@ var GoogleAnalytics = (function (_Integration) { } // send - window.ga('send', 'pageview', pageview); + this.ga('send', 'pageview', pageview); this.pageCalled = true; }; @@ -7975,7 +7968,7 @@ var GoogleAnalytics = (function (_Integration) { continue; } this.loadEnhancedEcommerce(product.currency); - window.ga('ec:addImpression', { + this.ga('ec:addImpression', { id: product.id || product.skuCode, name: product.name, list: product.listName, @@ -7994,7 +7987,7 @@ var GoogleAnalytics = (function (_Integration) { GoogleAnalytics.prototype.onClickedProduct = function onClickedProduct(event) { var product = event.product; this.loadEnhancedEcommerce(product.currency); - enhancedEcommerceProductAction(event, 'click', { + this.enhancedEcommerceProductAction(event, 'click', { list: product.listName }); this.pushEnhancedEcommerce(event); @@ -8003,37 +7996,39 @@ var GoogleAnalytics = (function (_Integration) { GoogleAnalytics.prototype.onViewedProductDetail = function onViewedProductDetail(event) { var product = event.product; this.loadEnhancedEcommerce(product.currency); - enhancedEcommerceProductAction(event, 'detail'); + this.enhancedEcommerceProductAction(event, 'detail'); this.pushEnhancedEcommerce(event); }; GoogleAnalytics.prototype.onAddedProduct = function onAddedProduct(event) { var product = event.product; this.loadEnhancedEcommerce(product.currency); - enhancedEcommerceProductAction(event, 'add'); + this.enhancedEcommerceProductAction(event, 'add'); this.pushEnhancedEcommerce(event); }; GoogleAnalytics.prototype.onRemovedProduct = function onRemovedProduct(event) { var product = event.product; this.loadEnhancedEcommerce(product.currency); - enhancedEcommerceProductAction(event, 'remove'); + this.enhancedEcommerceProductAction(event, 'remove'); this.pushEnhancedEcommerce(event); }; GoogleAnalytics.prototype.onCompletedTransaction = function onCompletedTransaction(event) { + var _this2 = this; + var transaction = event.transaction; // orderId is required. if (!transaction || !transaction.orderId) return; // require ecommerce if (!this.ecommerce) { - window.ga('require', 'ecommerce'); + this.ga('require', 'ecommerce'); this.ecommerce = true; } // add transaction - window.ga('ecommerce:addTransaction', { + this.ga('ecommerce:addTransaction', { id: transaction.orderId, affiliation: transaction.affiliation, shipping: transaction.shippingCost, @@ -8043,10 +8038,10 @@ var GoogleAnalytics = (function (_Integration) { }); // add products - (0, _each2['default'])(transaction.lineItems, function addProduct(key, lineItem) { + (0, _each2['default'])(transaction.lineItems, function (key, lineItem) { var product = lineItem.product; if (product) { - window.ga('ecommerce:addItem', { + _this2.ga('ecommerce:addItem', { id: transaction.orderId, category: product.category, quantity: lineItem.quantity, @@ -8059,10 +8054,12 @@ var GoogleAnalytics = (function (_Integration) { }); // send - window.ga('ecommerce:send'); + this.ga('ecommerce:send'); }; GoogleAnalytics.prototype.onCompletedTransactionEnhanced = function onCompletedTransactionEnhanced(event) { + var _this3 = this; + var transaction = event.transaction; // orderId is required. @@ -8070,16 +8067,16 @@ var GoogleAnalytics = (function (_Integration) { this.loadEnhancedEcommerce(transaction.currency); - (0, _each2['default'])(transaction.lineItems, function addProduct(key, lineItem) { + (0, _each2['default'])(transaction.lineItems, function (key, lineItem) { var product = lineItem.product; if (product) { - product.currency = product.currency || transaction.currency || this.getOption('defaultCurrency'); - enhancedEcommerceTrackProduct(lineItem.product, lineItem.quantity); + product.currency = product.currency || transaction.currency || _this3.getOption('defaultCurrency'); + _this3.enhancedEcommerceTrackProduct(lineItem.product, lineItem.quantity); } }); var voucher = getTransactionVoucher(transaction); - window.ga('ec:setAction', 'purchase', { + this.ga('ec:setAction', 'purchase', { id: transaction.orderId, affiliation: transaction.affiliation, revenue: transaction.total || transaction.subtotal || 0, @@ -8092,22 +8089,23 @@ var GoogleAnalytics = (function (_Integration) { }; GoogleAnalytics.prototype.onRefundedTransaction = function onRefundedTransaction(event) { + var _this4 = this; + var transaction = event.transaction; // orderId is required. if (!transaction || !transaction.orderId) return; - this.loadEnhancedEcommerce(transaction.currency); - (0, _each2['default'])(transaction.lineItems, function addProduct(key, lineItem) { + (0, _each2['default'])(transaction.lineItems, function (key, lineItem) { var product = lineItem.product; if (product) { - product.currency = product.currency || transaction.currency || this.getOption('defaultCurrency'); - enhancedEcommerceTrackProduct(lineItem.product, lineItem.quantity); + product.currency = product.currency || transaction.currency || _this4.getOption('defaultCurrency'); + _this4.enhancedEcommerceTrackProduct(lineItem.product, lineItem.quantity); } }); - window.ga('ec:setAction', 'refund', { + this.ga('ec:setAction', 'refund', { id: transaction.orderId }); @@ -8140,7 +8138,7 @@ var GoogleAnalytics = (function (_Integration) { continue; } - window.ga('ec:addPromo', { + this.ga('ec:addPromo', { id: campaign.id, name: campaign.name, creative: campaign.design || campaign.creative, @@ -8159,30 +8157,32 @@ var GoogleAnalytics = (function (_Integration) { } this.loadEnhancedEcommerce(); - window.ga('ec:addPromo', { + this.ga('ec:addPromo', { id: campaign.id, name: campaign.name, creative: campaign.design || campaign.creative, position: campaign.position }); - window.ga('ec:setAction', 'promo_click', {}); + this.ga('ec:setAction', 'promo_click', {}); this.pushEnhancedEcommerce(event); }; GoogleAnalytics.prototype.onViewedCheckoutStep = function onViewedCheckoutStep(event) { + var _this5 = this; + var cartOrTransaction = this.get('cart') || this.get('transaction'); this.loadEnhancedEcommerce(cartOrTransaction.currency); - (0, _each2['default'])(cartOrTransaction.lineItems, function addProduct(key, lineItem) { + (0, _each2['default'])(cartOrTransaction.lineItems, function (key, lineItem) { var product = lineItem.product; if (product) { - product.currency = product.currency || cartOrTransaction.currency || this.getOption('defaultCurrency'); - enhancedEcommerceTrackProduct(lineItem.product, lineItem.quantity); + product.currency = product.currency || cartOrTransaction.currency || _this5.getOption('defaultCurrency'); + _this5.enhancedEcommerceTrackProduct(lineItem.product, lineItem.quantity); } }); - window.ga('ec:setAction', 'checkout', { + this.ga('ec:setAction', 'checkout', { step: event.step || 1, option: getCheckoutOptions(event) || undefined }); @@ -8200,7 +8200,7 @@ var GoogleAnalytics = (function (_Integration) { this.loadEnhancedEcommerce(cartOrTransaction.currency); - window.ga('ec:setAction', 'checkout_option', { + this.ga('ec:setAction', 'checkout_option', { step: event.step, option: options }); @@ -8216,7 +8216,7 @@ var GoogleAnalytics = (function (_Integration) { (0, _deleteProperty2['default'])(source, 'name'); (0, _deleteProperty2['default'])(source, 'category'); var custom = this.getCustomDimensions(source); - if ((0, _size2['default'])(custom)) window.ga('set', custom); + if ((0, _size2['default'])(custom)) this.ga('set', custom); var payload = { eventAction: event.name || 'event', @@ -8232,7 +8232,29 @@ var GoogleAnalytics = (function (_Integration) { if (campaign.content) payload.campaignContent = campaign.content; if (campaign.term) payload.campaignKeyword = campaign.term; - window.ga('send', 'event', payload); + this.ga('send', 'event', payload); + }; + + GoogleAnalytics.prototype.enhancedEcommerceTrackProduct = function enhancedEcommerceTrackProduct(product, quantity) { + var gaProduct = { + id: product.id || product.skuCode, + name: product.name, + category: product.category, + quantity: quantity, + price: product.unitSalePrice || product.unitPrice, + brand: product.brand || product.manufacturer, + variant: product.variant, + currency: product.currency + }; + // append coupon if it set + // https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-transactions + if (product.voucher) gaProduct.coupon = product.voucher; + this.ga('ec:addProduct', gaProduct); + }; + + GoogleAnalytics.prototype.enhancedEcommerceProductAction = function enhancedEcommerceProductAction(event, action, data) { + this.enhancedEcommerceTrackProduct(event.product, event.quantity); + this.ga('ec:setAction', action, data || {}); }; return GoogleAnalytics; diff --git a/dist/dd-manager.min.js b/dist/dd-manager.min.js index a15afb1..9546f5f 100644 --- a/dist/dd-manager.min.js +++ b/dist/dd-manager.min.js @@ -1,4 +1,4 @@ -!function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var f=n[a]={exports:{}};e[a][0].call(f.exports,function(t){var n=e[a][1][t];return o(n?n:t)},f,f.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a=0&&t.length%1===0}function f(t,e){for(var n=-1,r=t.length;++nr?r:null}):(n=q(t),e=n.length,function(){return r++,e>r?n[r]:null})}function m(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),o=0;n>o;o++)r[o]=arguments[o+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r)}}}function v(t){return function(e,n,r){return t(e,r)}}function w(t){return function(e,n,o){o=c(o||r),e=e||[];var i=y(e);if(0>=t)return o(null);var a=!1,s=0,f=!1;!function l(){if(a&&0>=s)return o(null);for(;t>s&&!f;){var r=i();if(null===r)return a=!0,void(0>=s&&o(null));s+=1,n(e[r],r,u(function(t){s-=1,t?(o(t),f=!0):l()}))}}()}}function b(t){return function(e,n,r){return t(R.eachOf,e,n,r)}}function E(t){return function(e,n,r,o){return t(w(n),e,r,o)}}function _(t){return function(e,n,r){return t(R.eachOfSeries,e,n,r)}}function A(t,e,n,o){o=c(o||r),e=e||[];var i=s(e)?[]:{};t(e,function(t,e,r){n(t,function(t,n){i[e]=n,r(t)})},function(t){o(t,i)})}function j(t,e,n,r){var o=[];t(e,function(t,e,r){n(t,function(n){n&&o.push({index:e,value:t}),r()})},function(){r(l(o.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})}function k(t,e,n,r){j(t,e,function(t,e){n(t,function(t){e(!t)})},r)}function I(t,e,n){return function(r,o,i,a){function u(){a&&a(n(!1,void 0))}function c(t,r,o){return a?void i(t,function(r){a&&e(r)&&(a(n(!0,t)),a=i=!1),o()}):o()}arguments.length>3?t(r,o,c,u):(a=i,i=o,t(r,c,u))}}function P(t,e){return e}function S(t,e,n){n=n||r;var o=s(e)?[]:{};t(e,function(t,e,n){t(m(function(t,r){r.length<=1&&(r=r[0]),o[e]=r,n(t)}))},function(t){n(t,o)})}function O(t,e,n,r){var o=[];t(e,function(t,e,r){n(t,function(t,e){o=o.concat(e||[]),r(t)})},function(t){r(t,o)})}function C(t,e,n){function o(t,e,n,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");return t.started=!0,B(e)||(e=[e]),0===e.length&&t.idle()?R.setImmediate(function(){t.drain()}):(f(e,function(e){var i={data:e,callback:o||r};n?t.tasks.unshift(i):t.tasks.push(i),t.tasks.length===t.concurrency&&t.saturated()}),void R.setImmediate(t.process))}function i(t,e){return function(){a-=1;var n=!1,r=arguments;f(e,function(t){f(c,function(e,r){e!==t||n||(c.splice(r,1),n=!0)}),t.callback.apply(t,r)}),t.tasks.length+a===0&&t.drain(),t.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var a=0,c=[],s={tasks:[],concurrency:e,payload:n,saturated:r,empty:r,drain:r,started:!1,paused:!1,push:function(t,e){o(s,t,!1,e)},kill:function(){s.drain=r,s.tasks=[]},unshift:function(t,e){o(s,t,!0,e)},process:function(){if(!s.paused&&a=e;e++)R.setImmediate(s.process)}}};return s}function D(t){return m(function(e,n){e.apply(null,n.concat([m(function(e,n){"object"==typeof console&&(e?console.error&&console.error(e):console[t]&&f(n,function(e){console[t](e)}))})]))})}function x(t){return function(e,n,r){t(d(e),n,r)}}function T(t){return m(function(e,n){var r=m(function(n){var r=this,o=n.pop();return t(e,function(t,e,o){t.apply(r,n.concat([o]))},o)});return n.length?r.apply(this,n):r})}function L(t){return m(function(e){var n=e.pop();e.push(function(){var t=arguments;r?R.setImmediate(function(){n.apply(null,t)}):n.apply(null,t)});var r=!0;t.apply(this,e),r=!1})}var $,R={},M="object"==typeof self&&self.self===self&&self||"object"==typeof n&&n.global===n&&n||this;null!=M&&($=M.async),R.noConflict=function(){return M.async=$,R};var U=Object.prototype.toString,B=Array.isArray||function(t){return"[object Array]"===U.call(t)},N=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},q=Object.keys||function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e},V="function"==typeof setImmediate&&setImmediate,z=V?function(t){V(t)}:function(t){setTimeout(t,0)};"object"==typeof t&&"function"==typeof t.nextTick?R.nextTick=t.nextTick:R.nextTick=z,R.setImmediate=V?z:R.nextTick,R.forEach=R.each=function(t,e,n){return R.eachOf(t,v(e),n)},R.forEachSeries=R.eachSeries=function(t,e,n){return R.eachOfSeries(t,v(e),n)},R.forEachLimit=R.eachLimit=function(t,e,n,r){return w(e)(t,v(n),r)},R.forEachOf=R.eachOf=function(t,e,n){function o(t){s--,t?n(t):null===i&&0>=s&&n(null)}n=c(n||r),t=t||[];for(var i,a=y(t),s=0;null!=(i=a());)s+=1,e(t[i],i,u(o));0===s&&n(null)},R.forEachOfSeries=R.eachOfSeries=function(t,e,n){function o(){var r=!0;return null===a?n(null):(e(t[a],a,u(function(t){if(t)n(t);else{if(a=i(),null===a)return n(null);r?R.setImmediate(o):o()}})),void(r=!1))}n=c(n||r),t=t||[];var i=y(t),a=i();o()},R.forEachOfLimit=R.eachOfLimit=function(t,e,n,r){w(e)(t,n,r)},R.map=b(A),R.mapSeries=_(A),R.mapLimit=E(A),R.inject=R.foldl=R.reduce=function(t,e,n,r){R.eachOfSeries(t,function(t,r,o){n(e,t,function(t,n){e=n,o(t)})},function(t){r(t,e)})},R.foldr=R.reduceRight=function(t,e,n,r){var i=l(t,o).reverse();R.reduce(i,e,n,r)},R.transform=function(t,e,n,r){3===arguments.length&&(r=n,n=e,e=B(t)?[]:{}),R.eachOf(t,function(t,r,o){n(e,t,r,o)},function(t){r(t,e)})},R.select=R.filter=b(j),R.selectLimit=R.filterLimit=E(j),R.selectSeries=R.filterSeries=_(j),R.reject=b(k),R.rejectLimit=E(k),R.rejectSeries=_(k),R.any=R.some=I(R.eachOf,i,o),R.someLimit=I(R.eachOfLimit,i,o),R.all=R.every=I(R.eachOf,a,a),R.everyLimit=I(R.eachOfLimit,a,a),R.detect=I(R.eachOf,o,P),R.detectSeries=I(R.eachOfSeries,o,P),R.detectLimit=I(R.eachOfLimit,o,P),R.sortBy=function(t,e,n){function r(t,e){var n=t.criteria,r=e.criteria;return r>n?-1:n>r?1:0}R.map(t,function(t,n){e(t,function(e,r){e?n(e):n(null,{value:t,criteria:r})})},function(t,e){return t?n(t):void n(null,l(e.sort(r),function(t){return t.value}))})},R.auto=function(t,e,n){function o(t){y.unshift(t)}function i(t){var e=g(y,t);e>=0&&y.splice(e,1)}function a(){s--,f(y.slice(0),function(t){t()})}n||(n=e,e=null),n=c(n||r);var u=q(t),s=u.length;if(!s)return n(null);e||(e=s);var l={},d=0,y=[];o(function(){s||n(null,l)}),f(u,function(r){function u(){return e>d&&p(v,function(t,e){return t&&l.hasOwnProperty(e)},!0)&&!l.hasOwnProperty(r)}function c(){u()&&(d++,i(c),f[f.length-1](y,l))}for(var s,f=B(t[r])?t[r]:[t[r]],y=m(function(t,e){if(d--,e.length<=1&&(e=e[0]),t){var o={};h(l,function(t,e){o[e]=t}),o[r]=e,n(t,o)}else l[r]=e,R.setImmediate(a)}),v=f.slice(0,f.length-1),w=v.length;w--;){if(!(s=t[v[w]]))throw new Error("Has inexistant dependency");if(B(s)&&g(s,r)>=0)throw new Error("Has cyclic dependencies")}u()?(d++,f[f.length-1](y,l)):o(c)})},R.retry=function(t,e,n){function r(t,e){if("number"==typeof e)t.times=parseInt(e,10)||i;else{if("object"!=typeof e)throw new Error("Unsupported argument type for 'times': "+typeof e);t.times=parseInt(e.times,10)||i,t.interval=parseInt(e.interval,10)||a}}function o(t,e){function n(t,n){return function(r){t(function(t,e){r(!t||n,{err:t,result:e})},e)}}function r(t){return function(e){setTimeout(function(){e(null)},t)}}for(;c.times;){var o=!(c.times-=1);u.push(n(c.task,o)),!o&&c.interval>0&&u.push(r(c.interval))}R.series(u,function(e,n){n=n[n.length-1],(t||c.callback)(n.err,n.result)})}var i=5,a=0,u=[],c={times:i,interval:a},s=arguments.length;if(1>s||s>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return 2>=s&&"function"==typeof t&&(n=e,e=t),"function"!=typeof t&&r(c,t),c.callback=n,c.task=e,c.callback?o():o},R.waterfall=function(t,e){function n(t){return m(function(r,o){if(r)e.apply(null,[r].concat(o));else{var i=t.next();i?o.push(n(i)):o.push(e),L(t).apply(null,o)}})}if(e=c(e||r),!B(t)){var o=new Error("First argument to waterfall must be an array of functions");return e(o)}return t.length?void n(R.iterator(t))():e()},R.parallel=function(t,e){S(R.eachOf,t,e)},R.parallelLimit=function(t,e,n){S(w(e),t,n)},R.series=function(t,e){S(R.eachOfSeries,t,e)},R.iterator=function(t){function e(n){function r(){return t.length&&t[n].apply(null,arguments),r.next()}return r.next=function(){return nr;){var i=r+(o-r+1>>>1);n(e,t[i])>=0?r=i:o=i-1}return r}function i(t,e,i,a){if(null!=a&&"function"!=typeof a)throw new Error("task callback must be a function");return t.started=!0,B(e)||(e=[e]),0===e.length?R.setImmediate(function(){t.drain()}):void f(e,function(e){var u={data:e,priority:i,callback:"function"==typeof a?a:r};t.tasks.splice(o(t.tasks,u,n)+1,0,u),t.tasks.length===t.concurrency&&t.saturated(),R.setImmediate(t.process)})}var a=R.queue(t,e);return a.push=function(t,e,n){i(a,t,e,n)},delete a.unshift,a},R.cargo=function(t,e){return C(t,1,e)},R.log=D("log"),R.dir=D("dir"),R.memoize=function(t,e){var n={},r={};e=e||o;var i=m(function(o){var i=o.pop(),a=e.apply(null,o);a in n?R.setImmediate(function(){i.apply(null,n[a])}):a in r?r[a].push(i):(r[a]=[i],t.apply(null,o.concat([m(function(t){n[a]=t;var e=r[a];delete r[a];for(var o=0,i=e.length;i>o;o++)e[o].apply(null,t)})])))});return i.memo=n,i.unmemoized=t,i},R.unmemoize=function(t){return function(){return(t.unmemoized||t).apply(null,arguments)}},R.times=x(R.map),R.timesSeries=x(R.mapSeries),R.timesLimit=function(t,e,n,r){return R.mapLimit(d(t),e,n,r)},R.seq=function(){var t=arguments;return m(function(e){var n=this,o=e[e.length-1];"function"==typeof o?e.pop():o=r,R.reduce(t,e,function(t,e,r){e.apply(n,t.concat([m(function(t,e){r(t,e)})]))},function(t,e){o.apply(n,[t].concat(e))})})},R.compose=function(){return R.seq.apply(null,Array.prototype.reverse.call(arguments))},R.applyEach=T(R.eachOf),R.applyEachSeries=T(R.eachOfSeries),R.forever=function(t,e){function n(t){return t?o(t):void i(n)}var o=u(e||r),i=L(t);n()},R.ensureAsync=L,R.constant=m(function(t){var e=[null].concat(t);return function(t){return t.apply(this,e)}}),R.wrapSync=R.asyncify=function(t){return m(function(e){var n,r=e.pop();try{n=t.apply(this,e)}catch(o){return r(o)}N(n)&&"function"==typeof n.then?n.then(function(t){r(null,t)})["catch"](function(t){r(t.message?t:new Error(t))}):r(null,n)})},"object"==typeof e&&e.exports?e.exports=R:"function"==typeof define&&define.amd?define([],function(){return R}):M.async=R}()}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:50}],2:[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===a||e===l?62:e===u||e===d?63:c>e?-1:c+10>e?e-c+26+26:f+26>e?e-f:s+26>e?e-s+26:void 0}function n(t){function n(t){s[l++]=t}var r,o,a,u,c,s;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=t.length;c="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,s=new i(3*t.length/4-c),a=c>0?t.length-4:t.length;var l=0;for(r=0,o=0;a>r;r+=4,o+=3)u=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&u)>>16),n((65280&u)>>8),n(255&u);return 2===c?(u=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&u)):1===c&&(u=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(u>>8&255),n(255&u)),s}function o(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var o,i,a,u=t.length%3,c="";for(o=0,a=t.length-u;a>o;o+=3)i=(t[o]<<16)+(t[o+1]<<8)+t[o+2],c+=n(i);switch(u){case 1:i=t[t.length-1],c+=e(i>>2),c+=e(i<<4&63),c+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],c+=e(i>>10),c+=e(i>>4&63),c+=e(i<<2&63),c+="="}return c}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),u="/".charCodeAt(0),c="0".charCodeAt(0),s="a".charCodeAt(0),f="A".charCodeAt(0),l="-".charCodeAt(0),d="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=o}("undefined"==typeof n?this.base64js={}:n)},{}],3:[function(t,e,n){(function(e){function r(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(n){return!1}}function o(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t){return this instanceof i?(this.length=0,this.parent=void 0,"number"==typeof t?a(this,t):"string"==typeof t?u(this,t,arguments.length>1?arguments[1]:"utf8"):c(this,t)):arguments.length>1?new i(t,arguments[1]):new i(t)}function a(t,e){if(t=g(t,0>e?0:0|y(e)),!i.TYPED_ARRAY_SUPPORT)for(var n=0;e>n;n++)t[n]=0;return t}function u(t,e,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|v(e,n);return t=g(t,r),t.write(e,n),t}function c(t,e){if(i.isBuffer(e))return s(t,e);if(K(e))return f(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(e.buffer instanceof ArrayBuffer)return l(t,e);if(e instanceof ArrayBuffer)return d(t,e)}return e.length?p(t,e):h(t,e)}function s(t,e){var n=0|y(e.length);return t=g(t,n),e.copy(t,0,0,n),t}function f(t,e){var n=0|y(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function l(t,e){var n=0|y(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function d(t,e){return i.TYPED_ARRAY_SUPPORT?(e.byteLength,t=i._augment(new Uint8Array(e))):t=l(t,new Uint8Array(e)),t}function p(t,e){var n=0|y(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function h(t,e){var n,r=0;"Buffer"===e.type&&K(e.data)&&(n=e.data,r=0|y(n.length)),t=g(t,r);for(var o=0;r>o;o+=1)t[o]=255&n[o];return t}function g(t,e){i.TYPED_ARRAY_SUPPORT?(t=i._augment(new Uint8Array(e)),t.__proto__=i.prototype):(t.length=e,t._isBuffer=!0);var n=0!==e&&e<=i.poolSize>>>1;return n&&(t.parent=Q),t}function y(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function m(t,e){if(!(this instanceof m))return new m(t,e);var n=new i(t,e);return delete n.parent,n}function v(t,e){"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(t).length;default:if(r)return z(t).length;e=(""+e).toLowerCase(),r=!0}}function w(t,e,n){var r=!1;if(e=0|e,n=void 0===n||n===1/0?this.length:0|n,t||(t="utf8"),0>e&&(e=0),n>this.length&&(n=this.length),e>=n)return"";for(;;)switch(t){case"hex":return D(this,e,n);case"utf8":case"utf-8":return P(this,e,n);case"ascii":return O(this,e,n);case"binary":return C(this,e,n);case"base64":return I(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function b(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=e.length;if(i%2!==0)throw new Error("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;r>a;a++){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))throw new Error("Invalid hex string");t[n+a]=u}return a}function E(t,e,n,r){return H(z(e,t.length-n),t,n,r)}function _(t,e,n,r){return H(F(e),t,n,r)}function A(t,e,n,r){return _(t,e,n,r)}function j(t,e,n,r){return H(G(e),t,n,r)}function k(t,e,n,r){return H(Y(e,t.length-n),t,n,r)}function I(t,e,n){return 0===e&&n===t.length?J.fromByteArray(t):J.fromByteArray(t.slice(e,n))}function P(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;n>o;){var i=t[o],a=null,u=i>239?4:i>223?3:i>191?2:1;if(n>=o+u){var c,s,f,l;switch(u){case 1:128>i&&(a=i);break;case 2:c=t[o+1],128===(192&c)&&(l=(31&i)<<6|63&c,l>127&&(a=l));break;case 3:c=t[o+1],s=t[o+2],128===(192&c)&&128===(192&s)&&(l=(15&i)<<12|(63&c)<<6|63&s,l>2047&&(55296>l||l>57343)&&(a=l));break;case 4:c=t[o+1],s=t[o+2],f=t[o+3],128===(192&c)&&128===(192&s)&&128===(192&f)&&(l=(15&i)<<18|(63&c)<<12|(63&s)<<6|63&f,l>65535&&1114112>l&&(a=l))}}null===a?(a=65533,u=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=u}return S(r)}function S(t){var e=t.length;if(X>=e)return String.fromCharCode.apply(String,t);for(var n="",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=X));return n}function O(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(127&t[o]);return r}function C(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;n>o;o++)r+=String.fromCharCode(t[o]);return r}function D(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var o="",i=e;n>i;i++)o+=V(t[i]);return o}function x(t,e,n){for(var r=t.slice(e,n),o="",i=0;it)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,r,o,a){if(!i.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>o||a>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range")}function $(t,e,n,r){0>e&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);i>o;o++)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function R(t,e,n,r){0>e&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);i>o;o++)t[n+o]=e>>>8*(r?o:3-o)&255}function M(t,e,n,r,o,i){if(e>o||i>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function U(t,e,n,r,o){return o||M(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,o){return o||M(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(t,e,n,r,52,8),n+8}function N(t){if(t=q(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function q(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function V(t){return 16>t?"0"+t.toString(16):t.toString(16)}function z(t,e){e=e||1/0;for(var n,r=t.length,o=null,i=[],a=0;r>a;a++){if(n=t.charCodeAt(a),n>55295&&57344>n){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((e-=1)<0)break;i.push(n)}else if(2048>n){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function F(t){for(var e=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function G(t){return J.toByteArray(N(t))}function H(t,e,n,r){for(var o=0;r>o&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}var J=t("base64-js"),W=t("ieee754"),K=t("is-array");n.Buffer=i,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,i.poolSize=8192;var Q={};i.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array),i.isBuffer=function(t){return!(null==t||!t._isBuffer)},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,a=Math.min(n,r);a>o&&t[o]===e[o];)++o;return o!==a&&(n=t[o],r=e[o]),r>n?-1:n>r?1:0},i.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(t,e){if(!K(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new i(0);var n;if(void 0===e)for(e=0,n=0;n0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},i.prototype.compare=function(t){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:i.compare(this,t)},i.prototype.indexOf=function(t,e){function n(t,e,n){for(var r=-1,o=0;n+o2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(i.isBuffer(t))return n(this,t,e);if("number"==typeof t)return i.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):n(this,[t],e);throw new TypeError("val must be string, number or Buffer")},i.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},i.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},i.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var o=r;r=e,e=0|n,n=o}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":return _(this,t,e,n);case"binary":return A(this,t,e,n);case"base64":return j(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var X=4096;i.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),t>e&&(e=t);var r;if(i.TYPED_ARRAY_SUPPORT)r=i._augment(this.subarray(t,e));else{var o=e-t;r=new i(o,void 0);for(var a=0;o>a;a++)r[a]=this[a+t]}return r.length&&(r.parent=this.parent||this),r},i.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||T(t,e,this.length);for(var r=this[t],o=1,i=0;++i0&&(o*=256);)r+=this[t+--e]*o;return r},i.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||T(t,e,this.length);for(var r=this[t],o=1,i=0;++i=o&&(r-=Math.pow(2,8*e)),r},i.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||T(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},i.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),W.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),W.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),W.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),W.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||L(this,t,e,n,Math.pow(2,8*n),0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+n},i.prototype.writeUInt8=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,1,255,0),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):$(this,t,e,!0),e+2},i.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):$(this,t,e,!1),e+2},i.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},i.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},i.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var i=0,a=1,u=0>t?1:0;for(this[e]=255&t;++i>0)-u&255;return e+n},i.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var o=Math.pow(2,8*n-1);L(this,t,e,n,o-1,-o)}var i=n-1,a=1,u=0>t?1:0;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=(t/a>>0)-u&255;return e+n},i.prototype.writeInt8=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,1,127,-128),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):$(this,t,e,!0),e+2},i.prototype.writeInt16BE=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):$(this,t,e,!1),e+2},i.prototype.writeInt32LE=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},i.prototype.writeInt32BE=function(t,e,n){return t=+t,e=0|e,n||L(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},i.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},i.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},i.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},i.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},i.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-en&&r>e)for(o=a-1;o>=0;o--)t[o+e]=this[o+n];else if(1e3>a||!i.TYPED_ARRAY_SUPPORT)for(o=0;a>o;o++)t[o+e]=this[o+n];else t._set(this.subarray(n,n+a),e);return a},i.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var o=z(t.toString()),i=o.length;for(r=e;n>r;r++)this[r]=o[r%i]}return this}},i.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(i.TYPED_ARRAY_SUPPORT)return new i(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;n>e;e+=1)t[e]=this[e];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=i.prototype;i._augment=function(t){return t.constructor=i,t._isBuffer=!0,t._set=t.set,t.get=Z.get,t.set=Z.set,t.write=Z.write,t.toString=Z.toString,t.toLocaleString=Z.toString,t.toJSON=Z.toJSON,t.equals=Z.equals,t.compare=Z.compare,t.indexOf=Z.indexOf,t.copy=Z.copy,t.slice=Z.slice,t.readUIntLE=Z.readUIntLE,t.readUIntBE=Z.readUIntBE,t.readUInt8=Z.readUInt8,t.readUInt16LE=Z.readUInt16LE,t.readUInt16BE=Z.readUInt16BE,t.readUInt32LE=Z.readUInt32LE,t.readUInt32BE=Z.readUInt32BE,t.readIntLE=Z.readIntLE,t.readIntBE=Z.readIntBE, -t.readInt8=Z.readInt8,t.readInt16LE=Z.readInt16LE,t.readInt16BE=Z.readInt16BE,t.readInt32LE=Z.readInt32LE,t.readInt32BE=Z.readInt32BE,t.readFloatLE=Z.readFloatLE,t.readFloatBE=Z.readFloatBE,t.readDoubleLE=Z.readDoubleLE,t.readDoubleBE=Z.readDoubleBE,t.writeUInt8=Z.writeUInt8,t.writeUIntLE=Z.writeUIntLE,t.writeUIntBE=Z.writeUIntBE,t.writeUInt16LE=Z.writeUInt16LE,t.writeUInt16BE=Z.writeUInt16BE,t.writeUInt32LE=Z.writeUInt32LE,t.writeUInt32BE=Z.writeUInt32BE,t.writeIntLE=Z.writeIntLE,t.writeIntBE=Z.writeIntBE,t.writeInt8=Z.writeInt8,t.writeInt16LE=Z.writeInt16LE,t.writeInt16BE=Z.writeInt16BE,t.writeInt32LE=Z.writeInt32LE,t.writeInt32BE=Z.writeInt32BE,t.writeFloatLE=Z.writeFloatLE,t.writeFloatBE=Z.writeFloatBE,t.writeDoubleLE=Z.writeDoubleLE,t.writeDoubleBE=Z.writeDoubleBE,t.fill=Z.fill,t.inspect=Z.inspect,t.toArrayBuffer=Z.toArrayBuffer,t};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":2,ieee754:46,"is-array":47}],4:[function(t,e,n){function r(t){switch(o(t)){case"object":var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=r(t[n]));return e;case"array":for(var e=new Array(t.length),i=0,a=t.length;a>i;i++)e[i]=r(t[i]);return e;case"regexp":var u="";return u+=t.multiline?"m":"",u+=t.global?"g":"",u+=t.ignoreCase?"i":"",new RegExp(t.source,u);case"date":return new Date(t.getTime());default:return t}}var o;try{o=t("component-type")}catch(i){o=t("type")}e.exports=r},{"component-type":6,type:6}],5:[function(t,e,n){function r(t){return t?o(t):void 0}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){r.off(t,n),e.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var r,o=0;or;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],6:[function(t,e,n){(function(t){var n=Object.prototype.toString;e.exports=function(e){switch(n.call(e)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===e?"null":void 0===e?"undefined":e!==e?"nan":e&&1===e.nodeType?"element":"undefined"!=typeof t&&t.isBuffer(e)?"buffer":(e=e.valueOf?e.valueOf():Object.prototype.valueOf.apply(e),typeof e)}}).call(this,t("buffer").Buffer)},{buffer:3}],7:[function(t,e,n){e.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},{}],8:[function(t,e,n){var r=t("./$.is-object");e.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},{"./$.is-object":27}],9:[function(t,e,n){var r=t("./$.to-iobject"),o=t("./$.to-length"),i=t("./$.to-index");e.exports=function(t){return function(e,n,a){var u,c=r(e),s=o(c.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if(u=c[f++],u!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f;return!t&&-1}}},{"./$.to-index":34,"./$.to-iobject":36,"./$.to-length":37}],10:[function(t,e,n){var r=t("./$.ctx"),o=t("./$.iobject"),i=t("./$.to-object"),a=t("./$.to-length"),u=t("./$.array-species-create");e.exports=function(t){var e=1==t,n=2==t,c=3==t,s=4==t,f=6==t,l=5==t||f;return function(d,p,h){for(var g,y,m=i(d),v=o(m),w=r(p,h,3),b=a(v.length),E=0,_=e?u(d,b):n?u(d,0):void 0;b>E;E++)if((l||E in v)&&(g=v[E],y=w(g,E,m),t))if(e)_[E]=y;else if(y)switch(t){case 3:return!0;case 5:return g;case 6:return E;case 2:_.push(g)}else if(s)return!1;return f?-1:c||s?s:_}}},{"./$.array-species-create":11,"./$.ctx":14,"./$.iobject":25,"./$.to-length":37,"./$.to-object":38}],11:[function(t,e,n){var r=t("./$.is-object"),o=t("./$.is-array"),i=t("./$.wks")("species");e.exports=function(t,e){var n;return o(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)||(n=void 0),r(n)&&(n=n[i],null===n&&(n=void 0))),new(void 0===n?Array:n)(e)}},{"./$.is-array":26,"./$.is-object":27,"./$.wks":40}],12:[function(t,e,n){var r={}.toString;e.exports=function(t){return r.call(t).slice(8,-1)}},{}],13:[function(t,e,n){var r=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=r)},{}],14:[function(t,e,n){var r=t("./$.a-function");e.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},{"./$.a-function":7}],15:[function(t,e,n){e.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},{}],16:[function(t,e,n){e.exports=!t("./$.fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./$.fails":19}],17:[function(t,e,n){var r=t("./$.is-object"),o=t("./$.global").document,i=r(o)&&r(o.createElement);e.exports=function(t){return i?o.createElement(t):{}}},{"./$.global":20,"./$.is-object":27}],18:[function(t,e,n){var r=t("./$.global"),o=t("./$.core"),i=t("./$.hide"),a=t("./$.redefine"),u=t("./$.ctx"),c="prototype",s=function(t,e,n){var f,l,d,p,h=t&s.F,g=t&s.G,y=t&s.S,m=t&s.P,v=t&s.B,w=g?r:y?r[e]||(r[e]={}):(r[e]||{})[c],b=g?o:o[e]||(o[e]={}),E=b[c]||(b[c]={});g&&(n=e);for(f in n)l=!h&&w&&f in w,d=(l?w:n)[f],p=v&&l?u(d,r):m&&"function"==typeof d?u(Function.call,d):d,w&&!l&&a(w,f,d),b[f]!=d&&i(b,f,p),m&&E[f]!=d&&(E[f]=d)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,e.exports=s},{"./$.core":13,"./$.ctx":14,"./$.global":20,"./$.hide":22,"./$.redefine":31}],19:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(e){return!0}}},{}],20:[function(t,e,n){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],21:[function(t,e,n){var r={}.hasOwnProperty;e.exports=function(t,e){return r.call(t,e)}},{}],22:[function(t,e,n){var r=t("./$"),o=t("./$.property-desc");e.exports=t("./$.descriptors")?function(t,e,n){return r.setDesc(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},{"./$":28,"./$.descriptors":16,"./$.property-desc":30}],23:[function(t,e,n){e.exports=t("./$.global").document&&document.documentElement},{"./$.global":20}],24:[function(t,e,n){e.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},{}],25:[function(t,e,n){var r=t("./$.cof");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},{"./$.cof":12}],26:[function(t,e,n){var r=t("./$.cof");e.exports=Array.isArray||function(t){return"Array"==r(t)}},{"./$.cof":12}],27:[function(t,e,n){e.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],28:[function(t,e,n){var r=Object;e.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},{}],29:[function(t,e,n){var r=t("./$"),o=t("./$.to-object"),i=t("./$.iobject");e.exports=t("./$.fails")(function(){var t=Object.assign,e={},n={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach(function(t){n[t]=t}),7!=t({},e)[r]||Object.keys(t({},n)).join("")!=o})?function(t,e){for(var n=o(t),a=arguments,u=a.length,c=1,s=r.getKeys,f=r.getSymbols,l=r.isEnum;u>c;)for(var d,p=i(a[c++]),h=f?s(p).concat(f(p)):s(p),g=h.length,y=0;g>y;)l.call(p,d=h[y++])&&(n[d]=p[d]);return n}:Object.assign},{"./$":28,"./$.fails":19,"./$.iobject":25,"./$.to-object":38}],30:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],31:[function(t,e,n){var r=t("./$.global"),o=t("./$.hide"),i=t("./$.uid")("src"),a="toString",u=Function[a],c=(""+u).split(a);t("./$.core").inspectSource=function(t){return u.call(t)},(e.exports=function(t,e,n,a){"function"==typeof n&&(n.hasOwnProperty(i)||o(n,i,t[e]?""+t[e]:c.join(String(e))),n.hasOwnProperty("name")||o(n,"name",e)),t===r?t[e]=n:(a||delete t[e],o(t,e,n))})(Function.prototype,a,function(){return"function"==typeof this&&this[i]||u.call(this)})},{"./$.core":13,"./$.global":20,"./$.hide":22,"./$.uid":39}],32:[function(t,e,n){var r=t("./$.global"),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(t){return i[t]||(i[t]={})}},{"./$.global":20}],33:[function(t,e,n){var r=t("./$.export"),o=t("./$.defined"),i=t("./$.fails"),a=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",u="["+a+"]",c="​…",s=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),l=function(t,e){var n={};n[t]=e(d),r(r.P+r.F*i(function(){return!!a[t]()||c[t]()!=c}),"String",n)},d=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(s,"")),2&e&&(t=t.replace(f,"")),t};e.exports=l},{"./$.defined":15,"./$.export":18,"./$.fails":19}],34:[function(t,e,n){var r=t("./$.to-integer"),o=Math.max,i=Math.min;e.exports=function(t,e){return t=r(t),0>t?o(t+e,0):i(t,e)}},{"./$.to-integer":35}],35:[function(t,e,n){var r=Math.ceil,o=Math.floor;e.exports=function(t){return isNaN(t=+t)?0:(t>0?o:r)(t)}},{}],36:[function(t,e,n){var r=t("./$.iobject"),o=t("./$.defined");e.exports=function(t){return r(o(t))}},{"./$.defined":15,"./$.iobject":25}],37:[function(t,e,n){var r=t("./$.to-integer"),o=Math.min;e.exports=function(t){return t>0?o(r(t),9007199254740991):0}},{"./$.to-integer":35}],38:[function(t,e,n){var r=t("./$.defined");e.exports=function(t){return Object(r(t))}},{"./$.defined":15}],39:[function(t,e,n){var r=0,o=Math.random();e.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+o).toString(36))}},{}],40:[function(t,e,n){var r=t("./$.shared")("wks"),o=t("./$.uid"),i=t("./$.global").Symbol;e.exports=function(t){return r[t]||(r[t]=i&&i[t]||(i||o)("Symbol."+t))}},{"./$.global":20,"./$.shared":32,"./$.uid":39}],41:[function(t,e,n){"use strict";var r,o=t("./$"),i=t("./$.export"),a=t("./$.descriptors"),u=t("./$.property-desc"),c=t("./$.html"),s=t("./$.dom-create"),f=t("./$.has"),l=t("./$.cof"),d=t("./$.invoke"),p=t("./$.fails"),h=t("./$.an-object"),g=t("./$.a-function"),y=t("./$.is-object"),m=t("./$.to-object"),v=t("./$.to-iobject"),w=t("./$.to-integer"),b=t("./$.to-index"),E=t("./$.to-length"),_=t("./$.iobject"),A=t("./$.uid")("__proto__"),j=t("./$.array-methods"),k=t("./$.array-includes")(!1),I=Object.prototype,P=Array.prototype,S=P.slice,O=P.join,C=o.setDesc,D=o.getDesc,x=o.setDescs,T={};a||(r=!p(function(){return 7!=C(s("div"),"a",{get:function(){return 7}}).a}),o.setDesc=function(t,e,n){if(r)try{return C(t,e,n)}catch(o){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(h(t)[e]=n.value),t},o.getDesc=function(t,e){if(r)try{return D(t,e)}catch(n){}return f(t,e)?u(!I.propertyIsEnumerable.call(t,e),t[e]):void 0},o.setDescs=x=function(t,e){h(t);for(var n,r=o.getKeys(e),i=r.length,a=0;i>a;)o.setDesc(t,n=r[a++],e[n]);return t}),i(i.S+i.F*!a,"Object",{getOwnPropertyDescriptor:o.getDesc,defineProperty:o.setDesc,defineProperties:x});var L="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),$=L.concat("length","prototype"),R=L.length,M=function(){var t,e=s("iframe"),n=R,r=">";for(e.style.display="none",c.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("