!function(e){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=e();elseif("function"==typeofdefine&&define.amd)define([],e);else{vart;t="undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:this,t.Timestring=e()}}(function(){returnfunctione(t,n,r){functioni(u,o){if(!n[u]){if(!t[u]){vara="function"==typeofrequire&&require;if(!o&&a)returna(u,!0);if(s)returns(u,!0);varf=newError("Cannot find module '"+u+"'");throwf.code="MODULE_NOT_FOUND",f}varh=n[u]={exports:{}};t[u][0].call(h.exports,function(e){varn=t[u][1][e];returni(n?n:e)},h,h.exports,e,t,n,r)}returnn[u].exports}for(vars="function"==typeofrequire&&require,u=0;u<r.length;u++)i(r[u]);returni}({1:[function(e,t,n){"use strict";functionr(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});vari=function(){functione(e,t){for(varn=0;n<t.length;n++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}returnfunction(t,n,r){returnn&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){functione(){vart=void0===arguments[0]?{}:arguments[0];r(this,e);varn={hoursPerDay:24,daysPerWeek:7,weeksPerMonth:4,monthsPerYear:12};this.settings=n;for(variint)this.settings[i]=t[i];this.units={s:["s","sec","secs","second","seconds"],m:["m","min","mins","minute","minutes"],h:["h","hr","hrs","hour","hours"],d:["d","day","days"],w:["w","week","weeks"],mth:["mth","mths","month","months"],y:["y","yr","yrs","year","years"]},this.unitValues={s:1,m:60,h:3600},this.unitValues.d=this.settings.hoursPerDay*this.unitValues.h,this.unitValues.w=this.settings.daysPerWeek*this.unitValues.d,this.unitValues.mth=this.settings.weeksPerMonth*this.unitValues.w,this.unitValues.y=this.settings.monthsPerYear*this.unitValues.mth}returni(e,[{key:"parse",value:function(e){vart=this,n=void0===arguments[1]?"s":arguments[1],r=function(e){for(varnint.units)for(varrint.units[n])if(e===t.units[n][r])returnn;thrownewError("The unit ["+e+"] is not supported by timestring")},i=function(e,n){vari=t.unitValues[r(n)];returne/i},s=function(e,n){vari=t.unitValues[r(n)];returne*i},u=0,o=e.toLowerCase().replace(/[^\.\w+-]+/g,"").match(/[-+]?[0-9]+[a-z]+/g);if(null!==o)for(varaino){varf=o[a],h=f.match(/[0-9]+/g)[0],l=f.match(/[a-z]+/g)[0];u+=s(h,l)}returni(u,n)}}]),e}();n["default"]=s,String.prototype.parseTime=function(e,t){returnnews(t).parse(this,e)},t.exports=n["default"]},{}]},{},[1])(1)});