text: !function o(s,a,u){function c(e,t){if(!a[e]){if(!s[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(l)return l(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var i=a[e]={exports:{}};s[e][0].call(i.exports,function(t){return c(s[e][1][t]||t)},i,i.exports,o,s,a,u)}return a[e].exports}for(var l="function"==typeof require&&require,t=0;t<u.length;t++)c(u[t]);return c}({1:[function(t,e,r){e.exports=function(r){var s=this;r=r||{},s.type=r.type||"cache-module",s.verbose=r.verbose||!1,s.defaultExpiration=r.defaultExpiration||900,s.readOnly=r.readOnly||!1,s.checkOnPreviousEmpty="boolean"!=typeof r.checkOnPreviousEmpty||r.checkOnPreviousEmpty,s.backgroundRefreshIntervalCheck="boolean"!=typeof r.backgroundRefreshIntervalCheck||r.backgroundRefreshIntervalCheck,s.backgroundRefreshInterval=r.backgroundRefreshInterval||6e4,s.backgroundRefreshMinTtl=r.backgroundRefreshMinTtl||7e4;var n,i=null,o=r.storageMock||!1,a=!1,u="undefined"!=typeof window,c={db:{},expirations:{},refreshKeys:{}};function l(){if(u&&i||o){var t=c;try{t=JSON.stringify(t)}catch(t){}i.setItem(n,t)}}function h(t,e){if(t)throw new Error(e)}function f(){Object.keys(c.refreshKeys).forEach(function(t){var e=c.refreshKeys[t];e.expiration-Date.now()<this.backgroundRefreshMinTtl&&e.refresh(t,function(t,e,r,n){r||this.set(t,n,e.lifeSpan/1e3,e.refresh,function(){})}.bind(this,t,e))},s)}function p(t,e,r){(s.verbose||t)&&(r?console.log(s.type+": "+e,r):console.log(s.type+e))}!function(){if(u||o){if(o)i=o,n="cache-module-storage-mock";else{var t="local"===r.storage||"session"===r.storage?r.storage:null;i=!(!t||void 0===typeof Storage)&&window[t+"Storage"],n=t?s.type+"-"+t+"-storage":null}if(i){var e=i.getItem(n);try{c=JSON.parse(e)||c}catch(t){}}else t&&p(!0,"Browser storage is not supported by this browser. Defaulting to an in-memory cache.")}}(),p(!1,"Cache-module client created with the following defaults:",{type:s.type,defaultExpiration:s.defaultExpiration,verbose:s.verbose,readOnly:s.readOnly}),s.get=function(t,e){h(arguments.length<2,"ARGUMENT_EXCEPTION: .get() requires 2 arguments."),p(!1,"get() called:",{key:t});try{if(Date.now()<c.expirations[t]){var r=c.db[t];"object"==typeof r&&(i=r,r=JSON.parse(JSON.stringify(i))),e(null,r)}else n=t,delete c.db[n],delete c.expirations[n],l(),e(null,null)}catch(t){e({name:"GetException",message:t},null)}var n,i},s.mget=function(t,e,r){h(arguments.length<2,"ARGUMENT_EXCEPTION: .mget() requires 2 arguments."),p(!1,".mget() called:",{keys:t});for(var n={},i=0;i<t.length;i++){var o=t[i];s.get(o,function(t,e){null!==e&&(n[o]=e)})}e(null,n,r)},s.set=function(){h(arguments.length<2,"ARGUMENT_EXCEPTION: .set() requires at least 2 arguments.");var t=arguments[0],e=arguments[1],r=arguments[2]||null,n=5==arguments.length?arguments[3]:null,i=5==arguments.length?arguments[4]:arguments[3];if(p(!1,".set() called:",{key:t,value:e}),!s.readOnly)try{var o=(r=r?1e3*r:1e3*s.defaultExpiration)+Date.now();c.expirations[t]=o,c.db[t]=e,i&&i(),n&&(c.refreshKeys[t]={expiration:o,lifeSpan:r,refresh:n},function(){if(!a){if(a=!0,s.backgroundRefreshIntervalCheck&&s.backgroundRefreshInterval>s.backgroundRefreshMinTtl)throw new Error("BACKGROUND_REFRESH_INTERVAL_EXCEPTION: backgroundRefreshInterval cannot be greater than backgroundRefreshMinTtl.");setInterval(f,s.backgroundRefreshInterval)}}()),l()}catch(t){p(!0,".set() failed for cache of type "+s.type,{name:"CacheModuleSetException",message:t})}},s.mset=function(t,e,r){for(var n in h(arguments.length<1,"ARGUMENT_EXCEPTION: .mset() requires at least 1 argument."),p(!1,".mset() called:",{data:t}),t)if(t.hasOwnProperty(n)){var i=e||s.defaultExpiration,o=t[n];"object"==typeof o&&o.cacheValue&&(i=o.expiration||i,o=o.cacheValue),s.set(n,o,i)}r&&r()},s.del=function(t,e){if(h(arguments.length<1,"ARGUMENT_EXCEPTION: .del() requires at least 1 argument."),p(!1,".del() called:",{keys:t}),"object"==typeof t){for(var r=0;r<t.length;r++){var n=t[r];delete c.db[n],delete c.expirations[n],delete c.refreshKeys[n]}e&&e(null,t.length)}else delete c.db[t],delete c.expirations[t],delete c.refreshKeys[t],e&&e(null,1);l()},s.flush=function(t){p(!1,".flush() called"),c.db={},c.expirations={},c.refreshKeys={},t&&t(),l()}}},{}],2:[function(t,e,r){function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}void 0!==e&&(e.exports=n),n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<n.length;i++)if((r=n[i])===e||r.fn===e){n.splice(i,1);break}return this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),r=this._callbacks["$"+t];if(r)for(var n=0,i=(r=r.slice(0)).length;n<i;++n)r[n].apply(this,e);return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],3:[function(t,r,e){!function(t,e){void 0!==r?r.exports=e():"function"==typeof define&&"object"==typeof define.amd?define(e):this.domready=e()}(0,function(r){var t,n=[],e=document,i=e.documentElement,o=i.doScroll,s="DOMContentLoaded",a="addEventListener",u="onreadystatechange",c="readyState",l=(o?/^loaded|^c/:/^loaded|c/).test(e[c]);function h(t){for(l=1;t=n.shift();)t()}return e[a]&&e[a](s,t=function(){e.removeEventListener(s,t,!1),h()},!1),o&&e.attachEvent(u,t=function(){/^c/.test(e[c])&&(e.detachEvent(u,t),h())}),r=o?function(e){self!=top?l?e():n.push(e):function(){try{i.doScroll("left")}catch(t){return setTimeout(function(){r(e)},50)}e()}()}:function(t){l?t():n.push(t)}})},{}],4:[function(t,e,r){var h=t("./utils");e.exports=function(u,t){var e=this,c=["GET","HEAD","POST","PUT","PATCH","DELETE"],l=["GET","HEAD"];return this.cache=u,this.defaults=t||{},function(r){var n=h.resetProps(e.defaults);r.doQuery=function(t){return n.doQuery=t,r},r.pruneQuery=function(t){return n.pruneQuery=t,r},r.pruneHeader=function(t){return n.pruneHeader=t,r},r.prune=function(t){return n.prune=t,r},r.responseProp=function(t){return n.responseProp=t,r},r.expiration=function(t){return n.expiration=t,r},r.cacheWhenEmpty=function(t){return n.cacheWhenEmpty=t,r},r.forceUpdate=function(t){return n.forceUpdate="boolean"!=typeof t||t,r};var a=r.end;return r.end=function(i){if(r.scRedirectsList=r.scRedirectsList||[],r.scRedirectsList=r.scRedirectsList.concat(r._redirectList),~c.indexOf(r.method.toUpperCase())){var o=r,s=h.keygen(r,n);~l.indexOf(r.method.toUpperCase())?u.get(s,function(t,e){if(t||!e||n.forceUpdate){if(!n.doQuery)return h.callbackExecutor(i,null,null,s);a.call(r,function(t,e){if(t)return h.callbackExecutor(i,t,e,s);if(!t&&e){if(e.redirects=o.scRedirectsList,e=n.prune?n.prune(e):n.responseProp?e[n.responseProp]||null:h.gutResponse(e),h.isEmpty(e)&&!n.cacheWhenEmpty)return h.callbackExecutor(i,t,e,s);u.set(s,e,n.expiration,function(){return h.callbackExecutor(i,t,e,s)})}})}else h.callbackExecutor(i,t,e,s)}):a.call(r,function(t,e){if(t)return h.callbackExecutor(i,t,e,s);if(!t&&e){var r=s.replace('"method":"'+o.method+'"','"method":"GET"'),n=s.replace('"method":"'+o.method+'"','"method":"HEAD"');u.del([r,n],function(){h.callbackExecutor(i,t,e,s)})}})}else a.call(r,function(t,e){return h.callbackExecutor(i,t,e,void 0)})},r}}},{"./utils":5}],5:[function(t,e,r){e.exports={keygen:function(t,e){var r=null,n=null,i=this.getQueryParams(t),o=this.getHeaderOptions(t);return(e.pruneQuery||e.pruneHeader)&&(r=e.pruneQuery?this.pruneObj(this.cloneObject(i),e.pruneQuery):i,n=e.pruneHeader?this.pruneObj(this.cloneObject(o),e.pruneHeader,!0):o),JSON.stringify({method:t.method,uri:t.url,params:r||i||null,options:n||o||null})},getQueryParams:function(t){return t&&t.qs&&!this.isEmpty(t.qs)?t.qs:t&&t.qsRaw?this.arrayToObj(t.qsRaw):t&&t.req?this.stringToObj(t.req.path):t&&t._query?this.stringToObj(t._query.join("&")):null},getHeaderOptions:function(t){return t&&t._header?this.pruneObj(t._header,["User-Agent","user-agent"]):t&&t.req&&t.req._headers?this.pruneObj(t.req._headers,["User-Agent","user-agent"]):t&&t.header?this.pruneObj(t.header,["User-Agent","user-agent"]):null},arrayToObj:function(t){if(t&&t.length){for(var e={},r=0;r<t.length;r++)for(var n=t[r].split("&"),i=0;i<n.length;i++){var o=n[i].split("=");e[o[0]]=o[1]}return e}return null},stringToObj:function(t){if(t){var e={};if(~t.indexOf("?"))t=t.split("?")[1];for(var r=t.split("&"),n=0;n<r.length;n++){var i=r[n].split("=");e[i[0]]=i[1]}return e}return null},pruneObj:function(t,e,r){for(var n=0;n<e.length;n++){var i=e[n];r&&delete t[i.toLowerCase()],delete t[i]}return t},gutResponse:function(t){var e={};return e.body=t.body,e.text=t.text,e.headers=t.headers,e.statusCode=t.statusCode,e.status=t.status,e.ok=t.ok,e},isEmpty:function(t){return!1===t||null===t||"object"==typeof t&&0==Object.keys(t).length},cloneObject:function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e},resetProps:function(t){return{doQuery:"boolean"!=typeof t.doQuery||t.doQuery,cacheWhenEmpty:"boolean"!=typeof t.cacheWhenEmpty||t.cacheWhenEmpty,prune:t.prune,pruneQuery:t.pruneQuery,pruneHeader:t.pruneHeader,responseProp:t.responseProp,expiration:t.expiration,forceUpdate:t.forceUpdate,preventDuplicateCalls:t.preventDuplicateCalls,backgroundRefresh:t.backgroundRefresh}},callbackExecutor:function(t,e,r,n){if(1===t.length)t(r);else{if(!(1<t.length))throw new Error("UnsupportedCallbackException: Your .end() callback must pass at least one argument.");t(e,r,n)}}}},{}],6:[function(t,e,r){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(t){n.prototype[t]=function(){return this._defaults.push({fn:t,arguments:arguments}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,t.arguments)})},e.exports=n},{}],7:[function(t,e,r){var n;n="undefined"!=typeof window?window:"undefined"!=typeof self?self:(console.warn("Using browser-only version of superagent in non-browser environment"),this);var i=t("component-emitter"),o=t("./request-base"),s=t("./is-object"),a=t("./response-base"),u=t("./agent-base");function c(){}var l=r=e.exports=function(t,e){return"function"==typeof e?new r.Request("GET",t).end(e):1==arguments.length?new r.Request("GET",t):new r.Request(t,e)};r.Request=m,l.getXHR=function(){if(!(!n.XMLHttpRequest||n.location&&"file:"==n.location.protocol&&n.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw Error("Browser-only version of superagent could not find XHR")};var h="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function f(t){if(!s(t))return t;var e=[];for(var r in t)p(e,r,t[r]);return e.join("&")}function p(e,r,t){if(null!=t)if(Array.isArray(t))t.forEach(function(t){p(e,r,t)});else if(s(t))for(var n in t)p(e,r+"["+n+"]",t[n]);else e.push(encodeURIComponent(r)+"="+encodeURIComponent(t));else null===t&&e.push(encodeURIComponent(r))}function d(t){for(var e,r,n={},i=t.split("&"),o=0,s=i.length;o<s;++o)-1==(r=(e=i[o]).indexOf("="))?n[decodeURIComponent(e)]="":n[decodeURIComponent(e.slice(0,r))]=decodeURIComponent(e.slice(r+1));return n}function y(t){return/[\/+]json($|[^-\w])/.test(t)}function g(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.header=this.headers=function(t){for(var e,r,n,i,o=t.split(/\r?\n/),s={},a=0,u=o.length;a<u;++a)-1!==(e=(r=o[a]).indexOf(":"))&&(n=r.slice(0,e).toLowerCase(),i=h(r.slice(e+1)),s[n]=i);return s}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function m(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var e,r=null,t=null;try{t=new g(n)}catch(t){return(r=new Error("Parser is unable to parse the response")).parse=!0,r.original=t,n.xhr?(r.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,r.status=n.xhr.status?n.xhr.status:null,r.statusCode=r.status):(r.rawResponse=null,r.status=null),n.callback(r)}n.emit("response",t);try{n._isResponseOK(t)||(e=new Error(t.statusText||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=r,e.response=t,e.status=t.status,n.callback(e,t)):n.callback(null,t)})}function v(t,e,r){var n=l("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}l.serializeObject=f,l.parseString=d,l.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},l.serialize={"application/x-www-form-urlencoded":f,"application/json":JSON.stringify},l.parse={"application/x-www-form-urlencoded":d,"application/json":JSON.parse},a(g.prototype),g.prototype._parseBody=function(t){var e=l.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&y(this.type)&&(e=l.parse["application/json"]),e&&t&&(t.length||t instanceof Object)?e(t):null)},g.prototype.toError=function(){var t=this.req,e=t.method,r=t.url,n="cannot "+e+" "+r+" ("+this.status+")",i=new Error(n);return i.status=this.status,i.method=e,i.url=r,i},l.Response=g,i(m.prototype),o(m.prototype),m.prototype.type=function(t){return this.set("Content-Type",l.types[t]||t),this},m.prototype.accept=function(t){return this.set("Accept",l.types[t]||t),this},m.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"==typeof e&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});return this._auth(t,e,r,function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")})},m.prototype.query=function(t){return"string"!=typeof t&&(t=f(t)),t&&this._query.push(t),this},m.prototype.attach=function(t,e,r){if(e){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,r||e.name)}return this},m.prototype._getFormData=function(){return this._formData||(this._formData=new n.FormData),this._formData},m.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},m.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},m.prototype.buffer=m.prototype.ca=m.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},m.prototype.pipe=m.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},m.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},m.prototype.end=function(t){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||c,this._finalizeQueryString(),this._end()},m.prototype._end=function(){var r=this,n=this.xhr=l.getXHR(),t=this._formData||this._data;this._setTimeouts(),n.onreadystatechange=function(){var t=n.readyState;if(2<=t&&r._responseTimeoutTimer&&clearTimeout(r._responseTimeoutTimer),4==t){var e;try{e=n.status}catch(t){e=0}if(!e){if(r.timedout||r._aborted)return;return r.crossDomainError()}r.emit("end")}};var e=function(t,e){0<e.total&&(e.percent=e.loaded/e.total*100),e.direction=t,r.emit("progress",e)};if(this.hasListeners("progress"))try{n.onprogress=e.bind(null,"download"),n.upload&&(n.upload.onprogress=e.bind(null,"upload"))}catch(t){}try{this.username&&this.password?n.open(this.method,this.url,!0,this.username,this.password):n.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(n.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof t&&!this._isHost(t)){var i=this._header["content-type"],o=this._serializer||l.serialize[i?i.split(";")[0]:""];!o&&y(i)&&(o=l.serialize["application/json"]),o&&(t=o(t))}for(var s in this.header)null!=this.header[s]&&this.header.hasOwnProperty(s)&&n.setRequestHeader(s,this.header[s]);return this._responseType&&(n.responseType=this._responseType),this.emit("request",this),n.send(void 0!==t?t:null),this},l.agent=function(){return new u},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(n){u.prototype[n.toLowerCase()]=function(t,e){var r=new l.Request(n,t);return this._setDefaults(r),e&&r.end(e),r}}),u.prototype.del=u.prototype.delete,l.get=function(t,e,r){var n=l("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},l.head=function(t,e,r){var n=l("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},l.options=function(t,e,r){var n=l("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},l.del=v,l.delete=v,l.patch=function(t,e,r){var n=l("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},l.post=function(t,e,r){var n=l("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},l.put=function(t,e,r){var n=l("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}},{"./agent-base":6,"./is-object":8,"./request-base":9,"./response-base":10,"component-emitter":2}],8:[function(t,e,r){"use strict";e.exports=function(t){return null!==t&&"object"==typeof t}},{}],9:[function(t,e,r){"use strict";var i=t("./is-object");function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}(e.exports=n).prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},n.prototype.parse=function(t){return this._parser=t,this},n.prototype.responseType=function(t){return this._responseType=t,this},n.prototype.serialize=function(t){return this._serializer=t,this},n.prototype.timeout=function(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var e in t)switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",e)}return this},n.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var o=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];n.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(t){console.error(t)}if(e&&e.status&&500<=e.status&&501!=e.status)return!0;if(t){if(t.code&&~o.indexOf(t.code))return!0;if(t.timeout&&"ECONNABORTED"==t.code)return!0;if(t.crossDomain)return!0}return!1},n.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},n.prototype.then=function(t,e){if(!this._fullfilledPromise){var i=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(r,n){i.end(function(t,e){t?n(t):r(e)})})}return this._fullfilledPromise.then(t,e)},n.prototype.catch=function(t){return this.then(void 0,t)},n.prototype.use=function(t){return t(this),this},n.prototype.ok=function(t){if("function"!=typeof t)throw Error("Callback required");return this._okCallback=t,this},n.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):200<=t.status&&t.status<300)},n.prototype.getHeader=n.prototype.get=function(t){return this._header[t.toLowerCase()]},n.prototype.set=function(t,e){if(i(t)){for(var r in t)this.set(r,t[r]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},n.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},n.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),i(t)){for(var r in t)this.field(r,t[r]);return this}if(Array.isArray(e)){for(var n in e)this.field(t,e[n]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=""+e),this._getFormData().append(t,e),this},n.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},n.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("Authorization","Basic "+n(t+":"+e));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer "+t)}return this},n.prototype.withCredentials=function(t){return null==t&&(t=!0),this._withCredentials=t,this},n.prototype.redirects=function(t){return this._maxRedirects=t,this},n.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw TypeError("Invalid argument");return this._maxResponseSize=t,this},n.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},n.prototype.send=function(t){var e=i(t),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(e&&i(this._data))for(var n in t)this._data[n]=t[n];else this._data="string"==typeof t?(r||this.type("form"),"application/x-www-form-urlencoded"==(r=this._header["content-type"])?this._data?this._data+"&"+t:t:(this._data||"")+t):t;return!e||this._isHost(t)||r||this.type("json"),this},n.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},n.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(0<=this.url.indexOf("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(0<=e){var r=this.url.substring(e+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,e)+"?"+r.join("&")}}},n.prototype._appendQueryString=function(){console.trace("Unsupported")},n.prototype._timeoutError=function(t,e,r){if(!this._aborted){var n=new Error(t+e+"ms exceeded");n.timeout=e,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},n.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},{"./is-object":8}],10:[function(t,e,r){"use strict";var i=t("./utils");function n(t){if(t)return function(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}(t)}(e.exports=n).prototype.get=function(t){return this.header[t.toLowerCase()]},n.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=i.type(e);var r=i.params(e);for(var n in r)this[n]=r[n];this.links={};try{t.link&&(this.links=i.parseLinks(t.link))}catch(t){}},n.prototype._setStatusProperties=function(t){var e=t/100|0;this.status=this.statusCode=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.redirect=3==e,this.clientError=4==e,this.serverError=5==e,this.error=(4==e||5==e)&&this.toError(),this.created=201==t,this.accepted=202==t,this.noContent=204==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.forbidden=403==t,this.notFound=404==t,this.unprocessableEntity=422==t}},{"./utils":11}],11:[function(t,e,r){"use strict";r.type=function(t){return t.split(/ *; */).shift()},r.params=function(t){return t.split(/ *; */).reduce(function(t,e){var r=e.split(/ *= */),n=r.shift(),i=r.shift();return n&&i&&(t[n]=i),t},{})},r.parseLinks=function(t){return t.split(/ *, */).reduce(function(t,e){var r=e.split(/ *; */),n=r[0].slice(1,-1);return t[r[1].split(/ *= */)[1].slice(1,-1)]=n,t},{})},r.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},{}],12:[function(t,e,r){"use strict";var i=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();var n=function(){function n(t){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.candidates=t;var r=[{re:new RegExp(""+this.constructor.re.start+this.constructor.yearAndMonthName.parts.map(function(t){return e.constructor.re[t]}).join(this.constructor.re.separator)+this.constructor.re.end),year:this.constructor.yearAndMonthName.year,month:this.constructor.yearAndMonthName.month,name:!0}];this.patterns=r.concat(["yearAndMonth","dayMonthNameYear","monthDayYear","monthNameDayYear","monthYear","monthNameAndYear","year"].map(function(t){return e.constructor[t]}).map(function(t){return{re:new RegExp(""+e.constructor.re.start+t.parts.map(function(t){return e.constructor.re[t]}).join(e.constructor.re.separator)+e.constructor.re.end),year:t.year,month:t.month,name:t.name}})),this.extracted=this.constructor.compact(this.candidates.map(function(t){return e.extract(t)})),this.sorted=this.extracted.sort(function(t,e){return t[0]+"-"+(t[1]||99)<e[0]+"-"+(e[1]||99)?-1:1}),this.publicationDate=this.sorted[0]}return i(n,[{key:"extract",value:function(t){for(var e=["january","february","march","april","may","june","july","august","september","october","november","december"],r=0;r<this.patterns.length;r+=1){var n=this.patterns[r],i=t.match(n.re);if(i){var o=null;if(n.month&&(o=i[n.month],n.name))for(var s=o.toLowerCase(),a=0;a<e.length;a+=1){var u=e[a];u.match(s)&&(o=String(e.indexOf(u)+1))}return this.constructor.compact([i[n.year],o])}}return null}}],[{key:"compact",value:function(t){return t.filter(function(t){return null!=t})}}]),n}();n.re={year:"(1[89]\\d{2}|20\\d{2})",month:"(\\d{1,2})",monthName:"(\\w{3,9})",day:"\\d{1,2}\\w{0,2}",start:"(\\D|^)",end:"(\\D|$)",separator:"[.,/-\\s]+"},n.yearAndMonth={parts:["year","month"],year:2,month:3},n.yearAndMonthName={parts:["year","monthName"],year:2,month:3,name:!0},n.monthDayYear={parts:["month","day","year"],year:3,month:2},n.monthNameDayYear={parts:["monthName","day","year"],year:3,month:2,name:!0},n.dayMonthNameYear={parts:["day","monthName","year"],year:3,month:2,name:!0},n.monthYear={parts:["month","year"],year:3,month:2},n.monthNameAndYear={parts:["monthName","year"],year:3,month:2,name:!0},n.year={parts:["year"],year:2},e.exports={DateParser:n}},{}],13:[function(t,e,r){"use strict";e.exports=function(t){return t.replace(/_([a-z])/g,function(t){return t[1].toUpperCase()})}},{}],14:[function(t,e,r){"use strict";var n=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();var a=t("./sources"),u=t("./DateParser").DateParser,c=t("./camelCase"),i=function(){function r(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),!t)throw new Error("document is required for new MetaExtractor instance");this.options=e,this.parse(t)}return n(r,[{key:"parse",value:function(e){var n=this,t=this.options.sources||this.constructor.defaultSources,r=this.options.meta_extractor_options,i=void 0===r?{prioritizeSelectors:void 0}:r,o=i.prioritizeSelectors,s=i.selectorsToRemoveFromInnerHTML||this.constructor.defaultSelectorsToRemoveFromInnerHTML;o&&(this.options.prioritizeSelectors=o,t=t.reduce(function(t,e){return"Selectors"===e?[e].concat(t):(t.push(e),t)},[])),this.sources=t.map(function(t){return new("string"==typeof t?a[t]:t)(e,n.options,s)}),[].slice.call(e.querySelectorAll("meta")).forEach(function(e){n.sources.forEach(function(t){t.add(e)})}),(this.options.tags||this.constructor.defaultTags).forEach(function(t){if("publication_date"===t){var e=new u(n.forCompact("publication_date")).publicationDate;e&&(n.publicationYear=e[0],n.publicationMonth=e[1])}else{var r="get"+n.constructor.ucCamelCase(t);n[c(t)]=n[r]?n[r]():n.firstFor(t)}})}},{key:"getPubmedId",value:function(){return this.firstFor("pubmed_id",Number)}},{key:"getDoi",value:function(){var t=this.firstFor("doi");if(t)return t.trim().replace("doi:","").replace("info:doi/","").replace("http://","").replace("https://","").replace("dx.doi.org/","").replace("doi.org/","").replace("doi","").replace("DOI","")}},{key:"getIssn",value:function(){var t=this.firstFor("issn");if(t)return t.trim().replace("issn:","").replace("info:issn/","")}},{key:"getAuthors",value:function(){var t=this.constructor.uniq(this.forCompact("authors"));if(!(1<t.length))return t[0]||void 0;for(var e=0;e<t.length;e+=1)if(t[e])return t[e]+" et al."}},{key:"getAbstract",value:function(){var t=this.options.prioritizeSelectors?0:7;return this.sources[t].get("abstract")||this.firstFor("abstract")}},{key:"firstFor",value:function(t,e){var r=this.forCompact(t);return e&&(r=r.filter(e)),r[0]}},{key:"forCompact",value:function(e){var r=[];return this.sources.map(function(t){return t.get(e)}).forEach(function(t){r=r.concat(t)}),this.constructor.compact(r)}},{key:"publication_year",get:function(){return this.publicationYear},set:function(t){this.publicationYear=t}},{key:"publication_month",get:function(){return this.publicationMonth},set:function(t){this.publicationMonth=t}},{key:"journal_title",get:function(){return this.journalTitle.trim()},set:function(t){this.journalTitle=t}},{key:"custom_id",get:function(){return this.customId},set:function(t){this.customId=t}}],[{key:"ucCamelCase",value:function(t){var e=c(t);return e.charAt(0).toUpperCase()+e.substr(1)}},{key:"compact",value:function(t){return t.filter(function(t){return null!=t})}},{key:"uniq",value:function(r){return r.filter(function(t,e){return r.indexOf(t)===e})}}]),r}();i.defaultSources=["HighWire","DublinCore","DCTerms","Prism","BEPress","EPrints","WolterKluwer","Selectors","OpenGraph"],i.defaultTags=["pubmed_id","doi","title","publication_date","authors","abstract"],i.defaultSelectorsToRemoveFromInnerHTML=[".overlay"],e.exports={MetaExtractor:i,sources:a}},{"./DateParser":12,"./camelCase":13,"./sources":27}],15:[function(t,e,r){"use strict";var n=t("./Source"),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,n),e}();i.prefix=["bepress","citation"],i.separator="_",e.exports=i},{"./Source":24}],16:[function(t,e,r){"use strict";var n=t("./Source"),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,n),e}();i.defaultTags=["issn","journal_title","doi"],i.prefix="dcsext.wt",i.separator="_",i.issn="issn",i.journalTitle="name",i.doi="doi",e.exports=i},{"./Source":24}],17:[function(t,e,r){"use strict";var n=t("./Source"),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,n),e}();i.defaultTags=["pubmed_id","doi","title","authors","abstract"],i.prefix="dcterms",i.authors="creator",i.abstract=["abstract","description"],i.journalTitle="publisher",i.issn="identifier.issn",e.exports=i},{"./Source":24}],18:[function(t,e,r){"use strict";var n=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();var i=t("./Source"),o=function(t){function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,i),n(o,[{key:"getIssn",value:function(){for(var t=this.forCompact("issn"),e=0;e<t.length;e+=1){var r=t[e];if(!this.constructor.checkDoi(r))return r}}},{key:"sortScore",value:function(t,e){var r=function t(e,r,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,r,n)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(n):void 0}(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"sortScore",this).call(this,t,e);if("doi"===t||"issn"===t){r*=10;var n=e.getAttribute("scheme");n&&n.toLowerCase()===t&&(r-=5);var i=this.clean(e.getAttribute("content"));i&&0===i.toLowerCase().indexOf(t+":")&&(r-=1)}return r}}]),o}();o.prefix="dc",o.doi=["identifier.doi","identifier"],o.authors=["creator","contributor"],o.publicationDate=["date","issued"],o.abstract=["abstract","description"],o.journalTitle="publisher",o.issn=["identifier.issn","identifier"],e.exports=o},{"./Source":24}],19:[function(t,e,r){"use strict";var n=t("./Source"),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,n),e}();i.prefix="eprints",i.authors="creators_name",i.journalTitle=["publication","publisher"],e.exports=i},{"./Source":24}],20:[function(t,e,r){"use strict";var n=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();var i=t("./Source"),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i),n(e,[{key:"forCompact",value:function(t){return this.buckets[t]=this.constructor.prioritizeEngMeta(this.buckets[t]),function t(e,r,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,r,n)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(n):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"forCompact",this).call(this,t)}}],[{key:"prioritizeEngMeta",value:function(t){return[].concat(t.filter(function(t){return t.getAttribute&&"en"===t.getAttribute("xml:lang")}),t.filter(function(t){return!t.getAttribute||"en"!==t.getAttribute("xml:lang")}))}}]),e}();o.prefix="citation",o.separator="_",e.exports=o},{"./Source":24}],21:[function(t,e,r){"use strict";var n=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();var i=t("./Source"),o=function(t){function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,i),n(r,null,[{key:"nodeTag",value:function(t){var e=t.getAttribute("property");return e?e.toLowerCase():function t(e,r,n){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,r,n)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(n):void 0}(r.__proto__||Object.getPrototypeOf(r),"nodeTag",this).call(this,t)}}]),r}();o.prefix="og",o.separator=":",o.authors=[],o.publicationDate="article:published_time",o.abstract="description",e.exports=o},{"./Source":24}],22:[function(t,e,r){"use strict";var n=t("./Source"),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,n),e}();i.prefix="prism",i.publicationDate="publicationdate",i.journalTitle="publicationname",i.issn=["eissn","issn"],e.exports=i},{"./Source":24}],23:[function(n,i,t){(function(o){"use strict";var e=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();function s(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var r=n("./Source"),t=function(t){function i(t,e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t,e));return n.options.selectors=n.options.selectors||{},n.buckets={},n.tags.forEach(function(t){n.options.selectors[t]&&(n.buckets[t]=[].slice.call(n.document.querySelectorAll(n.options.selectors[t])).map(function(t){return"META"===t.tagName?t.content:(o.NodeList&&!o.NodeList.prototype.forEach&&(o.NodeList.prototype.forEach=Array.prototype.forEach),t.querySelectorAll(r).forEach(function(t){return t.parentNode.removeChild(t)}),t.innerHTML)}))}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(i,r),e(i,[{key:"forCompact",value:function(t){var e,r=this;if(!this.buckets[t])return[];var n=this.buckets[t].map(function(t){return r.clean(t)});if("authors"!==t||1!==n.length)return(e=[]).concat.apply(e,s(n));var i=n[0].split(",");return this.constructor.handleCommaSeparatedNameNotation(i)}},{key:"add",value:function(){this.added=this.added}}],[{key:"handleCommaSeparatedNameNotation",value:function(t){var e=t[0].split(/[\s;:.!?+&*/%]+/).filter(function(t){return t}).length;return 1<t.length&&e<2?this.joinFirstTwoItemsOfArray(t):t}},{key:"joinFirstTwoItemsOfArray",value:function(t){var e=[].concat(s(t));return e[0]=e[0]+","+e[1],e.splice(1,1),e}}]),i}();i.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./Source":24}],24:[function(t,e,r){"use strict";var n=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();var i=t("../camelCase"),o=function(){function r(t){var n=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.document=t,this.options=e,this.tags=this.options.tags||this.constructor.defaultTags,this.tagMap={},this.buckets={},this.tagOrder={},this.tags.forEach(function(r){n.buckets[r]=[],n.tagOrder[r]=[],[].concat(n.constructor[i(r)]).forEach(function(t){var e=n.constructor.tag(t);n.tagMap[e]=n.tagMap[e]||[],n.tagMap[e].push(r),n.tagOrder[r].push(e)})})}return n(r,[{key:"add",value:function(e){var r=this,t=this.constructor.nodeTag(e);(this.tagMap[t]||[]).forEach(function(t){e.getAttribute("content")&&r.buckets[t].push(e)})}},{key:"get",value:function(t){var e="get"+this.constructor.ucCamelCase(t);return"function"==typeof this[e]?this[e]():this.firstFor(t)}},{key:"getAuthors",value:function(){return this.forCompact("authors")}},{key:"getPublicationDate",value:function(){return this.forCompact("publication_date")}},{key:"getAbstract",value:function(){var t=this.forCompact("abstract");return t&&t.length?t.join(" ").trim():null}},{key:"getDoi",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"doi",e=this.forCompact(t),r=0;r<e.length;r+=1){var n=e[r];if(this.constructor.checkDoi(n))return n}}},{key:"firstFor",value:function(t){return this.forCompact(t)[0]}},{key:"forCompact",value:function(r){var t,n=this;if(!this.buckets[r])return[];"authors"!==r&&this.buckets[r].sort(function(t,e){return n.sortScore(r,t)-n.sortScore(r,e)});var e=this.buckets[r].map(function(t){var e=t.getAttribute?t.getAttribute("content"):t;return"authors"===r?n.clean(e).split(","):n.clean(e)});return(t=[]).concat.apply(t,function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(e))}},{key:"sortScore",value:function(t,e){return(this.tagOrder[t]||"").indexOf(this.constructor.nodeTag(e))}},{key:"clean",value:function(t){return this.htmlDecode(t).replace(/[\n\t]+/g," ").replace(/\s+/g," ").trim()}},{key:"htmlDecode",value:function(t){if(!t)return"";var e=this.document.createElement("div");return e.innerHTML=t.replace(/<style.*?>.*?<\/style>|<script.*?>.*?<\/script>/g,"").replace(/(<span*>)/g,"$1 "),e.textContent}}],[{key:"checkDoi",value:function(t){return t.match(/\//g)}},{key:"tag",value:function(t){return[].concat(this.prefix).concat(t).join(this.separator)}},{key:"nodeTag",value:function(t){var e=t.getAttribute("name");return e?e.toLowerCase():"invalid"}},{key:"ucCamelCase",value:function(t){var e=i(t);return e.charAt(0).toUpperCase()+e.substr(1)}}]),r}();o.prefix=[],o.separator=".",o.defaultTags=["pubmed_id","doi","title","authors","publication_date","abstract"],o.pubmedId=["pubmed_id","pmid"],o.doi="doi",o.title="title",o.authors=["authors","author"],o.publicationDate=["publication_date","date"],o.abstract="abstract",o.journalTitle=["journal_title","journal_abbrev"],o.issn="issn",e.exports=o},{"../camelCase":13}],25:[function(t,e,r){"use strict";var n=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();var i=t("./Source"),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i),n(e,[{key:"getCustomId",value:function(){var t=this.document.querySelector('meta[name="pbContext"]');if(t&&t.content){var e=new RegExp("journal\\:journal\\:(\\w+?)(?:\\W|$)").exec(t.content);if(e&&1<e.length)return e[1]}return null}}]),e}();e.exports=o},{"./Source":24}],26:[function(t,e,r){"use strict";var n=t("./Source"),i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,n),e}();i.prefix="wkhealth",i.separator="_",e.exports=i},{"./Source":24}],27:[function(t,e,r){"use strict";var n=t("./Source"),i=t("./HighWire"),o=t("./DublinCore"),s=t("./Prism"),a=t("./BEPress"),u=t("./EPrints"),c=t("./OpenGraph"),l=t("./WolterKluwer"),h=t("./DCTerms"),f=t("./Selectors"),p=t("./TandFonline"),d=t("./DCSext");e.exports={Source:n,HighWire:i,DublinCore:o,Prism:s,BEPress:a,EPrints:u,OpenGraph:c,WolterKluwer:l,DCTerms:h,Selectors:f,TandFonline:p,DCSext:d}},{"./BEPress":15,"./DCSext":16,"./DCTerms":17,"./DublinCore":18,"./EPrints":19,"./HighWire":20,"./OpenGraph":21,"./Prism":22,"./Selectors":23,"./Source":24,"./TandFonline":25,"./WolterKluwer":26}],28:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();var i=function(){function e(t){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.split(",").forEach(function(t){if(-1!==t.indexOf("=")){var e=t.split("="),r=s(e,2),n=r[0],i=r[1];o[o.trim(n)]=o.trim(i)}else o[o.trim(t)]=!0}),this.abstract=parseInt(this.abstract,10))}return n(e,[{key:"trim",value:function(t){return t.replace(/^\s+|\s+$/g,"")}}]),e}();r.default=i},{}],29:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),o=t("superagent"),s=(n=o)&&n.__esModule?n:{default:n};var a=function(){function a(t){var e=t.dtConfig,r=t.loadingTimes,n=t.relevancy,i=t.queryParams,o=t.tag,s=t.integrations;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),this.dtConfig=e,this.switches={},this.loadingTimes=r,this.relevancy=n,this.queryParams=i,this.res={},this.tag=o,this._integrations=s}return i(a,[{key:"addDt",value:function(){return!(!this.dtConfig||!this.switches.dt||this.switches.gdpr||!this.switches.isUS)&&(this.dtConfig.dmd&&this._addDmdIframe(),this.dtConfig.lhk&&this._makeLhkReq(),this._integrations.loop(),!0)}},{key:"_addDmdIframe",value:function(){var e=this,t=document.createElement("iframe");if(t.setAttribute("style","display:none!important"),"function"!=typeof t.getAttribute)return!1;var r=Date.now(),n="?client-origin="+window.location.origin+"&timestamp="+r;return this.dtConfig.dmd.permittedOrigin=""+this.dtConfig.dmd.origin,t.src=""+this.dtConfig.dmd.permittedOrigin+this.dtConfig.dmd.path+n,document.body.appendChild(t),window.addEventListener("message",function(t){return e.dmdPostMessageHandler(t)},!1),!0}},{key:"_makeLhkReq",value:function(){var r=this;s.default.get(this.dtConfig.lhk.api).withCredentials().end(function(t,e){r.relevancy.log({},{lhk:e.body})})}},{key:"dmdPostMessageHandler",value:function(t){t.origin===this.dtConfig.dmd.permittedOrigin&&(this.res=t.data,this.loadingTimes.dt=new Date-this.loadingTimes.start,this.relevancy.dmdObj=this.dmdObj(),this.loadingTimes.recos&&this.relevancy.log({},{dmd:this.dmdObj()}))}},{key:"dmdObj",value:function(){if(!this.dtConfig||!this.dtConfig.dmd||!this.switches.dt)return!1;for(var t={url:document.location.href,title:document.title,article:this.queryParams(),referrer:document.referrer,time:new Date,recos:[],iframe:{data:this.res,iframeResponse:this.loadingTimes.dt,recosVisible:this.loadingTimes.recos}},e=document.getElementsByClassName(this.tag+"-widget-list-item__link"),r=0;r<e.length;r++){var n=e[r];t.recos.push(n.getAttribute("data-"+this.tag+"-id"))}return t}}]),a}();r.default=a},{superagent:7}],30:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}();var n=function(){function n(t){var e=t.relevancy,r=t.tag;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.prConsent=null,this.trConsent=null,this.gaConsent=null,this.gaClientId=null,this.gaConsentInGdpr=null,this.newClientId=!1,this.gdpr=!0,this.gaCode="UA-47018061-3",this.tag=r,this.relevancy=e,this.sessionCookieName=this.tag+"-disable-gdpr-ga-popup",this.flag="cf_widget_j",this.journalId=null}return i(n,[{key:"addGaTrackingCode",value:function(t,e,r){var n=this;t&&(this.gaCode=t),e&&(this.flag=e),this._addGaTrackingCode(function(){n.gdpr&&!n.gaConsent?navigator.cookieEnabled&&-1!==document.cookie.indexOf(n.sessionCookieName)||("function"==typeof r?r():n._askForGaConsent()):n.newClientId?n._registerGaConsent(!0,function(t){t||n._gaTrackPageView()}):n._gaTrackPageView()})}},{key:"_addGaTrackingCode",value:function(e){var t,r,n,i,o,s,a,u=this;t=window,r=document,n="script",i="//www.google-analytics.com/analytics.js",o="ga",t.GoogleAnalyticsObject=o,t[o]=t[o]||function(){return(t[o].q=t[o].q||[]).push(arguments)},t[o].l=1*new Date,s=r.createElement(n),a=r.getElementsByTagName(n)[0],s.async=1,s.src=i,a.parentNode.insertBefore(s,a),this.gaClientId?ga("create",this.gaCode,"auto",{storage:"none",name:"tmdWidget",clientId:this.gaClientId}):ga("create",this.gaCode,"auto",{storage:"none",name:"tmdWidget"}),ga("set","anonymizeIp",!0),ga(function(){"function"==typeof ga.getAll&&ga.getAll().forEach(function(t){"tmdWidget"===t.get("name")&&(u.gaClientId||(u.gaClientId=t.get("clientId"),u.newClientId=!0),e())})})}},{key:"_gaTrackPageView",value:function(){"cf_widget"===this.flag.substring(0,9)?ga("tmdWidget.send","pageview",window.location.hostname+"/"+this.journalId):ga("tmdWidget.send","pageview")}},{key:"_askForGaConsent",value:function(){document.getElementsByClassName(this.tag+"-widget-cookie-notification").length&&(this._hideProgress(),document.getElementsByClassName(this.tag+"-widget-cookie-notification")[0].setAttribute("style","display: block!important"))}},{key:"_registerGaConsent",value:function(e){var r=this,t=function(){var t=r.flag;"cf_widget"===r.flag.substring(0,9)&&(t=""+r.flag+r.journalId),r.relevancy.log({},{gdprGaConsent:{gdpr:r.gdpr,gaClientId:r.gaClientId,gaCode:r.gaCode,gaConsent:r.gaConsent,gaConsentInGdpr:r.gaConsentInGdpr,flag:t}},function(t){t.ok?(r.gaConsent&&r._gaTrackPageView(),"function"==typeof e&&e(!1),r.gdpr&&(document.cookie=r.sessionCookieName+"=1;path=/")):t.ok||"function"==typeof e&&e({error:"other"})})};if(!this.gdpr&&0<this.relevancy.concurrent)var n=setInterval(function(){0===r.relevancy.concurrent&&(t(),clearInterval(n))},500);else t()}},{key:"_handleGaConsentError",value:function(){var t=this;this._hideConsentFooter(),clearTimeout(this._handleGaConsentErrorTimeout),this._handleGaConsentErrorTimeout=setTimeout(function(){t._askForGaConsent()},500)}},{key:"_hideConsentFooter",value:function(){var t=document.getElementsByClassName(this.tag+"-widget-cookie-notification");if(t)for(var e=0;e<t.length;e++)t[e]&&"function"==typeof t[e].setAttribute&&t[e].setAttribute("style","display: none!important")}},{key:"_showProgress",value:function(){var r=this;document.querySelectorAll("."+this.tag+"-widget-cookie-notification button").forEach(function(t){return t.style.display="none"});var n=document.querySelectorAll("."+this.tag+"-widget-cookie-notification span")[1];clearInterval(this._showProgressInterval),this._showProgressDots=1,this._showProgressInterval=setInterval(function(){for(var t="Saving",e=0;e<r._showProgressDots;e++)t+=".";n&&(n.innerHTML=t),r._showProgressDots+=1,3<r._showProgressDots&&(r._showProgressDots=1)},500)}},{key:"_hideProgress",value:function(){document.querySelectorAll("."+this.tag+"-widget-cookie-notification button").forEach(function(t){return t.style.display="inline-block"});var t=document.querySelectorAll("."+this.tag+"-widget-cookie-notification span")[1];clearInterval(this._showProgressInterval),t.innerHTML=""}},{key:"setGaConsent",value:function(t,e){var r=this,n=e;return"function"!=typeof n&&(n=function(t){t?r._handleGaConsentError():r._hideConsentFooter()}),navigator.cookieEnabled?(this.gaConsent=!0===t,this._showProgress(),this._registerGaConsent(n)):n({error:"cookie"})}},{key:"setPrConsent",value:function(t,e,r){return navigator.cookieEnabled?(this.prConsent=!0===t,this.trConsent=!0===e,this.relevancy.log({},{gdprPrConsent:{gdpr:this.gdpr,prConsent:this.prConsent,trConsent:this.trConsent}},function(t){"function"==typeof r&&(t.ok?r(!1):t.ok||r({error:"other"}))})):r({error:"cookie"})}},{key:"switches",set:function(t){t&&null!==t.gdpr&&(this.gdpr=t.gdpr),t&&t.gaCode&&(this.gaCode=t.gaCode),t&&t.mainCookie&&t.mainCookie.ga?(this.gaConsent=!!t.mainCookie.ga.consent,this.gaClientId=t.mainCookie.ga.clientId):this.gdpr?this.gaConsent=!1:this.gaConsent=!0,t&&t.mainCookie&&t.mainCookie.pr?(this.prConsent=!!t.mainCookie.pr.consent,this.trConsent=!!t.mainCookie.pr.tr):this.gdpr?(this.prConsent=!1,this.trConsent=!1):(this.prConsent=!0,this.trConsent=!0),t&&t.mainCookie&&t.mainCookie.gdprGaConsent&&(this.gaConsentInGdpr=!0)}}]),n}();r.default=n},{}],31:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),o=t("superagent"),s=(n=o)&&n.__esModule?n:{default:n};var a=function(){function o(t){var e=t.apiUrl,r=t.element,n=t.widgetContainerSelector,i=t.relevancy;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),this.element=r,this.widgetContainerSelector=n,this.apiUrl=e,this.integrationsEndpoint="/integrations",this._swoopInserted=!1,this._loopInitialized=!1,this._articleId=null,this._websiteId=null,this._relevancy=i,this._swoopWebsiteId=null,this._pubn=null,this._inn=null,this._detected=null}return i(o,[{key:"swoopParseSimilarHtml",value:function(t){var e=t.articleId,r=t.websiteId;this._articleId=e,this._websiteId=r;try{var n=this.element.querySelector(this.widgetContainerSelector).dataset.trendmdSwoop,i=window.atob(n),o=JSON.parse(i),s=o.swi,a=o.pubn,u=o.inn;return this._swoopWebsiteId=s,this._pubn=a,this._inn=u,this._swoopAppend()}catch(t){return null}}},{key:"_loop",value:function(){this._swoopInserted||setTimeout(this._request.bind(this),5e3)}},{key:"loop",value:function(){return this._loopInitialized?null:(this._loopInitialized=!0,this._loop())}},{key:"_swoopAppend",value:function(){if(this._swoopWebsiteId&&this._pubn&&!this._swoopInserted){var t=document.createElement("script");return t.src="https://ardrone.swoop.com/js/spxw.js",t.id="swoop_sdk",t.dataset.domain=this._swoopWebsiteId,t.dataset.npi=this._pubn,document.getElementsByTagName("body")[0].appendChild(t),this._swoopLog(),this._swoopInserted=!0}return!1}},{key:"_swoopLog",value:function(){return this._relevancy.loadingTimes.recos?this._relevancy.log({},{swoop:this._swoopData()}):(this._relevancy.swoopObj=this._swoopData(),null)}},{key:"_swoopData",value:function(){return{articleId:this._articleId,websiteId:this._websiteId,inn:this._inn,swoopId:this._swoopWebsiteId}}},{key:"_integration",value:function(t){return s.default.get(this.apiUrl+this.integrationsEndpoint).set(this.tag+"-widget-version",this.version).withCredentials().end(t)}},{key:"_request",value:function(){var s=this;this._integration(function(t,e){if(t)return null;var r=e.body,n=r.inn,i=r.pubn,o=r.detected;return s._inn=n,s._pubn=i,s._detected=o,s._detected&&s._swoopWebsiteId&&!s._swoopAppend()?s._loop():null})}}]),o}();r.default=a},{superagent:7}],32:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),o=i(t("superagent")),a=t("trendmd-meta-extractor"),u=i(t("./RequestCache"));function i(t){return t&&t.__esModule?t:{default:t}}var s=function(){function s(t){var e=t.apiUrl,r=t.options,n=t.version,i=t.tag;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),this.apiUrl=e,this.options=r,this.loadingTimes={start:new Date},this.version=n,this.tag=i,this.options.journal_id)this.endpoint="/journals/"+this.options.journal_id+"/selectors",this.params={};else{this.endpoint="/journals/identification";var o=new a.MetaExtractor(window.document,{sources:["HighWire","DCSext","DublinCore","DCTerms","Prism","BEPress","EPrints","WolterKluwer","TandFonline"],tags:["doi","issn","journal_title","custom_id"]});this.params={doi:o.doi,issn:o.issn,url:this.options.url||window.location.href,custom_id:this.options.custom_id||o.custom_id}}}return n(s,[{key:"retrieve",value:function(n){var i=this;return window.trendmdGlobalState.journal?n(window.trendmdGlobalState.journal):o.default.get(this.apiUrl+this.endpoint).set(this.tag+"-widget-version",this.version).withCredentials().query(this.params).use(u.default).end(function(t,e){var r=new Date-i.loadingTimes.start;return"/journals/identification"===i.endpoint?i.loadingTimes.identification=r:i.loadingTimes.selectors=r,t||e.error?null:(window.trendmdGlobalState.journal=e.body.journal,n(e.body.journal))})}}]),s}();r.default=s},{"./RequestCache":34,superagent:7,"trendmd-meta-extractor":14}],33:[function(u,t,c){(function(r){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var t,n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},e=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),i=u("superagent"),o=(t=i)&&t.__esModule?t:{default:t};function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=function(){function s(t){var e=t.tag,r=t.relevancyUrl,n=t.loadingTimes,i=t.timeToClick,o=t.version;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),this.tag=e,this.eventsEndpoint="/events",this.eventsStoreKey=this.tag+"SentEvents",this.attributes={articleId:"data-"+this.tag+"-id",journalId:"data-"+this.tag+"-journal-id",sponsored:"data-"+this.tag+"-sponsored",campaignId:"data-"+this.tag+"-campaign-id",ct:"data-"+this.tag+"-ct"},this.selectors={organic:"a[data-"+this.tag+'-sponsored="false"]',sponsored:"a[data-"+this.tag+'-sponsored="true"]'},this.relevancyUrl=r,this.version=o,this.loadingTimes=n,this.timeToClick=i,this.switches={},this.journalId=null,this.articleId=null,this._element=null,this.dmdObj={},this.swoopObj={},this.testID=null,this.stack=[],this._stackInProgress=!1,this._stackInterval=0}return e(s,[{key:"calculate",value:function(){this.calculateImpressions(),this.calculateRecommendations()}},{key:"calculateImpressions",value:function(){for(var t={},e=[],r=this.nodes("organic"),n=0;n<r.length;n++){e.push(this.params(r[n])),t[r[n].getAttribute(this.attributes.articleId)]=r[n].getAttribute(this.attributes.ct)}for(var i=[],o=this.nodes("sponsored"),s=0;s<o.length;s++){i.push(this.params(o[s])),t[o[s].getAttribute(this.attributes.articleId)]=o[s].getAttribute(this.attributes.ct)}var a={"organic-impressions":e,"sponsored-impressions":i};this.hasSentImpressionsEvents(a)||this.log(a,{"loading-times":this.loadingTimes,dmd:this.dmdObj,swoop:this.swoopObj,testID:this.testID,widgetVersion:this.version,websiteId:this.journalId,ct:t})}},{key:"hasSentImpressionsEvents",value:function(t){var e=JSON.stringify(t);return r[this.eventsStoreKey]||(r[this.eventsStoreKey]=[]),-1!==r[this.eventsStoreKey].indexOf(e)||(r[this.eventsStoreKey].push(e),!1)}},{key:"calculateRecommendations",value:function(){var n=this;Object.keys(this.selectors).forEach(function(t){if("all"!==t)for(var e=n.nodes(t),r=0;r<e.length;r++)n.addClickLogger(e[r],t)})}},{key:"addClickLogger",value:function(e,r){var n=this,i=e.getAttribute(this.attributes.articleId),o=e.getAttribute(this.attributes.ct);return e[this.listenMethod](this.listenEvent,function(){var t={dt:n.dmdObj,swoop:n.swoopObj,testID:n.testID,ct:a({},i,o)};n.timeToClick&&n.timeToClick.start&&(t.ttc=new Date-n.timeToClick.start),n.log(a({},r+"-recommendations",[n.params(e)]),t)})}},{key:"nodes",value:function(t){return this.element.querySelectorAll(this.selectors[t])}},{key:"params",value:function(t){return{from_journal_id:this.journalId,from_article_id:this.articleId,to_journal_id:t.getAttribute(this.attributes.journalId),to_article_id:t.getAttribute(this.attributes.articleId),campaign_id:t.getAttribute(this.attributes.campaignId)}}},{key:"log",value:function(t){var e=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];this.stack.push({events:t,misc:r,cb:n}),this._stackInterval||(this._log(),this._stackInterval=setInterval(function(){!e._stackInProgress&&e.stack.length&&e._log()},200))}},{key:"_log",value:function(){var r=this;this._stackInProgress=!0;var t=this.stack.pop(),e=t.events,n=t.misc,i=t.cb;return n.switches=this.switches||{},this.concurrent+=1,o.default.post(this.relevancyUrl+this.eventsEndpoint).set(this.tag+"-widget-version",this.version).withCredentials().send({events:e,misc:n}).end(function(t,e){r.concurrent-=1,r._stackInProgress=!1,"function"==typeof i&&i(e)})}},{key:"element",set:function(t){if(t){var e=(this._element=t).addEventListener?["addEventListener","click"]:["attachEvent","onclick"],r=n(e,2);this.listenMethod=r[0],this.listenEvent=r[1]}},get:function(){return this._element}}]),s}();c.default=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{superagent:7}],34:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(t("cache-service-cache-module")),i=o(t("superagent-cache-plugin"));function o(t){return t&&t.__esModule?t:{default:t}}var s=new n.default({storage:"",defaultExpiration:900,verbose:!1}),a=(0,i.default)(s);r.default=a},{"cache-service-cache-module":1,"superagent-cache-plugin":4}],35:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),i=c(t("domready")),s=c(t("superagent")),o=t("trendmd-meta-extractor"),a=c(t("./Relevancy")),l=c(t("./ArticleHeader")),h=c(t("./JournalRetriever")),f=c(t("./Gdpr")),p=c(t("./Dt")),d=c(t("./Integrations")),y=c(t("./RequestCache"));function c(t){return t&&t.__esModule?t:{default:t}}i.default.domready=i.default;var g=function(){function c(t){var e=this,r=t.tag,n=t.apiUrl,i=t.relevancyUrl,o=t.styleSheetUrl,s=t.dtConfig,a=t.options,u=t.version;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),this.tag=r,this.version=u,this.apiUrl=n,this.relevancyUrl=i,this.styleSheetUrl=o,this.dtConfig=s,this.options=a,this.loadingTimes={start:new Date},this.timeToClick={start:null},this.element=null,this.journal={},this.switches={},this.responsesTracked=0,this.widgetIsInIframe=function(){try{return window.self!==window.top}catch(t){return!0}}(),this._relevancy=this.relevancy(),this._retriever=this.journalRetriever(),this._integrations=new d.default({apiUrl:this.apiUrl,widgetContainerSelector:"."+this.tag+"-widget-container",relevancy:this._relevancy}),this.dt=new p.default({dtConfig:this.dtConfig,queryParams:function(){return e.queryParams()},relevancy:this._relevancy,loadingTimes:this.loadingTimes,tag:this.tag,integrations:this._integrations}),this.gdpr=new f.default({tag:this.tag,relevancy:this._relevancy}),this.handleItegrations=function(){},this._widgetContainerSelector="."+this.tag+"-widget-container",this._init()}return n(c,[{key:"relevancy",value:function(){return new a.default({tag:this.tag,relevancyUrl:this.relevancyUrl,loadingTimes:this.loadingTimes,timeToClick:this.timeToClick,version:this.version})}},{key:"metaExtractor",value:function(t,e){return new o.MetaExtractor(t,e)}},{key:"journalRetriever",value:function(){return new h.default({apiUrl:this.apiUrl,options:this.options,version:this.version,tag:this.tag})}},{key:"_init",value:function(){var o=this;i.default.domready(function(){o.loadingTimes.domReady=new Date-o.loadingTimes.start,o.retrieve(function(t){var e=document.querySelector(o.options.element),r=t.widgetPlacement?document.querySelector(t.widgetPlacement):null,n=!1;if(r){var i=window.getComputedStyle(r);n="hidden"!==i.getPropertyValue("visibility")&&"none"!==i.getPropertyValue("display")}o.wrapperStart="",o.wrapperEnd="",r&&n?(o.element=r,o.insertPosition=t.widgetInsertPosition||null,o.wrapperStart=t.widgetWrapperStart||"",o.wrapperEnd=t.widgetWrapperEnd||""):o.element=e,o.element&&(o._relevancy.element=o.element,o._integrations.element=o.element,o.dt.addDt(),o.extractor=o.metaExtractor(document,t),o.show()),"function"==typeof o.options.cbRetrieve&&o.options.cbRetrieve()})})}},{key:"retrieve",value:function(e){var r=this;this._retriever.retrieve(function(t){r._retriever.loadingTimes.identification?r.loadingTimes.identification=r._retriever.loadingTimes.identification:r.loadingTimes.selectors=r._retriever.loadingTimes.selectors,r.journal=t,r.switches=t.switches||{},r.missingEndpoint="/journals/"+t.id+"/missing",r.articlesEndpoint="/journals/"+t.id+"/articles",r._relevancy.journalId=r.journal.id,r._relevancy.switches=r.switches,r.gdpr.journalId=r.journal.id,r.gdpr.switches=r.switches,r.dt.switches=r.switches,e(t)})}},{key:"wrapResponsedText",value:function(t){return this.wrapperStart+t.replace(/Pending(<span.*?),\s/gm,"$1")+this.wrapperEnd}},{key:"prepareIntegrations",value:function(t){var e=this,r=t.articleHeader;this.handleItegrations=function(){e._integrations.swoopParseSimilarHtml({articleId:r.id,websiteId:e.journal.id}),e.loadingTimes.recos=new Date-e.loadingTimes.start,e.timeToClick.start=new Date,r.id&&(e._relevancy.articleId=r.id,e._relevancy.calculate()),e.gdpr.addGaTrackingCode(),"function"==typeof e.options.cb&&e.options.cb()}}},{key:"handleArticleResponsePrimary",value:function(t){var e=t.headers,r=t.status,n=t.text,i=t.type,o=new l.default(e[this.tag+"-article"]);this._relevancy.testID=e["x-testid"];var s=this.extractor.abstract?this.extractor.abstract.trim().length:0;if(!this.updateExecuted&&o.id&&o.meta_dated&&(o.missing_meta||o.abstract<s)&&(this.updateExecuted=!0,this.update(o.id)),403===r)return!(this.articleHandlingInterrupted=!0);var a=this.wrapResponsedText(n);return this.insertPosition?this.element.insertAdjacentHTML(this.insertPosition,a):this.element.innerHTML=a,this.element.querySelector(this._widgetContainerSelector).setAttribute("similar-"+i+"-merged",!0),this.articleHandling="finished",this.handleArticleResponseAfter&&this.handleArticleResponseAfter(),this.prepareIntegrations({articleHeader:o}),!0}},{key:"handleArticleResponseSecondary",value:function(t){var e=t.text,r=t.type;e&&e.length&&(this.mergeSecondaryResponse(this.wrapResponsedText(e),r),this.balanceListing()),this.handleItegrations()}},{key:"trackResponse",value:function(){this.responsesTracked+=1,2===this.responsesTracked&&this.widgetIsInIframe&&window.parent.postMessage({linksLoaded:document.getElementsByClassName("trendmd-widget-list-item__link").length,sender:"trendmd"},"*")}},{key:"getSimilarArticle",value:function(n,t){var e,r,i=this,o=this.options.element,s=t.url,a=window.trendmdGlobalState,u=a.journal,c=a.cache,l=a.urlLocked,h=u&&u.hasJsInterface;try{if(h){if(c&&c[o])return void(document.querySelector(o).innerHTML=c[o]);if(l){if(l.has(s+n))return;window.trendmdGlobalState.urlLocked.add(s+n),e=o,r=s+n,setTimeout(function(){window.trendmdGlobalState.cache[e]||window.trendmdGlobalState.urlLocked.delete(r)},15e3)}}}catch(t){console.log(t)}this.article({endpoint:"/journals/"+this.journal.id+"/similar-"+n,params:this.journal.findArticlesByUrlOnly?{url:t.url}:t,type:n},function(t,e){if(t&&-1===[404,403].indexOf(e.status))i.trackResponse();else{if(404===e.status)return i.createExecuted||(i.createExecuted=!0,i.create()),void i.trackResponse();var r=i.element.querySelector(i._widgetContainerSelector);if(r&&r.getAttribute("similar-"+n+"-merged"))i.trackResponse();else{switch(e.type=n,i.articleHandling){case"pending":if(i.articleHandlingInterrupted)i.handleArticleResponsePrimary(e);else{if(403===e.status)return void i.trackResponse();i.handleArticleResponseAfter=function(){return i.handleArticleResponseSecondary(e)}}break;case"finished":if(403===e.status)return void i.trackResponse();i.handleArticleResponseSecondary(e),h&&(window.trendmdGlobalState.cache[o]=document.querySelector(o).innerHTML);break;default:i.articleHandling="pending",i.handleArticleResponsePrimary(e)}i.trackResponse()}}})}},{key:"show",value:function(){var e=this;if(!this.element.querySelector(this._widgetContainerSelector)){var r=this.queryParams();this.isMissing(r)?this.missing():(this.addStyle(),this.createExecuted=!1,this.updateExecuted=!1,this.articleHandling=!1,["nonsponsored","sponsored"].forEach(function(t){return e.getSimilarArticle(t,r)}))}}},{key:"mergeSecondaryResponse",value:function(t,e){var r=this.element.querySelector(this._widgetContainerSelector),n=r.querySelectorAll("ol.trendmd-widget-list"),i=document.createElement("html");if(r.setAttribute("similar-"+e+"-merged",!0),i.innerHTML=t,Array.prototype.forEach.call(i.querySelectorAll("ol.trendmd-widget-list"),function(t,e){var r=document.createDocumentFragment();Array.prototype.forEach.call(t.querySelectorAll("li.trendmd-widget-list-item"),function(t){return r.appendChild(t)}),n[e].appendChild(r)}),"sponsored"===e){var o=i.querySelector(this._widgetContainerSelector);Object.keys(o.dataset).forEach(function(t){r.dataset[t]=o.dataset[t]})}}},{key:"balanceListing",value:function(){var t=this.element.querySelector(this._widgetContainerSelector).querySelectorAll("ol.trendmd-widget-list"),e=u(t,2),r=e[0],n=e[1];if(r&&n)for(var i=6,o=-(r.children.length+n.children.length)%2;n.children.length-r.children.length!==o;){if(n.children.length-r.children.length>o){var s=n.removeChild(n.children[0]);r.appendChild(s)}if(n.children.length-r.children.length<o){var a=r.removeChild(r.children[r.children.length-1]);n.insertBefore(a,n.children[0])}if(!(i-=1))return}}},{key:"article",value:function(t,e){var r=t.endpoint,n=t.params,i=t.type,o=this.apiUrl;return"nonsponsored"===i&&(o="https://cc.trendmd.co"),s.default.get(o+r).set(this.tag+"-widget-version",this.version).withCredentials().query(n).use(y.default).end(e)}},{key:"missing",value:function(){this.nonMissingUrl()||s.default.post(this.apiUrl+this.missingEndpoint).set(this.tag+"-widget-version",this.version).send({url:this.options.url||window.location.href}).end()}},{key:"create",value:function(t){s.default.post(this.apiUrl+this.articlesEndpoint).set(this.tag+"-widget-version",this.version).send(this.storeParams()).end(t)}},{key:"update",value:function(t,e){s.default.put(""+this.apiUrl+this.articlesEndpoint+"/"+t).set(this.tag+"-widget-version",this.version).send(this.storeParams()).end(e)}},{key:"queryParams",value:function(){return this.params("pubmed_id","doi","title","authors","url","publication_year","publication_month")}},{key:"storeParams",value:function(){return this.params("pubmed_id","doi","title","authors","url","publication_year","publication_month","abstract")}},{key:"params",value:function(){for(var e=this,r={},t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return-1!==n.indexOf("url")&&(r.url=this.options.url||window.location.href),n.forEach(function(t){"url"!==t&&(r[t]=e.checkParam(t,e.options[t]||e.extractor[t]))}),r}},{key:"checkParam",value:function(t,e){return"publication_year"===t?1900<=e&&e<=2100?e:null:"publication_month"===t?1<=e&&e<=12?e:null:e}},{key:"isMissing",value:function(t){return this.missingParameters(t)}},{key:"missingParameters",value:function(t){return!t.title&&!t.doi&&!t.pubmed_id}},{key:"nonMissingUrl",value:function(){return this.fileUrl()||this.googleCacheUrl()}},{key:"fileUrl",value:function(){return(this.options.url||window.location.href).match(/^file:\/\//)}},{key:"googleCacheUrl",value:function(){return(this.options.url||window.location.href).match(/^http:\/\/webcache\.googleusercontent\.com\/search/)}},{key:"addStyle",value:function(){var t=document.querySelector('link[rel="stylesheet"][href="'+this.styleSheetUrl+'"]');if(t)return t;var e=document.createElement("link");return e.rel="stylesheet",e.type="text/css",e.href=this.styleSheetUrl,e.media="all",document.getElementsByTagName("head")[0].appendChild(e)}}]),c}();r.default=g},{"./ArticleHeader":28,"./Dt":29,"./Gdpr":30,"./Integrations":31,"./JournalRetriever":32,"./Relevancy":33,"./RequestCache":34,domready:3,superagent:7,"trendmd-meta-extractor":14}],36:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=function(){function n(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(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),o=t("./SimilarWidget"),s=(n=o)&&n.__esModule?n:{default:n};var a=function(){function a(t){var e=t.tag,r=t.apiUrl,n=t.relevancyUrl,i=t.styleSheetUrl,o=t.dtConfig,s=t.version;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),this.apiUrl=r,this.relevancyUrl=n,this.styleSheetUrl=i,this.dtConfig=o,this.version=s,this.tag=e,window.trendmdGlobalState=window.trendmdGlobalState||{},window.trendmdGlobalState.cache=window.trendmdGlobalState.cache||{},window.trendmdGlobalState.urlLocked=window.trendmdGlobalState.urlLocked||new Set,this._getInlineConfig(),this.inlineConfig&&this.register()}return i(a,[{key:"_getURLParam",value:function(t){var e=new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(window.location.search),r=!1;return e&&e.length&&(r=e[1].replace(/\+/g,"%20"),r=decodeURIComponent(e[1])),r}},{key:"_getInlineConfig",value:function(){var i=this,t=void 0,e=document.currentScript||function(){for(var t=document.getElementsByTagName("script"),e="",r=0;r<t.length;r++){var n=t[r];n.getAttribute("data-"+i.tag+"config")&&(e=n)}return e}();if(e&&(t=e.getAttribute("data-amp")),t){this.inlineConfig={title:this._getURLParam("title"),doi:this._getURLParam("doi"),journal_id:this._getURLParam("journalId"),issn:this._getURLParam("issn"),pubmed_id:this._getURLParam("pubmed"),url:this._getURLParam("url"),custom:this._getURLParam("custom"),element:"#"+this.tag+"-suggestions"},window.parent.postMessage({sentinel:"amp",type:"embed-size",height:document.body.scrollHeight},"*");for(var r=document.getElementsByClassName(this.tag+"-widget-list-item__link"),n=0;n<r.length;n++)r[n].setAttribute("target","_blank")}else e&&(this.inlineConfig=e.getAttribute("data-"+this.tag+"config"),this.inlineConfig&&(this.inlineConfig=this.inlineConfig.replace(/'/g,'"'),this.inlineConfig=JSON.parse(this.inlineConfig)))}},{key:"register",value:function(t){(t||this.inlineConfig)&&(this.widget=this._similarWidget({apiUrl:this.apiUrl,relevancyUrl:this.relevancyUrl,styleSheetUrl:this.styleSheetUrl,options:t||this.inlineConfig,dtConfig:this.dtConfig,version:this.version,tag:this.tag}))}},{key:"gdpr",value:function(t){return this.widget?"function"==typeof t&&t():this.widget=this._similarWidget({apiUrl:this.apiUrl,relevancyUrl:this.relevancyUrl,styleSheetUrl:this.styleSheetUrl,options:{journal_id:1,element:"rnd-"+Math.floor(1e5*Math.random()),cbRetrieve:function(){"function"==typeof t&&t()}},dtConfig:!1,version:this.version,tag:this.tag}),this.widget.gdpr}},{key:"_similarWidget",value:function(t){return new s.default(t)}}]),a}();r.default=a},{"./SimilarWidget":35}],37:[function(s,t,a){(function(t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.TrendMD=a.config=void 0;var e=n(s("../Widget")),r=n(s("../../../version"));function n(t){return t&&t.__esModule?t:{default:t}}var i=a.config={tag:"trendmd",apiUrl:"https://www.trendmd.com",relevancyUrl:"https://academia.trendmd.com",styleSheetUrl:"https://trendmd.s3.amazonaws.com/trendmd.min.css",dtConfig:{dmd:{origin:"https://www.medtargetsystem.com",path:"/beacon/portal-lite"},lhk:{api:"https://caramel.press"}},version:r.default},o=a.TrendMD=e.default;t.TrendMD=new o(i)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../../version":38,"../Widget":36}],38:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default="2.0.5"},{}]},{},[37]);