module.exports = "(function(e,t,n){var r=n(5894),i=n(7358),o=n(9404),a=n(1571),s=n(4934),d=n(4810),u=n(4727).Promise,c=n(672);t.isCORSSupported=function(){return\"withCredentials\"in new(c.get(\"XMLHttpRequest\"))},t.request=function(e){return e=r.extend({method:\"GET\",async:!0,contentType:\"text/plain;charset=UTF-8\"},e),new u((function(n,i){if(!t.isCORSSupported())return i(\"CORS is not supported\");var o=new(c.get(\"XMLHttpRequest\"));o.onload=function(){e.success&&e.success(o),n(o)},o.onerror=function(){e.error&&e.error(o),i(o)},r.isObject(e.data)&&(e.data=s.stringify(e.data)),o.open(e.method,e.url,e.async),e.withCredentials&&(o.withCredentials=e.withCredentials),o.setRequestHeader(\"Content-Type\",e.contentType),r.isObject(e.headers)&&r.forEach(e.headers,(function(e,t){o.setRequestHeader(t,e)})),o.send(e.data)}))},t.retryableRequest=function(e,n,s,c){if(!n)return u.reject(new Error(\"No id specified for request.\"));if(!t.isCORSSupported())return u.reject(new Error(\"CORS is not supported.\"));r.isUndefined(c)&&(c=3),r.isUndefined(s)&&(s=0);var p={id:n,timeStamp:o.now(),data:e,retryCount:s};return a.dispatch(i.SET_PENDING_EVENT,p),d.debug(\"Sending event \",n),t.request(e).then((function(e){return a.dispatch(i.REMOVE_PENDING_EVENT,{id:n}),e}),(function(e){throw p.retryCount>=c?(a.dispatch(i.REMOVE_PENDING_EVENT,{id:n}),d.warn(\"Event \",p,\" could not be sent after \",c,\" attempts.\")):(p.retryCount++,a.dispatch(i.SET_PENDING_EVENT,p),d.debug(\"Event \",p,\" failed to send, with error \",e,\" It will be retried \",c-s,\" times.\")),e}))},t.sendBeacon=__COMPAT__.SENDBEACON?function(e,n){if(!e.url||!e.contentType||!e.data)return u.reject(new Error(\"Must provide required options\"));if(navigator&&navigator.sendBeacon)try{var i=r.isObject(e.data)?s.stringify(e.data):e.data,o=new Blob([i],{type:e.contentType});if(navigator.sendBeacon(e.url,o))return u.resolve();throw new Error(\"Unable to sendBeacon\")}catch(e){d.warn(\"sendBeacon failed: \",e)}return e=r.extend({method:\"POST\"},e),t.request(e,n)}:t.request})";