var e=class e{constructor(e=null,t=null){if(e)this.release=e,this.version=e.tag_name,this.versionName=e.name,this.versionTag=e.tag_tag;else if(t)this.release=null,this.version=t,this.versionName=null,this.versionTag=null;else throw Error(`Either release or version must be provided`);this.versionParts=this.parseVersion(this.version),this.versionMajor=this.versionParts?this.versionParts[0]:null,this.versionMinor=this.versionParts?this.versionParts[1]:null,this.versionPatch=this.versionParts?this.versionParts[2]:null}parseVersion(e){if(!e)return null;let t=e;return t.indexOf(`v`)===0&&(t=t.substring(1)),t.split(`.`).map(Number)}isGreater(t){let n;if(t instanceof e)n=t.versionParts;else if(typeof t==`string`)n=this.parseVersion(t);else throw Error(`Invalid argument: otherVersion must be a SunshineVersion object or a version string`);if(!this.versionParts||!n)return!1;for(let e=0;e<Math.min(3,this.versionParts.length,n.length);e++)if(this.versionParts[e]!==n[e])return this.versionParts[e]>n[e];return!1}};export{e as t};