"use strict";const x=require("../../../../../_virtual/index26.js"),j=require("../../../escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js");require("../../../ansi-styles@3.2.1/node_modules/ansi-styles/index.js");const O=require("../../../supports-color@5.5.0/node_modules/supports-color/browser.js"),R=require("./templates.js"),w=require("../../../../../_virtual/index37.js");(function(i){const p=j,o=w.ansiStyles.exports,f=O.stdout,m=R,g=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),y=["ansi","ansi","ansi256","ansi16m"],h=new Set(["gray"]),r=Object.create(null);function d(t,e){e=e||{};const n=0;t.level=e.level===void 0?n:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function c(t){if(!this||!(this instanceof c)||this.template){const e={};return d(e,t),e.template=function(){const n=[].slice.call(arguments);return v.apply(null,[e.template].concat(n))},Object.setPrototypeOf(e,c.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=c,e.template}d(this,t)}g&&(o.blue.open="\x1B[94m");for(const t of Object.keys(o))o[t].closeRe=new RegExp(p(o[t].close),"g"),r[t]={get(){const e=o[t];return a.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};r.visible={get(){return a.call(this,this._styles||[],!0,"visible")}},o.color.closeRe=new RegExp(p(o.color.close),"g");for(const t of Object.keys(o.color.ansi))h.has(t)||(r[t]={get(){const e=this.level;return function(){const l={open:o.color[y[e]][t].apply(null,arguments),close:o.color.close,closeRe:o.color.closeRe};return a.call(this,this._styles?this._styles.concat(l):[l],this._empty,t)}}});o.bgColor.closeRe=new RegExp(p(o.bgColor.close),"g");for(const t of Object.keys(o.bgColor.ansi)){if(h.has(t))continue;const e="bg"+t[0].toUpperCase()+t.slice(1);r[e]={get(){const n=this.level;return function(){const s={open:o.bgColor[y[n]][t].apply(null,arguments),close:o.bgColor.close,closeRe:o.bgColor.closeRe};return a.call(this,this._styles?this._styles.concat(s):[s],this._empty,t)}}}}const b=Object.defineProperties(()=>{},r);function a(t,e,n){const l=function(){return _.apply(l,arguments)};l._styles=t,l._empty=e;const s=this;return Object.defineProperty(l,"level",{enumerable:!0,get(){return s.level},set(u){s.level=u}}),Object.defineProperty(l,"enabled",{enumerable:!0,get(){return s.enabled},set(u){s.enabled=u}}),l.hasGrey=this.hasGrey||n==="gray"||n==="grey",l.__proto__=b,l}function _(){const t=arguments,e=t.length;let n=String(arguments[0]);if(e===0)return"";if(e>1)for(let s=1;s<e;s++)n+=" "+t[s];if(!this.enabled||this.level<=0||!n)return this._empty?"":n;const l=o.dim.open;g&&this.hasGrey&&(o.dim.open="");for(const s of this._styles.slice().reverse())n=s.open+n.replace(s.closeRe,s.open)+s.close,n=n.replace(/\r?\n/g,`${s.close}$&${s.open}`);return o.dim.open=l,n}function v(t,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");const n=[].slice.call(arguments,2),l=[e.raw[0]];for(let s=1;s<e.length;s++)l.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&")),l.push(String(e.raw[s]));return m(t,l.join(""))}Object.defineProperties(c.prototype,r),i.exports=c(),i.exports.supportsColor=f,i.exports.default=i.exports})(x.chalk);
//# sourceMappingURL=index.js.map
