"use strict";var f=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var M=(a,t)=>{for(var e in t)f(a,e,{get:t[e],enumerable:!0})},C=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of y(t))!D.call(a,n)&&n!==e&&f(a,n,{get:()=>t[n],enumerable:!(s=b(t,n))||s.enumerable});return a};var T=a=>C(f({},"__esModule",{value:!0}),a);var U={};M(U,{GitModule:()=>F});module.exports=T(U);var p=require("../../internal/deprecated"),d=require("../../internal/module-base");const N="\xA0";class F extends d.ModuleBase{branch(){const t=this.faker.hacker.noun().replace(" ","-"),e=this.faker.hacker.verb().replace(" ","-");return`${t}-${e}`}commitEntry(t={}){const{merge:e=this.faker.datatype.boolean({probability:.2}),eol:s="CRLF",refDate:n}=t,r=[`commit ${this.faker.git.commitSha()}`];e&&r.push(`Merge: ${this.commitSha({length:7})} ${this.commitSha({length:7})}`);const o=this.faker.person.firstName(),i=this.faker.person.lastName(),h=this.faker.person.fullName({firstName:o,lastName:i}),m=this.faker.internet.userName({firstName:o,lastName:i});let c=this.faker.helpers.arrayElement([h,m]);const u=this.faker.internet.email({firstName:o,lastName:i});c=c.replace(/^[.,:;"\\']|[<>\n]|[.,:;"\\']$/g,""),r.push(`Author: ${c} <${u}>`,`Date: ${this.commitDate({refDate:n})}`,"",`${N.repeat(4)}${this.commitMessage()}`,"");const g=s==="CRLF"?`\r
`:`
`;return r.join(g)}commitMessage(){return`${this.faker.hacker.verb()} ${this.faker.hacker.adjective()} ${this.faker.hacker.noun()}`}commitDate(t={}){const{refDate:e=this.faker.defaultRefDate()}=t,s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=this.faker.date.recent({days:1,refDate:e}),o=s[r.getUTCDay()],i=n[r.getUTCMonth()],h=r.getUTCDate(),m=r.getUTCHours().toString().padStart(2,"0"),c=r.getUTCMinutes().toString().padStart(2,"0"),u=r.getUTCSeconds().toString().padStart(2,"0"),g=r.getUTCFullYear(),l=this.faker.number.int({min:-11,max:12}),k=Math.abs(l).toString().padStart(2,"0"),$="00",S=l>=0?"+":"-";return`${o} ${i} ${h} ${m}:${c}:${u} ${g} ${S}${k}${$}`}commitSha(t={}){const{length:e=40}=t;return this.faker.string.hexadecimal({length:e,casing:"lower",prefix:""})}shortSha(){return(0,p.deprecated)({deprecated:"faker.git.shortSha()",proposed:"faker.git.commitSha({ length: 7 })",since:"8.0",until:"9.0"}),this.commitSha({length:7})}}0&&(module.exports={GitModule});
